diff options
author | nd101 <Fong@nd.com.cn> | 2020-03-25 13:17:48 +0800 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-04-23 21:41:48 +0200 |
commit | 6ae88e7b2711321783fb756a4796c89b70497db5 (patch) | |
tree | 1a6eaf95bb89661e18c5842eb65b4eda4a7cf7ff /sd | |
parent | Update language-subtag-registry to 2020-04-01 (diff) | |
download | core-6ae88e7b2711321783fb756a4796c89b70497db5.tar.gz core-6ae88e7b2711321783fb756a4796c89b70497db5.zip |
tdf#119187 fix: Top-aligned text in PPTX becomes bottom-aligned
Change-Id: Ic6c03e512ce3f6e240d86186fb16e24c86942343
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92051
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92725
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/data/pptx/tdf119187.pptx | bin | 0 -> 18886 bytes | |||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 27 |
2 files changed, 27 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf119187.pptx b/sd/qa/unit/data/pptx/tdf119187.pptx Binary files differnew file mode 100644 index 000000000000..0c4501abbc30 --- /dev/null +++ b/sd/qa/unit/data/pptx/tdf119187.pptx diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 57a8b83c9fff..489e05d7774d 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -203,6 +203,7 @@ public: void testTdf116266(); void testTdf126324(); void testTdf128684(); + void testTdf119187(); bool checkPattern(sd::DrawDocShellRef const & rDocRef, int nShapeNumber, std::vector<sal_uInt8>& rExpected); void testPatternImport(); @@ -324,6 +325,7 @@ public: CPPUNIT_TEST(testTdf106638); CPPUNIT_TEST(testTdf128684); CPPUNIT_TEST(testTdf113198); + CPPUNIT_TEST(testTdf119187); CPPUNIT_TEST_SUITE_END(); }; @@ -3086,6 +3088,31 @@ void SdImportTest::testTdf113198() CPPUNIT_ASSERT_EQUAL(style::ParagraphAdjust_CENTER, static_cast<style::ParagraphAdjust>(nParaAdjust)); } +void SdImportTest::testTdf119187() +{ + std::vector< sd::DrawDocShellRef > xDocShRef; + // load document + xDocShRef.push_back(loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf119187.pptx"), PPTX)); + // load resaved document + xDocShRef.push_back(saveAndReload( xDocShRef.at(0).get(), PPTX )); + + // check documents + for (const sd::DrawDocShellRef& xDoc : xDocShRef) + { + // get shape properties + const SdrPage* pPage = GetPage(1, xDoc); + CPPUNIT_ASSERT(pPage); + SdrObject* pObj = pPage->GetObj(0); + CPPUNIT_ASSERT(pObj); + const sdr::properties::BaseProperties & rProperties = pObj->GetProperties(); + + // chcek text vertical alignment + const SdrTextVertAdjustItem& rSdrTextVertAdjustItem = rProperties.GetItem(SDRATTR_TEXT_VERTADJUST); + const SdrTextVertAdjust eTVA = rSdrTextVertAdjustItem.GetValue(); + CPPUNIT_ASSERT_EQUAL(SDRTEXTVERTADJUST_TOP, eTVA); + } +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest); CPPUNIT_PLUGIN_IMPLEMENT(); |