summaryrefslogtreecommitdiff
path: root/svx
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 /svx
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 'svx')
-rw-r--r--svx/source/sidebar/nbdtmg.cxx10
1 files changed, 3 insertions, 7 deletions
diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index 06a7ea4d207f..cddac0a5f823 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -340,8 +340,7 @@ void BulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1
aFmt.SetBulletFont(&rActBulletFont);
aFmt.SetBulletChar(cChar);
aFmt.SetCharFormatName(sBulletCharFormatName);
- aFmt.SetPrefix( "" );
- aFmt.SetSuffix( "" );
+ aFmt.SetListFormat( "" );
if (isResetSize) aFmt.SetBulletRelSize(45);
aNum.SetLevel(i, aFmt);
}
@@ -524,9 +523,7 @@ void NumberingTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uIn
SvxNumberFormat aFmt(aNum.GetLevel(i));
if (eNewType!=aFmt.GetNumberingType()) isResetSize=true;
aFmt.SetNumberingType(eNewType);
- aFmt.SetPrefix(_pSet->pNumSetting->sPrefix);
- aFmt.SetSuffix(_pSet->pNumSetting->sSuffix);
-
+ aFmt.SetListFormat(_pSet->pNumSetting->sPrefix, _pSet->pNumSetting->sSuffix, i);
aFmt.SetCharFormatName(sNumCharFmtName);
if (isResetSize) aFmt.SetBulletRelSize(100);
aNum.SetLevel(i, aFmt);
@@ -872,8 +869,7 @@ void OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1
aFmt.SetFirstLineIndent(pLevelSettings->nNumAlignAt);
aFmt.SetIndentAt(pLevelSettings->nNumIndentAt);
}
- aFmt.SetPrefix(pLevelSettings->sPrefix);
- aFmt.SetSuffix(pLevelSettings->sSuffix);
+ aFmt.SetListFormat(pLevelSettings->sPrefix, pLevelSettings->sSuffix, i);
aNum.SetLevel(i, aFmt);
}
}