diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-08-05 10:46:11 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-08-05 11:19:08 -0400 |
commit | 808350a697a79ebcc1708f18de407294576a793e (patch) | |
tree | 3f72502667b7fd8680f0da15d77c12c2390e1470 | |
parent | 700d1cab988524b28c7ce773cf473f42d7741001 (diff) |
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
-rw-r--r-- | sc/source/filter/xml/xmlcelli.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx index de12fd225ba9..b03707f6e0c1 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; } |