[Libreoffice-commits] core.git: sw/source

Mike Kaganski mike.kaganski at collabora.com
Fri Jun 22 18:20:22 UTC 2018


 sw/source/ui/frmdlg/cption.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 28f45e406da9ca2c87d1e4285b0138c081125ec8
Author: Mike Kaganski <mike.kaganski at collabora.com>
Date:   Fri Jun 22 14:40:13 2018 +0200

    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 at collabora.co.uk>

diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx
index b3367a1d37e1..1d62d1277e20 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -376,7 +376,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 ));


More information about the Libreoffice-commits mailing list