summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Specht <oliver.specht@cib.de>2016-02-10 16:57:14 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-02-12 08:27:18 +0000
commita6c5dfc9470c261f11efa35bcad98ef7ac632aaa (patch)
tree0df3dcb2db2158b708cae01466889a1e3cd5cc03
parent9b81f4494750d6e25c5ef66053eeaf00620b49b9 (diff)
tdf#89505: replace tab character with space in table of contents
the ToxWhitespaceStripper now replaces also tab characters so that they don't break the formatting Change-Id: If66aaddcbc0f8c65461f53f07ca7031f8f1d11b4 Reviewed-on: https://gerrit.libreoffice.org/22271 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de> (cherry picked from commit 5152c43109c9a35f30fc9b0f478c1fbaf01a1143) Reviewed-on: https://gerrit.libreoffice.org/22285 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r--sw/source/core/tox/ToxWhitespaceStripper.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/tox/ToxWhitespaceStripper.cxx b/sw/source/core/tox/ToxWhitespaceStripper.cxx
index 4918a73cff08..c38079ce1731 100644
--- a/sw/source/core/tox/ToxWhitespaceStripper.cxx
+++ b/sw/source/core/tox/ToxWhitespaceStripper.cxx
@@ -24,7 +24,7 @@ ToxWhitespaceStripper::ToxWhitespaceStripper(const OUString& inputString)
for (sal_Int32 pos = 0; pos < inputString.getLength(); ++pos) {
sal_Unicode cur = inputString[pos];
- if (cur == ' ' || cur == '\n') {
+ if (cur == ' ' || cur == '\n' || cur == '\t') {
// merge consecutive whitespaces (and translate them to spaces)
if (!lastCharacterWasWhitespace) {
buffer.append(' ');