Class: OoxmlParser::XlsxDrawing
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::XlsxDrawing
- Defined in:
- lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/xlsx_drawing.rb
Instance Attribute Summary collapse
-
#from ⇒ XlsxDrawingPositionParameters
Position from.
-
#graphic_frame ⇒ GraphicFrame
Graphic frame.
-
#grouping ⇒ Object
Returns the value of attribute grouping.
-
#picture ⇒ Object
Returns the value of attribute picture.
-
#shape ⇒ Object
Returns the value of attribute shape.
-
#to ⇒ XlsxDrawingPositionParameters
Position to.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#parse(node) ⇒ XlsxDrawing
Parse XlsxDrawing 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
#from ⇒ XlsxDrawingPositionParameters
Returns position from.
6 7 8 |
# File 'lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/xlsx_drawing.rb', line 6 def from @from end |
#graphic_frame ⇒ GraphicFrame
Returns graphic frame.
10 11 12 |
# File 'lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/xlsx_drawing.rb', line 10 def graphic_frame @graphic_frame end |
#grouping ⇒ Object
Returns the value of attribute grouping.
4 5 6 |
# File 'lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/xlsx_drawing.rb', line 4 def grouping @grouping end |
#picture ⇒ Object
Returns the value of attribute picture.
4 5 6 |
# File 'lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/xlsx_drawing.rb', line 4 def picture @picture end |
#shape ⇒ Object
Returns the value of attribute shape.
4 5 6 |
# File 'lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/xlsx_drawing.rb', line 4 def shape @shape end |
#to ⇒ XlsxDrawingPositionParameters
Returns position to.
8 9 10 |
# File 'lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/xlsx_drawing.rb', line 8 def to @to end |
Instance Method Details
#parse(node) ⇒ XlsxDrawing
Parse XlsxDrawing object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/xlsx_drawing.rb', line 15 def parse(node) node.xpath('*').each do |child_node| case child_node.name when 'from' @from = XlsxDrawingPositionParameters.new(parent: self).parse(child_node) when 'to' @to = XlsxDrawingPositionParameters.new(parent: self).parse(child_node) when 'sp' @shape = DocxShape.new(parent: self).parse(child_node) when 'grpSp' @grouping = ShapesGrouping.new(parent: self).parse(child_node) when 'pic' @picture = DocxPicture.new(parent: self).parse(child_node) when 'graphicFrame' @graphic_frame = GraphicFrame.new(parent: self).parse(child_node) when 'cxnSp' @shape = ConnectionShape.new(parent: self).parse(child_node) end end self end |