Kaydet (Commit) bcd00330 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Some cleanups to avoid unnecessary getString() calls.

Change-Id: I334d64f7731915d27e3b81781c91e330dc446010
üst 512ccd16
......@@ -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(
......
......@@ -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();
}
}
......
......@@ -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:
......
......@@ -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);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment