diff options
author | Vasily Melenchuk <vasily.melenchuk@cib.de> | 2021-08-13 16:56:06 +0300 |
---|---|---|
committer | Vasily Melenchuk <vasily.melenchuk@cib.de> | 2021-08-19 14:28:11 +0200 |
commit | e08fba90f9b593b1a0a7af44bae1d7da0404d3f1 (patch) | |
tree | c398a10ba6e36c6914227e2c44c407deb0db5b88 | |
parent | 4b9836e37410f36093951080f057f8061a681e70 (diff) |
tdf#143858: sw: default value for nInclUpperLevels is 1
SvxNumberFormat::nInclUpperLevels (matches text:display-levels in ODF)
bit incorrect in its name: is counts total amount of levels to display,
including current level. So value "0" seems have no sense: display 0
levels in total?
In UI you can't select less than 1 level and ODF standard (19.797)
using 1 as a default. This looks plausable.
Change-Id: I596386c7b3cc4370910cd0ff6e927e501179fbdf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120458
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
(cherry picked from commit 37dd6e18f5cf498d230ffe8a0a395cfdf9625e0c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120645
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
-rw-r--r-- | cui/source/tabpages/numpages.cxx | 6 | ||||
-rw-r--r-- | editeng/source/items/numitem.cxx | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 47542d147853..8c14c9607fe1 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -690,7 +690,7 @@ IMPL_LINK_NOARG(SvxNumPickTabPage, NumSelectHdl_Impl, ValueSet*, void) } else { - aFmt.SetIncludeUpperLevels(sal::static_int_cast< sal_uInt8 >(0 != nUpperLevelOrChar ? pActNum->GetLevelCount() : 0)); + aFmt.SetIncludeUpperLevels(sal::static_int_cast< sal_uInt8 >(0 != nUpperLevelOrChar ? pActNum->GetLevelCount() : 1)); aFmt.SetCharFormatName(sNumCharFmtName); aFmt.SetBulletRelSize(100); // #i93908# @@ -1641,7 +1641,7 @@ IMPL_LINK(SvxNumOptionsTabPage, NumberTypeSelectHdl_Impl, weld::ComboBox&, rBox, if(SVX_NUM_BITMAP == (nNumberingType&(~LINK_TOKEN))) { bBmp |= nullptr != aNumFmt.GetBrush(); - aNumFmt.SetIncludeUpperLevels( 0 ); + aNumFmt.SetIncludeUpperLevels( 1 ); aNumFmt.SetListFormat("", "", i); if(!bBmp) aNumFmt.SetGraphic(""); @@ -1651,7 +1651,7 @@ IMPL_LINK(SvxNumOptionsTabPage, NumberTypeSelectHdl_Impl, weld::ComboBox&, rBox, } else if( SVX_NUM_CHAR_SPECIAL == nNumberingType ) { - aNumFmt.SetIncludeUpperLevels( 0 ); + aNumFmt.SetIncludeUpperLevels( 1 ); aNumFmt.SetListFormat("", "", i); if( !aNumFmt.GetBulletFont() ) aNumFmt.SetBulletFont(&aActBulletFont); diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx index 9ce62c11dc16..ebd934a6742f 100644 --- a/editeng/source/items/numitem.cxx +++ b/editeng/source/items/numitem.cxx @@ -164,7 +164,7 @@ void SvxNumberType::dumpAsXml( xmlTextWriterPtr pWriter ) const SvxNumberFormat::SvxNumberFormat( SvxNumType eType ) : SvxNumberType(eType), eNumAdjust(SvxAdjust::Left), - nInclUpperLevels(0), + nInclUpperLevels(1), nStart(1), cBullet(SVX_DEF_BULLET), nBulletRelSize(100), |