summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/column2.cxx2
-rw-r--r--sc/source/core/tool/token.cxx4
-rw-r--r--sc/source/filter/excel/xilink.cxx2
-rw-r--r--sc/source/filter/oox/formulabuffer.cxx4
-rw-r--r--sc/source/filter/xml/xmlexternaltabi.cxx2
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx10
-rw-r--r--sc/source/ui/unoobj/linkuno.cxx2
7 files changed, 13 insertions, 13 deletions
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index cc806168d1ed..2f99226a208f 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -2403,7 +2403,7 @@ formula::FormulaTokenRef ScColumn::ResolveStaticReference( SCROW nRow )
const EditTextObject* pText = sc::edittext_block::at(*it->data, aPos.second);
OUString aStr = ScEditUtil::GetString(*pText, &GetDoc());
svl::SharedString aSS( GetDoc().GetSharedStringPool().intern(aStr));
- return formula::FormulaTokenRef(new formula::FormulaStringToken(aSS));
+ return formula::FormulaTokenRef(new formula::FormulaStringToken(std::move(aSS)));
}
case sc::element_type_empty:
default:
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 59f9e04ac8d3..1db10bc21de3 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -365,9 +365,9 @@ FormulaToken* ScRawToken::CreateToken(ScSheetLimits& rLimits) const
{
svl::SharedString aSS(sharedstring.mpData, sharedstring.mpDataIgnoreCase);
if (eOp == ocPush)
- return new FormulaStringToken(aSS);
+ return new FormulaStringToken(std::move(aSS));
else
- return new FormulaStringOpToken(eOp, aSS);
+ return new FormulaStringOpToken(eOp, std::move(aSS));
}
case svSingleRef :
if (eOp == ocPush)
diff --git a/sc/source/filter/excel/xilink.cxx b/sc/source/filter/excel/xilink.cxx
index e9fea951e94e..578c9ff71265 100644
--- a/sc/source/filter/excel/xilink.cxx
+++ b/sc/source/filter/excel/xilink.cxx
@@ -605,7 +605,7 @@ void XclImpSupbookTab::LoadCachedValues( const ScExternalRefCache::TableTypeRef&
case EXC_CACHEDVAL_STRING:
{
svl::SharedString aSS( rPool.intern( pCrn->GetString()));
- ScExternalRefCache::TokenRef pToken(new formula::FormulaStringToken( aSS));
+ ScExternalRefCache::TokenRef pToken(new formula::FormulaStringToken( std::move(aSS) ));
pCacheTable->setCell(rAddr.mnCol, rAddr.mnRow, pToken, 0, false);
}
break;
diff --git a/sc/source/filter/oox/formulabuffer.cxx b/sc/source/filter/oox/formulabuffer.cxx
index 7fcc4f5e259f..f47599fb3763 100644
--- a/sc/source/filter/oox/formulabuffer.cxx
+++ b/sc/source/filter/oox/formulabuffer.cxx
@@ -181,7 +181,7 @@ void applySharedFormulas(
{
// See applyCellFormulaValues
svl::SharedString aSS = rStrPool.intern(rDesc.maCellValue);
- pCell->SetResultToken(new formula::FormulaStringToken(aSS));
+ pCell->SetResultToken(new formula::FormulaStringToken(std::move(aSS)));
// If we don't reset dirty, then e.g. disabling macros makes all cells
// that use macro functions to show #VALUE!
pCell->ResetDirty();
@@ -310,7 +310,7 @@ void applyCellFormulaValues(
if (bGeneratorKnownGood)
{
svl::SharedString aSS = rStrPool.intern(rValueStr);
- pCell->SetResultToken(new formula::FormulaStringToken(aSS));
+ pCell->SetResultToken(new formula::FormulaStringToken(std::move(aSS)));
pCell->ResetDirty();
pCell->SetChanged(false);
}
diff --git a/sc/source/filter/xml/xmlexternaltabi.cxx b/sc/source/filter/xml/xmlexternaltabi.cxx
index 91bb218bb330..7931440c12d0 100644
--- a/sc/source/filter/xml/xmlexternaltabi.cxx
+++ b/sc/source/filter/xml/xmlexternaltabi.cxx
@@ -337,7 +337,7 @@ void SAL_CALL ScXMLExternalRefCellContext::endFastElement( sal_Int32 /*nElement*
{
ScDocument& rDoc = mrScImport.GetDoc().getDoc();
svl::SharedString aSS = rDoc.GetSharedStringPool().intern(maCellString);
- aToken.reset(new formula::FormulaStringToken(aSS));
+ aToken.reset(new formula::FormulaStringToken(std::move(aSS)));
}
sal_uInt32 nNumFmt = mnNumberFormat >= 0 ? static_cast<sal_uInt32>(mnNumberFormat) : 0;
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index 6c994b9a2a68..4fc7556c6daf 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -864,7 +864,7 @@ void ScExternalRefCache::setCellRangeData(sal_uInt16 nFileId, const ScRange& rRa
};
ScMatrix::StringOpFunction aStringFunc = [=](size_t row, size_t col, svl::SharedString val) -> void
{
- pTabData->setCell(col + nCol1, row + nRow1, new formula::FormulaStringToken(val), 0, false);
+ pTabData->setCell(col + nCol1, row + nRow1, new formula::FormulaStringToken(std::move(val)), 0, false);
};
ScMatrix::EmptyOpFunction aEmptyFunc = [](size_t /*row*/, size_t /*col*/) -> void
{
@@ -1515,7 +1515,7 @@ static FormulaToken* convertToToken( ScDocument& rHostDoc, const ScDocument& rSr
{
OUString aStr = rCell.getString(&rSrcDoc);
svl::SharedString aSS = rHostDoc.GetSharedStringPool().intern(aStr);
- return new formula::FormulaStringToken(aSS);
+ return new formula::FormulaStringToken(std::move(aSS));
}
case CELLTYPE_VALUE:
return new formula::FormulaDoubleToken(rCell.getDouble());
@@ -1533,7 +1533,7 @@ static FormulaToken* convertToToken( ScDocument& rHostDoc, const ScDocument& rSr
else
{
svl::SharedString aSS = rHostDoc.GetSharedStringPool().intern( pFCell->GetString().getString());
- return new formula::FormulaStringToken(aSS);
+ return new formula::FormulaStringToken(std::move(aSS));
}
}
default:
@@ -2940,7 +2940,7 @@ public:
{
OUString aStr = aCell.getString(&mpCurCol->GetDoc());
svl::SharedString aSS = mrStrPool.intern(aStr);
- pTok.reset(new formula::FormulaStringToken(aSS));
+ pTok.reset(new formula::FormulaStringToken(std::move(aSS)));
}
break;
case CELLTYPE_VALUE:
@@ -2958,7 +2958,7 @@ public:
{
// Re-intern the string to the host document pool.
svl::SharedString aInterned = mrStrPool.intern(aRes.maString.getString());
- pTok.reset(new formula::FormulaStringToken(aInterned));
+ pTok.reset(new formula::FormulaStringToken(std::move(aInterned)));
}
break;
case sc::FormulaResultValue::Error:
diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx
index c63468cdf61a..cbd043a65598 100644
--- a/sc/source/ui/unoobj/linkuno.cxx
+++ b/sc/source/ui/unoobj/linkuno.cxx
@@ -1404,7 +1404,7 @@ void SAL_CALL ScExternalSheetCacheObj::setCellValue(sal_Int32 nCol, sal_Int32 nR
{
svl::SharedStringPool& rPool = mpDocShell->GetDocument().GetSharedStringPool();
svl::SharedString aSS = rPool.intern(aVal);
- pToken.reset(new FormulaStringToken(aSS));
+ pToken.reset(new FormulaStringToken(std::move(aSS)));
}
else
// unidentified value type.