summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oox/source/ppt/pptshape.cxx4
-rw-r--r--sd/qa/unit/data/pptx/tdf132282.pptxbin0 -> 56323 bytes
-rw-r--r--sd/qa/unit/export-tests-ooxml2.cxx14
3 files changed, 15 insertions, 3 deletions
diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index 440103acff12..af7324485c65 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -424,7 +424,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 prority.
oox::drawingml::ShapePtr PPTShape::findPlaceholder( sal_Int32 nFirstSubType, sal_Int32 nSecondSubType,
const OptValue< sal_Int32 >& oSubTypeIndex, std::vector< oox::drawingml::ShapePtr >& rShapes, bool bMasterOnly )
@@ -516,8 +515,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
new file mode 100644
index 000000000000..cc1d7df4cd8f
--- /dev/null
+++ b/sd/qa/unit/data/pptx/tdf132282.pptx
Binary files differ
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index f12ad87e9abc..6bac3cca9584 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -184,6 +184,7 @@ public:
void testTdf98603();
void testTdf119087();
void testTdf131554();
+ void testTdf132282();
CPPUNIT_TEST_SUITE(SdOOXMLExportTest2);
@@ -286,6 +287,7 @@ public:
CPPUNIT_TEST(testTdf98603);
CPPUNIT_TEST(testTdf119087);
CPPUNIT_TEST(testTdf131554);
+ CPPUNIT_TEST(testTdf132282);
CPPUNIT_TEST_SUITE_END();
@@ -2653,6 +2655,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();