Class: OoxmlParser::PictureDimension
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::PictureDimension
- Defined in:
- lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/drawing_properties/size_relative/picture_dimension.rb
Overview
Class for parsing ‘wp14:pctWidth`, `wp14:pctHeight` object
Instance Attribute Summary collapse
-
#value ⇒ Float
Value of picture width or height.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#parse(node) ⇒ PictureWidth
Parse PictureWidth.
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
#value ⇒ Float
Returns value of picture width or height.
5 6 7 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/drawing_properties/size_relative/picture_dimension.rb', line 5 def value @value end |
Instance Method Details
#parse(node) ⇒ PictureWidth
Parse PictureWidth
10 11 12 13 14 15 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/drawing_properties/size_relative/picture_dimension.rb', line 10 def parse(node) # value should be in percent as said in # https://msdn.microsoft.com/en-us/library/documentformat.openxml.office2010.word.drawing.relativewidth%28v=office.14%29.aspx?f=255&MSPPError=-2147217396 @value = OoxmlSize.new(node.child.text.to_f, :one_1000th_percent) self end |