Class: OoxmlParser::XlsxDrawingPositionParameters
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::XlsxDrawingPositionParameters
- Defined in:
- lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/xlsx_drawing/xlsx_drawing_position_parameters.rb
Overview
Class for parsing offset of drawing ‘xdr:from`, `xdr:to`
Instance Attribute Summary collapse
-
#column ⇒ Object
Returns the value of attribute column.
-
#column_offset ⇒ Object
Returns the value of attribute column_offset.
-
#row ⇒ Object
Returns the value of attribute row.
-
#row_offset ⇒ Object
Returns the value of attribute row_offset.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#parse(node) ⇒ XlsxDrawingPositionParameters
Parse XlsxDrawingPositionParameters object.
Methods inherited from OOXMLDocumentObject
#==, add_to_xmls_stack, copy_file_and_rename_to_zip, current_xml, dir, encrypted_file?, get_link_from_rels, #initialize, unzip_file, #with_data?
Methods included from OoxmlDocumentObjectHelper
Constructor Details
This class inherits a constructor from OoxmlParser::OOXMLDocumentObject
Instance Attribute Details
#column ⇒ Object
Returns the value of attribute column.
4 5 6 |
# File 'lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/xlsx_drawing/xlsx_drawing_position_parameters.rb', line 4 def column @column end |
#column_offset ⇒ Object
Returns the value of attribute column_offset.
4 5 6 |
# File 'lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/xlsx_drawing/xlsx_drawing_position_parameters.rb', line 4 def column_offset @column_offset end |
#row ⇒ Object
Returns the value of attribute row.
4 5 6 |
# File 'lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/xlsx_drawing/xlsx_drawing_position_parameters.rb', line 4 def row @row end |
#row_offset ⇒ Object
Returns the value of attribute row_offset.
4 5 6 |
# File 'lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/xlsx_drawing/xlsx_drawing_position_parameters.rb', line 4 def row_offset @row_offset end |
Instance Method Details
#parse(node) ⇒ XlsxDrawingPositionParameters
Parse XlsxDrawingPositionParameters object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/xlsx_drawing/xlsx_drawing_position_parameters.rb', line 9 def parse(node) node.xpath('*').each do |node_child| case node_child.name when 'col' @column = Coordinates.get_column_name(node_child.text.to_i + 1) when 'colOff' @column_offset = OoxmlSize.new(node_child.text.to_f, :emu) when 'row' @row = node_child.text.to_i + 1 when 'rowOff' @row_offset = OoxmlSize.new(node_child.text.to_f, :emu) end end self end |