summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-06-22 14:40:13 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-06-26 08:08:14 +0200
commit9f836f9bcebba4f47d427cc3343ff59956dfa721 (patch)
tree6b73bb9a9fde8b9113401d5eb3f5ef4afe930280
parent6dcf475d5cda984ce0d1035e36267cedc3019e50 (diff)
tdf#118316: fix off-by-1 error (outline level is 0-based)
regression since commit 4730b23b1da929b802d527611e974ff1b1e6d6c5 Change-Id: I50627cde3a9a91189db61e19850768412b058064 Reviewed-on: https://gerrit.libreoffice.org/56295 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 28f45e406da9ca2c87d1e4285b0138c081125ec8) Reviewed-on: https://gerrit.libreoffice.org/56308
-rw-r--r--sw/source/ui/frmdlg/cption.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx
index d8bc996a03ce..62e7e5942161 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -365,7 +365,7 @@ void SwCaptionDialog::DrawSample()
if( pFieldType && pFieldType->GetOutlineLvl() < MAXLEVEL )
{
SwNumberTree::tNumberVector aNumVector;
- aNumVector.insert(aNumVector.end(), pFieldType->GetOutlineLvl(), 1);
+ aNumVector.insert(aNumVector.end(), pFieldType->GetOutlineLvl() + 1, 1);
OUString sNumber( rSh.GetOutlineNumRule()->
MakeNumString(aNumVector, false ));