diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-04-28 14:42:29 +0200 |
---|---|---|
committer | Xisco Faulí <xiscofauli@libreoffice.org> | 2020-04-28 15:50:53 +0200 |
commit | 5750be8cf82b6933cb0b44ffe5ad307da1b4a0eb (patch) | |
tree | 3ccd1a91cdac4124506e7fa1783ef8412f900e1f | |
parent | 6b8ae0882bcac65f4307d6a6425f37eb0a010713 (diff) |
tdf#132282: Revert fix for tdf#131554
912217285b3058efa54c2336f91fda4efdad6ff0 fixed the
root cause of tdf#131554 and
69b83dc2d3014dd9b18402534e15c937dc082464 is no longer needed
The unittest still passes
Change-Id: I7c723b0c3cc2b56022978bbeb8bf6b3f6f93f1c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93063
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
-rw-r--r-- | oox/source/ppt/pptshape.cxx | 4 | ||||
-rw-r--r-- | sd/qa/unit/data/pptx/tdf132282.pptx | bin | 0 -> 56323 bytes | |||
-rw-r--r-- | sd/qa/unit/export-tests-ooxml2.cxx | 14 |
3 files changed, 15 insertions, 3 deletions
diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx index 0fc486c05a3f..99bba509fa47 100644 --- a/oox/source/ppt/pptshape.cxx +++ b/oox/source/ppt/pptshape.cxx @@ -422,7 +422,6 @@ namespace // 3. ph with nSecondSubType and the same oSubTypeIndex // 4. ph with nSecondSubType // 5. ph with the same oSubTypeIndex -// It appears 3 and 1 has the same highest priority. oox::drawingml::ShapePtr PPTShape::findPlaceholder( sal_Int32 nFirstSubType, sal_Int32 nSecondSubType, const OptValue< sal_Int32 >& oSubTypeIndex, std::vector< oox::drawingml::ShapePtr >& rShapes, bool bMasterOnly ) @@ -514,8 +513,7 @@ oox::drawingml::ShapePtr PPTShape::findPlaceholder( sal_Int32 nFirstSubType, sal } } - if (aPlaceholders.hasByPrio(0) || - aPlaceholders.hasByPrio(2)) + if (aPlaceholders.hasByPrio(0)) { break; } diff --git a/sd/qa/unit/data/pptx/tdf132282.pptx b/sd/qa/unit/data/pptx/tdf132282.pptx Binary files differnew file mode 100644 index 000000000000..cc1d7df4cd8f --- /dev/null +++ b/sd/qa/unit/data/pptx/tdf132282.pptx diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index 3a2a3802e38a..b2b4439d9924 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -192,6 +192,7 @@ public: void testTdf129372(); void testShapeGlowEffect(); void testTdf131554(); + void testTdf132282(); CPPUNIT_TEST_SUITE(SdOOXMLExportTest2); @@ -301,6 +302,7 @@ public: CPPUNIT_TEST(testTdf129372); CPPUNIT_TEST(testShapeGlowEffect); CPPUNIT_TEST(testTdf131554); + CPPUNIT_TEST(testTdf132282); CPPUNIT_TEST_SUITE_END(); @@ -2811,6 +2813,18 @@ void SdOOXMLExportTest2::testTdf131554() CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(13251), xShape->getPosition().Y); } +void SdOOXMLExportTest2::testTdf132282() +{ + ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf132282.pptx"), PPTX); + xDocShRef = saveAndReload( xDocShRef.get(), PPTX ); + uno::Reference<drawing::XShape> xShape(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY); + // Without the fix in place, the position would be 0,0, height = 1 and width = 1 + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1736), xShape->getPosition().X); + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(763), xShape->getPosition().Y); + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(30523), xShape->getSize().Width); + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2604), xShape->getSize().Height); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest2); CPPUNIT_PLUGIN_IMPLEMENT(); |