summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorGülşah Köse <gulsah.kose@collabora.com>2020-08-01 01:39:26 +0300
committerXisco Fauli <xiscofauli@libreoffice.org>2020-08-05 10:23:32 +0200
commit802fa332fc05a119c525f20a46ac3aaea7900602 (patch)
tree4072f07a10a24dcb2a711b662575846d64421595 /sd
parent0fa151a50cd9a0013aedb4010d32a25b0fe1e0cf (diff)
tdf#133687 Fix the placeholders priority order.
When we don't have type attribute on slide but have on slidelayout we have to use it instead of default type. Change-Id: Ibb874b5ee39c48641484fe1a8686f66c31695f76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99904 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> (cherry picked from commit e0018be102edd6e376e0622e0a9384176d2f119c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100052 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/data/ppt/placeholder-priority.pptxbin0 -> 26091 bytes
-rw-r--r--sd/qa/unit/import-tests.cxx20
2 files changed, 20 insertions, 0 deletions
diff --git a/sd/qa/unit/data/ppt/placeholder-priority.pptx b/sd/qa/unit/data/ppt/placeholder-priority.pptx
new file mode 100644
index 000000000000..d11dc4785f54
--- /dev/null
+++ b/sd/qa/unit/data/ppt/placeholder-priority.pptx
Binary files differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index bc80fb5e3ca3..cec91cfb6387 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -133,6 +133,7 @@ public:
void testN828390_2();
void testN828390_3();
void testFdo68594();
+ void testPlaceholderPriority();
void testFdo72998();
void testFdo77027();
void testStrictOOXML();
@@ -240,6 +241,7 @@ public:
CPPUNIT_TEST(testN828390_2);
CPPUNIT_TEST(testN828390_3);
CPPUNIT_TEST(testFdo68594);
+ CPPUNIT_TEST(testPlaceholderPriority);
CPPUNIT_TEST(testFdo72998);
CPPUNIT_TEST(testFdo77027);
CPPUNIT_TEST(testStrictOOXML);
@@ -686,6 +688,24 @@ void SdImportTest::testFdo68594()
xDocShRef->DoClose();
}
+void SdImportTest::testPlaceholderPriority()
+{
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/ppt/placeholder-priority.pptx"), PPTX);
+
+ const SdrPage* pPage = GetPage( 1, xDocShRef );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Missing placeholder", sal_uInt32(2), sal_uInt32(pPage->GetObjCount()));
+
+ tools::Rectangle pObj1Rect(9100, 3500, 29619, 4038);
+ SdrObject *pObj1 = pPage->GetObj(0);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Placeholder position is wrong, check the placeholder priority", pObj1Rect, pObj1->GetCurrentBoundRect());
+
+ tools::Rectangle pObj2Rect(9102, 8643, 29619, 12642);
+ SdrObject *pObj2 = pPage->GetObj(1);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Placeholder position is wrong, check the placeholder priority", pObj2Rect, pObj2->GetCurrentBoundRect());
+
+ // If the placeholder positions are wrong, please check placeholder priority in Placeholders class.
+}
+
void SdImportTest::testPptCrop()
{
sd::DrawDocShellRef xDocShRef