summaryrefslogtreecommitdiff
path: root/sw/source/core/doc
diff options
context:
space:
mode:
authorVasily Melenchuk <vasily.melenchuk@cib.de>2022-04-18 14:36:37 +0300
committerXisco Fauli <xiscofauli@libreoffice.org>2022-04-19 11:16:58 +0200
commit90715026e5a19956ef449694937893c0c76bea21 (patch)
treecd2ad156f1562576c6c727edd3dd65f3937553ac /sw/source/core/doc
parent7c313b2e41e013d33b3576960a688c319d584d9a (diff)
tdf#147472: sw: bug in numbering with previous level NONE
Previous fix for tdf#146257 was not complete and was not able to take care of disabled numebering started just at beginning of the numbering string. UI test test_tdf144439_outline with modifications is covering this situation. No need in extra testcases. Change-Id: Id17838cec7fb4fb039f9b457b7ee9ad3ab345678 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133124 Tested-by: Jenkins Reviewed-by: Vasily Melenchuk <vasily.melenchuk@cib.de> (cherry picked from commit a31a7b53c42eef3a8007766c60ec5a2539054a7c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133135 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw/source/core/doc')
-rw-r--r--sw/source/core/doc/number.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx
index 8a5b9c5d7c60..4e446cbf215c 100644
--- a/sw/source/core/doc/number.cxx
+++ b/sw/source/core/doc/number.cxx
@@ -705,7 +705,7 @@ OUString SwNumRule::MakeNumString( const SwNumberTree::tNumberVector & rNumVecto
OUString sFind("%" + OUString::number(i + 1) + "%");
sal_Int32 nPositionToken = sLevelFormat.indexOf(sFind);
sal_Int32 nPositionNextToken = sLevelFormat.indexOf('%', nPositionToken + sFind.getLength());
- if (nPositionToken > 0 && nPositionNextToken >= nPositionToken)
+ if (nPositionToken >= 0 && nPositionNextToken >= nPositionToken)
{
sLevelFormat = sLevelFormat.replaceAt(nPositionToken, nPositionNextToken - nPositionToken, u"");
}