diff options
author | Katarina Machalkova <kmachalkova@suse.cz> | 2011-03-23 13:30:19 +0100 |
---|---|---|
committer | Katarina Machalkova <kmachalkova@suse.cz> | 2011-03-23 13:30:19 +0100 |
commit | b77de9280595343c2ca637a522fdb482e18a318f (patch) | |
tree | 0b71ef4e749318241f67ff6836731cd3976ad93a /sc/source/filter/inc/xlescher.hxx | |
parent | 6bda3610fe27a654ccb99d2f947260e0de353c2c (diff) |
Fixed binary import/export of MSO drawing objects
(related to row limit++ changes - bnc#504623, fdo#32106)
Diffstat (limited to 'sc/source/filter/inc/xlescher.hxx')
-rw-r--r-- | sc/source/filter/inc/xlescher.hxx | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/sc/source/filter/inc/xlescher.hxx b/sc/source/filter/inc/xlescher.hxx index 2bd8bcb104d2..04396af72009 100644 --- a/sc/source/filter/inc/xlescher.hxx +++ b/sc/source/filter/inc/xlescher.hxx @@ -331,14 +331,24 @@ struct XclObjAnchor : public XclRange const Rectangle& rRect, MapUnit eMapUnit, bool bDffAnchor ); }; + template< typename StreamType > StreamType& operator>>( StreamType& rStrm, XclObjAnchor& rAnchor ) { - return rStrm + sal_uInt16 tmpFirstRow, tmpTY, tmpLastRow, tmpBY; + + rStrm >> rAnchor.maFirst.mnCol >> rAnchor.mnLX - >> rAnchor.maFirst.mnRow >> rAnchor.mnTY + >> tmpFirstRow >> tmpTY >> rAnchor.maLast.mnCol >> rAnchor.mnRX - >> rAnchor.maLast.mnRow >> rAnchor.mnBY; + >> tmpLastRow >> tmpBY; + + rAnchor.maFirst.mnRow = static_cast<sal_uInt32> (tmpFirstRow); + rAnchor.mnTY = static_cast<sal_uInt32> (tmpTY); + rAnchor.maLast.mnRow = static_cast<sal_uInt32> (tmpLastRow); + rAnchor.mnBY = static_cast<sal_uInt32> (tmpBY); + + return rStrm; } template< typename StreamType > @@ -346,9 +356,9 @@ StreamType& operator<<( StreamType& rStrm, const XclObjAnchor& rAnchor ) { return rStrm << rAnchor.maFirst.mnCol << rAnchor.mnLX - << rAnchor.maFirst.mnRow << rAnchor.mnTY + << static_cast<sal_uInt16>(rAnchor.maFirst.mnRow) << static_cast<sal_uInt16>(rAnchor.mnTY) << rAnchor.maLast.mnCol << rAnchor.mnRX - << rAnchor.maLast.mnRow << rAnchor.mnBY; + << static_cast<sal_uInt16>(rAnchor.maLast.mnRow) << static_cast<sal_uInt16>(rAnchor.mnBY); } // ---------------------------------------------------------------------------- |