diff options
author | nd101 <Fong@nd.com.cn> | 2020-06-23 22:20:24 +0800 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-07-13 11:36:02 +0200 |
commit | 4a4fc98e5908db1e027c8438fbbcabefe6b0de8a (patch) | |
tree | f5f1d7a66e7c1806bb6458662faa5cd0c029ce46 /sd | |
parent | 02c4b116cc927688fde8401413b126df72fc9b43 (diff) |
tdf#134221 Fix SMARTART caption text location
Caption text shall be placed off center. Apply the transform2d.
Change-Id: Iefdf207c8aadefecbe2e3154879d03ca10456d7b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96956
Tested-by: Jenkins
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-rwxr-xr-x | sd/qa/unit/data/pptx/smartart-tdf134221.pptx | bin | 0 -> 49627 bytes | |||
-rw-r--r-- | sd/qa/unit/import-tests-smartart.cxx | 17 |
2 files changed, 17 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/smartart-tdf134221.pptx b/sd/qa/unit/data/pptx/smartart-tdf134221.pptx Binary files differnew file mode 100755 index 000000000000..5ef12a7ffc65 --- /dev/null +++ b/sd/qa/unit/data/pptx/smartart-tdf134221.pptx diff --git a/sd/qa/unit/import-tests-smartart.cxx b/sd/qa/unit/import-tests-smartart.cxx index 9496c1eae7c2..bbbe6880d8a8 100644 --- a/sd/qa/unit/import-tests-smartart.cxx +++ b/sd/qa/unit/import-tests-smartart.cxx @@ -109,6 +109,7 @@ public: void testOrgChart2(); void testTdf131553(); void testFillColorList(); + void testTdf134221(); CPPUNIT_TEST_SUITE(SdImportTestSmartArt); @@ -155,6 +156,7 @@ public: CPPUNIT_TEST(testOrgChart2); CPPUNIT_TEST(testTdf131553); CPPUNIT_TEST(testFillColorList); + CPPUNIT_TEST(testTdf134221); CPPUNIT_TEST_SUITE_END(); }; @@ -1508,6 +1510,21 @@ void SdImportTestSmartArt::testFillColorList() xDocShRef->DoClose(); } +void SdImportTestSmartArt::testTdf134221() +{ + sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-tdf134221.pptx"), PPTX); + xDocShRef = saveAndReload(xDocShRef.get(), PPTX); + uno::Reference<drawing::XShape> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY); + uno::Reference<drawing::XShape> xShapeB = findChildShapeByText(xGroup, "B"); + CPPUNIT_ASSERT(xShapeB.is()); + uno::Reference<beans::XPropertySet> xTxtProps(xShapeB, uno::UNO_QUERY_THROW); + + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(736), + xTxtProps->getPropertyValue("TextUpperDistance").get<sal_Int32>()); + + xDocShRef->DoClose(); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTestSmartArt); CPPUNIT_PLUGIN_IMPLEMENT(); |