[Libreoffice-commits] core.git: sw/source

Fridrich Å trba fridrich.strba at bluewin.ch
Fri May 31 03:30:54 PDT 2013


 sw/source/core/doc/doctxm.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 2cb9aaf44dc589af79d62d7b1136b5d65e9f47d4
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Fri May 31 12:27:49 2013 +0200

    Fix crash with ooo120774-1.doc
    
    Do not try to remove line breaks from empty string
    
    Change-Id: Ieb12c541d42944aac813cee10ce479207b1c674b
    Reviewed-on: https://gerrit.libreoffice.org/4114
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index d56cf61..f5372a7 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -1533,6 +1533,8 @@ static String lcl_GetNumString( const SwTOXSortTabBase& rBase, bool bUsePrefix,
 /// to a single space, and trailing space removed.
 String lcl_RemoveLineBreaks( String sRet )
 {
+    if (!sRet.Len())
+        return sRet;
     xub_StrLen nOffset = 0;
     sRet.SearchAndReplaceAll('\n', ' ');
     for (xub_StrLen i = 1; i < sRet.Len(); i++)


More information about the Libreoffice-commits mailing list