summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ww8export/ww8export3.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/ww8export/ww8export3.cxx')
-rw-r--r--sw/qa/extras/ww8export/ww8export3.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx
index c32ff278cc7a..5e0124e9aad4 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -69,6 +69,20 @@ DECLARE_WW8EXPORT_TEST(testTdf37778_readonlySection, "tdf37778_readonlySection.d
CPPUNIT_ASSERT_EQUAL_MESSAGE("Last printed date", sal_Int16(2009), xDPS->getDocumentProperties()->getPrintDate().Year);
}
+DECLARE_WW8EXPORT_TEST(testTdf138345_paraCharHighlight, "tdf138345_paraCharHighlight.doc")
+{
+ uno::Reference<beans::XPropertySet> xRun(getRun(getParagraph(9), 1, "A side benefit is that "), uno::UNO_QUERY_THROW);
+ // Paragraph style paraNoCharBackground cancel paraCharBackground using COL_TRANSPARENT.
+ // Before this fix, the paragraph was by default covered with a yellow CharHighlight.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(COL_AUTO), getProperty<sal_Int32>(xRun, "CharHighlight"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(COL_AUTO), getProperty<sal_Int32>(xRun, "CharBackColor"));
+
+ xRun.set(getRun(getParagraph(9), 2), uno::UNO_QUERY_THROW);
+ // Character style formatting must not contain a highlight setting at all.
+ //CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(COL_AUTO), getProperty<sal_Int32>(xRun, "CharHighlight"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(COL_AUTO), getProperty<sal_Int32>(xRun, "CharBackColor"));
+}
+
DECLARE_WW8EXPORT_TEST(testTdf104596_wrapInHeaderTable, "tdf104596_wrapInHeaderTable.doc")
{
xmlDocUniquePtr pXmlDoc = parseLayoutDump();