sc/source/filter/xml/xmlcelli.cxx | 3 +++ 1 file changed, 3 insertions(+)
New commits: commit 808350a697a79ebcc1708f18de407294576a793e Author: Kohei Yoshida <kohei.yosh...@gmail.com> Date: Mon Aug 5 10:46:11 2013 -0400 fdo#67099: Call Clear() before setting SetText() for the first time. SetText itself internally clears the content, except that it doesn't clear text attributes for some reason. Since Clear() is quite expensive even when called with empty content, we need to call it only when necessary. Change-Id: I25ca36c1c2f690b160511180892595daf43681b3 diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx index de12fd2..b03707f 100644 --- a/sc/source/filter/xml/xmlcelli.cxx +++ b/sc/source/filter/xml/xmlcelli.cxx @@ -637,6 +637,8 @@ void ScXMLTableRowCellContext::PushParagraphEnd() { if (!maFirstParagraph.isEmpty()) { + // Flush the cached first paragraph first. + mpEditEngine->Clear(); mpEditEngine->SetText(maFirstParagraph); maFirstParagraph = OUString(); } @@ -644,6 +646,7 @@ void ScXMLTableRowCellContext::PushParagraphEnd() } else if (mbHasFormatRuns) { + mpEditEngine->Clear(); mpEditEngine->SetText(maParagraph.makeStringAndClear()); mbEditEngineHasText = true; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits