diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-12-19 16:26:59 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-12-19 17:32:06 +0100 |
commit | e155e05ab70f1744d296dbee8c61564a5b7d346c (patch) | |
tree | fd4caaf9ad44103f5a71d4aa54e6940fcce7bf13 /sw/qa | |
parent | f3d54642672b4a4fb6cca0c2439744189de5f0bc (diff) |
DOCX filter: handle decimal number format with no level text correctly
The first problem was that no level text means no list text in Word, but
Writer only does that for the "none" numbering format.
Also, when the numbering format is "none", then Writer doesn't show the
follow character (typically a tab), either, but Word does: add a zero
width space as a suffix to mimic the Word behavior on DOCX import.
Adapt CppunitTest_sw_rtfimport accordingly, that effectively tested that
LabelFollowedBy is lost on import.
Change-Id: I7d5c7e62ba3d02da4a750ba5afad07e68b0b8c38
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/decimal-numbering-no-leveltext.docx | bin | 0 -> 13517 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport5.cxx | 7 | ||||
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 5 |
3 files changed, 11 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/decimal-numbering-no-leveltext.docx b/sw/qa/extras/ooxmlexport/data/decimal-numbering-no-leveltext.docx Binary files differnew file mode 100644 index 000000000000..d7ec47997611 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/decimal-numbering-no-leveltext.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx index 89ead201944f..c65e54649502 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx @@ -99,6 +99,13 @@ DECLARE_OOXMLEXPORT_TEST(testfdo76589 , "fdo76589.docx") assertXPath ( pXmlDoc, "/w:numbering/w:abstractNum[1]/w:lvl[1]/w:lvlText","val","%1" ); } +DECLARE_OOXMLEXPORT_TEST(testDecimalNumberingNoLeveltext, "decimal-numbering-no-leveltext.docx") +{ + // This was "%1", not empty: we turned a kind-of-none numbering into a decimal one. + if (xmlDocPtr pXmlDoc = parseExport("word/numbering.xml")) + assertXPath (pXmlDoc, "/w:numbering/w:abstractNum[1]/w:lvl[1]/w:lvlText","val", ""); +} + DECLARE_OOXMLEXPORT_TEST(testfdo79008, "fdo79008.docx") { /* File getting crash while saving in LO. diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index 0e651d003829..4a07fd04c1b8 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -582,7 +582,10 @@ DECLARE_RTFIMPORT_TEST(testFdo49692, "fdo49692.rtf") const beans::PropertyValue& rProp = aProps[i]; if (rProp.Name == "Suffix") - CPPUNIT_ASSERT_EQUAL(sal_Int32(0), rProp.Value.get<OUString>().getLength()); + { + OUString aExpected(static_cast<sal_Unicode>(0x200B)); + CPPUNIT_ASSERT_EQUAL(aExpected, rProp.Value.get<OUString>()); + } } } |