oox/source/export/drawingml.cxx | 2 +- sd/qa/unit/data/pptx/tdf128213.pptx |binary sd/qa/unit/export-tests-ooxml2.cxx | 12 ++++++++++++ 3 files changed, 13 insertions(+), 1 deletion(-)
New commits: commit e9f2f9e83fc12b577b13d618bde591222d4fdba9 Author: Gülşah Köse <gulsah.k...@collabora.com> AuthorDate: Thu Nov 5 14:19:03 2020 +0300 Commit: Gülşah Köse <gulsah.k...@collabora.com> CommitDate: Thu Nov 5 22:19:31 2020 +0100 tdf#128213 Fix export rotation problem. Export code has written for case that we have normal rotation angle and camera z rotation together. If object has not normal rotation but have camera z rotation, problem occurs. Camera z rotation info is already exist between <scene3d> tags. If we have not <xfrm rot="..."> (normal rotation angle) we shouldn't add camera rotation here. Change-Id: I1819953c937783d30b6e7ced978758300bb56d7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105341 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.k...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105350 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 264bf3a5e55f..977a1ccfa3b1 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -1708,7 +1708,7 @@ void DrawingML::WriteShapeTransformation( const Reference< XShape >& rXShape, sa if (xPropertySetInfo->hasPropertyByName("RotateAngle")) xPropertySet->getPropertyValue("RotateAngle") >>= nRotation; // tdf#133037: restore original rotate angle before output - if (xPropertySetInfo->hasPropertyByName(UNO_NAME_MISC_OBJ_INTEROPGRABBAG)) + if (nRotation != 0 && xPropertySetInfo->hasPropertyByName(UNO_NAME_MISC_OBJ_INTEROPGRABBAG)) { uno::Sequence<beans::PropertyValue> aGrabBagProps; xPropertySet->getPropertyValue(UNO_NAME_MISC_OBJ_INTEROPGRABBAG) >>= aGrabBagProps; diff --git a/sd/qa/unit/data/pptx/tdf128213.pptx b/sd/qa/unit/data/pptx/tdf128213.pptx new file mode 100644 index 000000000000..1f308128c367 Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf128213.pptx differ diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index 7a188b885d08..a4040be04fbc 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -183,6 +183,7 @@ public: void testTdf127379(); void testTdf98603(); void testTdf79082(); + void testTdf128213(); void testTdf119087(); void testTdf131554(); void testTdf132282(); @@ -287,6 +288,7 @@ public: CPPUNIT_TEST(testTdf127379); CPPUNIT_TEST(testTdf98603); CPPUNIT_TEST(testTdf79082); + CPPUNIT_TEST(testTdf128213); CPPUNIT_TEST(testTdf119087); CPPUNIT_TEST(testTdf131554); CPPUNIT_TEST(testTdf132282); @@ -2641,6 +2643,16 @@ void SdOOXMLExportTest2::testTdf98603() CPPUNIT_ASSERT_EQUAL(OUString("IL"), aLocale.Country); } +void SdOOXMLExportTest2::testTdf128213() +{ + ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf128213.pptx"), PPTX); + utl::TempFile tempFile; + xDocShRef = saveAndReload( xDocShRef.get(), PPTX, &tempFile ); + + xmlDocPtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml"); + assertXPathNoAttribute(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:xfrm", "rot"); +} + void SdOOXMLExportTest2::testTdf79082() { ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf79082.pptx"), PPTX); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits