diff options
author | Mohamed Thabet <thabetx@gmail.com> | 2016-03-13 21:01:41 +0200 |
---|---|---|
committer | jan iversen <jani@documentfoundation.org> | 2016-03-18 11:02:41 +0000 |
commit | 9ebe054ddb2d938b24ca4688be9bcbc62745f67f (patch) | |
tree | dca828f0ececba8c9a602383f9b9ea57ad470b0b | |
parent | c91b103930f4f441ab333d6f3026d6c19d4b4d0f (diff) |
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@documentfoundation.org>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
-rw-r--r-- | sw/source/core/tox/ToxTextGenerator.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sw/source/core/tox/ToxTextGenerator.cxx b/sw/source/core/tox/ToxTextGenerator.cxx index cc181de41650..62602acabbe6 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: { |