diff options
author | Tibor Nagy <nagy.tibor2@nisz.hu> | 2022-12-05 09:21:51 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2022-12-19 12:11:48 +0000 |
commit | b12e38c1ccb388e62e35d856d4a575e1724a10e9 (patch) | |
tree | 09906087dfa33aee75b629643b99d39113d30eed /sd | |
parent | 907da02bf8b33c080538731864225b3c44251328 (diff) |
tdf#152070 PPTX import: fix offset of tile background image
by using bitmap image sizes instead of the original ones.
Change-Id: Id6f2777bf6803bca7252878203a12ab796ac33dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143766
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/data/pptx/tdf152070.pptx | bin | 0 -> 29035 bytes | |||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 20 |
2 files changed, 20 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf152070.pptx b/sd/qa/unit/data/pptx/tdf152070.pptx Binary files differnew file mode 100644 index 000000000000..1fbc8016d149 --- /dev/null +++ b/sd/qa/unit/data/pptx/tdf152070.pptx diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index abd21782bf68..5a599ad9a43a 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -154,6 +154,7 @@ public: void testTdf89927(); void testTdf103800(); void testTdf151767(); + void testTdf152070(); CPPUNIT_TEST_SUITE(SdImportTest); @@ -229,6 +230,7 @@ public: CPPUNIT_TEST(testTdf89927); CPPUNIT_TEST(testTdf103800); CPPUNIT_TEST(testTdf151767); + CPPUNIT_TEST(testTdf152070); CPPUNIT_TEST_SUITE_END(); }; @@ -1928,6 +1930,24 @@ void SdImportTest::testTdf151767() CPPUNIT_ASSERT_EQUAL_MESSAGE("The bottom border is missing!", true, aBottom.LineWidth > 0); } +void SdImportTest::testTdf152070() +{ + createSdImpressDoc("pptx/tdf152070.pptx"); + + uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY_THROW); + uno::Reference<drawing::XDrawPage> xPage(xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY); + uno::Reference<beans::XPropertySet> xPropSet(xPage, uno::UNO_QUERY_THROW); + uno::Reference<beans::XPropertySet> xBackgroundProps( + xPropSet->getPropertyValue("Background").get<uno::Reference<beans::XPropertySet>>()); + + CPPUNIT_ASSERT_EQUAL( + sal_Int32(50), // 50% + xBackgroundProps->getPropertyValue("FillBitmapPositionOffsetX").get<sal_Int32>()); + CPPUNIT_ASSERT_EQUAL( + sal_Int32(83), // 83% + xBackgroundProps->getPropertyValue("FillBitmapPositionOffsetY").get<sal_Int32>()); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest); CPPUNIT_PLUGIN_IMPLEMENT(); |