[PATCH] Fix crash with ooo120774-1.doc
Fridrich Strba (via Code Review)
gerrit at gerrit.libreoffice.org
Fri May 31 03:29:52 PDT 2013
Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/4114
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/14/4114/1
Fix crash with ooo120774-1.doc
Do not try to remove line breaks from empty string
Change-Id: Ieb12c541d42944aac813cee10ce479207b1c674b
---
M sw/source/core/doc/doctxm.cxx
1 file changed, 2 insertions(+), 0 deletions(-)
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 @@
/// 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++)
--
To view, visit https://gerrit.libreoffice.org/4114
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieb12c541d42944aac813cee10ce479207b1c674b
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Fridrich Strba <fridrich at documentfoundation.org>
More information about the LibreOffice
mailing list