summaryrefslogtreecommitdiff
path: root/sd/qa/unit/export-tests.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/qa/unit/export-tests.cxx')
-rw-r--r--sd/qa/unit/export-tests.cxx22
1 files changed, 22 insertions, 0 deletions
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index 10590131e939..075caa6d7540 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -94,6 +94,7 @@ public:
void testTransparentBackground();
void testEmbeddedPdf();
void testEmbeddedText();
+ void testTransparenText();
void testAuthorField();
void testTdf100926();
void testPageWithTransparentBackground();
@@ -114,6 +115,7 @@ public:
CPPUNIT_TEST(testTransparentBackground);
CPPUNIT_TEST(testEmbeddedPdf);
CPPUNIT_TEST(testEmbeddedText);
+ CPPUNIT_TEST(testTransparenText);
CPPUNIT_TEST(testAuthorField);
CPPUNIT_TEST(testTdf100926);
CPPUNIT_TEST(testPageWithTransparentBackground);
@@ -693,6 +695,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::testAuthorField()
{
::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/author_fixed.odp"), ODP);