diff options
author | Tibor Nagy <tibor.nagy.extern@allotropia.de> | 2024-06-22 11:17:33 +0200 |
---|---|---|
committer | Nagy Tibor <tibor.nagy.extern@allotropia.de> | 2024-06-22 21:08:52 +0200 |
commit | 513c2bdbb1e7c0ad669d03043db61c94d6524aba (patch) | |
tree | d6769ff5835f3de8ac8a8a7e0bada9c500047087 /sd | |
parent | c3e80cbaaa62d1150860cc5281dfc784dbbde8af (diff) |
tdf#157529 PPTX import: fix transparency value
if the paragraph, which uses transformation (Arch, Circle, etc.),
contains multiple texts and the first text is only a space character,
then we use the transparency value of the following text.
Change-Id: Ia87242e34b495802cbecf5dc0dd13d490312f435
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169351
Reviewed-by: Nagy Tibor <tibor.nagy.extern@allotropia.de>
Tested-by: Jenkins
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/data/pptx/tdf157529.pptx | bin | 0 -> 21589 bytes | |||
-rw-r--r-- | sd/qa/unit/import-tests2.cxx | 25 |
2 files changed, 25 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf157529.pptx b/sd/qa/unit/data/pptx/tdf157529.pptx Binary files differnew file mode 100644 index 000000000000..625777809711 --- /dev/null +++ b/sd/qa/unit/data/pptx/tdf157529.pptx diff --git a/sd/qa/unit/import-tests2.cxx b/sd/qa/unit/import-tests2.cxx index aa4517fb97f6..c01ae0b8747a 100644 --- a/sd/qa/unit/import-tests2.cxx +++ b/sd/qa/unit/import-tests2.cxx @@ -77,6 +77,31 @@ protected: bool checkPattern(int nShapeNumber, std::vector<sal_uInt8>& rExpected); }; +CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf157529) +{ + createSdImpressDoc("pptx/tdf157529.pptx"); + + uno::Reference<beans::XPropertySet> xShape1(getShapeFromPage(0, 0)); + CPPUNIT_ASSERT(xShape1.is()); + sal_Int16 nTransparence1; + xShape1->getPropertyValue(u"FillTransparence"_ustr) >>= nTransparence1; + + // Without the fix in place, this test would have failed with + // Expected: transparence value: 100% + // Actual : transparence value: 0% + CPPUNIT_ASSERT_EQUAL(sal_Int16(100), nTransparence1); + + uno::Reference<beans::XPropertySet> xShape2(getShapeFromPage(1, 0)); + CPPUNIT_ASSERT(xShape2.is()); + sal_Int16 nTransparence2; + xShape2->getPropertyValue(u"FillTransparence"_ustr) >>= nTransparence2; + + // Without the fix in place, this test would have failed with + // Expected: transparence value: 100% + // Actual : transparence value: 0% + CPPUNIT_ASSERT_EQUAL(sal_Int16(100), nTransparence2); +} + CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf160490) { createSdImpressDoc("pptx/tdf160490.pptx"); |