Kaydet (Commit) fd338355 authored tarafından Szymon Kłos's avatar Szymon Kłos

PPTX export: correct position for shape in group

Change-Id: I5c0c5d2c2b246337b78a2e1fbee97032701fb640
Reviewed-on: https://gerrit.libreoffice.org/43435Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarSzymon Kłos <szymon.klos@collabora.com>
üst ebb2b8ce
......@@ -1300,6 +1300,15 @@ void DrawingML::WriteShapeTransformation( const Reference< XShape >& rXShape, sa
aPos.X -= aParentPos.X;
aPos.Y -= aParentPos.Y;
}
else if (m_xParent.is())
{
SdrObject* pShape = GetSdrObjectFromXShape(rXShape);
if (pShape)
{
aPos.X = pShape->GetRelativePos().getX();
aPos.Y = pShape->GetRelativePos().getY();
}
}
if ( aSize.Width < 0 )
aSize.Width = 1000;
......
......@@ -1249,6 +1249,10 @@ void SdOOXMLExportTest2::testSmartartRotation2()
xmlDocPtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp/p:sp[3]/p:txBody/a:bodyPr", "rot", "10800000");
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp/p:sp[3]/p:spPr/a:xfrm/a:off", "x", "2276280");
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp/p:sp[3]/p:spPr/a:xfrm/a:off", "y", "3158280");
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp/p:sp[1]/p:spPr/a:xfrm/a:off", "x", "2031840");
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp/p:sp[1]/p:spPr/a:xfrm/a:off", "y", "719640");
}
CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment