From 4a4fc98e5908db1e027c8438fbbcabefe6b0de8a Mon Sep 17 00:00:00 2001 From: nd101 Date: Tue, 23 Jun 2020 22:20:24 +0800 Subject: 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 Reviewed-by: Xisco Fauli --- sd/qa/unit/import-tests-smartart.cxx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'sd/qa/unit/import-tests-smartart.cxx') 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 xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY); + uno::Reference xShapeB = findChildShapeByText(xGroup, "B"); + CPPUNIT_ASSERT(xShapeB.is()); + uno::Reference xTxtProps(xShapeB, uno::UNO_QUERY_THROW); + + CPPUNIT_ASSERT_EQUAL(static_cast(736), + xTxtProps->getPropertyValue("TextUpperDistance").get()); + + xDocShRef->DoClose(); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTestSmartArt); CPPUNIT_PLUGIN_IMPLEMENT(); -- cgit