sw/source/core/tox/ToxTextGenerator.cxx |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 9ebe054ddb2d938b24ca4688be9bcbc62745f67f
Author: Mohamed Thabet <thab...@gmail.com>
Date:   Sun Mar 13 21:01:41 2016 +0200

    tdf#44282 fix missing space for numbered lists in TOC
    
    check if there is a number, if so add a space after it
    
    Change-Id: I1c9024aeda2048e60526f26b57a466fea90e56ec
    Reviewed-on: https://gerrit.libreoffice.org/23195
    Tested-by: jan iversen <j...@documentfoundation.org>
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: jan iversen <j...@documentfoundation.org>

diff --git a/sw/source/core/tox/ToxTextGenerator.cxx 
b/sw/source/core/tox/ToxTextGenerator.cxx
index cc181de..62602ac 100644
--- a/sw/source/core/tox/ToxTextGenerator.cxx
+++ b/sw/source/core/tox/ToxTextGenerator.cxx
@@ -181,9 +181,14 @@ ToxTextGenerator::GenerateText(SwDoc* pDoc, const 
std::vector<SwTOXSortTabBase*>
             sal_Int32 nStartCharStyle = rText.getLength();
             switch( aToken.eTokenType )
             {
-            case TOKEN_ENTRY_NO:
-                // for TOC numbering
-                rText += GetNumStringOfFirstNode( rBase, aToken.nChapterFormat 
== CF_NUMBER, static_cast<sal_uInt8>(aToken.nOutlineLevel - 1) ) ;
+            case TOKEN_ENTRY_NO: {
+                    // for TOC numbering
+                    OUString numString = GetNumStringOfFirstNode( rBase, 
aToken.nChapterFormat == CF_NUMBER, static_cast<sal_uInt8>(aToken.nOutlineLevel 
- 1) ) ;
+                    if (numString.getLength() > 0)
+                    {
+                        rText += numString + " " ;
+                    }
+            }
                 break;
 
             case TOKEN_ENTRY_TEXT: {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to