diff options
author | Noel <noelgrandin@gmail.com> | 2020-11-13 14:29:59 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-17 09:57:35 +0100 |
commit | 8ef6067596cf4b2c52fbce94b44bf7af9fefa643 (patch) | |
tree | f4cca1a99ba97683b14fa6fe0f1f45f75bf855c2 /sc/source/ui | |
parent | 75bada928cf08d2afc6efe52ba99b45088bc9eec (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/source/ui')
22 files changed, 57 insertions, 57 deletions
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; } |