summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-11-13 14:29:59 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-17 09:57:35 +0100
commit8ef6067596cf4b2c52fbce94b44bf7af9fefa643 (patch)
treef4cca1a99ba97683b14fa6fe0f1f45f75bf855c2 /sc
parent75bada928cf08d2afc6efe52ba99b45088bc9eec (diff)
loplugin:stringviewparam check methods too
not just functions Change-Id: Icca295dd159002b428b73f2c95d40725434f04d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105789 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/dpobject.hxx2
-rw-r--r--sc/inc/global.hxx2
-rw-r--r--sc/source/core/data/dpobject.cxx2
-rw-r--r--sc/source/core/data/global.cxx2
-rw-r--r--sc/source/filter/excel/xecontent.cxx2
-rw-r--r--sc/source/filter/excel/xeescher.cxx4
-rw-r--r--sc/source/filter/excel/xestream.cxx8
-rw-r--r--sc/source/filter/excel/xestyle.cxx2
-rw-r--r--sc/source/filter/inc/xestream.hxx2
-rw-r--r--sc/source/filter/rtf/eeimpars.cxx2
-rw-r--r--sc/source/filter/xcl97/xcl97rec.cxx6
-rw-r--r--sc/source/filter/xml/xmltabi.cxx2
-rw-r--r--sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx24
-rw-r--r--sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx4
-rw-r--r--sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx12
-rw-r--r--sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx4
-rw-r--r--sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx4
-rw-r--r--sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx10
-rw-r--r--sc/source/ui/dbgui/filtdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/pfiltdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/tpsort.cxx4
-rw-r--r--sc/source/ui/dbgui/tpsubt.cxx2
-rw-r--r--sc/source/ui/dialogs/searchresults.cxx2
-rw-r--r--sc/source/ui/drawfunc/fuins1.cxx2
-rw-r--r--sc/source/ui/inc/TableFillingAndNavigationTools.hxx10
-rw-r--r--sc/source/ui/inc/drawview.hxx2
-rw-r--r--sc/source/ui/inc/viewfunc.hxx2
-rw-r--r--sc/source/ui/vba/vbacondition.cxx2
-rw-r--r--sc/source/ui/vba/vbaformat.cxx2
-rw-r--r--sc/source/ui/vba/vbarange.cxx4
-rw-r--r--sc/source/ui/vba/vbastyle.cxx2
-rw-r--r--sc/source/ui/view/drawview.cxx4
-rw-r--r--sc/source/ui/view/viewfun3.cxx6
-rw-r--r--sc/source/ui/view/viewfun7.cxx8
34 files changed, 75 insertions, 75 deletions
diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx
index 7a2279ee16e0..6d8fc8cf0357 100644
--- a/sc/inc/dpobject.hxx
+++ b/sc/inc/dpobject.hxx
@@ -175,7 +175,7 @@ public:
*/
bool IsDataDescriptionCell(const ScAddress& rPos);
- bool IsDimNameInUse(const OUString& rName) const;
+ bool IsDimNameInUse(std::u16string_view rName) const;
OUString GetDimName( tools::Long nDim, bool& rIsDataLayout, sal_Int32* pFlags = nullptr );
bool IsDuplicated( tools::Long nDim );
tools::Long GetDimCount();
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index e4560fd6c359..3574a0aab0ed 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -697,7 +697,7 @@ public:
in the result string.
*/
SC_DLLPUBLIC static OUString ReplaceOrAppend( const OUString& rString,
- const OUString& rPlaceholder,
+ std::u16string_view rPlaceholder,
const OUString& rReplacement );
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 29f0814006d5..74a99790422a 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -1169,7 +1169,7 @@ void ScDPObject::GetDrillDownData(const ScAddress& rPos, Sequence< Sequence<Any>
rTableData = xDrillDownData->getDrillDownData(filters);
}
-bool ScDPObject::IsDimNameInUse(const OUString& rName) const
+bool ScDPObject::IsDimNameInUse(std::u16string_view rName) const
{
if (!xSource.is())
return false;
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index b53afafb6324..221e1d31eb50 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -1068,7 +1068,7 @@ ScFieldEditEngine& ScGlobal::GetStaticFieldEditEngine()
}
OUString ScGlobal::ReplaceOrAppend( const OUString& rString,
- const OUString& rPlaceholder, const OUString& rReplacement )
+ std::u16string_view rPlaceholder, const OUString& rReplacement )
{
if (rString.isEmpty())
return rReplacement;
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index 2692406d9a2d..028ad89241d6 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -210,7 +210,7 @@ void XclExpSstImpl::SaveXml( XclExpXmlStream& rStrm )
"sharedStrings.xml",
rStrm.GetCurrentStream()->getOutputStream(),
"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",
- OUStringToOString(oox::getRelationship(Relationship::SHAREDSTRINGS), RTL_TEXTENCODING_UTF8).getStr());
+ oox::getRelationship(Relationship::SHAREDSTRINGS));
rStrm.PushStream( pSst );
pSst->startElement( XML_sst,
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index c104a97206b1..daf2a2777b23 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -1254,7 +1254,7 @@ OUString XclExpTbxControlObj::SaveControlPropertiesXml(XclExpXmlStream& rStrm) c
XclXmlUtils::GetStreamName( "../", "ctrlProps/ctrlProps", nDrawing ),
rStrm.GetCurrentStream()->getOutputStream(),
"application/vnd.ms-excel.controlproperties+xml",
- OUStringToOString(oox::getRelationship(Relationship::CTRLPROP), RTL_TEXTENCODING_UTF8).getStr(),
+ oox::getRelationship(Relationship::CTRLPROP),
&sIdFormControlPr );
rStrm.PushStream( pFormControl );
@@ -1714,7 +1714,7 @@ void XclExpComments::SaveXml( XclExpXmlStream& rStrm )
XclXmlUtils::GetStreamName( "../", "comments", mnTab + 1 ),
rStrm.GetCurrentStream()->getOutputStream(),
"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml",
- OUStringToOString(oox::getRelationship(Relationship::COMMENTS), RTL_TEXTENCODING_UTF8).getStr());
+ oox::getRelationship(Relationship::COMMENTS));
rStrm.PushStream( rComments );
if( rStrm.getVersion() == oox::core::ISOIEC_29500_2008 )
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx
index 476c8a0bdf8d..a43c612e3e23 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -941,14 +941,14 @@ sax_fastparser::FSHelperPtr XclExpXmlStream::CreateOutputStream (
const OUString& sRelativeStream,
const uno::Reference< XOutputStream >& xParentRelation,
const char* sContentType,
- const char* sRelationshipType,
+ std::u16string_view sRelationshipType,
OUString* pRelationshipId )
{
OUString sRelationshipId;
if (xParentRelation.is())
- sRelationshipId = addRelation( xParentRelation, OUString::createFromAscii( sRelationshipType), sRelativeStream );
+ sRelationshipId = addRelation( xParentRelation, sRelationshipType, sRelativeStream );
else
- sRelationshipId = addRelation( OUString::createFromAscii( sRelationshipType ), sRelativeStream );
+ sRelationshipId = addRelation( sRelationshipType, sRelativeStream );
if( pRelationshipId )
*pRelationshipId = sRelationshipId;
@@ -1074,7 +1074,7 @@ bool XclExpXmlStream::exportDocument()
PushStream( CreateOutputStream( workbook, workbook,
uno::Reference <XOutputStream>(),
pWorkbookContentType,
- OUStringToOString(oox::getRelationship(Relationship::OFFICEDOCUMENT), RTL_TEXTENCODING_UTF8).getStr() ) );
+ oox::getRelationship(Relationship::OFFICEDOCUMENT) ) );
if (mbExportVBA)
{
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index dbf13483903a..48bc5df23dc9 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -3190,7 +3190,7 @@ void XclExpXmlStyleSheet::SaveXml( XclExpXmlStream& rStrm )
"styles.xml",
rStrm.GetCurrentStream()->getOutputStream(),
"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",
- OUStringToOString(oox::getRelationship(Relationship::STYLES), RTL_TEXTENCODING_UTF8).getStr());
+ oox::getRelationship(Relationship::STYLES));
rStrm.PushStream( aStyleSheet );
aStyleSheet->startElement(XML_styleSheet, XML_xmlns, rStrm.getNamespaceURL(OOX_NS(xls)));
diff --git a/sc/source/filter/inc/xestream.hxx b/sc/source/filter/inc/xestream.hxx
index a73c71c5630a..bbcdf7740f4f 100644
--- a/sc/source/filter/inc/xestream.hxx
+++ b/sc/source/filter/inc/xestream.hxx
@@ -311,7 +311,7 @@ public:
const OUString& sRelativeStream,
const css::uno::Reference< css::io::XOutputStream >& xParentRelation,
const char* sContentType,
- const char* sRelationshipType,
+ std::u16string_view sRelationshipType,
OUString* pRelationshipId = nullptr );
// ignore
diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx
index 9cb698af8a74..ce164d24103f 100644
--- a/sc/source/filter/rtf/eeimpars.cxx
+++ b/sc/source/filter/rtf/eeimpars.cxx
@@ -604,7 +604,7 @@ void ScEEImport::InsertGraphic( SCCOL nCol, SCROW nRow, SCTAB nTab,
// SetGraphicLink has to be used after inserting the object,
// otherwise an empty graphic is swapped in and the contact stuff crashes.
// See #i37444#.
- pObj->SetGraphicLink( pI->aURL, ""/*TODO?*/, pI->aFilterName );
+ pObj->SetGraphicLink( pI->aURL, u""/*TODO?*/, pI->aFilterName );
pObj->SetLogicRect( aRect ); // Only after InsertObject!
}
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index 9a110025d63f..a095a599c58a 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -244,7 +244,7 @@ void SaveDrawingMLObjects( XclExpObjList& rList, XclExpXmlStream& rStrm )
XclXmlUtils::GetStreamName( "../", "drawings/drawing", nDrawing ),
rStrm.GetCurrentStream()->getOutputStream(),
"application/vnd.openxmlformats-officedocument.drawing+xml",
- OUStringToOString(oox::getRelationship(Relationship::DRAWING), RTL_TEXTENCODING_UTF8).getStr(),
+ oox::getRelationship(Relationship::DRAWING),
&sId );
rStrm.GetCurrentStream()->singleElement(XML_drawing, FSNS(XML_r, XML_id), sId.toUtf8());
@@ -330,7 +330,7 @@ void SaveVmlObjects( XclExpObjList& rList, XclExpXmlStream& rStrm, sal_Int32& nV
XclXmlUtils::GetStreamName( "../", "drawings/vmlDrawing", nDrawing ),
rStrm.GetCurrentStream()->getOutputStream(),
"application/vnd.openxmlformats-officedocument.vmlDrawing",
- OUStringToOString(oox::getRelationship(Relationship::VMLDRAWING), RTL_TEXTENCODING_UTF8).getStr(),
+ oox::getRelationship(Relationship::VMLDRAWING),
&sId );
rStrm.GetCurrentStream()->singleElement(XML_legacyDrawing, FSNS(XML_r, XML_id), sId.toUtf8());
@@ -1383,7 +1383,7 @@ void ExcBundlesheet8::SaveXml( XclExpXmlStream& rStrm )
XclXmlUtils::GetStreamName( nullptr, "worksheets/sheet", nTab+1),
rStrm.GetCurrentStream()->getOutputStream(),
"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",
- OUStringToOString(oox::getRelationship(Relationship::WORKSHEET), RTL_TEXTENCODING_UTF8).getStr(),
+ oox::getRelationship(Relationship::WORKSHEET),
&sId );
rStrm.GetCurrentStream()->singleElement( XML_sheet,
diff --git a/sc/source/filter/xml/xmltabi.cxx b/sc/source/filter/xml/xmltabi.cxx
index 535336dc0ce8..55394c370fe8 100644
--- a/sc/source/filter/xml/xmltabi.cxx
+++ b/sc/source/filter/xml/xmltabi.cxx
@@ -229,7 +229,7 @@ SvXMLImportContextRef ScXMLTableContext::CreateChildContext( sal_uInt16 nPrefix,
{
GetScImport().GetFormImport()->startPage(GetScImport().GetTables().GetCurrentXDrawPage());
bStartFormPage = true;
- pContext = xmloff::OFormLayerXMLImport::createOfficeFormsContext( GetScImport(), nPrefix, rLName );
+ pContext = xmloff::OFormLayerXMLImport::createOfficeFormsContext( GetScImport() );
}
break;
default:
diff --git a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
index 8b83ff5eb952..b48af4241a9b 100644
--- a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
@@ -170,7 +170,7 @@ void ScAnalysisOfVarianceDialog::RowColumn(ScRangeList& rRangeList, AddressWalke
for (size_t i = 0; i < rRangeList.size(); i++)
{
aTemplate.setTemplate(aLabelTemplate);
- aTemplate.applyNumber("%NUMBER%", i + 1);
+ aTemplate.applyNumber(u"%NUMBER%", i + 1);
aOutput.writeString(aTemplate.getTemplate());
if (pResultRange != nullptr)
pResultRange->aEnd = aOutput.current();
@@ -261,20 +261,20 @@ void ScAnalysisOfVarianceDialog::AnovaSingleFactor(AddressWalkerWriter& output,
// F
aTemplate.setTemplate("=%BETWEEN_MS% / %WITHIN_MS%");
- aTemplate.applyAddress("%WITHIN_MS%", output.current(-1, 1));
+ aTemplate.applyAddress(u"%WITHIN_MS%", output.current(-1, 1));
aTemplate.autoReplaceAddress("%F_VAL%", output.current());
output.writeFormula(aTemplate.getTemplate());
output.nextColumn();
// P-value
aTemplate.setTemplate("=FDIST(%F_VAL%; %BETWEEN_DF%; %WITHIN_DF%");
- aTemplate.applyAddress("%WITHIN_DF%", output.current(-3, 1));
+ aTemplate.applyAddress(u"%WITHIN_DF%", output.current(-3, 1));
output.writeFormula(aTemplate.getTemplate());
output.nextColumn();
// F critical
aTemplate.setTemplate("=FINV(%ALPHA%; %BETWEEN_DF%; %WITHIN_DF%");
- aTemplate.applyAddress("%WITHIN_DF%", output.current(-4, 1));
+ aTemplate.applyAddress(u"%WITHIN_DF%", output.current(-4, 1));
output.writeFormula(aTemplate.getTemplate());
}
output.nextRow();
@@ -315,7 +315,7 @@ void ScAnalysisOfVarianceDialog::AnovaSingleFactor(AddressWalkerWriter& output,
// Sum of Squares
aTemplate.setTemplate("=DEVSQ(%RANGE_LIST%)");
- aTemplate.applyRangeList("%RANGE_LIST%", aRangeList, ';');
+ aTemplate.applyRangeList(u"%RANGE_LIST%", aRangeList, ';');
output.writeFormula(aTemplate.getTemplate());
output.nextColumn();
@@ -428,20 +428,20 @@ void ScAnalysisOfVarianceDialog::AnovaTwoFactor(AddressWalkerWriter& output, For
// F
aTemplate.setTemplate("=%MS_ROW% / %MS_ERROR%");
- aTemplate.applyAddress("%MS_ERROR%", output.current(-1, 2));
+ aTemplate.applyAddress(u"%MS_ERROR%", output.current(-1, 2));
aTemplate.autoReplaceAddress("%F_ROW%", output.current());
output.writeFormula(aTemplate.getTemplate());
output.nextColumn();
// P-value
aTemplate.setTemplate("=FDIST(%F_ROW%; %ROW_DF%; %ERROR_DF%");
- aTemplate.applyAddress("%ERROR_DF%", output.current(-3, 2));
+ aTemplate.applyAddress(u"%ERROR_DF%", output.current(-3, 2));
output.writeFormula(aTemplate.getTemplate());
output.nextColumn();
// F critical
aTemplate.setTemplate("=FINV(%ALPHA%; %ROW_DF%; %ERROR_DF%");
- aTemplate.applyAddress("%ERROR_DF%", output.current(-4, 2));
+ aTemplate.applyAddress(u"%ERROR_DF%", output.current(-4, 2));
output.writeFormula(aTemplate.getTemplate());
output.nextColumn();
}
@@ -474,20 +474,20 @@ void ScAnalysisOfVarianceDialog::AnovaTwoFactor(AddressWalkerWriter& output, For
// F
aTemplate.setTemplate("=%MS_COLUMN% / %MS_ERROR%");
- aTemplate.applyAddress("%MS_ERROR%", output.current(-1, 1));
+ aTemplate.applyAddress(u"%MS_ERROR%", output.current(-1, 1));
aTemplate.autoReplaceAddress("%F_COLUMN%", output.current());
output.writeFormula(aTemplate.getTemplate());
output.nextColumn();
// P-value
aTemplate.setTemplate("=FDIST(%F_COLUMN%; %COLUMN_DF%; %ERROR_DF%");
- aTemplate.applyAddress("%ERROR_DF%", output.current(-3, 1));
+ aTemplate.applyAddress(u"%ERROR_DF%", output.current(-3, 1));
output.writeFormula(aTemplate.getTemplate());
output.nextColumn();
// F critical
aTemplate.setTemplate("=FINV(%ALPHA%; %COLUMN_DF%; %ERROR_DF%");
- aTemplate.applyAddress("%ERROR_DF%", output.current(-4, 1));
+ aTemplate.applyAddress(u"%ERROR_DF%", output.current(-4, 1));
output.writeFormula(aTemplate.getTemplate());
output.nextColumn();
}
@@ -508,7 +508,7 @@ void ScAnalysisOfVarianceDialog::AnovaTwoFactor(AddressWalkerWriter& output, For
// Degree of freedom
aTemplate.setTemplate("=%TOTAL_DF% - %ROW_DF% - %COLUMN_DF%");
- aTemplate.applyAddress("%TOTAL_DF%", output.current(0,1));
+ aTemplate.applyAddress(u"%TOTAL_DF%", output.current(0,1));
aTemplate.autoReplaceAddress("%ERROR_DF%", output.current());
output.writeFormula(aTemplate.getTemplate());
output.nextColumn();
diff --git a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
index 53fe8e2d10cf..f42e9cf12923 100644
--- a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
@@ -93,7 +93,7 @@ ScRange ScDescriptiveStatisticsDialog::ApplyOutput(ScDocShell* pDocShell)
else
aTemplate.setTemplate(ScResId(STR_ROW_LABEL_TEMPLATE));
- aTemplate.applyNumber("%NUMBER%", pIterator->index() + 1);
+ aTemplate.applyNumber(u"%NUMBER%", pIterator->index() + 1);
aOutput.writeBoldString(aTemplate.getTemplate());
aOutput.nextColumn();
}
@@ -119,7 +119,7 @@ ScRange ScDescriptiveStatisticsDialog::ApplyOutput(ScDocShell* pDocShell)
for(sal_Int32 i = 0; lclCalcDefinitions[i].aFormula != nullptr; i++)
{
aTemplate.setTemplate(lclCalcDefinitions[i].aFormula);
- aTemplate.applyRange("%RANGE%", pIterator->get(), b3DAddress);
+ aTemplate.applyRange(u"%RANGE%", pIterator->get(), b3DAddress);
aOutput.writeFormula(aTemplate.getTemplate());
aOutput.nextRow();
}
diff --git a/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx b/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx
index 30f63ed0efd6..df3aef026b50 100644
--- a/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx
@@ -79,7 +79,7 @@ ScRange ScExponentialSmoothingDialog::ApplyOutput(ScDocShell* pDocShell)
aTemplate.setTemplate(ScResId(STR_COLUMN_LABEL_TEMPLATE));
else
aTemplate.setTemplate(ScResId(STR_ROW_LABEL_TEMPLATE));
- aTemplate.applyNumber("%NUMBER%", pIterator->index() + 1);
+ aTemplate.applyNumber(u"%NUMBER%", pIterator->index() + 1);
output.writeBoldString(aTemplate.getTemplate());
output.nextRow();
@@ -87,13 +87,13 @@ ScRange ScExponentialSmoothingDialog::ApplyOutput(ScDocShell* pDocShell)
if ((false))
{
aTemplate.setTemplate("=AVERAGE(%RANGE%)");
- aTemplate.applyRange("%RANGE%", aCurrentRange);
+ aTemplate.applyRange(u"%RANGE%", aCurrentRange);
output.writeFormula(aTemplate.getTemplate());
}
else
{
aTemplate.setTemplate("=%VAR%");
- aTemplate.applyAddress("%VAR%", aCurrentRange.aStart);
+ aTemplate.applyAddress(u"%VAR%", aCurrentRange.aStart);
output.writeFormula(aTemplate.getTemplate());
}
@@ -104,9 +104,9 @@ ScRange ScExponentialSmoothingDialog::ApplyOutput(ScDocShell* pDocShell)
for (; aDataCellIterator.hasNext(); aDataCellIterator.next())
{
aTemplate.setTemplate("=%VALUE% * %PREVIOUS_INPUT% + (1 - %VALUE%) * %PREVIOUS_OUTPUT%");
- aTemplate.applyAddress("%PREVIOUS_INPUT%", aDataCellIterator.get());
- aTemplate.applyAddress("%PREVIOUS_OUTPUT%", output.current(0, -1));
- aTemplate.applyAddress("%VALUE%", aSmoothingFactorAddress);
+ aTemplate.applyAddress(u"%PREVIOUS_INPUT%", aDataCellIterator.get());
+ aTemplate.applyAddress(u"%PREVIOUS_OUTPUT%", output.current(0, -1));
+ aTemplate.applyAddress(u"%VALUE%", aSmoothingFactorAddress);
output.writeFormula(aTemplate.getTemplate());
output.nextRow();
diff --git a/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx b/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx
index a68be9b1d95f..bb2bf4a1ed49 100644
--- a/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx
+++ b/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx
@@ -28,8 +28,8 @@ namespace
if (j >= i)
{
aTemplate.setTemplate(aTemplateString);
- aTemplate.applyRange("%VAR1%", aRangeList[i]);
- aTemplate.applyRange("%VAR2%", aRangeList[j]);
+ aTemplate.applyRange(u"%VAR1%", aRangeList[i]);
+ aTemplate.applyRange(u"%VAR2%", aRangeList[j]);
aOutput.writeFormula(aTemplate.getTemplate());
}
aOutput.nextRow();
diff --git a/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx b/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx
index f2a7f9020790..813378cab952 100644
--- a/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx
@@ -70,7 +70,7 @@ ScRange ScMovingAverageDialog::ApplyOutput(ScDocShell* pDocShell)
else
aTemplate.setTemplate(ScResId(STR_ROW_LABEL_TEMPLATE));
- aTemplate.applyNumber("%NUMBER%", pIterator->index() + 1);
+ aTemplate.applyNumber(u"%NUMBER%", pIterator->index() + 1);
output.writeBoldString(aTemplate.getTemplate());
output.nextRow();
@@ -98,7 +98,7 @@ ScRange ScMovingAverageDialog::ApplyOutput(ScDocShell* pDocShell)
if(aIntervalStart.IsValid() && aIntervalEnd.IsValid())
{
aTemplate.setTemplate("=AVERAGE(%RANGE%)");
- aTemplate.applyRange("%RANGE%", ScRange(aIntervalStart, aIntervalEnd));
+ aTemplate.applyRange(u"%RANGE%", ScRange(aIntervalStart, aIntervalEnd));
aFormulas.push_back(aTemplate.getTemplate());
}
else
diff --git a/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx
index 1d2d087bfc7a..3047ba34f46a 100644
--- a/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx
+++ b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx
@@ -60,33 +60,33 @@ void FormulaTemplate::autoReplaceAddress(const OUString& aVariable, ScAddress co
mAddressReplacementMap[aVariable] = aAddress;
}
-void FormulaTemplate::applyRange(const OUString& aVariable, const ScRange& aRange, bool b3D)
+void FormulaTemplate::applyRange(std::u16string_view aVariable, const ScRange& aRange, bool b3D)
{
ScRefFlags nFlag = b3D ? ScRefFlags::RANGE_ABS_3D : ScRefFlags::RANGE_ABS;
OUString aString = aRange.Format(*mpDoc, nFlag, mpDoc->GetAddressConvention());
mTemplate = mTemplate.replaceAll(aVariable, aString);
}
-void FormulaTemplate::applyRangeList(const OUString& aVariable, const ScRangeList& aRangeList, sal_Unicode cDelimiter)
+void FormulaTemplate::applyRangeList(std::u16string_view aVariable, const ScRangeList& aRangeList, sal_Unicode cDelimiter)
{
OUString aString;
aRangeList.Format(aString, ScRefFlags::RANGE_ABS_3D, *mpDoc, mpDoc->GetAddressConvention(), cDelimiter);
mTemplate = mTemplate.replaceAll(aVariable, aString);
}
-void FormulaTemplate::applyAddress(const OUString& aVariable, const ScAddress& aAddress, bool b3D)
+void FormulaTemplate::applyAddress(std::u16string_view aVariable, const ScAddress& aAddress, bool b3D)
{
ScRefFlags nFlag = b3D ? ScRefFlags::ADDR_ABS_3D : ScRefFlags::ADDR_ABS;
OUString aString = aAddress.Format(nFlag, mpDoc, mpDoc->GetAddressConvention());
mTemplate = mTemplate.replaceAll(aVariable, aString);
}
-void FormulaTemplate::applyString(const OUString& aVariable, const OUString& aValue)
+void FormulaTemplate::applyString(std::u16string_view aVariable, std::u16string_view aValue)
{
mTemplate = mTemplate.replaceAll(aVariable, aValue);
}
-void FormulaTemplate::applyNumber(const OUString& aVariable, sal_Int32 aValue)
+void FormulaTemplate::applyNumber(std::u16string_view aVariable, sal_Int32 aValue)
{
mTemplate = mTemplate.replaceAll(aVariable, OUString::number(aValue));
}
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index 0d439f86c273..13f9fff9381a 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -402,7 +402,7 @@ void ScFilterDlg::FillFieldLists()
aFieldName = pDoc->GetString(col, nFirstRow, nTab);
if (!m_xBtnHeader->get_active() || aFieldName.isEmpty())
{
- aFieldName = ScGlobal::ReplaceOrAppend( aStrColumn, "%1", ScColToAlpha( col ));
+ aFieldName = ScGlobal::ReplaceOrAppend( aStrColumn, u"%1", ScColToAlpha( col ));
}
m_xLbField1->append_text( aFieldName );
m_xLbField2->append_text( aFieldName );
diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx
index 2c257ac686d2..750526290c70 100644
--- a/sc/source/ui/dbgui/pfiltdlg.cxx
+++ b/sc/source/ui/dbgui/pfiltdlg.cxx
@@ -234,7 +234,7 @@ void ScPivotFilterDlg::FillFieldLists()
aFieldName = pDoc->GetString(col, nFirstRow, nTab);
if ( aFieldName.isEmpty() )
{
- aFieldName = ScGlobal::ReplaceOrAppend( aStrColumn, "%1", ScColToAlpha( col ));
+ aFieldName = ScGlobal::ReplaceOrAppend( aStrColumn, u"%1", ScColToAlpha( col ));
}
m_xLbField1->append_text(aFieldName);
m_xLbField2->append_text(aFieldName);
diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 769f92ce277b..f8c2a996bd22 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -344,7 +344,7 @@ void ScTabPageSortFields::FillFieldLists( sal_uInt16 nStartField )
aFieldName = rDoc.GetString(col, nFirstSortRow, nTab);
if ( !bHasHeader || aFieldName.isEmpty() )
{
- aFieldName = ScGlobal::ReplaceOrAppend( aStrColumn, "%1", ScColToAlpha( col ));
+ aFieldName = ScGlobal::ReplaceOrAppend( aStrColumn, u"%1", ScColToAlpha( col ));
}
nFieldArr.push_back( col );
@@ -365,7 +365,7 @@ void ScTabPageSortFields::FillFieldLists( sal_uInt16 nStartField )
aFieldName = rDoc.GetString(nFirstSortCol, row, nTab);
if ( !bHasHeader || aFieldName.isEmpty() )
{
- aFieldName = ScGlobal::ReplaceOrAppend( aStrRow, "%1", OUString::number( row+1));
+ aFieldName = ScGlobal::ReplaceOrAppend( aStrRow, u"%1", OUString::number( row+1));
}
nFieldArr.push_back( row );
diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx
index 953c4cf50ff3..4a8d8d85ddab 100644
--- a/sc/source/ui/dbgui/tpsubt.cxx
+++ b/sc/source/ui/dbgui/tpsubt.cxx
@@ -264,7 +264,7 @@ void ScTpSubTotalGroup::FillListBoxes()
aFieldName = pDoc->GetString(col, nFirstRow, nTab);
if ( aFieldName.isEmpty() )
{
- aFieldName = ScGlobal::ReplaceOrAppend( aStrColumn, "%1", ScColToAlpha( col ));
+ aFieldName = ScGlobal::ReplaceOrAppend( aStrColumn, u"%1", ScColToAlpha( col ));
}
nFieldArr[i] = col;
mxLbGroup->insert_text(i+1, aFieldName);
diff --git a/sc/source/ui/dialogs/searchresults.cxx b/sc/source/ui/dialogs/searchresults.cxx
index 8713def944f5..2ad53cfde7e8 100644
--- a/sc/source/ui/dialogs/searchresults.cxx
+++ b/sc/source/ui/dialogs/searchresults.cxx
@@ -154,7 +154,7 @@ void SearchResultsDlg::FillResults( ScDocument& rDoc, const ScRangeList &rMatche
OUString aTotal(ScResId(SCSTR_TOTAL, aList.mnCount));
OUString aSearchResults = aTotal.replaceFirst("%1", OUString::number(aList.mnCount));
if (aList.mnCount > ListWrapper::mnMaximum)
- aSearchResults += " " + ScGlobal::ReplaceOrAppend( aSkipped, "%1", OUString::number( ListWrapper::mnMaximum ) );
+ aSearchResults += " " + ScGlobal::ReplaceOrAppend( aSkipped, u"%1", OUString::number( ListWrapper::mnMaximum ) );
mxSearchResults->set_label(aSearchResults);
mpDoc = &rDoc;
diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx
index d5a28f8a29ad..5ef7f1065853 100644
--- a/sc/source/ui/drawfunc/fuins1.cxx
+++ b/sc/source/ui/drawfunc/fuins1.cxx
@@ -204,7 +204,7 @@ static void lcl_InsertGraphic( const Graphic& rGraphic,
// otherwise an empty graphic is swapped in and the contact stuff crashes.
// See #i37444#.
if (bSuccess && bAsLink)
- pObj->SetGraphicLink( rFileName, ""/*TODO?*/, rFilterName );
+ pObj->SetGraphicLink( rFileName, u""/*TODO?*/, rFilterName );
}
static void lcl_InsertMedia( const OUString& rMediaURL, bool bApi,
diff --git a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx
index d24535c54298..c4974bbd1bc6 100644
--- a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx
+++ b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx
@@ -40,11 +40,11 @@ public:
void autoReplaceAddress(const OUString& aVariable, ScAddress const & aAddress);
void autoReplaceUses3D(bool bUse3D) { mbUse3D = bUse3D; }
- void applyRange(const OUString& aVariable, const ScRange& aRange, bool b3D = true);
- void applyRangeList(const OUString& aVariable, const ScRangeList& aRangeList, sal_Unicode cDelimiter );
- void applyAddress(const OUString& aVariable, const ScAddress& aAddress, bool b3D = true);
- void applyString(const OUString& aVariable, const OUString& aValue);
- void applyNumber(const OUString& aVariable, sal_Int32 aValue);
+ void applyRange(std::u16string_view aVariable, const ScRange& aRange, bool b3D = true);
+ void applyRangeList(std::u16string_view aVariable, const ScRangeList& aRangeList, sal_Unicode cDelimiter );
+ void applyAddress(std::u16string_view aVariable, const ScAddress& aAddress, bool b3D = true);
+ void applyString(std::u16string_view aVariable, std::u16string_view aValue);
+ void applyNumber(std::u16string_view aVariable, sal_Int32 aValue);
};
class AddressWalker
diff --git a/sc/source/ui/inc/drawview.hxx b/sc/source/ui/inc/drawview.hxx
index 6ecf44456059..3a2e844a8031 100644
--- a/sc/source/ui/inc/drawview.hxx
+++ b/sc/source/ui/inc/drawview.hxx
@@ -152,7 +152,7 @@ public:
const Graphic& rGraphic,
const OUString& rBeginUndoText,
const OUString& rFile,
- const OUString& rFilter);
+ std::u16string_view rFilter);
static void CheckOle( const SdrMarkList& rMarkList, bool& rAnyOle, bool& rOneOle );
diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
index bb0644ba856b..78241137592e 100644
--- a/sc/source/ui/inc/viewfunc.hxx
+++ b/sc/source/ui/inc/viewfunc.hxx
@@ -149,7 +149,7 @@ public:
bool PasteBitmapEx( const Point&, const BitmapEx& );
bool PasteMetaFile( const Point&, const GDIMetaFile& );
bool PasteGraphic( const Point& rPos, const Graphic& rGraphic,
- const OUString& rFile, const OUString& rFilter );
+ const OUString& rFile, std::u16string_view rFilter );
bool PasteBookmark( SotClipboardFormatId nFormatId,
const css::uno::Reference< css::datatransfer::XTransferable >& rxTransferable,
SCCOL nPosX, SCROW nPosY );
diff --git a/sc/source/ui/vba/vbacondition.cxx b/sc/source/ui/vba/vbacondition.cxx
index 2e53d62fc5f8..09fccee63f77 100644
--- a/sc/source/ui/vba/vbacondition.cxx
+++ b/sc/source/ui/vba/vbacondition.cxx
@@ -134,7 +134,7 @@ ScVbaCondition< Ifc... >::Operator(bool _bIncludeFormulaValue)
[[fallthrough]]; //TODO ???
case sheet::ConditionOperator_NONE:
default:
- DebugHelper::basicexception(ERRCODE_BASIC_METHOD_FAILED, "Operator not supported");
+ DebugHelper::basicexception(ERRCODE_BASIC_METHOD_FAILED, u"Operator not supported");
break;
}
return retvalue;
diff --git a/sc/source/ui/vba/vbaformat.cxx b/sc/source/ui/vba/vbaformat.cxx
index 46e29a8229b8..f44467d7cd02 100644
--- a/sc/source/ui/vba/vbaformat.cxx
+++ b/sc/source/ui/vba/vbaformat.cxx
@@ -72,7 +72,7 @@ ScVbaFormat< Ifc... >::ScVbaFormat( const uno::Reference< XHelperInterface >& xP
try
{
if ( !mxModel.is() )
- DebugHelper::basicexception(ERRCODE_BASIC_METHOD_FAILED, "XModel Interface could not be retrieved" );
+ DebugHelper::basicexception(ERRCODE_BASIC_METHOD_FAILED, u"XModel Interface could not be retrieved" );
// mxServiceInfo is unused,
// mxNumberFormatsSupplier is initialized when needed in initializeNumberFormats.
}
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 019a0d8601b9..9e230ff363a0 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -677,7 +677,7 @@ const char GREATERTHAN[] = ">";
const char GREATERTHANEQUALS[] = ">=";
const char LESSTHAN[] = "<";
const char LESSTHANEQUALS[] = "<=";
-const char STR_ERRORMESSAGE_APPLIESTOSINGLERANGEONLY[] = "The command you chose cannot be performed with multiple selections.\nSelect a single range and click the command again";
+constexpr OUStringLiteral STR_ERRORMESSAGE_APPLIESTOSINGLERANGEONLY(u"The command you chose cannot be performed with multiple selections.\nSelect a single range and click the command again");
const char CELLSTYLE[] = "CellStyle";
namespace {
@@ -5521,7 +5521,7 @@ ScVbaRange::SpecialCellsImpl( sal_Int32 nType, const uno::Any& _oValue)
}
catch (uno::Exception& )
{
- DebugHelper::basicexception(ERRCODE_BASIC_METHOD_FAILED, "No cells were found");
+ DebugHelper::basicexception(ERRCODE_BASIC_METHOD_FAILED, u"No cells were found");
}
return xRange;
}
diff --git a/sc/source/ui/vba/vbastyle.cxx b/sc/source/ui/vba/vbastyle.cxx
index cf0012b45371..3bdf2ad24279 100644
--- a/sc/source/ui/vba/vbastyle.cxx
+++ b/sc/source/ui/vba/vbastyle.cxx
@@ -48,7 +48,7 @@ lcl_getStyleProps( const OUString& sStyleName, const uno::Reference< frame::XMod
void ScVbaStyle::initialise()
{
if (!mxModel.is() )
- DebugHelper::basicexception(ERRCODE_BASIC_METHOD_FAILED, "XModel Interface could not be retrieved" );
+ DebugHelper::basicexception(ERRCODE_BASIC_METHOD_FAILED, u"XModel Interface could not be retrieved" );
uno::Reference< lang::XServiceInfo > xServiceInfo( mxPropertySet, uno::UNO_QUERY_THROW );
if ( !xServiceInfo->supportsService("com.sun.star.style.CellStyle") )
{
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index 50d8f32334b1..ca90f26daaa8 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -1115,7 +1115,7 @@ SdrObject* ScDrawView::ApplyGraphicToObject(
const Graphic& rGraphic,
const OUString& rBeginUndoText,
const OUString& rFile,
- const OUString& rFilter)
+ std::u16string_view rFilter)
{
if(dynamic_cast< SdrGrafObj* >(&rHitObject))
{
@@ -1126,7 +1126,7 @@ SdrObject* ScDrawView::ApplyGraphicToObject(
ReplaceObjectAtView(&rHitObject, *GetSdrPageView(), pNewGrafObj);
// set in all cases - the Clone() will have copied an existing link (!)
- pNewGrafObj->SetGraphicLink( rFile, ""/*TODO?*/, rFilter );
+ pNewGrafObj->SetGraphicLink( rFile, u""/*TODO?*/, rFilter );
EndUndo();
return pNewGrafObj;
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 5354391fcaa1..5c31f4dbbb9d 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -788,7 +788,7 @@ bool ScViewFunc::PasteOnDrawObjectLinked(
const OUString aBeginUndo(ScResId(STR_UNDO_DRAGDROP));
- if(pScDrawView->ApplyGraphicToObject( rHitObj, aGraphic, aBeginUndo, "", "" ))
+ if(pScDrawView->ApplyGraphicToObject( rHitObj, aGraphic, aBeginUndo, "", u"" ))
{
return true;
}
@@ -803,7 +803,7 @@ bool ScViewFunc::PasteOnDrawObjectLinked(
{
const OUString aBeginUndo(ScResId(STR_UNDO_DRAGDROP));
- if(pScDrawView->ApplyGraphicToObject( rHitObj, Graphic(aMtf), aBeginUndo, "", "" ))
+ if(pScDrawView->ApplyGraphicToObject( rHitObj, Graphic(aMtf), aBeginUndo, "", u"" ))
{
return true;
}
@@ -818,7 +818,7 @@ bool ScViewFunc::PasteOnDrawObjectLinked(
{
const OUString aBeginUndo(ScResId(STR_UNDO_DRAGDROP));
- if(pScDrawView->ApplyGraphicToObject( rHitObj, Graphic(aBmpEx), aBeginUndo, "", "" ))
+ if(pScDrawView->ApplyGraphicToObject( rHitObj, Graphic(aBmpEx), aBeginUndo, "", u"" ))
{
return true;
}
diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx
index a59fa3ab0144..7d85cecbd4e4 100644
--- a/sc/source/ui/view/viewfun7.cxx
+++ b/sc/source/ui/view/viewfun7.cxx
@@ -365,17 +365,17 @@ bool ScViewFunc::PasteObject( const Point& rPos, const uno::Reference < embed::X
bool ScViewFunc::PasteBitmapEx( const Point& rPos, const BitmapEx& rBmpEx )
{
Graphic aGraphic(rBmpEx);
- return PasteGraphic( rPos, aGraphic, "", "" );
+ return PasteGraphic( rPos, aGraphic, "", u"" );
}
bool ScViewFunc::PasteMetaFile( const Point& rPos, const GDIMetaFile& rMtf )
{
Graphic aGraphic(rMtf);
- return PasteGraphic( rPos, aGraphic, "", "" );
+ return PasteGraphic( rPos, aGraphic, "", u"" );
}
bool ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic,
- const OUString& rFile, const OUString& rFilter )
+ const OUString& rFile, std::u16string_view rFilter )
{
MakeDrawLayer();
ScDrawView* pScDrawView = GetScDrawView();
@@ -448,7 +448,7 @@ bool ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic,
// otherwise an empty graphic is swapped in and the contact stuff crashes.
// See #i37444#.
if (bSuccess && !rFile.isEmpty())
- pGrafObj->SetGraphicLink( rFile, ""/*TODO?*/, rFilter );
+ pGrafObj->SetGraphicLink( rFile, u""/*TODO?*/, rFilter );
return bSuccess;
}