diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-03-19 21:38:43 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-03-20 09:06:18 +0100 |
commit | 0f0a80123d970ef6f3f8269619813e5277fff4df (patch) | |
tree | 853a75eb51baedda07e85f4bebbed61a162554fd /sw/qa/extras/rtfimport/rtfimport.cxx | |
parent | 48baafc46825f1248ea9269308cadbd698a23ffc (diff) |
tdf#116269 RTF import: implement reverse deduplication for lists
This is the same mechanism that was added in commit
1be0a3fa9ebb22b607c54b47739d4467acfed259 (n#825305: writerfilter RTF
import: override style properties like Word, 2014-06-17), except that
here the reference is a list definition, not a paragraph style.
Also, this commit only implements the part that inserts explicit
defaults for not repeated properties, not the actual deduplication, as
that already works at a dmapper level.
(Saving the bugdoc as DOCX, it's visible in document.xml that DOCX marks
these defaults explicitly:
<w:ind w:left="0" w:right="-6" w:firstLine="0"/>
but RTF does not, so the right place to fix this is in the tokenizer.)
Change-Id: Iec88d9bf1032d1d89194bd272500d6780c3c2224
Reviewed-on: https://gerrit.libreoffice.org/51589
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/qa/extras/rtfimport/rtfimport.cxx')
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index 860fe0712044..6ddc2239be6c 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -656,6 +656,14 @@ DECLARE_RTFIMPORT_TEST(testFdo81033, "fdo81033.rtf") CPPUNIT_ASSERT_EQUAL(u'_', tabs[1].FillChar); } +DECLARE_RTFIMPORT_TEST(testTdf116269, "tdf116269.rtf") +{ + // This was 2540, implicit 0 left margin was ignored on import (inherited + // value from list definition is repeated if it's not 0). + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), + getProperty<sal_Int32>(getParagraph(1), "ParaLeftMargin")); +} + DECLARE_RTFIMPORT_TEST(testFdo66565, "fdo66565.rtf") { uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY); |