[Libreoffice-commits] core.git: oox/source sd/qa
Szymon Kłos
szymon.klos at collabora.com
Tue Oct 17 20:06:03 UTC 2017
oox/source/export/drawingml.cxx | 9 +++++++++
sd/qa/unit/export-tests-ooxml2.cxx | 4 ++++
2 files changed, 13 insertions(+)
New commits:
commit fd3383556881d6a9d73e1a3027c079cf9bfddecb
Author: Szymon Kłos <szymon.klos at collabora.com>
Date: Sun Oct 15 18:37:58 2017 +0200
PPTX export: correct position for shape in group
Change-Id: I5c0c5d2c2b246337b78a2e1fbee97032701fb640
Reviewed-on: https://gerrit.libreoffice.org/43435
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 4c5c1755cdaa..306e884fc0f3 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -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;
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index acbeaa7142bb..25a1963c8e75 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -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);
More information about the Libreoffice-commits
mailing list