[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sw/source
Michael Stahl
mstahl at redhat.com
Fri May 9 03:15:44 PDT 2014
sw/source/core/doc/doc.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 02172de1a9c1f4442514cc79583ecd0a46331f45
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu Feb 6 13:02:19 2014 +0100
SwDoc::ConvertFieldsToText(): don't insert empty strings
Prevents an assert on accessing sText[0] in InsertString().
Manually cherry-picked from 85a8c1361dccb2c3b98458c2c1c377d5de275d0e
to resolve fdo#77720, see bt here https://bugs.freedesktop.org/attachment.cgi?id=97684
Change-Id: I1828694a4c1e46f8b48cf3571ec2bf4dd615bf2c
Reviewed-on: https://gerrit.libreoffice.org/9113
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 6382d74..e1d84f3 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -2427,7 +2427,8 @@ bool SwDoc::ConvertFieldsToText()
SwPaM aPam1(*pTxtFld->GetpTxtNode(), *pTxtFld->GetStart());
aPam1.Move();
//insert first to keep the field's attributes
- InsertString( aPam1, sText );
+ if (!sText.isEmpty())
+ InsertString( aPam1, sText );
SwPaM aPam2(*pTxtFld->GetpTxtNode(), *pTxtFld->GetStart());
aPam2.SetMark();
aPam2.Move();
More information about the Libreoffice-commits
mailing list