diff options
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 |