diff options
Diffstat (limited to 'sd/qa/unit/export-tests.cxx')
-rw-r--r-- | sd/qa/unit/export-tests.cxx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index 57fe771339f1..9f15a20e47c4 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -57,6 +57,7 @@ public: void testTransparentBackground(); void testEmbeddedPdf(); void testEmbeddedText(); + void testTransparenText(); void testTdf98477(); void testAuthorField(); void testTdf50499(); @@ -88,6 +89,7 @@ public: CPPUNIT_TEST(testTransparentBackground); CPPUNIT_TEST(testEmbeddedPdf); CPPUNIT_TEST(testEmbeddedText); + CPPUNIT_TEST(testTransparenText); CPPUNIT_TEST(testTdf98477); CPPUNIT_TEST(testAuthorField); CPPUNIT_TEST(testTdf50499); @@ -824,6 +826,26 @@ void SdExportTest::testEmbeddedText() xShell->DoClose(); } +void SdExportTest::testTransparenText() +{ + sd::DrawDocShellRef xShell + = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/transparent-text.fodg"), FODG); + xShell = saveAndReload(xShell.get(), ODG); + + uno::Reference<drawing::XDrawPage> xPage = getPage(0, xShell); + uno::Reference<beans::XPropertySet> xShape(xPage->getByIndex(0), uno::UNO_QUERY); + sal_Int16 nCharTransparence = 0; + xShape->getPropertyValue("CharTransparence") >>= nCharTransparence; + + // Without the accompanying fix in place, this test would have failed with: + // - Expected: 75 + // - Actual : 0 + // i.e. the 75% transparent text was turned into a "not transparent at all" text. + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(75), nCharTransparence); + + xShell->DoClose(); +} + void SdExportTest::testTdf98477() { utl::TempFile tempFile; |