summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
authorLuke Deller <luke@deller.id.au>2016-04-27 02:09:48 +1000
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-05-03 15:56:22 +0000
commit5e5e155ddf467cdce2312fa16d0392900afc7355 (patch)
tree7a6077cd20cfdf5bba98ca21b47b904d4d4ebf5f /sw/qa/extras
parentcb654aed2506b31e047f53715f419a7f1e08702d (diff)
tdf#99474 close direct char fmt at end of para
When exporting to doc, ensure that the FKP entry for direct character formatting is closed at the end of a paragraph, so that any direct character formatting in the next paragraph does not apply to the end-of-paragraph marker (CR). Also revert the changes for i#119650 and tdf#87437 which targetted more specific examples of this problem, as those issues should now be covered by this fix. Add a test case for the example from tdf#99474 Change-Id: I2cb482adb39a84f152707dafcb18f289ca0bd550 Reviewed-on: https://gerrit.libreoffice.org/24609 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/ww8export/data/tdf99474.odtbin0 -> 9375 bytes
-rw-r--r--sw/qa/extras/ww8export/ww8export.cxx28
2 files changed, 28 insertions, 0 deletions
diff --git a/sw/qa/extras/ww8export/data/tdf99474.odt b/sw/qa/extras/ww8export/data/tdf99474.odt
new file mode 100644
index 000000000000..7530488bb658
--- /dev/null
+++ b/sw/qa/extras/ww8export/data/tdf99474.odt
Binary files differ
diff --git a/sw/qa/extras/ww8export/ww8export.cxx b/sw/qa/extras/ww8export/ww8export.cxx
index 53a151302f49..9cb413146691 100644
--- a/sw/qa/extras/ww8export/ww8export.cxx
+++ b/sw/qa/extras/ww8export/ww8export.cxx
@@ -622,6 +622,34 @@ DECLARE_WW8EXPORT_TEST(testTdf94386, "tdf94386.odt")
CPPUNIT_ASSERT((fSize.Width != lSize.Width) && (fSize.Height != lSize.Height));
}
+DECLARE_WW8EXPORT_TEST(testTdf99474, "tdf99474.odt")
+{
+ // The bullet colour of paragraph #3 should be COL_AUTO
+ auto xPara = getParagraph(3);
+ uno::Reference<container::XIndexReplace> xNumRules(
+ getProperty< uno::Reference<container::XIndexReplace> >(
+ xPara, "NumberingRules"),
+ uno::UNO_QUERY);
+ int numLevel = getProperty<sal_Int32>(xPara, "NumberingLevel");
+ uno::Sequence< beans::PropertyValue > aPropertyValues;
+ xNumRules->getByIndex(numLevel) >>= aPropertyValues;
+ OUString charStyleName;
+ for(int j = 0 ; j< aPropertyValues.getLength() ; ++j)
+ {
+ auto aProp = aPropertyValues[j];
+ if (aProp.Name == OUString("CharStyleName")) {
+ charStyleName = aProp.Value.get<OUString>();
+ break;
+ }
+ }
+ CPPUNIT_ASSERT(charStyleName.getLength());
+ uno::Reference<beans::XPropertySet> xStyle(
+ getStyles("CharacterStyles")->getByName(charStyleName),
+ uno::UNO_QUERY);
+ ColorData charColor = getProperty<util::Color>(xStyle, "CharColor");
+ CPPUNIT_ASSERT_EQUAL(COL_AUTO, charColor);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */