[Libreoffice-commits] core.git: sw/source
Mohamed Thabet
thabetx at gmail.com
Fri Mar 18 11:03:09 UTC 2016
sw/source/core/tox/ToxTextGenerator.cxx | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
New commits:
commit 9ebe054ddb2d938b24ca4688be9bcbc62745f67f
Author: Mohamed Thabet <thabetx at 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 <jani at documentfoundation.org>
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: jan iversen <jani at 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: {
More information about the Libreoffice-commits
mailing list