diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-05-22 19:53:27 +0200 |
---|---|---|
committer | Xisco Faulí <xiscofauli@libreoffice.org> | 2020-05-22 21:03:42 +0200 |
commit | 8bf3e3fbdb708a75237a120d4f6fc46fe67dbbb9 (patch) | |
tree | 4bf4878be0222c5535cd20ed6caf7e5f961af742 /sd | |
parent | 208d931861be4d5cf571c404f517fb5c26499aa0 (diff) |
tdf#129686: Revert "tdf#118776: pptx import: draw char noFill as transparent"
Revert it for now towards LibreOffice 7.0 and add unittest
This reverts commit e01df3488abe6d319c6874ca870afb82a3ad9b1e.
Change-Id: Ic6aba5948f9c6e55199def0476918fbd496321bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94704
Tested-by: Xisco Faulí <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/data/pptx/tdf118776.pptx | bin | 31591 -> 0 bytes | |||
-rw-r--r-- | sd/qa/unit/data/pptx/tdf129686.pptx | bin | 0 -> 35331 bytes | |||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 44 |
3 files changed, 22 insertions, 22 deletions
diff --git a/sd/qa/unit/data/pptx/tdf118776.pptx b/sd/qa/unit/data/pptx/tdf118776.pptx Binary files differdeleted file mode 100644 index 8df94522ab29..000000000000 --- a/sd/qa/unit/data/pptx/tdf118776.pptx +++ /dev/null diff --git a/sd/qa/unit/data/pptx/tdf129686.pptx b/sd/qa/unit/data/pptx/tdf129686.pptx Binary files differnew file mode 100644 index 000000000000..9aeb396f6f19 --- /dev/null +++ b/sd/qa/unit/data/pptx/tdf129686.pptx diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 6d8ff3e3904d..32e0d68f8dbe 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -179,9 +179,9 @@ public: void testAoo124143(); void testTdf103567(); void testTdf103792(); - void testTdf118776(); void testTdf103876(); void testTdf79007(); + void testTdf129686(); void testTdf104015(); void testTdf104201(); void testTdf103477(); @@ -286,9 +286,9 @@ public: CPPUNIT_TEST(testAoo124143); CPPUNIT_TEST(testTdf103567); CPPUNIT_TEST(testTdf103792); - CPPUNIT_TEST(testTdf118776); CPPUNIT_TEST(testTdf103876); CPPUNIT_TEST(testTdf79007); + CPPUNIT_TEST(testTdf129686); CPPUNIT_TEST(testTdf104015); CPPUNIT_TEST(testTdf104201); CPPUNIT_TEST(testTdf103477); @@ -1840,26 +1840,6 @@ void SdImportTest::testTdf103792() xDocShRef->DoClose(); } -void SdImportTest::testTdf118776() -{ - sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf118776.pptx"), PPTX); - uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 0, 0, xDocShRef ) ); - - // Get first paragraph of the text - uno::Reference<text::XTextRange> const xParagraph( getParagraphFromShape( 0, xShape ) ); - - // Get first run of the paragraph - uno::Reference<text::XTextRange> xRun( getRunFromParagraph (0, xParagraph ) ); - uno::Reference< beans::XPropertySet > xPropSet( xRun, uno::UNO_QUERY_THROW ); - sal_Int16 nTransparency = 0; - xPropSet->getPropertyValue("CharTransparence") >>= nTransparency; - - // Import noFill color as 99% transparency - CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(99), nTransparency); - - xDocShRef->DoClose(); -} - void SdImportTest::testTdf103876() { // Title text shape's placeholder text did not inherit the corresponding text properties @@ -1934,6 +1914,26 @@ void SdImportTest::testTdf79007() xDocShRef->DoClose(); } +void SdImportTest::testTdf129686() +{ + sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf129686.pptx"), PPTX); + uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 0, 0, xDocShRef ) ); + + // Get first paragraph of the text + uno::Reference<text::XTextRange> const xParagraph( getParagraphFromShape( 0, xShape ) ); + + // Get first run of the paragraph + uno::Reference<text::XTextRange> xRun( getRunFromParagraph (0, xParagraph ) ); + uno::Reference< beans::XPropertySet > xPropSet( xRun, uno::UNO_QUERY_THROW ); + sal_Int16 nTransparency = 0; + xPropSet->getPropertyValue("CharTransparence") >>= nTransparency; + + // 100 = no transparency + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(100), nTransparency); + + xDocShRef->DoClose(); +} + void SdImportTest::testTdf104015() { // Shape fill, line and effect properties were not inherited from master slide shape |