summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVasily Melenchuk <vasily.melenchuk@cib.de>2021-06-14 14:27:56 +0300
committerThorsten Behrens <thorsten.behrens@allotropia.de>2021-06-29 19:02:20 +0200
commit9987b518fca1476bd0ce8c86bcf6ac7c81f7b580 (patch)
tree3aa1af29be70b24bc96951a310f3379a621a54b1 /include
parentd8dcd706c74b4a0fa420946c707137b097b3c7fe (diff)
new ODF numbered list parameter loext:num-list-format
Instead of style:num-prefix and style:num-suffix new list format is much more flexible for storing list multilevel numberings. Now it is possible to have not just prefix/suffix but any random separators between levels, arbitrary levels order, etc. Internal LO format for list format is changed: instead of placeholders like %1, %2, etc we right now use %1%, %2%... Reason: for ODT documents, having more than 9 levels there is ambiguity in "%10": it is "%1" followed by "0" suffix, or "%10"? Aux changes: * removed zero width space hack: since format string is always defined this hack is interfering with standard list numbers printing (see changes in ooxmlexport14.cxx, ww8export3.cxx tests) * changed cross-references values to lists: they are now including full list label string: previously this was bit self-contradictory (see changes in odfexport.cxx and check_cross_references.py tests) Conflicts: sw/qa/extras/odfexport/odfexport.cxx Change-Id: I9696cc4846375c5f6222539aeaadbca5ae58ce27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117156 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118040 Reviewed-by: Vasily Melenchuk <vasily.melenchuk@cib.de>
Diffstat (limited to 'include')
-rw-r--r--include/editeng/numitem.hxx4
-rw-r--r--include/xmloff/xmltoken.hxx1
2 files changed, 4 insertions, 1 deletions
diff --git a/include/editeng/numitem.hxx b/include/editeng/numitem.hxx
index b4b9e030fb2d..f955ea15d008 100644
--- a/include/editeng/numitem.hxx
+++ b/include/editeng/numitem.hxx
@@ -171,7 +171,9 @@ public:
const OUString& GetPrefix() const { return sPrefix;}
void SetSuffix(const OUString& rSet) { sSuffix = rSet;}
const OUString& GetSuffix() const { return sSuffix;}
- void SetListFormat(std::optional<OUString> oSet = std::nullopt) { sListFormat = oSet; }
+ // Based on prefix and suffix ininialize them (for backward compatibility) and generate listformat string
+ void SetListFormat(const OUString& rPrefix, const OUString& rSuffix, int nLevel);
+ void SetListFormat(std::optional<OUString> oSet = std::nullopt);
bool HasListFormat() const { return sListFormat.has_value(); }
const OUString& GetListFormat() const { return *sListFormat; }
diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
index 68efdb41ee02..8179d03ba11c 100644
--- a/include/xmloff/xmltoken.hxx
+++ b/include/xmloff/xmltoken.hxx
@@ -1370,6 +1370,7 @@ namespace xmloff::token {
XML_NULL_YEAR,
XML_NUM_FORMAT,
XML_NUM_LETTER_SYNC,
+ XML_NUM_LIST_FORMAT,
XML_NUM_PREFIX,
XML_NUM_SUFFIX,
XML_NUMALIGN,