diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-09-02 01:55:45 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-09-02 02:00:41 -0400 |
commit | d178d7bef193565a7d6aacbc37a58dfc4bd7b316 (patch) | |
tree | 4a56f448cabc5882454c8a78f3a2e6c633d2c1c1 /oox | |
parent | 2c00fc5206b7fe7c4aba85a4d9a41a75ec432d4a (diff) |
fdo#40466: Get charts to import from xlsx again.
This regression was probably caused by a bad merge of OOo m106.
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/xls/drawingfragment.cxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/oox/source/xls/drawingfragment.cxx b/oox/source/xls/drawingfragment.cxx index 248677573421..7a95fe4b2ada 100644 --- a/oox/source/xls/drawingfragment.cxx +++ b/oox/source/xls/drawingfragment.cxx @@ -283,11 +283,20 @@ void DrawingFragment::onEndElement() getLimitedValue< sal_Int32, sal_Int64 >( aShapeRectEmu.Y, 0, SAL_MAX_INT32 ), getLimitedValue< sal_Int32, sal_Int64 >( aShapeRectEmu.Width, 0, SAL_MAX_INT32 ), getLimitedValue< sal_Int32, sal_Int64 >( aShapeRectEmu.Height, 0, SAL_MAX_INT32 ) ); + + // Make sure to set the position and size *before* calling addShape(). + mxShape->setPosition(::com::sun::star::awt::Point(aShapeRectEmu.X, aShapeRectEmu.Y)); + mxShape->setSize(::com::sun::star::awt::Size(aShapeRectEmu.Width, aShapeRectEmu.Height)); + basegfx::B2DHomMatrix aTransformation; mxShape->addShape( getOoxFilter(), &getTheme(), mxDrawPage, aTransformation, &aShapeRectEmu32 ); - // collect all shape positions in the WorksheetHelper base class - extendShapeBoundingBox( aShapeRectEmu32 ); + /* Collect all shape positions in the WorksheetHelper base + class. But first, scale EMUs to 1/100 mm. */ + Rectangle aShapeRectHmm( + convertEmuToHmm( aShapeRectEmu.X ), convertEmuToHmm( aShapeRectEmu.Y ), + convertEmuToHmm( aShapeRectEmu.Width ), convertEmuToHmm( aShapeRectEmu.Height ) ); + extendShapeBoundingBox( aShapeRectHmm ); } } mxShape.reset(); |