summaryrefslogtreecommitdiff
path: root/sw/qa/extras/rtfexport
diff options
context:
space:
mode:
authorVasily Melenchuk <vasily.melenchuk@cib.de>2020-04-13 11:06:29 +0300
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2020-04-27 22:36:12 +0200
commit7459b9ecb54a298f02d19089620149718f8d8d48 (patch)
tree8e26f751e26b4e4f7ca53d36d6c94603d096650c /sw/qa/extras/rtfexport
parent4ba179eb9208185406207522e39626327c7d74c3 (diff)
tdf#116883: sw: support for lists level format string
Multilevel lists are more flexible in case of DOCX. There is supported custom format for any level in DOCX unlike in LO and ODT where we are limited only with prefix and suffix for hardcoded list levels separated by dot. At the same time DOCX can have lists not only "1.2.3.4", but "1/2/3/4" or even "1!2>3)4" and such format can vary on each list level. Here is basic implementation for list format as a core feature for all documents and old way (prefix-suffix + ".") is left as fallback. Practically its usage is currently implemented only in DOCX import/export. Some RTF/OOXML unittests were redesigned: since we are not creating prefix/suffix for these formats conditions should be checked in a different way. Change-Id: I1ec58bcc5874d4fa19aee6a1f42bf1671d853b14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92106 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sw/qa/extras/rtfexport')
-rw-r--r--sw/qa/extras/rtfexport/rtfexport.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx
index cf2cb780bb12..535374da8863 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -659,16 +659,16 @@ DECLARE_RTFEXPORT_TEST(testFdo66682, "fdo66682.rtf")
uno::Sequence<beans::PropertyValue> aProps;
xLevels->getByIndex(0) >>= aProps; // 1st level
- OUString aSuffix;
+ OUString aListFormat;
for (int i = 0; i < aProps.getLength(); ++i)
{
const beans::PropertyValue& rProp = aProps[i];
- if (rProp.Name == "Suffix")
- aSuffix = rProp.Value.get<OUString>();
+ if (rProp.Name == "ListFormat")
+ aListFormat = rProp.Value.get<OUString>();
}
// Suffix was '\0' instead of ' '.
- CPPUNIT_ASSERT_EQUAL(OUString(" "), aSuffix);
+ CPPUNIT_ASSERT_EQUAL(OUString(" %1 "), aListFormat);
}
DECLARE_RTFEXPORT_TEST(testParaShadow, "para-shadow.rtf")