summaryrefslogtreecommitdiff
path: root/sd/qa/unit/import-tests.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/qa/unit/import-tests.cxx')
-rw-r--r--sd/qa/unit/import-tests.cxx20
1 files changed, 20 insertions, 0 deletions
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index bd719567104c..793f99c6cd8f 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -129,6 +129,7 @@ public:
void testN828390_2();
void testN828390_3();
void testFdo68594();
+ void testPlaceholderPriority();
void testFdo72998();
void testFdo77027();
void testStrictOOXML();
@@ -236,6 +237,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);
@@ -683,6 +685,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