diff options
| author | Randy Morgan <[email protected]> | 2012-04-01 11:58:09 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2012-04-01 11:58:09 +0900 |
| commit | 1529fce32449a8454208fded20d83c9ceca810e0 (patch) | |
| tree | 02f722182fea58a51b8c0a5433221b3a677e80e4 /lib/axlsx/drawing/one_cell_anchor.rb | |
| parent | 22a341841f191a5aa00e87b1f166b4f25cc67f0a (diff) | |
| download | caxlsx-1529fce32449a8454208fded20d83c9ceca810e0.tar.gz caxlsx-1529fce32449a8454208fded20d83c9ceca810e0.zip | |
rebuild all serialization to use string concatenation instead of nokogiri.
Diffstat (limited to 'lib/axlsx/drawing/one_cell_anchor.rb')
| -rw-r--r-- | lib/axlsx/drawing/one_cell_anchor.rb | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/lib/axlsx/drawing/one_cell_anchor.rb b/lib/axlsx/drawing/one_cell_anchor.rb index e0574172..fd33892c 100644 --- a/lib/axlsx/drawing/one_cell_anchor.rb +++ b/lib/axlsx/drawing/one_cell_anchor.rb @@ -64,29 +64,15 @@ module Axlsx def to_xml_string(str = '') str << '<xdr:oneCellAnchor>' - str << '<from>' + str << '<xdr:from>' from.to_xml_string(str) - str << '</from>' - str << '<ext>' << ext.to_s << '</ext>' + str << '</xdr:from>' + str << '<xdr:ext cx="' << ext[:cx].to_s << '" cy="' << ext[:cy].to_s << '"/>' @object.to_xml_string(str) - str << '<clientData/>' + str << '<xdr:clientData/>' str << '</xdr:oneCellAnchor>' end - # Serializes the anchor - # @param [Nokogiri::XML::Builder] xml The document builder instance this objects xml will be added to. - # @return [String] - def to_xml(xml) - xml[:xdr].oneCellAnchor { - xml.from { - from.to_xml(xml) - } - xml.ext ext - @object.to_xml(xml) - xml.clientData - } - end - private # converts the pixel width and height to EMU units and returns a hash of |
