summaryrefslogtreecommitdiff
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
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>
-rw-r--r--UnoControls/source/controls/progressmonitor.cxx12
-rw-r--r--UnoControls/source/inc/progressmonitor.hxx4
-rw-r--r--accessibility/inc/standard/vclxaccessiblelist.hxx2
-rw-r--r--accessibility/source/standard/vclxaccessiblelist.cxx2
-rw-r--r--basic/inc/sbxform.hxx2
-rw-r--r--basic/source/basmgr/basmgr.cxx12
-rw-r--r--basic/source/classes/codecompletecache.cxx4
-rw-r--r--basic/source/classes/sb.cxx2
-rw-r--r--basic/source/sbx/sbxform.cxx2
-rw-r--r--compilerplugins/clang/stringviewparam.cxx53
-rw-r--r--cui/source/customize/SvxConfigPageHelper.cxx2
-rw-r--r--cui/source/inc/SvxConfigPageHelper.hxx2
-rw-r--r--dbaccess/inc/core_resource.hxx6
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.hxx2
-rw-r--r--dbaccess/source/core/dataaccess/databaseregistrations.cxx6
-rw-r--r--dbaccess/source/core/resource/core_resource.cxx6
-rw-r--r--dbaccess/source/ui/dlg/generalpage.cxx4
-rw-r--r--dbaccess/source/ui/dlg/generalpage.hxx2
-rw-r--r--dbaccess/source/ui/inc/WCopyTable.hxx2
-rw-r--r--dbaccess/source/ui/misc/WCopyTable.cxx2
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx4
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.hxx4
-rw-r--r--desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx2
-rw-r--r--desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx2
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx4
-rw-r--r--editeng/source/editeng/impedit.hxx2
-rw-r--r--editeng/source/editeng/impedit4.cxx2
-rw-r--r--filter/source/msfilter/escherex.cxx4
-rw-r--r--filter/source/msfilter/msdffimp.cxx2
-rw-r--r--fpicker/source/office/autocmpledit.cxx2
-rw-r--r--fpicker/source/office/autocmpledit.hxx2
-rw-r--r--fpicker/source/office/fileview.cxx4
-rw-r--r--framework/inc/addonmenu.hxx2
-rw-r--r--framework/inc/uielement/toolbarmerger.hxx10
-rw-r--r--framework/inc/uifactory/menubarfactory.hxx2
-rw-r--r--framework/source/fwe/classes/addonmenu.cxx4
-rw-r--r--framework/source/uielement/popuptoolbarcontroller.cxx6
-rw-r--r--framework/source/uielement/toolbarmerger.cxx10
-rw-r--r--framework/source/uifactory/menubarfactory.cxx4
-rw-r--r--framework/source/uifactory/statusbarfactory.cxx2
-rw-r--r--framework/source/uifactory/toolbarfactory.cxx2
-rw-r--r--i18nutil/source/utility/scripttypedetector.cxx4
-rw-r--r--idl/inc/database.hxx2
-rw-r--r--idl/source/prj/database.cxx2
-rw-r--r--include/basic/basmgr.hxx8
-rw-r--r--include/basic/codecompletecache.hxx4
-rw-r--r--include/basic/sbstar.hxx2
-rw-r--r--include/i18nutil/scripttypedetector.hxx4
-rw-r--r--include/oox/core/contexthandler.hxx2
-rw-r--r--include/oox/core/relations.hxx8
-rw-r--r--include/sfx2/frmdescr.hxx2
-rw-r--r--include/sfx2/sfxhelp.hxx2
-rw-r--r--include/sfx2/templatelocalview.hxx2
-rw-r--r--include/svx/ActionDescriptionProvider.hxx2
-rw-r--r--include/svx/svdograf.hxx2
-rw-r--r--include/test/sheet/xspreadsheets2.hxx2
-rw-r--r--include/unotools/localedatawrapper.hxx2
-rw-r--r--include/unotools/textsearch.hxx2
-rw-r--r--include/vbahelper/vbahelper.hxx6
-rw-r--r--include/vcl/GraphicNativeTransform.hxx2
-rw-r--r--include/vcl/GraphicObject.hxx2
-rw-r--r--include/vcl/graphicfilter.hxx38
-rw-r--r--include/xmloff/formlayerimport.hxx4
-rw-r--r--oox/source/core/contexthandler.cxx2
-rw-r--r--oox/source/core/relations.cxx4
-rw-r--r--reportdesign/source/ui/inc/GeometryHandler.hxx2
-rw-r--r--reportdesign/source/ui/inspection/GeometryHandler.cxx2
-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
-rw-r--r--sd/inc/sdfilter.hxx2
-rw-r--r--sd/source/filter/eppt/epptbase.hxx2
-rw-r--r--sd/source/filter/eppt/pptx-text.cxx2
-rw-r--r--sd/source/filter/ppt/pptinanimations.cxx2
-rw-r--r--sd/source/filter/ppt/pptinanimations.hxx2
-rw-r--r--sd/source/filter/sdfilter.cxx2
-rw-r--r--sd/source/ui/animations/CustomAnimationDialog.cxx4
-rw-r--r--sd/source/ui/view/sdview4.cxx2
-rw-r--r--sfx2/source/appl/sfxhelp.cxx2
-rw-r--r--sfx2/source/control/templatelocalview.cxx2
-rw-r--r--sfx2/source/control/templatesearchview.cxx2
-rw-r--r--sfx2/source/doc/frmdescr.cxx2
-rw-r--r--sfx2/source/inc/templatesearchview.hxx2
-rw-r--r--slideshow/source/engine/shapes/viewmediashape.cxx2
-rw-r--r--slideshow/source/engine/shapes/viewmediashape.hxx2
-rw-r--r--svx/source/svdraw/ActionDescriptionProvider.cxx2
-rw-r--r--svx/source/svdraw/svdograf.cxx2
-rw-r--r--svx/source/xoutdev/_xoutbmp.cxx8
-rw-r--r--sw/source/filter/html/swhtml.hxx12
-rw-r--r--test/source/sheet/xspreadsheets2.cxx2
-rw-r--r--unotools/source/i18n/localedatawrapper.cxx4
-rw-r--r--unotools/source/i18n/textsearch.cxx6
-rw-r--r--vbahelper/source/msforms/vbalistcontrolhelper.cxx4
-rw-r--r--vbahelper/source/msforms/vbalistcontrolhelper.hxx2
-rw-r--r--vbahelper/source/vbahelper/vbahelper.cxx6
-rw-r--r--vcl/inc/graphic/Manager.hxx3
-rw-r--r--vcl/inc/unx/gtk/gtksalmenu.hxx2
-rw-r--r--vcl/qa/cppunit/GraphicDescriptorTest.cxx8
-rw-r--r--vcl/qa/cppunit/GraphicTest.cxx18
-rw-r--r--vcl/qa/cppunit/graphicfilter/filters-test.cxx10
-rw-r--r--vcl/source/filter/FilterConfigCache.cxx16
-rw-r--r--vcl/source/filter/FilterConfigCache.hxx16
-rw-r--r--vcl/source/filter/GraphicNativeTransform.cxx8
-rw-r--r--vcl/source/filter/graphicfilter.cxx22
-rw-r--r--vcl/source/graphic/GraphicObject.cxx2
-rw-r--r--vcl/source/graphic/Manager.cxx16
-rw-r--r--vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx2
-rw-r--r--vcl/unx/gtk3/fpicker/SalGtkFilePicker.hxx2
-rw-r--r--vcl/unx/gtk3/gtk3gtksalmenu.cxx4
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx4
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.hxx2
-rw-r--r--xmloff/source/draw/ximppage.cxx2
-rw-r--r--xmloff/source/forms/formlayerimport.cxx4
-rw-r--r--xmloff/source/table/XMLTableImport.cxx4
-rw-r--r--xmloff/source/text/txtimp.cxx2
-rw-r--r--xmlsecurity/inc/macrosecurity.hxx2
-rw-r--r--xmlsecurity/source/dialogs/macrosecurity.cxx2
149 files changed, 376 insertions, 326 deletions
diff --git a/UnoControls/source/controls/progressmonitor.cxx b/UnoControls/source/controls/progressmonitor.cxx
index 905213b1e8e5..cabbdc1e4204 100644
--- a/UnoControls/source/controls/progressmonitor.cxx
+++ b/UnoControls/source/controls/progressmonitor.cxx
@@ -831,21 +831,21 @@ IMPL_TextlistItem* ProgressMonitor::impl_searchTopic ( const OUString& rTopic, b
// addText, updateText
bool ProgressMonitor::impl_debug_checkParameter (
- const OUString& rTopic,
- const OUString& rText
+ std::u16string_view rTopic,
+ std::u16string_view rText
) {
- if ( rTopic.isEmpty() ) return false; // ""
+ if ( rTopic.empty() ) return false; // ""
- if ( rText.isEmpty() ) return false; // ""
+ if ( rText.empty() ) return false; // ""
// Parameter OK ... return true.
return true;
}
// removeText
-bool ProgressMonitor::impl_debug_checkParameter ( const OUString& rTopic )
+bool ProgressMonitor::impl_debug_checkParameter ( std::u16string_view rTopic )
{
- if ( rTopic.isEmpty() ) return false; // ""
+ if ( rTopic.empty() ) return false; // ""
// Parameter OK ... return true.
return true;
diff --git a/UnoControls/source/inc/progressmonitor.hxx b/UnoControls/source/inc/progressmonitor.hxx
index 4f407eeda2e6..ad4accba562d 100644
--- a/UnoControls/source/inc/progressmonitor.hxx
+++ b/UnoControls/source/inc/progressmonitor.hxx
@@ -223,8 +223,8 @@ private:
// debug methods
- static bool impl_debug_checkParameter( const OUString& sTopic, const OUString& sText ); // addText, updateText
- static bool impl_debug_checkParameter( const OUString& rTopic ); // removeText
+ static bool impl_debug_checkParameter( std::u16string_view sTopic, std::u16string_view sText ); // addText, updateText
+ static bool impl_debug_checkParameter( std::u16string_view rTopic ); // removeText
// private variables
diff --git a/accessibility/inc/standard/vclxaccessiblelist.hxx b/accessibility/inc/standard/vclxaccessiblelist.hxx
index 05c432301c20..7d05067b0aa6 100644
--- a/accessibility/inc/standard/vclxaccessiblelist.hxx
+++ b/accessibility/inc/standard/vclxaccessiblelist.hxx
@@ -118,7 +118,7 @@ public:
bool IsInDropDown() const;
void HandleDropOpen();
void ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent, bool b_IsDropDownList);
- void UpdateSelection_Acc (const OUString& sTextOfSelectedItem, bool b_IsDropDownList);
+ void UpdateSelection_Acc (std::u16string_view sTextOfSelectedItem, bool b_IsDropDownList);
void UpdateSelection_Impl_Acc (bool b_IsDropDownList);
static void NotifyListItem(css::uno::Any const & val);
diff --git a/accessibility/source/standard/vclxaccessiblelist.cxx b/accessibility/source/standard/vclxaccessiblelist.cxx
index b64b10bb8cb9..ecb3274d0b0e 100644
--- a/accessibility/source/standard/vclxaccessiblelist.cxx
+++ b/accessibility/source/standard/vclxaccessiblelist.cxx
@@ -174,7 +174,7 @@ void VCLXAccessibleList::notifyVisibleStates(bool _bSetNew )
}
}
-void VCLXAccessibleList::UpdateSelection_Acc (const OUString& /*sTextOfSelectedItem*/, bool b_IsDropDownList)
+void VCLXAccessibleList::UpdateSelection_Acc (std::u16string_view /*sTextOfSelectedItem*/, bool b_IsDropDownList)
{
if ( m_aBoxType != COMBOBOX )
return;
diff --git a/basic/inc/sbxform.hxx b/basic/inc/sbxform.hxx
index 94dece69832c..8173c8ed87b7 100644
--- a/basic/inc/sbxform.hxx
+++ b/basic/inc/sbxform.hxx
@@ -103,7 +103,7 @@ class SbxBasicFormater {
void LeftShiftDecimalPoint( OUStringBuffer& sStrg );
void StrRoundDigit( OUStringBuffer& sStrg, short nPos, bool& bOverflow );
void StrRoundDigit( OUStringBuffer& sStrg, short nPos );
- static void ParseBack( OUStringBuffer& sStrg, const OUString& sFormatStrg,
+ static void ParseBack( OUStringBuffer& sStrg, std::u16string_view sFormatStrg,
short nFormatPos );
// Methods for string conversion with sprintf():
void InitScan( double _dNum );
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index d1d4b86565b7..50ff14effade 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -126,7 +126,7 @@ public:
static void insertLibraryImpl( const uno::Reference< script::XLibraryContainer >& xScriptCont, BasicManager* pMgr,
const uno::Any& aLibAny, const OUString& aLibName );
static void addLibraryModulesImpl( BasicManager const * pMgr, const uno::Reference< container::XNameAccess >& xLibNameAccess,
- const OUString& aLibName );
+ std::u16string_view aLibName );
// XEventListener
@@ -172,7 +172,7 @@ void BasMgrContainerListenerImpl::insertLibraryImpl( const uno::Reference< scrip
void BasMgrContainerListenerImpl::addLibraryModulesImpl( BasicManager const * pMgr,
- const uno::Reference< container::XNameAccess >& xLibNameAccess, const OUString& aLibName )
+ const uno::Reference< container::XNameAccess >& xLibNameAccess, std::u16string_view aLibName )
{
uno::Sequence< OUString > aModuleNames = xLibNameAccess->getElementNames();
sal_Int32 nModuleCount = aModuleNames.getLength();
@@ -823,7 +823,7 @@ BasicManager::~BasicManager()
Broadcast( SfxHint( SfxHintId::Dying) );
}
-bool BasicManager::HasExeCode( const OUString& sLib )
+bool BasicManager::HasExeCode( std::u16string_view sLib )
{
StarBASIC* pLib = GetLib(sLib);
if ( pLib )
@@ -1199,7 +1199,7 @@ StarBASIC* BasicManager::GetStdLib() const
return pLib;
}
-StarBASIC* BasicManager::GetLib( const OUString& rName ) const
+StarBASIC* BasicManager::GetLib( std::u16string_view rName ) const
{
for (auto const& rpLib : mpImpl->aLibs)
{
@@ -1211,7 +1211,7 @@ StarBASIC* BasicManager::GetLib( const OUString& rName ) const
return nullptr;
}
-sal_uInt16 BasicManager::GetLibId( const OUString& rName ) const
+sal_uInt16 BasicManager::GetLibId( std::u16string_view rName ) const
{
for (size_t i = 0; i < mpImpl->aLibs.size(); i++)
{
@@ -1223,7 +1223,7 @@ sal_uInt16 BasicManager::GetLibId( const OUString& rName ) const
return LIB_NOTFOUND;
}
-bool BasicManager::HasLib( const OUString& rName ) const
+bool BasicManager::HasLib( std::u16string_view rName ) const
{
for (const auto& rpLib : mpImpl->aLibs)
{
diff --git a/basic/source/classes/codecompletecache.cxx b/basic/source/classes/codecompletecache.cxx
index 4c0d3523a86e..e2993c28581a 100644
--- a/basic/source/classes/codecompletecache.cxx
+++ b/basic/source/classes/codecompletecache.cxx
@@ -147,7 +147,7 @@ void CodeCompleteDataCache::InsertLocalVar( const OUString& sProcName, const OUS
}
}
-OUString CodeCompleteDataCache::GetVarType( const OUString& sVarName ) const
+OUString CodeCompleteDataCache::GetVarType( std::u16string_view sVarName ) const
{
for (auto const& varScope : aVarScopes)
{
@@ -169,7 +169,7 @@ OUString CodeCompleteDataCache::GetVarType( const OUString& sVarName ) const
return OUString(); //not found
}
-OUString CodeCompleteDataCache::GetCorrectCaseVarName( const OUString& sVarName, const OUString& sActProcName ) const
+OUString CodeCompleteDataCache::GetCorrectCaseVarName( std::u16string_view sVarName, std::u16string_view sActProcName ) const
{
for (auto const& varScope : aVarScopes)
{
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 6ae3692cc833..f8426f4e1a7f 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -1086,7 +1086,7 @@ void StarBASIC::Clear()
pModules.clear();
}
-SbModule* StarBASIC::FindModule( const OUString& rName )
+SbModule* StarBASIC::FindModule( std::u16string_view rName )
{
for (const auto& pModule: pModules)
{
diff --git a/basic/source/sbx/sbxform.cxx b/basic/source/sbx/sbxform.cxx
index 85374facd545..052a2dcc159e 100644
--- a/basic/source/sbx/sbxform.cxx
+++ b/basic/source/sbx/sbxform.cxx
@@ -214,7 +214,7 @@ void SbxBasicFormater::StrRoundDigit( OUStringBuffer& sStrg, short nPos )
StrRoundDigit( sStrg, nPos, bOverflow );
}
-void SbxBasicFormater::ParseBack( OUStringBuffer& sStrg, const OUString& sFormatStrg,
+void SbxBasicFormater::ParseBack( OUStringBuffer& sStrg, std::u16string_view sFormatStrg,
short nFormatPos )
{
for( sal_Int32 i = nFormatPos;
diff --git a/compilerplugins/clang/stringviewparam.cxx b/compilerplugins/clang/stringviewparam.cxx
index c0c720f06df5..76c34cd2adb9 100644
--- a/compilerplugins/clang/stringviewparam.cxx
+++ b/compilerplugins/clang/stringviewparam.cxx
@@ -158,6 +158,7 @@ DeclRefExpr const* relevantCXXMemberCallExpr(CXXMemberCallExpr const* expr)
DeclRefExpr const* relevantCXXOperatorCallExpr(CXXOperatorCallExpr const* expr)
{
+ // TODO OO_EqualEqual and similar
if (expr->getOperator() != OO_Subscript)
{
return nullptr;
@@ -221,6 +222,48 @@ public:
return ret;
}
+ // TODO Need to duplicate this method for CXXConstructorDecl
+ bool TraverseCXXMethodDecl(CXXMethodDecl* decl)
+ {
+ if (ignoreLocation(decl))
+ {
+ return true;
+ }
+ if (!relevantFunctionDecl(decl))
+ {
+ return FunctionAddress::TraverseCXXMethodDecl(decl);
+ }
+ auto const oldParams = currentParams_;
+ auto const n = decl->getNumParams();
+ for (unsigned i = 0; i != n; ++i)
+ {
+ auto const d = decl->getParamDecl(i);
+ if (relevantParmVarDecl(d))
+ {
+ currentParams_.insert(d);
+ }
+ }
+ auto const ret = FunctionAddress::TraverseCXXMethodDecl(decl);
+ if (ret)
+ {
+ for (unsigned i = 0; i != n; ++i)
+ {
+ auto const d1 = decl->getParamDecl(i);
+ if (currentParams_.find(d1) == currentParams_.end())
+ {
+ continue;
+ }
+ if (containsPreprocessingConditionalInclusion(decl->getSourceRange()))
+ {
+ break;
+ }
+ badParams_.push_back(d1);
+ }
+ }
+ currentParams_ = oldParams;
+ return ret;
+ }
+
bool TraverseImplicitCastExpr(ImplicitCastExpr* expr)
{
if (ignoreLocation(expr))
@@ -300,6 +343,12 @@ private:
{
return;
}
+ StringRef fn(handler.getMainFileName());
+ // leave the string QA tests alone
+ if (loplugin::hasPathnamePrefix(fn, SRCDIR "/sal/qa/"))
+ {
+ return;
+ }
if (!TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()))
{
return;
@@ -346,6 +395,10 @@ private:
return false;
}
}
+ if (decl->isOverloadedOperator()) // e.g. operator()(const OUString&, const OUString&)
+ {
+ return false;
+ }
if (decl->isFunctionTemplateSpecialization())
{
return false;
diff --git a/cui/source/customize/SvxConfigPageHelper.cxx b/cui/source/customize/SvxConfigPageHelper.cxx
index d54bb7cdaf1a..468441a6d7cc 100644
--- a/cui/source/customize/SvxConfigPageHelper.cxx
+++ b/cui/source/customize/SvxConfigPageHelper.cxx
@@ -45,7 +45,7 @@ void SvxConfigPageHelper::RemoveEntry(SvxEntries* pEntries, SvxConfigEntry const
}
OUString SvxConfigPageHelper::replaceSaveInName(const OUString& rMessage,
- const OUString& rSaveInName)
+ std::u16string_view rSaveInName)
{
OUString name = rMessage.replaceFirst("%SAVE IN SELECTION%", rSaveInName);
diff --git a/cui/source/inc/SvxConfigPageHelper.hxx b/cui/source/inc/SvxConfigPageHelper.hxx
index 797ff74c9a5e..9a53af2651aa 100644
--- a/cui/source/inc/SvxConfigPageHelper.hxx
+++ b/cui/source/inc/SvxConfigPageHelper.hxx
@@ -28,7 +28,7 @@ class SvxConfigPageHelper
public:
static void RemoveEntry(SvxEntries* pEntries, SvxConfigEntry const* pChildEntry);
- static OUString replaceSaveInName(const OUString& rMessage, const OUString& rSaveInName);
+ static OUString replaceSaveInName(const OUString& rMessage, std::u16string_view rSaveInName);
static OUString stripHotKey(const OUString& str);
static OUString replaceSixteen(const OUString& str, sal_Int32 nReplacement);
diff --git a/dbaccess/inc/core_resource.hxx b/dbaccess/inc/core_resource.hxx
index 8cddf133f029..0e1e80ee3efd 100644
--- a/dbaccess/inc/core_resource.hxx
+++ b/dbaccess/inc/core_resource.hxx
@@ -54,7 +54,7 @@ namespace dbaccess
static OUString loadString(
const char* pResId,
const char* _pPlaceholderAscii,
- const OUString& _rReplace
+ std::u16string_view _rReplace
);
/** loads a string from the resource file, substituting two placeholders with given strings
@@ -73,9 +73,9 @@ namespace dbaccess
static OUString loadString(
const char* pResId,
const char* _pPlaceholderAscii1,
- const OUString& _rReplace1,
+ std::u16string_view _rReplace1,
const char* _pPlaceholderAscii2,
- const OUString& _rReplace2
+ std::u16string_view _rReplace2
);
};
}
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 4e9bde5f31d2..1cb595279f20 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -991,7 +991,7 @@ void SAL_CALL ODatabaseDocument::store( )
}
}
-void ODatabaseDocument::impl_throwIOExceptionCausedBySave_throw( const Any& i_rError, const OUString& i_rTargetURL ) const
+void ODatabaseDocument::impl_throwIOExceptionCausedBySave_throw( const Any& i_rError, std::u16string_view i_rTargetURL ) const
{
OUString sErrorMessage = extractExceptionMessage( m_pImpl->m_aContext, i_rError );
sErrorMessage = ResourceManager::loadString(
diff --git a/dbaccess/source/core/dataaccess/databasedocument.hxx b/dbaccess/source/core/dataaccess/databasedocument.hxx
index 1ed509c27d60..6ce35092ea5b 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.hxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.hxx
@@ -625,7 +625,7 @@ private:
*/
void impl_throwIOExceptionCausedBySave_throw(
const css::uno::Any& i_rError,
- const OUString& i_rTargetURL
+ std::u16string_view i_rTargetURL
) const;
};
diff --git a/dbaccess/source/core/dataaccess/databaseregistrations.cxx b/dbaccess/source/core/dataaccess/databaseregistrations.cxx
index c147f99ec694..3e9b59551546 100644
--- a/dbaccess/source/core/dataaccess/databaseregistrations.cxx
+++ b/dbaccess/source/core/dataaccess/databaseregistrations.cxx
@@ -94,7 +94,7 @@ namespace dbaccess
private:
void
- impl_checkValidName_common(const OUString& _rName);
+ impl_checkValidName_common(std::u16string_view _rName);
::utl::OConfigurationNode
impl_checkValidName_throw_must_exist(const OUString& _rName);
::utl::OConfigurationNode
@@ -201,12 +201,12 @@ namespace dbaccess
return aNewNode;
}
- void DatabaseRegistrations::impl_checkValidName_common(const OUString& _rName)
+ void DatabaseRegistrations::impl_checkValidName_common(std::u16string_view _rName)
{
if ( !m_aConfigurationRoot.isValid() )
throw RuntimeException( OUString(), *this );
- if ( _rName.isEmpty() )
+ if ( _rName.empty() )
throw IllegalArgumentException( OUString(), *this, 1 );
}
diff --git a/dbaccess/source/core/resource/core_resource.cxx b/dbaccess/source/core/resource/core_resource.cxx
index 34ab1b0ba829..cecf7d3b4773 100644
--- a/dbaccess/source/core/resource/core_resource.cxx
+++ b/dbaccess/source/core/resource/core_resource.cxx
@@ -38,14 +38,14 @@ namespace dbaccess
return Translate::get(pResId, Translate::Create("dba"));
}
- OUString ResourceManager::loadString(const char* pResId, const char* _pPlaceholderAscii, const OUString& _rReplace)
+ OUString ResourceManager::loadString(const char* pResId, const char* _pPlaceholderAscii, std::u16string_view _rReplace)
{
OUString sString(loadString(pResId));
return sString.replaceFirst( OUString::createFromAscii(_pPlaceholderAscii), _rReplace );
}
- OUString ResourceManager::loadString(const char* pResId, const char* _pPlaceholderAscii1, const OUString& _rReplace1,
- const char* _pPlaceholderAscii2, const OUString& _rReplace2)
+ OUString ResourceManager::loadString(const char* pResId, const char* _pPlaceholderAscii1, std::u16string_view _rReplace1,
+ const char* _pPlaceholderAscii2, std::u16string_view _rReplace2)
{
OUString sString(loadString(pResId));
sString = sString.replaceFirst( OUString::createFromAscii(_pPlaceholderAscii1), _rReplace1 );
diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx
index 37ac9c5c1ae5..d61032fd4919 100644
--- a/dbaccess/source/ui/dlg/generalpage.cxx
+++ b/dbaccess/source/ui/dlg/generalpage.cxx
@@ -171,10 +171,10 @@ namespace dbaui
{
}
- void OGeneralPage::switchMessage(const OUString& _sURLPrefix)
+ void OGeneralPage::switchMessage(std::u16string_view _sURLPrefix)
{
SPECIAL_MESSAGE eMessage = smNone;
- if ( _sURLPrefix.isEmpty()/*_eType == m_eNotSupportedKnownType*/ )
+ if ( _sURLPrefix.empty()/*_eType == m_eNotSupportedKnownType*/ )
{
eMessage = smUnsupportedType;
}
diff --git a/dbaccess/source/ui/dlg/generalpage.hxx b/dbaccess/source/ui/dlg/generalpage.hxx
index 68e7a90cbfa0..452817a056cf 100644
--- a/dbaccess/source/ui/dlg/generalpage.hxx
+++ b/dbaccess/source/ui/dlg/generalpage.hxx
@@ -90,7 +90,7 @@ namespace dbaui
void implSetCurrentType( const OUString& _eType );
- void switchMessage(const OUString& _sURLPrefix);
+ void switchMessage(std::u16string_view _sURLPrefix);
/// sets the title of the parent dialog
virtual void setParentTitle( const OUString& _sURLPrefix );
diff --git a/dbaccess/source/ui/inc/WCopyTable.hxx b/dbaccess/source/ui/inc/WCopyTable.hxx
index 6307234e89de..1d650d7a6171 100644
--- a/dbaccess/source/ui/inc/WCopyTable.hxx
+++ b/dbaccess/source/ui/inc/WCopyTable.hxx
@@ -402,7 +402,7 @@ namespace dbaui
OUString createUniqueName(const OUString& _sName);
// displays an error message that a column type is not supported
- void showColumnTypeNotSupported(const OUString& _rColumnName);
+ void showColumnTypeNotSupported(std::u16string_view _rColumnName);
void removeColumnNameFromNameMap(const OUString& _sName);
void showError(const OUString& _sErrorMessage);
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index 373a17907952..9c92f1301c71 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -1525,7 +1525,7 @@ OUString OCopyTableWizard::createUniqueName(const OUString& _sName)
return sName;
}
-void OCopyTableWizard::showColumnTypeNotSupported(const OUString& _rColumnName)
+void OCopyTableWizard::showColumnTypeNotSupported(std::u16string_view _rColumnName)
{
OUString sMessage( DBA_RES( STR_UNKNOWN_TYPE_FOUND ) );
sMessage = sMessage.replaceFirst("#1",_rColumnName);
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index da8106bcc3e3..ca2d23fff9a6 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -362,7 +362,7 @@ void DialogHelper::openWebBrowser(const OUString& sURL, const OUString& sTitle)
}
}
-bool DialogHelper::installExtensionWarn(const OUString &rExtensionName)
+bool DialogHelper::installExtensionWarn(std::u16string_view rExtensionName)
{
const SolarMutexGuard guard;
@@ -535,7 +535,7 @@ void ExtMgrDialog::checkEntries()
m_xExtensionBox->checkEntries();
}
-bool ExtMgrDialog::removeExtensionWarn(const OUString &rExtensionName)
+bool ExtMgrDialog::removeExtensionWarn(std::u16string_view rExtensionName)
{
const SolarMutexGuard guard;
incBusy();
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
index 09f2a2e42a9f..fe0a953dc213 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
@@ -82,7 +82,7 @@ public:
void incBusy() { m_aBusy.incBusy(m_pWindow); }
void decBusy() { m_aBusy.decBusy(); }
bool isBusy() const { return m_aBusy.isBusy(); }
- bool installExtensionWarn(const OUString &rExtensionURL);
+ bool installExtensionWarn(std::u16string_view rExtensionURL);
bool installForAllUsers(bool &bInstallForAll);
};
@@ -123,7 +123,7 @@ class ExtMgrDialog : public weld::GenericDialogController
std::unique_ptr<weld::ProgressBar> m_xProgressBar;
std::unique_ptr<weld::Button> m_xCancelBtn;
- bool removeExtensionWarn(const OUString &rExtensionTitle);
+ bool removeExtensionWarn(std::u16string_view rExtensionTitle);
DECL_LINK( HandleOptionsBtn, weld::Button&, void );
DECL_LINK( HandleAddBtn, weld::Button&, void );
diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
index f38a853de71f..bf15f687f0dd 100644
--- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
@@ -232,7 +232,7 @@ void UpdateInstallDialog::updateDone()
// make sure the solar mutex is locked before calling
//sets an error message in the text area
-void UpdateInstallDialog::setError(INSTALL_ERROR err, OUString const & sExtension,
+void UpdateInstallDialog::setError(INSTALL_ERROR err, std::u16string_view sExtension,
OUString const & exceptionMessage)
{
OUString sError;
diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx
index 1acfd85508d2..7e970f7b346c 100644
--- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx
+++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx
@@ -78,7 +78,7 @@ private:
ERROR_INSTALLATION,
ERROR_LICENSE_DECLINED
};
- void setError(INSTALL_ERROR err, OUString const & sExtension, OUString const & exceptionMessage);
+ void setError(INSTALL_ERROR err, std::u16string_view sExtension, OUString const & exceptionMessage);
void setError(OUString const & exceptionMessage);
const css::uno::Reference< css::deployment::XExtensionManager >& getExtensionManager() const
{ return m_xExtensionManager; }
diff --git a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
index 060d2918fb50..98a957c014e8 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
@@ -64,7 +64,7 @@ class CommandEnvironmentImpl
/// @throws RuntimeException
void update_( Any const & Status );
- void printLicense(const OUString & sName,const OUString& sLicense,
+ void printLicense(std::u16string_view sName,const OUString& sLicense,
bool & accept, bool & decline);
public:
@@ -125,7 +125,7 @@ CommandEnvironmentImpl::~CommandEnvironmentImpl()
//May throw exceptions
void CommandEnvironmentImpl::printLicense(
- const OUString & sName, const OUString& sLicense, bool & accept, bool &decline)
+ std::u16string_view sName, const OUString& sLicense, bool & accept, bool &decline)
{
OUString s1tmp(DpResId(RID_STR_UNOPKG_ACCEPT_LIC_1));
OUString s1(s1tmp.replaceAll("$NAME", sName));
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index dc28f3db2a65..3adffe49b1eb 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -1074,7 +1074,7 @@ public:
void SetAutoCompleteText(const OUString& rStr, bool bUpdateTipWindow);
EditSelection TransliterateText( const EditSelection& rSelection, TransliterationFlags nTransliterationMode );
- short ReplaceTextOnly( ContentNode* pNode, sal_Int32 nCurrentStart, const OUString& rText, const css::uno::Sequence< sal_Int32 >& rOffsets );
+ short ReplaceTextOnly( ContentNode* pNode, sal_Int32 nCurrentStart, std::u16string_view rText, const css::uno::Sequence< sal_Int32 >& rOffsets );
void SetAsianCompressionMode( CharCompressType n );
CharCompressType GetAsianCompressionMode() const { return nAsianCompressionMode; }
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index cdb2995acc43..e42a36c5e826 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -2975,7 +2975,7 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
short ImpEditEngine::ReplaceTextOnly(
ContentNode* pNode,
sal_Int32 nCurrentStart,
- const OUString& rNewText,
+ std::u16string_view rNewText,
const uno::Sequence< sal_Int32 >& rOffsets )
{
// Change text without losing the attributes
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index ce03064a89c0..505e43d91fc1 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -4195,7 +4195,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, GraphicObjec
const char* const pString = "MSOFFICE9.0";
aGIFStream.WriteBytes(pString, strlen(pString));
nErrCode = rFilter.ExportGraphic( aGraphic, OUString(), aGIFStream,
- rFilter.GetExportFormatNumberForShortName( "GIF" ) );
+ rFilter.GetExportFormatNumberForShortName( u"GIF" ) );
SAL_WARN_IF(
nErrCode != ERRCODE_NONE, "filter.ms",
"ExportGraphic to GIF failed with " << nErrCode);
@@ -4216,7 +4216,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, GraphicObjec
aFilterProp.Value <<= aAdditionalChunkSequence;
aFilterData[ 0 ] = aFilterProp;
nErrCode = rFilter.ExportGraphic( aGraphic, OUString(), aStream,
- rFilter.GetExportFormatNumberForShortName( "PNG" ), &aFilterData );
+ rFilter.GetExportFormatNumberForShortName( u"PNG" ), &aFilterData );
}
}
if ( nErrCode == ERRCODE_NONE )
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 6cba89b7d4fa..aee695bf3990 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -4001,7 +4001,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons
{
if( aLinkFileName.getLength() )
{
- static_cast<SdrGrafObj*>(pRet)->SetGraphicLink( aLinkFileName, ""/*TODO?*/, aLinkFilterName );
+ static_cast<SdrGrafObj*>(pRet)->SetGraphicLink( aLinkFileName, u""/*TODO?*/, aLinkFilterName );
Graphic aGraphic(static_cast<SdrGrafObj*>(pRet)->GetGraphic());
aGraphic.setOriginURL(aLinkFileName);
}
diff --git a/fpicker/source/office/autocmpledit.cxx b/fpicker/source/office/autocmpledit.cxx
index 89f6d87b014b..e0166a33691e 100644
--- a/fpicker/source/office/autocmpledit.cxx
+++ b/fpicker/source/office/autocmpledit.cxx
@@ -60,7 +60,7 @@ IMPL_LINK_NOARG(AutocompleteEdit, TryAutoComplete, Timer *, void)
}
}
-bool AutocompleteEdit::Match( const OUString& rText )
+bool AutocompleteEdit::Match( std::u16string_view rText )
{
bool bRet = false;
diff --git a/fpicker/source/office/autocmpledit.hxx b/fpicker/source/office/autocmpledit.hxx
index f29f4bb742b4..03ea58c48084 100644
--- a/fpicker/source/office/autocmpledit.hxx
+++ b/fpicker/source/office/autocmpledit.hxx
@@ -27,7 +27,7 @@ private:
DECL_LINK(ChangedHdl, weld::Entry&, void);
DECL_LINK(TryAutoComplete, Timer*, void);
- bool Match(const OUString& rText);
+ bool Match(std::u16string_view rText);
public:
AutocompleteEdit(std::unique_ptr<weld::Entry> xEntry);
diff --git a/fpicker/source/office/fileview.cxx b/fpicker/source/office/fileview.cxx
index 32b0df044673..ad82be6c0463 100644
--- a/fpicker/source/office/fileview.cxx
+++ b/fpicker/source/office/fileview.cxx
@@ -315,7 +315,7 @@ public:
void Resort_Impl( sal_Int16 nColumn, bool bAscending );
bool SearchNextEntry( sal_uInt32 &nIndex,
- const OUString& rTitle,
+ std::u16string_view rTitle,
bool bWrapAround );
void SetSelectHandler( const Link<SvtFileView*,void>& rHdl );
@@ -1756,7 +1756,7 @@ void SvtFileView_Impl::SetViewMode( FileViewMode eMode )
};
}
-bool SvtFileView_Impl::SearchNextEntry( sal_uInt32& nIndex, const OUString& rTitle, bool bWrapAround )
+bool SvtFileView_Impl::SearchNextEntry( sal_uInt32& nIndex, std::u16string_view rTitle, bool bWrapAround )
{
::osl::MutexGuard aGuard( maMutex );
diff --git a/framework/inc/addonmenu.hxx b/framework/inc/addonmenu.hxx
index 1f6443b48a79..461f81af2fc6 100644
--- a/framework/inc/addonmenu.hxx
+++ b/framework/inc/addonmenu.hxx
@@ -41,7 +41,7 @@ class AddonMenuManager
static bool HasAddonMenuElements();
// Check if the context string matches the provided xModel context
- static bool IsCorrectContext(const OUString& rModuleIdentifier, const OUString& rContext);
+ static bool IsCorrectContext(std::u16string_view rModuleIdentifier, const OUString& rContext);
// Create the Add-Ons menu
static VclPtr<PopupMenu> CreateAddonMenu( const css::uno::Reference< css::frame::XFrame >& rFrame );
diff --git a/framework/inc/uielement/toolbarmerger.hxx b/framework/inc/uielement/toolbarmerger.hxx
index d3ccc1c8cbcb..03b9a1d8325e 100644
--- a/framework/inc/uielement/toolbarmerger.hxx
+++ b/framework/inc/uielement/toolbarmerger.hxx
@@ -59,7 +59,7 @@ struct ReferenceToolbarPathInfo
class ToolBarMerger
{
public:
- static bool IsCorrectContext( const OUString& aContext, const OUString& aModuleIdentifier );
+ static bool IsCorrectContext( const OUString& aContext, std::u16string_view aModuleIdentifier );
static void ConvertSeqSeqToVector( const css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > >& rSequence,
AddonToolbarItemContainer& rContainer );
@@ -79,7 +79,7 @@ class ToolBarMerger
ToolBox::ImplToolItems::size_type nPos,
sal_uInt16& rItemId,
CommandToInfoMap& rCommandMap,
- const OUString& rModuleIdentifier,
+ std::u16string_view rModuleIdentifier,
const OUString& rMergeCommand,
const OUString& rMergeCommandParameter,
const AddonToolbarItemContainer& rItems );
@@ -87,7 +87,7 @@ class ToolBarMerger
static bool ProcessMergeFallback( ToolBox* pToolbar,
sal_uInt16& rItemId,
CommandToInfoMap& rCommandMap,
- const OUString& rModuleIdentifier,
+ std::u16string_view rModuleIdentifier,
const OUString& rMergeCommand,
const OUString& rMergeFallback,
const AddonToolbarItemContainer& rItems );
@@ -97,14 +97,14 @@ class ToolBarMerger
sal_uInt16 nModIndex,
sal_uInt16& rItemId,
CommandToInfoMap& rCommandMap,
- const OUString& rModuleIdentifier,
+ std::u16string_view rModuleIdentifier,
const AddonToolbarItemContainer& rAddonToolbarItems );
static void ReplaceItem( ToolBox* pToolbar,
ToolBox::ImplToolItems::size_type nPos,
sal_uInt16& rItemId,
CommandToInfoMap& rCommandMap,
- const OUString& rModuleIdentifier,
+ std::u16string_view rModuleIdentifier,
const AddonToolbarItemContainer& rAddonToolbarItems );
static void RemoveItems( ToolBox* pToolbar,
diff --git a/framework/inc/uifactory/menubarfactory.hxx b/framework/inc/uifactory/menubarfactory.hxx
index cadb67363edd..661b5887760f 100644
--- a/framework/inc/uifactory/menubarfactory.hxx
+++ b/framework/inc/uifactory/menubarfactory.hxx
@@ -62,7 +62,7 @@ typedef ::cppu::WeakImplHelper<
static void CreateUIElement(const OUString& ResourceURL
,const css::uno::Sequence< css::beans::PropertyValue >& Args
- ,const OUString& ResourceType
+ ,std::u16string_view ResourceType
,const css::uno::Reference< css::ui::XUIElement >& _xMenuBar
,const css::uno::Reference< css::uno::XComponentContext >& _rxContext);
diff --git a/framework/source/fwe/classes/addonmenu.cxx b/framework/source/fwe/classes/addonmenu.cxx
index 7e3103f17635..c7a52f96747a 100644
--- a/framework/source/fwe/classes/addonmenu.cxx
+++ b/framework/source/fwe/classes/addonmenu.cxx
@@ -281,12 +281,12 @@ void AddonMenuManager::GetMenuEntry( const Sequence< PropertyValue >& rAddonMenu
}
// Check if the context string matches the provided xModel context
-bool AddonMenuManager::IsCorrectContext( const OUString& rModuleIdentifier, const OUString& rContext )
+bool AddonMenuManager::IsCorrectContext( std::u16string_view rModuleIdentifier, const OUString& rContext )
{
if ( rContext.isEmpty() )
return true;
- if ( !rModuleIdentifier.isEmpty() )
+ if ( !rModuleIdentifier.empty() )
{
sal_Int32 nIndex = rContext.indexOf( rModuleIdentifier );
return ( nIndex >= 0 );
diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx b/framework/source/uielement/popuptoolbarcontroller.cxx
index af07acef9f04..efe2eb82f12c 100644
--- a/framework/source/uielement/popuptoolbarcontroller.cxx
+++ b/framework/source/uielement/popuptoolbarcontroller.cxx
@@ -627,7 +627,7 @@ private:
void functionExecuted( const OUString &rCommand ) override;
void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& rEvent ) override;
void SAL_CALL execute( sal_Int16 KeyModifier ) override;
- sal_uInt16 getMenuIdForCommand( const OUString &rCommand );
+ sal_uInt16 getMenuIdForCommand( std::u16string_view rCommand );
sal_uInt16 m_nMenuId;
};
@@ -719,9 +719,9 @@ void NewToolbarController::functionExecuted( const OUString &rCommand )
updateImage();
}
-sal_uInt16 NewToolbarController::getMenuIdForCommand( const OUString &rCommand )
+sal_uInt16 NewToolbarController::getMenuIdForCommand( std::u16string_view rCommand )
{
- if ( m_xPopupMenu.is() && !rCommand.isEmpty() )
+ if ( m_xPopupMenu.is() && !rCommand.empty() )
{
Menu* pVclMenu( comphelper::getUnoTunnelImplementation<VCLXMenu>( m_xPopupMenu )->GetMenu() );
sal_uInt16 nCount = pVclMenu->GetItemCount();
diff --git a/framework/source/uielement/toolbarmerger.cxx b/framework/source/uielement/toolbarmerger.cxx
index ad00c3b9800b..4a56afe933d9 100644
--- a/framework/source/uielement/toolbarmerger.cxx
+++ b/framework/source/uielement/toolbarmerger.cxx
@@ -89,7 +89,7 @@ using namespace ::com::sun::star;
*/
bool ToolBarMerger::IsCorrectContext(
const OUString& rContext,
- const OUString& rModuleIdentifier )
+ std::u16string_view rModuleIdentifier )
{
return ( rContext.isEmpty() || ( rContext.indexOf( rModuleIdentifier ) >= 0 ));
}
@@ -301,7 +301,7 @@ bool ToolBarMerger::ProcessMergeOperation(
ToolBox::ImplToolItems::size_type nPos,
sal_uInt16& rItemId,
CommandToInfoMap& rCommandMap,
- const OUString& rModuleIdentifier,
+ std::u16string_view rModuleIdentifier,
const OUString& rMergeCommand,
const OUString& rMergeCommandParameter,
const AddonToolbarItemContainer& rItems )
@@ -364,7 +364,7 @@ bool ToolBarMerger::ProcessMergeFallback(
ToolBox* pToolbar,
sal_uInt16& rItemId,
CommandToInfoMap& rCommandMap,
- const OUString& rModuleIdentifier,
+ std::u16string_view rModuleIdentifier,
const OUString& rMergeCommand,
const OUString& rMergeFallback,
const AddonToolbarItemContainer& rItems )
@@ -428,7 +428,7 @@ void ToolBarMerger::MergeItems(
sal_uInt16 nModIndex,
sal_uInt16& rItemId,
CommandToInfoMap& rCommandMap,
- const OUString& rModuleIdentifier,
+ std::u16string_view rModuleIdentifier,
const AddonToolbarItemContainer& rAddonToolbarItems )
{
const sal_Int32 nSize( rAddonToolbarItems.size() );
@@ -509,7 +509,7 @@ void ToolBarMerger::ReplaceItem(
ToolBox::ImplToolItems::size_type nPos,
sal_uInt16& rItemId,
CommandToInfoMap& rCommandMap,
- const OUString& rModuleIdentifier,
+ std::u16string_view rModuleIdentifier,
const AddonToolbarItemContainer& rAddonToolbarItems )
{
pToolbar->RemoveItem( nPos );
diff --git a/framework/source/uifactory/menubarfactory.cxx b/framework/source/uifactory/menubarfactory.cxx
index 2899b64285cc..5c6e60425400 100644
--- a/framework/source/uifactory/menubarfactory.cxx
+++ b/framework/source/uifactory/menubarfactory.cxx
@@ -57,13 +57,13 @@ Reference< XUIElement > SAL_CALL MenuBarFactory::createUIElement(
{
Reference< css::ui::XUIElement > xMenuBar(
static_cast<OWeakObject *>(new MenuBarWrapper(m_xContext)), UNO_QUERY);
- CreateUIElement(ResourceURL, Args, "private:resource/menubar/", xMenuBar, m_xContext);
+ CreateUIElement(ResourceURL, Args, u"private:resource/menubar/", xMenuBar, m_xContext);
return xMenuBar;
}
void MenuBarFactory::CreateUIElement(const OUString& ResourceURL
,const Sequence< PropertyValue >& Args
- ,const OUString& ResourceType
+ ,std::u16string_view ResourceType
,const Reference< css::ui::XUIElement >& _xMenuBar
,const css::uno::Reference< css::uno::XComponentContext >& _rxContext)
{
diff --git a/framework/source/uifactory/statusbarfactory.cxx b/framework/source/uifactory/statusbarfactory.cxx
index 6791db896f80..0c59adea073b 100644
--- a/framework/source/uifactory/statusbarfactory.cxx
+++ b/framework/source/uifactory/statusbarfactory.cxx
@@ -68,7 +68,7 @@ Reference< XUIElement > SAL_CALL StatusBarFactory::createUIElement(
{
Reference< css::ui::XUIElement > xStatusBar(
static_cast<OWeakObject *>(new StatusBarWrapper(m_xContext)), UNO_QUERY);
- MenuBarFactory::CreateUIElement(ResourceURL, Args, "private:resource/statusbar/", xStatusBar, m_xContext);
+ MenuBarFactory::CreateUIElement(ResourceURL, Args, u"private:resource/statusbar/", xStatusBar, m_xContext);
return xStatusBar;
}
diff --git a/framework/source/uifactory/toolbarfactory.cxx b/framework/source/uifactory/toolbarfactory.cxx
index f797ab2e6916..8af020cde45b 100644
--- a/framework/source/uifactory/toolbarfactory.cxx
+++ b/framework/source/uifactory/toolbarfactory.cxx
@@ -68,7 +68,7 @@ Reference< XUIElement > SAL_CALL ToolBarFactory::createUIElement(
{
Reference< css::ui::XUIElement > xToolBar(
static_cast<OWeakObject *>(new ToolBarWrapper(m_xContext)), UNO_QUERY);
- CreateUIElement(ResourceURL, Args, "private:resource/toolbar/", xToolBar, m_xContext);
+ CreateUIElement(ResourceURL, Args, u"private:resource/toolbar/", xToolBar, m_xContext);
return xToolBar;
}
diff --git a/i18nutil/source/utility/scripttypedetector.cxx b/i18nutil/source/utility/scripttypedetector.cxx
index dda64dbce071..a2796e42a562 100644
--- a/i18nutil/source/utility/scripttypedetector.cxx
+++ b/i18nutil/source/utility/scripttypedetector.cxx
@@ -47,7 +47,7 @@ const sal_Int16 scriptDirection[] = {
ScriptDirection::NEUTRAL, // DirectionProperty_BOUNDARY_NEUTRAL = 18,
};
-sal_Int16 ScriptTypeDetector::getScriptDirection( const OUString& Text, sal_Int32 nPos, sal_Int16 defaultScriptDirection )
+sal_Int16 ScriptTypeDetector::getScriptDirection( std::u16string_view Text, sal_Int32 nPos, sal_Int16 defaultScriptDirection )
{
sal_Int16 dir = scriptDirection[unicode::getUnicodeDirection(Text[nPos])];
return (dir == ScriptDirection::NEUTRAL) ? defaultScriptDirection : dir;
@@ -81,7 +81,7 @@ sal_Int32 ScriptTypeDetector::endOfScriptDirection( const OUString& Text, sal_In
return cPos == nPos ? -1 : cPos;
}
-sal_Int16 ScriptTypeDetector::getCTLScriptType( const OUString& Text, sal_Int32 nPos )
+sal_Int16 ScriptTypeDetector::getCTLScriptType( std::u16string_view Text, sal_Int32 nPos )
{
static const ScriptTypeList typeList[] = {
{ UnicodeScript_kHebrew, UnicodeScript_kHebrew, CTLScriptType::CTL_HEBREW }, // 10
diff --git a/idl/inc/database.hxx b/idl/inc/database.hxx
index caf3cf9fff4d..3e7706b25b1e 100644
--- a/idl/inc/database.hxx
+++ b/idl/inc/database.hxx
@@ -92,7 +92,7 @@ public:
// list of used types while writing
SvRefMemberList<SvMetaType *> aUsedTypes;
- void StartNewFile( const OUString& rName );
+ void StartNewFile( std::u16string_view rName );
void SetExportFile( const OUString& rName )
{ aExportFile = rName; }
void AppendSlot( SvMetaSlot *pSlot );
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index 7613e0a59c6d..37bf552c76e2 100644
--- a/idl/source/prj/database.cxx
+++ b/idl/source/prj/database.cxx
@@ -483,7 +483,7 @@ bool SvIdlWorkingBase::WriteSfx( SvStream & rOutStm )
return true;
}
-void SvIdlDataBase::StartNewFile( const OUString& rName )
+void SvIdlDataBase::StartNewFile( std::u16string_view rName )
{
bExport = aExportFile.equalsIgnoreAsciiCase( rName );
assert ( !bExport );
diff --git a/include/basic/basmgr.hxx b/include/basic/basmgr.hxx
index 64e4ac597df7..b439baed85fa 100644
--- a/include/basic/basmgr.hxx
+++ b/include/basic/basmgr.hxx
@@ -147,8 +147,8 @@ public:
sal_uInt16 GetLibCount() const;
StarBASIC* GetLib( sal_uInt16 nLib ) const;
- StarBASIC* GetLib( const OUString& rName ) const;
- sal_uInt16 GetLibId( const OUString& rName ) const;
+ StarBASIC* GetLib( std::u16string_view rName ) const;
+ sal_uInt16 GetLibId( std::u16string_view rName ) const;
OUString GetLibName( sal_uInt16 nLib );
@@ -188,7 +188,7 @@ public:
takes the names of modules whose size exceeds the legacy limit
*/
bool LegacyPsswdBinaryLimitExceeded( std::vector< OUString >& _out_rModuleNames );
- bool HasExeCode( const OUString& );
+ bool HasExeCode( std::u16string_view );
/// determines whether the Basic Manager has a given macro, given by fully qualified name
bool HasMacro( OUString const& i_fullyQualifiedName ) const;
/// executes a given macro
@@ -202,7 +202,7 @@ private:
BASIC_DLLPRIVATE StarBASIC* GetStdLib() const;
BASIC_DLLPRIVATE StarBASIC* AddLib( SotStorage& rStorage, const OUString& rLibName, bool bReference );
BASIC_DLLPRIVATE void RemoveLib( sal_uInt16 nLib );
- BASIC_DLLPRIVATE bool HasLib( const OUString& rName ) const;
+ BASIC_DLLPRIVATE bool HasLib( std::u16string_view rName ) const;
BASIC_DLLPRIVATE StarBASIC* CreateLibForLibContainer( const OUString& rLibName,
const css::uno::Reference< css::script::XLibraryContainer >& xScriptCont );
diff --git a/include/basic/codecompletecache.hxx b/include/basic/codecompletecache.hxx
index 37ab4a499a16..2c6c0873fcb0 100644
--- a/include/basic/codecompletecache.hxx
+++ b/include/basic/codecompletecache.hxx
@@ -83,8 +83,8 @@ public:
void InsertGlobalVar( const OUString& sVarName, const OUString& sVarType );
void InsertLocalVar( const OUString& sProcName, const OUString& sVarName, const OUString& sVarType );
- OUString GetVarType( const OUString& sVarName ) const;
- OUString GetCorrectCaseVarName( const OUString& sVarName, const OUString& sActProcName ) const;
+ OUString GetVarType( std::u16string_view sVarName ) const;
+ OUString GetCorrectCaseVarName( std::u16string_view sVarName, std::u16string_view sActProcName ) const;
void Clear();
};
diff --git a/include/basic/sbstar.hxx b/include/basic/sbstar.hxx
index 7ff6a138123e..bdcf167edd49 100644
--- a/include/basic/sbstar.hxx
+++ b/include/basic/sbstar.hxx
@@ -107,7 +107,7 @@ public:
SbModules& GetModules() { return pModules; }
SbxObject* GetRtl() { return pRtl.get(); }
- SbModule* FindModule( const OUString& );
+ SbModule* FindModule( std::u16string_view );
// Run init code of all modules (including the inserted Doc-Basics)
void InitAllModules( StarBASIC const * pBasicNotToInit = nullptr );
void DeInitAllModules();
diff --git a/include/i18nutil/scripttypedetector.hxx b/include/i18nutil/scripttypedetector.hxx
index 8be9866abeec..fd098f9e7f32 100644
--- a/include/i18nutil/scripttypedetector.hxx
+++ b/include/i18nutil/scripttypedetector.hxx
@@ -27,10 +27,10 @@ class I18NUTIL_DLLPUBLIC ScriptTypeDetector
public:
static sal_Int32 beginOfScriptDirection( const OUString& Text, sal_Int32 nPos, sal_Int16 scriptDirection );
static sal_Int32 endOfScriptDirection( const OUString& Text, sal_Int32 nPos, sal_Int16 scriptDirection );
- static sal_Int16 getScriptDirection( const OUString& Text, sal_Int32 nPos, sal_Int16 defaultScriptDirection );
+ static sal_Int16 getScriptDirection( std::u16string_view Text, sal_Int32 nPos, sal_Int16 defaultScriptDirection );
static sal_Int32 beginOfCTLScriptType( const OUString& Text, sal_Int32 nPos );
static sal_Int32 endOfCTLScriptType( const OUString& Text, sal_Int32 nPos );
- static sal_Int16 getCTLScriptType( const OUString& Text, sal_Int32 nPos );
+ static sal_Int16 getCTLScriptType(std::u16string_view Text, sal_Int32 nPos );
};
#endif
diff --git a/include/oox/core/contexthandler.hxx b/include/oox/core/contexthandler.hxx
index 5d72e2192cc2..0d06e548ee32 100644
--- a/include/oox/core/contexthandler.hxx
+++ b/include/oox/core/contexthandler.hxx
@@ -71,7 +71,7 @@ public:
/** Returns the full fragment path for the passed relation identifier. */
OUString getFragmentPathFromRelId( const OUString& rRelId ) const;
/** Returns the full fragment path for the first relation of the passed type. */
- OUString getFragmentPathFromFirstType( const OUString& rType ) const;
+ OUString getFragmentPathFromFirstType( std::u16string_view rType ) const;
OUString getFragmentPathFromFirstTypeFromOfficeDoc( const OUString& rType ) const;
// com.sun.star.xml.sax.XFastContextHandler interface ---------------------
diff --git a/include/oox/core/relations.hxx b/include/oox/core/relations.hxx
index f36ceaba6d0b..23d6a9320243 100644
--- a/include/oox/core/relations.hxx
+++ b/include/oox/core/relations.hxx
@@ -33,7 +33,7 @@ namespace oox::core {
/** Expands to an OUString containing an 'officeDocument' transitional relation type created
from the passed literal(!) ASCII(!) character array. */
#define CREATE_OFFICEDOC_RELATION_TYPE( ascii ) \
- ( "http://schemas.openxmlformats.org/officeDocument/2006/relationships/" ascii )
+ ( u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/" ascii )
/** Expands to an OUString containing an 'officeDocument' strict relation type created
from the passed literal(!) ASCII(!) character array. */
@@ -43,7 +43,7 @@ namespace oox::core {
/** Expands to an OUString containing an MS Office specific relation type
created from the passed literal(!) ASCII(!) character array. */
#define CREATE_MSOFFICE_RELATION_TYPE( ascii ) \
- ( "http://schemas.microsoft.com/office/2006/relationships/" ascii )
+ ( u"http://schemas.microsoft.com/office/2006/relationships/" ascii )
#define CREATE_XL_CONTENT_TYPE( ascii ) \
( "application/vnd.openxmlformats-officedocument.spreadsheetml." ascii "+xml" )
@@ -89,7 +89,7 @@ public:
/** Returns the relation with the passed relation identifier. */
const Relation* getRelationFromRelId( const OUString& rId ) const;
/** Returns the first relation with the passed type. */
- const Relation* getRelationFromFirstType( const OUString& rType ) const;
+ const Relation* getRelationFromFirstType( std::u16string_view rType ) const;
/** Finds all relations associated with the passed type. */
RelationsRef getRelationsFromTypeFromOfficeDoc( const OUString& rType ) const;
@@ -103,7 +103,7 @@ public:
/** Returns the full fragment path for the passed relation identifier. */
OUString getFragmentPathFromRelId( const OUString& rRelId ) const;
/** Returns the full fragment path for the first relation of the passed type. */
- OUString getFragmentPathFromFirstType( const OUString& rType ) const;
+ OUString getFragmentPathFromFirstType( std::u16string_view rType ) const;
OUString getFragmentPathFromFirstTypeFromOfficeDoc( const OUString& rType ) const;
private:
diff --git a/include/sfx2/frmdescr.hxx b/include/sfx2/frmdescr.hxx
index 196a2ccc9356..50df431b4c24 100644
--- a/include/sfx2/frmdescr.hxx
+++ b/include/sfx2/frmdescr.hxx
@@ -66,7 +66,7 @@ public:
const INetURLObject& GetURL() const
{ return aURL; }
void SetURL( const OUString& rURL );
- void SetActualURL( const OUString& rURL );
+ void SetActualURL( std::u16string_view rURL );
// FrameName
const OUString& GetName() const
diff --git a/include/sfx2/sfxhelp.hxx b/include/sfx2/sfxhelp.hxx
index 06cd21c6eec3..7f4d687b102d 100644
--- a/include/sfx2/sfxhelp.hxx
+++ b/include/sfx2/sfxhelp.hxx
@@ -51,7 +51,7 @@ public:
// Check for built-in help
static bool IsHelpInstalled();
- static OUString GetURLHelpText(const OUString&);
+ static OUString GetURLHelpText(std::u16string_view);
};
#endif // INCLUDED_SFX2_SFXHELP_HXX
diff --git a/include/sfx2/templatelocalview.hxx b/include/sfx2/templatelocalview.hxx
index e87d37e9aef5..1ed2ee1a4e61 100644
--- a/include/sfx2/templatelocalview.hxx
+++ b/include/sfx2/templatelocalview.hxx
@@ -148,7 +148,7 @@ public:
void updateThumbnailDimensions(tools::Long itemMaxSize);
- void RemoveDefaultTemplateIcon( const OUString& rPath);
+ void RemoveDefaultTemplateIcon( std::u16string_view rPath);
static BitmapEx scaleImg (const BitmapEx &rImg, tools::Long width, tools::Long height);
diff --git a/include/svx/ActionDescriptionProvider.hxx b/include/svx/ActionDescriptionProvider.hxx
index 204c4f6e9e0d..4aa889eb1f38 100644
--- a/include/svx/ActionDescriptionProvider.hxx
+++ b/include/svx/ActionDescriptionProvider.hxx
@@ -47,7 +47,7 @@ public:
public:
static OUString createDescription( ActionType eActionType
- , const OUString& rObjectName );
+ , std::u16string_view rObjectName );
};
#endif
diff --git a/include/svx/svdograf.hxx b/include/svx/svdograf.hxx
index 21ab9b3a2fb5..5fd2b3ff1946 100644
--- a/include/svx/svdograf.hxx
+++ b/include/svx/svdograf.hxx
@@ -163,7 +163,7 @@ private:
void ForceSwapIn() const;
public:
- void SetGraphicLink(const OUString& rFileName, const OUString& rReferer, const OUString& rFilterName);
+ void SetGraphicLink(const OUString& rFileName, std::u16string_view rReferer, std::u16string_view rFilterName);
void ReleaseGraphicLink();
bool IsLinkedGraphic() const;
diff --git a/include/test/sheet/xspreadsheets2.hxx b/include/test/sheet/xspreadsheets2.hxx
index 6c2cd0952b28..e96367d9472f 100644
--- a/include/test/sheet/xspreadsheets2.hxx
+++ b/include/test/sheet/xspreadsheets2.hxx
@@ -50,7 +50,7 @@ private:
css::uno::Reference< css::sheet::XSpreadsheetDocument> getDoc(const OUString&);
static css::uno::Reference< css::sheet::XNamedRanges> getNamedRanges(css::uno::Reference< css::sheet::XSpreadsheetDocument > const &);
void importSheetToCopy();
- static bool isExternalReference(const OUString& aDestContent, const OUString& aSrcContent );
+ static bool isExternalReference(const OUString& aDestContent, std::u16string_view aSrcContent );
css::uno::Reference< css::sheet::XSpreadsheetDocument> xDestDoc;
css::uno::Reference< css::sheet::XSpreadsheet > xDestSheet;
diff --git a/include/unotools/localedatawrapper.hxx b/include/unotools/localedatawrapper.hxx
index 7f393d9343f3..b4e93749142d 100644
--- a/include/unotools/localedatawrapper.hxx
+++ b/include/unotools/localedatawrapper.hxx
@@ -194,7 +194,7 @@ public:
/** If the secondary calendar, if any, is of the name passed AND number
formats using it usually use the E or EE keyword (EC|EEC). */
- bool doesSecondaryCalendarUseEC( const OUString& rName ) const;
+ bool doesSecondaryCalendarUseEC( std::u16string_view rName ) const;
/** Obtain digit grouping. The usually known grouping by thousands (#,###)
is actually only one of possible groupings. Another one, for example,
diff --git a/include/unotools/textsearch.hxx b/include/unotools/textsearch.hxx
index 45db38b2981f..849f4c8c91f5 100644
--- a/include/unotools/textsearch.hxx
+++ b/include/unotools/textsearch.hxx
@@ -208,7 +208,7 @@ public:
const css::lang::Locale& rLocale );
/* replace back references in the replace string by the sub expressions from the search result */
- void ReplaceBackReferences( OUString& rReplaceStr, const OUString &rStr, const css::util::SearchResult& rResult ) const;
+ void ReplaceBackReferences( OUString& rReplaceStr, std::u16string_view rStr, const css::util::SearchResult& rResult ) const;
/** Upgrade SearchOptions to SearchOptions2 for places that don't handle
SearchOptions2 yet. Better fix your module if you want to support
diff --git a/include/vbahelper/vbahelper.hxx b/include/vbahelper/vbahelper.hxx
index 7333dd375e1e..60d8f0b85de4 100644
--- a/include/vbahelper/vbahelper.hxx
+++ b/include/vbahelper/vbahelper.hxx
@@ -69,7 +69,7 @@ namespace ooo::vba
/** Returns the VBA document implementation object representing the passed UNO document model. */
VBAHELPER_DLLPUBLIC css::uno::Reference< XHelperInterface > getVBADocument( const css::uno::Reference< css::frame::XModel >& xModel );
- VBAHELPER_DLLPUBLIC css::uno::Reference< XHelperInterface > getUnoDocModule( const OUString& aModName, SfxObjectShell const * pShell );
+ VBAHELPER_DLLPUBLIC css::uno::Reference< XHelperInterface > getUnoDocModule( std::u16string_view aModName, SfxObjectShell const * pShell );
/// @throws css::uno::RuntimeException
VBAHELPER_DLLPUBLIC SfxObjectShell* getSfxObjShell( const css::uno::Reference< css::frame::XModel >& xModel );
@@ -259,10 +259,10 @@ class VBAHELPER_DLLPUBLIC DebugHelper
{
public:
/// @throws css::script::BasicErrorException
- static void basicexception( const css::uno::Exception& ex, ErrCode err, const OUString& /*additionalArgument*/ );
+ static void basicexception( const css::uno::Exception& ex, ErrCode err, std::u16string_view /*additionalArgument*/ );
/// @throws css::script::BasicErrorException
- static void basicexception( ErrCode err, const OUString& additionalArgument );
+ static void basicexception( ErrCode err, std::u16string_view additionalArgument );
/// @throws css::script::BasicErrorException
static void basicexception( const css::uno::Exception& ex );
diff --git a/include/vcl/GraphicNativeTransform.hxx b/include/vcl/GraphicNativeTransform.hxx
index 3b05ac323232..3b5071e1639c 100644
--- a/include/vcl/GraphicNativeTransform.hxx
+++ b/include/vcl/GraphicNativeTransform.hxx
@@ -32,7 +32,7 @@ class VCL_DLLPUBLIC GraphicNativeTransform final
bool rotateBitmapOnly(Degree10 aRotation);
void rotateJPEG(Degree10 aRotation);
- bool rotateGeneric(Degree10 aRotation, const OUString& aType);
+ bool rotateGeneric(Degree10 aRotation, std::u16string_view aType);
public:
GraphicNativeTransform(Graphic& rGraphic);
diff --git a/include/vcl/GraphicObject.hxx b/include/vcl/GraphicObject.hxx
index e4c1edc817d6..c302387995ff 100644
--- a/include/vcl/GraphicObject.hxx
+++ b/include/vcl/GraphicObject.hxx
@@ -167,7 +167,7 @@ public:
const Graphic& GetGraphic() const;
void SetGraphic( const Graphic& rGraphic, const GraphicObject* pCopyObj = nullptr);
- void SetGraphic( const Graphic& rGraphic, const OUString& rLink );
+ void SetGraphic( const Graphic& rGraphic, std::u16string_view rLink );
/** Get graphic transformed according to given attributes
diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx
index 83db7db95fb8..35728237dc7a 100644
--- a/include/vcl/graphicfilter.hxx
+++ b/include/vcl/graphicfilter.hxx
@@ -86,18 +86,18 @@ namespace o3tl
#define EXP_PDF "SVEPDF"
#define EXP_PNG "SVEPNG"
-#define BMP_SHORTNAME "BMP"
-#define GIF_SHORTNAME "GIF"
-#define JPG_SHORTNAME "JPG"
-#define MET_SHORTNAME "MET"
-#define PCT_SHORTNAME "PCT"
-#define PNG_SHORTNAME "PNG"
-#define SVM_SHORTNAME "SVM"
-#define TIF_SHORTNAME "TIF"
-#define WMF_SHORTNAME "WMF"
-#define EMF_SHORTNAME "EMF"
-#define SVG_SHORTNAME "SVG"
-#define PDF_SHORTNAME "PDF"
+#define BMP_SHORTNAME u"BMP"
+#define GIF_SHORTNAME u"GIF"
+#define JPG_SHORTNAME u"JPG"
+#define MET_SHORTNAME u"MET"
+#define PCT_SHORTNAME u"PCT"
+#define PNG_SHORTNAME u"PNG"
+#define SVM_SHORTNAME u"SVM"
+#define TIF_SHORTNAME u"TIF"
+#define WMF_SHORTNAME u"WMF"
+#define EMF_SHORTNAME u"EMF"
+#define SVG_SHORTNAME u"SVG"
+#define PDF_SHORTNAME u"PDF"
// Info class for all supported file formats
@@ -241,9 +241,9 @@ public:
~GraphicFilter();
sal_uInt16 GetImportFormatCount() const;
- sal_uInt16 GetImportFormatNumber( const OUString& rFormatName );
- sal_uInt16 GetImportFormatNumberForShortName( const OUString& rShortName );
- sal_uInt16 GetImportFormatNumberForTypeName( const OUString& rType );
+ sal_uInt16 GetImportFormatNumber( std::u16string_view rFormatName );
+ sal_uInt16 GetImportFormatNumberForShortName( std::u16string_view rShortName );
+ sal_uInt16 GetImportFormatNumberForTypeName( std::u16string_view rType );
OUString GetImportFormatName( sal_uInt16 nFormat );
OUString GetImportFormatTypeName( sal_uInt16 nFormat );
#ifdef _WIN32
@@ -253,11 +253,11 @@ public:
OUString GetImportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry );
sal_uInt16 GetExportFormatCount() const;
- sal_uInt16 GetExportFormatNumber( const OUString& rFormatName );
- sal_uInt16 GetExportFormatNumberForMediaType( const OUString& rShortName );
- sal_uInt16 GetExportFormatNumberForShortName( const OUString& rShortName );
+ sal_uInt16 GetExportFormatNumber( std::u16string_view rFormatName );
+ sal_uInt16 GetExportFormatNumberForMediaType( std::u16string_view rShortName );
+ sal_uInt16 GetExportFormatNumberForShortName( std::u16string_view rShortName );
OUString GetExportInternalFilterName( sal_uInt16 nFormat );
- sal_uInt16 GetExportFormatNumberForTypeName( const OUString& rType );
+ sal_uInt16 GetExportFormatNumberForTypeName( std::u16string_view rType );
OUString GetExportFormatName( sal_uInt16 nFormat );
OUString GetExportFormatMediaType( sal_uInt16 nFormat );
OUString GetExportFormatShortName( sal_uInt16 nFormat );
diff --git a/include/xmloff/formlayerimport.hxx b/include/xmloff/formlayerimport.hxx
index 8d10604f4ff5..984e0081e111 100644
--- a/include/xmloff/formlayerimport.hxx
+++ b/include/xmloff/formlayerimport.hxx
@@ -66,9 +66,7 @@ namespace xmloff
/** creates an import context for the office:forms element
*/
static SvXMLImportContext* createOfficeFormsContext(
- SvXMLImport& _rImport,
- sal_uInt16 _nPrefix,
- const OUString& _rLocalName);
+ SvXMLImport& _rImport);
/** create an SvXMLImportContext instance which is able to import the &lt;form:form&gt;
element.
diff --git a/oox/source/core/contexthandler.cxx b/oox/source/core/contexthandler.cxx
index 6eef9029a7d2..ff55f8b07bc7 100644
--- a/oox/source/core/contexthandler.cxx
+++ b/oox/source/core/contexthandler.cxx
@@ -66,7 +66,7 @@ OUString ContextHandler::getFragmentPathFromRelId( const OUString& rRelId ) cons
return mxBaseData->mxRelations->getFragmentPathFromRelId( rRelId );
}
-OUString ContextHandler::getFragmentPathFromFirstType( const OUString& rType ) const
+OUString ContextHandler::getFragmentPathFromFirstType( std::u16string_view rType ) const
{
return mxBaseData->mxRelations->getFragmentPathFromFirstType( rType );
}
diff --git a/oox/source/core/relations.cxx b/oox/source/core/relations.cxx
index cd2570052eb6..bedfc125b675 100644
--- a/oox/source/core/relations.cxx
+++ b/oox/source/core/relations.cxx
@@ -62,7 +62,7 @@ const Relation* Relations::getRelationFromRelId( const OUString& rId ) const
return (aIt == maMap.end()) ? nullptr : &aIt->second;
}
-const Relation* Relations::getRelationFromFirstType( const OUString& rType ) const
+const Relation* Relations::getRelationFromFirstType( std::u16string_view rType ) const
{
for (auto const& elem : maMap)
if( elem.second.maType.equalsIgnoreAsciiCase( rType ) )
@@ -131,7 +131,7 @@ OUString Relations::getFragmentPathFromRelId( const OUString& rRelId ) const
return pRelation ? getFragmentPathFromRelation( *pRelation ) : OUString();
}
-OUString Relations::getFragmentPathFromFirstType( const OUString& rType ) const
+OUString Relations::getFragmentPathFromFirstType( std::u16string_view rType ) const
{
const Relation* pRelation = getRelationFromFirstType( rType );
return pRelation ? getFragmentPathFromRelation( *pRelation ) : OUString();
diff --git a/reportdesign/source/ui/inc/GeometryHandler.hxx b/reportdesign/source/ui/inc/GeometryHandler.hxx
index 5c9e103c2903..bd6b6e24c861 100644
--- a/reportdesign/source/ui/inc/GeometryHandler.hxx
+++ b/reportdesign/source/ui/inc/GeometryHandler.hxx
@@ -119,7 +119,7 @@ namespace rptui
* \param _sDataField the data field
* \param _aFunction the function template
*/
- void impl_createFunction(const OUString& _sFunctionName,const OUString& _sDataField,const DefaultFunction& _aFunction);
+ void impl_createFunction(const OUString& _sFunctionName,std::u16string_view _sDataField,const DefaultFunction& _aFunction);
/** check whether the given function name is a counter function.
*
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index 606d9af18bd5..d035084a3baf 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -2081,7 +2081,7 @@ bool GeometryHandler::impl_isCounterFunction_throw(const OUString& _sQuotedFunct
return aFind.first != aFind.second;
}
-void GeometryHandler::impl_createFunction(const OUString& _sFunctionName,const OUString& _sDataField,const DefaultFunction& _aFunction)
+void GeometryHandler::impl_createFunction(const OUString& _sFunctionName,std::u16string_view _sDataField,const DefaultFunction& _aFunction)
{
if ( m_bNewFunction )
removeFunction();
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;
}
diff --git a/sd/inc/sdfilter.hxx b/sd/inc/sdfilter.hxx
index a5e4579843ae..47f07378cc4b 100644
--- a/sd/inc/sdfilter.hxx
+++ b/sd/inc/sdfilter.hxx
@@ -60,7 +60,7 @@ protected:
private:
- static OUString ImplGetFullLibraryName( const OUString& rLibraryName );
+ static OUString ImplGetFullLibraryName( std::u16string_view rLibraryName );
};
diff --git a/sd/source/filter/eppt/epptbase.hxx b/sd/source/filter/eppt/epptbase.hxx
index 776a44e9fbb6..96665991e152 100644
--- a/sd/source/filter/eppt/epptbase.hxx
+++ b/sd/source/filter/eppt/epptbase.hxx
@@ -183,7 +183,7 @@ public:
~FontCollection();
- static short GetScriptDirection( const OUString& rText );
+ static short GetScriptDirection( std::u16string_view rText );
sal_uInt32 GetId( FontCollectionEntry& rFontDescriptor );
diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx
index ba1129c6572b..f18c7c449ff1 100644
--- a/sd/source/filter/eppt/pptx-text.cxx
+++ b/sd/source/filter/eppt/pptx-text.cxx
@@ -1352,7 +1352,7 @@ FontCollection::FontCollection() :
xPPTBreakIter = css::i18n::BreakIterator::create( ::comphelper::getProcessComponentContext() );
}
-short FontCollection::GetScriptDirection( const OUString& rString )
+short FontCollection::GetScriptDirection( std::u16string_view rString )
{
short nRet = ScriptTypeDetector::getScriptDirection( rString, 0, css::i18n::ScriptDirection::NEUTRAL );
return nRet;
diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx
index 5d029752154c..c833780473ac 100644
--- a/sd/source/filter/ppt/pptinanimations.cxx
+++ b/sd/source/filter/ppt/pptinanimations.cxx
@@ -3264,7 +3264,7 @@ void AnimationImporter::dump( const char * , const char * )
{
}
-void AnimationImporter::dump( const char * , const OUString& )
+void AnimationImporter::dump( const char * , std::u16string_view )
{
}
diff --git a/sd/source/filter/ppt/pptinanimations.hxx b/sd/source/filter/ppt/pptinanimations.hxx
index f7f59e8be854..b82072cdaf72 100644
--- a/sd/source/filter/ppt/pptinanimations.hxx
+++ b/sd/source/filter/ppt/pptinanimations.hxx
@@ -108,7 +108,7 @@ private:
void dump( const char * pText, sal_Int64 nInt );
static void dump( const char * pText, double fDouble );
static void dump( const char * pText, const char * pText2 );
- static void dump( const char * pText, const OUString& rString );
+ static void dump( const char * pText, std::u16string_view rString );
};
} // namespace ppt
diff --git a/sd/source/filter/sdfilter.cxx b/sd/source/filter/sdfilter.cxx
index a13f10e1592a..7e55cac4d1b8 100644
--- a/sd/source/filter/sdfilter.cxx
+++ b/sd/source/filter/sdfilter.cxx
@@ -50,7 +50,7 @@ SdFilter::~SdFilter()
{
}
-OUString SdFilter::ImplGetFullLibraryName( const OUString& rLibraryName )
+OUString SdFilter::ImplGetFullLibraryName( std::u16string_view rLibraryName )
{
return OUString(SVLIBRARY("?")).replaceFirst( "?", rLibraryName );
}
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index 5110587f4245..67e0e0cc66b1 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -863,7 +863,7 @@ private:
void updateControlStates();
void fillSoundListBox();
void clearSoundListBox();
- sal_Int32 getSoundObject( const OUString& rStr );
+ sal_Int32 getSoundObject( std::u16string_view rStr );
void openSoundFileDialog();
void onSoundPreview();
weld::Window* GetFrameWeld() const { return mpDialog; }
@@ -1317,7 +1317,7 @@ void CustomAnimationEffectTabPage::clearSoundListBox()
mxLBSound->clear();
}
-sal_Int32 CustomAnimationEffectTabPage::getSoundObject( const OUString& rStr )
+sal_Int32 CustomAnimationEffectTabPage::getSoundObject( std::u16string_view rStr )
{
size_t i;
const size_t nCount = maSoundList.size();
diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx
index 59aa0c396858..c1305607db13 100644
--- a/sd/source/ui/view/sdview4.cxx
+++ b/sd/source/ui/view/sdview4.cxx
@@ -427,7 +427,7 @@ IMPL_LINK_NOARG(View, DropInsertFileHdl, Timer *, void)
SdrGrafObj* pGrafObj = InsertGraphic( aGraphic, nTempAction, maDropPos, nullptr, nullptr );
if(pGrafObj && bLink)
{
- pGrafObj->SetGraphicLink( aCurrentDropFile, ""/*TODO?*/, OUString() );
+ pGrafObj->SetGraphicLink( aCurrentDropFile, u""/*TODO?*/, OUString() );
}
// return action from first inserted graphic
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 06bb3fc5e454..b4f31d914a9c 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -665,7 +665,7 @@ OUString SfxHelp::GetHelpText(const OUString& aCommandURL, const weld::Widget* p
return sHelpText;
}
-OUString SfxHelp::GetURLHelpText(const OUString& aURL)
+OUString SfxHelp::GetURLHelpText(std::u16string_view aURL)
{
SvtSecurityOptions aSecOpt;
bool bCtrlClickHlink = aSecOpt.IsOptionSet(SvtSecurityOptions::EOption::CtrlClickHyperlink);
diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx
index 76f6f331d266..4063e3453aaf 100644
--- a/sfx2/source/control/templatelocalview.cxx
+++ b/sfx2/source/control/templatelocalview.cxx
@@ -908,7 +908,7 @@ bool TemplateLocalView::IsDefaultTemplate(const OUString& rPath)
return SfxObjectFactory::GetStandardTemplate(rName).match(rPath); });
}
-void TemplateLocalView::RemoveDefaultTemplateIcon(const OUString& rPath)
+void TemplateLocalView::RemoveDefaultTemplateIcon(std::u16string_view rPath)
{
for (const std::unique_ptr<ThumbnailViewItem>& pItem : mItemList)
{
diff --git a/sfx2/source/control/templatesearchview.cxx b/sfx2/source/control/templatesearchview.cxx
index 41c318ecf75e..d1f36de241f3 100644
--- a/sfx2/source/control/templatesearchview.cxx
+++ b/sfx2/source/control/templatesearchview.cxx
@@ -240,7 +240,7 @@ BitmapEx TemplateSearchView::getDefaultThumbnail( const OUString& rPath )
return aImg;
}
-void TemplateSearchView::RemoveDefaultTemplateIcon(const OUString& rPath)
+void TemplateSearchView::RemoveDefaultTemplateIcon(std::u16string_view rPath)
{
for (const std::unique_ptr<ThumbnailViewItem>& pItem : mItemList)
{
diff --git a/sfx2/source/doc/frmdescr.cxx b/sfx2/source/doc/frmdescr.cxx
index 3df6a34e0ae2..a9acefa8ad44 100644
--- a/sfx2/source/doc/frmdescr.cxx
+++ b/sfx2/source/doc/frmdescr.cxx
@@ -48,7 +48,7 @@ void SfxFrameDescriptor::SetURL( const OUString& rURL )
SetActualURL(aURL.GetMainURL( INetURLObject::DecodeMechanism::ToIUri ));
}
-void SfxFrameDescriptor::SetActualURL( const OUString& )
+void SfxFrameDescriptor::SetActualURL( std::u16string_view )
{
if ( m_pArgs )
m_pArgs->ClearItem();
diff --git a/sfx2/source/inc/templatesearchview.hxx b/sfx2/source/inc/templatesearchview.hxx
index d5a1dc32ceda..24becb6146ba 100644
--- a/sfx2/source/inc/templatesearchview.hxx
+++ b/sfx2/source/inc/templatesearchview.hxx
@@ -43,7 +43,7 @@ public:
static BitmapEx getDefaultThumbnail( const OUString& rPath );
- void RemoveDefaultTemplateIcon(const OUString& rPath);
+ void RemoveDefaultTemplateIcon(std::u16string_view rPath);
private:
virtual void OnItemDblClicked(ThumbnailViewItem *pItem) override;
diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx
index 2d508f8b9c30..957466dfbb34 100644
--- a/slideshow/source/engine/shapes/viewmediashape.cxx
+++ b/slideshow/source/engine/shapes/viewmediashape.cxx
@@ -381,7 +381,7 @@ namespace slideshow::internal
void ViewMediaShape::implInitializePlayerWindow( const ::basegfx::B2DRectangle& rBounds,
const uno::Sequence< uno::Any >& rVCLDeviceParams,
- const OUString& )
+ std::u16string_view )
{
SAL_INFO("slideshow", "ViewMediaShape::implInitializePlayerWindow" );
if( mpMediaWindow || rBounds.isEmpty() )
diff --git a/slideshow/source/engine/shapes/viewmediashape.hxx b/slideshow/source/engine/shapes/viewmediashape.hxx
index de46f194746a..e5cbe1be737b 100644
--- a/slideshow/source/engine/shapes/viewmediashape.hxx
+++ b/slideshow/source/engine/shapes/viewmediashape.hxx
@@ -146,7 +146,7 @@ namespace slideshow::internal
void implInitializeMediaPlayer( const OUString& rMediaURL, const OUString& rMimeType );
void implInitializePlayerWindow( const ::basegfx::B2DRectangle& rBounds,
const css::uno::Sequence< css::uno::Any >& rVCLDeviceParams,
- const OUString& rMimeType );
+ std::u16string_view rMimeType );
ViewLayerSharedPtr mpViewLayer;
VclPtr< SystemChildWindow > mpMediaWindow;
mutable css::awt::Point maWindowOffset;
diff --git a/svx/source/svdraw/ActionDescriptionProvider.cxx b/svx/source/svdraw/ActionDescriptionProvider.cxx
index b2e38ebd99d8..a471f3e85763 100644
--- a/svx/source/svdraw/ActionDescriptionProvider.cxx
+++ b/svx/source/svdraw/ActionDescriptionProvider.cxx
@@ -23,7 +23,7 @@
#include <svx/strings.hrc>
OUString ActionDescriptionProvider::createDescription( ActionType eActionType
- , const OUString& rObjectName )
+ , std::u16string_view rObjectName )
{
const char* pResID = nullptr;
switch( eActionType )
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 37a07321441e..ae43c6bb3e41 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -487,7 +487,7 @@ void SdrGrafObj::ImpDeregisterLink()
}
}
-void SdrGrafObj::SetGraphicLink(const OUString& rFileName, const OUString& /*rReferer*/, const OUString& /*rFilterName*/)
+void SdrGrafObj::SetGraphicLink(const OUString& rFileName, std::u16string_view /*rReferer*/, std::u16string_view /*rFilterName*/)
{
Graphic aGraphic;
aGraphic.setOriginURL(rFileName);
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
index 2bff13b00b30..1d0c23e92780 100644
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -30,10 +30,10 @@
#include <vcl/cvtgrf.hxx>
#include <memory>
-#define FORMAT_BMP "bmp"
-#define FORMAT_GIF "gif"
-#define FORMAT_JPG "jpg"
-#define FORMAT_PNG "png"
+#define FORMAT_BMP u"bmp"
+#define FORMAT_GIF u"gif"
+#define FORMAT_JPG u"jpg"
+#define FORMAT_PNG u"png"
using namespace com::sun::star;
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index 9fb7dbfce7b5..7fc910600d75 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -759,8 +759,8 @@ private:
void NewStyle();
void EndStyle();
- static inline bool HasStyleOptions( const OUString &rStyle, const OUString &rId,
- const OUString &rClass, const OUString *pLang=nullptr,
+ static inline bool HasStyleOptions( std::u16string_view rStyle, std::u16string_view rId,
+ std::u16string_view rClass, const OUString *pLang=nullptr,
const OUString *pDir=nullptr );
bool ParseStyleOptions( const OUString &rStyle, const OUString &rId,
const OUString &rClass, SfxItemSet &rItemSet,
@@ -1008,13 +1008,13 @@ inline void HTMLAttrContext::GetULSpace( sal_uInt16& rUpper,
}
}
-inline bool SwHTMLParser::HasStyleOptions( const OUString &rStyle,
- const OUString &rId,
- const OUString &rClass,
+inline bool SwHTMLParser::HasStyleOptions( std::u16string_view rStyle,
+ std::u16string_view rId,
+ std::u16string_view rClass,
const OUString *pLang,
const OUString *pDir )
{
- return !rStyle.isEmpty() || !rId.isEmpty() || !rClass.isEmpty() ||
+ return !rStyle.empty() || !rId.empty() || !rClass.empty() ||
(pLang && !pLang->isEmpty()) || (pDir && !pDir->isEmpty());
}
diff --git a/test/source/sheet/xspreadsheets2.cxx b/test/source/sheet/xspreadsheets2.cxx
index 98070812b2b9..9c53af7374fb 100644
--- a/test/source/sheet/xspreadsheets2.cxx
+++ b/test/source/sheet/xspreadsheets2.cxx
@@ -356,7 +356,7 @@ void XSpreadsheets2::importSheetToCopy()
xDestSheet.set( xDestSheetIndexAccess->getByIndex(nDestPosEffective), UNO_QUERY_THROW);
}
-bool XSpreadsheets2::isExternalReference(const OUString& aDestContent, const OUString& aSrcContent )
+bool XSpreadsheets2::isExternalReference(const OUString& aDestContent, std::u16string_view aSrcContent )
{
CPPUNIT_ASSERT(aDestContent.startsWith("'file://"));
diff --git a/unotools/source/i18n/localedatawrapper.cxx b/unotools/source/i18n/localedatawrapper.cxx
index c900de4452c5..3d3bee0d4892 100644
--- a/unotools/source/i18n/localedatawrapper.cxx
+++ b/unotools/source/i18n/localedatawrapper.cxx
@@ -488,9 +488,9 @@ void LocaleDataWrapper::getSecondaryCalendarImpl()
}
}
-bool LocaleDataWrapper::doesSecondaryCalendarUseEC( const OUString& rName ) const
+bool LocaleDataWrapper::doesSecondaryCalendarUseEC( std::u16string_view rName ) const
{
- if (rName.isEmpty())
+ if (rName.empty())
return false;
// Check language tag first to avoid loading all calendars of this locale.
diff --git a/unotools/source/i18n/textsearch.cxx b/unotools/source/i18n/textsearch.cxx
index b6c71aa25c1e..aae6cc573634 100644
--- a/unotools/source/i18n/textsearch.cxx
+++ b/unotools/source/i18n/textsearch.cxx
@@ -304,7 +304,7 @@ bool TextSearch::SearchBackward( const OUString & rStr, sal_Int32* pStart,
return bRet;
}
-void TextSearch::ReplaceBackReferences( OUString& rReplaceStr, const OUString &rStr, const SearchResult& rResult ) const
+void TextSearch::ReplaceBackReferences( OUString& rReplaceStr, std::u16string_view rStr, const SearchResult& rResult ) const
{
if( rResult.subRegExpressions <= 0 )
return;
@@ -318,7 +318,7 @@ void TextSearch::ReplaceBackReferences( OUString& rReplaceStr, const OUString &r
{
sal_Int32 nStart = rResult.startOffset[0];
sal_Int32 nLength = rResult.endOffset[0] - rResult.startOffset[0];
- sBuff.append(std::u16string_view(rStr).substr(nStart, nLength));
+ sBuff.append(rStr.substr(nStart, nLength));
}
else if((i < rReplaceStr.getLength() - 1) && rReplaceStr[i] == '$')
{
@@ -355,7 +355,7 @@ void TextSearch::ReplaceBackReferences( OUString& rReplaceStr, const OUString &r
nSttReg = rResult.endOffset[j];
}
// Copy reference from found string
- sBuff.append(std::u16string_view(rStr).substr(nSttReg, nRegLen));
+ sBuff.append(rStr.substr(nSttReg, nRegLen));
}
i += 1;
}
diff --git a/vbahelper/source/msforms/vbalistcontrolhelper.cxx b/vbahelper/source/msforms/vbalistcontrolhelper.cxx
index 58884dbf62fc..3fffbd5b1941 100644
--- a/vbahelper/source/msforms/vbalistcontrolhelper.cxx
+++ b/vbahelper/source/msforms/vbalistcontrolhelper.cxx
@@ -166,9 +166,9 @@ ListControlHelper::Clear( )
}
void
-ListControlHelper::setRowSource( const OUString& _rowsource )
+ListControlHelper::setRowSource( std::u16string_view _rowsource )
{
- if ( _rowsource.isEmpty() )
+ if ( _rowsource.empty() )
Clear();
}
diff --git a/vbahelper/source/msforms/vbalistcontrolhelper.hxx b/vbahelper/source/msforms/vbalistcontrolhelper.hxx
index dff3e1c33541..e80ba3e857cb 100644
--- a/vbahelper/source/msforms/vbalistcontrolhelper.hxx
+++ b/vbahelper/source/msforms/vbalistcontrolhelper.hxx
@@ -33,7 +33,7 @@ public:
/// @throws css::uno::RuntimeException
void removeItem( const css::uno::Any& index );
/// @throws css::uno::RuntimeException
- void setRowSource( const OUString& _rowsource );
+ void setRowSource( std::u16string_view _rowsource );
/// @throws css::uno::RuntimeException
::sal_Int32 getListCount();
/// @throws css::uno::RuntimeException
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx
index e7dafba16ffc..67a4795fffa9 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx
@@ -1020,13 +1020,13 @@ void ShapeHelper::setTop(double _fTop)
xShape->setPosition(aPoint);
}
-void DebugHelper::basicexception( const css::uno::Exception& ex, ErrCode err, const OUString& /*additionalArgument*/ )
+void DebugHelper::basicexception( const css::uno::Exception& ex, ErrCode err, std::u16string_view /*additionalArgument*/ )
{
// #TODO #FIXME ( do we want to support additionalArg here )
throw css::script::BasicErrorException( ex.Message, css::uno::Reference< css::uno::XInterface >(), sal_uInt32(err), OUString() );
}
-void DebugHelper::basicexception( ErrCode err, const OUString& additionalArgument )
+void DebugHelper::basicexception( ErrCode err, std::u16string_view additionalArgument )
{
basicexception( css::uno::Exception(), err, additionalArgument );
}
@@ -1085,7 +1085,7 @@ uno::Reference< XHelperInterface > getVBADocument( const uno::Reference< frame::
return xIf;
}
-uno::Reference< XHelperInterface > getUnoDocModule( const OUString& aModName, SfxObjectShell const * pShell )
+uno::Reference< XHelperInterface > getUnoDocModule( std::u16string_view aModName, SfxObjectShell const * pShell )
{
uno::Reference< XHelperInterface > xIf;
if ( pShell )
diff --git a/vcl/inc/graphic/Manager.hxx b/vcl/inc/graphic/Manager.hxx
index 73a6676e4d7b..51b68d95c4c4 100644
--- a/vcl/inc/graphic/Manager.hxx
+++ b/vcl/inc/graphic/Manager.hxx
@@ -40,7 +40,8 @@ private:
Manager();
- void registerGraphic(const std::shared_ptr<ImpGraphic>& rImpGraphic, OUString const& rsContext);
+ void registerGraphic(const std::shared_ptr<ImpGraphic>& rImpGraphic,
+ std::u16string_view rsContext);
DECL_LINK(SwapOutTimerHandler, Timer*, void);
diff --git a/vcl/inc/unx/gtk/gtksalmenu.hxx b/vcl/inc/unx/gtk/gtksalmenu.hxx
index 4bac1fe53d62..d9aa403de9bd 100644
--- a/vcl/inc/unx/gtk/gtksalmenu.hxx
+++ b/vcl/inc/unx/gtk/gtksalmenu.hxx
@@ -102,7 +102,7 @@ public:
bool bIsSubmenu );
void NativeSetEnableItem( gchar const * aCommand, gboolean bEnable );
void NativeCheckItem( unsigned nSection, unsigned nItemPos, MenuItemBits bits, gboolean bCheck );
- void NativeSetAccelerator( unsigned nSection, unsigned nItemPos, const vcl::KeyCode& rKeyCode, const OUString& rKeyName );
+ void NativeSetAccelerator( unsigned nSection, unsigned nItemPos, const vcl::KeyCode& rKeyCode, std::u16string_view rKeyName );
static void DispatchCommand(const gchar* pMenuCommand);
static void Activate(const gchar* pMenuCommand);
diff --git a/vcl/qa/cppunit/GraphicDescriptorTest.cxx b/vcl/qa/cppunit/GraphicDescriptorTest.cxx
index eec8f49f94f0..13f51262c233 100644
--- a/vcl/qa/cppunit/GraphicDescriptorTest.cxx
+++ b/vcl/qa/cppunit/GraphicDescriptorTest.cxx
@@ -42,7 +42,7 @@ BitmapEx createBitmap()
return BitmapEx(aBitmap);
}
-void createBitmapAndExportForType(SvStream& rStream, OUString const& sType)
+void createBitmapAndExportForType(SvStream& rStream, std::u16string_view sType)
{
BitmapEx aBitmapEx = createBitmap();
@@ -57,7 +57,7 @@ void createBitmapAndExportForType(SvStream& rStream, OUString const& sType)
void GraphicDescriptorTest::testDetectPNG()
{
SvMemoryStream aStream;
- createBitmapAndExportForType(aStream, "png");
+ createBitmapAndExportForType(aStream, u"png");
GraphicDescriptor aDescriptor(aStream, nullptr);
aDescriptor.Detect(true);
@@ -71,7 +71,7 @@ void GraphicDescriptorTest::testDetectPNG()
void GraphicDescriptorTest::testDetectJPG()
{
SvMemoryStream aStream;
- createBitmapAndExportForType(aStream, "jpg");
+ createBitmapAndExportForType(aStream, u"jpg");
GraphicDescriptor aDescriptor(aStream, nullptr);
aDescriptor.Detect(true);
@@ -85,7 +85,7 @@ void GraphicDescriptorTest::testDetectJPG()
void GraphicDescriptorTest::testDetectGIF()
{
SvMemoryStream aStream;
- createBitmapAndExportForType(aStream, "gif");
+ createBitmapAndExportForType(aStream, u"gif");
GraphicDescriptor aDescriptor(aStream, nullptr);
aDescriptor.Detect(true);
diff --git a/vcl/qa/cppunit/GraphicTest.cxx b/vcl/qa/cppunit/GraphicTest.cxx
index fd669c4d347a..50ff4a133f86 100644
--- a/vcl/qa/cppunit/GraphicTest.cxx
+++ b/vcl/qa/cppunit/GraphicTest.cxx
@@ -90,7 +90,7 @@ BitmapEx createBitmap(bool alpha = false)
}
}
-void createBitmapAndExportForType(SvStream& rStream, OUString const& sType, bool alpha)
+void createBitmapAndExportForType(SvStream& rStream, std::u16string_view sType, bool alpha)
{
BitmapEx aBitmapEx = createBitmap(alpha);
@@ -102,7 +102,7 @@ void createBitmapAndExportForType(SvStream& rStream, OUString const& sType, bool
rStream.Seek(STREAM_SEEK_TO_BEGIN);
}
-Graphic makeUnloadedGraphic(OUString const& sType, bool alpha = false)
+Graphic makeUnloadedGraphic(std::u16string_view sType, bool alpha = false)
{
SvMemoryStream aStream;
GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter();
@@ -181,7 +181,7 @@ char const PDFEXPORT_DATA_DIRECTORY[] = "/vcl/qa/cppunit/pdfexport/data/";
void GraphicTest::testUnloadedGraphic()
{
// make unloaded test graphic
- Graphic aGraphic = makeUnloadedGraphic("png");
+ Graphic aGraphic = makeUnloadedGraphic(u"png");
Graphic aGraphic2 = aGraphic;
// check available
@@ -193,7 +193,7 @@ void GraphicTest::testUnloadedGraphic()
CPPUNIT_ASSERT_EQUAL(true, aGraphic2.isAvailable());
// check GetSizePixel doesn't load graphic
- aGraphic = makeUnloadedGraphic("png");
+ aGraphic = makeUnloadedGraphic(u"png");
CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
CPPUNIT_ASSERT_EQUAL(tools::Long(120), aGraphic.GetSizePixel().Width());
CPPUNIT_ASSERT_EQUAL(tools::Long(100), aGraphic.GetSizePixel().Height());
@@ -210,7 +210,7 @@ void GraphicTest::testUnloadedGraphic()
CPPUNIT_ASSERT_EQUAL(true, aGraphic.isAvailable());
//check Type
- aGraphic = makeUnloadedGraphic("png");
+ aGraphic = makeUnloadedGraphic(u"png");
CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
CPPUNIT_ASSERT_EQUAL(GraphicType::Bitmap, aGraphic.GetType());
CPPUNIT_ASSERT_EQUAL(true, aGraphic.makeAvailable());
@@ -245,7 +245,7 @@ void GraphicTest::testUnloadedGraphicWmf()
BitmapEx aBitmapEx = createBitmap();
SvMemoryStream aStream;
GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter();
- sal_uInt16 nFilterFormat = rGraphicFilter.GetExportFormatNumberForShortName("wmf");
+ sal_uInt16 nFilterFormat = rGraphicFilter.GetExportFormatNumberForShortName(u"wmf");
Graphic aGraphic(aBitmapEx);
aGraphic.SetPrefSize(Size(99, 99));
aGraphic.SetPrefMapMode(MapMode(MapUnit::Map100thMM));
@@ -267,14 +267,14 @@ void GraphicTest::testUnloadedGraphicWmf()
void GraphicTest::testUnloadedGraphicAlpha()
{
// make unloaded test graphic with alpha
- Graphic aGraphic = makeUnloadedGraphic("png", true);
+ Graphic aGraphic = makeUnloadedGraphic(u"png", true);
CPPUNIT_ASSERT_EQUAL(true, aGraphic.IsAlpha());
CPPUNIT_ASSERT_EQUAL(true, aGraphic.IsTransparent());
CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
// make unloaded test graphic without alpha
- aGraphic = makeUnloadedGraphic("png", false);
+ aGraphic = makeUnloadedGraphic(u"png", false);
CPPUNIT_ASSERT_EQUAL(false, aGraphic.IsAlpha());
CPPUNIT_ASSERT_EQUAL(false, aGraphic.IsTransparent());
@@ -301,7 +301,7 @@ void GraphicTest::testUnloadedGraphicSizeUnit()
void GraphicTest::testSwapping()
{
// Prepare Graphic from a PNG image first
- Graphic aGraphic = makeUnloadedGraphic("png");
+ Graphic aGraphic = makeUnloadedGraphic(u"png");
CPPUNIT_ASSERT_EQUAL(GraphicType::Bitmap, aGraphic.GetType());
CPPUNIT_ASSERT_EQUAL(true, aGraphic.makeAvailable());
diff --git a/vcl/qa/cppunit/graphicfilter/filters-test.cxx b/vcl/qa/cppunit/graphicfilter/filters-test.cxx
index 8020848b6e38..fe7485e3944a 100644
--- a/vcl/qa/cppunit/graphicfilter/filters-test.cxx
+++ b/vcl/qa/cppunit/graphicfilter/filters-test.cxx
@@ -39,7 +39,7 @@ public:
const OUString &rURL, const OUString &,
SfxFilterFlags, SotClipboardFormatId, unsigned int) override;
- void checkExportImport(const OUString& aFilterShortName);
+ void checkExportImport(std::u16string_view aFilterShortName);
/**
* Ensure CVEs remain unbroken
@@ -103,7 +103,7 @@ void VclFiltersTest::testScaling()
}
}
-void VclFiltersTest::checkExportImport(const OUString& aFilterShortName)
+void VclFiltersTest::checkExportImport(std::u16string_view aFilterShortName)
{
Bitmap aBitmap( Size( 100, 100 ), 24 );
aBitmap.Erase(COL_WHITE);
@@ -139,11 +139,11 @@ void VclFiltersTest::checkExportImport(const OUString& aFilterShortName)
void VclFiltersTest::testExportImport()
{
fprintf(stderr, "Check ExportImport JPG\n");
- checkExportImport("jpg");
+ checkExportImport(u"jpg");
fprintf(stderr, "Check ExportImport PNG\n");
- checkExportImport("png");
+ checkExportImport(u"png");
fprintf(stderr, "Check ExportImport BMP\n");
- checkExportImport("bmp");
+ checkExportImport(u"bmp");
}
void VclFiltersTest::testCVEs()
diff --git a/vcl/source/filter/FilterConfigCache.cxx b/vcl/source/filter/FilterConfigCache.cxx
index 797466366d2a..a315c0279b69 100644
--- a/vcl/source/filter/FilterConfigCache.cxx
+++ b/vcl/source/filter/FilterConfigCache.cxx
@@ -306,7 +306,7 @@ OUString FilterConfigCache::GetImportFilterName( sal_uInt16 nFormat )
return OUString();
}
-sal_uInt16 FilterConfigCache::GetImportFormatNumber( const OUString& rFormatName )
+sal_uInt16 FilterConfigCache::GetImportFormatNumber( std::u16string_view rFormatName )
{
sal_uInt16 nPos = 0;
for (auto const& elem : aImport)
@@ -319,7 +319,7 @@ sal_uInt16 FilterConfigCache::GetImportFormatNumber( const OUString& rFormatName
}
/// get the index of the filter that matches this extension
-sal_uInt16 FilterConfigCache::GetImportFormatNumberForExtension( const OUString& rExt )
+sal_uInt16 FilterConfigCache::GetImportFormatNumberForExtension( std::u16string_view rExt )
{
sal_uInt16 nPos = 0;
for (auto const& elem : aImport)
@@ -334,7 +334,7 @@ sal_uInt16 FilterConfigCache::GetImportFormatNumberForExtension( const OUString&
return GRFILTER_FORMAT_NOTFOUND;
}
-sal_uInt16 FilterConfigCache::GetImportFormatNumberForShortName( const OUString& rShortName )
+sal_uInt16 FilterConfigCache::GetImportFormatNumberForShortName( std::u16string_view rShortName )
{
sal_uInt16 nPos = 0;
for (auto & elem : aImport)
@@ -346,7 +346,7 @@ sal_uInt16 FilterConfigCache::GetImportFormatNumberForShortName( const OUString&
return GRFILTER_FORMAT_NOTFOUND;
}
-sal_uInt16 FilterConfigCache::GetImportFormatNumberForTypeName( const OUString& rType )
+sal_uInt16 FilterConfigCache::GetImportFormatNumberForTypeName( std::u16string_view rType )
{
sal_uInt16 nPos = 0;
for (auto const& elem : aImport)
@@ -435,7 +435,7 @@ OUString FilterConfigCache::GetExportFilterName( sal_uInt16 nFormat )
return OUString();
}
-sal_uInt16 FilterConfigCache::GetExportFormatNumber(const OUString& rFormatName)
+sal_uInt16 FilterConfigCache::GetExportFormatNumber(std::u16string_view rFormatName)
{
sal_uInt16 nPos = 0;
for (auto const& elem : aExport)
@@ -447,7 +447,7 @@ sal_uInt16 FilterConfigCache::GetExportFormatNumber(const OUString& rFormatName)
return GRFILTER_FORMAT_NOTFOUND;
}
-sal_uInt16 FilterConfigCache::GetExportFormatNumberForMediaType( const OUString& rMediaType )
+sal_uInt16 FilterConfigCache::GetExportFormatNumberForMediaType( std::u16string_view rMediaType )
{
sal_uInt16 nPos = 0;
for (auto const& elem : aExport)
@@ -459,7 +459,7 @@ sal_uInt16 FilterConfigCache::GetExportFormatNumberForMediaType( const OUString&
return GRFILTER_FORMAT_NOTFOUND;
}
-sal_uInt16 FilterConfigCache::GetExportFormatNumberForShortName( const OUString& rShortName )
+sal_uInt16 FilterConfigCache::GetExportFormatNumberForShortName( std::u16string_view rShortName )
{
sal_uInt16 nPos = 0;
for (auto & elem : aExport)
@@ -471,7 +471,7 @@ sal_uInt16 FilterConfigCache::GetExportFormatNumberForShortName( const OUString&
return GRFILTER_FORMAT_NOTFOUND;
}
-sal_uInt16 FilterConfigCache::GetExportFormatNumberForTypeName( const OUString& rType )
+sal_uInt16 FilterConfigCache::GetExportFormatNumberForTypeName( std::u16string_view rType )
{
sal_uInt16 nPos = 0;
for (auto const& elem : aExport)
diff --git a/vcl/source/filter/FilterConfigCache.hxx b/vcl/source/filter/FilterConfigCache.hxx
index ec1c2dc46743..4860bbc6f38b 100644
--- a/vcl/source/filter/FilterConfigCache.hxx
+++ b/vcl/source/filter/FilterConfigCache.hxx
@@ -65,10 +65,10 @@ public:
sal_uInt16 GetImportFormatCount() const
{ return sal::static_int_cast< sal_uInt16 >(aImport.size()); };
- sal_uInt16 GetImportFormatNumber( const OUString& rFormatName );
- sal_uInt16 GetImportFormatNumberForShortName( const OUString& rShortName );
- sal_uInt16 GetImportFormatNumberForTypeName( const OUString& rType );
- sal_uInt16 GetImportFormatNumberForExtension( const OUString& rExt );
+ sal_uInt16 GetImportFormatNumber( std::u16string_view rFormatName );
+ sal_uInt16 GetImportFormatNumberForShortName( std::u16string_view rShortName );
+ sal_uInt16 GetImportFormatNumberForTypeName( std::u16string_view rType );
+ sal_uInt16 GetImportFormatNumberForExtension( std::u16string_view rExt );
OUString GetImportFilterName( sal_uInt16 nFormat );
OUString GetImportFormatName( sal_uInt16 nFormat );
OUString GetImportFormatExtension( sal_uInt16 nFormat, sal_Int32 nEntry = 0);
@@ -84,10 +84,10 @@ public:
sal_uInt16 GetExportFormatCount() const
{ return sal::static_int_cast< sal_uInt16 >(aExport.size()); };
- sal_uInt16 GetExportFormatNumber( const OUString& rFormatName );
- sal_uInt16 GetExportFormatNumberForMediaType( const OUString& rMediaType );
- sal_uInt16 GetExportFormatNumberForShortName( const OUString& rShortName );
- sal_uInt16 GetExportFormatNumberForTypeName( const OUString& rType );
+ sal_uInt16 GetExportFormatNumber( std::u16string_view rFormatName );
+ sal_uInt16 GetExportFormatNumberForMediaType( std::u16string_view rMediaType );
+ sal_uInt16 GetExportFormatNumberForShortName( std::u16string_view rShortName );
+ sal_uInt16 GetExportFormatNumberForTypeName( std::u16string_view rType );
OUString GetExportFilterName( sal_uInt16 nFormat );
OUString GetExportFormatName( sal_uInt16 nFormat );
OUString GetExportFormatExtension( sal_uInt16 nFormat, sal_Int32 nEntry = 0 );
diff --git a/vcl/source/filter/GraphicNativeTransform.cxx b/vcl/source/filter/GraphicNativeTransform.cxx
index d6c77c71caba..d1bb5abb547b 100644
--- a/vcl/source/filter/GraphicNativeTransform.cxx
+++ b/vcl/source/filter/GraphicNativeTransform.cxx
@@ -57,11 +57,11 @@ void GraphicNativeTransform::rotate(Degree10 aInputRotation)
}
else if (aLink.GetType() == GfxLinkType::NativePng)
{
- rotateGeneric(aRotation, "png");
+ rotateGeneric(aRotation, u"png");
}
else if (aLink.GetType() == GfxLinkType::NativeGif)
{
- rotateGeneric(aRotation, "gif");
+ rotateGeneric(aRotation, u"gif");
}
else if (aLink.GetType() == GfxLinkType::NONE)
{
@@ -83,7 +83,7 @@ bool GraphicNativeTransform::rotateBitmapOnly(Degree10 aRotation)
return true;
}
-bool GraphicNativeTransform::rotateGeneric(Degree10 aRotation, const OUString& aType)
+bool GraphicNativeTransform::rotateGeneric(Degree10 aRotation, std::u16string_view aType)
{
// Can't rotate animations yet
if (mrGraphic.IsAnimated())
@@ -124,7 +124,7 @@ void GraphicNativeTransform::rotateJPEG(Degree10 aRotation)
if (aBitmap.GetSizePixel().Width() % 16 != 0 || aBitmap.GetSizePixel().Height() % 16 != 0)
{
- rotateGeneric(aRotation, "png");
+ rotateGeneric(aRotation, u"png");
}
else
{
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 6d0252648d77..6d983008544f 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -838,17 +838,17 @@ sal_uInt16 GraphicFilter::GetImportFormatCount() const
return pConfig->GetImportFormatCount();
}
-sal_uInt16 GraphicFilter::GetImportFormatNumber( const OUString& rFormatName )
+sal_uInt16 GraphicFilter::GetImportFormatNumber( std::u16string_view rFormatName )
{
return pConfig->GetImportFormatNumber( rFormatName );
}
-sal_uInt16 GraphicFilter::GetImportFormatNumberForShortName( const OUString& rShortName )
+sal_uInt16 GraphicFilter::GetImportFormatNumberForShortName( std::u16string_view rShortName )
{
return pConfig->GetImportFormatNumberForShortName( rShortName );
}
-sal_uInt16 GraphicFilter::GetImportFormatNumberForTypeName( const OUString& rType )
+sal_uInt16 GraphicFilter::GetImportFormatNumberForTypeName( std::u16string_view rType )
{
return pConfig->GetImportFormatNumberForTypeName( rType );
}
@@ -885,17 +885,17 @@ sal_uInt16 GraphicFilter::GetExportFormatCount() const
return pConfig->GetExportFormatCount();
}
-sal_uInt16 GraphicFilter::GetExportFormatNumber( const OUString& rFormatName )
+sal_uInt16 GraphicFilter::GetExportFormatNumber( std::u16string_view rFormatName )
{
return pConfig->GetExportFormatNumber( rFormatName );
}
-sal_uInt16 GraphicFilter::GetExportFormatNumberForMediaType( const OUString& rMediaType )
+sal_uInt16 GraphicFilter::GetExportFormatNumberForMediaType( std::u16string_view rMediaType )
{
return pConfig->GetExportFormatNumberForMediaType( rMediaType );
}
-sal_uInt16 GraphicFilter::GetExportFormatNumberForShortName( const OUString& rShortName )
+sal_uInt16 GraphicFilter::GetExportFormatNumberForShortName( std::u16string_view rShortName )
{
return pConfig->GetExportFormatNumberForShortName( rShortName );
}
@@ -905,7 +905,7 @@ OUString GraphicFilter::GetExportInternalFilterName( sal_uInt16 nFormat )
return pConfig->GetExportInternalFilterName( nFormat );
}
-sal_uInt16 GraphicFilter::GetExportFormatNumberForTypeName( const OUString& rType )
+sal_uInt16 GraphicFilter::GetExportFormatNumberForTypeName( std::u16string_view rType )
{
return pConfig->GetExportFormatNumberForTypeName( rType );
}
@@ -2210,7 +2210,7 @@ IMPL_LINK( GraphicFilter, FilterCallback, ConvertData&, rData, bool )
bool bRet = false;
sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW;
- OString aShortName;
+ OUString aShortName;
css::uno::Sequence< css::beans::PropertyValue > aFilterData;
switch( rData.mnFormat )
{
@@ -2232,7 +2232,7 @@ IMPL_LINK( GraphicFilter, FilterCallback, ConvertData&, rData, bool )
if( GraphicType::NONE == rData.maGraphic.GetType() || rData.maGraphic.GetReaderContext() ) // Import
{
// Import
- nFormat = GetImportFormatNumberForShortName( OStringToOUString( aShortName, RTL_TEXTENCODING_UTF8) );
+ nFormat = GetImportFormatNumberForShortName( aShortName );
bRet = ImportGraphic( rData.maGraphic, OUString(), rData.mrStm, nFormat ) == ERRCODE_NONE;
}
else if( !aShortName.isEmpty() )
@@ -2247,7 +2247,7 @@ IMPL_LINK( GraphicFilter, FilterCallback, ConvertData&, rData, bool )
aFilterData[aFilterData.getLength() - 1].Value <<= static_cast<sal_Int32>(1);
}
#endif
- nFormat = GetExportFormatNumberForShortName( OStringToOUString(aShortName, RTL_TEXTENCODING_UTF8) );
+ nFormat = GetExportFormatNumberForShortName( aShortName );
bRet = ExportGraphic( rData.maGraphic, OUString(), rData.mrStm, nFormat, &aFilterData ) == ERRCODE_NONE;
}
@@ -2330,7 +2330,7 @@ ErrCode GraphicFilter::compressAsPNG(const Graphic& rGraphic, SvStream& rOutputS
aFilterData[0].Name = "Compression";
aFilterData[0].Value <<= sal_uInt32(9);
- sal_uInt16 nFilterFormat = GetExportFormatNumberForShortName("PNG");
+ sal_uInt16 nFilterFormat = GetExportFormatNumberForShortName(u"PNG");
return ExportGraphic(rGraphic, OUString(), rOutputStream, nFilterFormat, &aFilterData);
}
diff --git a/vcl/source/graphic/GraphicObject.cxx b/vcl/source/graphic/GraphicObject.cxx
index a34e8a064d46..6728ab5d170e 100644
--- a/vcl/source/graphic/GraphicObject.cxx
+++ b/vcl/source/graphic/GraphicObject.cxx
@@ -607,7 +607,7 @@ void GraphicObject::SetGraphic( const Graphic& rGraphic, const GraphicObject* /*
maGraphic = rGraphic;
}
-void GraphicObject::SetGraphic( const Graphic& rGraphic, const OUString& /*rLink*/ )
+void GraphicObject::SetGraphic( const Graphic& rGraphic, std::u16string_view /*rLink*/ )
{
SetGraphic( rGraphic );
}
diff --git a/vcl/source/graphic/Manager.cxx b/vcl/source/graphic/Manager.cxx
index 7a25f8e41b04..6bcd709480e8 100644
--- a/vcl/source/graphic/Manager.cxx
+++ b/vcl/source/graphic/Manager.cxx
@@ -125,7 +125,7 @@ IMPL_LINK(Manager, SwapOutTimerHandler, Timer*, pTimer, void)
}
void Manager::registerGraphic(const std::shared_ptr<ImpGraphic>& pImpGraphic,
- OUString const& /*rsContext*/)
+ std::u16string_view /*rsContext*/)
{
std::scoped_lock<std::recursive_mutex> aGuard(maMutex);
@@ -167,28 +167,28 @@ void Manager::unregisterGraphic(ImpGraphic* pImpGraphic)
std::shared_ptr<ImpGraphic> Manager::copy(std::shared_ptr<ImpGraphic> const& rImpGraphicPtr)
{
auto pReturn = std::make_shared<ImpGraphic>(*rImpGraphicPtr);
- registerGraphic(pReturn, "Copy");
+ registerGraphic(pReturn, u"Copy");
return pReturn;
}
std::shared_ptr<ImpGraphic> Manager::newInstance()
{
auto pReturn = std::make_shared<ImpGraphic>();
- registerGraphic(pReturn, "Empty");
+ registerGraphic(pReturn, u"Empty");
return pReturn;
}
std::shared_ptr<ImpGraphic> Manager::newInstance(const BitmapEx& rBitmapEx)
{
auto pReturn = std::make_shared<ImpGraphic>(rBitmapEx);
- registerGraphic(pReturn, "BitmapEx");
+ registerGraphic(pReturn, u"BitmapEx");
return pReturn;
}
std::shared_ptr<ImpGraphic> Manager::newInstance(const Animation& rAnimation)
{
auto pReturn = std::make_shared<ImpGraphic>(rAnimation);
- registerGraphic(pReturn, "Animation");
+ registerGraphic(pReturn, u"Animation");
return pReturn;
}
@@ -196,21 +196,21 @@ std::shared_ptr<ImpGraphic>
Manager::newInstance(const std::shared_ptr<VectorGraphicData>& rVectorGraphicDataPtr)
{
auto pReturn = std::make_shared<ImpGraphic>(rVectorGraphicDataPtr);
- registerGraphic(pReturn, "VectorGraphic");
+ registerGraphic(pReturn, u"VectorGraphic");
return pReturn;
}
std::shared_ptr<ImpGraphic> Manager::newInstance(const GDIMetaFile& rMetaFile)
{
auto pReturn = std::make_shared<ImpGraphic>(rMetaFile);
- registerGraphic(pReturn, "Metafile");
+ registerGraphic(pReturn, u"Metafile");
return pReturn;
}
std::shared_ptr<ImpGraphic> Manager::newInstance(const GraphicExternalLink& rGraphicLink)
{
auto pReturn = std::make_shared<ImpGraphic>(rGraphicLink);
- registerGraphic(pReturn, "GraphicExternalLink");
+ registerGraphic(pReturn, u"GraphicExternalLink");
return pReturn;
}
diff --git a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
index 1015fcf67992..815d0dbe5e06 100644
--- a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
@@ -1880,7 +1880,7 @@ GtkFileFilter* SalGtkFilePicker::implAddFilter( const OUString& rFilter, const O
return filter;
}
-void SalGtkFilePicker::implAddFilterGroup( const OUString& /*_rFilter*/, const Sequence< StringPair >& _rFilters )
+void SalGtkFilePicker::implAddFilterGroup( std::u16string_view /*_rFilter*/, const Sequence< StringPair >& _rFilters )
{
// Gtk+ has no filter group concept I think so ...
// implAddFilter( _rFilter, String() );
diff --git a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.hxx b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.hxx
index 39bb6815be11..ac4959e4a571 100644
--- a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.hxx
+++ b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.hxx
@@ -213,7 +213,7 @@ class SalGtkFilePicker : public SalGtkPicker, public SalGtkFilePicker_Base
void implChangeType( GtkTreeSelection *selection );
GtkFileFilter * implAddFilter( const OUString& rFilter, const OUString& rType );
- void implAddFilterGroup( const OUString& rFilter,
+ void implAddFilterGroup( std::u16string_view rFilter,
const css::uno::Sequence< css::beans::StringPair>& _rFilters );
void updateCurrentFilterFromName(const gchar* filtername);
void unselect_type();
diff --git a/vcl/unx/gtk3/gtk3gtksalmenu.cxx b/vcl/unx/gtk3/gtk3gtksalmenu.cxx
index f71269470f15..195e8ce071d2 100644
--- a/vcl/unx/gtk3/gtk3gtksalmenu.cxx
+++ b/vcl/unx/gtk3/gtk3gtksalmenu.cxx
@@ -1067,11 +1067,11 @@ void GtkSalMenu::NativeSetItemIcon( unsigned nSection, unsigned nItemPos, const
#endif
}
-void GtkSalMenu::NativeSetAccelerator( unsigned nSection, unsigned nItemPos, const vcl::KeyCode& rKeyCode, const OUString& rKeyName )
+void GtkSalMenu::NativeSetAccelerator( unsigned nSection, unsigned nItemPos, const vcl::KeyCode& rKeyCode, std::u16string_view rKeyName )
{
SolarMutexGuard aGuard;
- if ( rKeyName.isEmpty() )
+ if ( rKeyName.empty() )
return;
guint nKeyCode;
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index d1d0309a6b83..9ec336f263eb 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -4553,7 +4553,7 @@ void DomainMapper_Impl::handleAutoNum
}
void DomainMapper_Impl::handleAuthor
- (OUString const& rFirstParam,
+ (std::u16string_view rFirstParam,
uno::Reference< beans::XPropertySet > const& xFieldProperties,
FieldId eFieldId )
{
@@ -4561,7 +4561,7 @@ void DomainMapper_Impl::handleAuthor
xFieldProperties->setPropertyValue
( getPropertyName(PROP_FULL_NAME), uno::makeAny( true ));
- if (!rFirstParam.isEmpty())
+ if (!rFirstParam.empty())
{
xFieldProperties->setPropertyValue(
getPropertyName( PROP_IS_FIXED ),
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index 575f6fd1876f..e3501da2d342 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -833,7 +833,7 @@ public:
css::uno::Reference< css::uno::XInterface > const & xFieldInterface,
css::uno::Reference< css::beans::XPropertySet > const& xFieldProperties);
static void handleAuthor
- (OUString const& rFirstParam,
+ (std::u16string_view rFirstParam,
css::uno::Reference< css::beans::XPropertySet > const& xFieldProperties,
FieldId eFieldId);
void handleDocProperty
diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx
index 96265c78bb9f..cf0bfcf2a1d6 100644
--- a/xmloff/source/draw/ximppage.cxx
+++ b/xmloff/source/draw/ximppage.cxx
@@ -295,7 +295,7 @@ SvXMLImportContextRef SdXMLGenericPageContext::CreateChildContext( sal_uInt16 nP
else if( nPrefix == XML_NAMESPACE_OFFICE && IsXMLToken( rLocalName, XML_FORMS ) )
{
if( GetImport().IsFormsSupported() )
- xContext = xmloff::OFormLayerXMLImport::createOfficeFormsContext( GetImport(), nPrefix, rLocalName );
+ xContext = xmloff::OFormLayerXMLImport::createOfficeFormsContext( GetImport() );
}
else if( ((nPrefix == XML_NAMESPACE_OFFICE) || (nPrefix == XML_NAMESPACE_OFFICE_EXT)) && IsXMLToken( rLocalName, XML_ANNOTATION ) )
{
diff --git a/xmloff/source/forms/formlayerimport.cxx b/xmloff/source/forms/formlayerimport.cxx
index 8fa8de921467..400466bfdc4d 100644
--- a/xmloff/source/forms/formlayerimport.cxx
+++ b/xmloff/source/forms/formlayerimport.cxx
@@ -64,9 +64,7 @@ namespace xmloff
}
SvXMLImportContext* OFormLayerXMLImport::createOfficeFormsContext(
- SvXMLImport& _rImport,
- sal_uInt16 /*_nPrefix*/,
- const OUString& /*_rLocalName*/)
+ SvXMLImport& _rImport)
{
return OFormLayerXMLImport_Impl::createOfficeFormsContext(_rImport);
}
diff --git a/xmloff/source/table/XMLTableImport.cxx b/xmloff/source/table/XMLTableImport.cxx
index 126a9d04b083..a40af746ab73 100644
--- a/xmloff/source/table/XMLTableImport.cxx
+++ b/xmloff/source/table/XMLTableImport.cxx
@@ -104,7 +104,7 @@ public:
void InitColumns();
- SvXMLImportContextRef ImportColumn( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList );
+ SvXMLImportContextRef ImportColumn( sal_uInt16 nPrefix, std::u16string_view rLocalName, const Reference< XAttributeList >& xAttrList );
SvXMLImportContext * ImportRow( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList );
SvXMLImportContextRef ImportCell( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList );
@@ -368,7 +368,7 @@ XMLTableImportContext::XMLTableImportContext( const rtl::Reference< XMLTableImpo
{
}
-SvXMLImportContextRef XMLTableImportContext::ImportColumn( sal_uInt16 /*nPrefix*/, const OUString& /*rLocalName*/, const Reference< XAttributeList >& xAttrList )
+SvXMLImportContextRef XMLTableImportContext::ImportColumn( sal_uInt16 /*nPrefix*/, std::u16string_view /*rLocalName*/, const Reference< XAttributeList >& xAttrList )
{
if( mxColumns.is() && (mnCurrentRow == -1) ) try
{
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index 0705ee7cc0fb..2edf2d8f3f37 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -2283,7 +2283,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext(
break;
case XML_TOK_TEXT_FORMS:
- pContext = xmloff::OFormLayerXMLImport::createOfficeFormsContext(rImport, nPrefix, rLocalName);
+ pContext = xmloff::OFormLayerXMLImport::createOfficeFormsContext(rImport);
bContent = false;
break;
diff --git a/xmlsecurity/inc/macrosecurity.hxx b/xmlsecurity/inc/macrosecurity.hxx
index 1081dc8bba0f..74d35aeddee3 100644
--- a/xmlsecurity/inc/macrosecurity.hxx
+++ b/xmlsecurity/inc/macrosecurity.hxx
@@ -115,7 +115,7 @@ private:
void FillCertLB(const bool bShowWarnings = false);
void ImplCheckButtons();
- void ShowBrokenCertificateError(const OUString& rData);
+ void ShowBrokenCertificateError(std::u16string_view rData);
public:
MacroSecurityTrustedSourcesTP(weld::Container* pParent, MacroSecurity* pDlg);
diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx b/xmlsecurity/source/dialogs/macrosecurity.cxx
index 39863ed8faa2..540a62eda813 100644
--- a/xmlsecurity/source/dialogs/macrosecurity.cxx
+++ b/xmlsecurity/source/dialogs/macrosecurity.cxx
@@ -197,7 +197,7 @@ void MacroSecurityTrustedSourcesTP::ImplCheckButtons()
m_xRemoveLocPB->set_sensitive( bLocationSelected && !mbURLsReadonly);
}
-void MacroSecurityTrustedSourcesTP::ShowBrokenCertificateError(const OUString& rData)
+void MacroSecurityTrustedSourcesTP::ShowBrokenCertificateError(std::u16string_view rData)
{
OUString aMsg = XsResId(STR_BROKEN_MACRO_CERTIFICATE_DATA);
aMsg = aMsg.replaceFirst("%{data}", rData);