diff options
author | Vasily Melenchuk <vasily.melenchuk@cib.de> | 2020-05-15 18:36:08 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-06-23 16:10:01 +0200 |
commit | 3c09eb16f4e0dea47839adbef66584a6e7bbca63 (patch) | |
tree | 8e1885bd77617a643cddb5ace4f52b7be9240f10 /sw/source/core/doc/number.cxx | |
parent | f463cbd6ea2fd8ab80b812425eb05ae83fa6a426 (diff) |
SW DOCX import: list import fixes
These changes are already in 6.4, 7.0 branch and
are resolving set of bugs and regressions related
to DOCX lists support.
This is a combination of 4 commits.
tdf#120394: docx import: support for w:styleLink
Previous implementation for w:numStyleLink was referring
just ordinal styles, but there can be another abstract
list marked with w:styleLink which should be used in
given context.
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94332
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95892
tdf#132754: DOCX import: changed default list start nubmer
Default value for list numbering startAt is zero. If it is not
proveded numbering starts from this value.
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93899
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
(cherry picked from commit f8211e84a5239de25fe6dc45a4bb6b6f8673a1ee)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96048
tdf#120394: DOCX list import: simplify zero width space hack
Since introducion of list format string hack with creation
of zero-width-space can be much more simple. It was being
used to indicate existing, but empty list label suffix to
avoid stripping down numbering.
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94383
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95346
tdf#83309: docx import: allow for lists tabstop at zero position
Zero position is valid value for tabstop, but previously it was
treated as "no tab stop defined". Right now writer distinguishes
tab stop at zero postion and no tab stop.
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95132
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
(cherry picked from commit d2e428d1abb9f2907c0b87d55830e8742f8209b9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95561
(cherry picked from commit a380a06c1872091e8fa8c810e95a8e1d5dfe1820)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96178
Change-Id: I9717058e450282dfd3ee84b839f8ec9868787196
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96391
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Reviewed-by: Vasily Melenchuk <vasily.melenchuk@cib.de>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/source/core/doc/number.cxx')
-rw-r--r-- | sw/source/core/doc/number.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx index 481ebfada8eb..c636273e6f54 100644 --- a/sw/source/core/doc/number.cxx +++ b/sw/source/core/doc/number.cxx @@ -664,6 +664,13 @@ OUString SwNumRule::MakeNumString( const SwNumberTree::tNumberVector & rNumVecto if (nPosition >= 0) sLevelFormat = sLevelFormat.replaceAt(nPosition, sFind.getLength(), sReplacement); } + + // As a fallback: caller code expects nonempty string as a result. + // But if we have empty string (and had no errors before) this is valid result. + // So use classical hack with zero-width-space as a string filling. + if (sLevelFormat.isEmpty()) + sLevelFormat = OUStringChar(CHAR_ZWSP); + aStr = sLevelFormat; } else |