From af6e4633ca12bc2f08db1e86d77847b7793d5791 Mon Sep 17 00:00:00 2001 From: Tamas Bunth Date: Tue, 19 Nov 2019 12:38:56 +0100 Subject: tdf#113198 set default shape paragraph alignment.. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit to center when importing oox document. Using MS Office, the default aligment of a (text) paragraph inside a shape is centered. Change-Id: Id9bcaaab109df65f4124f733b2cfee438e82b79b Reviewed-on: https://gerrit.libreoffice.org/83193 Tested-by: Jenkins Reviewed-by: Tamás Bunth (cherry picked from commit 89f0af144c18efafe2573801641689a1432c0cae) Reviewed-on: https://gerrit.libreoffice.org/83971 Reviewed-by: Xisco Faulí --- sd/qa/unit/data/pptx/tdf113198.pptx | Bin 0 -> 13847 bytes sd/qa/unit/import-tests.cxx | 14 +++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100755 sd/qa/unit/data/pptx/tdf113198.pptx (limited to 'sd') diff --git a/sd/qa/unit/data/pptx/tdf113198.pptx b/sd/qa/unit/data/pptx/tdf113198.pptx new file mode 100755 index 000000000000..a541a2b2647d Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf113198.pptx differ diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 3b50bce311ad..025b53077405 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -213,6 +213,7 @@ public: void testCropToShape(); void testTdf127964(); void testTdf106638(); + void testTdf113198(); CPPUNIT_TEST_SUITE(SdImportTest); @@ -313,6 +314,7 @@ public: CPPUNIT_TEST(testTdf127964); CPPUNIT_TEST(testTdf106638); CPPUNIT_TEST(testTdf128684); + CPPUNIT_TEST(testTdf113198); CPPUNIT_TEST_SUITE_END(); }; @@ -3008,7 +3010,6 @@ void SdImportTest::testTdf106638() CPPUNIT_ASSERT(aCharFontName != "Wingdings"); } - void SdImportTest::testTdf128684() { sd::DrawDocShellRef xDocShRef @@ -3035,6 +3036,17 @@ void SdImportTest::testTdf128684() CPPUNIT_ASSERT_EQUAL(static_cast(-90), nRotateAngle); } +void SdImportTest::testTdf113198() +{ + sd::DrawDocShellRef xDocShRef + = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf113198.pptx"), PPTX); + + uno::Reference xShape(getShapeFromPage(0, 0, xDocShRef)); + sal_Int16 nParaAdjust = -1; + xShape->getPropertyValue("ParaAdjust") >>= nParaAdjust; + CPPUNIT_ASSERT_EQUAL(style::ParagraphAdjust_CENTER, static_cast(nParaAdjust)); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest); CPPUNIT_PLUGIN_IMPLEMENT(); -- cgit