diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2013-10-07 17:27:02 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2013-10-08 15:48:10 -0400 |
commit | 658fc68d574bd49b8b233ad5ed886758e290b3aa (patch) | |
tree | b1acc482e6b8a8aac78e729b1ea0419aea4df607 /sc/source/filter/xml/XMLTrackedChangesContext.cxx | |
parent | ContentInfo to store svl::SharedString instead of OUString. (diff) | |
download | core-658fc68d574bd49b8b233ad5ed886758e290b3aa.tar.gz core-658fc68d574bd49b8b233ad5ed886758e290b3aa.zip |
Store svl::SharedString in document cell storage instead of OUString.
With this, both ScColumn and ScMatrix store svl::SharedString as their
string values, instead of OUString.
Change-Id: I3faece94d98f774881fd72b3ed5f6143504cd350
Diffstat (limited to 'sc/source/filter/xml/XMLTrackedChangesContext.cxx')
-rw-r--r-- | sc/source/filter/xml/XMLTrackedChangesContext.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sc/source/filter/xml/XMLTrackedChangesContext.cxx b/sc/source/filter/xml/XMLTrackedChangesContext.cxx index b66b08131724..590b0e373058 100644 --- a/sc/source/filter/xml/XMLTrackedChangesContext.cxx +++ b/sc/source/filter/xml/XMLTrackedChangesContext.cxx @@ -32,6 +32,7 @@ #include <xmloff/xmluconv.hxx> #include <sax/tools/converter.hxx> #include <svl/zforlist.hxx> +#include "svl/sharedstringpool.hxx" #include <com/sun/star/text/XTextCursor.hpp> #include <com/sun/star/text/ControlCharacter.hpp> @@ -1265,6 +1266,7 @@ void ScXMLChangeCellContext::EndElement() { if (!bEmpty) { + ScDocument* pDoc = GetScImport().GetDocument(); if (pEditTextObj) { if (GetImport().GetTextImport()->GetCursor().is()) @@ -1278,12 +1280,10 @@ void ScXMLChangeCellContext::EndElement() sal_True ); } } - if (GetScImport().GetDocument()) - { - // The cell will own the text object instance. - mrOldCell.meType = CELLTYPE_EDIT; - mrOldCell.mpEditText = pEditTextObj->CreateTextObject(); - } + + // The cell will own the text object instance. + mrOldCell.meType = CELLTYPE_EDIT; + mrOldCell.mpEditText = pEditTextObj->CreateTextObject(); GetScImport().GetTextImport()->ResetCursor(); pEditTextObj->release(); } @@ -1294,7 +1294,7 @@ void ScXMLChangeCellContext::EndElement() if (!sText.isEmpty() && bString) { mrOldCell.meType = CELLTYPE_STRING; - mrOldCell.mpString = new OUString(sText); + mrOldCell.mpString = new svl::SharedString(pDoc->GetCellStringPool().intern(sText)); } else { |