summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVasily Melenchuk <vasily.melenchuk@cib.de>2021-08-23 12:27:20 +0300
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2021-08-25 07:35:19 +0200
commit9eb836a1a5f0f4522337ff7b87c9a0a4c7e8ca57 (patch)
tree41681f5a871e4598ebd2511a60fb3ba662f3f45a
parentofz: MemorySanitizer: use-of-uninitialized-value (diff)
downloadcore-9eb836a1a5f0f4522337ff7b87c9a0a4c7e8ca57.tar.gz
core-9eb836a1a5f0f4522337ff7b87c9a0a4c7e8ca57.zip
tdf#143990: writer: default value for SetIncludeUpperLevels is 1
Same as in e08fba90 for tdf#143858: zero for SetIncludeUpperLevels has no practical sense, since actually this value is amount of levels to display. Default and minimal value is 1 (current level), zero used only in cases when there should be no numbering. Change-Id: I303386339a9e13944e11d0287c933523c7410b6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120863 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 1fd9116fbcd1a8d25f964087cd1d0eb15df8a2d1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120889 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
-rw-r--r--svx/source/sidebar/nbdtmg.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index cddac0a5f823..fe3c664c7ebf 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -858,7 +858,7 @@ void OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1
}
} else
{
- aFmt.SetIncludeUpperLevels(sal::static_int_cast< sal_uInt8 >(0 != nUpperLevelOrChar ? aNum.GetLevelCount() : 0));
+ aFmt.SetIncludeUpperLevels(sal::static_int_cast< sal_uInt8 >(0 != nUpperLevelOrChar ? aNum.GetLevelCount() : 1));
aFmt.SetCharFormatName(GetNumCharFmtName());
if (isResetSize) aFmt.SetBulletRelSize(100);
}