summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2013-10-09 17:46:54 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2013-10-11 12:14:25 -0400
commitbcd0033046be0c8bcc1c6ddda18645570250f083 (patch)
tree8f7b2004c1347403d4783e85246d664c62a3114a /sc
parent512ccd16de2d64a1fd64da92eeb61680b43797ee (diff)
Some cleanups to avoid unnecessary getString() calls.
Change-Id: I334d64f7731915d27e3b81781c91e330dc446010
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/column.cxx2
-rw-r--r--sc/source/core/data/column2.cxx7
-rw-r--r--sc/source/filter/excel/excrecds.cxx5
-rw-r--r--sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx5
4 files changed, 8 insertions, 11 deletions
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index bdfb9c56c390..5270e4c18eec 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -1866,7 +1866,7 @@ public:
for (; it != itEnd; ++it, ++nRow)
{
const svl::SharedString& rStr = *it;
- if (rStr.getString().isEmpty())
+ if (rStr.isEmpty())
{
// String cell with empty value is used to special-case cell value removal.
maDestPos.miCellPos = mrDestCol.GetCellStore().set_empty(
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index f66bd9041baf..ca9281f830c0 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -578,11 +578,10 @@ public:
void operator() (size_t /*nRow*/, const svl::SharedString& rSS)
{
- OUString aStr = rSS.getString();
- if (aStr.getLength() > mnMaxLen)
+ if (rSS.getLength() > mnMaxLen)
{
- mnMaxLen = aStr.getLength();
- maMaxLenStr = aStr;
+ mnMaxLen = rSS.getLength();
+ maMaxLenStr = rSS.getString();
}
}
diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx
index d7bea0b4533b..232371b65bce 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -721,10 +721,9 @@ bool XclExpAutofilter::AddEntry( const ScQueryEntry& rEntry )
bool bConflict = false;
OUString sText;
const ScQueryEntry::Item& rItem = rItems[0];
- OUString aQueryStr = rItem.maString.getString();
- if (!aQueryStr.isEmpty())
+ if (!rItem.maString.isEmpty())
{
- sText = aQueryStr;
+ sText = rItem.maString.getString();
switch( rEntry.eOp )
{
case SC_CONTAINS:
diff --git a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
index 1fd98cd1d730..e7f568c34e03 100644
--- a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
+++ b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
@@ -294,12 +294,11 @@ void ScChangeTrackingExportHelper::WriteStringCell(const ScCellValue& rCell)
rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, XML_STRING);
SvXMLElementExport aElemC(rExport, XML_NAMESPACE_TABLE, XML_CHANGE_TRACK_TABLE_CELL, true, true);
- OUString aStr = rCell.mpString->getString();
- if (!aStr.isEmpty())
+ if (!rCell.mpString->isEmpty())
{
SvXMLElementExport aElemP(rExport, XML_NAMESPACE_TEXT, XML_P, true, false);
bool bPrevCharWasSpace(true);
- rExport.GetTextParagraphExport()->exportText(aStr, bPrevCharWasSpace);
+ rExport.GetTextParagraphExport()->exportText(rCell.mpString->getString(), bPrevCharWasSpace);
}
}