[Libreoffice-commits] .: sc/source
Noel Power
noelp at kemper.freedesktop.org
Wed Aug 15 05:05:00 PDT 2012
sc/source/filter/xml/XMLTableShapeImportHelper.cxx | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
New commits:
commit 541986fef0993d749cc7ed790eacace322f43bb0
Author: Noel Power <noel.power at suse.com>
Date: Wed Aug 15 13:03:04 2012 +0100
fix for fdo#53229, import group shapes position and size correctly
Change-Id: Ie513b4a6351a2c6458eeca208faf7ba5bbb9fcce
diff --git a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
index 1b58d21..5bc2553 100644
--- a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
+++ b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
@@ -192,6 +192,26 @@ void XMLTableShapeImportHelper::finishShape(
}
else //this are grouped shapes which should also get the layerid
{
+ if ( !bOnTable )
+ {
+ // For cell anchored grouped shape we need to set the start
+ // position from the most top left positioned shape within
+ // the group
+ Point aStartPoint( rShape->getPosition().X,rShape->getPosition().Y );
+ awt::Size aSize(rShape->getSize() );
+ if (SvxShape* pGroupShapeImp = SvxShape::getImplementation(rShapes))
+ {
+ if (SdrObject *pSdrObj = pGroupShapeImp->GetSdrObject())
+ {
+ if ( ScDrawObjData* pAnchor = ScDrawLayer::GetObjData( pSdrObj ) )
+ {
+ if ( ( pAnchor->maStartOffset.getX() == 0 && pAnchor->maStartOffset.getY() == 0 )
+ || ( aStartPoint.IsAbove( pAnchor->maStartOffset ) && aStartPoint.IsLeft( pAnchor->maStartOffset ) ) )
+ pAnchor->maStartOffset = aStartPoint;
+ }
+ }
+ }
+ }
sal_Int16 nAttrCount(xAttrList.is() ? xAttrList->getLength() : 0);
sal_Int16 nLayerID(-1);
for( sal_Int16 i=0; i < nAttrCount; ++i )
More information about the Libreoffice-commits
mailing list