diff options
author | Vasily Melenchuk <vasily.melenchuk@cib.de> | 2021-11-11 10:33:08 +0300 |
---|---|---|
committer | Vasily Melenchuk <vasily.melenchuk@cib.de> | 2021-11-13 09:58:46 +0100 |
commit | a4485bd8e03ad4487fe47a4480a9aacfbaf61980 (patch) | |
tree | 0f69f11ae850f59b5858c5c7fc906f925b5b1159 /editeng | |
parent | ec1a54ca6033533a20309f3df5b8b5353bb2b509 (diff) |
tdf#145610: lists should not have includeUpperLevels < 1
Unlike its name, this variable stores *total* amount of levels
to includes, so during conversion even empty list format to
prefix/suffix/includeupperlevels we should keep last one above
zero so list even in future will not have issues with levels
to display.
Change-Id: I4992c1ac0194f381df9f7b965ecdb2d688892b30
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125022
Tested-by: Jenkins
Reviewed-by: Vasily Melenchuk <vasily.melenchuk@cib.de>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/items/numitem.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx index ca454d92f894..b862b866c50f 100644 --- a/editeng/source/items/numitem.cxx +++ b/editeng/source/items/numitem.cxx @@ -640,6 +640,13 @@ void SvxNumberFormat::SetListFormat(std::optional<OUString> oSet) nPercents++; } nInclUpperLevels = nPercents/2; + if (nInclUpperLevels < 1) + { + // There should be always at least one level. This will be not required + // in future (when we get rid of prefix/suffix), but nowadays there + // are too many conversions "list format" <-> "prefix/suffix/inclUpperLevel" + nInclUpperLevels = 1; + } } OUString SvxNumberFormat::GetListFormat(bool bIncludePrefixSuffix /*= true*/) const |