summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--avmedia/source/framework/MediaControlBase.cxx2
-rw-r--r--basic/source/inc/runtime.hxx2
-rw-r--r--basic/source/runtime/dllmgr-none.cxx10
-rw-r--r--basic/source/runtime/dllmgr-x64.cxx2
-rw-r--r--basic/source/runtime/dllmgr-x86.cxx2
-rw-r--r--basic/source/runtime/dllmgr.hxx2
-rw-r--r--basic/source/runtime/runtime.cxx4
-rw-r--r--canvas/inc/parametricpolypolygon.hxx2
-rw-r--r--canvas/source/tools/parametricpolypolygon.cxx16
-rw-r--r--chart2/source/controller/main/ChartController.cxx98
-rw-r--r--chart2/source/controller/main/ChartController_Properties.cxx8
-rw-r--r--chart2/source/controller/sidebar/ChartColorWrapper.cxx6
-rw-r--r--chart2/source/controller/sidebar/ChartColorWrapper.hxx2
-rw-r--r--chart2/source/inc/InternalDataProvider.hxx2
-rw-r--r--chart2/source/inc/RegressionCurveHelper.hxx4
-rw-r--r--chart2/source/tools/InternalDataProvider.cxx14
-rw-r--r--chart2/source/tools/RegressionCurveHelper.cxx30
-rw-r--r--chart2/source/view/inc/VDataSeries.hxx2
-rw-r--r--chart2/source/view/main/VDataSeries.cxx20
-rw-r--r--comphelper/qa/unit/test_hash.cxx2
-rw-r--r--comphelper/source/misc/docpasswordhelper.cxx14
-rw-r--r--compilerplugins/clang/stringviewparam.cxx15
-rw-r--r--compilerplugins/clang/test/stringviewparam.cxx10
-rw-r--r--configmgr/source/components.cxx4
-rw-r--r--configmgr/source/components.hxx2
-rw-r--r--connectivity/source/drivers/firebird/Util.cxx6
-rw-r--r--connectivity/source/drivers/mork/MConnection.hxx2
-rw-r--r--cui/source/customize/SvxConfigPageHelper.cxx28
-rw-r--r--cui/source/customize/SvxNotebookbarConfigPage.cxx28
-rw-r--r--cui/source/customize/cfg.cxx4
-rw-r--r--cui/source/inc/SvxConfigPageHelper.hxx2
-rw-r--r--cui/source/inc/cfg.hxx4
-rw-r--r--cui/source/options/optlingu.cxx8
-rw-r--r--cui/source/options/treeopt.cxx16
-rw-r--r--dbaccess/source/filter/hsqldb/createparser.cxx44
-rw-r--r--desktop/source/deployment/manager/dp_extensionmanager.cxx12
-rw-r--r--desktop/source/deployment/manager/dp_extensionmanager.hxx2
-rw-r--r--desktop/source/deployment/misc/dp_misc.cxx8
-rw-r--r--desktop/source/deployment/misc/dp_platform.cxx82
-rw-r--r--desktop/source/lib/init.cxx4
-rw-r--r--desktop/source/migration/migration.cxx28
-rw-r--r--desktop/source/migration/migration_impl.hxx4
-rw-r--r--filter/source/storagefilterdetect/filterdetect.cxx54
-rw-r--r--forms/source/component/ImageControl.cxx4
-rw-r--r--fpicker/source/office/fileview.cxx4
-rw-r--r--framework/inc/targets.h12
-rw-r--r--framework/inc/uielement/statusbarmerger.hxx2
-rw-r--r--framework/inc/xml/acceleratorconfigurationreader.hxx4
-rw-r--r--framework/source/inc/loadenv/targethelper.hxx2
-rw-r--r--framework/source/loadenv/targethelper.cxx2
-rw-r--r--framework/source/uielement/statusbarmerger.cxx8
-rw-r--r--framework/source/uielement/styletoolbarcontroller.cxx18
-rw-r--r--framework/source/xml/acceleratorconfigurationreader.cxx20
-rw-r--r--i18nlangtag/qa/cppunit/test_languagetag.cxx122
-rw-r--r--i18npool/inc/numberformatcode.hxx4
-rw-r--r--i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx4
-rw-r--r--i18npool/source/localedata/LocaleNode.hxx2
-rw-r--r--i18npool/source/localedata/filewriter.cxx4
-rw-r--r--i18npool/source/numberformatcode/numberformatcode.cxx26
-rw-r--r--include/avmedia/MediaControlBase.hxx2
-rw-r--r--include/comphelper/docpasswordhelper.hxx6
-rw-r--r--include/editeng/unoprnms.hxx16
-rw-r--r--include/linguistic/misc.hxx8
-rw-r--r--include/oox/core/filterdetect.hxx2
-rw-r--r--include/oox/drawingml/color.hxx2
-rw-r--r--include/oox/dump/dumperbase.hxx4
-rw-r--r--include/oox/export/drawingml.hxx2
-rw-r--r--include/oox/helper/attributelist.hxx2
-rw-r--r--include/oox/ppt/slidetransition.hxx2
-rw-r--r--include/sfx2/charwin.hxx2
-rw-r--r--include/sfx2/infobar.hxx2
-rw-r--r--include/sfx2/lokhelper.hxx2
-rw-r--r--include/sfx2/templatedlglocalview.hxx2
-rw-r--r--include/sfx2/templatelocalview.hxx4
-rw-r--r--include/svx/SvxPresetListBox.hxx2
-rw-r--r--include/svx/charmap.hxx2
-rw-r--r--include/svx/imapdlg.hxx2
-rw-r--r--include/unotools/moduleoptions.hxx4
-rw-r--r--include/vcl/IconThemeInfo.hxx2
-rw-r--r--include/vcl/builder.hxx2
-rw-r--r--include/xmloff/odffields.hxx4
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx4
-rw-r--r--linguistic/source/convdicxml.cxx6
-rw-r--r--linguistic/source/lngsvcmgr.cxx6
-rw-r--r--linguistic/source/lngsvcmgr.hxx2
-rw-r--r--oox/source/core/filterdetect.cxx32
-rw-r--r--oox/source/crypto/AgileEngine.cxx10
-rw-r--r--oox/source/drawingml/chart/seriesconverter.cxx14
-rw-r--r--oox/source/drawingml/color.cxx58
-rw-r--r--oox/source/dump/dumperbase.cxx36
-rw-r--r--oox/source/export/chartexport.cxx42
-rw-r--r--oox/source/export/drawingml.cxx20
-rw-r--r--oox/source/helper/attributelist.cxx4
-rw-r--r--oox/source/ppt/slidetransition.cxx4
-rw-r--r--reportdesign/inc/strings.hxx4
-rw-r--r--reportdesign/source/core/sdr/formatnormalizer.cxx8
-rw-r--r--reportdesign/source/core/sdr/formatnormalizer.hxx4
-rw-r--r--reportdesign/source/ui/dlg/Condition.cxx2
-rw-r--r--reportdesign/source/ui/dlg/Condition.hxx2
-rw-r--r--reportdesign/source/ui/dlg/Navigator.cxx2
-rw-r--r--reportdesign/source/ui/inc/ReportController.hxx2
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx2
-rw-r--r--sax/qa/cppunit/xmlimport.cxx10
-rw-r--r--sc/inc/styleuno.hxx2
-rw-r--r--sc/inc/tabprotection.hxx2
-rw-r--r--sc/source/core/data/tabprotection.cxx10
-rw-r--r--sc/source/core/inc/addinhelpid.hxx4
-rw-r--r--sc/source/core/tool/addinhelpid.cxx8
-rw-r--r--sc/source/filter/html/htmlexp.cxx6
-rw-r--r--sc/source/filter/inc/htmlexp.hxx2
-rw-r--r--sc/source/filter/lotus/lotform.cxx4
-rw-r--r--sc/source/filter/xml/XMLTableShapeImportHelper.cxx4
-rw-r--r--sc/source/filter/xml/XMLTableShapeImportHelper.hxx2
-rw-r--r--sc/source/filter/xml/xmlcondformat.cxx16
-rw-r--r--sc/source/ui/unoobj/styleuno.cxx6
-rw-r--r--sc/source/ui/vba/vbaworkbooks.cxx4
-rw-r--r--sc/source/ui/vba/vbaworkbooks.hxx2
-rw-r--r--sd/source/core/CustomAnimationEffect.cxx4
-rw-r--r--sd/source/filter/eppt/pptexanimations.cxx40
-rw-r--r--sd/source/filter/eppt/pptexanimations.hxx2
-rw-r--r--sd/source/ui/animations/CustomAnimationPane.cxx40
-rw-r--r--sd/source/ui/annotations/annotationmanager.cxx2
-rw-r--r--sd/source/ui/func/fuconbez.cxx8
-rw-r--r--sd/source/ui/func/fuconrec.cxx8
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx28
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.hxx2
-rw-r--r--sdext/source/presenter/PresenterBitmapContainer.cxx8
-rw-r--r--sdext/source/presenter/PresenterBitmapContainer.hxx2
-rw-r--r--sdext/source/presenter/PresenterTheme.cxx6
-rw-r--r--sfx2/inc/recentdocsview.hxx2
-rw-r--r--sfx2/source/appl/newhelp.cxx6
-rw-r--r--sfx2/source/appl/newhelp.hxx6
-rw-r--r--sfx2/source/control/charwin.cxx2
-rw-r--r--sfx2/source/control/recentdocsview.cxx18
-rw-r--r--sfx2/source/control/templatedlglocalview.cxx2
-rw-r--r--sfx2/source/control/templatelocalview.cxx20
-rw-r--r--sfx2/source/control/templatesearchview.cxx2
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx20
-rw-r--r--sfx2/source/dialog/infobar.cxx14
-rw-r--r--sfx2/source/doc/doctemplates.cxx6
-rw-r--r--sfx2/source/doc/sfxmodelfactory.cxx4
-rw-r--r--sfx2/source/inc/sfxurlrelocator.hxx2
-rw-r--r--sfx2/source/inc/templatesearchview.hxx2
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx16
-rw-r--r--sfx2/source/view/lokhelper.cxx8
-rw-r--r--slideshow/source/engine/shapes/shapeimporter.cxx14
-rw-r--r--slideshow/source/inc/shapeimporter.hxx4
-rw-r--r--svtools/source/filter/exportdialog.cxx20
-rw-r--r--svx/inc/galbrws2.hxx2
-rw-r--r--svx/source/dialog/ClassificationDialog.cxx2
-rw-r--r--svx/source/dialog/_contdlg.cxx4
-rw-r--r--svx/source/dialog/charmap.cxx2
-rw-r--r--svx/source/dialog/contimp.hxx4
-rw-r--r--svx/source/dialog/imapdlg.cxx2
-rw-r--r--svx/source/form/datanavi.cxx4
-rw-r--r--svx/source/gallery2/galbrws1.cxx2
-rw-r--r--svx/source/gallery2/galbrws1.hxx2
-rw-r--r--svx/source/gallery2/galbrws2.cxx2
-rw-r--r--svx/source/inc/datanavi.hxx4
-rw-r--r--svx/source/sidebar/line/LinePropertyPanelBase.cxx4
-rw-r--r--svx/source/stbctrls/pszctrl.cxx4
-rw-r--r--svx/source/stbctrls/selctrl.cxx4
-rw-r--r--svx/source/tbxctrls/SvxPresetListBox.cxx2
-rw-r--r--svx/source/xoutdev/xattr.cxx14
-rw-r--r--sw/inc/textboxhelper.hxx2
-rw-r--r--sw/inc/unocrsrhelper.hxx6
-rw-r--r--sw/inc/unoprnms.hxx2
-rw-r--r--sw/inc/unotextrange.hxx2
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx6
-rw-r--r--sw/source/core/crsr/bookmrk.cxx2
-rw-r--r--sw/source/core/doc/textboxhelper.cxx4
-rw-r--r--sw/source/core/fields/reffld.cxx10
-rw-r--r--sw/source/core/inc/bookmrk.hxx2
-rw-r--r--sw/source/core/inc/unoport.hxx2
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx24
-rw-r--r--sw/source/core/unocore/unofield.cxx10
-rw-r--r--sw/source/core/unocore/unoparagraph.cxx8
-rw-r--r--sw/source/core/unocore/unoredline.cxx20
-rw-r--r--sw/source/core/unocore/unosect.cxx4
-rw-r--r--sw/source/core/unocore/unostyle.cxx4
-rw-r--r--sw/source/core/unocore/unotbl.cxx2
-rw-r--r--sw/source/filter/html/css1atr.cxx14
-rw-r--r--sw/source/filter/html/htmlatr.cxx4
-rw-r--r--sw/source/filter/html/wrthtml.hxx12
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx8
-rw-r--r--sw/source/uibase/docvw/HeaderFooterWin.cxx2
-rw-r--r--sw/source/uibase/inc/HeaderFooterWin.hxx2
-rw-r--r--sw/source/uibase/inc/conttree.hxx8
-rw-r--r--sw/source/uibase/utlui/content.cxx2
-rw-r--r--sw/source/uibase/utlui/glbltree.cxx6
-rw-r--r--ucb/source/ucp/hierarchy/hierarchydatasource.cxx6
-rw-r--r--ucb/source/ucp/hierarchy/hierarchydatasource.hxx2
-rw-r--r--ucb/source/ucp/tdoc/tdoc_content.cxx2
-rw-r--r--ucb/source/ucp/tdoc/tdoc_provider.hxx8
-rw-r--r--ucb/source/ucp/webdav-neon/DateTimeHelper.cxx26
-rw-r--r--ucb/source/ucp/webdav-neon/DateTimeHelper.hxx2
-rw-r--r--unodevtools/source/skeletonmaker/javacompskeleton.cxx8
-rw-r--r--unodevtools/source/skeletonmaker/skeletoncommon.cxx4
-rw-r--r--unodevtools/source/skeletonmaker/skeletoncommon.hxx2
-rw-r--r--unoidl/source/unoidlprovider.cxx14
-rw-r--r--unotools/source/config/moduleoptions.cxx30
-rw-r--r--unotools/source/config/securityoptions.cxx42
-rw-r--r--uui/source/iahndl.cxx4
-rw-r--r--vbahelper/source/vbahelper/vbalineformat.cxx14
-rw-r--r--vbahelper/source/vbahelper/vbalineformat.hxx2
-rw-r--r--vcl/inc/implimagetree.hxx2
-rw-r--r--vcl/source/app/IconThemeInfo.cxx4
-rw-r--r--vcl/source/gdi/FileDefinitionWidgetDraw.cxx4
-rw-r--r--vcl/source/helper/driverblocklist.cxx4
-rw-r--r--vcl/source/image/ImplImageTree.cxx8
-rw-r--r--vcl/source/window/builder.cxx50
-rw-r--r--vcl/source/window/window2.cxx10
-rw-r--r--vcl/unx/generic/fontmanager/fontmanager.cxx4
-rw-r--r--writerfilter/source/dmapper/ConversionHelper.cxx8
-rw-r--r--writerfilter/source/dmapper/ConversionHelper.hxx2
-rw-r--r--writerfilter/source/dmapper/NumberingManager.cxx10
-rw-r--r--writerfilter/source/rtftok/rtfsdrimport.cxx16
-rw-r--r--writerfilter/source/rtftok/rtfsdrimport.hxx6
-rw-r--r--writerperfect/source/writer/exp/xmlimp.cxx4
-rw-r--r--writerperfect/source/writer/exp/xmlimp.hxx2
-rw-r--r--writerperfect/source/writer/exp/xmltext.cxx12
-rw-r--r--writerperfect/source/writer/exp/xmltext.hxx4
-rw-r--r--xmloff/inc/txtflde.hxx2
-rw-r--r--xmloff/source/chart/SchXMLAxisContext.cxx10
-rw-r--r--xmloff/source/chart/SchXMLAxisContext.hxx4
-rw-r--r--xmloff/source/chart/SchXMLChartContext.cxx4
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx6
-rw-r--r--xmloff/source/core/xmlmultiimagehelper.cxx24
-rw-r--r--xmloff/source/draw/ximpshap.cxx6
-rw-r--r--xmloff/source/draw/ximpstyl.cxx4
-rw-r--r--xmloff/source/text/XMLRedlineExport.cxx8
-rw-r--r--xmloff/source/text/XMLRedlineExport.hxx2
-rw-r--r--xmloff/source/text/XMLTextMarkImportContext.cxx12
-rw-r--r--xmloff/source/text/txtflde.cxx64
-rw-r--r--xmlscript/source/xmldlg_imexp/imp_share.hxx6
236 files changed, 1154 insertions, 1133 deletions
diff --git a/avmedia/source/framework/MediaControlBase.cxx b/avmedia/source/framework/MediaControlBase.cxx
index 60faa27cfc3f..ef92cce8a736 100644
--- a/avmedia/source/framework/MediaControlBase.cxx
+++ b/avmedia/source/framework/MediaControlBase.cxx
@@ -210,7 +210,7 @@ void MediaControlBase::UpdateToolBoxes(const MediaItem& rMediaItem)
}
}
-void MediaControlBase::SelectPlayToolBoxItem( MediaItem& aExecItem, MediaItem const & aItem, const OString& rId)
+void MediaControlBase::SelectPlayToolBoxItem( MediaItem& aExecItem, MediaItem const & aItem, std::string_view rId)
{
if (rId == "apply")
{
diff --git a/basic/source/inc/runtime.hxx b/basic/source/inc/runtime.hxx
index b98d986debce..3262dec7ce0d 100644
--- a/basic/source/inc/runtime.hxx
+++ b/basic/source/inc/runtime.hxx
@@ -284,7 +284,7 @@ class SbiRuntime
void SetParameters( SbxArray* );
// HAS TO BE IMPLEMENTED SOME TIME
- void DllCall( const OUString&, const OUString&, SbxArray*, SbxDataType, bool );
+ void DllCall( std::u16string_view, std::u16string_view, SbxArray*, SbxDataType, bool );
// #56204 swap out DIM-functionality into help method (step0.cxx)
void DimImpl(const SbxVariableRef& refVar);
diff --git a/basic/source/runtime/dllmgr-none.cxx b/basic/source/runtime/dllmgr-none.cxx
index bce18495b3bb..f5d48930745c 100644
--- a/basic/source/runtime/dllmgr-none.cxx
+++ b/basic/source/runtime/dllmgr-none.cxx
@@ -73,14 +73,14 @@ ErrCode returnInt64InOutArg(SbxArray *pArgs, SbxVariable &rRetVal,
return ERRCODE_BASIC_BAD_ARGUMENT;
}
-ErrCode builtin_kernel32(const OUString &aFuncName, SbxArray *pArgs,
+ErrCode builtin_kernel32(std::u16string_view aFuncName, SbxArray *pArgs,
SbxVariable &rRetVal)
{
sal_Int64 nNanoSecsPerSec = 1000.0*1000*1000;
- if (aFuncName == "QueryPerformanceFrequency")
+ if (aFuncName == u"QueryPerformanceFrequency")
return returnInt64InOutArg(pArgs, rRetVal, nNanoSecsPerSec);
- else if (aFuncName == "QueryPerformanceCounter")
+ else if (aFuncName == u"QueryPerformanceCounter")
{
TimeValue aNow;
osl_getSystemTime( &aNow );
@@ -93,11 +93,11 @@ ErrCode builtin_kernel32(const OUString &aFuncName, SbxArray *pArgs,
};
ErrCode SbiDllMgr::Call(
- const OUString &aFuncName, const OUString &aDllName,
+ std::u16string_view aFuncName, std::u16string_view aDllName,
SbxArray *pArgs, SbxVariable &rRetVal,
SAL_UNUSED_PARAMETER bool /* bCDecl */)
{
- if (aDllName == "kernel32")
+ if (aDllName == u"kernel32")
return builtin_kernel32(aFuncName, pArgs, rRetVal);
else
return ERRCODE_BASIC_NOT_IMPLEMENTED;
diff --git a/basic/source/runtime/dllmgr-x64.cxx b/basic/source/runtime/dllmgr-x64.cxx
index 0cc276192fbc..9e6d6838fe6a 100644
--- a/basic/source/runtime/dllmgr-x64.cxx
+++ b/basic/source/runtime/dllmgr-x64.cxx
@@ -764,7 +764,7 @@ Dll * SbiDllMgr::Impl::getDll(OUString const & name) {
}
ErrCode SbiDllMgr::Call(
- OUString const & function, OUString const & library,
+ std::u16string_view function, std::u16string_view library,
SbxArray * arguments, SbxVariable & result, bool cdeclConvention)
{
if (cdeclConvention) {
diff --git a/basic/source/runtime/dllmgr-x86.cxx b/basic/source/runtime/dllmgr-x86.cxx
index 3220691bbd61..12588d798aea 100644
--- a/basic/source/runtime/dllmgr-x86.cxx
+++ b/basic/source/runtime/dllmgr-x86.cxx
@@ -704,7 +704,7 @@ Dll * SbiDllMgr::Impl::getDll(OUString const & name) {
}
ErrCode SbiDllMgr::Call(
- OUString const & function, OUString const & library,
+ std::u16string_view function, std::u16string_view library,
SbxArray * arguments, SbxVariable & result, bool cdeclConvention)
{
if (cdeclConvention) {
diff --git a/basic/source/runtime/dllmgr.hxx b/basic/source/runtime/dllmgr.hxx
index 368fa3d10a2f..3f984c95105c 100644
--- a/basic/source/runtime/dllmgr.hxx
+++ b/basic/source/runtime/dllmgr.hxx
@@ -36,7 +36,7 @@ public:
~SbiDllMgr();
ErrCode Call(
- OUString const & function, OUString const & library,
+ std::u16string_view function, std::u16string_view library,
SbxArray * arguments, SbxVariable & result, bool cdeclConvention);
void FreeDll(OUString const & library);
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 78e2a5ac4358..6ac8168358be 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -1271,8 +1271,8 @@ SbiForStack* SbiRuntime::FindForStackItemForCollection( class BasicCollection co
// DLL-calls
void SbiRuntime::DllCall
- ( const OUString& aFuncName,
- const OUString& aDLLName,
+ ( std::u16string_view aFuncName,
+ std::u16string_view aDLLName,
SbxArray* pArgs, // parameter (from index 1, can be NULL)
SbxDataType eResType, // return value
bool bCDecl ) // true: according to C-conventions
diff --git a/canvas/inc/parametricpolypolygon.hxx b/canvas/inc/parametricpolypolygon.hxx
index 28be8b8155c8..15957b58f960 100644
--- a/canvas/inc/parametricpolypolygon.hxx
+++ b/canvas/inc/parametricpolypolygon.hxx
@@ -87,7 +87,7 @@ namespace canvas
static css::uno::Sequence< OUString > getAvailableServiceNames();
static ParametricPolyPolygon* create(
const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
- const OUString& rServiceName,
+ std::u16string_view rServiceName,
const css::uno::Sequence< css::uno::Any >& rArgs );
/// Dispose all internal references
diff --git a/canvas/source/tools/parametricpolypolygon.cxx b/canvas/source/tools/parametricpolypolygon.cxx
index a0a9a7880219..bd62b1b5568a 100644
--- a/canvas/source/tools/parametricpolypolygon.cxx
+++ b/canvas/source/tools/parametricpolypolygon.cxx
@@ -41,7 +41,7 @@ namespace canvas
ParametricPolyPolygon* ParametricPolyPolygon::create(
const uno::Reference< rendering::XGraphicDevice >& rDevice,
- const OUString& rServiceName,
+ std::u16string_view rServiceName,
const uno::Sequence< uno::Any >& rArgs )
{
uno::Sequence< uno::Sequence< double > > colorSequence(2);
@@ -78,31 +78,31 @@ namespace canvas
}
}
- if ( rServiceName == "LinearGradient" )
+ if ( rServiceName == u"LinearGradient" )
{
return createLinearHorizontalGradient(rDevice, colorSequence, colorStops);
}
- else if ( rServiceName == "EllipticalGradient" )
+ else if ( rServiceName == u"EllipticalGradient" )
{
return createEllipticalGradient(rDevice, colorSequence, colorStops, fAspectRatio);
}
- else if ( rServiceName == "RectangularGradient" )
+ else if ( rServiceName == u"RectangularGradient" )
{
return createRectangularGradient(rDevice, colorSequence, colorStops, fAspectRatio);
}
- else if ( rServiceName == "VerticalLineHatch" )
+ else if ( rServiceName == u"VerticalLineHatch" )
{
// TODO: NYI
}
- else if ( rServiceName == "OrthogonalLinesHatch" )
+ else if ( rServiceName == u"OrthogonalLinesHatch" )
{
// TODO: NYI
}
- else if ( rServiceName == "ThreeCrossingLinesHatch" )
+ else if ( rServiceName == u"ThreeCrossingLinesHatch" )
{
// TODO: NYI
}
- else if ( rServiceName == "FourCrossingLinesHatch" )
+ else if ( rServiceName == u"FourCrossingLinesHatch" )
{
// TODO: NYI
}
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index 1953bf9e6f59..495cc453ba04 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -978,55 +978,55 @@ void SAL_CALL ChartController::layoutEvent(
namespace
{
-bool lcl_isFormatObjectCommand( const OUString& aCommand )
-{
- return aCommand == "MainTitle"
- || aCommand == "SubTitle"
- || aCommand == "XTitle"
- || aCommand == "YTitle"
- || aCommand == "ZTitle"
- || aCommand == "SecondaryXTitle"
- || aCommand == "SecondaryYTitle"
- || aCommand == "AllTitles"
- || aCommand == "DiagramAxisX"
- || aCommand == "DiagramAxisY"
- || aCommand == "DiagramAxisZ"
- || aCommand == "DiagramAxisA"
- || aCommand == "DiagramAxisB"
- || aCommand == "DiagramAxisAll"
- || aCommand == "DiagramGridXMain"
- || aCommand == "DiagramGridYMain"
- || aCommand == "DiagramGridZMain"
- || aCommand == "DiagramGridXHelp"
- || aCommand == "DiagramGridYHelp"
- || aCommand == "DiagramGridZHelp"
- || aCommand == "DiagramGridAll"
-
- || aCommand == "DiagramWall"
- || aCommand == "DiagramFloor"
- || aCommand == "DiagramArea"
- || aCommand == "Legend"
-
- || aCommand == "FormatWall"
- || aCommand == "FormatFloor"
- || aCommand == "FormatChartArea"
- || aCommand == "FormatLegend"
-
- || aCommand == "FormatTitle"
- || aCommand == "FormatAxis"
- || aCommand == "FormatDataSeries"
- || aCommand == "FormatDataPoint"
- || aCommand == "FormatDataLabels"
- || aCommand == "FormatDataLabel"
- || aCommand == "FormatXErrorBars"
- || aCommand == "FormatYErrorBars"
- || aCommand == "FormatMeanValue"
- || aCommand == "FormatTrendline"
- || aCommand == "FormatTrendlineEquation"
- || aCommand == "FormatStockLoss"
- || aCommand == "FormatStockGain"
- || aCommand == "FormatMajorGrid"
- || aCommand == "FormatMinorGrid";
+bool lcl_isFormatObjectCommand( std::u16string_view aCommand )
+{
+ return aCommand == u"MainTitle"
+ || aCommand == u"SubTitle"
+ || aCommand == u"XTitle"
+ || aCommand == u"YTitle"
+ || aCommand == u"ZTitle"
+ || aCommand == u"SecondaryXTitle"
+ || aCommand == u"SecondaryYTitle"
+ || aCommand == u"AllTitles"
+ || aCommand == u"DiagramAxisX"
+ || aCommand == u"DiagramAxisY"
+ || aCommand == u"DiagramAxisZ"
+ || aCommand == u"DiagramAxisA"
+ || aCommand == u"DiagramAxisB"
+ || aCommand == u"DiagramAxisAll"
+ || aCommand == u"DiagramGridXMain"
+ || aCommand == u"DiagramGridYMain"
+ || aCommand == u"DiagramGridZMain"
+ || aCommand == u"DiagramGridXHelp"
+ || aCommand == u"DiagramGridYHelp"
+ || aCommand == u"DiagramGridZHelp"
+ || aCommand == u"DiagramGridAll"
+
+ || aCommand == u"DiagramWall"
+ || aCommand == u"DiagramFloor"
+ || aCommand == u"DiagramArea"
+ || aCommand == u"Legend"
+
+ || aCommand == u"FormatWall"
+ || aCommand == u"FormatFloor"
+ || aCommand == u"FormatChartArea"
+ || aCommand == u"FormatLegend"
+
+ || aCommand == u"FormatTitle"
+ || aCommand == u"FormatAxis"
+ || aCommand == u"FormatDataSeries"
+ || aCommand == u"FormatDataPoint"
+ || aCommand == u"FormatDataLabels"
+ || aCommand == u"FormatDataLabel"
+ || aCommand == u"FormatXErrorBars"
+ || aCommand == u"FormatYErrorBars"
+ || aCommand == u"FormatMeanValue"
+ || aCommand == u"FormatTrendline"
+ || aCommand == u"FormatTrendlineEquation"
+ || aCommand == u"FormatStockLoss"
+ || aCommand == u"FormatStockGain"
+ || aCommand == u"FormatMajorGrid"
+ || aCommand == u"FormatMinorGrid";
}
} // anonymous namespace
diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx
index 587cbbfc00aa..687625b89c51 100644
--- a/chart2/source/controller/main/ChartController_Properties.cxx
+++ b/chart2/source/controller/main/ChartController_Properties.cxx
@@ -324,7 +324,7 @@ wrapper::ItemConverter* createItemConverter(
return pItemConverter;
}
-OUString lcl_getTitleCIDForCommand( const OString& rDispatchCommand, const uno::Reference< frame::XModel > & xChartModel )
+OUString lcl_getTitleCIDForCommand( std::string_view rDispatchCommand, const uno::Reference< frame::XModel > & xChartModel )
{
if( rDispatchCommand == "AllTitles")
return ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_TITLE, "ALLELEMENTS" );
@@ -347,7 +347,7 @@ OUString lcl_getTitleCIDForCommand( const OString& rDispatchCommand, const uno::
return ObjectIdentifier::createClassifiedIdentifierForObject( xTitle, xChartModel );
}
-OUString lcl_getAxisCIDForCommand( const OString& rDispatchCommand, const uno::Reference< frame::XModel >& xChartModel )
+OUString lcl_getAxisCIDForCommand( std::string_view rDispatchCommand, const uno::Reference< frame::XModel >& xChartModel )
{
if( rDispatchCommand == "DiagramAxisAll")
return ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_AXIS, "ALLELEMENTS" );
@@ -380,7 +380,7 @@ OUString lcl_getAxisCIDForCommand( const OString& rDispatchCommand, const uno::R
return ObjectIdentifier::createClassifiedIdentifierForObject( xAxis, xChartModel );
}
-OUString lcl_getGridCIDForCommand( const OString& rDispatchCommand, const uno::Reference< frame::XModel >& xChartModel )
+OUString lcl_getGridCIDForCommand( std::string_view rDispatchCommand, const uno::Reference< frame::XModel >& xChartModel )
{
uno::Reference< XDiagram > xDiagram( ChartModelHelper::findDiagram( xChartModel ) );
@@ -432,7 +432,7 @@ OUString lcl_getErrorCIDForCommand( const ObjectType eDispatchType, const Object
return ObjectIdentifier::createClassifiedIdentifierWithParent( eDispatchType, OUString(), rSelectedCID );
}
-OUString lcl_getObjectCIDForCommand( const OString& rDispatchCommand, const uno::Reference< XChartDocument > & xChartDocument, const OUString& rSelectedCID )
+OUString lcl_getObjectCIDForCommand( std::string_view rDispatchCommand, const uno::Reference< XChartDocument > & xChartDocument, const OUString& rSelectedCID )
{
ObjectType eObjectType = OBJECTTYPE_UNKNOWN;
diff --git a/chart2/source/controller/sidebar/ChartColorWrapper.cxx b/chart2/source/controller/sidebar/ChartColorWrapper.cxx
index cbe7e088e313..5a809cf1436c 100644
--- a/chart2/source/controller/sidebar/ChartColorWrapper.cxx
+++ b/chart2/source/controller/sidebar/ChartColorWrapper.cxx
@@ -181,7 +181,7 @@ void ChartLineStyleWrapper::updateData()
mpControl->statusChanged(aEvent);
}
-bool ChartLineStyleWrapper::operator()(const OUString& rCommand, const css::uno::Any& rValue)
+bool ChartLineStyleWrapper::operator()(std::u16string_view rCommand, const css::uno::Any& rValue)
{
css::uno::Reference<css::beans::XPropertySet> xPropSet = getPropSet(mxModel);
@@ -191,12 +191,12 @@ bool ChartLineStyleWrapper::operator()(const OUString& rCommand, const css::uno:
return false;
}
- if (rCommand == ".uno:XLineStyle")
+ if (rCommand == u".uno:XLineStyle")
{
xPropSet->setPropertyValue("LineStyle", rValue);
return true;
}
- else if (rCommand == ".uno:LineDash")
+ else if (rCommand == u".uno:LineDash")
{
XLineDashItem aDashItem;
aDashItem.PutValue(rValue, 0);
diff --git a/chart2/source/controller/sidebar/ChartColorWrapper.hxx b/chart2/source/controller/sidebar/ChartColorWrapper.hxx
index b108eca90afe..66c880ae3ca2 100644
--- a/chart2/source/controller/sidebar/ChartColorWrapper.hxx
+++ b/chart2/source/controller/sidebar/ChartColorWrapper.hxx
@@ -48,7 +48,7 @@ public:
ChartLineStyleWrapper(css::uno::Reference<css::frame::XModel> const & xModel,
SvxLineStyleToolBoxControl* pControl);
- bool operator()(const OUString& rCommand, const css::uno::Any& rValue);
+ bool operator()(std::u16string_view rCommand, const css::uno::Any& rValue);
void updateModel(const css::uno::Reference<css::frame::XModel>& xModel);
diff --git a/chart2/source/inc/InternalDataProvider.hxx b/chart2/source/inc/InternalDataProvider.hxx
index 7e3291f2f582..1e5821f94e6c 100644
--- a/chart2/source/inc/InternalDataProvider.hxx
+++ b/chart2/source/inc/InternalDataProvider.hxx
@@ -183,7 +183,7 @@ private:
createDataSequenceAndAddToMap( const OUString & rRangeRepresentation );
css::uno::Reference<css::chart2::data::XDataSequence>
- createDataSequenceFromArray( const OUString& rArrayStr, const OUString& rRole );
+ createDataSequenceFromArray( const OUString& rArrayStr, std::u16string_view rRole );
void deleteMapReferences( const OUString & rRangeRepresentation );
diff --git a/chart2/source/inc/RegressionCurveHelper.hxx b/chart2/source/inc/RegressionCurveHelper.hxx
index 44bc92744dc7..83fc72e65649 100644
--- a/chart2/source/inc/RegressionCurveHelper.hxx
+++ b/chart2/source/inc/RegressionCurveHelper.hxx
@@ -39,7 +39,7 @@ namespace chart::RegressionCurveHelper
/// returns a model regression curve
css::uno::Reference<css::chart2::XRegressionCurve>
- createRegressionCurveByServiceName( const OUString& aServiceName );
+ createRegressionCurveByServiceName( std::u16string_view aServiceName );
OOO_DLLPUBLIC_CHARTTOOLS bool hasMeanValueLine(
const css::uno::Reference<css::chart2::XRegressionCurveContainer> & xRegCnt );
@@ -114,7 +114,7 @@ namespace chart::RegressionCurveHelper
/// returns a calculator object for regression curves (used by the view)
OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference<css::chart2::XRegressionCurveCalculator>
- createRegressionCurveCalculatorByServiceName( const OUString& aServiceName );
+ createRegressionCurveCalculatorByServiceName( std::u16string_view aServiceName );
/** recalculates the regression parameters according to the data given in
the data source.
diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx
index c1d0008098ab..94481ce9e5f8 100644
--- a/chart2/source/tools/InternalDataProvider.cxx
+++ b/chart2/source/tools/InternalDataProvider.cxx
@@ -486,7 +486,7 @@ void InternalDataProvider::decreaseMapReferences(
Reference< chart2::data::XDataSequence > InternalDataProvider::createDataSequenceAndAddToMap(
const OUString & rRangeRepresentation )
{
- Reference<chart2::data::XDataSequence> xSeq = createDataSequenceFromArray(rRangeRepresentation, OUString());
+ Reference<chart2::data::XDataSequence> xSeq = createDataSequenceFromArray(rRangeRepresentation, u"");
if (xSeq.is())
return xSeq;
@@ -496,7 +496,7 @@ Reference< chart2::data::XDataSequence > InternalDataProvider::createDataSequenc
}
uno::Reference<chart2::data::XDataSequence>
-InternalDataProvider::createDataSequenceFromArray( const OUString& rArrayStr, const OUString& rRole )
+InternalDataProvider::createDataSequenceFromArray( const OUString& rArrayStr, std::u16string_view rRole )
{
if (rArrayStr.indexOf('{') != 0 || rArrayStr[rArrayStr.getLength()-1] != '}')
{
@@ -562,8 +562,8 @@ InternalDataProvider::createDataSequenceFromArray( const OUString& rArrayStr, co
aRawElems.push_back(aElem);
}
- if (rRole == "values-y" || rRole == "values-first" || rRole == "values-last" ||
- rRole == "values-min" || rRole == "values-max" || rRole == "values-size")
+ if (rRole == u"values-y" || rRole == u"values-first" || rRole == u"values-last" ||
+ rRole == u"values-min" || rRole == u"values-max" || rRole == u"values-size")
{
// Column values. Append a new data column and populate it.
@@ -584,7 +584,7 @@ InternalDataProvider::createDataSequenceFromArray( const OUString& rArrayStr, co
xSeq.set(new UncachedDataSequence(this, aRangeRep));
addDataSequenceToMap(aRangeRep, xSeq);
}
- else if (rRole == "values-x")
+ else if (rRole == u"values-x")
{
std::vector<double> aValues;
aValues.reserve(aRawElems.size());
@@ -611,7 +611,7 @@ InternalDataProvider::createDataSequenceFromArray( const OUString& rArrayStr, co
xSeq.set(new UncachedDataSequence(this, aRangeRep));
addDataSequenceToMap(aRangeRep, xSeq);
}
- else if (rRole == "categories")
+ else if (rRole == u"categories")
{
// Category labels.
@@ -624,7 +624,7 @@ InternalDataProvider::createDataSequenceFromArray( const OUString& rArrayStr, co
xSeq.set(new UncachedDataSequence(this, lcl_aCategoriesRangeName));
addDataSequenceToMap(lcl_aCategoriesRangeName, xSeq);
}
- else if (rRole == "label")
+ else if (rRole == u"label")
{
// Data series label. There should be only one element. This always
// goes to the last data column.
diff --git a/chart2/source/tools/RegressionCurveHelper.cxx b/chart2/source/tools/RegressionCurveHelper.cxx
index 47f6a4b0ebfe..66f56725133b 100644
--- a/chart2/source/tools/RegressionCurveHelper.cxx
+++ b/chart2/source/tools/RegressionCurveHelper.cxx
@@ -91,32 +91,32 @@ Reference< XRegressionCurve > RegressionCurveHelper::createMeanValueLine()
}
Reference< XRegressionCurve > RegressionCurveHelper::createRegressionCurveByServiceName(
- const OUString& aServiceName )
+ std::u16string_view aServiceName )
{
Reference< XRegressionCurve > xResult;
// todo: use factory methods with service name
- if( aServiceName == "com.sun.star.chart2.LinearRegressionCurve" )
+ if( aServiceName == u"com.sun.star.chart2.LinearRegressionCurve" )
{
xResult.set( new LinearRegressionCurve );
}
- else if( aServiceName == "com.sun.star.chart2.LogarithmicRegressionCurve" )
+ else if( aServiceName == u"com.sun.star.chart2.LogarithmicRegressionCurve" )
{
xResult.set( new LogarithmicRegressionCurve );
}
- else if( aServiceName == "com.sun.star.chart2.ExponentialRegressionCurve" )
+ else if( aServiceName == u"com.sun.star.chart2.ExponentialRegressionCurve" )
{
xResult.set( new ExponentialRegressionCurve );
}
- else if( aServiceName == "com.sun.star.chart2.PotentialRegressionCurve" )
+ else if( aServiceName == u"com.sun.star.chart2.PotentialRegressionCurve" )
{
xResult.set( new PotentialRegressionCurve );
}
- else if( aServiceName == "com.sun.star.chart2.PolynomialRegressionCurve" )
+ else if( aServiceName == u"com.sun.star.chart2.PolynomialRegressionCurve" )
{
xResult.set( new PolynomialRegressionCurve );
}
- else if( aServiceName == "com.sun.star.chart2.MovingAverageRegressionCurve" )
+ else if( aServiceName == u"com.sun.star.chart2.MovingAverageRegressionCurve" )
{
xResult.set( new MovingAverageRegressionCurve );
}
@@ -125,36 +125,36 @@ Reference< XRegressionCurve > RegressionCurveHelper::createRegressionCurveByServ
}
Reference< XRegressionCurveCalculator > RegressionCurveHelper::createRegressionCurveCalculatorByServiceName(
- const OUString& aServiceName )
+ std::u16string_view aServiceName )
{
Reference< XRegressionCurveCalculator > xResult;
// todo: use factory methods with service name
- if( aServiceName == "com.sun.star.chart2.MeanValueRegressionCurve" )
+ if( aServiceName == u"com.sun.star.chart2.MeanValueRegressionCurve" )
{
xResult.set( new MeanValueRegressionCurveCalculator() );
}
- if( aServiceName == "com.sun.star.chart2.LinearRegressionCurve" )
+ if( aServiceName == u"com.sun.star.chart2.LinearRegressionCurve" )
{
xResult.set( new LinearRegressionCurveCalculator() );
}
- else if( aServiceName == "com.sun.star.chart2.LogarithmicRegressionCurve" )
+ else if( aServiceName == u"com.sun.star.chart2.LogarithmicRegressionCurve" )
{
xResult.set( new LogarithmicRegressionCurveCalculator() );
}
- else if( aServiceName == "com.sun.star.chart2.ExponentialRegressionCurve" )
+ else if( aServiceName == u"com.sun.star.chart2.ExponentialRegressionCurve" )
{
xResult.set( new ExponentialRegressionCurveCalculator() );
}
- else if( aServiceName == "com.sun.star.chart2.PotentialRegressionCurve" )
+ else if( aServiceName == u"com.sun.star.chart2.PotentialRegressionCurve" )
{
xResult.set( new PotentialRegressionCurveCalculator() );
}
- else if( aServiceName == "com.sun.star.chart2.PolynomialRegressionCurve" )
+ else if( aServiceName == u"com.sun.star.chart2.PolynomialRegressionCurve" )
{
xResult.set( new PolynomialRegressionCurveCalculator() );
}
- else if( aServiceName == "com.sun.star.chart2.MovingAverageRegressionCurve" )
+ else if( aServiceName == u"com.sun.star.chart2.MovingAverageRegressionCurve" )
{
xResult.set( new MovingAverageRegressionCurveCalculator() );
}
diff --git a/chart2/source/view/inc/VDataSeries.hxx b/chart2/source/view/inc/VDataSeries.hxx
index f95f4f1ba98f..cc6943f2d51a 100644
--- a/chart2/source/view/inc/VDataSeries.hxx
+++ b/chart2/source/view/inc/VDataSeries.hxx
@@ -137,7 +137,7 @@ public:
void setStartingAngle( sal_Int32 nStartingAngle );
sal_Int32 getStartingAngle() const;
- void setRoleOfSequenceForDataLabelNumberFormatDetection( const OUString& rRole );
+ void setRoleOfSequenceForDataLabelNumberFormatDetection( std::u16string_view rRole );
//this is only temporarily here for area chart:
css::drawing::PolyPolygonShape3D m_aPolyPolygonShape3D;
diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx
index 22e23d27dc80..d9bb82e8c30c 100644
--- a/chart2/source/view/main/VDataSeries.cxx
+++ b/chart2/source/view/main/VDataSeries.cxx
@@ -570,21 +570,21 @@ sal_Int32 VDataSeries::getExplicitNumberFormat( sal_Int32 nPointIndex, bool bFor
xPointProp->getPropertyValue(aPropName) >>= nNumberFormat;
return nNumberFormat;
}
-void VDataSeries::setRoleOfSequenceForDataLabelNumberFormatDetection( const OUString& rRole )
+void VDataSeries::setRoleOfSequenceForDataLabelNumberFormatDetection( std::u16string_view rRole )
{
- if (rRole == "values-y")
+ if (rRole == u"values-y")
m_pValueSequenceForDataLabelNumberFormatDetection = &m_aValues_Y;
- else if (rRole == "values-size")
+ else if (rRole == u"values-size")
m_pValueSequenceForDataLabelNumberFormatDetection = &m_aValues_Bubble_Size;
- else if (rRole == "values-min")
+ else if (rRole == u"values-min")
m_pValueSequenceForDataLabelNumberFormatDetection = &m_aValues_Y_Min;
- else if (rRole == "values-max")
+ else if (rRole == u"values-max")
m_pValueSequenceForDataLabelNumberFormatDetection = &m_aValues_Y_Max;
- else if (rRole == "values-first")
+ else if (rRole == u"values-first")
m_pValueSequenceForDataLabelNumberFormatDetection = &m_aValues_Y_First;
- else if (rRole == "values-last")
+ else if (rRole == u"values-last")
m_pValueSequenceForDataLabelNumberFormatDetection = &m_aValues_Y_Last;
- else if (rRole == "values-x")
+ else if (rRole == u"values-x")
m_pValueSequenceForDataLabelNumberFormatDetection = &m_aValues_X;
}
sal_Int32 VDataSeries::detectNumberFormatKey( sal_Int32 index ) const
@@ -771,7 +771,7 @@ double VDataSeries::getXMeanValue() const
{
if( std::isnan( m_fXMeanValue ) )
{
- uno::Reference< XRegressionCurveCalculator > xCalculator( RegressionCurveHelper::createRegressionCurveCalculatorByServiceName( "com.sun.star.chart2.MeanValueRegressionCurve" ) );
+ uno::Reference< XRegressionCurveCalculator > xCalculator( RegressionCurveHelper::createRegressionCurveCalculatorByServiceName( u"com.sun.star.chart2.MeanValueRegressionCurve" ) );
uno::Sequence< double > aXValuesDummy;
xCalculator->recalculateRegression( aXValuesDummy, getAllX() );
m_fXMeanValue = xCalculator->getCurveValue( 1.0 );
@@ -784,7 +784,7 @@ double VDataSeries::getYMeanValue() const
if( std::isnan( m_fYMeanValue ) )
{
uno::Reference< XRegressionCurveCalculator > xCalculator(
- RegressionCurveHelper::createRegressionCurveCalculatorByServiceName("com.sun.star.chart2.MeanValueRegressionCurve"));
+ RegressionCurveHelper::createRegressionCurveCalculatorByServiceName(u"com.sun.star.chart2.MeanValueRegressionCurve"));
uno::Sequence< double > aXValuesDummy;
xCalculator->recalculateRegression( aXValuesDummy, getAllY() );
m_fYMeanValue = xCalculator->getCurveValue( 1.0 );
diff --git a/comphelper/qa/unit/test_hash.cxx b/comphelper/qa/unit/test_hash.cxx
index 8b6e5a393d23..0bcc3f8ed56c 100644
--- a/comphelper/qa/unit/test_hash.cxx
+++ b/comphelper/qa/unit/test_hash.cxx
@@ -121,7 +121,7 @@ void TestHash::testSHA512_NoSaltNoSpin()
void TestHash::testSHA512_saltspin()
{
const OUString aHash = comphelper::DocPasswordHelper::GetOoxHashAsBase64( "pwd", "876MLoKTq42+/DLp415iZQ==", 100000,
- comphelper::Hash::IterCount::APPEND, "SHA-512");
+ comphelper::Hash::IterCount::APPEND, u"SHA-512");
CPPUNIT_ASSERT_EQUAL(OUString("5l3mgNHXpWiFaBPv5Yso1Xd/UifWvQWmlDnl/hsCYbFT2sJCzorjRmBCQ/3qeDu6Q/4+GIE8a1DsdaTwYh1q2g=="), aHash);
}
diff --git a/comphelper/source/misc/docpasswordhelper.cxx b/comphelper/source/misc/docpasswordhelper.cxx
index d528d57e5cbf..4cc0f5c74269 100644
--- a/comphelper/source/misc/docpasswordhelper.cxx
+++ b/comphelper/source/misc/docpasswordhelper.cxx
@@ -260,16 +260,16 @@ std::vector<unsigned char> DocPasswordHelper::GetOoxHashAsVector(
const std::vector<unsigned char>& rSaltValue,
sal_uInt32 nSpinCount,
comphelper::Hash::IterCount eIterCount,
- const OUString& rAlgorithmName)
+ std::u16string_view rAlgorithmName)
{
comphelper::HashType eType;
- if (rAlgorithmName == "SHA-512" || rAlgorithmName == "SHA512")
+ if (rAlgorithmName == u"SHA-512" || rAlgorithmName == u"SHA512")
eType = comphelper::HashType::SHA512;
- else if (rAlgorithmName == "SHA-256" || rAlgorithmName == "SHA256")
+ else if (rAlgorithmName == u"SHA-256" || rAlgorithmName == u"SHA256")
eType = comphelper::HashType::SHA256;
- else if (rAlgorithmName == "SHA-1" || rAlgorithmName == "SHA1") // "SHA1" might be in the wild
+ else if (rAlgorithmName == u"SHA-1" || rAlgorithmName == u"SHA1") // "SHA1" might be in the wild
eType = comphelper::HashType::SHA1;
- else if (rAlgorithmName == "MD5")
+ else if (rAlgorithmName == u"MD5")
eType = comphelper::HashType::MD5;
else
return std::vector<unsigned char>();
@@ -283,7 +283,7 @@ css::uno::Sequence<sal_Int8> DocPasswordHelper::GetOoxHashAsSequence(
const OUString& rSaltValue,
sal_uInt32 nSpinCount,
comphelper::Hash::IterCount eIterCount,
- const OUString& rAlgorithmName)
+ std::u16string_view rAlgorithmName)
{
std::vector<unsigned char> aSaltVec;
if (!rSaltValue.isEmpty())
@@ -303,7 +303,7 @@ OUString DocPasswordHelper::GetOoxHashAsBase64(
const OUString& rSaltValue,
sal_uInt32 nSpinCount,
comphelper::Hash::IterCount eIterCount,
- const OUString& rAlgorithmName)
+ std::u16string_view rAlgorithmName)
{
css::uno::Sequence<sal_Int8> aSeq( GetOoxHashAsSequence( rPassword, rSaltValue, nSpinCount,
eIterCount, rAlgorithmName));
diff --git a/compilerplugins/clang/stringviewparam.cxx b/compilerplugins/clang/stringviewparam.cxx
index 3056b6412930..365b2cf2a8a5 100644
--- a/compilerplugins/clang/stringviewparam.cxx
+++ b/compilerplugins/clang/stringviewparam.cxx
@@ -174,10 +174,21 @@ DeclRefExpr const* relevantCXXOperatorCallExpr(CXXOperatorCallExpr const* expr)
}
else if (compat::isComparisonOp(expr))
{
+ auto arg0 = compat::IgnoreImplicit(expr->getArg(0));
+ if (isa<clang::StringLiteral>(arg0))
+ {
+ return relevantDeclRefExpr(expr->getArg(1));
+ }
+ auto arg1 = compat::IgnoreImplicit(expr->getArg(1));
+ if (isa<clang::StringLiteral>(arg1))
+ {
+ return relevantDeclRefExpr(expr->getArg(0));
+ }
+
// TODO Can't currently convert rtl::OString because we end up with ambiguous operator==
// (one in string_view header and one in rtl/string.hxx header)
- auto st1 = relevantStringType(compat::IgnoreImplicit(expr->getArg(0))->getType());
- auto st2 = relevantStringType(compat::IgnoreImplicit(expr->getArg(1))->getType());
+ auto st1 = relevantStringType(arg0->getType());
+ auto st2 = relevantStringType(arg1->getType());
if (st1 == StringType::RtlOustring && st2 == StringType::RtlOustring)
{
auto e1 = relevantDeclRefExpr(expr->getArg(0));
diff --git a/compilerplugins/clang/test/stringviewparam.cxx b/compilerplugins/clang/test/stringviewparam.cxx
index decd17408506..a9269dff3891 100644
--- a/compilerplugins/clang/test/stringviewparam.cxx
+++ b/compilerplugins/clang/test/stringviewparam.cxx
@@ -55,4 +55,14 @@ bool f7(const OUString& p1, OUString p2) { return p1 == p2; }
// expected-error@+1 {{replace function parameter of type 'const rtl::OUString &' with 'std::u16string_view' [loplugin:stringviewparam]}}
bool f8(const OUString& p1, std::u16string_view p2) { return p1 == p2; }
+struct Converter
+{
+ // expected-error@+1 {{replace function parameter of type 'const rtl::OUString &' with 'std::u16string_view' [loplugin:stringviewparam]}}
+ static bool convertBool(bool& rBool, const OUString& rString)
+ {
+ rBool = rString == "true";
+ return rBool || (rString == "false");
+ }
+};
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
index f7bd5ba34e3a..cd1fceddb2ef 100644
--- a/configmgr/source/components.cxx
+++ b/configmgr/source/components.cxx
@@ -202,8 +202,8 @@ Components & Components::getSingleton(
return singleton;
}
-bool Components::allLocales(OUString const & locale) {
- return locale == "*";
+bool Components::allLocales(std::u16string_view locale) {
+ return locale == u"*";
}
rtl::Reference< Node > Components::resolvePathRepresentation(
diff --git a/configmgr/source/components.hxx b/configmgr/source/components.hxx
index 9ede2ed381f2..0647002f0d15 100644
--- a/configmgr/source/components.hxx
+++ b/configmgr/source/components.hxx
@@ -52,7 +52,7 @@ public:
static Components & getSingleton(
css::uno::Reference< css::uno::XComponentContext > const & context);
- static bool allLocales(OUString const & locale);
+ static bool allLocales(std::u16string_view locale);
rtl::Reference< Node > resolvePathRepresentation(
OUString const & pathRepresentation,
diff --git a/connectivity/source/drivers/firebird/Util.cxx b/connectivity/source/drivers/firebird/Util.cxx
index 64e3297235ea..82d69a123c97 100644
--- a/connectivity/source/drivers/firebird/Util.cxx
+++ b/connectivity/source/drivers/firebird/Util.cxx
@@ -94,17 +94,17 @@ static sal_Int32 lcl_getNumberType( short aType, NumberSubType aSubType )
}
}
}
-static sal_Int32 lcl_getCharColumnType( short aType, const OUString& sCharset )
+static sal_Int32 lcl_getCharColumnType( short aType, std::u16string_view sCharset )
{
switch(aType)
{
case SQL_TEXT:
- if( sCharset == "OCTETS")
+ if( sCharset == u"OCTETS")
return DataType::BINARY;
else
return DataType::CHAR;
case SQL_VARYING:
- if( sCharset == "OCTETS")
+ if( sCharset == u"OCTETS")
return DataType::VARBINARY;
else
return DataType::VARCHAR;
diff --git a/connectivity/source/drivers/mork/MConnection.hxx b/connectivity/source/drivers/mork/MConnection.hxx
index 99807fd838dc..67511b891d84 100644
--- a/connectivity/source/drivers/mork/MConnection.hxx
+++ b/connectivity/source/drivers/mork/MConnection.hxx
@@ -48,7 +48,7 @@ namespace connectivity::mork
virtual ~OConnection() override;
const rtl::Reference<MorkDriver>& getDriver() const {return m_xDriver;};
- MorkParser* getMorkParser(const OString& t) {return t == "CollectedAddressBook" ? m_pHistory.get() : m_pBook.get();};
+ MorkParser* getMorkParser(std::string_view t) {return t == "CollectedAddressBook" ? m_pHistory.get() : m_pBook.get();};
// OComponentHelper
virtual void SAL_CALL disposing() override;
diff --git a/cui/source/customize/SvxConfigPageHelper.cxx b/cui/source/customize/SvxConfigPageHelper.cxx
index 468441a6d7cc..527754d5cf5f 100644
--- a/cui/source/customize/SvxConfigPageHelper.cxx
+++ b/cui/source/customize/SvxConfigPageHelper.cxx
@@ -201,32 +201,32 @@ OUString SvxConfigPageHelper::generateCustomURL(SvxEntries* entries)
return url;
}
-OUString SvxConfigPageHelper::GetModuleName(const OUString& aModuleId)
+OUString SvxConfigPageHelper::GetModuleName(std::u16string_view aModuleId)
{
- if (aModuleId == "com.sun.star.text.TextDocument"
- || aModuleId == "com.sun.star.text.GlobalDocument")
+ if (aModuleId == u"com.sun.star.text.TextDocument"
+ || aModuleId == u"com.sun.star.text.GlobalDocument")
return "Writer";
- else if (aModuleId == "com.sun.star.text.WebDocument")
+ else if (aModuleId == u"com.sun.star.text.WebDocument")
return "Writer/Web";
- else if (aModuleId == "com.sun.star.drawing.DrawingDocument")
+ else if (aModuleId == u"com.sun.star.drawing.DrawingDocument")
return "Draw";
- else if (aModuleId == "com.sun.star.presentation.PresentationDocument")
+ else if (aModuleId == u"com.sun.star.presentation.PresentationDocument")
return "Impress";
- else if (aModuleId == "com.sun.star.sheet.SpreadsheetDocument")
+ else if (aModuleId == u"com.sun.star.sheet.SpreadsheetDocument")
return "Calc";
- else if (aModuleId == "com.sun.star.script.BasicIDE")
+ else if (aModuleId == u"com.sun.star.script.BasicIDE")
return "Basic";
- else if (aModuleId == "com.sun.star.formula.FormulaProperties")
+ else if (aModuleId == u"com.sun.star.formula.FormulaProperties")
return "Math";
- else if (aModuleId == "com.sun.star.sdb.RelationDesign")
+ else if (aModuleId == u"com.sun.star.sdb.RelationDesign")
return "Relation Design";
- else if (aModuleId == "com.sun.star.sdb.QueryDesign")
+ else if (aModuleId == u"com.sun.star.sdb.QueryDesign")
return "Query Design";
- else if (aModuleId == "com.sun.star.sdb.TableDesign")
+ else if (aModuleId == u"com.sun.star.sdb.TableDesign")
return "Table Design";
- else if (aModuleId == "com.sun.star.sdb.DataSourceBrowser")
+ else if (aModuleId == u"com.sun.star.sdb.DataSourceBrowser")
return "Data Source Browser";
- else if (aModuleId == "com.sun.star.sdb.DatabaseDocument")
+ else if (aModuleId == u"com.sun.star.sdb.DatabaseDocument")
return "Database";
return OUString();
diff --git a/cui/source/customize/SvxNotebookbarConfigPage.cxx b/cui/source/customize/SvxNotebookbarConfigPage.cxx
index b3dd97f1d43d..7e93dae121af 100644
--- a/cui/source/customize/SvxNotebookbarConfigPage.cxx
+++ b/cui/source/customize/SvxNotebookbarConfigPage.cxx
@@ -49,12 +49,12 @@ namespace container = com::sun::star::container;
namespace beans = com::sun::star::beans;
namespace graphic = com::sun::star::graphic;
-static bool isCategoryAvailable(const OUString& sClassId, std::u16string_view sUIItemId,
+static bool isCategoryAvailable(std::u16string_view sClassId, std::u16string_view sUIItemId,
std::u16string_view sActiveCategory, bool& isCategory)
{
if (sUIItemId == sActiveCategory)
return true;
- else if ((sClassId == "GtkMenu" || sClassId == "GtkGrid") && sUIItemId != sActiveCategory)
+ else if ((sClassId == u"GtkMenu" || sClassId == u"GtkGrid") && sUIItemId != sActiveCategory)
{
isCategory = false;
return false;
@@ -67,29 +67,29 @@ static OUString charToString(const char* cString)
return OUString(cString, strlen(cString), RTL_TEXTENCODING_UTF8);
}
-static OUString getFileName(const OUString& aFileName)
+static OUString getFileName(std::u16string_view aFileName)
{
- if (aFileName == "notebookbar.ui")
+ if (aFileName == u"notebookbar.ui")
return "Tabbed";
- else if (aFileName == "notebookbar_compact.ui")
+ else if (aFileName == u"notebookbar_compact.ui")
return "TabbedCompact";
- else if (aFileName == "notebookbar_groupedbar_full.ui")
+ else if (aFileName == u"notebookbar_groupedbar_full.ui")
return "Groupedbar";
- else if (aFileName == "notebookbar_groupedbar_compact.ui")
+ else if (aFileName == u"notebookbar_groupedbar_compact.ui")
return "GroupedbarCompact";
else
return "None";
}
-static OUString getModuleId(const OUString& sModuleName)
+static OUString getModuleId(std::u16string_view sModuleName)
{
- if (sModuleName == "Writer")
+ if (sModuleName == u"Writer")
return "com.sun.star.text.TextDocument";
- else if (sModuleName == "Draw")
+ else if (sModuleName == u"Draw")
return "com.sun.star.drawing.DrawingDocument";
- else if (sModuleName == "Impress")
+ else if (sModuleName == u"Impress")
return "com.sun.star.presentation.PresentationDocument";
- else if (sModuleName == "Calc")
+ else if (sModuleName == u"Calc")
return "com.sun.star.sheet.SpreadsheetDocument";
else
return "None";
@@ -195,7 +195,7 @@ short SvxNotebookbarConfigPage::QueryReset()
return nValue;
}
-void SvxConfigPage::InsertEntryIntoNotebookbarTabUI(const OUString& sClassId,
+void SvxConfigPage::InsertEntryIntoNotebookbarTabUI(std::u16string_view sClassId,
const OUString& sUIItemId,
const OUString& sUIItemCommand,
weld::TreeView& rTreeView,
@@ -227,7 +227,7 @@ void SvxConfigPage::InsertEntryIntoNotebookbarTabUI(const OUString& sClassId,
OUString aName = SvxConfigPageHelper::stripHotKey(aLabel);
- if (sClassId == "GtkSeparatorMenuItem" || sClassId == "GtkSeparator")
+ if (sClassId == u"GtkSeparatorMenuItem" || sClassId == u"GtkSeparator")
{
rTreeView.set_text(rIter, "--------------------------------------------", 0);
}
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 87753e844bba..3d786af57553 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -157,9 +157,9 @@ void printEntries(SvxEntries* entries)
#endif
bool
-SvxConfigPage::CanConfig( const OUString& aModuleId )
+SvxConfigPage::CanConfig( std::u16string_view aModuleId )
{
- return aModuleId != "com.sun.star.script.BasicIDE" && aModuleId != "com.sun.star.frame.Bibliography";
+ return aModuleId != u"com.sun.star.script.BasicIDE" && aModuleId != u"com.sun.star.frame.Bibliography";
}
static std::unique_ptr<SfxTabPage> CreateSvxMenuConfigPage( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet )
diff --git a/cui/source/inc/SvxConfigPageHelper.hxx b/cui/source/inc/SvxConfigPageHelper.hxx
index 9a53af2651aa..025c4aad18c0 100644
--- a/cui/source/inc/SvxConfigPageHelper.hxx
+++ b/cui/source/inc/SvxConfigPageHelper.hxx
@@ -49,7 +49,7 @@ public:
*/
static OUString generateCustomURL(SvxEntries* entries);
- static OUString GetModuleName(const OUString& aModuleId);
+ static OUString GetModuleName(std::u16string_view aModuleId);
static OUString
GetUIModuleName(const OUString& aModuleId,
const css::uno::Reference<css::frame::XModuleManager2>& rModuleManager);
diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx
index 5f023e046310..0bc2085178d2 100644
--- a/cui/source/inc/cfg.hxx
+++ b/cui/source/inc/cfg.hxx
@@ -456,7 +456,7 @@ protected:
weld::TreeView& rTreeView, weld::TreeIter& rIter,
bool bMenu = false);
- void InsertEntryIntoNotebookbarTabUI(const OUString& sClassId, const OUString& sUIItemId,
+ void InsertEntryIntoNotebookbarTabUI(std::u16string_view sClassId, const OUString& sUIItemId,
const OUString& sUIItemCommand,
weld::TreeView& rTreeView, const weld::TreeIter& rIter);
@@ -469,7 +469,7 @@ public:
virtual ~SvxConfigPage() override;
- static bool CanConfig( const OUString& rModuleId );
+ static bool CanConfig( std::u16string_view rModuleId );
SaveInData* GetSaveInData() { return pCurrentSaveInData; }
const OUString& GetAppName() const { return m_sAppName; }
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 1b646fc51043..865f56e16840 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -67,10 +67,10 @@ using namespace css::uno;
using namespace css::linguistic2;
using namespace css::beans;
-const char cSpell[] = SN_SPELLCHECKER;
-const char cGrammar[] = SN_GRAMMARCHECKER;
-const char cHyph[] = SN_HYPHENATOR;
-const char cThes[] = SN_THESAURUS;
+constexpr OUStringLiteral cSpell(SN_SPELLCHECKER);
+constexpr OUStringLiteral cGrammar(SN_GRAMMARCHECKER);
+constexpr OUStringLiteral cHyph(SN_HYPHENATOR);
+constexpr OUStringLiteral cThes(SN_THESAURUS);
// static ----------------------------------------------------------------
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 6f63828c173f..e098040e7c7c 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -171,7 +171,7 @@ static void setGroupName( std::u16string_view rModule, const OUString& rGroupNam
}
}
-static OUString getGroupName( const OUString& rModule, bool bForced )
+static OUString getGroupName( std::u16string_view rModule, bool bForced )
{
OUString sGroupName;
for (const ModuleToGroupNameMap_Impl& rEntry : ModuleMap)
@@ -185,19 +185,19 @@ static OUString getGroupName( const OUString& rModule, bool bForced )
if ( sGroupName.isEmpty() && bForced )
{
- if ( rModule == "Writer" )
+ if ( rModule == u"Writer" )
sGroupName = CuiResId(SID_SW_EDITOPTIONS_RES[0].first);
- else if ( rModule == "WriterWeb" )
+ else if ( rModule == u"WriterWeb" )
sGroupName = CuiResId(SID_SW_ONLINEOPTIONS_RES[0].first);
- else if ( rModule == "Calc" )
+ else if ( rModule == u"Calc" )
sGroupName = CuiResId(SID_SC_EDITOPTIONS_RES[0].first);
- else if ( rModule == "Impress" )
+ else if ( rModule == u"Impress" )
sGroupName = CuiResId(SID_SD_EDITOPTIONS_RES[0].first);
- else if ( rModule == "Draw" )
+ else if ( rModule == u"Draw" )
sGroupName = CuiResId(SID_SD_GRAPHIC_OPTIONS_RES[0].first);
- else if ( rModule == "Math" )
+ else if ( rModule == u"Math" )
sGroupName = CuiResId(SID_SM_EDITOPTIONS_RES[0].first);
- else if ( rModule == "Base" )
+ else if ( rModule == u"Base" )
sGroupName = CuiResId(SID_SB_STARBASEOPTIONS_RES[0].first);
}
return sGroupName;
diff --git a/dbaccess/source/filter/hsqldb/createparser.cxx b/dbaccess/source/filter/hsqldb/createparser.cxx
index ad1c95f89966..9aad116535fb 100644
--- a/dbaccess/source/filter/hsqldb/createparser.cxx
+++ b/dbaccess/source/filter/hsqldb/createparser.cxx
@@ -97,49 +97,49 @@ bool lcl_isNullable(const OUString& sColumnDef) { return sColumnDef.indexOf("NOT
bool lcl_isPrimaryKey(const OUString& sColumnDef) { return sColumnDef.indexOf("PRIMARY KEY") >= 0; }
-sal_Int32 lcl_getDataTypeFromHsql(const OUString& sTypeName)
+sal_Int32 lcl_getDataTypeFromHsql(std::u16string_view sTypeName)
{
- if (sTypeName == "CHAR")
+ if (sTypeName == u"CHAR")
return DataType::CHAR;
- else if (sTypeName == "VARCHAR" || sTypeName == "VARCHAR_IGNORECASE")
+ else if (sTypeName == u"VARCHAR" || sTypeName == u"VARCHAR_IGNORECASE")
return DataType::VARCHAR;
- else if (sTypeName == "TINYINT")
+ else if (sTypeName == u"TINYINT")
return DataType::TINYINT;
- else if (sTypeName == "SMALLINT")
+ else if (sTypeName == u"SMALLINT")
return DataType::SMALLINT;
- else if (sTypeName == "INTEGER")
+ else if (sTypeName == u"INTEGER")
return DataType::INTEGER;
- else if (sTypeName == "BIGINT")
+ else if (sTypeName == u"BIGINT")
return DataType::BIGINT;
- else if (sTypeName == "NUMERIC")
+ else if (sTypeName == u"NUMERIC")
return DataType::NUMERIC;
- else if (sTypeName == "DECIMAL")
+ else if (sTypeName == u"DECIMAL")
return DataType::DECIMAL;
- else if (sTypeName == "BOOLEAN")
+ else if (sTypeName == u"BOOLEAN")
return DataType::BOOLEAN;
- else if (sTypeName == "LONGVARCHAR")
+ else if (sTypeName == u"LONGVARCHAR")
return DataType::LONGVARCHAR;
- else if (sTypeName == "LONGVARBINARY")
+ else if (sTypeName == u"LONGVARBINARY")
return DataType::LONGVARBINARY;
- else if (sTypeName == "CLOB")
+ else if (sTypeName == u"CLOB")
return DataType::CLOB;
- else if (sTypeName == "BLOB")
+ else if (sTypeName == u"BLOB")
return DataType::BLOB;
- else if (sTypeName == "BINARY")
+ else if (sTypeName == u"BINARY")
return DataType::BINARY;
- else if (sTypeName == "VARBINARY")
+ else if (sTypeName == u"VARBINARY")
return DataType::VARBINARY;
- else if (sTypeName == "DATE")
+ else if (sTypeName == u"DATE")
return DataType::DATE;
- else if (sTypeName == "TIME")
+ else if (sTypeName == u"TIME")
return DataType::TIME;
- else if (sTypeName == "TIMESTAMP")
+ else if (sTypeName == u"TIMESTAMP")
return DataType::TIMESTAMP;
- else if (sTypeName == "DOUBLE")
+ else if (sTypeName == u"DOUBLE")
return DataType::DOUBLE;
- else if (sTypeName == "REAL")
+ else if (sTypeName == u"REAL")
return DataType::REAL;
- else if (sTypeName == "FLOAT")
+ else if (sTypeName == u"FLOAT")
return DataType::FLOAT;
assert(false);
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx
index d126ccdd8412..62063f81e148 100644
--- a/desktop/source/deployment/manager/dp_extensionmanager.cxx
+++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx
@@ -214,18 +214,18 @@ Reference<task::XAbortChannel> ExtensionManager::createAbortChannel()
}
css::uno::Reference<css::deployment::XPackageManager>
-ExtensionManager::getPackageManager(OUString const & repository)
+ExtensionManager::getPackageManager(std::u16string_view repository)
{
Reference<css::deployment::XPackageManager> xPackageManager;
- if (repository == "user")
+ if (repository == u"user")
xPackageManager = getUserRepository();
- else if (repository == "shared")
+ else if (repository == u"shared")
xPackageManager = getSharedRepository();
- else if (repository == "bundled")
+ else if (repository == u"bundled")
xPackageManager = getBundledRepository();
- else if (repository == "tmp")
+ else if (repository == u"tmp")
xPackageManager = getTmpRepository();
- else if (repository == "bak")
+ else if (repository == u"bak")
xPackageManager = getBakRepository();
else
throw lang::IllegalArgumentException(
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.hxx b/desktop/source/deployment/manager/dp_extensionmanager.hxx
index 28c2f569f6ef..aeee0d15683a 100644
--- a/desktop/source/deployment/manager/dp_extensionmanager.hxx
+++ b/desktop/source/deployment/manager/dp_extensionmanager.hxx
@@ -204,7 +204,7 @@ private:
/// @throws css::lang::IllegalArgumentException
/// @throws css::uno::RuntimeException
css::uno::Reference<css::deployment::XPackageManager>
- getPackageManager(OUString const & repository);
+ getPackageManager(std::u16string_view repository);
/// @throws css::deployment::DeploymentException
/// @throws css::ucb::CommandFailedException
diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx
index a76076e623f9..21b9d4b4496b 100644
--- a/desktop/source/deployment/misc/dp_misc.cxx
+++ b/desktop/source/deployment/misc/dp_misc.cxx
@@ -195,16 +195,16 @@ bool compareExtensionFolderWithLastSynchronizedFile(
return bNeedsSync;
}
-bool needToSyncRepository(OUString const & name)
+bool needToSyncRepository(std::u16string_view name)
{
OUString folder;
OUString file;
- if ( name == "bundled" )
+ if ( name == u"bundled" )
{
folder = "$BUNDLED_EXTENSIONS";
file = "$BUNDLED_EXTENSIONS_USER/lastsynchronized";
}
- else if ( name == "shared" )
+ else if ( name == u"shared" )
{
folder = "$UNO_SHARED_PACKAGES_CACHE/uno_packages";
file = "$SHARED_EXTENSIONS_USER/lastsynchronized";
@@ -502,7 +502,7 @@ void syncRepositories(
//synchronize shared before bundled otherwise there are
//more revoke and registration calls.
bool bModified = false;
- if (force || needToSyncRepository("shared") || needToSyncRepository("bundled"))
+ if (force || needToSyncRepository(u"shared") || needToSyncRepository(u"bundled"))
{
xExtensionManager =
deployment::ExtensionManager::get(
diff --git a/desktop/source/deployment/misc/dp_platform.cxx b/desktop/source/deployment/misc/dp_platform.cxx
index 229208916598..d551263d9b9d 100644
--- a/desktop/source/deployment/misc/dp_platform.cxx
+++ b/desktop/source/deployment/misc/dp_platform.cxx
@@ -25,7 +25,7 @@
#include <rtl/bootstrap.hxx>
#include <osl/diagnose.h>
-#define PLATFORM_ALL "all"
+#define PLATFORM_ALL u"all"
namespace dp_misc
@@ -68,88 +68,88 @@ namespace
&& (cpu == StrCPU::get());
}
- bool isPlatformSupported( OUString const & token )
+ bool isPlatformSupported( std::u16string_view token )
{
bool ret = false;
if (token == PLATFORM_ALL)
ret = true;
- else if (token == "windows_x86")
+ else if (token == u"windows_x86")
ret = checkOSandCPU(u"Windows", u"x86");
- else if (token == "windows_x86_64")
+ else if (token == u"windows_x86_64")
ret = checkOSandCPU(u"Windows", u"X86_64");
- else if (token == "solaris_sparc")
+ else if (token == u"solaris_sparc")
ret = checkOSandCPU(u"Solaris", u"SPARC");
- else if (token == "solaris_sparc64")
+ else if (token == u"solaris_sparc64")
ret = checkOSandCPU(u"Solaris", u"SPARC64");
- else if (token == "solaris_x86")
+ else if (token == u"solaris_x86")
ret = checkOSandCPU(u"Solaris", u"x86");
- else if (token == "aix_powerpc")
+ else if (token == u"aix_powerpc")
ret = checkOSandCPU(u"AIX", u"PowerPC");
- else if (token == "macosx_x86_64")
+ else if (token == u"macosx_x86_64")
ret = checkOSandCPU(u"MacOSX", u"X86_64");
- else if (token == "linux_x86")
+ else if (token == u"linux_x86")
ret = checkOSandCPU(u"Linux", u"x86");
- else if (token == "linux_x86_64")
+ else if (token == u"linux_x86_64")
ret = checkOSandCPU(u"Linux", u"X86_64");
- else if (token == "linux_sparc")
+ else if (token == u"linux_sparc")
ret = checkOSandCPU(u"Linux", u"SPARC");
- else if (token == "linux_sparc64")
+ else if (token == u"linux_sparc64")
ret = checkOSandCPU(u"Linux", u"SPARC64");
- else if (token == "linux_powerpc")
+ else if (token == u"linux_powerpc")
ret = checkOSandCPU(u"Linux", u"PowerPC");
- else if (token == "linux_powerpc64")
+ else if (token == u"linux_powerpc64")
ret = checkOSandCPU(u"Linux", u"PowerPC_64");
- else if (token == "linux_powerpc64_le")
+ else if (token == u"linux_powerpc64_le")
ret = checkOSandCPU(u"Linux", u"PowerPC_64_LE");
- else if (token == "linux_arm_eabi")
+ else if (token == u"linux_arm_eabi")
ret = checkOSandCPU(u"Linux", u"ARM_EABI");
- else if (token == "linux_arm_oabi")
+ else if (token == u"linux_arm_oabi")
ret = checkOSandCPU(u"Linux", u"ARM_OABI");
- else if (token == "linux_mips_el")
+ else if (token == u"linux_mips_el")
ret = checkOSandCPU(u"Linux", u"MIPS_EL");
- else if (token == "linux_mips64_el")
+ else if (token == u"linux_mips64_el")
ret = checkOSandCPU(u"Linux", u"MIPS64_EL");
- else if (token == "linux_mips_eb")
+ else if (token == u"linux_mips_eb")
ret = checkOSandCPU(u"Linux", u"MIPS_EB");
- else if (token == "linux_mips64_eb")
+ else if (token == u"linux_mips64_eb")
ret = checkOSandCPU(u"Linux", u"MIPS64_EB");
- else if (token == "linux_ia64")
+ else if (token == u"linux_ia64")
ret = checkOSandCPU(u"Linux", u"IA64");
- else if (token == "linux_m68k")
+ else if (token == u"linux_m68k")
ret = checkOSandCPU(u"Linux", u"M68K");
- else if (token == "linux_s390")
+ else if (token == u"linux_s390")
ret = checkOSandCPU(u"Linux", u"S390");
- else if (token == "linux_s390x")
+ else if (token == u"linux_s390x")
ret = checkOSandCPU(u"Linux", u"S390x");
- else if (token == "linux_hppa")
+ else if (token == u"linux_hppa")
ret = checkOSandCPU(u"Linux", u"HPPA");
- else if (token == "linux_alpha")
+ else if (token == u"linux_alpha")
ret = checkOSandCPU(u"Linux", u"ALPHA");
- else if (token == "linux_aarch64")
+ else if (token == u"linux_aarch64")
ret = checkOSandCPU(u"Linux", u"AARCH64");
- else if (token == "freebsd_x86")
+ else if (token == u"freebsd_x86")
ret = checkOSandCPU(u"FreeBSD", u"x86");
- else if (token == "freebsd_x86_64")
+ else if (token == u"freebsd_x86_64")
ret = checkOSandCPU(u"FreeBSD", u"X86_64");
- else if (token == "freebsd_powerpc")
+ else if (token == u"freebsd_powerpc")
ret = checkOSandCPU(u"FreeBSD", u"PowerPC");
- else if (token == "freebsd_powerpc64")
+ else if (token == u"freebsd_powerpc64")
ret = checkOSandCPU(u"FreeBSD", u"PowerPC64");
- else if (token == "kfreebsd_x86")
+ else if (token == u"kfreebsd_x86")
ret = checkOSandCPU(u"kFreeBSD", u"x86");
- else if (token == "kfreebsd_x86_64")
+ else if (token == u"kfreebsd_x86_64")
ret = checkOSandCPU(u"kFreeBSD", u"X86_64");
- else if (token == "netbsd_x86")
+ else if (token == u"netbsd_x86")
ret = checkOSandCPU(u"NetBSD", u"x86");
- else if (token == "netbsd_x86_64")
+ else if (token == u"netbsd_x86_64")
ret = checkOSandCPU(u"NetBSD", u"X86_64");
- else if (token == "openbsd_x86")
+ else if (token == u"openbsd_x86")
ret = checkOSandCPU(u"OpenBSD", u"x86");
- else if (token == "openbsd_x86_64")
+ else if (token == u"openbsd_x86_64")
ret = checkOSandCPU(u"OpenBSD", u"X86_64");
- else if (token == "dragonfly_x86")
+ else if (token == u"dragonfly_x86")
ret = checkOSandCPU(u"DragonFly", u"x86");
- else if (token == "dragonfly_x86_64")
+ else if (token == u"dragonfly_x86_64")
ret = checkOSandCPU(u"DragonFly", u"X86_64");
else
{
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index f53fd96eb609..66a32dafbc97 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2147,9 +2147,9 @@ void setLanguageAndLocale(OUString const & aLangISO)
aLocalOptions.Commit();
}
-void setFormatSpecificFilterData(OUString const & sFormat, comphelper::SequenceAsHashMap & rFilterDataMap)
+void setFormatSpecificFilterData(std::u16string_view sFormat, comphelper::SequenceAsHashMap & rFilterDataMap)
{
- if (sFormat == "pdf")
+ if (sFormat == u"pdf")
{
// always export bookmarks, which is needed for annotations
rFilterDataMap["ExportBookmarks"] <<= true;
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index 4197a245cd94..1637a9d63ade 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -73,47 +73,47 @@ const char ITEM_DESCRIPTOR_COMMANDURL[] = "CommandURL";
const char ITEM_DESCRIPTOR_CONTAINER[] = "ItemDescriptorContainer";
const char ITEM_DESCRIPTOR_LABEL[] = "Label";
-static OUString mapModuleShortNameToIdentifier(const OUString& sShortName)
+static OUString mapModuleShortNameToIdentifier(std::u16string_view sShortName)
{
OUString sIdentifier;
- if ( sShortName == "StartModule" )
+ if ( sShortName == u"StartModule" )
sIdentifier = "com.sun.star.frame.StartModule";
- else if ( sShortName == "swriter" )
+ else if ( sShortName == u"swriter" )
sIdentifier = "com.sun.star.text.TextDocument";
- else if ( sShortName == "scalc" )
+ else if ( sShortName == u"scalc" )
sIdentifier = "com.sun.star.sheet.SpreadsheetDocument";
- else if ( sShortName == "sdraw" )
+ else if ( sShortName == u"sdraw" )
sIdentifier = "com.sun.star.drawing.DrawingDocument";
- else if ( sShortName == "simpress" )
+ else if ( sShortName == u"simpress" )
sIdentifier = "com.sun.star.presentation.PresentationDocument";
- else if ( sShortName == "smath" )
+ else if ( sShortName == u"smath" )
sIdentifier = "com.sun.star.formula.FormulaProperties";
- else if ( sShortName == "schart" )
+ else if ( sShortName == u"schart" )
sIdentifier = "com.sun.star.chart2.ChartDocument";
- else if ( sShortName == "BasicIDE" )
+ else if ( sShortName == u"BasicIDE" )
sIdentifier = "com.sun.star.script.BasicIDE";
- else if ( sShortName == "dbapp" )
+ else if ( sShortName == u"dbapp" )
sIdentifier = "com.sun.star.sdb.OfficeDatabaseDocument";
- else if ( sShortName == "sglobal" )
+ else if ( sShortName == u"sglobal" )
sIdentifier = "com.sun.star.text.GlobalDocument";
- else if ( sShortName == "sweb" )
+ else if ( sShortName == u"sweb" )
sIdentifier = "com.sun.star.text.WebDocument";
- else if ( sShortName == "swxform" )
+ else if ( sShortName == u"swxform" )
sIdentifier = "com.sun.star.xforms.XMLFormDocument";
- else if ( sShortName == "sbibliography" )
+ else if ( sShortName == u"sbibliography" )
sIdentifier = "com.sun.star.frame.Bibliography";
return sIdentifier;
diff --git a/desktop/source/migration/migration_impl.hxx b/desktop/source/migration/migration_impl.hxx
index 3b9cb09d3856..a3e21a4a1f24 100644
--- a/desktop/source/migration/migration_impl.hxx
+++ b/desktop/source/migration/migration_impl.hxx
@@ -64,9 +64,9 @@ typedef std::vector< migration_step > migrations_v;
typedef std::unique_ptr< migrations_v > migrations_vr;
typedef std::vector< supported_migration > migrations_available;
-inline bool areBothOpenFrom(OUString const & cmd1, OUString const & cmd2)
+inline bool areBothOpenFrom(std::u16string_view cmd1, OUString const & cmd2)
{
- return cmd1 == ".uno:Open" && cmd2.startsWith(".uno:OpenFrom");
+ return cmd1 == u".uno:Open" && cmd2.startsWith(".uno:OpenFrom");
}
/**
diff --git a/filter/source/storagefilterdetect/filterdetect.cxx b/filter/source/storagefilterdetect/filterdetect.cxx
index f2eba546a4d3..f4d3e47abf28 100644
--- a/filter/source/storagefilterdetect/filterdetect.cxx
+++ b/filter/source/storagefilterdetect/filterdetect.cxx
@@ -37,37 +37,37 @@ using utl::MediaDescriptor;
namespace {
-OUString getInternalFromMediaType(const OUString& aMediaType)
+OUString getInternalFromMediaType(std::u16string_view aMediaType)
{
// OpenDocument types
- if ( aMediaType == MIMETYPE_OASIS_OPENDOCUMENT_TEXT_ASCII ) return "writer8";
- else if ( aMediaType == MIMETYPE_OASIS_OPENDOCUMENT_TEXT_TEMPLATE_ASCII ) return "writer8_template";
- else if ( aMediaType == MIMETYPE_OASIS_OPENDOCUMENT_TEXT_WEB_ASCII ) return "writerweb8_writer_template";
- else if ( aMediaType == MIMETYPE_OASIS_OPENDOCUMENT_TEXT_GLOBAL_ASCII ) return "writerglobal8";
- else if ( aMediaType == MIMETYPE_OASIS_OPENDOCUMENT_TEXT_GLOBAL_TEMPLATE_ASCII ) return "writerglobal8_template";
- else if ( aMediaType == MIMETYPE_OASIS_OPENDOCUMENT_DRAWING_ASCII ) return "draw8";
- else if ( aMediaType == MIMETYPE_OASIS_OPENDOCUMENT_DRAWING_TEMPLATE_ASCII ) return "draw8_template";
- else if ( aMediaType == MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_ASCII ) return "impress8";
- else if ( aMediaType == MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_TEMPLATE_ASCII ) return "impress8_template";
- else if ( aMediaType == MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_ASCII ) return "calc8";
- else if ( aMediaType == MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_TEMPLATE_ASCII ) return "calc8_template";
- else if ( aMediaType == MIMETYPE_OASIS_OPENDOCUMENT_CHART_ASCII ) return "chart8";
- else if ( aMediaType == MIMETYPE_OASIS_OPENDOCUMENT_FORMULA_ASCII ) return "math8";
- else if ( aMediaType == MIMETYPE_OASIS_OPENDOCUMENT_REPORT_CHART_ASCII ) return "StarBaseReportChart";
+ if ( aMediaType == u"" MIMETYPE_OASIS_OPENDOCUMENT_TEXT_ASCII ) return "writer8";
+ else if ( aMediaType == u"" MIMETYPE_OASIS_OPENDOCUMENT_TEXT_TEMPLATE_ASCII ) return "writer8_template";
+ else if ( aMediaType == u"" MIMETYPE_OASIS_OPENDOCUMENT_TEXT_WEB_ASCII ) return "writerweb8_writer_template";
+ else if ( aMediaType == u"" MIMETYPE_OASIS_OPENDOCUMENT_TEXT_GLOBAL_ASCII ) return "writerglobal8";
+ else if ( aMediaType == u"" MIMETYPE_OASIS_OPENDOCUMENT_TEXT_GLOBAL_TEMPLATE_ASCII ) return "writerglobal8_template";
+ else if ( aMediaType == u"" MIMETYPE_OASIS_OPENDOCUMENT_DRAWING_ASCII ) return "draw8";
+ else if ( aMediaType == u"" MIMETYPE_OASIS_OPENDOCUMENT_DRAWING_TEMPLATE_ASCII ) return "draw8_template";
+ else if ( aMediaType == u"" MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_ASCII ) return "impress8";
+ else if ( aMediaType == u"" MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_TEMPLATE_ASCII ) return "impress8_template";
+ else if ( aMediaType == u"" MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_ASCII ) return "calc8";
+ else if ( aMediaType == u"" MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_TEMPLATE_ASCII ) return "calc8_template";
+ else if ( aMediaType == u"" MIMETYPE_OASIS_OPENDOCUMENT_CHART_ASCII ) return "chart8";
+ else if ( aMediaType == u"" MIMETYPE_OASIS_OPENDOCUMENT_FORMULA_ASCII ) return "math8";
+ else if ( aMediaType == u"" MIMETYPE_OASIS_OPENDOCUMENT_REPORT_CHART_ASCII ) return "StarBaseReportChart";
// OOo legacy types
- else if ( aMediaType == MIMETYPE_VND_SUN_XML_WRITER_ASCII ) return "writer_StarOffice_XML_Writer";
- else if ( aMediaType == MIMETYPE_VND_SUN_XML_WRITER_TEMPLATE_ASCII ) return "writer_StarOffice_XML_Writer_Template";
- else if ( aMediaType == MIMETYPE_VND_SUN_XML_WRITER_WEB_ASCII ) return "writer_web_StarOffice_XML_Writer_Web_Template";
- else if ( aMediaType == MIMETYPE_VND_SUN_XML_WRITER_GLOBAL_ASCII ) return "writer_globaldocument_StarOffice_XML_Writer_GlobalDocument";
- else if ( aMediaType == MIMETYPE_VND_SUN_XML_DRAW_ASCII ) return "draw_StarOffice_XML_Draw";
- else if ( aMediaType == MIMETYPE_VND_SUN_XML_DRAW_TEMPLATE_ASCII ) return "draw_StarOffice_XML_Draw_Template";
- else if ( aMediaType == MIMETYPE_VND_SUN_XML_IMPRESS_ASCII ) return "impress_StarOffice_XML_Impress";
- else if ( aMediaType == MIMETYPE_VND_SUN_XML_IMPRESS_TEMPLATE_ASCII ) return "impress_StarOffice_XML_Impress_Template";
- else if ( aMediaType == MIMETYPE_VND_SUN_XML_CALC_ASCII ) return "calc_StarOffice_XML_Calc";
- else if ( aMediaType == MIMETYPE_VND_SUN_XML_CALC_TEMPLATE_ASCII ) return "calc_StarOffice_XML_Calc_Template";
- else if ( aMediaType == MIMETYPE_VND_SUN_XML_CHART_ASCII ) return "chart_StarOffice_XML_Chart";
- else if ( aMediaType == MIMETYPE_VND_SUN_XML_MATH_ASCII ) return "math_StarOffice_XML_Math";
+ else if ( aMediaType == u"" MIMETYPE_VND_SUN_XML_WRITER_ASCII ) return "writer_StarOffice_XML_Writer";
+ else if ( aMediaType == u"" MIMETYPE_VND_SUN_XML_WRITER_TEMPLATE_ASCII ) return "writer_StarOffice_XML_Writer_Template";
+ else if ( aMediaType == u"" MIMETYPE_VND_SUN_XML_WRITER_WEB_ASCII ) return "writer_web_StarOffice_XML_Writer_Web_Template";
+ else if ( aMediaType == u"" MIMETYPE_VND_SUN_XML_WRITER_GLOBAL_ASCII ) return "writer_globaldocument_StarOffice_XML_Writer_GlobalDocument";
+ else if ( aMediaType == u"" MIMETYPE_VND_SUN_XML_DRAW_ASCII ) return "draw_StarOffice_XML_Draw";
+ else if ( aMediaType == u"" MIMETYPE_VND_SUN_XML_DRAW_TEMPLATE_ASCII ) return "draw_StarOffice_XML_Draw_Template";
+ else if ( aMediaType == u"" MIMETYPE_VND_SUN_XML_IMPRESS_ASCII ) return "impress_StarOffice_XML_Impress";
+ else if ( aMediaType == u"" MIMETYPE_VND_SUN_XML_IMPRESS_TEMPLATE_ASCII ) return "impress_StarOffice_XML_Impress_Template";
+ else if ( aMediaType == u"" MIMETYPE_VND_SUN_XML_CALC_ASCII ) return "calc_StarOffice_XML_Calc";
+ else if ( aMediaType == u"" MIMETYPE_VND_SUN_XML_CALC_TEMPLATE_ASCII ) return "calc_StarOffice_XML_Calc_Template";
+ else if ( aMediaType == u"" MIMETYPE_VND_SUN_XML_CHART_ASCII ) return "chart_StarOffice_XML_Chart";
+ else if ( aMediaType == u"" MIMETYPE_VND_SUN_XML_MATH_ASCII ) return "math_StarOffice_XML_Math";
// Unknown type
return OUString();
diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx
index b75080bae4a2..49b779e4cf29 100644
--- a/forms/source/component/ImageControl.cxx
+++ b/forms/source/component/ImageControl.cxx
@@ -486,9 +486,9 @@ bool OImageControlModel::commitControlValueToDbColumn( bool _bPostReset )
namespace
{
- bool lcl_isValidDocumentURL( const OUString& _rDocURL )
+ bool lcl_isValidDocumentURL( std::u16string_view _rDocURL )
{
- return ( !_rDocURL.isEmpty() && _rDocURL != "private:object" );
+ return ( !_rDocURL.empty() && _rDocURL != u"private:object" );
}
}
diff --git a/fpicker/source/office/fileview.cxx b/fpicker/source/office/fileview.cxx
index be49c1ba37c6..548b49c3cd1d 100644
--- a/fpicker/source/office/fileview.cxx
+++ b/fpicker/source/office/fileview.cxx
@@ -227,7 +227,7 @@ public:
DECL_LINK(EditedEntryHdl, const IterString&, bool);
DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
- void ExecuteContextMenuAction(const OString& rSelectedPopentry);
+ void ExecuteContextMenuAction(std::string_view rSelectedPopentry);
};
}
@@ -576,7 +576,7 @@ IMPL_LINK(ViewTabListBox_Impl, CommandHdl, const CommandEvent&, rCEvt, bool)
return true;
}
-void ViewTabListBox_Impl::ExecuteContextMenuAction(const OString& rSelectedPopupEntry)
+void ViewTabListBox_Impl::ExecuteContextMenuAction(std::string_view rSelectedPopupEntry)
{
if (rSelectedPopupEntry == "delete")
DeleteEntries();
diff --git a/framework/inc/targets.h b/framework/inc/targets.h
index b0bf251f0e8d..061b532fb6f2 100644
--- a/framework/inc/targets.h
+++ b/framework/inc/targets.h
@@ -24,13 +24,13 @@ namespace framework{
// Values for special frame search ... sTargetFrameName of findFrame() or queryDispatch() or loadComponentFromURL()
-#define SPECIALTARGET_SELF "_self" // The frame himself is searched.
-#define SPECIALTARGET_PARENT "_parent" // The direct parent frame is searched.
-#define SPECIALTARGET_TOP "_top" // Search at our parents for the first task (if any exist) or a frame without a parent.
-#define SPECIALTARGET_BLANK "_blank" // Create a new task.
-#define SPECIALTARGET_DEFAULT "_default" // Create a new task or recycle an existing one
+#define SPECIALTARGET_SELF u"_self" // The frame himself is searched.
+#define SPECIALTARGET_PARENT u"_parent" // The direct parent frame is searched.
+#define SPECIALTARGET_TOP u"_top" // Search at our parents for the first task (if any exist) or a frame without a parent.
+#define SPECIALTARGET_BLANK u"_blank" // Create a new task.
+#define SPECIALTARGET_DEFAULT u"_default" // Create a new task or recycle an existing one
#define SPECIALTARGET_BEAMER u"_beamer" // special frame in hierarchy
-#define SPECIALTARGET_HELPTASK "OFFICE_HELP_TASK" // special name for our help task
+#define SPECIALTARGET_HELPTASK u"OFFICE_HELP_TASK" // special name for our help task
} // namespace framework
diff --git a/framework/inc/uielement/statusbarmerger.hxx b/framework/inc/uielement/statusbarmerger.hxx
index 964559de777e..d7fecfaa881e 100644
--- a/framework/inc/uielement/statusbarmerger.hxx
+++ b/framework/inc/uielement/statusbarmerger.hxx
@@ -67,7 +67,7 @@ namespace StatusbarMerger
bool ProcessMergeFallback( StatusBar* pStatusbar,
sal_uInt16& rItemId,
const OUString& rMergeCommand,
- const OUString& rMergeFallback,
+ std::u16string_view rMergeFallback,
const AddonStatusbarItemContainer& rItems );
}
diff --git a/framework/inc/xml/acceleratorconfigurationreader.hxx b/framework/inc/xml/acceleratorconfigurationreader.hxx
index 76a0a159ca69..b86bb1095e83 100644
--- a/framework/inc/xml/acceleratorconfigurationreader.hxx
+++ b/framework/inc/xml/acceleratorconfigurationreader.hxx
@@ -120,10 +120,10 @@ class AcceleratorConfigurationReader final : public ::cppu::WeakImplHelper< css:
private:
/** TODO document me */
- static EXMLElement implst_classifyElement(const OUString& sElement);
+ static EXMLElement implst_classifyElement(std::u16string_view sElement);
/** TODO document me */
- static EXMLAttribute implst_classifyAttribute(const OUString& sAttribute);
+ static EXMLAttribute implst_classifyAttribute(std::u16string_view sAttribute);
/** TODO document me */
OUString implts_getErrorLineString();
diff --git a/framework/source/inc/loadenv/targethelper.hxx b/framework/source/inc/loadenv/targethelper.hxx
index 046cdfeb1bdc..54f0e761e803 100644
--- a/framework/source/inc/loadenv/targethelper.hxx
+++ b/framework/source/inc/loadenv/targethelper.hxx
@@ -61,7 +61,7 @@ class TargetHelper
@return It returns <TRUE/> if <var>sCheckTarget</var> represent
the expected <var>eSpecialTarget</var> value; <FALSE/> otherwise.
*/
- static bool matchSpecialTarget(const OUString& sCheckTarget ,
+ static bool matchSpecialTarget(std::u16string_view sCheckTarget ,
ESpecialTarget eSpecialTarget);
/** @short it checks, if the given name can be used
diff --git a/framework/source/loadenv/targethelper.cxx b/framework/source/loadenv/targethelper.cxx
index aab509b0fc6d..d531f81bc04f 100644
--- a/framework/source/loadenv/targethelper.cxx
+++ b/framework/source/loadenv/targethelper.cxx
@@ -22,7 +22,7 @@
namespace framework{
-bool TargetHelper::matchSpecialTarget(const OUString& sCheckTarget ,
+bool TargetHelper::matchSpecialTarget(std::u16string_view sCheckTarget ,
ESpecialTarget eSpecialTarget)
{
switch(eSpecialTarget)
diff --git a/framework/source/uielement/statusbarmerger.cxx b/framework/source/uielement/statusbarmerger.cxx
index c2b9e3abca47..b9f21c5f8a89 100644
--- a/framework/source/uielement/statusbarmerger.cxx
+++ b/framework/source/uielement/statusbarmerger.cxx
@@ -209,11 +209,11 @@ bool StatusbarMerger::ProcessMergeFallback(
StatusBar* pStatusbar,
sal_uInt16& rItemId,
const OUString& rMergeCommand,
- const OUString& rMergeFallback,
+ std::u16string_view rMergeFallback,
const AddonStatusbarItemContainer& rItems )
{
// fallback IGNORE or REPLACE/REMOVE item not found
- if (( rMergeFallback == "Ignore" ) ||
+ if (( rMergeFallback == u"Ignore" ) ||
( rMergeCommand == MERGECOMMAND_REPLACE ) ||
( rMergeCommand == MERGECOMMAND_REMOVE ) )
{
@@ -222,9 +222,9 @@ bool StatusbarMerger::ProcessMergeFallback(
else if (( rMergeCommand == MERGECOMMAND_ADDBEFORE ) ||
( rMergeCommand == MERGECOMMAND_ADDAFTER ) )
{
- if ( rMergeFallback == "AddFirst" )
+ if ( rMergeFallback == u"AddFirst" )
return lcl_MergeItems( pStatusbar, 0, 0, rItemId, rItems );
- else if ( rMergeFallback == "AddLast" )
+ else if ( rMergeFallback == u"AddLast" )
return lcl_MergeItems( pStatusbar, STATUSBAR_APPEND, 0, rItemId, rItems );
}
diff --git a/framework/source/uielement/styletoolbarcontroller.cxx b/framework/source/uielement/styletoolbarcontroller.cxx
index dfc8fa5bf007..a5c2715095ec 100644
--- a/framework/source/uielement/styletoolbarcontroller.cxx
+++ b/framework/source/uielement/styletoolbarcontroller.cxx
@@ -22,21 +22,21 @@
namespace {
-OUString MapFamilyToCommand( const OUString& rFamily )
+OUString MapFamilyToCommand( std::u16string_view rFamily )
{
- if ( rFamily == "ParagraphStyles" ||
- rFamily == "CellStyles" || // In sc
- rFamily == "graphics" ) // In sd
+ if ( rFamily == u"ParagraphStyles" ||
+ rFamily == u"CellStyles" || // In sc
+ rFamily == u"graphics" ) // In sd
return ".uno:ParaStyle";
- else if ( rFamily == "CharacterStyles" )
+ else if ( rFamily == u"CharacterStyles" )
return ".uno:CharStyle";
- else if ( rFamily == "PageStyles" )
+ else if ( rFamily == u"PageStyles" )
return ".uno:PageStyle";
- else if ( rFamily == "FrameStyles" )
+ else if ( rFamily == u"FrameStyles" )
return ".uno:FrameStyle";
- else if ( rFamily == "NumberingStyles" )
+ else if ( rFamily == u"NumberingStyles" )
return ".uno:ListStyle";
- else if ( rFamily == "TableStyles" )
+ else if ( rFamily == u"TableStyles" )
return ".uno:TableStyle";
return OUString();
diff --git a/framework/source/xml/acceleratorconfigurationreader.cxx b/framework/source/xml/acceleratorconfigurationreader.cxx
index 2ff467f6845e..1b36119f2fd6 100644
--- a/framework/source/xml/acceleratorconfigurationreader.cxx
+++ b/framework/source/xml/acceleratorconfigurationreader.cxx
@@ -203,13 +203,13 @@ void SAL_CALL AcceleratorConfigurationReader::setDocumentLocator(const css::uno:
m_xLocator = xLocator;
}
-AcceleratorConfigurationReader::EXMLElement AcceleratorConfigurationReader::implst_classifyElement(const OUString& sElement)
+AcceleratorConfigurationReader::EXMLElement AcceleratorConfigurationReader::implst_classifyElement(std::u16string_view sElement)
{
AcceleratorConfigurationReader::EXMLElement eElement;
- if (sElement == "http://openoffice.org/2001/accel^acceleratorlist")
+ if (sElement == u"http://openoffice.org/2001/accel^acceleratorlist")
eElement = E_ELEMENT_ACCELERATORLIST;
- else if (sElement == "http://openoffice.org/2001/accel^item")
+ else if (sElement == u"http://openoffice.org/2001/accel^item")
eElement = E_ELEMENT_ITEM;
else
throw css::uno::RuntimeException(
@@ -219,21 +219,21 @@ AcceleratorConfigurationReader::EXMLElement AcceleratorConfigurationReader::impl
return eElement;
}
-AcceleratorConfigurationReader::EXMLAttribute AcceleratorConfigurationReader::implst_classifyAttribute(const OUString& sAttribute)
+AcceleratorConfigurationReader::EXMLAttribute AcceleratorConfigurationReader::implst_classifyAttribute(std::u16string_view sAttribute)
{
AcceleratorConfigurationReader::EXMLAttribute eAttribute;
- if (sAttribute == "http://openoffice.org/2001/accel^code")
+ if (sAttribute == u"http://openoffice.org/2001/accel^code")
eAttribute = E_ATTRIBUTE_KEYCODE;
- else if (sAttribute == "http://openoffice.org/2001/accel^shift")
+ else if (sAttribute == u"http://openoffice.org/2001/accel^shift")
eAttribute = E_ATTRIBUTE_MOD_SHIFT;
- else if (sAttribute == "http://openoffice.org/2001/accel^mod1")
+ else if (sAttribute == u"http://openoffice.org/2001/accel^mod1")
eAttribute = E_ATTRIBUTE_MOD_MOD1;
- else if (sAttribute == "http://openoffice.org/2001/accel^mod2")
+ else if (sAttribute == u"http://openoffice.org/2001/accel^mod2")
eAttribute = E_ATTRIBUTE_MOD_MOD2;
- else if (sAttribute == "http://openoffice.org/2001/accel^mod3")
+ else if (sAttribute == u"http://openoffice.org/2001/accel^mod3")
eAttribute = E_ATTRIBUTE_MOD_MOD3;
- else if (sAttribute == "http://www.w3.org/1999/xlink^href")
+ else if (sAttribute == u"http://www.w3.org/1999/xlink^href")
eAttribute = E_ATTRIBUTE_URL;
else
throw css::uno::RuntimeException(
diff --git a/i18nlangtag/qa/cppunit/test_languagetag.cxx b/i18nlangtag/qa/cppunit/test_languagetag.cxx
index cafaf1cfc3b8..7cfa6277786e 100644
--- a/i18nlangtag/qa/cppunit/test_languagetag.cxx
+++ b/i18nlangtag/qa/cppunit/test_languagetag.cxx
@@ -674,68 +674,68 @@ void TestLanguageTag::testAllTags()
}
}
-bool checkMapping( const OUString& rStr1, const OUString& rStr2 )
+bool checkMapping( std::u16string_view rStr1, std::u16string_view rStr2 )
{
- if (rStr1 == "la-Latn" ) return rStr2 == "la";
- if (rStr1 == "tzm-Latn-DZ" ) return rStr2 == "kab-DZ";
- if (rStr1 == "bs-Latn-BA" ) return rStr2 == "bs-BA";
- if (rStr1 == "bs-Latn" ) return rStr2 == "bs";
- if (rStr1 == "cz" ) return rStr2 == "cs-CZ";
- if (rStr1 == "iw-IL" ) return rStr2 == "he-IL";
- if (rStr1 == "in-ID" ) return rStr2 == "id-ID";
- if (rStr1 == "sr-YU" ) return rStr2 == "sr-CS";
- if (rStr1 == "sh-RS" ) return rStr2 == "sr-Latn-RS";
- if (rStr1 == "sh-YU" ) return rStr2 == "sr-Latn-CS";
- if (rStr1 == "sh-CS" ) return rStr2 == "sr-Latn-CS";
- if (rStr1 == "sh-ME" ) return rStr2 == "sr-Latn-ME";
- if (rStr1 == "sh-BA" ) return rStr2 == "sr-Latn-BA";
- if (rStr1 == "sh" ) return rStr2 == "sr-Latn";
- if (rStr1 == "lah-PK" ) return rStr2 == "pnb-Arab-PK";
- if (rStr1 == "pa-PK" ) return rStr2 == "pnb-Arab-PK";
- if (rStr1 == "ca-XV" ) return rStr2 == "ca-ES-valencia";
- if (rStr1 == "qcv-ES" ) return rStr2 == "ca-ES-valencia";
- if (rStr1 == "ns-ZA" ) return rStr2 == "nso-ZA";
- if (rStr1 == "ven-ZA" ) return rStr2 == "ve-ZA";
- if (rStr1 == "qu-EC" ) return rStr2 == "quz-EC";
- if (rStr1 == "qu-PE" ) return rStr2 == "quz-PE";
- if (rStr1 == "ff-NG" ) return rStr2 == "fuv-NG";
- if (rStr1 == "ji-IL" ) return rStr2 == "yi-IL";
- if (rStr1 == "iu-CA" ) return rStr2 == "iu-Latn-CA";
- if (rStr1 == "iu" ) return rStr2 == "iu-Latn";
- if (rStr1 == "gbz-AF" ) return rStr2 == "prs-AF";
- if (rStr1 == "ber-DZ" ) return rStr2 == "kab-DZ";
- if (rStr1 == "tmz-MA" ) return rStr2 == "tzm-Tfng-MA";
- if (rStr1 == "ber-MA" ) return rStr2 == "tzm-Tfng-MA";
- if (rStr1 == "mg-MG" ) return rStr2 == "plt-MG";
- if (rStr1 == "pli" ) return rStr2 == "pi-Latn";
- if (rStr1 == "ks" ) return rStr2 == "ks-Arab";
- if (rStr1 == "chr-US" ) return rStr2 == "chr-Cher-US";
- if (rStr1 == "sd-PK" ) return rStr2 == "sd-Arab-PK";
- if (rStr1 == "sr-Cyrl-RS" ) return rStr2 == "sr-RS";
- if (rStr1 == "sr-Cyrl-ME" ) return rStr2 == "sr-ME";
- if (rStr1 == "sr-Cyrl-BA" ) return rStr2 == "sr-BA";
- if (rStr1 == "sr-Cyrl-CS" ) return rStr2 == "sr-CS";
- if (rStr1 == "sr-Cyrl" ) return rStr2 == "sr";
- if (rStr1 == "yi-Hebr-US" ) return rStr2 == "yi-US";
- if (rStr1 == "yi-Hebr-IL" ) return rStr2 == "yi-IL";
- if (rStr1 == "ha-NG" ) return rStr2 == "ha-Latn-NG";
- if (rStr1 == "ha-GH" ) return rStr2 == "ha-Latn-GH";
- if (rStr1 == "ku-Arab-IQ" ) return rStr2 == "ckb-IQ";
- if (rStr1 == "ku-Arab" ) return rStr2 == "ckb";
- if (rStr1 == "kmr-TR" ) return rStr2 == "kmr-Latn-TR";
- if (rStr1 == "ku-TR" ) return rStr2 == "kmr-Latn-TR";
- if (rStr1 == "kmr-SY" ) return rStr2 == "kmr-Latn-SY";
- if (rStr1 == "ku-SY" ) return rStr2 == "kmr-Latn-SY";
- if (rStr1 == "ku-IQ" ) return rStr2 == "ckb-IQ";
- if (rStr1 == "ku-IR" ) return rStr2 == "ckb-IR";
- if (rStr1 == "eu" ) return rStr2 == "eu-ES";
- if (rStr1 == "crk-Latn-CN" ) return rStr2 == "crk-Latn-CA";
- if (rStr1 == "crk-Cans-CN" ) return rStr2 == "crk-Cans-CA";
- if (rStr1 == "en-GB-oed" ) return rStr2 == "en-GB-oxendict";
- if (rStr1 == "es-ES_tradnl") return rStr2 == "es-ES-u-co-trad";
- if (rStr1 == "sd-IN" ) return rStr2 == "sd-Deva-IN";
- if (rStr1 == "cmn-CN" ) return rStr2 == "zh-CN";
- if (rStr1 == "cmn-TW" ) return rStr2 == "zh-TW";
+ if (rStr1 == u"la-Latn" ) return rStr2 == u"la";
+ if (rStr1 == u"tzm-Latn-DZ" ) return rStr2 == u"kab-DZ";
+ if (rStr1 == u"bs-Latn-BA" ) return rStr2 == u"bs-BA";
+ if (rStr1 == u"bs-Latn" ) return rStr2 == u"bs";
+ if (rStr1 == u"cz" ) return rStr2 == u"cs-CZ";
+ if (rStr1 == u"iw-IL" ) return rStr2 == u"he-IL";
+ if (rStr1 == u"in-ID" ) return rStr2 == u"id-ID";
+ if (rStr1 == u"sr-YU" ) return rStr2 == u"sr-CS";
+ if (rStr1 == u"sh-RS" ) return rStr2 == u"sr-Latn-RS";
+ if (rStr1 == u"sh-YU" ) return rStr2 == u"sr-Latn-CS";
+ if (rStr1 == u"sh-CS" ) return rStr2 == u"sr-Latn-CS";
+ if (rStr1 == u"sh-ME" ) return rStr2 == u"sr-Latn-ME";
+ if (rStr1 == u"sh-BA" ) return rStr2 == u"sr-Latn-BA";
+ if (rStr1 == u"sh" ) return rStr2 == u"sr-Latn";
+ if (rStr1 == u"lah-PK" ) return rStr2 == u"pnb-Arab-PK";
+ if (rStr1 == u"pa-PK" ) return rStr2 == u"pnb-Arab-PK";
+ if (rStr1 == u"ca-XV" ) return rStr2 == u"ca-ES-valencia";
+ if (rStr1 == u"qcv-ES" ) return rStr2 == u"ca-ES-valencia";
+ if (rStr1 == u"ns-ZA" ) return rStr2 == u"nso-ZA";
+ if (rStr1 == u"ven-ZA" ) return rStr2 == u"ve-ZA";
+ if (rStr1 == u"qu-EC" ) return rStr2 == u"quz-EC";
+ if (rStr1 == u"qu-PE" ) return rStr2 == u"quz-PE";
+ if (rStr1 == u"ff-NG" ) return rStr2 == u"fuv-NG";
+ if (rStr1 == u"ji-IL" ) return rStr2 == u"yi-IL";
+ if (rStr1 == u"iu-CA" ) return rStr2 == u"iu-Latn-CA";
+ if (rStr1 == u"iu" ) return rStr2 == u"iu-Latn";
+ if (rStr1 == u"gbz-AF" ) return rStr2 == u"prs-AF";
+ if (rStr1 == u"ber-DZ" ) return rStr2 == u"kab-DZ";
+ if (rStr1 == u"tmz-MA" ) return rStr2 == u"tzm-Tfng-MA";
+ if (rStr1 == u"ber-MA" ) return rStr2 == u"tzm-Tfng-MA";
+ if (rStr1 == u"mg-MG" ) return rStr2 == u"plt-MG";
+ if (rStr1 == u"pli" ) return rStr2 == u"pi-Latn";
+ if (rStr1 == u"ks" ) return rStr2 == u"ks-Arab";
+ if (rStr1 == u"chr-US" ) return rStr2 == u"chr-Cher-US";
+ if (rStr1 == u"sd-PK" ) return rStr2 == u"sd-Arab-PK";
+ if (rStr1 == u"sr-Cyrl-RS" ) return rStr2 == u"sr-RS";
+ if (rStr1 == u"sr-Cyrl-ME" ) return rStr2 == u"sr-ME";
+ if (rStr1 == u"sr-Cyrl-BA" ) return rStr2 == u"sr-BA";
+ if (rStr1 == u"sr-Cyrl-CS" ) return rStr2 == u"sr-CS";
+ if (rStr1 == u"sr-Cyrl" ) return rStr2 == u"sr";
+ if (rStr1 == u"yi-Hebr-US" ) return rStr2 == u"yi-US";
+ if (rStr1 == u"yi-Hebr-IL" ) return rStr2 == u"yi-IL";
+ if (rStr1 == u"ha-NG" ) return rStr2 == u"ha-Latn-NG";
+ if (rStr1 == u"ha-GH" ) return rStr2 == u"ha-Latn-GH";
+ if (rStr1 == u"ku-Arab-IQ" ) return rStr2 == u"ckb-IQ";
+ if (rStr1 == u"ku-Arab" ) return rStr2 == u"ckb";
+ if (rStr1 == u"kmr-TR" ) return rStr2 == u"kmr-Latn-TR";
+ if (rStr1 == u"ku-TR" ) return rStr2 == u"kmr-Latn-TR";
+ if (rStr1 == u"kmr-SY" ) return rStr2 == u"kmr-Latn-SY";
+ if (rStr1 == u"ku-SY" ) return rStr2 == u"kmr-Latn-SY";
+ if (rStr1 == u"ku-IQ" ) return rStr2 == u"ckb-IQ";
+ if (rStr1 == u"ku-IR" ) return rStr2 == u"ckb-IR";
+ if (rStr1 == u"eu" ) return rStr2 == u"eu-ES";
+ if (rStr1 == u"crk-Latn-CN" ) return rStr2 == u"crk-Latn-CA";
+ if (rStr1 == u"crk-Cans-CN" ) return rStr2 == u"crk-Cans-CA";
+ if (rStr1 == u"en-GB-oed" ) return rStr2 == u"en-GB-oxendict";
+ if (rStr1 == u"es-ES_tradnl") return rStr2 == u"es-ES-u-co-trad";
+ if (rStr1 == u"sd-IN" ) return rStr2 == u"sd-Deva-IN";
+ if (rStr1 == u"cmn-CN" ) return rStr2 == u"zh-CN";
+ if (rStr1 == u"cmn-TW" ) return rStr2 == u"zh-TW";
return rStr1 == rStr2;
}
diff --git a/i18npool/inc/numberformatcode.hxx b/i18npool/inc/numberformatcode.hxx
index 47055edb8967..2b1a5006653d 100644
--- a/i18npool/inc/numberformatcode.hxx
+++ b/i18npool/inc/numberformatcode.hxx
@@ -62,9 +62,9 @@ private:
const css::uno::Sequence< css::i18n::FormatElement >& getFormats( const css::lang::Locale& rLocale );
static OUString mapElementTypeShortToString(sal_Int16 formatType);
- static sal_Int16 mapElementTypeStringToShort(const OUString& formatType);
+ static sal_Int16 mapElementTypeStringToShort(std::u16string_view formatType);
static OUString mapElementUsageShortToString(sal_Int16 formatUsage);
- static sal_Int16 mapElementUsageStringToShort(const OUString& formatUsage);
+ static sal_Int16 mapElementUsageStringToShort(std::u16string_view formatUsage);
};
diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
index 119cc76b4f61..2d55e1fd0974 100644
--- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
+++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
@@ -546,10 +546,10 @@ void lcl_formatCharsGR(const sal_Unicode table[], int n, OUString& s )
}
static
-bool should_ignore( const OUString& s )
+bool should_ignore( std::u16string_view s )
{
// return true if blank or null
- return s == " " || (!s.isEmpty() && s[0]==0);
+ return s == u" " || (!s.empty() && s[0]==0);
}
/**
diff --git a/i18npool/source/localedata/LocaleNode.hxx b/i18npool/source/localedata/LocaleNode.hxx
index f5990fcb772b..0d46a9e80876 100644
--- a/i18npool/source/localedata/LocaleNode.hxx
+++ b/i18npool/source/localedata/LocaleNode.hxx
@@ -49,7 +49,7 @@ public:
void writeFunction3(const char *func, const char *style, const char* levels, const char* attr, const char *array) const;
void writeRefFunction3(const char *func, const OUString& useLocale) const;
void writeIntParameter(const char* pAsciiStr, const sal_Int16 count, sal_Int16 val) const;
- bool writeDefaultParameter(const char* pAsciiStr, const OUString& str, sal_Int16 count) const;
+ bool writeDefaultParameter(const char* pAsciiStr, std::u16string_view str, sal_Int16 count) const;
void writeParameter(const char* pAsciiStr, const OUString& aChars) const;
void writeParameter(const char* pAsciiStr, const OUString& aChars, sal_Int16 count) const;
void writeParameter(const char* pAsciiStr, const OUString& aChars, sal_Int16 count0, sal_Int16 count1) const;
diff --git a/i18npool/source/localedata/filewriter.cxx b/i18npool/source/localedata/filewriter.cxx
index f4652fefd610..f8643025d91d 100644
--- a/i18npool/source/localedata/filewriter.cxx
+++ b/i18npool/source/localedata/filewriter.cxx
@@ -126,9 +126,9 @@ void OFileWriter::writeIntParameter(const char* pAsciiStr, const sal_Int16 count
fprintf(m_f, "static const sal_Unicode %s%d[] = {%d};\n", pAsciiStr, count, val);
}
-bool OFileWriter::writeDefaultParameter(const char* pAsciiStr, const OUString& str, sal_Int16 count) const
+bool OFileWriter::writeDefaultParameter(const char* pAsciiStr, std::u16string_view str, sal_Int16 count) const
{
- bool bBool = str == "true";
+ bool bBool = str == u"true";
fprintf(m_f,"static const sal_Unicode default%s%d[] = {%d};\n", pAsciiStr, count, bBool);
return bBool;
}
diff --git a/i18npool/source/numberformatcode/numberformatcode.cxx b/i18npool/source/numberformatcode/numberformatcode.cxx
index c98a8b36c01e..90d6904b85a1 100644
--- a/i18npool/source/numberformatcode/numberformatcode.cxx
+++ b/i18npool/source/numberformatcode/numberformatcode.cxx
@@ -175,13 +175,13 @@ NumberFormatCodeMapper::mapElementTypeShortToString(sal_Int16 formatType)
}
sal_Int16
-NumberFormatCodeMapper::mapElementTypeStringToShort(const OUString& formatType)
+NumberFormatCodeMapper::mapElementTypeStringToShort(std::u16string_view formatType)
{
- if ( formatType == "short" )
+ if ( formatType == u"short" )
return css::i18n::KNumberFormatType::SHORT;
- if ( formatType == "medium" )
+ if ( formatType == u"medium" )
return css::i18n::KNumberFormatType::MEDIUM;
- if ( formatType == "long" )
+ if ( formatType == u"long" )
return css::i18n::KNumberFormatType::LONG;
return css::i18n::KNumberFormatType::SHORT;
@@ -214,23 +214,23 @@ NumberFormatCodeMapper::mapElementUsageShortToString(sal_Int16 formatUsage)
sal_Int16
-NumberFormatCodeMapper::mapElementUsageStringToShort(const OUString& formatUsage)
+NumberFormatCodeMapper::mapElementUsageStringToShort(std::u16string_view formatUsage)
{
- if ( formatUsage == "DATE" )
+ if ( formatUsage == u"DATE" )
return css::i18n::KNumberFormatUsage::DATE;
- if ( formatUsage == "TIME" )
+ if ( formatUsage == u"TIME" )
return css::i18n::KNumberFormatUsage::TIME;
- if ( formatUsage == "DATE_TIME" )
+ if ( formatUsage == u"DATE_TIME" )
return css::i18n::KNumberFormatUsage::DATE_TIME;
- if ( formatUsage == "FIXED_NUMBER" )
+ if ( formatUsage == u"FIXED_NUMBER" )
return css::i18n::KNumberFormatUsage::FIXED_NUMBER;
- if ( formatUsage == "FRACTION_NUMBER" )
+ if ( formatUsage == u"FRACTION_NUMBER" )
return css::i18n::KNumberFormatUsage::FRACTION_NUMBER;
- if ( formatUsage == "PERCENT_NUMBER" )
+ if ( formatUsage == u"PERCENT_NUMBER" )
return css::i18n::KNumberFormatUsage::PERCENT_NUMBER;
- if ( formatUsage == "CURRENCY" )
+ if ( formatUsage == u"CURRENCY" )
return css::i18n::KNumberFormatUsage::CURRENCY;
- if ( formatUsage == "SCIENTIFIC_NUMBER" )
+ if ( formatUsage == u"SCIENTIFIC_NUMBER" )
return css::i18n::KNumberFormatUsage::SCIENTIFIC_NUMBER;
return 0;
diff --git a/include/avmedia/MediaControlBase.hxx b/include/avmedia/MediaControlBase.hxx
index 44a93d0e0dde..3d4464ce0424 100644
--- a/include/avmedia/MediaControlBase.hxx
+++ b/include/avmedia/MediaControlBase.hxx
@@ -63,7 +63,7 @@ protected:
void UpdateVolumeSlider( MediaItem const & aMediaItem );
void UpdateTimeSlider( MediaItem const & aMediaItem );
void UpdateTimeField( MediaItem const & aMediaItem, double fTime );
- void SelectPlayToolBoxItem( MediaItem& aExecItem, MediaItem const & aItem, const OString& rId);
+ void SelectPlayToolBoxItem( MediaItem& aExecItem, MediaItem const & aItem, std::string_view rId);
void disposeWidgets();
};
diff --git a/include/comphelper/docpasswordhelper.hxx b/include/comphelper/docpasswordhelper.hxx
index 7505e3bdf2c4..fc98fd3ff34d 100644
--- a/include/comphelper/docpasswordhelper.hxx
+++ b/include/comphelper/docpasswordhelper.hxx
@@ -223,7 +223,7 @@ public:
const OUString& rSaltValue,
sal_uInt32 nSpinCount,
comphelper::Hash::IterCount eIterCount,
- const OUString& rAlgorithmName);
+ std::u16string_view rAlgorithmName);
/** Convenience function to calculate a salted hash with iterations as
@@ -269,7 +269,7 @@ public:
const OUString& rSaltValue,
sal_uInt32 nSpinCount,
comphelper::Hash::IterCount eIterCount,
- const OUString& rAlgorithmName);
+ std::u16string_view rAlgorithmName);
/** Convenience function to calculate a salted hash with iterations as
@@ -313,7 +313,7 @@ public:
const std::vector<unsigned char>& rSaltValue,
sal_uInt32 nSpinCount,
comphelper::Hash::IterCount eIterCount,
- const OUString& rAlgorithmName);
+ std::u16string_view rAlgorithmName);
/** This helper function generates a random sequence of bytes of
diff --git a/include/editeng/unoprnms.hxx b/include/editeng/unoprnms.hxx
index 35355a2f3186..011e504ae7f4 100644
--- a/include/editeng/unoprnms.hxx
+++ b/include/editeng/unoprnms.hxx
@@ -92,18 +92,18 @@
#define UNO_NAME_EDGERADIUS "CornerRadius"
#define UNO_NAME_TEXT_MINFRAMEHEIGHT "TextMinimumFrameHeight"
-#define UNO_NAME_TEXT_AUTOGROWHEIGHT "TextAutoGrowHeight"
+#define UNO_NAME_TEXT_AUTOGROWHEIGHT u"TextAutoGrowHeight"
#define UNO_NAME_TEXT_FITTOSIZE "TextFitToSize"
-#define UNO_NAME_TEXT_LEFTDIST "TextLeftDistance"
-#define UNO_NAME_TEXT_RIGHTDIST "TextRightDistance"
-#define UNO_NAME_TEXT_UPPERDIST "TextUpperDistance"
-#define UNO_NAME_TEXT_LOWERDIST "TextLowerDistance"
-#define UNO_NAME_TEXT_VERTADJUST "TextVerticalAdjust"
+#define UNO_NAME_TEXT_LEFTDIST u"TextLeftDistance"
+#define UNO_NAME_TEXT_RIGHTDIST u"TextRightDistance"
+#define UNO_NAME_TEXT_UPPERDIST u"TextUpperDistance"
+#define UNO_NAME_TEXT_LOWERDIST u"TextLowerDistance"
+#define UNO_NAME_TEXT_VERTADJUST u"TextVerticalAdjust"
#define UNO_NAME_TEXT_MAXFRAMEHEIGHT "TextMaximumFrameHeight"
#define UNO_NAME_TEXT_MINFRAMEWIDTH "TextMinimumFrameWidth"
#define UNO_NAME_TEXT_MAXFRAMEWIDTH "TextMaximumFrameWidth"
#define UNO_NAME_TEXT_AUTOGROWWIDTH "TextAutoGrowWidth"
-#define UNO_NAME_TEXT_HORZADJUST "TextHorizontalAdjust"
+#define UNO_NAME_TEXT_HORZADJUST u"TextHorizontalAdjust"
#define UNO_NAME_TEXT_ANIKIND "TextAnimationKind"
#define UNO_NAME_TEXT_ANIDIRECTION "TextAnimationDirection"
#define UNO_NAME_TEXT_ANISTARTINSIDE "TextAnimationStartInside"
@@ -112,7 +112,7 @@
#define UNO_NAME_TEXT_ANIDELAY "TextAnimationDelay"
#define UNO_NAME_TEXT_ANIAMOUNT "TextAnimationAmount"
#define UNO_NAME_TEXT_CONTOURFRAME "TextContourFrame"
-#define UNO_NAME_TEXT_WRITINGMODE "TextWritingMode"
+#define UNO_NAME_TEXT_WRITINGMODE u"TextWritingMode"
#define UNO_NAME_TEXT_FONTINDEPENDENTLINESPACING "FontIndependentLineSpacing"
#define UNO_NAME_TEXT_WORDWRAP "TextWordWrap"
#define UNO_NAME_TEXT_CHAINNEXTNAME "TextChainNextName"
diff --git a/include/linguistic/misc.hxx b/include/linguistic/misc.hxx
index a251ced79c63..aba180066990 100644
--- a/include/linguistic/misc.hxx
+++ b/include/linguistic/misc.hxx
@@ -46,10 +46,10 @@ class CharClass;
class LocaleDataWrapper;
-#define SN_GRAMMARCHECKER "com.sun.star.linguistic2.Proofreader"
-#define SN_SPELLCHECKER "com.sun.star.linguistic2.SpellChecker"
-#define SN_HYPHENATOR "com.sun.star.linguistic2.Hyphenator"
-#define SN_THESAURUS "com.sun.star.linguistic2.Thesaurus"
+#define SN_GRAMMARCHECKER u"com.sun.star.linguistic2.Proofreader"
+#define SN_SPELLCHECKER u"com.sun.star.linguistic2.SpellChecker"
+#define SN_HYPHENATOR u"com.sun.star.linguistic2.Hyphenator"
+#define SN_THESAURUS u"com.sun.star.linguistic2.Thesaurus"
namespace linguistic
diff --git a/include/oox/core/filterdetect.hxx b/include/oox/core/filterdetect.hxx
index 59e989c36ea3..ec0cd81a52db 100644
--- a/include/oox/core/filterdetect.hxx
+++ b/include/oox/core/filterdetect.hxx
@@ -84,7 +84,7 @@ public:
private:
void parseRelationship( const AttributeList& rAttribs );
- OUString getFilterNameFromContentType( const OUString& rContentType, const OUString& rFileName );
+ OUString getFilterNameFromContentType( std::u16string_view rContentType, const OUString& rFileName );
void parseContentTypesDefault( const AttributeList& rAttribs );
void parseContentTypesOverride( const AttributeList& rAttribs );
diff --git a/include/oox/drawingml/color.hxx b/include/oox/drawingml/color.hxx
index 5642b4000fc5..59f417cfac52 100644
--- a/include/oox/drawingml/color.hxx
+++ b/include/oox/drawingml/color.hxx
@@ -104,7 +104,7 @@ public:
/** Translates between color transformation tokens and their names */
static OUString getColorTransformationName( sal_Int32 nElement );
/** Translates between color transformation token names and the corresponding token */
- static sal_Int32 getColorTransformationToken( const OUString& sName );
+ static sal_Int32 getColorTransformationToken( std::u16string_view sName );
/// Compares this color with rOther.
bool equals(const Color& rOther, const GraphicHelper& rGraphicHelper, ::Color nPhClr) const;
diff --git a/include/oox/dump/dumperbase.hxx b/include/oox/dump/dumperbase.hxx
index d0b954c7be5a..74aa1da81213 100644
--- a/include/oox/dump/dumperbase.hxx
+++ b/include/oox/dump/dumperbase.hxx
@@ -330,8 +330,8 @@ public:
static OUString trimTrailingNul( const OUString& rStr );
static OString convertToUtf8( const OUString& rStr );
- static DataType convertToDataType( const OUString& rStr );
- static FormatType convertToFormatType( const OUString& rStr );
+ static DataType convertToDataType( std::u16string_view rStr );
+ static FormatType convertToFormatType( std::u16string_view rStr );
static bool convertFromDec( sal_Int64& ornData, const OUString& rData );
static bool convertFromHex( sal_Int64& ornData, const OUString& rData );
diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index 6c310fa0cbac..31eeb727760f 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -281,7 +281,7 @@ public:
void WriteFill( const css::uno::Reference< css::beans::XPropertySet >& xPropSet );
void WriteShapeStyle( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet );
void WriteShapeEffects( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet );
- void WriteShapeEffect( const OUString& sName, const css::uno::Sequence< css::beans::PropertyValue >& aEffectProps );
+ void WriteShapeEffect( std::u16string_view sName, const css::uno::Sequence< css::beans::PropertyValue >& aEffectProps );
void WriteShape3DEffects( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet );
void WriteArtisticEffect( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet );
OString WriteWdpPicture( const OUString& rFileId, const css::uno::Sequence< sal_Int8 >& rPictureData );
diff --git a/include/oox/helper/attributelist.hxx b/include/oox/helper/attributelist.hxx
index 43808761c922..4e3210bd3919 100644
--- a/include/oox/helper/attributelist.hxx
+++ b/include/oox/helper/attributelist.hxx
@@ -41,7 +41,7 @@ namespace sax_fastparser {
namespace oox {
/* Get the color tokens from their string representatives. */
- sal_Int32 getHighlightColorTokenFromString(const OUString& sColorName);
+ sal_Int32 getHighlightColorTokenFromString(std::u16string_view sColorName);
/** Static helpers for conversion of strings to attribute values of various
different data types.
diff --git a/include/oox/ppt/slidetransition.hxx b/include/oox/ppt/slidetransition.hxx
index 40b664231d9f..36f5eca9cebe 100644
--- a/include/oox/ppt/slidetransition.hxx
+++ b/include/oox/ppt/slidetransition.hxx
@@ -62,7 +62,7 @@ namespace oox::ppt {
void setOoxTransitionType( ::sal_Int32 OoxType,
::sal_Int32 param1, ::sal_Int32 param2 );
- void setPresetTransition(OUString const & sPresetTransition);
+ void setPresetTransition(std::u16string_view sPresetTransition);
private:
::sal_Int16 mnTransitionType;
diff --git a/include/sfx2/charwin.hxx b/include/sfx2/charwin.hxx
index 253bed5c1bd1..f4118d44ceb6 100644
--- a/include/sfx2/charwin.hxx
+++ b/include/sfx2/charwin.hxx
@@ -64,7 +64,7 @@ public:
void setClearClickHdl(const Link<SvxCharView*,void> &rLink);
void setClearAllClickHdl(const Link<SvxCharView*,void> &rLink);
- void ContextMenuSelect(const OString& rIdent);
+ void ContextMenuSelect(std::string_view rIdent);
};
#endif
diff --git a/include/sfx2/infobar.hxx b/include/sfx2/infobar.hxx
index 3b821a785c42..2b89052110b7 100644
--- a/include/sfx2/infobar.hxx
+++ b/include/sfx2/infobar.hxx
@@ -128,7 +128,7 @@ public:
VclPtr<SfxInfoBarWindow> getInfoBar(std::u16string_view sId);
bool hasInfoBarWithID(std::u16string_view sId);
void removeInfoBar(VclPtr<SfxInfoBarWindow> const& pInfoBar);
- static bool isInfobarEnabled(const OUString& sId);
+ static bool isInfobarEnabled(std::u16string_view sId);
void TriggerUpdateLayout();
diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx
index 521bf4207458..252b2d6d6e9e 100644
--- a/include/sfx2/lokhelper.hxx
+++ b/include/sfx2/lokhelper.hxx
@@ -73,7 +73,7 @@ public:
/// Get the device form factor that should be used for a new view.
static LOKDeviceFormFactor getDeviceFormFactor();
/// Set the device form factor that should be used for a new view.
- static void setDeviceFormFactor(const OUString& rDeviceFormFactor);
+ static void setDeviceFormFactor(std::u16string_view rDeviceFormFactor);
/// Iterate over any view shell, except pThisViewShell, passing it to the f function.
template<typename ViewShellType, typename FunctionType>
diff --git a/include/sfx2/templatedlglocalview.hxx b/include/sfx2/templatedlglocalview.hxx
index bd51d72766c5..b3a50eeff50c 100644
--- a/include/sfx2/templatedlglocalview.hxx
+++ b/include/sfx2/templatedlglocalview.hxx
@@ -42,7 +42,7 @@ public:
void MakeItemVisible(sal_uInt16 nId) { ThumbnailView::MakeItemVisible(nId); }
private:
- void ContextMenuSelectHdl(const OString& rIdent);
+ void ContextMenuSelectHdl(std::string_view rIdent);
void insertFilteredItems();
diff --git a/include/sfx2/templatelocalview.hxx b/include/sfx2/templatelocalview.hxx
index 99ccbab5ecc1..9b8569c04b03 100644
--- a/include/sfx2/templatelocalview.hxx
+++ b/include/sfx2/templatelocalview.hxx
@@ -55,7 +55,7 @@ public:
bool operator () (const ThumbnailViewItem *pItem);
- static bool isFilteredExtension(FILTER_APPLICATION filter, const OUString &rExt);
+ static bool isFilteredExtension(FILTER_APPLICATION filter, std::u16string_view rExt);
bool isValid (const OUString& rPath) const;
private:
@@ -90,7 +90,7 @@ public:
void createContextMenu(const bool bIsDefault );
- void ContextMenuSelectHdl(const OString& rIdent);
+ void ContextMenuSelectHdl(std::string_view rIdent);
TemplateContainerItem* getRegion(std::u16string_view sStr);
diff --git a/include/svx/SvxPresetListBox.hxx b/include/svx/SvxPresetListBox.hxx
index 7b5cca421f54..ec608c830754 100644
--- a/include/svx/SvxPresetListBox.hxx
+++ b/include/svx/SvxPresetListBox.hxx
@@ -32,7 +32,7 @@ private:
Link<SvxPresetListBox*,void> maRenameHdl;
Link<SvxPresetListBox*,void> maDeleteHdl;
- void OnMenuItemSelected(const OString& rIdent);
+ void OnMenuItemSelected(std::string_view rIdent);
template< typename ListType, typename EntryType >
void FillPresetListBoxImpl(ListType& pList, sal_uInt32 nStartIndex);
diff --git a/include/svx/charmap.hxx b/include/svx/charmap.hxx
index 25341d5f8e8c..5ea7b1f2e0be 100644
--- a/include/svx/charmap.hxx
+++ b/include/svx/charmap.hxx
@@ -152,7 +152,7 @@ protected:
// abstraction layers are: Unicode<->MapIndex<->Pixel
Point MapIndexToPixel( int) const;
DECL_LINK(VscrollHdl, weld::ScrolledWindow&, void);
- void ContextMenuSelect(const OString& rIdent);
+ void ContextMenuSelect(std::string_view rIdent);
void init();
tools::Rectangle getGridRectangle(const Point &rPointUL, const Size &rOutputSize);
diff --git a/include/svx/imapdlg.hxx b/include/svx/imapdlg.hxx
index 74b5a69a005f..edd80a41285e 100644
--- a/include/svx/imapdlg.hxx
+++ b/include/svx/imapdlg.hxx
@@ -118,7 +118,7 @@ class SVX_DLLPUBLIC SvxIMapDlg : public SfxModelessDialogController
void URLModify();
void DoOpen();
bool DoSave();
- void SetActiveTool(const OString& rId);
+ void SetActiveTool(std::string_view rId);
public:
diff --git a/include/unotools/moduleoptions.hxx b/include/unotools/moduleoptions.hxx
index 969fac8ad598..3293560c3733 100644
--- a/include/unotools/moduleoptions.hxx
+++ b/include/unotools/moduleoptions.hxx
@@ -99,7 +99,7 @@ class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtModuleOptions final : public utl::de
OUString GetFactoryDefaultFilter ( EFactory eFactory ) const;
bool IsDefaultFilterReadonly ( EFactory eFactory ) const;
sal_Int32 GetFactoryIcon ( EFactory eFactory ) const;
- static bool ClassifyFactoryByName ( const OUString& sName ,
+ static bool ClassifyFactoryByName ( std::u16string_view sName ,
EFactory& eFactory );
void SetFactoryStandardTemplate( EFactory eFactory ,
const OUString& sTemplate );
@@ -109,7 +109,7 @@ class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtModuleOptions final : public utl::de
/** @short return the corresponding application ID for the given
document service name.
*/
- static EFactory ClassifyFactoryByServiceName(const OUString& sName);
+ static EFactory ClassifyFactoryByServiceName(std::u16string_view sName);
/** @short return the corresponding application ID for the given
short name.
diff --git a/include/vcl/IconThemeInfo.hxx b/include/vcl/IconThemeInfo.hxx
index c398754c88a1..ec116ca2f4fc 100644
--- a/include/vcl/IconThemeInfo.hxx
+++ b/include/vcl/IconThemeInfo.hxx
@@ -48,7 +48,7 @@ public:
* It is not clear where this information belongs to. The sizes were hard-coded before they moved here.
* Maybe there is a way to determine the sizes from the icon theme packages.
*/
- static Size SizeByThemeName(const OUString&);
+ static Size SizeByThemeName(std::u16string_view);
/** Check whether an IconThemeInfo can be constructed from a URL */
static bool UrlCanBeParsed(const OUString& url);
diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx
index 6e9c9505fde9..d108f16a9dba 100644
--- a/include/vcl/builder.hxx
+++ b/include/vcl/builder.hxx
@@ -372,7 +372,7 @@ private:
void handleMenuChild(Menu *pParent, xmlreader::XmlReader &reader);
void handleMenuObject(Menu *pParent, xmlreader::XmlReader &reader);
- void handleListStore(xmlreader::XmlReader &reader, const OString &rID, const OString &rClass);
+ void handleListStore(xmlreader::XmlReader &reader, const OString &rID, std::string_view rClass);
void handleRow(xmlreader::XmlReader &reader, const OString &rID);
void handleTabChild(vcl::Window *pParent, xmlreader::XmlReader &reader);
VclPtr<Menu> handleMenu(xmlreader::XmlReader &reader, const OString &rID, bool bMenuBar);
diff --git a/include/xmloff/odffields.hxx b/include/xmloff/odffields.hxx
index 890c618cc604..89c2e6174335 100644
--- a/include/xmloff/odffields.hxx
+++ b/include/xmloff/odffields.hxx
@@ -23,12 +23,12 @@
#define ODF_FORMTEXT "vnd.oasis.opendocument.field.FORMTEXT"
#define ODF_FORMFIELD_DEFAULT_LENGTH 5
-#define ODF_FORMCHECKBOX "vnd.oasis.opendocument.field.FORMCHECKBOX"
+#define ODF_FORMCHECKBOX u"vnd.oasis.opendocument.field.FORMCHECKBOX"
#define ODF_FORMCHECKBOX_HELPTEXT "Checkbox_HelpText"
#define ODF_FORMCHECKBOX_NAME "Checkbox_Name"
#define ODF_FORMCHECKBOX_RESULT "Checkbox_Checked"
-#define ODF_FORMDROPDOWN "vnd.oasis.opendocument.field.FORMDROPDOWN"
+#define ODF_FORMDROPDOWN u"vnd.oasis.opendocument.field.FORMDROPDOWN"
#define ODF_FORMDROPDOWN_LISTENTRY "Dropdown_ListEntry"
#define ODF_FORMDROPDOWN_RESULT "Dropdown_Selected"
#define ODF_FORMDROPDOWN_ENTRY_COUNT_LIMIT 25
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index 94affa946402..35d2cd2a55a8 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -97,7 +97,7 @@ struct PluginMutex: public ::rtl::Static<osl::Mutex, PluginMutex> {};
#if defined(UNX) && !defined(ANDROID)
OString getPluginJarPath(
- const OUString & sVendor,
+ std::u16string_view sVendor,
const OUString& sLocation,
const OUString& sVersion)
{
@@ -105,7 +105,7 @@ OString getPluginJarPath(
OUString sName1("javaplugin.jar");
OUString sName2("plugin.jar");
OUString sPath;
- if ( sVendor == "Sun Microsystems Inc." )
+ if ( sVendor == u"Sun Microsystems Inc." )
{
SunVersion ver142("1.4.2-ea");
SunVersion ver150("1.5.0-ea");
diff --git a/linguistic/source/convdicxml.cxx b/linguistic/source/convdicxml.cxx
index bc9aede1c32b..3549060acfeb 100644
--- a/linguistic/source/convdicxml.cxx
+++ b/linguistic/source/convdicxml.cxx
@@ -44,8 +44,8 @@ using namespace linguistic;
#define XML_NAMESPACE_TCD_STRING "http://openoffice.org/2003/text-conversion-dictionary"
-#define CONV_TYPE_HANGUL_HANJA "Hangul / Hanja"
-#define CONV_TYPE_SCHINESE_TCHINESE "Chinese simplified / Chinese traditional"
+#define CONV_TYPE_HANGUL_HANJA u"Hangul / Hanja"
+#define CONV_TYPE_SCHINESE_TCHINESE u"Chinese simplified / Chinese traditional"
static OUString ConversionTypeToText( sal_Int16 nConversionType )
@@ -58,7 +58,7 @@ static OUString ConversionTypeToText( sal_Int16 nConversionType )
return aRes;
}
-static sal_Int16 GetConversionTypeFromText( const OUString &rText )
+static sal_Int16 GetConversionTypeFromText( std::u16string_view rText )
{
sal_Int16 nRes = -1;
if (rText == CONV_TYPE_HANGUL_HANJA)
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index 5dd758ebbf8d..dbf82dc60e0b 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -617,7 +617,7 @@ void LngSvcMgr::UpdateAll()
SvtLinguConfig aCfg;
const int nNumServices = 4;
- const char * const apServices[nNumServices] = { SN_SPELLCHECKER, SN_GRAMMARCHECKER, SN_HYPHENATOR, SN_THESAURUS };
+ const sal_Unicode * const apServices[nNumServices] = { SN_SPELLCHECKER, SN_GRAMMARCHECKER, SN_HYPHENATOR, SN_THESAURUS };
const char * const apCurLists[nNumServices] = { "ServiceManager/SpellCheckerList", "ServiceManager/GrammarCheckerList", "ServiceManager/HyphenatorList", "ServiceManager/ThesaurusList" };
const char * const apLastFoundLists[nNumServices] = { "ServiceManager/LastFoundSpellCheckers", "ServiceManager/LastFoundGrammarCheckers", "ServiceManager/LastFoundHyphenators", "ServiceManager/LastFoundThesauri" };
@@ -627,7 +627,7 @@ void LngSvcMgr::UpdateAll()
for (int k = 0; k < nNumServices; ++k)
{
- OUString aService( OUString::createFromAscii( apServices[k] ) );
+ OUString aService( apServices[k] );
OUString aActiveList( OUString::createFromAscii( apCurLists[k] ) );
OUString aLastFoundList( OUString::createFromAscii( apLastFoundLists[k] ) );
@@ -1550,7 +1550,7 @@ void SAL_CALL
}
-bool LngSvcMgr::SaveCfgSvcs( const OUString &rServiceName )
+bool LngSvcMgr::SaveCfgSvcs( std::u16string_view rServiceName )
{
SAL_INFO( "linguistic", "linguistic: LngSvcMgr::SaveCfgSvcs" );
diff --git a/linguistic/source/lngsvcmgr.hxx b/linguistic/source/lngsvcmgr.hxx
index dfd2ede52d38..5a56eaaaae21 100644
--- a/linguistic/source/lngsvcmgr.hxx
+++ b/linguistic/source/lngsvcmgr.hxx
@@ -114,7 +114,7 @@ class LngSvcMgr :
void SetCfgServiceLists( HyphenatorDispatcher &rHyphDsp );
void SetCfgServiceLists( ThesaurusDispatcher &rThesDsp );
- bool SaveCfgSvcs( const OUString &rServiceName );
+ bool SaveCfgSvcs( std::u16string_view rServiceName );
// utl::ConfigItem (to allow for listening of changes of relevant properties)
virtual void Notify( const css::uno::Sequence< OUString > &rPropertyNames ) override;
diff --git a/oox/source/core/filterdetect.cxx b/oox/source/core/filterdetect.cxx
index b57c4696cb13..68dbf6d802ec 100644
--- a/oox/source/core/filterdetect.cxx
+++ b/oox/source/core/filterdetect.cxx
@@ -174,11 +174,11 @@ void FilterDetectDocHandler::parseRelationship( const AttributeList& rAttribs )
}
}
-OUString FilterDetectDocHandler::getFilterNameFromContentType( const OUString& rContentType, const OUString& rFileName )
+OUString FilterDetectDocHandler::getFilterNameFromContentType( std::u16string_view rContentType, const OUString& rFileName )
{
bool bDocm = rFileName.endsWithIgnoreAsciiCase(".docm");
- if( rContentType == "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml" && !bDocm )
+ if( rContentType == u"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml" && !bDocm )
{
switch (maOOXMLVariant)
{
@@ -190,11 +190,11 @@ OUString FilterDetectDocHandler::getFilterNameFromContentType( const OUString& r
}
}
- if( rContentType == "application/vnd.ms-word.document.macroEnabled.main+xml" || bDocm )
+ if( rContentType == u"application/vnd.ms-word.document.macroEnabled.main+xml" || bDocm )
return "writer_MS_Word_2007_VBA";
- if( rContentType == "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml" ||
- rContentType == "application/vnd.ms-word.template.macroEnabledTemplate.main+xml" )
+ if( rContentType == u"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml" ||
+ rContentType == u"application/vnd.ms-word.template.macroEnabledTemplate.main+xml" )
{
switch (maOOXMLVariant)
{
@@ -206,31 +206,31 @@ OUString FilterDetectDocHandler::getFilterNameFromContentType( const OUString& r
}
}
- if( rContentType == "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml")
+ if( rContentType == u"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml")
return "MS Excel 2007 XML";
- if (rContentType == "application/vnd.ms-excel.sheet.macroEnabled.main+xml")
+ if (rContentType == u"application/vnd.ms-excel.sheet.macroEnabled.main+xml")
return "MS Excel 2007 VBA XML";
- if( rContentType == "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml" ||
- rContentType == "application/vnd.ms-excel.template.macroEnabled.main+xml" )
+ if( rContentType == u"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml" ||
+ rContentType == u"application/vnd.ms-excel.template.macroEnabled.main+xml" )
return "MS Excel 2007 XML Template";
- if ( rContentType == "application/vnd.ms-excel.sheet.binary.macroEnabled.main" )
+ if ( rContentType == u"application/vnd.ms-excel.sheet.binary.macroEnabled.main" )
return "MS Excel 2007 Binary";
- if (rContentType == "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml")
+ if (rContentType == u"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml")
return "MS PowerPoint 2007 XML";
- if (rContentType == "application/vnd.ms-powerpoint.presentation.macroEnabled.main+xml")
+ if (rContentType == u"application/vnd.ms-powerpoint.presentation.macroEnabled.main+xml")
return "MS PowerPoint 2007 XML VBA";
- if( rContentType == "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml" ||
- rContentType == "application/vnd.ms-powerpoint.slideshow.macroEnabled.main+xml" )
+ if( rContentType == u"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml" ||
+ rContentType == u"application/vnd.ms-powerpoint.slideshow.macroEnabled.main+xml" )
return "MS PowerPoint 2007 XML AutoPlay";
- if( rContentType == "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml" ||
- rContentType == "application/vnd.ms-powerpoint.template.macroEnabled.main+xml" )
+ if( rContentType == u"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml" ||
+ rContentType == u"application/vnd.ms-powerpoint.template.macroEnabled.main+xml" )
return "MS PowerPoint 2007 XML Template";
return OUString();
diff --git a/oox/source/crypto/AgileEngine.cxx b/oox/source/crypto/AgileEngine.cxx
index 179317510880..63712d01b3ef 100644
--- a/oox/source/crypto/AgileEngine.cxx
+++ b/oox/source/crypto/AgileEngine.cxx
@@ -195,15 +195,15 @@ const std::vector<sal_uInt8> constBlockHmac2 { 0xa0, 0x67, 0x7f, 0x02, 0xb2, 0x2
bool hashCalc(std::vector<sal_uInt8>& output,
std::vector<sal_uInt8>& input,
- const OUString& sAlgorithm )
+ std::u16string_view sAlgorithm )
{
- if (sAlgorithm == "SHA1")
+ if (sAlgorithm == u"SHA1")
{
std::vector<unsigned char> out = comphelper::Hash::calculateHash(input.data(), input.size(), comphelper::HashType::SHA1);
output = out;
return true;
}
- else if (sAlgorithm == "SHA512")
+ else if (sAlgorithm == u"SHA512")
{
std::vector<unsigned char> out = comphelper::Hash::calculateHash(input.data(), input.size(), comphelper::HashType::SHA512);
output = out;
@@ -212,9 +212,9 @@ bool hashCalc(std::vector<sal_uInt8>& output,
return false;
}
-CryptoHashType cryptoHashTypeFromString(OUString const & sAlgorithm)
+CryptoHashType cryptoHashTypeFromString(std::u16string_view sAlgorithm)
{
- if (sAlgorithm == "SHA512")
+ if (sAlgorithm == u"SHA512")
return CryptoHashType::SHA512;
return CryptoHashType::SHA1;
}
diff --git a/oox/source/drawingml/chart/seriesconverter.cxx b/oox/source/drawingml/chart/seriesconverter.cxx
index 2de8ee82d2f9..6e0b21071553 100644
--- a/oox/source/drawingml/chart/seriesconverter.cxx
+++ b/oox/source/drawingml/chart/seriesconverter.cxx
@@ -239,19 +239,19 @@ void importFillProperties( PropertySet& rPropSet, Shape& rShape, const GraphicHe
}
-DataPointCustomLabelFieldType lcl_ConvertFieldNameToFieldEnum( const OUString& rField )
+DataPointCustomLabelFieldType lcl_ConvertFieldNameToFieldEnum( std::u16string_view rField )
{
- if (rField == "VALUE")
+ if (rField == u"VALUE")
return DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_VALUE;
- else if (rField == "SERIESNAME")
+ else if (rField == u"SERIESNAME")
return DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_SERIESNAME;
- else if (rField == "CATEGORYNAME")
+ else if (rField == u"CATEGORYNAME")
return DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_CATEGORYNAME;
- else if (rField == "CELLREF")
+ else if (rField == u"CELLREF")
return DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_CELLREF;
- else if (rField == "CELLRANGE")
+ else if (rField == u"CELLRANGE")
return DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_CELLRANGE;
- else if (rField == "PERCENTAGE")
+ else if (rField == u"PERCENTAGE")
return DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_PERCENTAGE;
else
return DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT;
diff --git a/oox/source/drawingml/color.cxx b/oox/source/drawingml/color.cxx
index 33e3c3dcd053..e87079945600 100644
--- a/oox/source/drawingml/color.cxx
+++ b/oox/source/drawingml/color.cxx
@@ -402,63 +402,63 @@ OUString Color::getColorTransformationName( sal_Int32 nElement )
return OUString();
}
-sal_Int32 Color::getColorTransformationToken( const OUString& sName )
+sal_Int32 Color::getColorTransformationToken( std::u16string_view sName )
{
- if( sName == "red" )
+ if( sName == u"red" )
return XML_red;
- else if( sName == "redMod" )
+ else if( sName == u"redMod" )
return XML_redMod;
- else if( sName == "redOff" )
+ else if( sName == u"redOff" )
return XML_redOff;
- else if( sName == "green" )
+ else if( sName == u"green" )
return XML_green;
- else if( sName == "greenMod" )
+ else if( sName == u"greenMod" )
return XML_greenMod;
- else if( sName == "greenOff" )
+ else if( sName == u"greenOff" )
return XML_greenOff;
- else if( sName == "blue" )
+ else if( sName == u"blue" )
return XML_blue;
- else if( sName == "blueMod" )
+ else if( sName == u"blueMod" )
return XML_blueMod;
- else if( sName == "blueOff" )
+ else if( sName == u"blueOff" )
return XML_blueOff;
- else if( sName == "alpha" )
+ else if( sName == u"alpha" )
return XML_alpha;
- else if( sName == "alphaMod" )
+ else if( sName == u"alphaMod" )
return XML_alphaMod;
- else if( sName == "alphaOff" )
+ else if( sName == u"alphaOff" )
return XML_alphaOff;
- else if( sName == "hue" )
+ else if( sName == u"hue" )
return XML_hue;
- else if( sName == "hueMod" )
+ else if( sName == u"hueMod" )
return XML_hueMod;
- else if( sName == "hueOff" )
+ else if( sName == u"hueOff" )
return XML_hueOff;
- else if( sName == "sat" )
+ else if( sName == u"sat" )
return XML_sat;
- else if( sName == "satMod" )
+ else if( sName == u"satMod" )
return XML_satMod;
- else if( sName == "satOff" )
+ else if( sName == u"satOff" )
return XML_satOff;
- else if( sName == "lum" )
+ else if( sName == u"lum" )
return XML_lum;
- else if( sName == "lumMod" )
+ else if( sName == u"lumMod" )
return XML_lumMod;
- else if( sName == "lumOff" )
+ else if( sName == u"lumOff" )
return XML_lumOff;
- else if( sName == "shade" )
+ else if( sName == u"shade" )
return XML_shade;
- else if( sName == "tint" )
+ else if( sName == u"tint" )
return XML_tint;
- else if( sName == "gray" )
+ else if( sName == u"gray" )
return XML_gray;
- else if( sName == "comp" )
+ else if( sName == u"comp" )
return XML_comp;
- else if( sName == "inv" )
+ else if( sName == u"inv" )
return XML_inv;
- else if( sName == "gamma" )
+ else if( sName == u"gamma" )
return XML_gamma;
- else if( sName == "invGamma" )
+ else if( sName == u"invGamma" )
return XML_invGamma;
SAL_WARN( "oox.drawingml", "Color::getColorTransformationToken - unexpected transformation type" );
diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx
index d553dd092ff7..df18516a0aef 100644
--- a/oox/source/dump/dumperbase.cxx
+++ b/oox/source/dump/dumperbase.cxx
@@ -622,46 +622,46 @@ OString StringHelper::convertToUtf8( const OUString& rStr )
return OUStringToOString( rStr, RTL_TEXTENCODING_UTF8 );
}
-DataType StringHelper::convertToDataType( const OUString& rStr )
+DataType StringHelper::convertToDataType( std::u16string_view rStr )
{
DataType eType = DATATYPE_VOID;
- if ( rStr == "int8" )
+ if ( rStr == u"int8" )
eType = DATATYPE_INT8;
- else if ( rStr == "uint8" )
+ else if ( rStr == u"uint8" )
eType = DATATYPE_UINT8;
- else if ( rStr == "int16" )
+ else if ( rStr == u"int16" )
eType = DATATYPE_INT16;
- else if ( rStr == "uint16" )
+ else if ( rStr == u"uint16" )
eType = DATATYPE_UINT16;
- else if ( rStr == "int32" )
+ else if ( rStr == u"int32" )
eType = DATATYPE_INT32;
- else if ( rStr == "uint32" )
+ else if ( rStr == u"uint32" )
eType = DATATYPE_UINT32;
- else if ( rStr == "int64" )
+ else if ( rStr == u"int64" )
eType = DATATYPE_INT64;
- else if ( rStr == "uint64" )
+ else if ( rStr == u"uint64" )
eType = DATATYPE_UINT64;
- else if ( rStr == "float" )
+ else if ( rStr == u"float" )
eType = DATATYPE_FLOAT;
- else if ( rStr == "double" )
+ else if ( rStr == u"double" )
eType = DATATYPE_DOUBLE;
return eType;
}
-FormatType StringHelper::convertToFormatType( const OUString& rStr )
+FormatType StringHelper::convertToFormatType( std::u16string_view rStr )
{
FormatType eType = FORMATTYPE_NONE;
- if ( rStr == "dec" )
+ if ( rStr == u"dec" )
eType = FORMATTYPE_DEC;
- else if ( rStr == "hex" )
+ else if ( rStr == u"hex" )
eType = FORMATTYPE_HEX;
- else if ( rStr == "shorthex" )
+ else if ( rStr == u"shorthex" )
eType = FORMATTYPE_SHORTHEX;
- else if ( rStr == "bin" )
+ else if ( rStr == u"bin" )
eType = FORMATTYPE_BIN;
- else if ( rStr == "fix" )
+ else if ( rStr == u"fix" )
eType = FORMATTYPE_FIX;
- else if ( rStr == "bool" )
+ else if ( rStr == u"bool" )
eType = FORMATTYPE_BOOL;
return eType;
}
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 38295504105b..e87fba060646 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -435,38 +435,38 @@ static ::std::vector< double > lcl_getAllValuesFromSequence( const Reference< ch
return aResult;
}
-static sal_Int32 lcl_getChartType( const OUString& sChartType )
+static sal_Int32 lcl_getChartType( std::u16string_view sChartType )
{
chart::TypeId eChartTypeId = chart::TYPEID_UNKNOWN;
- if( sChartType == "com.sun.star.chart.BarDiagram"
- || sChartType == "com.sun.star.chart2.ColumnChartType" )
+ if( sChartType == u"com.sun.star.chart.BarDiagram"
+ || sChartType == u"com.sun.star.chart2.ColumnChartType" )
eChartTypeId = chart::TYPEID_BAR;
- else if( sChartType == "com.sun.star.chart.AreaDiagram"
- || sChartType == "com.sun.star.chart2.AreaChartType" )
+ else if( sChartType == u"com.sun.star.chart.AreaDiagram"
+ || sChartType == u"com.sun.star.chart2.AreaChartType" )
eChartTypeId = chart::TYPEID_AREA;
- else if( sChartType == "com.sun.star.chart.LineDiagram"
- || sChartType == "com.sun.star.chart2.LineChartType" )
+ else if( sChartType == u"com.sun.star.chart.LineDiagram"
+ || sChartType == u"com.sun.star.chart2.LineChartType" )
eChartTypeId = chart::TYPEID_LINE;
- else if( sChartType == "com.sun.star.chart.PieDiagram"
- || sChartType == "com.sun.star.chart2.PieChartType" )
+ else if( sChartType == u"com.sun.star.chart.PieDiagram"
+ || sChartType == u"com.sun.star.chart2.PieChartType" )
eChartTypeId = chart::TYPEID_PIE;
- else if( sChartType == "com.sun.star.chart.DonutDiagram"
- || sChartType == "com.sun.star.chart2.DonutChartType" )
+ else if( sChartType == u"com.sun.star.chart.DonutDiagram"
+ || sChartType == u"com.sun.star.chart2.DonutChartType" )
eChartTypeId = chart::TYPEID_DOUGHNUT;
- else if( sChartType == "com.sun.star.chart.XYDiagram"
- || sChartType == "com.sun.star.chart2.ScatterChartType" )
+ else if( sChartType == u"com.sun.star.chart.XYDiagram"
+ || sChartType == u"com.sun.star.chart2.ScatterChartType" )
eChartTypeId = chart::TYPEID_SCATTER;
- else if( sChartType == "com.sun.star.chart.NetDiagram"
- || sChartType == "com.sun.star.chart2.NetChartType" )
+ else if( sChartType == u"com.sun.star.chart.NetDiagram"
+ || sChartType == u"com.sun.star.chart2.NetChartType" )
eChartTypeId = chart::TYPEID_RADARLINE;
- else if( sChartType == "com.sun.star.chart.FilledNetDiagram"
- || sChartType == "com.sun.star.chart2.FilledNetChartType" )
+ else if( sChartType == u"com.sun.star.chart.FilledNetDiagram"
+ || sChartType == u"com.sun.star.chart2.FilledNetChartType" )
eChartTypeId = chart::TYPEID_RADARAREA;
- else if( sChartType == "com.sun.star.chart.StockDiagram"
- || sChartType == "com.sun.star.chart2.CandleStickChartType" )
+ else if( sChartType == u"com.sun.star.chart.StockDiagram"
+ || sChartType == u"com.sun.star.chart2.CandleStickChartType" )
eChartTypeId = chart::TYPEID_STOCK;
- else if( sChartType == "com.sun.star.chart.BubbleDiagram"
- || sChartType == "com.sun.star.chart2.BubbleChartType" )
+ else if( sChartType == u"com.sun.star.chart.BubbleDiagram"
+ || sChartType == u"com.sun.star.chart2.BubbleChartType" )
eChartTypeId = chart::TYPEID_BUBBLE;
return eChartTypeId;
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index fc5051cb4bb0..eca53a92d5a8 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -3821,7 +3821,7 @@ void DrawingML::WriteShapeStyle( const Reference< XPropertySet >& xPropSet )
mpFS->singleElementNS(XML_a, XML_fontRef, XML_idx, "minor");
}
-void DrawingML::WriteShapeEffect( const OUString& sName, const Sequence< PropertyValue >& aEffectProps )
+void DrawingML::WriteShapeEffect( std::u16string_view sName, const Sequence< PropertyValue >& aEffectProps )
{
if( !aEffectProps.hasElements() )
return;
@@ -3829,26 +3829,26 @@ void DrawingML::WriteShapeEffect( const OUString& sName, const Sequence< Propert
// assign the proper tag and enable bContainsColor if necessary
sal_Int32 nEffectToken = 0;
bool bContainsColor = false;
- if( sName == "outerShdw" )
+ if( sName == u"outerShdw" )
{
nEffectToken = FSNS( XML_a, XML_outerShdw );
bContainsColor = true;
}
- else if( sName == "innerShdw" )
+ else if( sName == u"innerShdw" )
{
nEffectToken = FSNS( XML_a, XML_innerShdw );
bContainsColor = true;
}
- else if( sName == "glow" )
+ else if( sName == u"glow" )
{
nEffectToken = FSNS( XML_a, XML_glow );
bContainsColor = true;
}
- else if( sName == "softEdge" )
+ else if( sName == u"softEdge" )
nEffectToken = FSNS( XML_a, XML_softEdge );
- else if( sName == "reflection" )
+ else if( sName == u"reflection" )
nEffectToken = FSNS( XML_a, XML_reflection );
- else if( sName == "blur" )
+ else if( sName == u"blur" )
nEffectToken = FSNS( XML_a, XML_blur );
OUString sSchemeClr;
@@ -4080,7 +4080,7 @@ void DrawingML::WriteShapeEffects( const Reference< XPropertySet >& rXPropSet )
aShadowGrabBag[2].Name = "RgbClrTransparency";
aShadowGrabBag[2].Value = rXPropSet->getPropertyValue( "ShadowTransparence" );
- WriteShapeEffect( "outerShdw", aShadowGrabBag );
+ WriteShapeEffect( u"outerShdw", aShadowGrabBag );
}
WriteSoftEdgeEffect(rXPropSet);
mpFS->endElementNS(XML_a, XML_effectLst);
@@ -4181,7 +4181,7 @@ void DrawingML::WriteGlowEffect(const Reference< XPropertySet >& rXPropSet)
aGlowProps[2].Value = rXPropSet->getPropertyValue("GlowEffectTransparency");
// TODO other stuff like saturation or luminance
- WriteShapeEffect("glow", aGlowProps);
+ WriteShapeEffect(u"glow", aGlowProps);
}
void DrawingML::WriteSoftEdgeEffect(const css::uno::Reference<css::beans::XPropertySet>& rXPropSet)
@@ -4198,7 +4198,7 @@ void DrawingML::WriteSoftEdgeEffect(const css::uno::Reference<css::beans::XPrope
aProps[0].Name = "Attribs";
aProps[0].Value <<= aAttribs;
- WriteShapeEffect("softEdge", aProps);
+ WriteShapeEffect(u"softEdge", aProps);
}
bool DrawingML::HasEnhancedCustomShapeSegmentCommand(
diff --git a/oox/source/helper/attributelist.cxx b/oox/source/helper/attributelist.cxx
index 725ebde132fd..afc6ebc483c7 100644
--- a/oox/source/helper/attributelist.cxx
+++ b/oox/source/helper/attributelist.cxx
@@ -62,8 +62,8 @@ sal_Unicode lclGetXChar( const sal_Unicode*& rpcStr, const sal_Unicode* pcEnd )
} // namespace
-#define STRING_TO_TOKEN(color) if (sColorName == #color) return XML_##color
-sal_Int32 getHighlightColorTokenFromString(const OUString& sColorName)
+#define STRING_TO_TOKEN(color) if (sColorName == u"" #color) return XML_##color
+sal_Int32 getHighlightColorTokenFromString(std::u16string_view sColorName)
{
STRING_TO_TOKEN(black);
STRING_TO_TOKEN(blue);
diff --git a/oox/source/ppt/slidetransition.cxx b/oox/source/ppt/slidetransition.cxx
index e65959634161..b65bd9db8b72 100644
--- a/oox/source/ppt/slidetransition.cxx
+++ b/oox/source/ppt/slidetransition.cxx
@@ -449,9 +449,9 @@ namespace oox::ppt {
}
}
- void SlideTransition::setPresetTransition(OUString const & sPresetTransition)
+ void SlideTransition::setPresetTransition(std::u16string_view sPresetTransition)
{
- if (sPresetTransition == "fallOver")
+ if (sPresetTransition == u"fallOver")
{
mnTransitionType = TransitionType::MISCSHAPEWIPE;
mnTransitionSubType = TransitionSubType::LEFTTORIGHT;
diff --git a/reportdesign/inc/strings.hxx b/reportdesign/inc/strings.hxx
index 917e6898775e..d81728247bed 100644
--- a/reportdesign/inc/strings.hxx
+++ b/reportdesign/inc/strings.hxx
@@ -68,8 +68,8 @@
#define PROPERTY_REPORTFOOTERON "ReportFooterOn"
#define PROPERTY_PAGEHEADERON "PageHeaderOn"
#define PROPERTY_PAGEFOOTERON "PageFooterOn"
-#define PROPERTY_HEADERON "HeaderOn"
-#define PROPERTY_FOOTERON "FooterOn"
+#define PROPERTY_HEADERON u"HeaderOn"
+#define PROPERTY_FOOTERON u"FooterOn"
#define PROPERTY_WIDTH "Width"
#define PROPERTY_POSITIONX "PositionX"
#define PROPERTY_POSITIONY "PositionY"
diff --git a/reportdesign/source/core/sdr/formatnormalizer.cxx b/reportdesign/source/core/sdr/formatnormalizer.cxx
index 0db0bcac38e8..195582503839 100644
--- a/reportdesign/source/core/sdr/formatnormalizer.cxx
+++ b/reportdesign/source/core/sdr/formatnormalizer.cxx
@@ -109,18 +109,18 @@ namespace rptui
}
- void FormatNormalizer::impl_onDefinitionPropertyChange( const OUString& _rChangedPropName )
+ void FormatNormalizer::impl_onDefinitionPropertyChange( std::u16string_view _rChangedPropName )
{
- if ( _rChangedPropName != "Command" && _rChangedPropName != "CommandType" && _rChangedPropName != "EscapeProcessing" )
+ if ( _rChangedPropName != u"Command" && _rChangedPropName != u"CommandType" && _rChangedPropName != u"EscapeProcessing" )
// nothing we're interested in
return;
m_bFieldListDirty = true;
}
- void FormatNormalizer::impl_onFormattedProperttyChange( const Reference< XFormattedField >& _rxFormatted, const OUString& _rChangedPropName )
+ void FormatNormalizer::impl_onFormattedProperttyChange( const Reference< XFormattedField >& _rxFormatted, std::u16string_view _rChangedPropName )
{
- if ( _rChangedPropName != "DataField" )
+ if ( _rChangedPropName != u"DataField" )
// nothing we're interested in
return;
diff --git a/reportdesign/source/core/sdr/formatnormalizer.hxx b/reportdesign/source/core/sdr/formatnormalizer.hxx
index d6249b4c1913..0ed30df3edfe 100644
--- a/reportdesign/source/core/sdr/formatnormalizer.hxx
+++ b/reportdesign/source/core/sdr/formatnormalizer.hxx
@@ -69,8 +69,8 @@ namespace rptui
private:
bool impl_lateInit();
- void impl_onDefinitionPropertyChange( const OUString& _rChangedPropName );
- void impl_onFormattedProperttyChange( const css::uno::Reference< css::report::XFormattedField >& _rxFormatted, const OUString& _rChangedPropName );
+ void impl_onDefinitionPropertyChange( std::u16string_view _rChangedPropName );
+ void impl_onFormattedProperttyChange( const css::uno::Reference< css::report::XFormattedField >& _rxFormatted, std::u16string_view _rChangedPropName );
bool impl_ensureUpToDateFieldList_nothrow();
diff --git a/reportdesign/source/ui/dlg/Condition.cxx b/reportdesign/source/ui/dlg/Condition.cxx
index 9918cd22abcc..baa7a948f37e 100644
--- a/reportdesign/source/ui/dlg/Condition.cxx
+++ b/reportdesign/source/ui/dlg/Condition.cxx
@@ -128,7 +128,7 @@ Condition::Condition(weld::Container* pParent, weld::Window* pDialog, ICondition
ConditionalExpressionFactory::getKnownConditionalExpressions( m_aConditionalExpressions );
}
-sal_uInt16 Condition::mapToolbarItemToSlotId(const OString& rItemId)
+sal_uInt16 Condition::mapToolbarItemToSlotId(std::string_view rItemId)
{
if (rItemId == "bold")
return SID_ATTR_CHAR_WEIGHT;
diff --git a/reportdesign/source/ui/dlg/Condition.hxx b/reportdesign/source/ui/dlg/Condition.hxx
index fe6fbb707356..02d26921bc62 100644
--- a/reportdesign/source/ui/dlg/Condition.hxx
+++ b/reportdesign/source/ui/dlg/Condition.hxx
@@ -141,7 +141,7 @@ namespace rptui
::rptui::OReportController& getController() const { return m_rController; }
- static sal_uInt16 mapToolbarItemToSlotId(const OString& rItemId);
+ static sal_uInt16 mapToolbarItemToSlotId(std::string_view rItemId);
css::uno::Reference<css::awt::XWindow> GetXWindow() const { return m_pDialog->GetXWindow(); }
diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx
index 13e5daebedec..d0a2a0670e81 100644
--- a/reportdesign/source/ui/dlg/Navigator.cxx
+++ b/reportdesign/source/ui/dlg/Navigator.cxx
@@ -242,7 +242,7 @@ NavigatorTree::~NavigatorTree()
namespace
{
- sal_uInt16 mapIdent(const OString& rIdent)
+ sal_uInt16 mapIdent(std::string_view rIdent)
{
if (rIdent == "sorting")
return SID_SORTINGANDGROUPING;
diff --git a/reportdesign/source/ui/inc/ReportController.hxx b/reportdesign/source/ui/inc/ReportController.hxx
index 326c5ff0308c..80685623f126 100644
--- a/reportdesign/source/ui/inc/ReportController.hxx
+++ b/reportdesign/source/ui/inc/ReportController.hxx
@@ -190,7 +190,7 @@ namespace rptui
@param _bShow when <TRUE/> the header and footer will be shown otherwise not
*/
void groupChange( const css::uno::Reference< css::report::XGroup>& _xGroup
- ,const OUString& _sPropName
+ ,std::u16string_view _sPropName
,sal_Int32 _nGroupPos
,bool _bShow);
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index cae05f329d5a..7613e7bcd09c 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -2267,7 +2267,7 @@ static sal_uInt16 lcl_getNonVisibleGroupsBefore( const uno::Reference< report::X
return nNonVisibleGroups;
}
-void OReportController::groupChange( const uno::Reference< report::XGroup>& _xGroup,const OUString& _sPropName,sal_Int32 _nGroupPos,bool _bShow)
+void OReportController::groupChange( const uno::Reference< report::XGroup>& _xGroup,std::u16string_view _sPropName,sal_Int32 _nGroupPos,bool _bShow)
{
::std::function<bool(OGroupHelper *)> pMemFun = ::std::mem_fn(&OGroupHelper::getHeaderOn);
::std::function<uno::Reference<report::XSection>(OGroupHelper *)> pMemFunSection = ::std::mem_fn(&OGroupHelper::getHeader);
diff --git a/sax/qa/cppunit/xmlimport.cxx b/sax/qa/cppunit/xmlimport.cxx
index 261b46f284c3..6ef6c81626cd 100644
--- a/sax/qa/cppunit/xmlimport.cxx
+++ b/sax/qa/cppunit/xmlimport.cxx
@@ -211,14 +211,14 @@ public:
virtual void SAL_CALL setDocumentLocator( const Reference< XLocator >& /* xLocator */ ) override {}
};
-OUString getNamespaceValue( const OUString& rNamespacePrefix )
+OUString getNamespaceValue( std::u16string_view rNamespacePrefix )
{
OUString aNamespaceURI;
- if (rNamespacePrefix == "office")
+ if (rNamespacePrefix == u"office")
aNamespaceURI = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
- else if (rNamespacePrefix == "text")
+ else if (rNamespacePrefix == u"text")
aNamespaceURI = "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
- else if (rNamespacePrefix == "note")
+ else if (rNamespacePrefix == u"note")
aNamespaceURI = "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
return aNamespaceURI;
}
@@ -230,7 +230,7 @@ OUString resolveNamespace( const OUString& aName )
{
if ( aName.getLength() > index + 1 )
{
- OUString aAttributeName = getNamespaceValue( aName.copy( 0, index ) ) +
+ OUString aAttributeName = getNamespaceValue( aName.subView( 0, index ) ) +
":" + aName.subView( index + 1 );
return aAttributeName;
}
diff --git a/sc/inc/styleuno.hxx b/sc/inc/styleuno.hxx
index b4f95f0b6214..9921bbb4f108 100644
--- a/sc/inc/styleuno.hxx
+++ b/sc/inc/styleuno.hxx
@@ -58,7 +58,7 @@ private:
ScStyleFamilyObj* GetObjectByType_Impl(SfxStyleFamily nType) const;
ScStyleFamilyObj* GetObjectByIndex_Impl(sal_uInt32 nIndex) const;
- ScStyleFamilyObj* GetObjectByName_Impl(const OUString& aName) const;
+ ScStyleFamilyObj* GetObjectByName_Impl(std::u16string_view aName) const;
public:
ScStyleFamiliesObj(ScDocShell* pDocSh);
diff --git a/sc/inc/tabprotection.hxx b/sc/inc/tabprotection.hxx
index caf408a0f35b..f4b856cc4782 100644
--- a/sc/inc/tabprotection.hxx
+++ b/sc/inc/tabprotection.hxx
@@ -67,7 +67,7 @@ namespace ScPassHashHelper
OUString getHashURI(ScPasswordHash eHash);
- ScPasswordHash getHashTypeFromURI(const OUString& rURI);
+ ScPasswordHash getHashTypeFromURI(std::u16string_view rURI);
}
class SAL_NO_VTABLE ScPassHashProtectable
diff --git a/sc/source/core/data/tabprotection.cxx b/sc/source/core/data/tabprotection.cxx
index 6c3de2bde15b..c0cc81852190 100644
--- a/sc/source/core/data/tabprotection.cxx
+++ b/sc/source/core/data/tabprotection.cxx
@@ -29,10 +29,10 @@
#define DEBUG_TAB_PROTECTION 0
-#define URI_SHA1 "http://www.w3.org/2000/09/xmldsig#sha1"
-#define URI_SHA256_ODF12 "http://www.w3.org/2000/09/xmldsig#sha256"
-#define URI_SHA256_W3C "http://www.w3.org/2001/04/xmlenc#sha256"
-#define URI_XLS_LEGACY "http://docs.oasis-open.org/office/ns/table/legacy-hash-excel"
+#define URI_SHA1 u"http://www.w3.org/2000/09/xmldsig#sha1"
+#define URI_SHA256_ODF12 u"http://www.w3.org/2000/09/xmldsig#sha256"
+#define URI_SHA256_W3C u"http://www.w3.org/2001/04/xmlenc#sha256"
+#define URI_XLS_LEGACY u"http://docs.oasis-open.org/office/ns/table/legacy-hash-excel"
using namespace ::com::sun::star;
using ::com::sun::star::uno::Sequence;
@@ -79,7 +79,7 @@ OUString ScPassHashHelper::getHashURI(ScPasswordHash eHash)
return OUString();
}
-ScPasswordHash ScPassHashHelper::getHashTypeFromURI(const OUString& rURI)
+ScPasswordHash ScPassHashHelper::getHashTypeFromURI(std::u16string_view rURI)
{
if (rURI == URI_SHA256_ODF12 || rURI == URI_SHA256_W3C)
return PASSHASH_SHA256;
diff --git a/sc/source/core/inc/addinhelpid.hxx b/sc/source/core/inc/addinhelpid.hxx
index 42b8c2d21128..878a0cf7e694 100644
--- a/sc/source/core/inc/addinhelpid.hxx
+++ b/sc/source/core/inc/addinhelpid.hxx
@@ -34,10 +34,10 @@ private:
public:
ScUnoAddInHelpIdGenerator() = delete;
- ScUnoAddInHelpIdGenerator( const OUString& rServiceName );
+ ScUnoAddInHelpIdGenerator( std::u16string_view rServiceName );
/** Sets service name of the AddIn. Has to be done before requesting help IDs. */
- void SetServiceName( const OUString& rServiceName );
+ void SetServiceName( std::u16string_view rServiceName );
/** @return The help ID of the function with given built-in name or 0 if not found. */
OString GetHelpId( const OUString& rFuncName ) const;
diff --git a/sc/source/core/tool/addinhelpid.cxx b/sc/source/core/tool/addinhelpid.cxx
index cad2ca675c87..595d52fe060f 100644
--- a/sc/source/core/tool/addinhelpid.cxx
+++ b/sc/source/core/tool/addinhelpid.cxx
@@ -145,22 +145,22 @@ const ScUnoAddInHelpId pDateFuncHelpIds[] =
{ "getWeeksInYear" , HID_DAI_FUNC_WEEKSINYEAR }
};
-ScUnoAddInHelpIdGenerator::ScUnoAddInHelpIdGenerator( const OUString& rServiceName )
+ScUnoAddInHelpIdGenerator::ScUnoAddInHelpIdGenerator( std::u16string_view rServiceName )
{
SetServiceName( rServiceName );
}
-void ScUnoAddInHelpIdGenerator::SetServiceName( const OUString& rServiceName )
+void ScUnoAddInHelpIdGenerator::SetServiceName( std::u16string_view rServiceName )
{
pCurrHelpIds = nullptr;
sal_uInt32 nSize = 0;
- if ( rServiceName == "com.sun.star.sheet.addin.Analysis" )
+ if ( rServiceName == u"com.sun.star.sheet.addin.Analysis" )
{
pCurrHelpIds = pAnalysisHelpIds;
nSize = sizeof( pAnalysisHelpIds );
}
- else if ( rServiceName == "com.sun.star.sheet.addin.DateFunctions" )
+ else if ( rServiceName == u"com.sun.star.sheet.addin.DateFunctions" )
{
pCurrHelpIds = pDateFuncHelpIds;
nSize = sizeof( pDateFuncHelpIds );
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index d66f9e3bdd69..684a6727839a 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -189,7 +189,7 @@ static OString lcl_makeHTMLColorTriplet(const Color& rColor)
ScHTMLExport::ScHTMLExport( SvStream& rStrmP, const OUString& rBaseURL, ScDocument* pDocP,
const ScRange& rRangeP, bool bAllP,
- const OUString& rStreamPathP, const OUString& rFilterOptions ) :
+ const OUString& rStreamPathP, std::u16string_view rFilterOptions ) :
ScExportBase( rStrmP, pDocP, rRangeP ),
aBaseURL( rBaseURL ),
aStreamPath( rStreamPathP ),
@@ -212,11 +212,11 @@ ScHTMLExport::ScHTMLExport( SvStream& rStrmP, const OUString& rBaseURL, ScDocume
eDestEnc = (pDoc->IsClipOrUndo() ? RTL_TEXTENCODING_UTF8 : rHtmlOptions.GetTextEncoding());
bCopyLocalFileToINet = rHtmlOptions.IsSaveGraphicsLocal();
- if (rFilterOptions == "SkipImages")
+ if (rFilterOptions == u"SkipImages")
{
mbSkipImages = true;
}
- else if (rFilterOptions == "SkipHeaderFooter")
+ else if (rFilterOptions == u"SkipHeaderFooter")
{
mbSkipHeaderFooter = true;
}
diff --git a/sc/source/filter/inc/htmlexp.hxx b/sc/source/filter/inc/htmlexp.hxx
index 26e295afa207..10c420354287 100644
--- a/sc/source/filter/inc/htmlexp.hxx
+++ b/sc/source/filter/inc/htmlexp.hxx
@@ -175,7 +175,7 @@ class ScHTMLExport : public ScExportBase
public:
ScHTMLExport( SvStream&, const OUString&, ScDocument*, const ScRange&,
- bool bAll, const OUString& aStreamPath, const OUString& rFilterOptions );
+ bool bAll, const OUString& aStreamPath, std::u16string_view rFilterOptions );
virtual ~ScHTMLExport() override;
void Write();
const OUString& GetNonConvertibleChars() const
diff --git a/sc/source/filter/lotus/lotform.cxx b/sc/source/filter/lotus/lotform.cxx
index 1013bdeb73bd..67e1954598eb 100644
--- a/sc/source/filter/lotus/lotform.cxx
+++ b/sc/source/filter/lotus/lotform.cxx
@@ -32,7 +32,7 @@
static const char* GetAddInName( const sal_uInt8 nIndex );
-static DefTokenId lcl_KnownAddIn(const OString& rTest);
+static DefTokenId lcl_KnownAddIn(std::string_view rTest);
void LotusToSc::DoFunc( DefTokenId eOc, sal_uInt8 nCnt, const char* pExtString )
{
@@ -1988,7 +1988,7 @@ const char* GetAddInName( const sal_uInt8 n )
return pNames[ n ];
}
-static DefTokenId lcl_KnownAddIn( const OString& rTest )
+static DefTokenId lcl_KnownAddIn( std::string_view rTest )
{
DefTokenId eId = ocNoName;
diff --git a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
index 8c82e65b8732..32317e7ec86e 100644
--- a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
+++ b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
@@ -49,9 +49,9 @@ XMLTableShapeImportHelper::~XMLTableShapeImportHelper()
{
}
-void XMLTableShapeImportHelper::SetLayer(const uno::Reference<drawing::XShape>& rShape, SdrLayerID nLayerID, const OUString& sType)
+void XMLTableShapeImportHelper::SetLayer(const uno::Reference<drawing::XShape>& rShape, SdrLayerID nLayerID, std::u16string_view sType)
{
- if ( sType == "com.sun.star.drawing.ControlShape" )
+ if ( sType == u"com.sun.star.drawing.ControlShape" )
nLayerID = SC_LAYER_CONTROLS;
if (nLayerID != SDRLAYER_NOTFOUND)
{
diff --git a/sc/source/filter/xml/XMLTableShapeImportHelper.hxx b/sc/source/filter/xml/XMLTableShapeImportHelper.hxx
index 720a7ca3ea0c..55d85f6ad919 100644
--- a/sc/source/filter/xml/XMLTableShapeImportHelper.hxx
+++ b/sc/source/filter/xml/XMLTableShapeImportHelper.hxx
@@ -38,7 +38,7 @@ public:
explicit XMLTableShapeImportHelper( ScXMLImport& rImp );
virtual ~XMLTableShapeImportHelper() override;
- static void SetLayer(const css::uno::Reference<css::drawing::XShape>& rShape, SdrLayerID nLayerID, const OUString& sType);
+ static void SetLayer(const css::uno::Reference<css::drawing::XShape>& rShape, SdrLayerID nLayerID, std::u16string_view sType);
virtual void finishShape(css::uno::Reference< css::drawing::XShape >& rShape,
const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList,
css::uno::Reference< css::drawing::XShapes >& rShapes) override;
diff --git a/sc/source/filter/xml/xmlcondformat.cxx b/sc/source/filter/xml/xmlcondformat.cxx
index 42a96e04c195..a1b54c036c30 100644
--- a/sc/source/filter/xml/xmlcondformat.cxx
+++ b/sc/source/filter/xml/xmlcondformat.cxx
@@ -835,26 +835,26 @@ ScXMLCondContext::ScXMLCondContext( ScXMLImport& rImport,
namespace {
-void setColorEntryType(const OUString& rType, ScColorScaleEntry* pEntry, const OUString& rFormula,
+void setColorEntryType(std::u16string_view rType, ScColorScaleEntry* pEntry, const OUString& rFormula,
ScXMLImport& rImport)
{
- if(rType == "minimum")
+ if(rType == u"minimum")
pEntry->SetType(COLORSCALE_MIN);
- else if(rType == "maximum")
+ else if(rType == u"maximum")
pEntry->SetType(COLORSCALE_MAX);
- else if(rType == "percentile")
+ else if(rType == u"percentile")
pEntry->SetType(COLORSCALE_PERCENTILE);
- else if(rType == "percent")
+ else if(rType == u"percent")
pEntry->SetType(COLORSCALE_PERCENT);
- else if(rType == "formula")
+ else if(rType == u"formula")
{
pEntry->SetType(COLORSCALE_FORMULA);
//position does not matter, only table is important
pEntry->SetFormula(rFormula, *rImport.GetDocument(), ScAddress(0,0,rImport.GetTables().GetCurrentSheet()), formula::FormulaGrammar::GRAM_ODFF);
}
- else if(rType == "auto-minimum")
+ else if(rType == u"auto-minimum")
pEntry->SetType(COLORSCALE_AUTO);
- else if(rType == "auto-maximum")
+ else if(rType == u"auto-maximum")
pEntry->SetType(COLORSCALE_AUTO);
}
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index 49c2f684816b..9dfddc407d77 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -380,8 +380,8 @@ static const SfxItemPropertyMap* lcl_GetFooterStyleMap()
#define SC_STYLE_FAMILY_COUNT 2
-#define SC_FAMILYNAME_CELL "CellStyles"
-#define SC_FAMILYNAME_PAGE "PageStyles"
+#define SC_FAMILYNAME_CELL u"CellStyles"
+#define SC_FAMILYNAME_PAGE u"PageStyles"
const SfxStyleFamily aStyleFamilyTypes[SC_STYLE_FAMILY_COUNT] = { SfxStyleFamily::Para, SfxStyleFamily::Page };
@@ -453,7 +453,7 @@ ScStyleFamilyObj* ScStyleFamiliesObj::GetObjectByIndex_Impl(sal_uInt32 nIndex) c
return nullptr; // invalid index
}
-ScStyleFamilyObj* ScStyleFamiliesObj::GetObjectByName_Impl(const OUString& aName) const
+ScStyleFamilyObj* ScStyleFamiliesObj::GetObjectByName_Impl(std::u16string_view aName) const
{
if ( pDocShell )
{
diff --git a/sc/source/ui/vba/vbaworkbooks.cxx b/sc/source/ui/vba/vbaworkbooks.cxx
index 61edd810ba9c..a0bdc927deda 100644
--- a/sc/source/ui/vba/vbaworkbooks.cxx
+++ b/sc/source/ui/vba/vbaworkbooks.cxx
@@ -151,14 +151,14 @@ ScVbaWorkbooks::Close()
}
bool
-ScVbaWorkbooks::isTextFile( const OUString& sType )
+ScVbaWorkbooks::isTextFile( std::u16string_view sType )
{
// will return true if the file is
// a) a variant of a text file
// b) a csv file
// c) unknown
// returning true basically means treat this like a csv file
- return sType == "generic_Text" || sType.isEmpty();
+ return sType == u"generic_Text" || sType.empty();
}
bool
diff --git a/sc/source/ui/vba/vbaworkbooks.hxx b/sc/source/ui/vba/vbaworkbooks.hxx
index 4191df49ce9a..1c6ae781d560 100644
--- a/sc/source/ui/vba/vbaworkbooks.hxx
+++ b/sc/source/ui/vba/vbaworkbooks.hxx
@@ -29,7 +29,7 @@ class ScVbaWorkbooks : public ScVbaWorkbooks_BASE
{
private:
OUString getFileFilterType( const OUString& rString );
- static bool isTextFile( const OUString& rString );
+ static bool isTextFile( std::u16string_view rString );
static bool isSpreadSheetFile( const OUString& rString );
static sal_Int16& getCurrentDelim(){ static sal_Int16 nDelim = 44; return nDelim; }
public:
diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx
index 492c9c0e45fc..bf4c3dab60db 100644
--- a/sd/source/core/CustomAnimationEffect.cxx
+++ b/sd/source/core/CustomAnimationEffect.cxx
@@ -1238,9 +1238,9 @@ bool CustomAnimationEffect::setProperty( sal_Int32 nNodeType, std::u16string_vie
return bChanged;
}
-static bool implIsColorAttribute( const OUString& rAttributeName )
+static bool implIsColorAttribute( std::u16string_view rAttributeName )
{
- return rAttributeName == "FillColor" || rAttributeName == "LineColor" || rAttributeName == "CharColor";
+ return rAttributeName == u"FillColor" || rAttributeName == u"LineColor" || rAttributeName == u"CharColor";
}
Any CustomAnimationEffect::getColor( sal_Int32 nIndex )
diff --git a/sd/source/filter/eppt/pptexanimations.cxx b/sd/source/filter/eppt/pptexanimations.cxx
index eaa346b809ed..d1659dd730d3 100644
--- a/sd/source/filter/eppt/pptexanimations.cxx
+++ b/sd/source/filter/eppt/pptexanimations.cxx
@@ -1354,13 +1354,13 @@ void AnimationExporter::exportAnimEvent( SvStream& rStrm, const Reference< XAnim
}
}
-Any AnimationExporter::convertAnimateValue( const Any& rSourceValue, const OUString& rAttributeName )
+Any AnimationExporter::convertAnimateValue( const Any& rSourceValue, std::u16string_view rAttributeName )
{
OUString aDest;
- if ( rAttributeName == "X"
- || rAttributeName == "Y"
- || rAttributeName == "Width"
- || rAttributeName == "Height"
+ if ( rAttributeName == u"X"
+ || rAttributeName == u"Y"
+ || rAttributeName == u"Width"
+ || rAttributeName == u"Height"
)
{
OUString aStr;
@@ -1370,20 +1370,20 @@ Any AnimationExporter::convertAnimateValue( const Any& rSourceValue, const OUStr
aDest += aStr;
}
}
- else if ( rAttributeName == "Rotate" // "r" or "style.rotation" ?
- || rAttributeName == "Opacity"
- || rAttributeName == "CharHeight"
- || rAttributeName == "SkewX"
+ else if ( rAttributeName == u"Rotate" // "r" or "style.rotation" ?
+ || rAttributeName == u"Opacity"
+ || rAttributeName == u"CharHeight"
+ || rAttributeName == u"SkewX"
)
{
double fNumber = 0.0;
if ( rSourceValue >>= fNumber )
aDest += OUString::number( fNumber );
}
- else if ( rAttributeName == "Color"
- || rAttributeName == "FillColor" // "Fillcolor" or "FillColor" ?
- || rAttributeName == "LineColor"
- || rAttributeName == "CharColor"
+ else if ( rAttributeName == u"Color"
+ || rAttributeName == u"FillColor" // "Fillcolor" or "FillColor" ?
+ || rAttributeName == u"LineColor"
+ || rAttributeName == u"CharColor"
)
{
sal_Int32 nColor = 0;
@@ -1410,7 +1410,7 @@ Any AnimationExporter::convertAnimateValue( const Any& rSourceValue, const OUStr
+ ")";
}
}
- else if ( rAttributeName == "FillStyle" )
+ else if ( rAttributeName == u"FillStyle" )
{
css::drawing::FillStyle eFillStyle;
if ( rSourceValue >>= eFillStyle )
@@ -1421,7 +1421,7 @@ Any AnimationExporter::convertAnimateValue( const Any& rSourceValue, const OUStr
aDest += "solid";
}
}
- else if (rAttributeName == "FillOn")
+ else if (rAttributeName == u"FillOn")
{
bool bFillOn;
if ( rSourceValue >>= bFillOn )
@@ -1432,7 +1432,7 @@ Any AnimationExporter::convertAnimateValue( const Any& rSourceValue, const OUStr
aDest += "false";
}
}
- else if ( rAttributeName == "LineStyle" )
+ else if ( rAttributeName == u"LineStyle" )
{
css::drawing::LineStyle eLineStyle;
if ( rSourceValue >>= eLineStyle )
@@ -1443,7 +1443,7 @@ Any AnimationExporter::convertAnimateValue( const Any& rSourceValue, const OUStr
aDest += "true";
}
}
- else if ( rAttributeName == "CharWeight" )
+ else if ( rAttributeName == u"CharWeight" )
{
float fFontWeight = 0.0;
if ( rSourceValue >>= fFontWeight )
@@ -1454,7 +1454,7 @@ Any AnimationExporter::convertAnimateValue( const Any& rSourceValue, const OUStr
aDest += "normal";
}
}
- else if ( rAttributeName == "CharUnderline" )
+ else if ( rAttributeName == u"CharUnderline" )
{
sal_Int16 nFontUnderline = 0;
if ( rSourceValue >>= nFontUnderline )
@@ -1465,7 +1465,7 @@ Any AnimationExporter::convertAnimateValue( const Any& rSourceValue, const OUStr
aDest += "true";
}
}
- else if ( rAttributeName == "CharPosture" )
+ else if ( rAttributeName == u"CharPosture" )
{
css::awt::FontSlant eFontSlant;
if ( rSourceValue >>= eFontSlant )
@@ -1476,7 +1476,7 @@ Any AnimationExporter::convertAnimateValue( const Any& rSourceValue, const OUStr
aDest += "normal"; // ?
}
}
- else if ( rAttributeName == "Visibility" )
+ else if ( rAttributeName == u"Visibility" )
{
bool bVisible = true;
if ( rSourceValue >>= bVisible )
diff --git a/sd/source/filter/eppt/pptexanimations.hxx b/sd/source/filter/eppt/pptexanimations.hxx
index 87432a7b5cb0..90916711f1c6 100644
--- a/sd/source/filter/eppt/pptexanimations.hxx
+++ b/sd/source/filter/eppt/pptexanimations.hxx
@@ -119,7 +119,7 @@ public:
void doexport( const css::uno::Reference< css::drawing::XDrawPage >& xPage, SvStream& rStrm );
// helper methods also used in ooxml export
- static css::uno::Any convertAnimateValue( const css::uno::Any& rSource, const OUString& rAttributeName );
+ static css::uno::Any convertAnimateValue( const css::uno::Any& rSource, std::u16string_view rAttributeName );
static bool GetNodeType( const css::uno::Reference< css::animations::XAnimationNode >& xNode, sal_Int16& nType );
static sal_Int16 GetFillMode( const css::uno::Reference< css::animations::XAnimationNode >& xNode, const sal_Int16 nFillDefault );
static void GetUserData( const css::uno::Sequence< css::beans::NamedValue >& rUserData, const css::uno::Any ** pAny, std::size_t nLen );
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index 39ea654879a9..4832de20446a 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -334,63 +334,63 @@ IMPL_LINK(CustomAnimationPane,EventMultiplexerListener,
}
}
-static sal_Int32 getPropertyType( const OUString& rProperty )
+static sal_Int32 getPropertyType( std::u16string_view rProperty )
{
- if ( rProperty == "Direction" )
+ if ( rProperty == u"Direction" )
return nPropertyTypeDirection;
- if ( rProperty == "Spokes" )
+ if ( rProperty == u"Spokes" )
return nPropertyTypeSpokes;
- if ( rProperty == "Zoom" )
+ if ( rProperty == u"Zoom" )
return nPropertyTypeZoom;
- if ( rProperty == "Accelerate" )
+ if ( rProperty == u"Accelerate" )
return nPropertyTypeAccelerate;
- if ( rProperty == "Decelerate" )
+ if ( rProperty == u"Decelerate" )
return nPropertyTypeDecelerate;
- if ( rProperty == "Color1" )
+ if ( rProperty == u"Color1" )
return nPropertyTypeFirstColor;
- if ( rProperty == "Color2" )
+ if ( rProperty == u"Color2" )
return nPropertyTypeSecondColor;
- if ( rProperty == "FillColor" )
+ if ( rProperty == u"FillColor" )
return nPropertyTypeFillColor;
- if ( rProperty == "ColorStyle" )
+ if ( rProperty == u"ColorStyle" )
return nPropertyTypeColorStyle;
- if ( rProperty == "AutoReverse" )
+ if ( rProperty == u"AutoReverse" )
return nPropertyTypeAutoReverse;
- if ( rProperty == "FontStyle" )
+ if ( rProperty == u"FontStyle" )
return nPropertyTypeFont;
- if ( rProperty == "CharColor" )
+ if ( rProperty == u"CharColor" )
return nPropertyTypeCharColor;
- if ( rProperty == "CharHeight" )
+ if ( rProperty == u"CharHeight" )
return nPropertyTypeCharHeight;
- if ( rProperty == "CharDecoration" )
+ if ( rProperty == u"CharDecoration" )
return nPropertyTypeCharDecoration;
- if ( rProperty == "LineColor" )
+ if ( rProperty == u"LineColor" )
return nPropertyTypeLineColor;
- if ( rProperty == "Rotate" )
+ if ( rProperty == u"Rotate" )
return nPropertyTypeRotate;
- if ( rProperty == "Transparency" )
+ if ( rProperty == u"Transparency" )
return nPropertyTypeTransparency;
- if ( rProperty == "Color" )
+ if ( rProperty == u"Color" )
return nPropertyTypeColor;
- if ( rProperty == "Scale" )
+ if ( rProperty == u"Scale" )
return nPropertyTypeScale;
return nPropertyTypeNone;
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index d24897a5c7dd..c98b433ee350 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -1037,7 +1037,7 @@ IMPL_LINK(AnnotationManagerImpl,EventMultiplexerListener,
namespace
{
- sal_uInt16 IdentToSID(const OString& rIdent)
+ sal_uInt16 IdentToSID(std::string_view rIdent)
{
if (rIdent == "reply")
return SID_REPLYTO_POSTIT;
diff --git a/sd/source/ui/func/fuconbez.cxx b/sd/source/ui/func/fuconbez.cxx
index a28bb06eb959..ee7099819bdf 100644
--- a/sd/source/ui/func/fuconbez.cxx
+++ b/sd/source/ui/func/fuconbez.cxx
@@ -357,15 +357,15 @@ void FuConstructBezierPolygon::SelectionHasChanged()
namespace {
/// Returns the color based on the color names listed in core/include/tools/color.hxx
/// Feel free to extend with more color names from color.hxx
-Color strToColor(const OUString& sColor)
+Color strToColor(std::u16string_view sColor)
{
Color aColor = COL_AUTO;
- if (sColor == "COL_GRAY")
+ if (sColor == u"COL_GRAY")
aColor = COL_GRAY;
- else if (sColor == "COL_GRAY3")
+ else if (sColor == u"COL_GRAY3")
aColor = COL_GRAY3;
- else if (sColor == "COL_GRAY7")
+ else if (sColor == u"COL_GRAY7")
aColor = COL_GRAY7;
return aColor;
diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx
index b998191083f9..0d303efaedf5 100644
--- a/sd/source/ui/func/fuconrec.cxx
+++ b/sd/source/ui/func/fuconrec.cxx
@@ -511,15 +511,15 @@ void FuConstructRectangle::Deactivate()
namespace {
/// Returns the color based on the color names listed in core/include/tools/color.hxx
/// Feel free to extend with more color names from color.hxx
-Color strToColor(const OUString& sColor)
+Color strToColor(std::u16string_view sColor)
{
Color aColor = COL_AUTO;
- if (sColor == "COL_GRAY")
+ if (sColor == u"COL_GRAY")
aColor = COL_GRAY;
- else if (sColor == "COL_GRAY3")
+ else if (sColor == u"COL_GRAY3")
aColor = COL_GRAY3;
- else if (sColor == "COL_GRAY7")
+ else if (sColor == u"COL_GRAY7")
aColor = COL_GRAY7;
return aColor;
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 4219c5f76a1f..e4f36ff7fe14 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -3040,24 +3040,24 @@ void PresentationSettingsEx::SetArguments( const Sequence< PropertyValue >& rArg
}
}
-void PresentationSettingsEx::SetPropertyValue( const OUString& rProperty, const Any& rValue )
+void PresentationSettingsEx::SetPropertyValue( std::u16string_view rProperty, const Any& rValue )
{
- if ( rProperty == "RehearseTimings" )
+ if ( rProperty == u"RehearseTimings" )
{
if( rValue >>= mbRehearseTimings )
return;
}
- else if ( rProperty == "Preview" )
+ else if ( rProperty == u"Preview" )
{
if( rValue >>= mbPreview )
return;
}
- else if ( rProperty == "AnimationNode" )
+ else if ( rProperty == u"AnimationNode" )
{
if( rValue >>= mxAnimationNode )
return;
}
- else if ( rProperty == "ParentWindow" )
+ else if ( rProperty == u"ParentWindow" )
{
Reference< XWindow > xWindow;
if( rValue >>= xWindow )
@@ -3067,12 +3067,12 @@ void PresentationSettingsEx::SetPropertyValue( const OUString& rProperty, const
return;
}
}
- else if ( rProperty == "AllowAnimations" )
+ else if ( rProperty == u"AllowAnimations" )
{
if( rValue >>= mbAnimationAllowed )
return;
}
- else if ( rProperty == "FirstPage" )
+ else if ( rProperty == u"FirstPage" )
{
OUString aPresPage;
if( rValue >>= aPresPage )
@@ -3088,32 +3088,32 @@ void PresentationSettingsEx::SetPropertyValue( const OUString& rProperty, const
return;
}
}
- else if ( rProperty == "IsAlwaysOnTop" )
+ else if ( rProperty == u"IsAlwaysOnTop" )
{
if( rValue >>= mbAlwaysOnTop )
return;
}
- else if ( rProperty == "IsAutomatic" )
+ else if ( rProperty == u"IsAutomatic" )
{
if( rValue >>= mbManual )
return;
}
- else if ( rProperty == "IsEndless" )
+ else if ( rProperty == u"IsEndless" )
{
if( rValue >>= mbEndless )
return;
}
- else if ( rProperty == "IsFullScreen" )
+ else if ( rProperty == u"IsFullScreen" )
{
if( rValue >>= mbFullScreen )
return;
}
- else if ( rProperty == "IsMouseVisible" )
+ else if ( rProperty == u"IsMouseVisible" )
{
if( rValue >>= mbMouseVisible )
return;
}
- else if ( rProperty == "Pause" )
+ else if ( rProperty == u"Pause" )
{
sal_Int32 nPause = -1;
if( (rValue >>= nPause) && (nPause >= 0) )
@@ -3122,7 +3122,7 @@ void PresentationSettingsEx::SetPropertyValue( const OUString& rProperty, const
return;
}
}
- else if ( rProperty == "UsePen" )
+ else if ( rProperty == u"UsePen" )
{
if( rValue >>= mbMouseAsPen )
return;
diff --git a/sd/source/ui/slideshow/slideshowimpl.hxx b/sd/source/ui/slideshow/slideshowimpl.hxx
index ac84875c4c65..8f848a4f1aa9 100644
--- a/sd/source/ui/slideshow/slideshowimpl.hxx
+++ b/sd/source/ui/slideshow/slideshowimpl.hxx
@@ -69,7 +69,7 @@ struct PresentationSettingsEx : public PresentationSettings
void SetArguments( const css::uno::Sequence< css::beans::PropertyValue >& rArguments );
/// @throws css::lang::IllegalArgumentException
- void SetPropertyValue( const OUString& rProperty, const css::uno::Any& rValue );
+ void SetPropertyValue( std::u16string_view rProperty, const css::uno::Any& rValue );
};
struct WrappedShapeEventImpl
diff --git a/sdext/source/presenter/PresenterBitmapContainer.cxx b/sdext/source/presenter/PresenterBitmapContainer.cxx
index 1ddaaff8e671..e094bae22ac0 100644
--- a/sdext/source/presenter/PresenterBitmapContainer.cxx
+++ b/sdext/source/presenter/PresenterBitmapContainer.cxx
@@ -265,13 +265,13 @@ std::shared_ptr<PresenterBitmapContainer::BitmapDescriptor> PresenterBitmapConta
}
PresenterBitmapContainer::BitmapDescriptor::TexturingMode
- PresenterBitmapContainer::StringToTexturingMode (const OUString& rsTexturingMode)
+ PresenterBitmapContainer::StringToTexturingMode (std::u16string_view rsTexturingMode)
{
- if (rsTexturingMode == "Once")
+ if (rsTexturingMode == u"Once")
return PresenterBitmapContainer::BitmapDescriptor::Once;
- else if (rsTexturingMode == "Repeat")
+ else if (rsTexturingMode == u"Repeat")
return PresenterBitmapContainer::BitmapDescriptor::Repeat;
- else if (rsTexturingMode == "Stretch")
+ else if (rsTexturingMode == u"Stretch")
return PresenterBitmapContainer::BitmapDescriptor::Stretch;
else
return PresenterBitmapContainer::BitmapDescriptor::Once;
diff --git a/sdext/source/presenter/PresenterBitmapContainer.hxx b/sdext/source/presenter/PresenterBitmapContainer.hxx
index c65c068d21a0..65f385b2b4e6 100644
--- a/sdext/source/presenter/PresenterBitmapContainer.hxx
+++ b/sdext/source/presenter/PresenterBitmapContainer.hxx
@@ -133,7 +133,7 @@ private:
const css::uno::Reference<css::rendering::XCanvas>& rxCanvas,
const std::shared_ptr<PresenterBitmapContainer::BitmapDescriptor>& rpDefault);
static BitmapDescriptor::TexturingMode
- StringToTexturingMode (const OUString& rsTexturingMode);
+ StringToTexturingMode (std::u16string_view rsTexturingMode);
};
typedef PresenterBitmapContainer::BitmapDescriptor PresenterBitmapDescriptor;
diff --git a/sdext/source/presenter/PresenterTheme.cxx b/sdext/source/presenter/PresenterTheme.cxx
index 66843fa45dc4..52c2d875d4ef 100644
--- a/sdext/source/presenter/PresenterTheme.cxx
+++ b/sdext/source/presenter/PresenterTheme.cxx
@@ -158,7 +158,7 @@ class ViewStyle
public:
ViewStyle();
- SharedBitmapDescriptor GetBitmap (const OUString& sBitmapName) const;
+ SharedBitmapDescriptor GetBitmap (std::u16string_view sBitmapName) const;
PresenterTheme::SharedFontDescriptor GetFont() const;
@@ -1003,9 +1003,9 @@ ViewStyle::ViewStyle()
{
}
-SharedBitmapDescriptor ViewStyle::GetBitmap (const OUString& rsBitmapName) const
+SharedBitmapDescriptor ViewStyle::GetBitmap (std::u16string_view rsBitmapName) const
{
- if (rsBitmapName == "Background")
+ if (rsBitmapName == u"Background")
return mpBackground;
else
return SharedBitmapDescriptor();
diff --git a/sfx2/inc/recentdocsview.hxx b/sfx2/inc/recentdocsview.hxx
index c8db9bc3c043..77c350d40b83 100644
--- a/sfx2/inc/recentdocsview.hxx
+++ b/sfx2/inc/recentdocsview.hxx
@@ -63,7 +63,7 @@ public:
void insertItem(const OUString &rURL, const OUString &rTitle, const BitmapEx &rThumbnail, sal_uInt16 nId);
- static bool typeMatchesExtension(ApplicationType type, const OUString &rExt);
+ static bool typeMatchesExtension(ApplicationType type, std::u16string_view rExt);
static BitmapEx getDefaultThumbnail(const OUString &rURL);
ApplicationType mnFileTypes;
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index ecca2f806228..a01f5d6a6bdc 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -1095,7 +1095,7 @@ static void GetBookmarkEntry_Impl
}
}
-void BookmarksTabPage_Impl::DoAction(const OString& rAction)
+void BookmarksTabPage_Impl::DoAction(std::string_view rAction)
{
if (rAction == "display")
aDoubleClickHdl.Call(nullptr);
@@ -1379,7 +1379,7 @@ void SfxHelpIndexWindow_Impl::SetActiveFactory()
}
}
-HelpTabPage_Impl* SfxHelpIndexWindow_Impl::GetPage(const OString& rName)
+HelpTabPage_Impl* SfxHelpIndexWindow_Impl::GetPage(std::string_view rName)
{
HelpTabPage_Impl* pPage = nullptr;
@@ -2542,7 +2542,7 @@ void SfxHelpWindow_Impl::SetHelpURL( const OUString& rURL )
SetFactory( aObj.GetHost() );
}
-void SfxHelpWindow_Impl::DoAction(const OString& rActionId)
+void SfxHelpWindow_Impl::DoAction(std::string_view rActionId)
{
if (rActionId == "index")
{
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index d12f38e29ccf..f803bffc15a2 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -199,7 +199,7 @@ private:
DECL_LINK(CommandHdl, const CommandEvent&, bool);
DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
- void DoAction(const OString& rAction);
+ void DoAction(std::string_view rAction);
public:
BookmarksTabPage_Impl(weld::Widget* pParent, SfxHelpIndexWindow_Impl* pIdxWin);
@@ -241,7 +241,7 @@ private:
void Initialize();
void SetActiveFactory();
- HelpTabPage_Impl* GetPage(const OString&);
+ HelpTabPage_Impl* GetPage(std::string_view );
inline ContentTabPage_Impl* GetContentPage();
inline IndexTabPage_Impl* GetIndexPage();
@@ -468,7 +468,7 @@ public:
void SetFactory( const OUString& rFactory );
void SetHelpURL( const OUString& rURL );
- void DoAction(const OString& rAction);
+ void DoAction(std::string_view rAction);
void CloseWindow();
weld::Container* GetContainer() { return m_xHelpTextWindow.get(); }
diff --git a/sfx2/source/control/charwin.cxx b/sfx2/source/control/charwin.cxx
index 6e404c7257d7..f62cb1c368f4 100644
--- a/sfx2/source/control/charwin.cxx
+++ b/sfx2/source/control/charwin.cxx
@@ -120,7 +120,7 @@ void SvxCharView::createContextMenu()
Invalidate();
}
-void SvxCharView::ContextMenuSelect(const OString& rMenuId)
+void SvxCharView::ContextMenuSelect(std::string_view rMenuId)
{
if (rMenuId == "clearchar")
maClearClickHdl.Call(this);
diff --git a/sfx2/source/control/recentdocsview.cxx b/sfx2/source/control/recentdocsview.cxx
index 958785a12394..e1b086583220 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -155,33 +155,33 @@ RecentDocsView::~RecentDocsView()
}
}
-bool RecentDocsView::typeMatchesExtension(ApplicationType type, const OUString &rExt)
+bool RecentDocsView::typeMatchesExtension(ApplicationType type, std::u16string_view rExt)
{
bool bRet = false;
- if (rExt == "odt" || rExt == "fodt" || rExt == "doc" || rExt == "docx" ||
- rExt == "rtf" || rExt == "txt" || rExt == "odm" || rExt == "otm")
+ if (rExt == u"odt" || rExt == u"fodt" || rExt == u"doc" || rExt == u"docx" ||
+ rExt == u"rtf" || rExt == u"txt" || rExt == u"odm" || rExt == u"otm")
{
bRet = static_cast<bool>(type & ApplicationType::TYPE_WRITER);
}
- else if (rExt == "ods" || rExt == "fods" || rExt == "xls" || rExt == "xlsx")
+ else if (rExt == u"ods" || rExt == u"fods" || rExt == u"xls" || rExt == u"xlsx")
{
bRet = static_cast<bool>(type & ApplicationType::TYPE_CALC);
}
- else if (rExt == "odp" || rExt == "fodp" || rExt == "pps" || rExt == "ppt" ||
- rExt == "pptx")
+ else if (rExt == u"odp" || rExt == u"fodp" || rExt == u"pps" || rExt == u"ppt" ||
+ rExt == u"pptx")
{
bRet = static_cast<bool>(type & ApplicationType::TYPE_IMPRESS);
}
- else if (rExt == "odg" || rExt == "fodg")
+ else if (rExt == u"odg" || rExt == u"fodg")
{
bRet = static_cast<bool>(type & ApplicationType::TYPE_DRAW);
}
- else if (rExt == "odb")
+ else if (rExt == u"odb")
{
bRet = static_cast<bool>(type & ApplicationType::TYPE_DATABASE);
}
- else if (rExt == "odf")
+ else if (rExt == u"odf")
{
bRet = static_cast<bool>(type & ApplicationType::TYPE_MATH);
}
diff --git a/sfx2/source/control/templatedlglocalview.cxx b/sfx2/source/control/templatedlglocalview.cxx
index 1a50f09e2816..3e60830e5bd9 100644
--- a/sfx2/source/control/templatedlglocalview.cxx
+++ b/sfx2/source/control/templatedlglocalview.cxx
@@ -92,7 +92,7 @@ void TemplateDlgLocalView::createContextMenu(const bool bIsDefault)
mxTreeView.get(), tools::Rectangle(maPosition, Size(1, 1))));
}
-void TemplateDlgLocalView::ContextMenuSelectHdl(const OString& rIdent)
+void TemplateDlgLocalView::ContextMenuSelectHdl(std::string_view rIdent)
{
if (rIdent == "open")
maOpenTemplateHdl.Call(maSelectedItem);
diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx
index 67481d7600e9..d077b46a2f33 100644
--- a/sfx2/source/control/templatelocalview.cxx
+++ b/sfx2/source/control/templatelocalview.cxx
@@ -29,28 +29,28 @@
using namespace ::com::sun::star;
-bool ViewFilter_Application::isFilteredExtension(FILTER_APPLICATION filter, const OUString &rExt)
+bool ViewFilter_Application::isFilteredExtension(FILTER_APPLICATION filter, std::u16string_view rExt)
{
- bool bRet = rExt == "ott" || rExt == "stw" || rExt == "oth" || rExt == "dot" || rExt == "dotx" || rExt == "otm"
- || rExt == "ots" || rExt == "stc" || rExt == "xlt" || rExt == "xltm" || rExt == "xltx"
- || rExt == "otp" || rExt == "sti" || rExt == "pot" || rExt == "potm" || rExt == "potx"
- || rExt == "otg" || rExt == "std";
+ bool bRet = rExt == u"ott" || rExt == u"stw" || rExt == u"oth" || rExt == u"dot" || rExt == u"dotx" || rExt == u"otm"
+ || rExt == u"ots" || rExt == u"stc" || rExt == u"xlt" || rExt == u"xltm" || rExt == u"xltx"
+ || rExt == u"otp" || rExt == u"sti" || rExt == u"pot" || rExt == u"potm" || rExt == u"potx"
+ || rExt == u"otg" || rExt == u"std";
if (filter == FILTER_APPLICATION::WRITER)
{
- bRet = rExt == "ott" || rExt == "stw" || rExt == "oth" || rExt == "dot" || rExt == "dotx" || rExt == "otm";
+ bRet = rExt == u"ott" || rExt == u"stw" || rExt == u"oth" || rExt == u"dot" || rExt == u"dotx" || rExt == u"otm";
}
else if (filter == FILTER_APPLICATION::CALC)
{
- bRet = rExt == "ots" || rExt == "stc" || rExt == "xlt" || rExt == "xltm" || rExt == "xltx";
+ bRet = rExt == u"ots" || rExt == u"stc" || rExt == u"xlt" || rExt == u"xltm" || rExt == u"xltx";
}
else if (filter == FILTER_APPLICATION::IMPRESS)
{
- bRet = rExt == "otp" || rExt == "sti" || rExt == "pot" || rExt == "potm" || rExt == "potx";
+ bRet = rExt == u"otp" || rExt == u"sti" || rExt == u"pot" || rExt == u"potm" || rExt == u"potx";
}
else if (filter == FILTER_APPLICATION::DRAW)
{
- bRet = rExt == "otg" || rExt == "std";
+ bRet = rExt == u"otg" || rExt == u"std";
}
return bRet;
@@ -220,7 +220,7 @@ void TemplateLocalView::createContextMenu(const bool bIsDefault)
Invalidate();
}
-void TemplateLocalView::ContextMenuSelectHdl(const OString& rIdent)
+void TemplateLocalView::ContextMenuSelectHdl(std::string_view rIdent)
{
if (rIdent == "open")
maOpenTemplateHdl.Call(maSelectedItem);
diff --git a/sfx2/source/control/templatesearchview.cxx b/sfx2/source/control/templatesearchview.cxx
index e986d6bde41c..e1d2f8083fac 100644
--- a/sfx2/source/control/templatesearchview.cxx
+++ b/sfx2/source/control/templatesearchview.cxx
@@ -155,7 +155,7 @@ void TemplateSearchView::createContextMenu(const bool bIsDefault)
ContextMenuSelectHdl(mxContextMenu->popup_at_rect(mxTreeView.get(), tools::Rectangle(maPosition, Size(1,1))));
}
-void TemplateSearchView::ContextMenuSelectHdl(const OString& rIdent)
+void TemplateSearchView::ContextMenuSelectHdl(std::string_view rIdent)
{
if (rIdent == MNI_OPEN)
maOpenTemplateHdl.Call(maSelectedItem);
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 7c86ca18b98d..9c442d01e837 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -110,16 +110,16 @@ namespace sfx2
namespace
{
- bool lclSupportsOOXMLEncryption(const OUString& aFilterName)
- {
- return aFilterName == "Calc MS Excel 2007 XML"
- || aFilterName == "MS Word 2007 XML"
- || aFilterName == "Impress MS PowerPoint 2007 XML"
- || aFilterName == "Impress MS PowerPoint 2007 XML AutoPlay"
- || aFilterName == "Calc Office Open XML"
- || aFilterName == "Impress Office Open XML"
- || aFilterName == "Impress Office Open XML AutoPlay"
- || aFilterName == "Office Open XML Text";
+ bool lclSupportsOOXMLEncryption(std::u16string_view aFilterName)
+ {
+ return aFilterName == u"Calc MS Excel 2007 XML"
+ || aFilterName == u"MS Word 2007 XML"
+ || aFilterName == u"Impress MS PowerPoint 2007 XML"
+ || aFilterName == u"Impress MS PowerPoint 2007 XML AutoPlay"
+ || aFilterName == u"Calc Office Open XML"
+ || aFilterName == u"Impress Office Open XML"
+ || aFilterName == u"Impress Office Open XML AutoPlay"
+ || aFilterName == u"Office Open XML Text";
}
}
diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx
index d46eb8f01440..915f33660e1d 100644
--- a/sfx2/source/dialog/infobar.cxx
+++ b/sfx2/source/dialog/infobar.cxx
@@ -427,19 +427,19 @@ void SfxInfoBarContainerWindow::removeInfoBar(VclPtr<SfxInfoBarWindow> const& pI
m_pChildWin->Update();
}
-bool SfxInfoBarContainerWindow::isInfobarEnabled(const OUString& sId)
+bool SfxInfoBarContainerWindow::isInfobarEnabled(std::u16string_view sId)
{
- if (sId == "readonly")
+ if (sId == u"readonly")
return officecfg::Office::UI::Infobar::Enabled::Readonly::get();
- if (sId == "signature")
+ if (sId == u"signature")
return officecfg::Office::UI::Infobar::Enabled::Signature::get();
- if (sId == "donate")
+ if (sId == u"donate")
return officecfg::Office::UI::Infobar::Enabled::Donate::get();
- if (sId == "getinvolved")
+ if (sId == u"getinvolved")
return officecfg::Office::UI::Infobar::Enabled::GetInvolved::get();
- if (sId == "hyphenationmissing")
+ if (sId == u"hyphenationmissing")
return officecfg::Office::UI::Infobar::Enabled::HyphenationMissing::get();
- if (sId == "whatsnew")
+ if (sId == u"whatsnew")
return officecfg::Office::UI::Infobar::Enabled::WhatsNew::get();
return true;
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 7c06fc7ac34c..4c1e99bde06d 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -99,11 +99,11 @@
#define TYPE_FSYS_FOLDER "application/vnd.sun.staroffice.fsys-folder"
#define TYPE_FSYS_FILE "application/vnd.sun.staroffice.fsys-file"
-#define PROPERTY_DIRLIST "DirectoryList"
+#define PROPERTY_DIRLIST u"DirectoryList"
#define PROPERTY_NEEDSUPDATE "NeedsUpdate"
#define PROPERTY_TYPE "TypeDescription"
-#define TARGET_DIR_URL "TargetDirURL"
+#define TARGET_DIR_URL u"TargetDirURL"
#define COMMAND_DELETE "delete"
#define STANDARD_FOLDER "standard"
@@ -2667,7 +2667,7 @@ DocTemplates_EntryData_Impl::DocTemplates_EntryData_Impl( const OUString& rTitle
// static
bool SfxURLRelocator_Impl::propertyCanContainOfficeDir(
- const OUString & rPropName )
+ std::u16string_view rPropName )
{
// Note: TargetURL is handled by UCB itself (because it is a property
// with a predefined semantic). Additional Core properties introduced
diff --git a/sfx2/source/doc/sfxmodelfactory.cxx b/sfx2/source/doc/sfxmodelfactory.cxx
index 556b3f00f5bf..dab70f396006 100644
--- a/sfx2/source/doc/sfxmodelfactory.cxx
+++ b/sfx2/source/doc/sfxmodelfactory.cxx
@@ -57,9 +57,9 @@ namespace sfx2
{
struct IsSpecialArgument
{
- static bool isSpecialArgumentName( const OUString& _rValueName )
+ static bool isSpecialArgumentName( std::u16string_view _rValueName )
{
- return _rValueName == "EmbeddedObject" || _rValueName == "EmbeddedScriptSupport" || _rValueName == "DocumentRecoverySupport";
+ return _rValueName == u"EmbeddedObject" || _rValueName == u"EmbeddedScriptSupport" || _rValueName == u"DocumentRecoverySupport";
}
bool operator()( const Any& _rArgument ) const
diff --git a/sfx2/source/inc/sfxurlrelocator.hxx b/sfx2/source/inc/sfxurlrelocator.hxx
index 1d5b26bece4d..0384f9a70782 100644
--- a/sfx2/source/inc/sfxurlrelocator.hxx
+++ b/sfx2/source/inc/sfxurlrelocator.hxx
@@ -35,7 +35,7 @@ class SfxURLRelocator_Impl
css::uno::Reference< css::util::XMacroExpander > mxMacroExpander;
public:
- static bool propertyCanContainOfficeDir( const OUString & rPropName );
+ static bool propertyCanContainOfficeDir( std::u16string_view rPropName );
void initOfficeInstDirs();
void makeRelocatableURL( OUString & rURL );
void makeAbsoluteURL( OUString & rURL );
diff --git a/sfx2/source/inc/templatesearchview.hxx b/sfx2/source/inc/templatesearchview.hxx
index caf9adca3c75..8f02f206b296 100644
--- a/sfx2/source/inc/templatesearchview.hxx
+++ b/sfx2/source/inc/templatesearchview.hxx
@@ -27,7 +27,7 @@ public:
void setOpenTemplateHdl (const Link<ThumbnailViewItem*, void> &rLink);
- void ContextMenuSelectHdl(const OString& rIdent);
+ void ContextMenuSelectHdl(std::string_view rIdent);
void setCreateContextMenuHdl(const Link<ThumbnailViewItem*,void> &rLink);
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 5367292a8615..5b8b64fcae24 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -71,27 +71,27 @@ namespace
const sal_Int32 gnWidthCloseThreshold (70);
const sal_Int32 gnWidthOpenThreshold (40);
- std::string UnoNameFromDeckId(const OUString& rsDeckId, bool isImpress = false)
+ std::string UnoNameFromDeckId(std::u16string_view rsDeckId, bool isImpress = false)
{
- if (rsDeckId == "SdCustomAnimationDeck")
+ if (rsDeckId == u"SdCustomAnimationDeck")
return ".uno:CustomAnimation";
- if (rsDeckId == "PropertyDeck")
+ if (rsDeckId == u"PropertyDeck")
return isImpress ? ".uno:ModifyPage" : ".uno:Sidebar";
- if (rsDeckId == "SdLayoutsDeck")
+ if (rsDeckId == u"SdLayoutsDeck")
return ".uno:ModifyPage";
- if (rsDeckId == "SdSlideTransitionDeck")
+ if (rsDeckId == u"SdSlideTransitionDeck")
return ".uno:SlideChangeWindow";
- if (rsDeckId == "SdAllMasterPagesDeck")
+ if (rsDeckId == u"SdAllMasterPagesDeck")
return ".uno:MasterSlidesPanel";
- if (rsDeckId == "SdMasterPagesDeck")
+ if (rsDeckId == u"SdMasterPagesDeck")
return ".uno:MasterSlidesPanel";
- if (rsDeckId == "GalleryDeck")
+ if (rsDeckId == u"GalleryDeck")
return ".uno:Gallery";
return "";
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index f86b69a8af29..59fd331aa7da 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -293,13 +293,13 @@ LOKDeviceFormFactor SfxLokHelper::getDeviceFormFactor()
return g_deviceFormFactor;
}
-void SfxLokHelper::setDeviceFormFactor(const OUString& rDeviceFormFactor)
+void SfxLokHelper::setDeviceFormFactor(std::u16string_view rDeviceFormFactor)
{
- if (rDeviceFormFactor == "desktop")
+ if (rDeviceFormFactor == u"desktop")
g_deviceFormFactor = LOKDeviceFormFactor::DESKTOP;
- else if (rDeviceFormFactor == "tablet")
+ else if (rDeviceFormFactor == u"tablet")
g_deviceFormFactor = LOKDeviceFormFactor::TABLET;
- else if (rDeviceFormFactor == "mobile")
+ else if (rDeviceFormFactor == u"mobile")
g_deviceFormFactor = LOKDeviceFormFactor::MOBILE;
else
g_deviceFormFactor = LOKDeviceFormFactor::UNKNOWN;
diff --git a/slideshow/source/engine/shapes/shapeimporter.cxx b/slideshow/source/engine/shapes/shapeimporter.cxx
index 6d5b668efb00..877f4217348a 100644
--- a/slideshow/source/engine/shapes/shapeimporter.cxx
+++ b/slideshow/source/engine/shapes/shapeimporter.cxx
@@ -198,16 +198,16 @@ bool ShapeOfGroup::isBackgroundDetached() const
ShapeSharedPtr ShapeImporter::createShape(
uno::Reference<drawing::XShape> const& xCurrShape,
uno::Reference<beans::XPropertySet> const& xPropSet,
- OUString const& shapeType ) const
+ std::u16string_view shapeType ) const
{
- if( shapeType == "com.sun.star.drawing.MediaShape" || shapeType == "com.sun.star.presentation.MediaShape" )
+ if( shapeType == u"com.sun.star.drawing.MediaShape" || shapeType == u"com.sun.star.presentation.MediaShape" )
{
// Media shape (video etc.). This is a special object
return createMediaShape(xCurrShape,
mnAscendingPrio,
mrContext);
}
- else if( shapeType == "com.sun.star.drawing.AppletShape" )
+ else if( shapeType == u"com.sun.star.drawing.AppletShape" )
{
// PropertyValues to copy from XShape to applet
static const char* aPropertyValues[] =
@@ -227,7 +227,7 @@ ShapeSharedPtr ShapeImporter::createShape(
SAL_N_ELEMENTS(aPropertyValues),
mrContext );
}
- else if( shapeType == "com.sun.star.drawing.OLE2Shape" || shapeType == "com.sun.star.presentation.OLE2Shape" )
+ else if( shapeType == u"com.sun.star.drawing.OLE2Shape" || shapeType == u"com.sun.star.presentation.OLE2Shape" )
{
// #i46224# Mark OLE shapes as foreign content - scan them for
// unsupported actions, and fallback to bitmap, if necessary
@@ -237,7 +237,7 @@ ShapeSharedPtr ShapeImporter::createShape(
true,
mrContext );
}
- else if( shapeType == "com.sun.star.drawing.GraphicObjectShape" || shapeType == "com.sun.star.presentation.GraphicObjectShape" )
+ else if( shapeType == u"com.sun.star.drawing.GraphicObjectShape" || shapeType == u"com.sun.star.presentation.GraphicObjectShape" )
{
// to get hold of GIF animations, inspect Graphic
// objects more thoroughly (the plain-jane shape
@@ -335,7 +335,7 @@ ShapeSharedPtr ShapeImporter::createShape(
bool ShapeImporter::isSkip(
uno::Reference<beans::XPropertySet> const& xPropSet,
- OUString const& shapeType,
+ std::u16string_view shapeType,
uno::Reference< drawing::XLayer> const& xLayer )
{
// skip empty presentation objects:
@@ -370,7 +370,7 @@ bool ShapeImporter::isSkip(
// they can be non empty when user edits the default texts
if(mbConvertingMasterPage)
{
- if( shapeType == "com.sun.star.presentation.TitleTextShape" || shapeType == "com.sun.star.presentation.OutlinerShape" )
+ if( shapeType == u"com.sun.star.presentation.TitleTextShape" || shapeType == u"com.sun.star.presentation.OutlinerShape" )
{
return true;
}
diff --git a/slideshow/source/inc/shapeimporter.hxx b/slideshow/source/inc/shapeimporter.hxx
index a0ccb1fd44af..5254e0a9feaf 100644
--- a/slideshow/source/inc/shapeimporter.hxx
+++ b/slideshow/source/inc/shapeimporter.hxx
@@ -97,13 +97,13 @@ public:
double getImportedShapesCount() const{ return mnAscendingPrio; }
private:
bool isSkip( css::uno::Reference<css::beans::XPropertySet> const& xPropSet,
- OUString const& shapeType,
+ std::u16string_view shapeType,
css::uno::Reference<css::drawing::XLayer> const& xLayer);
ShapeSharedPtr createShape(
css::uno::Reference<css::drawing::XShape> const& xCurrShape,
css::uno::Reference<css::beans::XPropertySet> const& xPropSet,
- OUString const& shapeType ) const;
+ std::u16string_view shapeType ) const;
void importPolygons(css::uno::Reference< css::beans::XPropertySet > const& xPropSet) ;
diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx
index 43f7cedcba7b..5f062bf14803 100644
--- a/svtools/source/filter/exportdialog.cxx
+++ b/svtools/source/filter/exportdialog.cxx
@@ -67,26 +67,26 @@
using namespace ::com::sun::star;
-static sal_Int16 GetFilterFormat(const OUString& rExt)
+static sal_Int16 GetFilterFormat(std::u16string_view rExt)
{
sal_Int16 nFormat = FORMAT_UNKNOWN;
- if ( rExt == "JPG" )
+ if ( rExt == u"JPG" )
nFormat = FORMAT_JPG;
- else if ( rExt == "PNG" )
+ else if ( rExt == u"PNG" )
nFormat = FORMAT_PNG;
- else if ( rExt == "BMP" )
+ else if ( rExt == u"BMP" )
nFormat = FORMAT_BMP;
- else if ( rExt == "GIF" )
+ else if ( rExt == u"GIF" )
nFormat = FORMAT_GIF;
- else if ( rExt == "TIF" )
+ else if ( rExt == u"TIF" )
nFormat = FORMAT_TIF;
- else if ( rExt == "WMF" )
+ else if ( rExt == u"WMF" )
nFormat = FORMAT_WMF;
- else if ( rExt == "EMF" )
+ else if ( rExt == u"EMF" )
nFormat = FORMAT_EMF;
- else if ( rExt == "EPS" )
+ else if ( rExt == u"EPS" )
nFormat = FORMAT_EPS;
- else if ( rExt == "SVG" )
+ else if ( rExt == u"SVG" )
nFormat = FORMAT_SVG;
return nFormat;
}
diff --git a/svx/inc/galbrws2.hxx b/svx/inc/galbrws2.hxx
index d26044056c7d..088013946d22 100644
--- a/svx/inc/galbrws2.hxx
+++ b/svx/inc/galbrws2.hxx
@@ -151,7 +151,7 @@ public:
static css::uno::Reference< css::frame::XFrame > GetFrame();
const css::uno::Reference< css::util::XURLTransformer >& GetURLTransformer() const { return m_xTransformer; }
- void Execute(const OString &rIdent);
+ void Execute(std::string_view rIdent);
void DispatchAdd(const css::uno::Reference<css::frame::XDispatch> &rxDispatch,
const css::util::URL &rURL);
diff --git a/svx/source/dialog/ClassificationDialog.cxx b/svx/source/dialog/ClassificationDialog.cxx
index 1cd3a7b6ee93..79ebf7548805 100644
--- a/svx/source/dialog/ClassificationDialog.cxx
+++ b/svx/source/dialog/ClassificationDialog.cxx
@@ -97,7 +97,7 @@ bool fileExists(OUString const & sFilename)
return osl::FileBase::E_None == eRC;
}
-bool stringToClassificationType(OString const & rsType, svx::ClassificationType & reType)
+bool stringToClassificationType(std::string_view rsType, svx::ClassificationType & reType)
{
if (rsType == "CATEGORY")
reType = svx::ClassificationType::CATEGORY;
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index 82d50178d0fd..698ce31b9821 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -456,7 +456,7 @@ IMPL_LINK(SvxSuperContourDlg, Tbx1ClickHdl, const OString&, rId, void)
m_xContourWnd->QueueIdleUpdate();
}
-void SvxSuperContourDlg::SetActiveTool(const OString& rId)
+void SvxSuperContourDlg::SetActiveTool(std::string_view rId)
{
m_xTbx1->set_item_active("TBI_SELECT", rId == "TBI_SELECT");
m_xTbx1->set_item_active("TBI_RECT", rId == "TBI_RECT");
@@ -464,7 +464,7 @@ void SvxSuperContourDlg::SetActiveTool(const OString& rId)
m_xTbx1->set_item_active("TBI_POLY", rId == "TBI_POLY");
}
-void SvxSuperContourDlg::SetActivePoly(const OString& rId)
+void SvxSuperContourDlg::SetActivePoly(std::string_view rId)
{
m_xTbx1->set_item_active("TBI_POLYMOVE", rId == "TBI_POLYMOVE");
m_xTbx1->set_item_active("TBI_POLYINSERT", rId == "TBI_POLYINSERT");
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index 0ff9631fcb3e..a8328fc137b5 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -236,7 +236,7 @@ void SvxShowCharSet::createContextMenu()
Invalidate();
}
-void SvxShowCharSet::ContextMenuSelect(const OString& rIdent)
+void SvxShowCharSet::ContextMenuSelect(std::string_view rIdent)
{
sal_UCS4 cChar = GetSelectCharacter();
OUString aOUStr(&cChar, 1);
diff --git a/svx/source/dialog/contimp.hxx b/svx/source/dialog/contimp.hxx
index c8b59cb72e14..91579a2c901f 100644
--- a/svx/source/dialog/contimp.hxx
+++ b/svx/source/dialog/contimp.hxx
@@ -100,8 +100,8 @@ class SvxSuperContourDlg
DECL_LINK( WorkplaceClickHdl, ContourWindow&, void );
DECL_LINK( CancelHdl, weld::Button&, void );
- void SetActiveTool(const OString& rId);
- void SetActivePoly(const OString& rId);
+ void SetActiveTool(std::string_view rId);
+ void SetActivePoly(std::string_view rId);
SfxBindings& GetBindings() { return *mpBindings; }
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index d093f44fe515..c7769519c0e1 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -472,7 +472,7 @@ bool SvxIMapDlg::DoSave()
return bRet;
}
-void SvxIMapDlg::SetActiveTool(const OString& rId)
+void SvxIMapDlg::SetActiveTool(std::string_view rId)
{
m_xTbxIMapDlg1->set_item_active("TBI_SELECT", rId == "TBI_SELECT");
m_xTbxIMapDlg1->set_item_active("TBI_RECT", rId == "TBI_RECT");
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 98a3dfe4bcd4..4fe1e926d186 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -372,7 +372,7 @@ namespace svxform
}
}
- bool XFormsPage::DoToolBoxAction(const OString& rToolBoxID)
+ bool XFormsPage::DoToolBoxAction(std::string_view rToolBoxID)
{
bool bHandled = false;
bool bIsDocModified = false;
@@ -1154,7 +1154,7 @@ namespace svxform
return sRet;
}
- bool XFormsPage::DoMenuAction(const OString& rMenuID)
+ bool XFormsPage::DoMenuAction(std::string_view rMenuID)
{
return DoToolBoxAction(rMenuID);
}
diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx
index 9ab962b6deb2..2c2d8efa64cf 100644
--- a/svx/source/gallery2/galbrws1.cxx
+++ b/svx/source/gallery2/galbrws1.cxx
@@ -237,7 +237,7 @@ void GalleryBrowser1::EndThemePropertiesDlgHdl(sal_Int32 nResult)
ImplEndGalleryThemeProperties(false, nResult);
}
-void GalleryBrowser1::ImplExecute(const OString &rIdent)
+void GalleryBrowser1::ImplExecute(std::string_view rIdent)
{
if (rIdent == "update")
{
diff --git a/svx/source/gallery2/galbrws1.hxx b/svx/source/gallery2/galbrws1.hxx
index 6d06129d75b5..d179972dc999 100644
--- a/svx/source/gallery2/galbrws1.hxx
+++ b/svx/source/gallery2/galbrws1.hxx
@@ -60,7 +60,7 @@ private:
void ImplInsertThemeEntry( const GalleryThemeEntry* pEntry );
static void ImplFillExchangeData( const GalleryTheme* pThm, ExchangeData& rData );
void ImplGetExecuteVector(std::vector<OString>& o_aExec);
- void ImplExecute(const OString &rIdent);
+ void ImplExecute(std::string_view rIdent);
void ImplGalleryThemeProperties( std::u16string_view rThemeName, bool bCreateNew );
void EndNewThemePropertiesDlgHdl(sal_Int32 nResult);
void EndThemePropertiesDlgHdl(sal_Int32 nResult);
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index 9338689c7c4a..53a80f81bc16 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -1093,7 +1093,7 @@ void GalleryBrowser2::DispatchAdd(
pInfo.release();
}
-void GalleryBrowser2::Execute(const OString &rIdent)
+void GalleryBrowser2::Execute(std::string_view rIdent)
{
Point aSelPos;
const sal_uInt32 nItemId = ImplGetSelectedItemId( nullptr, aSelPos );
diff --git a/svx/source/inc/datanavi.hxx b/svx/source/inc/datanavi.hxx
index 8feee550c5a8..a208dc2062ef 100644
--- a/svx/source/inc/datanavi.hxx
+++ b/svx/source/inc/datanavi.hxx
@@ -209,7 +209,7 @@ namespace svxform
void AddChildren(const weld::TreeIter* _pParent,
const css::uno::Reference< css::xml::dom::XNode >& _xNode);
- bool DoToolBoxAction(const OString& rToolBoxID);
+ bool DoToolBoxAction(std::string_view rToolBoxID);
void AddEntry(std::unique_ptr<ItemNode> _pNewNode, bool _bIsElement, weld::TreeIter* pRet = nullptr);
void AddEntry(const css::uno::Reference< css::beans::XPropertySet >& _rPropSet, weld::TreeIter* pRet = nullptr);
void EditEntry( const css::uno::Reference< css::beans::XPropertySet >& _rPropSet );
@@ -228,7 +228,7 @@ namespace svxform
void ClearModel();
OUString LoadInstance(const css::uno::Sequence< css::beans::PropertyValue >& _xPropSeq);
- bool DoMenuAction(const OString& rMenuID);
+ bool DoMenuAction(std::string_view rMenuID);
void EnableMenuItems(weld::Menu* pMenu);
const OUString& GetInstanceName() const { return m_sInstanceName; }
diff --git a/svx/source/sidebar/line/LinePropertyPanelBase.cxx b/svx/source/sidebar/line/LinePropertyPanelBase.cxx
index 2c144e48ccd8..2738f1fc4023 100644
--- a/svx/source/sidebar/line/LinePropertyPanelBase.cxx
+++ b/svx/source/sidebar/line/LinePropertyPanelBase.cxx
@@ -47,9 +47,9 @@ public:
{
}
- bool operator()(const OUString& rCommand, const css::uno::Any& rValue)
+ bool operator()(std::u16string_view rCommand, const css::uno::Any& rValue)
{
- if (rCommand == ".uno:XLineStyle")
+ if (rCommand == u".uno:XLineStyle")
{
css::drawing::LineStyle eLineStyle(css::drawing::LineStyle_NONE);
rValue >>= eLineStyle;
diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx
index bdd8a36c20d0..4dee38e06930 100644
--- a/svx/source/stbctrls/pszctrl.cxx
+++ b/svx/source/stbctrls/pszctrl.cxx
@@ -95,7 +95,7 @@ class FunctionPopup_Impl
VclBuilder m_aBuilder;
VclPtr<PopupMenu> m_xMenu;
sal_uInt32 m_nSelected;
- static sal_uInt16 id_to_function(const OString& rIdent);
+ static sal_uInt16 id_to_function(std::string_view rIdent);
sal_uInt16 function_to_id(sal_uInt16 nFunc) const;
public:
explicit FunctionPopup_Impl( sal_uInt32 nCheckEncoded );
@@ -105,7 +105,7 @@ public:
}
-sal_uInt16 FunctionPopup_Impl::id_to_function(const OString& rIdent)
+sal_uInt16 FunctionPopup_Impl::id_to_function(std::string_view rIdent)
{
if (rIdent == "avg")
return PSZ_FUNC_AVG;
diff --git a/svx/source/stbctrls/selctrl.cxx b/svx/source/stbctrls/selctrl.cxx
index 37747b919436..0411d3555758 100644
--- a/svx/source/stbctrls/selctrl.cxx
+++ b/svx/source/stbctrls/selctrl.cxx
@@ -41,7 +41,7 @@ class SelectionTypePopup
{
VclBuilder m_aBuilder;
VclPtr<PopupMenu> m_xMenu;
- static sal_uInt16 id_to_state(const OString& rIdent);
+ static sal_uInt16 id_to_state(std::string_view rIdent);
sal_uInt16 state_to_id(sal_uInt16 nState) const;
public:
explicit SelectionTypePopup(sal_uInt16 nCurrent);
@@ -53,7 +53,7 @@ public:
}
-sal_uInt16 SelectionTypePopup::id_to_state(const OString& rIdent)
+sal_uInt16 SelectionTypePopup::id_to_state(std::string_view rIdent)
{
if (rIdent == "block")
return 3;
diff --git a/svx/source/tbxctrls/SvxPresetListBox.cxx b/svx/source/tbxctrls/SvxPresetListBox.cxx
index 9cfe5894b8e9..5cda71a8cfa7 100644
--- a/svx/source/tbxctrls/SvxPresetListBox.cxx
+++ b/svx/source/tbxctrls/SvxPresetListBox.cxx
@@ -101,7 +101,7 @@ void SvxPresetListBox::FillPresetListBox(XPatternList& pList, sal_uInt32 nStartI
FillPresetListBoxImpl<XPatternList, XBitmapEntry>(pList, nStartIndex);
}
-void SvxPresetListBox::OnMenuItemSelected(const OString& rIdent)
+void SvxPresetListBox::OnMenuItemSelected(std::string_view rIdent)
{
if (rIdent == "rename")
maRenameHdl.Call(this);
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index f8b532ab554e..43f0e6c1a2f2 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -1982,19 +1982,19 @@ std::string XGradient::GradientStyleToString(css::awt::GradientStyle eStyle)
namespace
{
- css::awt::GradientStyle lcl_getStyleFromString(const OUString& rStyle)
+ css::awt::GradientStyle lcl_getStyleFromString(std::u16string_view rStyle)
{
- if (rStyle == "LINEAR")
+ if (rStyle == u"LINEAR")
return css::awt::GradientStyle_LINEAR;
- else if (rStyle == "AXIAL")
+ else if (rStyle == u"AXIAL")
return css::awt::GradientStyle_AXIAL;
- else if (rStyle == "RADIAL")
+ else if (rStyle == u"RADIAL")
return css::awt::GradientStyle_RADIAL;
- else if (rStyle == "ELLIPTICAL")
+ else if (rStyle == u"ELLIPTICAL")
return css::awt::GradientStyle_ELLIPTICAL;
- else if (rStyle == "SQUARE")
+ else if (rStyle == u"SQUARE")
return css::awt::GradientStyle_SQUARE;
- else if (rStyle == "RECT")
+ else if (rStyle == u"RECT")
return css::awt::GradientStyle_RECT;
return css::awt::GradientStyle_LINEAR;
diff --git a/sw/inc/textboxhelper.hxx b/sw/inc/textboxhelper.hxx
index fd408c10c3b2..a0cd4c593082 100644
--- a/sw/inc/textboxhelper.hxx
+++ b/sw/inc/textboxhelper.hxx
@@ -61,7 +61,7 @@ public:
static void syncProperty(SwFrameFormat* pShape, sal_uInt16 nWID, sal_uInt8 nMemberID,
const css::uno::Any& rValue);
/// Does the same, but works on properties which lack an sw-specific WID / MemberID.
- static void syncProperty(SwFrameFormat* pShape, const OUString& rPropertyName,
+ static void syncProperty(SwFrameFormat* pShape, std::u16string_view rPropertyName,
const css::uno::Any& rValue);
/// Get a property of the underlying TextFrame.
static void getProperty(SwFrameFormat const* pShape, sal_uInt16 nWID, sal_uInt8 nMemberID,
diff --git a/sw/inc/unocrsrhelper.hxx b/sw/inc/unocrsrhelper.hxx
index 043446a7c6f0..eb0dbdb0d540 100644
--- a/sw/inc/unocrsrhelper.hxx
+++ b/sw/inc/unocrsrhelper.hxx
@@ -116,17 +116,17 @@ namespace SwUnoCursorHelper
const bool bForceExpandHints );
/// @throws css::lang::IllegalArgumentException
/// @throws css::uno::RuntimeException
- void makeRedline( SwPaM const & rPaM, const OUString& RedlineType,
+ void makeRedline( SwPaM const & rPaM, std::u16string_view RedlineType,
const css::uno::Sequence< css::beans::PropertyValue >& RedlineProperties );
/// @throws css::lang::IllegalArgumentException
/// @throws css::uno::RuntimeException
- void makeTableRowRedline( SwTableLine& rTableLine, const OUString& RedlineType,
+ void makeTableRowRedline( SwTableLine& rTableLine, std::u16string_view RedlineType,
const css::uno::Sequence< css::beans::PropertyValue >& RedlineProperties );
/// @throws css::lang::IllegalArgumentException
/// @throws css::uno::RuntimeException
- SW_DLLPUBLIC void makeTableCellRedline( SwTableBox& rTableBox, const OUString& RedlineType,
+ SW_DLLPUBLIC void makeTableCellRedline( SwTableBox& rTableBox, std::u16string_view RedlineType,
const css::uno::Sequence< css::beans::PropertyValue >& RedlineProperties );
/// @param bTableMode: attributes should be applied to a table selection
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 5b3d6bd33408..8fc67fdf5206 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -851,7 +851,7 @@
#define UNO_NAME_CHAR_HIGHLIGHT "CharHighlight"
#define UNO_NAME_STYLE_INTEROP_GRAB_BAG "StyleInteropGrabBag"
#define UNO_NAME_CHAR_INTEROP_GRAB_BAG "CharInteropGrabBag"
-#define UNO_NAME_TEXT_VERT_ADJUST "TextVerticalAdjust"
+#define UNO_NAME_TEXT_VERT_ADJUST u"TextVerticalAdjust"
#define UNO_NAME_CELL_INTEROP_GRAB_BAG "CellInteropGrabBag"
#define UNO_NAME_ROW_INTEROP_GRAB_BAG "RowInteropGrabBag"
#define UNO_NAME_TABLE_INTEROP_GRAB_BAG "TableInteropGrabBag"
diff --git a/sw/inc/unotextrange.hxx b/sw/inc/unotextrange.hxx
index 471a9ae8bc3e..693595e76eef 100644
--- a/sw/inc/unotextrange.hxx
+++ b/sw/inc/unotextrange.hxx
@@ -70,7 +70,7 @@ namespace sw {
CreateParentXText(SwDoc & rDoc, const SwPosition& rPos);
bool GetDefaultTextContentValue(css::uno::Any& rAny,
- const OUString& rPropertyName, sal_uInt16 nWID = 0);
+ std::u16string_view rPropertyName, sal_uInt16 nWID = 0);
} // namespace sw
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 40a60f6d3e1e..b699c2cd10ae 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -2339,9 +2339,9 @@ void SwUiWriterTest::testDeleteTableRedlines()
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount());
CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTable->getColumns()->getCount());
uno::Sequence<beans::PropertyValue> aDescriptor;
- SwUnoCursorHelper::makeTableCellRedline((*const_cast<SwTableBox*>(rTable.GetTableBox("A1"))), "TableCellInsert", aDescriptor);
- SwUnoCursorHelper::makeTableCellRedline((*const_cast<SwTableBox*>(rTable.GetTableBox("B1"))), "TableCellInsert", aDescriptor);
- SwUnoCursorHelper::makeTableCellRedline((*const_cast<SwTableBox*>(rTable.GetTableBox("C1"))), "TableCellInsert", aDescriptor);
+ SwUnoCursorHelper::makeTableCellRedline((*const_cast<SwTableBox*>(rTable.GetTableBox("A1"))), u"TableCellInsert", aDescriptor);
+ SwUnoCursorHelper::makeTableCellRedline((*const_cast<SwTableBox*>(rTable.GetTableBox("B1"))), u"TableCellInsert", aDescriptor);
+ SwUnoCursorHelper::makeTableCellRedline((*const_cast<SwTableBox*>(rTable.GetTableBox("C1"))), u"TableCellInsert", aDescriptor);
IDocumentRedlineAccess& rIDRA = pDoc->getIDocumentRedlineAccess();
SwExtraRedlineTable& rExtras = rIDRA.GetExtraRedlineTable();
rExtras.DeleteAllTableRedlines(*pDoc, rTable, false, RedlineType::Any);
diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index d2359c82a0cc..9df25b47bcfd 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -705,7 +705,7 @@ namespace sw::mark
}
}
- void DropDownFieldmark::SendLOKMessage(const OString& sAction)
+ void DropDownFieldmark::SendLOKMessage(std::string_view sAction)
{
const SfxViewShell* pViewShell = SfxViewShell::Current();
if (!pViewShell || pViewShell->isLOKMobilePhone())
diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx
index 476089bc8723..1e276998ca82 100644
--- a/sw/source/core/doc/textboxhelper.cxx
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -427,7 +427,7 @@ tools::Rectangle SwTextBoxHelper::getTextRectangle(SwFrameFormat* pShape, bool b
return aRet;
}
-void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, const OUString& rPropertyName,
+void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, std::u16string_view rPropertyName,
const css::uno::Any& rValue)
{
// Textframes does not have valid horizontal adjust property, so map it to paragraph adjust property
@@ -469,7 +469,7 @@ void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, const OUString& rPrope
return;
}
- if (rPropertyName == "CustomShapeGeometry")
+ if (rPropertyName == u"CustomShapeGeometry")
{
// CustomShapeGeometry changes the textbox position offset and size, so adjust both.
syncProperty(pShape, RES_FRM_SIZE, MID_FRMSIZE_SIZE, uno::Any());
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index d9f9e361bc65..a6c6185c28af 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -214,9 +214,9 @@ bool IsFrameBehind( const SwTextNode& rMyNd, sal_Int32 nMySttPos,
// the reversed caption order in autocaption, solved by #i61007#)
static void lcl_formatReferenceLanguage( OUString& rRefText,
bool bClosingParenthesis, LanguageType eLang,
- const OUString& rReferenceLanguage)
+ std::u16string_view rReferenceLanguage)
{
- if (eLang != LANGUAGE_HUNGARIAN || (rReferenceLanguage != "hu" && rReferenceLanguage != "Hu"))
+ if (eLang != LANGUAGE_HUNGARIAN || (rReferenceLanguage != u"hu" && rReferenceLanguage != u"Hu"))
return;
// Add Hungarian definitive article (a/az) before references,
@@ -334,7 +334,7 @@ static void lcl_formatReferenceLanguage( OUString& rRefText,
// lowercase, if rReferenceLanguage == "hu", not "Hu"
OUString sArticle;
- if ( rReferenceLanguage == "hu" )
+ if ( rReferenceLanguage == u"hu" )
sArticle = "a";
else
sArticle = "A";
@@ -431,7 +431,7 @@ OUString SwGetRefField::GetFieldName() const
static void FilterText(OUString & rText, LanguageType const eLang,
- OUString const& rSetReferenceLanguage)
+ std::u16string_view rSetReferenceLanguage)
{
// remove all special characters (replace them with blanks)
if (rText.isEmpty())
@@ -452,7 +452,7 @@ static void FilterText(OUString & rText, LanguageType const eLang,
}
}
rText = aBuf.makeStringAndClear();
- if (!rSetReferenceLanguage.isEmpty())
+ if (!rSetReferenceLanguage.empty())
{
lcl_formatReferenceLanguage(rText, false, eLang, rSetReferenceLanguage);
}
diff --git a/sw/source/core/inc/bookmrk.hxx b/sw/source/core/inc/bookmrk.hxx
index 766791f772e1..a73cc31c9874 100644
--- a/sw/source/core/inc/bookmrk.hxx
+++ b/sw/source/core/inc/bookmrk.hxx
@@ -293,7 +293,7 @@ namespace sw::mark {
// This method should be called only by the portion so we can now the portion's painting area
void SetPortionPaintArea(const SwRect& rPortionPaintArea);
- void SendLOKMessage(const OString& sAction);
+ void SendLOKMessage(std::string_view sAction);
private:
SwRect m_aPortionPaintArea;
diff --git a/sw/source/core/inc/unoport.hxx b/sw/source/core/inc/unoport.hxx
index 69c407d5b135..7c6ab857eb86 100644
--- a/sw/source/core/inc/unoport.hxx
+++ b/sw/source/core/inc/unoport.hxx
@@ -288,7 +288,7 @@ public:
/// @throws std::exception
static css::uno::Any GetPropertyValue(
- OUString const& PropertyName, SwRangeRedline const& rRedline);
+ std::u16string_view PropertyName, SwRangeRedline const& rRedline);
/// @throws std::exception
static css::uno::Sequence< css::beans::PropertyValue > CreateRedlineProperties(
SwRangeRedline const& rRedline, bool const bIsStart);
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index 0186b5f9613f..99de9745078f 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -1226,21 +1226,21 @@ bool DocInsertStringSplitCR(
}
void makeRedline( SwPaM const & rPaM,
- const OUString& rRedlineType,
+ std::u16string_view rRedlineType,
const uno::Sequence< beans::PropertyValue >& rRedlineProperties )
{
IDocumentRedlineAccess& rRedlineAccess = rPaM.GetDoc().getIDocumentRedlineAccess();
RedlineType eType;
- if ( rRedlineType == "Insert" )
+ if ( rRedlineType == u"Insert" )
eType = RedlineType::Insert;
- else if ( rRedlineType == "Delete" )
+ else if ( rRedlineType == u"Delete" )
eType = RedlineType::Delete;
- else if ( rRedlineType == "Format" )
+ else if ( rRedlineType == u"Format" )
eType = RedlineType::Format;
- else if ( rRedlineType == "TextTable" )
+ else if ( rRedlineType == u"TextTable" )
eType = RedlineType::Table;
- else if ( rRedlineType == "ParagraphFormat" )
+ else if ( rRedlineType == u"ParagraphFormat" )
eType = RedlineType::ParagraphFormat;
else
throw lang::IllegalArgumentException();
@@ -1385,17 +1385,17 @@ void makeRedline( SwPaM const & rPaM,
}
void makeTableRowRedline( SwTableLine& rTableLine,
- const OUString& rRedlineType,
+ std::u16string_view rRedlineType,
const uno::Sequence< beans::PropertyValue >& rRedlineProperties )
{
IDocumentRedlineAccess* pRedlineAccess = &rTableLine.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess();
RedlineType eType;
- if ( rRedlineType == "TableRowInsert" )
+ if ( rRedlineType == u"TableRowInsert" )
{
eType = RedlineType::TableRowInsert;
}
- else if ( rRedlineType == "TableRowDelete" )
+ else if ( rRedlineType == u"TableRowDelete" )
{
eType = RedlineType::TableRowDelete;
}
@@ -1434,17 +1434,17 @@ void makeTableRowRedline( SwTableLine& rTableLine,
}
void makeTableCellRedline( SwTableBox& rTableBox,
- const OUString& rRedlineType,
+ std::u16string_view rRedlineType,
const uno::Sequence< beans::PropertyValue >& rRedlineProperties )
{
IDocumentRedlineAccess* pRedlineAccess = &rTableBox.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess();
RedlineType eType;
- if ( rRedlineType == "TableCellInsert" )
+ if ( rRedlineType == u"TableCellInsert" )
{
eType = RedlineType::TableCellInsert;
}
- else if ( rRedlineType == "TableCellDelete" )
+ else if ( rRedlineType == u"TableCellDelete" )
{
eType = RedlineType::TableCellDelete;
}
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index 7aca78714e65..dbb264b51b77 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -289,18 +289,18 @@ static sal_uInt16 lcl_GetPropMapIdForFieldType( SwFieldIds nWhich )
return nId;
}
-static sal_Int32 lcl_PropName2TokenPos(const OUString& rPropertyName)
+static sal_Int32 lcl_PropName2TokenPos(std::u16string_view rPropertyName)
{
- if (rPropertyName == UNO_NAME_DDE_COMMAND_TYPE)
+ if (rPropertyName == u"" UNO_NAME_DDE_COMMAND_TYPE)
return 0;
- if (rPropertyName == UNO_NAME_DDE_COMMAND_FILE)
+ if (rPropertyName == u"" UNO_NAME_DDE_COMMAND_FILE)
return 1;
- if (rPropertyName == UNO_NAME_DDE_COMMAND_ELEMENT)
+ if (rPropertyName == u"" UNO_NAME_DDE_COMMAND_ELEMENT)
return 2;
- if (rPropertyName == UNO_NAME_IS_AUTOMATIC_UPDATE)
+ if (rPropertyName == u"" UNO_NAME_IS_AUTOMATIC_UPDATE)
return 3;
return SAL_MAX_INT32;
diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx
index ab2dcae3e49d..4077e90ab831 100644
--- a/sw/source/core/unocore/unoparagraph.cxx
+++ b/sw/source/core/unocore/unoparagraph.cxx
@@ -840,15 +840,15 @@ SwXParagraph::Impl::GetPropertyValuesTolerant_Impl(
}
bool ::sw::GetDefaultTextContentValue(
- uno::Any& rAny, const OUString& rPropertyName, sal_uInt16 nWID)
+ uno::Any& rAny, std::u16string_view rPropertyName, sal_uInt16 nWID)
{
if(!nWID)
{
- if(rPropertyName == UNO_NAME_ANCHOR_TYPE)
+ if(rPropertyName == u"" UNO_NAME_ANCHOR_TYPE)
nWID = FN_UNO_ANCHOR_TYPE;
- else if(rPropertyName == UNO_NAME_ANCHOR_TYPES)
+ else if(rPropertyName == u"" UNO_NAME_ANCHOR_TYPES)
nWID = FN_UNO_ANCHOR_TYPES;
- else if(rPropertyName == UNO_NAME_TEXT_WRAP)
+ else if(rPropertyName == u"" UNO_NAME_TEXT_WRAP)
nWID = FN_UNO_TEXT_WRAP;
else
return false;
diff --git a/sw/source/core/unocore/unoredline.cxx b/sw/source/core/unocore/unoredline.cxx
index 7095280585f1..df3ad38cfffd 100644
--- a/sw/source/core/unocore/unoredline.cxx
+++ b/sw/source/core/unocore/unoredline.cxx
@@ -249,38 +249,38 @@ uno::Sequence< sal_Int8 > SAL_CALL SwXRedlinePortion::getImplementationId( )
return css::uno::Sequence<sal_Int8>();
}
-uno::Any SwXRedlinePortion::GetPropertyValue( const OUString& rPropertyName, const SwRangeRedline& rRedline )
+uno::Any SwXRedlinePortion::GetPropertyValue( std::u16string_view rPropertyName, const SwRangeRedline& rRedline )
{
uno::Any aRet;
- if(rPropertyName == UNO_NAME_REDLINE_AUTHOR)
+ if(rPropertyName == u"" UNO_NAME_REDLINE_AUTHOR)
aRet <<= rRedline.GetAuthorString();
- else if(rPropertyName == UNO_NAME_REDLINE_DATE_TIME)
+ else if(rPropertyName == u"" UNO_NAME_REDLINE_DATE_TIME)
{
aRet <<= rRedline.GetTimeStamp().GetUNODateTime();
}
- else if(rPropertyName == UNO_NAME_REDLINE_COMMENT)
+ else if(rPropertyName == u"" UNO_NAME_REDLINE_COMMENT)
aRet <<= rRedline.GetComment();
- else if(rPropertyName == UNO_NAME_REDLINE_DESCRIPTION)
+ else if(rPropertyName == u"" UNO_NAME_REDLINE_DESCRIPTION)
aRet <<= const_cast<SwRangeRedline&>(rRedline).GetDescr();
- else if(rPropertyName == UNO_NAME_REDLINE_TYPE)
+ else if(rPropertyName == u"" UNO_NAME_REDLINE_TYPE)
{
aRet <<= SwRedlineTypeToOUString(rRedline.GetType());
}
- else if(rPropertyName == UNO_NAME_REDLINE_SUCCESSOR_DATA)
+ else if(rPropertyName == u"" UNO_NAME_REDLINE_SUCCESSOR_DATA)
{
if(rRedline.GetRedlineData().Next())
aRet <<= lcl_GetSuccessorProperties(rRedline);
}
- else if (rPropertyName == UNO_NAME_REDLINE_IDENTIFIER)
+ else if (rPropertyName == u"" UNO_NAME_REDLINE_IDENTIFIER)
{
aRet <<= OUString::number(
sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(&rRedline) ) );
}
- else if (rPropertyName == UNO_NAME_IS_IN_HEADER_FOOTER)
+ else if (rPropertyName == u"" UNO_NAME_IS_IN_HEADER_FOOTER)
{
aRet <<= rRedline.GetDoc().IsInHeaderFooter( rRedline.GetPoint()->nNode );
}
- else if (rPropertyName == UNO_NAME_MERGE_LAST_PARA)
+ else if (rPropertyName == u"" UNO_NAME_MERGE_LAST_PARA)
{
aRet <<= !rRedline.IsDelLastPara();
}
diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx
index 132a4dde5aec..422619dae051 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -1139,7 +1139,7 @@ SwXTextSection::Impl::GetPropertyValues_Impl(
case FN_UNO_TEXT_WRAP:
case FN_UNO_ANCHOR_TYPE:
::sw::GetDefaultTextContentValue(
- pRet[nProperty], OUString(), pEntry->nWID);
+ pRet[nProperty], u"", pEntry->nWID);
break;
case FN_UNO_REDLINE_NODE_START:
case FN_UNO_REDLINE_NODE_END:
@@ -1633,7 +1633,7 @@ SwXTextSection::getPropertyDefault(const OUString& rPropertyName)
case FN_UNO_ANCHOR_TYPES:
case FN_UNO_TEXT_WRAP:
case FN_UNO_ANCHOR_TYPE:
- ::sw::GetDefaultTextContentValue(aRet, OUString(), pEntry->nWID);
+ ::sw::GetDefaultTextContentValue(aRet, u"", pEntry->nWID);
break;
default:
if(pFormat && SfxItemPool::IsWhich(pEntry->nWID))
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 1235417db455..e6ee4dac0e1b 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -608,14 +608,14 @@ uno::Sequence< beans::PropertyValue > SwXStyleFamilies::getStyleLoaderOptions()
}
static bool lcl_GetHeaderFooterItem(
- SfxItemSet const& rSet, OUString const& rPropName, bool const bFooter,
+ SfxItemSet const& rSet, std::u16string_view rPropName, bool const bFooter,
SvxSetItem const*& o_rpItem)
{
SfxItemState eState = rSet.GetItemState(
bFooter ? SID_ATTR_PAGE_FOOTERSET : SID_ATTR_PAGE_HEADERSET,
false, reinterpret_cast<const SfxPoolItem**>(&o_rpItem));
if (SfxItemState::SET != eState &&
- rPropName == UNO_NAME_FIRST_IS_SHARED)
+ rPropName == u"" UNO_NAME_FIRST_IS_SHARED)
{ // fdo#79269 header may not exist, check footer then
eState = rSet.GetItemState(
(!bFooter) ? SID_ATTR_PAGE_FOOTERSET : SID_ATTR_PAGE_HEADERSET,
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 9731df22cd99..90f8894bc08a 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -2771,7 +2771,7 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName)
case FN_UNO_TEXT_WRAP:
case FN_UNO_ANCHOR_TYPE:
::sw::GetDefaultTextContentValue(
- aRet, OUString(), pEntry->nWID);
+ aRet, u"", pEntry->nWID);
break;
case FN_UNO_RANGE_ROW_LABEL:
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 7b1a5cc19be3..36e246d7dbc1 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -188,7 +188,7 @@ OString lclConvToHex(sal_uInt16 nHex)
}
}
-bool IgnorePropertyForReqIF(bool bReqIF, const OString& rProperty, const OString& rValue)
+bool IgnorePropertyForReqIF(bool bReqIF, const OString& rProperty, std::string_view rValue)
{
if (!bReqIF)
return false;
@@ -245,10 +245,10 @@ public:
}
void SwHTMLWriter::OutCSS1_Property( const char *pProp,
- const char *pVal,
+ std::string_view sVal,
const OUString *pSVal )
{
- if (IgnorePropertyForReqIF(mbReqIF, pProp, pVal))
+ if (IgnorePropertyForReqIF(mbReqIF, pProp, sVal))
return;
OStringBuffer sOut;
@@ -347,8 +347,8 @@ void SwHTMLWriter::OutCSS1_Property( const char *pProp,
{
// for STYLE-Option encode string
Strm().WriteOString( sOut.makeStringAndClear() );
- if( pVal )
- HTMLOutFuncs::Out_String( Strm(), OUString::createFromAscii(pVal),
+ if( !sVal.empty() )
+ HTMLOutFuncs::Out_String( Strm(), OUString::createFromAscii(sVal),
m_eDestEnc, &m_aNonConvertableCharacters );
else if( pSVal )
HTMLOutFuncs::Out_String( Strm(), *pSVal, m_eDestEnc, &m_aNonConvertableCharacters );
@@ -356,8 +356,8 @@ void SwHTMLWriter::OutCSS1_Property( const char *pProp,
else
{
// for STYLE-Tag print string directly
- if( pVal )
- sOut.append(pVal);
+ if( !sVal.empty() )
+ sOut.append(sVal);
else if( pSVal )
sOut.append(OUStringToOString(*pSVal, m_eDestEnc));
}
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index 4c5f335597a0..2fab7232e5e0 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -2687,7 +2687,7 @@ static Writer& OutHTML_SvxFont( Writer& rWrt, const SfxPoolItem& rHt )
if( rHTMLWrt.m_bOutOpts )
return rWrt;
- if (IgnorePropertyForReqIF(rHTMLWrt.mbReqIF, "font-family", OString()))
+ if (IgnorePropertyForReqIF(rHTMLWrt.mbReqIF, "font-family", ""))
{
return rWrt;
}
@@ -2733,7 +2733,7 @@ static Writer& OutHTML_SvxFontHeight( Writer& rWrt, const SfxPoolItem& rHt )
if( rHTMLWrt.m_bOutOpts )
return rWrt;
- if (IgnorePropertyForReqIF(rHTMLWrt.mbReqIF, "font-size", OString()))
+ if (IgnorePropertyForReqIF(rHTMLWrt.mbReqIF, "font-size", ""))
{
return rWrt;
}
diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx
index ab282ba652ff..e2a1c1d30c85 100644
--- a/sw/source/filter/html/wrthtml.hxx
+++ b/sw/source/filter/html/wrthtml.hxx
@@ -454,9 +454,9 @@ public:
inline void OutCSS1_PropertyAscii( const char *pProp,
const char *pVal );
inline void OutCSS1_PropertyAscii( const char *pProp,
- const OString& rVal );
+ std::string_view rVal );
inline void OutCSS1_Property( const char *pProp, const OUString& rVal );
- void OutCSS1_Property( const char *pProp, const char *pVal,
+ void OutCSS1_Property( const char *pProp, std::string_view pVal,
const OUString *pSVal );
void OutCSS1_UnitProperty( const char *pProp, tools::Long nVal );
void OutCSS1_PixelProperty( const char *pProp, tools::Long nVal, bool bVert );
@@ -606,15 +606,15 @@ inline void SwHTMLWriter::OutCSS1_PropertyAscii( const char *pProp,
}
inline void SwHTMLWriter::OutCSS1_PropertyAscii( const char *pProp,
- const OString& rVal )
+ std::string_view rVal )
{
- OutCSS1_Property( pProp, rVal.getStr(), nullptr );
+ OutCSS1_Property( pProp, rVal, nullptr );
}
inline void SwHTMLWriter::OutCSS1_Property( const char *pProp,
const OUString& rVal )
{
- OutCSS1_Property( pProp, nullptr, &rVal );
+ OutCSS1_Property( pProp, std::string_view(), &rVal );
}
@@ -698,7 +698,7 @@ Writer& OutCSS1_SvxBox( Writer& rWrt, const SfxPoolItem& rHt );
OString GetCSS1_Color(const Color& rColor);
/// Determines if rProperty with a given rValue has to be suppressed due to ReqIF mode.
-bool IgnorePropertyForReqIF(bool bReqIF, const OString& rProperty, const OString& rValue);
+bool IgnorePropertyForReqIF(bool bReqIF, const OString& rProperty, std::string_view rValue);
#endif // INCLUDED_SW_SOURCE_FILTER_HTML_WRTHTML_HXX
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 9f949b0a748a..5a58b8407218 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -297,9 +297,9 @@ void DocxAttributeOutput::RTLAndCJKState( bool bIsRTL, sal_uInt16 /*nScript*/ )
}
/// Are multiple paragraphs disallowed inside this type of SDT?
-static bool lcl_isOnelinerSdt(const OUString& rName)
+static bool lcl_isOnelinerSdt(std::u16string_view rName)
{
- return rName == "Title" || rName == "Subtitle" || rName == "Company";
+ return rName == u"Title" || rName == u"Subtitle" || rName == u"Company";
}
// write a floating table directly to docx without the surrounding frame
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index c37ee40fb6de..7c67e6702d3a 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -2233,18 +2233,18 @@ eF_ResT SwWW8ImplReader::Read_F_PgRef( WW8FieldDesc*, OUString& rStr )
//helper function
//For MS MacroButton field, the symbol in plain text is always "(" (0x28),
//which should be mapped according to the macro type
-static bool ConvertMacroSymbol( const OUString& rName, OUString& rReference )
+static bool ConvertMacroSymbol( std::u16string_view rName, OUString& rReference )
{
bool bConverted = false;
if( rReference == "(" )
{
bConverted = true;
sal_Unicode cSymbol = sal_Unicode(); // silence false warning
- if (rName == "CheckIt")
+ if (rName == u"CheckIt")
cSymbol = 0xF06F;
- else if (rName == "UncheckIt")
+ else if (rName == u"UncheckIt")
cSymbol = 0xF0FE;
- else if (rName == "ShowExample")
+ else if (rName == u"ShowExample")
cSymbol = 0xF02A;
//else if... : todo
else
diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx
index f9a63c449a08..2f08f0a5a7c3 100644
--- a/sw/source/uibase/docvw/HeaderFooterWin.cxx
+++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx
@@ -406,7 +406,7 @@ bool SwHeaderFooterWin::IsEmptyHeaderFooter( ) const
return bResult;
}
-void SwHeaderFooterWin::ExecuteCommand(const OString& rIdent)
+void SwHeaderFooterWin::ExecuteCommand(std::string_view rIdent)
{
SwView& rView = GetEditWin()->GetView();
SwWrtShell& rSh = rView.GetWrtShell();
diff --git a/sw/source/uibase/inc/HeaderFooterWin.hxx b/sw/source/uibase/inc/HeaderFooterWin.hxx
index 0d3d0f1409cc..f92d45f858fc 100644
--- a/sw/source/uibase/inc/HeaderFooterWin.hxx
+++ b/sw/source/uibase/inc/HeaderFooterWin.hxx
@@ -60,7 +60,7 @@ public:
bool IsHeader() const { return m_bIsHeader; };
bool IsEmptyHeaderFooter( ) const;
- void ExecuteCommand(const OString &rIdent);
+ void ExecuteCommand(std::string_view rIdent);
void SetReadonly( bool bReadonly ) override;
diff --git a/sw/source/uibase/inc/conttree.hxx b/sw/source/uibase/inc/conttree.hxx
index 16db8910a0ad..478d9da699e9 100644
--- a/sw/source/uibase/inc/conttree.hxx
+++ b/sw/source/uibase/inc/conttree.hxx
@@ -214,7 +214,7 @@ public:
void SetOutlineLevel(sal_uInt8 nSet);
/** Execute commands of the Navigator */
- void ExecCommand(const OString& rCmd, bool bModifier);
+ void ExecCommand(std::string_view rCmd, bool bModifier);
void ShowTree();
void HideTree();
@@ -363,7 +363,7 @@ public:
void MoveSelectionTo(const weld::TreeIter* pDropTarget);
- void TbxMenuHdl(const OString& rCommand, weld::Menu& rMenu);
+ void TbxMenuHdl(std::string_view rCommand, weld::Menu& rMenu);
void InsertRegion( const SwGlblDocContent* pCont,
const OUString* pFileName = nullptr );
void EditContent(const SwGlblDocContent* pCont );
@@ -371,13 +371,13 @@ public:
void ShowTree();
void HideTree();
- void ExecCommand(const OString& rCmd);
+ void ExecCommand(std::string_view rCmd);
void Display(bool bOnlyUpdateUserData = false);
bool Update(bool bHard);
- void ExecuteContextMenuAction(const OString& rSelectedPopupEntry);
+ void ExecuteContextMenuAction(std::string_view rSelectedPopupEntry);
const SwWrtShell* GetActiveWrtShell() const {return m_pActiveShell;}
};
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 6eceb15435eb..51a4bbd825cc 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -2769,7 +2769,7 @@ void SwContentTree::Notify(SfxBroadcaster & rBC, SfxHint const& rHint)
}
}
-void SwContentTree::ExecCommand(const OString& rCmd, bool bOutlineWithChildren)
+void SwContentTree::ExecCommand(std::string_view rCmd, bool bOutlineWithChildren)
{
const bool bUp = rCmd == "chapterup";
const bool bUpDown = bUp || rCmd == "chapterdown";
diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx
index b550b0058000..095ec76e581c 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -292,7 +292,7 @@ IMPL_LINK(SwGlobalTree, CommandHdl, const CommandEvent&, rCEvt, bool)
return bPop;
}
-void SwGlobalTree::TbxMenuHdl(const OString& rCommand, weld::Menu& rMenu)
+void SwGlobalTree::TbxMenuHdl(std::string_view rCommand, weld::Menu& rMenu)
{
const MenuEnableFlags nEnableFlags = GetEnableFlags();
if (rCommand == "insert")
@@ -560,7 +560,7 @@ void SwGlobalTree::EditContent(const SwGlblDocContent* pCont )
}
}
-void SwGlobalTree::ExecuteContextMenuAction(const OString& rSelectedPopupEntry)
+void SwGlobalTree::ExecuteContextMenuAction(std::string_view rSelectedPopupEntry)
{
bool bUpdateHard = false;
@@ -808,7 +808,7 @@ void SwGlobalTree::HideTree()
m_xTreeView->hide();
}
-void SwGlobalTree::ExecCommand(const OString &rCmd)
+void SwGlobalTree::ExecCommand(std::string_view rCmd)
{
int nEntry = m_xTreeView->get_selected_index();
if (nEntry == -1)
diff --git a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx
index 8b61c375f896..04162051b46e 100644
--- a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx
@@ -48,8 +48,8 @@ using namespace hierarchy_ucp;
// describe path of cfg entry
#define CFGPROPERTY_NODEPATH "nodepath"
-#define READ_SERVICE_NAME "com.sun.star.ucb.HierarchyDataReadAccess"
-#define READWRITE_SERVICE_NAME "com.sun.star.ucb.HierarchyDataReadWriteAccess"
+#define READ_SERVICE_NAME u"com.sun.star.ucb.HierarchyDataReadAccess"
+#define READWRITE_SERVICE_NAME u"com.sun.star.ucb.HierarchyDataReadWriteAccess"
#define CONFIG_DATA_ROOT_KEY \
"/org.openoffice.ucb.Hierarchy/Root"
@@ -304,7 +304,7 @@ HierarchyDataSource::getAvailableServiceNames()
uno::Reference< uno::XInterface >
HierarchyDataSource::createInstanceWithArguments(
- const OUString & ServiceSpecifier,
+ std::u16string_view ServiceSpecifier,
const uno::Sequence< uno::Any > & Arguments,
bool bCheckArgs )
{
diff --git a/ucb/source/ucp/hierarchy/hierarchydatasource.hxx b/ucb/source/ucp/hierarchy/hierarchydatasource.hxx
index e21d7acda551..d924fbc9b1d4 100644
--- a/ucb/source/ucp/hierarchy/hierarchydatasource.hxx
+++ b/ucb/source/ucp/hierarchy/hierarchydatasource.hxx
@@ -69,7 +69,7 @@ public:
private:
/// @throws css::uno::Exception
- css::uno::Reference< css::uno::XInterface > createInstanceWithArguments( const OUString & ServiceSpecifier,
+ css::uno::Reference< css::uno::XInterface > createInstanceWithArguments( std::u16string_view ServiceSpecifier,
const css::uno::Sequence<
css::uno::Any > & Arguments,
bool bCheckArgs );
diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx
index bf64d4d0146d..04cd62ee9fba 100644
--- a/ucb/source/ucp/tdoc/tdoc_content.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_content.cxx
@@ -81,7 +81,7 @@ using namespace com::sun::star;
using namespace tdoc_ucp;
-static ContentType lcl_getContentType( const OUString & rType )
+static ContentType lcl_getContentType( std::u16string_view rType )
{
if ( rType == TDOC_ROOT_CONTENT_TYPE )
return ROOT;
diff --git a/ucb/source/ucp/tdoc/tdoc_provider.hxx b/ucb/source/ucp/tdoc/tdoc_provider.hxx
index b105ac9367a3..d9e4814bc9c3 100644
--- a/ucb/source/ucp/tdoc/tdoc_provider.hxx
+++ b/ucb/source/ucp/tdoc/tdoc_provider.hxx
@@ -42,13 +42,13 @@ namespace tdoc_ucp {
#define TDOC_ROOT_CONTENT_TYPE \
- "application/" TDOC_URL_SCHEME "-root"
+ u"application/" TDOC_URL_SCHEME "-root"
#define TDOC_DOCUMENT_CONTENT_TYPE \
- "application/" TDOC_URL_SCHEME "-document"
+ u"application/" TDOC_URL_SCHEME "-document"
#define TDOC_FOLDER_CONTENT_TYPE \
- "application/" TDOC_URL_SCHEME "-folder"
+ u"application/" TDOC_URL_SCHEME "-folder"
#define TDOC_STREAM_CONTENT_TYPE \
- "application/" TDOC_URL_SCHEME "-stream"
+ u"application/" TDOC_URL_SCHEME "-stream"
class StorageElementFactory;
diff --git a/ucb/source/ucp/webdav-neon/DateTimeHelper.cxx b/ucb/source/ucp/webdav-neon/DateTimeHelper.cxx
index 88ca23f16ff7..a50d2db55787 100644
--- a/ucb/source/ucp/webdav-neon/DateTimeHelper.cxx
+++ b/ucb/source/ucp/webdav-neon/DateTimeHelper.cxx
@@ -114,31 +114,31 @@ bool DateTimeHelper::ISO8601_To_DateTime (const OUString& s,
return false;
}
-sal_Int32 DateTimeHelper::convertMonthToInt (const OUString& month)
+sal_Int32 DateTimeHelper::convertMonthToInt (std::u16string_view month)
{
- if (month == "Jan")
+ if (month == u"Jan")
return 1;
- else if (month == "Feb")
+ else if (month == u"Feb")
return 2;
- else if (month == "Mar")
+ else if (month == u"Mar")
return 3;
- else if (month == "Apr")
+ else if (month == u"Apr")
return 4;
- else if (month == "May")
+ else if (month == u"May")
return 5;
- else if (month == "Jun")
+ else if (month == u"Jun")
return 6;
- else if (month == "Jul")
+ else if (month == u"Jul")
return 7;
- else if (month == "Aug")
+ else if (month == u"Aug")
return 8;
- else if (month == "Sep")
+ else if (month == u"Sep")
return 9;
- else if (month == "Oct")
+ else if (month == u"Oct")
return 10;
- else if (month == "Nov")
+ else if (month == u"Nov")
return 11;
- else if (month == "Dec")
+ else if (month == u"Dec")
return 12;
else
return 0;
diff --git a/ucb/source/ucp/webdav-neon/DateTimeHelper.hxx b/ucb/source/ucp/webdav-neon/DateTimeHelper.hxx
index 5abf6d400668..618814614bfb 100644
--- a/ucb/source/ucp/webdav-neon/DateTimeHelper.hxx
+++ b/ucb/source/ucp/webdav-neon/DateTimeHelper.hxx
@@ -44,7 +44,7 @@ namespace webdav_ucp
class DateTimeHelper
{
private:
- static sal_Int32 convertMonthToInt (const OUString& );
+ static sal_Int32 convertMonthToInt (std::u16string_view );
static bool ISO8601_To_DateTime (const OUString&,
css::util::DateTime& );
diff --git a/unodevtools/source/skeletonmaker/javacompskeleton.cxx b/unodevtools/source/skeletonmaker/javacompskeleton.cxx
index b4d26e0e0a18..7f8ca012d3b7 100644
--- a/unodevtools/source/skeletonmaker/javacompskeleton.cxx
+++ b/unodevtools/source/skeletonmaker/javacompskeleton.cxx
@@ -40,7 +40,7 @@ static void generatePackage(std::ostream & o, const OString & implname)
}
static void generateImports(std::ostream & o, ProgramOptions const & options,
- const OUString & propertyhelper,
+ std::u16string_view propertyhelper,
bool serviceobject, bool supportxcomponent)
{
if (options.componenttype == 3)
@@ -52,14 +52,14 @@ static void generateImports(std::ostream & o, ProgramOptions const & options,
o << "import com.sun.star.registry.XRegistryKey;\n";
}
- if (propertyhelper != "_") {
+ if (propertyhelper != u"_") {
if (supportxcomponent)
o << "import com.sun.star.lib.uno.helper.ComponentBase;\n";
else
o << "import com.sun.star.lib.uno.helper.WeakBase;\n";
}
- if (!propertyhelper.isEmpty()) {
- if (propertyhelper == "_") {
+ if (!propertyhelper.empty()) {
+ if (propertyhelper == u"_") {
o << "import com.sun.star.lib.uno.helper.PropertySet;\n";
o << "import com.sun.star.beans.PropertyAttribute;\n";
} else {
diff --git a/unodevtools/source/skeletonmaker/skeletoncommon.cxx b/unodevtools/source/skeletonmaker/skeletoncommon.cxx
index 37041a8be951..21a174b69e1a 100644
--- a/unodevtools/source/skeletonmaker/skeletoncommon.cxx
+++ b/unodevtools/source/skeletonmaker/skeletoncommon.cxx
@@ -237,7 +237,7 @@ void checkType(rtl::Reference< TypeManager > const & manager,
void checkDefaultInterfaces(
std::set< OUString >& interfaces,
const std::set< OUString >& services,
- const OUString & propertyhelper)
+ std::u16string_view propertyhelper)
{
if ( services.empty() ) {
interfaces.erase("com.sun.star.lang.XServiceInfo");
@@ -245,7 +245,7 @@ void checkDefaultInterfaces(
interfaces.insert("com.sun.star.lang.XServiceInfo");
}
- if ( propertyhelper == "_" ) {
+ if ( propertyhelper == u"_" ) {
interfaces.erase("com.sun.star.beans.XPropertySet");
interfaces.erase("com.sun.star.beans.XFastPropertySet");
interfaces.erase("com.sun.star.beans.XPropertyAccess");
diff --git a/unodevtools/source/skeletonmaker/skeletoncommon.hxx b/unodevtools/source/skeletonmaker/skeletoncommon.hxx
index d73152e70167..64c52eb59d65 100644
--- a/unodevtools/source/skeletonmaker/skeletoncommon.hxx
+++ b/unodevtools/source/skeletonmaker/skeletoncommon.hxx
@@ -103,7 +103,7 @@ void checkType(rtl::Reference< TypeManager > const & manager,
void checkDefaultInterfaces(
std::set< OUString >& interfaces,
const std::set< OUString >& services,
- const OUString & propertyhelper);
+ std::u16string_view propertyhelper);
OUString checkPropertyHelper(
ProgramOptions const & options, rtl::Reference< TypeManager > const & manager,
diff --git a/unoidl/source/unoidlprovider.cxx b/unoidl/source/unoidlprovider.cxx
index 4e85ad795825..9450cab33428 100644
--- a/unoidl/source/unoidlprovider.cxx
+++ b/unoidl/source/unoidlprovider.cxx
@@ -166,13 +166,13 @@ struct Memory64 {
}
};
-bool isSimpleType(OUString const & type) {
- return type == "void" || type == "boolean" || type == "byte"
- || type == "short" || type == "unsigned short" || type == "long"
- || type == "unsigned long" || type == "hyper"
- || type == "unsigned hyper" || type == "float" || type == "double"
- || type == "char" || type == "string" || type == "type"
- || type == "any";
+bool isSimpleType(std::u16string_view type) {
+ return type == u"void" || type == u"boolean" || type == u"byte"
+ || type == u"short" || type == u"unsigned short" || type == u"long"
+ || type == u"unsigned long" || type == u"hyper"
+ || type == u"unsigned hyper" || type == u"float" || type == u"double"
+ || type == u"char" || type == u"string" || type == u"type"
+ || type == u"any";
}
// For backwards compatibility, does not strictly check segments to match
diff --git a/unotools/source/config/moduleoptions.cxx b/unotools/source/config/moduleoptions.cxx
index 8082749e998b..317f5261c76d 100644
--- a/unotools/source/config/moduleoptions.cxx
+++ b/unotools/source/config/moduleoptions.cxx
@@ -69,17 +69,17 @@
#define PROPERTYCOUNT 6
-#define FACTORYNAME_WRITER "com.sun.star.text.TextDocument"
-#define FACTORYNAME_WRITERWEB "com.sun.star.text.WebDocument"
-#define FACTORYNAME_WRITERGLOBAL "com.sun.star.text.GlobalDocument"
-#define FACTORYNAME_CALC "com.sun.star.sheet.SpreadsheetDocument"
-#define FACTORYNAME_DRAW "com.sun.star.drawing.DrawingDocument"
-#define FACTORYNAME_IMPRESS "com.sun.star.presentation.PresentationDocument"
-#define FACTORYNAME_MATH "com.sun.star.formula.FormulaProperties"
-#define FACTORYNAME_CHART "com.sun.star.chart2.ChartDocument"
-#define FACTORYNAME_DATABASE "com.sun.star.sdb.OfficeDatabaseDocument"
-#define FACTORYNAME_STARTMODULE "com.sun.star.frame.StartModule"
-#define FACTORYNAME_BASIC "com.sun.star.script.BasicIDE"
+#define FACTORYNAME_WRITER u"com.sun.star.text.TextDocument"
+#define FACTORYNAME_WRITERWEB u"com.sun.star.text.WebDocument"
+#define FACTORYNAME_WRITERGLOBAL u"com.sun.star.text.GlobalDocument"
+#define FACTORYNAME_CALC u"com.sun.star.sheet.SpreadsheetDocument"
+#define FACTORYNAME_DRAW u"com.sun.star.drawing.DrawingDocument"
+#define FACTORYNAME_IMPRESS u"com.sun.star.presentation.PresentationDocument"
+#define FACTORYNAME_MATH u"com.sun.star.formula.FormulaProperties"
+#define FACTORYNAME_CHART u"com.sun.star.chart2.ChartDocument"
+#define FACTORYNAME_DATABASE u"com.sun.star.sdb.OfficeDatabaseDocument"
+#define FACTORYNAME_STARTMODULE u"com.sun.star.frame.StartModule"
+#define FACTORYNAME_BASIC u"com.sun.star.script.BasicIDE"
#define FACTORYCOUNT 11
@@ -255,7 +255,7 @@ class SvtModuleOptions_Impl : public ::utl::ConfigItem
OUString const & GetFactoryDefaultFilter ( SvtModuleOptions::EFactory eFactory ) const;
bool IsDefaultFilterReadonly( SvtModuleOptions::EFactory eFactory ) const;
sal_Int32 GetFactoryIcon ( SvtModuleOptions::EFactory eFactory ) const;
- static bool ClassifyFactoryByName ( const OUString& sName ,
+ static bool ClassifyFactoryByName ( std::u16string_view sName ,
SvtModuleOptions::EFactory& eFactory );
void SetFactoryStandardTemplate( SvtModuleOptions::EFactory eFactory ,
const OUString& sTemplate );
@@ -590,7 +590,7 @@ css::uno::Sequence< OUString > SvtModuleOptions_Impl::impl_ExpandSetNames( const
@onerror We return false.
@threadsafe no
*//*-*************************************************************************************************************/
-bool SvtModuleOptions_Impl::ClassifyFactoryByName( const OUString& sName, SvtModuleOptions::EFactory& eFactory )
+bool SvtModuleOptions_Impl::ClassifyFactoryByName( std::u16string_view sName, SvtModuleOptions::EFactory& eFactory )
{
bool bState;
@@ -838,7 +838,7 @@ sal_Int32 SvtModuleOptions::GetFactoryIcon( EFactory eFactory ) const
return m_pImpl->GetFactoryIcon( eFactory );
}
-bool SvtModuleOptions::ClassifyFactoryByName( const OUString& sName ,
+bool SvtModuleOptions::ClassifyFactoryByName( std::u16string_view sName ,
EFactory& eFactory )
{
// We don't need any mutex here ... because we don't use any member here!
@@ -966,7 +966,7 @@ SvtModuleOptions::EFactory SvtModuleOptions::ClassifyFactoryByShortName(const OU
return EFactory::UNKNOWN_FACTORY;
}
-SvtModuleOptions::EFactory SvtModuleOptions::ClassifyFactoryByServiceName(const OUString& sName)
+SvtModuleOptions::EFactory SvtModuleOptions::ClassifyFactoryByServiceName(std::u16string_view sName)
{
if (sName == FACTORYNAME_WRITERGLOBAL)
return EFactory::WRITERGLOBAL;
diff --git a/unotools/source/config/securityoptions.cxx b/unotools/source/config/securityoptions.cxx
index 6a99a87ca207..5062653413b9 100644
--- a/unotools/source/config/securityoptions.cxx
+++ b/unotools/source/config/securityoptions.cxx
@@ -46,27 +46,27 @@ using namespace ::com::sun::star::uno;
// xmlsec05 deprecated
#define DEFAULT_STAROFFICEBASIC eALWAYS_EXECUTE
-#define PROPERTYNAME_SECUREURL "SecureURL"
-#define PROPERTYNAME_DOCWARN_SAVEORSEND "WarnSaveOrSendDoc"
-#define PROPERTYNAME_DOCWARN_SIGNING "WarnSignDoc"
-#define PROPERTYNAME_DOCWARN_PRINT "WarnPrintDoc"
-#define PROPERTYNAME_DOCWARN_CREATEPDF "WarnCreatePDF"
-#define PROPERTYNAME_DOCWARN_REMOVEPERSONALINFO "RemovePersonalInfoOnSaving"
-#define PROPERTYNAME_DOCWARN_RECOMMENDPASSWORD "RecommendPasswordProtection"
-#define PROPERTYNAME_CTRLCLICK_HYPERLINK "HyperlinksWithCtrlClick"
-#define PROPERTYNAME_BLOCKUNTRUSTEDREFERERLINKS "BlockUntrustedRefererLinks"
-#define PROPERTYNAME_MACRO_SECLEVEL "MacroSecurityLevel"
-#define PROPERTYNAME_MACRO_TRUSTEDAUTHORS "TrustedAuthors"
-#define PROPERTYNAME_MACRO_DISABLE "DisableMacrosExecution"
-#define PROPERTYNAME_TRUSTEDAUTHOR_SUBJECTNAME "SubjectName"
-#define PROPERTYNAME_TRUSTEDAUTHOR_SERIALNUMBER "SerialNumber"
-#define PROPERTYNAME_TRUSTEDAUTHOR_RAWDATA "RawData"
+#define PROPERTYNAME_SECUREURL u"SecureURL"
+#define PROPERTYNAME_DOCWARN_SAVEORSEND u"WarnSaveOrSendDoc"
+#define PROPERTYNAME_DOCWARN_SIGNING u"WarnSignDoc"
+#define PROPERTYNAME_DOCWARN_PRINT u"WarnPrintDoc"
+#define PROPERTYNAME_DOCWARN_CREATEPDF u"WarnCreatePDF"
+#define PROPERTYNAME_DOCWARN_REMOVEPERSONALINFO u"RemovePersonalInfoOnSaving"
+#define PROPERTYNAME_DOCWARN_RECOMMENDPASSWORD u"RecommendPasswordProtection"
+#define PROPERTYNAME_CTRLCLICK_HYPERLINK u"HyperlinksWithCtrlClick"
+#define PROPERTYNAME_BLOCKUNTRUSTEDREFERERLINKS u"BlockUntrustedRefererLinks"
+#define PROPERTYNAME_MACRO_SECLEVEL u"MacroSecurityLevel"
+#define PROPERTYNAME_MACRO_TRUSTEDAUTHORS u"TrustedAuthors"
+#define PROPERTYNAME_MACRO_DISABLE u"DisableMacrosExecution"
+#define PROPERTYNAME_TRUSTEDAUTHOR_SUBJECTNAME u"SubjectName"
+#define PROPERTYNAME_TRUSTEDAUTHOR_SERIALNUMBER u"SerialNumber"
+#define PROPERTYNAME_TRUSTEDAUTHOR_RAWDATA u"RawData"
// xmlsec05 deprecated
-#define PROPERTYNAME_STAROFFICEBASIC "OfficeBasic"
-#define PROPERTYNAME_EXECUTEPLUGINS "ExecutePlugins"
-#define PROPERTYNAME_WARNINGENABLED "Warning"
-#define PROPERTYNAME_CONFIRMATIONENABLED "Confirmation"
+#define PROPERTYNAME_STAROFFICEBASIC u"OfficeBasic"
+#define PROPERTYNAME_EXECUTEPLUGINS u"ExecutePlugins"
+#define PROPERTYNAME_WARNINGENABLED u"Warning"
+#define PROPERTYNAME_CONFIRMATIONENABLED u"Confirmation"
// xmlsec05 deprecated
#define PROPERTYHANDLE_SECUREURL 0
@@ -147,7 +147,7 @@ class SvtSecurityOptions_Impl : public ConfigItem
void SetProperty( sal_Int32 nHandle, const Any& rValue, bool bReadOnly );
void LoadAuthors();
- static sal_Int32 GetHandle( const OUString& rPropertyName );
+ static sal_Int32 GetHandle( std::u16string_view rPropertyName );
bool GetOption( SvtSecurityOptions::EOption eOption, bool*& rpValue, bool*& rpRO );
/*-****************************************************************************************************
@@ -457,7 +457,7 @@ void SvtSecurityOptions_Impl::LoadAuthors()
m_seqTrustedAuthors = comphelper::containerToSequence(v);
}
-sal_Int32 SvtSecurityOptions_Impl::GetHandle( const OUString& rName )
+sal_Int32 SvtSecurityOptions_Impl::GetHandle( std::u16string_view rName )
{
sal_Int32 nHandle;
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index eee5c744d437..a9c72d06f244 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -280,7 +280,7 @@ UUIInteractionHelper::tryOtherInteractionHandler(
namespace
{
- bool lcl_matchesRequest( const Any& i_rRequest, const OUString& i_rTypeName, const OUString& i_rPropagation )
+ bool lcl_matchesRequest( const Any& i_rRequest, const OUString& i_rTypeName, std::u16string_view i_rPropagation )
{
const css::uno::TypeDescription aTypeDesc( i_rTypeName );
const typelib_TypeDescription* pTypeDesc = aTypeDesc.get();
@@ -291,7 +291,7 @@ namespace
}
const css::uno::Type aType( pTypeDesc->pWeakRef );
- const bool bExactMatch = i_rPropagation == "named-only";
+ const bool bExactMatch = i_rPropagation == u"named-only";
if ( bExactMatch )
return i_rRequest.getValueType().equals( aType );
diff --git a/vbahelper/source/vbahelper/vbalineformat.cxx b/vbahelper/source/vbahelper/vbalineformat.cxx
index 6ae69fff2409..0045bd0f7f2c 100644
--- a/vbahelper/source/vbahelper/vbalineformat.cxx
+++ b/vbahelper/source/vbahelper/vbalineformat.cxx
@@ -34,31 +34,31 @@ ScVbaLineFormat::ScVbaLineFormat( const uno::Reference< ov::XHelperInterface >&
}
sal_Int32
-ScVbaLineFormat::convertLineStartEndNameToArrowheadStyle( const OUString& sLineName )
+ScVbaLineFormat::convertLineStartEndNameToArrowheadStyle( std::u16string_view sLineName )
{
sal_Int32 nLineType = office::MsoArrowheadStyle::msoArrowheadNone;
- if ( sLineName == "Small Arrow" || sLineName == "Arrow" || sLineName == "msArrowEnd" || sLineName == "Double Arrow")
+ if ( sLineName == u"Small Arrow" || sLineName == u"Arrow" || sLineName == u"msArrowEnd" || sLineName == u"Double Arrow")
{
// msoArrowheadTriangle
nLineType = office::MsoArrowheadStyle::msoArrowheadTriangle;
}
- else if ( sLineName == "Square 45" || sLineName == "Square" || sLineName == "msArrowDiamondEnd")
+ else if ( sLineName == u"Square 45" || sLineName == u"Square" || sLineName == u"msArrowDiamondEnd")
{
// msoArrowheadDiamond
nLineType = office::MsoArrowheadStyle::msoArrowheadDiamond;
}
- else if (sLineName == "Circle" || sLineName == "msArrowOvalEnd" || sLineName == "Dimension Lines" )
+ else if (sLineName == u"Circle" || sLineName == u"msArrowOvalEnd" || sLineName == u"Dimension Lines" )
{
// msoArrowheadOval
nLineType = office::MsoArrowheadStyle::msoArrowheadOval;
}
- else if ( sLineName == "Arrow concave" || sLineName == "msArrowStealthEnd" )
+ else if ( sLineName == u"Arrow concave" || sLineName == u"msArrowStealthEnd" )
{
// msoArrowheadStealth
nLineType = office::MsoArrowheadStyle::msoArrowheadStealth;
}
- else if ( sLineName == "Rounded short Arrow" || sLineName == "Rounded large Arrow" || sLineName == "Symmetric Arrow"
- || sLineName == "msArrowOpenEnd" || sLineName == "Line Arrow" )
+ else if ( sLineName == u"Rounded short Arrow" || sLineName == u"Rounded large Arrow" || sLineName == u"Symmetric Arrow"
+ || sLineName == u"msArrowOpenEnd" || sLineName == u"Line Arrow" )
{
// msoArrowheadOpen
nLineType = office::MsoArrowheadStyle::msoArrowheadOpen;
diff --git a/vbahelper/source/vbahelper/vbalineformat.hxx b/vbahelper/source/vbahelper/vbalineformat.hxx
index 858fb3e1e99d..c6d3c513efd2 100644
--- a/vbahelper/source/vbahelper/vbalineformat.hxx
+++ b/vbahelper/source/vbahelper/vbalineformat.hxx
@@ -35,7 +35,7 @@ private:
double m_nLineWeight;
virtual OUString getServiceImplName() override;
virtual css::uno::Sequence<OUString> getServiceNames() override;
- static sal_Int32 convertLineStartEndNameToArrowheadStyle( const OUString& sLineName );
+ static sal_Int32 convertLineStartEndNameToArrowheadStyle( std::u16string_view sLineName );
/// @throws css::uno::RuntimeException
static OUString convertArrowheadStyleToLineStartEndName( sal_Int32 nArrowheadStyle );
public:
diff --git a/vcl/inc/implimagetree.hxx b/vcl/inc/implimagetree.hxx
index 3656b66de70f..72cdd02d85cf 100644
--- a/vcl/inc/implimagetree.hxx
+++ b/vcl/inc/implimagetree.hxx
@@ -150,7 +150,7 @@ private:
Must not be cyclic :-) The last theme in the chain returns an empty string.
*/
- static OUString fallbackStyle(const OUString &rStyle);
+ static OUString fallbackStyle(std::u16string_view rStyle);
};
#endif
diff --git a/vcl/source/app/IconThemeInfo.cxx b/vcl/source/app/IconThemeInfo.cxx
index 877b7d570b0a..139181e65a1a 100644
--- a/vcl/source/app/IconThemeInfo.cxx
+++ b/vcl/source/app/IconThemeInfo.cxx
@@ -59,9 +59,9 @@ IconThemeInfo::IconThemeInfo(const OUString& urlToFile)
}
/*static*/ Size
-IconThemeInfo::SizeByThemeName(const OUString& themeName)
+IconThemeInfo::SizeByThemeName(std::u16string_view themeName)
{
- if (themeName == "galaxy") { //kept for compiler because of unused parameter 'themeName'
+ if (themeName == u"galaxy") { //kept for compiler because of unused parameter 'themeName'
return Size( 26, 26 );
}
else {
diff --git a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
index 0144a458e8ce..6f10ec80fc92 100644
--- a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
+++ b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
@@ -95,9 +95,9 @@ int getSettingValueInteger(OString const& rValue, int nDefault)
return rValue.toInt32();
}
-bool getSettingValueBool(OString const& rValue, bool bDefault)
+bool getSettingValueBool(std::string_view rValue, bool bDefault)
{
- if (rValue.isEmpty())
+ if (rValue.empty())
return bDefault;
if (rValue == "true" || rValue == "false")
return rValue == "true";
diff --git a/vcl/source/helper/driverblocklist.cxx b/vcl/source/helper/driverblocklist.cxx
index b946d559c760..3adf57d118a1 100644
--- a/vcl/source/helper/driverblocklist.cxx
+++ b/vcl/source/helper/driverblocklist.cxx
@@ -23,7 +23,7 @@
namespace DriverBlocklist
{
-static OperatingSystem getOperatingSystem(const OString& rString)
+static OperatingSystem getOperatingSystem(std::string_view rString)
{
if (rString == "all")
return DRIVER_OS_ALL;
@@ -54,7 +54,7 @@ static OperatingSystem getOperatingSystem(const OString& rString)
return DRIVER_OS_UNKNOWN;
}
-static VersionComparisonOp getComparison(const OString& rString)
+static VersionComparisonOp getComparison(std::string_view rString)
{
if (rString == "less")
{
diff --git a/vcl/source/image/ImplImageTree.cxx b/vcl/source/image/ImplImageTree.cxx
index 7dc365baf4b7..b7215ac65b97 100644
--- a/vcl/source/image/ImplImageTree.cxx
+++ b/vcl/source/image/ImplImageTree.cxx
@@ -307,15 +307,15 @@ std::shared_ptr<SvMemoryStream> ImplImageTree::getImageStream(OUString const & r
return std::shared_ptr<SvMemoryStream>();
}
-OUString ImplImageTree::fallbackStyle(const OUString& rsStyle)
+OUString ImplImageTree::fallbackStyle(std::u16string_view rsStyle)
{
OUString sResult;
- if (rsStyle == "colibre" || rsStyle == "helpimg")
+ if (rsStyle == u"colibre" || rsStyle == u"helpimg")
sResult = "";
- else if (rsStyle == "sifr" || rsStyle == "breeze_dark")
+ else if (rsStyle == u"sifr" || rsStyle == u"breeze_dark")
sResult = "breeze";
- else if (rsStyle == "sifr_dark" )
+ else if (rsStyle == u"sifr_dark" )
sResult = "breeze_dark";
else
sResult = "colibre";
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 6e752daa88a4..79d4a633bd54 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -84,57 +84,57 @@ static bool toBool(std::string_view rValue)
namespace
{
- OUString mapStockToImageResource(const OUString& sType)
+ OUString mapStockToImageResource(std::u16string_view sType)
{
- if (sType == "gtk-index")
+ if (sType == u"gtk-index")
return SV_RESID_BITMAP_INDEX;
- else if (sType == "gtk-refresh")
+ else if (sType == u"gtk-refresh")
return SV_RESID_BITMAP_REFRESH;
- else if (sType == "gtk-apply")
+ else if (sType == u"gtk-apply")
return IMG_APPLY;
- else if (sType == "gtk-dialog-error")
+ else if (sType == u"gtk-dialog-error")
return IMG_ERROR;
- else if (sType == "gtk-add")
+ else if (sType == u"gtk-add")
return IMG_ADD;
- else if (sType == "gtk-remove")
+ else if (sType == u"gtk-remove")
return IMG_REMOVE;
- else if (sType == "gtk-copy")
+ else if (sType == u"gtk-copy")
return IMG_COPY;
- else if (sType == "gtk-paste")
+ else if (sType == u"gtk-paste")
return IMG_PASTE;
return OUString();
}
- SymbolType mapStockToSymbol(const OUString& sType)
+ SymbolType mapStockToSymbol(std::u16string_view sType)
{
SymbolType eRet = SymbolType::DONTKNOW;
- if (sType == "gtk-media-next")
+ if (sType == u"gtk-media-next")
eRet = SymbolType::NEXT;
- else if (sType == "gtk-media-previous")
+ else if (sType == u"gtk-media-previous")
eRet = SymbolType::PREV;
- else if (sType == "gtk-media-play")
+ else if (sType == u"gtk-media-play")
eRet = SymbolType::PLAY;
- else if (sType == "gtk-media-stop")
+ else if (sType == u"gtk-media-stop")
eRet = SymbolType::STOP;
- else if (sType == "gtk-goto-first")
+ else if (sType == u"gtk-goto-first")
eRet = SymbolType::FIRST;
- else if (sType == "gtk-goto-last")
+ else if (sType == u"gtk-goto-last")
eRet = SymbolType::LAST;
- else if (sType == "gtk-go-back")
+ else if (sType == u"gtk-go-back")
eRet = SymbolType::ARROW_LEFT;
- else if (sType == "gtk-go-forward")
+ else if (sType == u"gtk-go-forward")
eRet = SymbolType::ARROW_RIGHT;
- else if (sType == "gtk-go-up")
+ else if (sType == u"gtk-go-up")
eRet = SymbolType::ARROW_UP;
- else if (sType == "gtk-go-down")
+ else if (sType == u"gtk-go-down")
eRet = SymbolType::ARROW_DOWN;
- else if (sType == "gtk-missing-image")
+ else if (sType == u"gtk-missing-image")
eRet = SymbolType::IMAGE;
- else if (sType == "gtk-help")
+ else if (sType == u"gtk-help")
eRet = SymbolType::HELP;
- else if (sType == "gtk-close")
+ else if (sType == u"gtk-close")
eRet = SymbolType::CLOSE;
- else if (sType == "gtk-new")
+ else if (sType == u"gtk-new")
eRet = SymbolType::PLUS;
else if (!mapStockToImageResource(sType).isEmpty())
eRet = SymbolType::IMAGE;
@@ -3108,7 +3108,7 @@ void VclBuilder::handleRow(xmlreader::XmlReader &reader, const OString &rID)
m_pParserState->m_aModels[rID].m_aEntries.push_back(aRow);
}
-void VclBuilder::handleListStore(xmlreader::XmlReader &reader, const OString &rID, const OString &rClass)
+void VclBuilder::handleListStore(xmlreader::XmlReader &reader, const OString &rID, std::string_view rClass)
{
int nLevel = 1;
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 9773ca2f8b53..a6399d24081d 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -1367,17 +1367,17 @@ void Window::queue_resize(StateChangedType eReason)
namespace
{
- VclAlign toAlign(const OUString &rValue)
+ VclAlign toAlign(std::u16string_view rValue)
{
VclAlign eRet = VclAlign::Fill;
- if (rValue == "fill")
+ if (rValue == u"fill")
eRet = VclAlign::Fill;
- else if (rValue == "start")
+ else if (rValue == u"start")
eRet = VclAlign::Start;
- else if (rValue == "end")
+ else if (rValue == u"end")
eRet = VclAlign::End;
- else if (rValue == "center")
+ else if (rValue == u"center")
eRet = VclAlign::Center;
return eRet;
}
diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx b/vcl/unx/generic/fontmanager/fontmanager.cxx
index e04b31224b9c..b38a2d570afd 100644
--- a/vcl/unx/generic/fontmanager/fontmanager.cxx
+++ b/vcl/unx/generic/fontmanager/fontmanager.cxx
@@ -441,10 +441,10 @@ OUString PrintFontManager::convertSfntName( void* pRecord )
//and erase the "Times New Roman" name
namespace
{
- bool isBadTNR(const OUString &rName, ::std::set< OUString >& rSet)
+ bool isBadTNR(std::u16string_view rName, ::std::set< OUString >& rSet)
{
bool bRet = false;
- if ( rName == "Berling Antiqua" )
+ if ( rName == u"Berling Antiqua" )
{
::std::set< OUString >::iterator aEnd = rSet.end();
::std::set< OUString >::iterator aI = rSet.find("Times New Roman");
diff --git a/writerfilter/source/dmapper/ConversionHelper.cxx b/writerfilter/source/dmapper/ConversionHelper.cxx
index 26e975bb1342..809e85c90372 100644
--- a/writerfilter/source/dmapper/ConversionHelper.cxx
+++ b/writerfilter/source/dmapper/ConversionHelper.cxx
@@ -619,19 +619,19 @@ sal_Int16 ConvertNumberingType(sal_Int32 nFmt)
return nRet;
}
-sal_Int16 ConvertCustomNumberFormat(const OUString& rFormat)
+sal_Int16 ConvertCustomNumberFormat(std::u16string_view rFormat)
{
sal_Int16 nRet = -1;
- if (rFormat == "001, 002, 003, ...")
+ if (rFormat == u"001, 002, 003, ...")
{
nRet = style::NumberingType::ARABIC_ZERO3;
}
- else if (rFormat == "0001, 0002, 0003, ...")
+ else if (rFormat == u"0001, 0002, 0003, ...")
{
nRet = style::NumberingType::ARABIC_ZERO4;
}
- else if (rFormat == "00001, 00002, 00003, ...")
+ else if (rFormat == u"00001, 00002, 00003, ...")
{
nRet = style::NumberingType::ARABIC_ZERO5;
}
diff --git a/writerfilter/source/dmapper/ConversionHelper.hxx b/writerfilter/source/dmapper/ConversionHelper.hxx
index 9f970f668b80..ad0cd615fbec 100644
--- a/writerfilter/source/dmapper/ConversionHelper.hxx
+++ b/writerfilter/source/dmapper/ConversionHelper.hxx
@@ -50,7 +50,7 @@ namespace writerfilter::dmapper::ConversionHelper{
sal_Int16 convertTableJustification( sal_Int32 nIntValue );
css::text::RubyAdjust convertRubyAlign( sal_Int32 nIntValue );
sal_Int16 ConvertNumberingType(sal_Int32 nFmt);
- sal_Int16 ConvertCustomNumberFormat(const OUString& rFormat);
+ sal_Int16 ConvertCustomNumberFormat(std::u16string_view rFormat);
css::util::DateTime ConvertDateStringToDateTime(const OUString& rDateTime);
} // namespace writerfilter::dmapper::ConversionHelper
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index f6e8e454a6a6..ec86b041e216 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -160,15 +160,15 @@ uno::Sequence<beans::PropertyValue> ListLevel::GetProperties(bool bDefaults)
return aLevelProps;
}
-static bool IgnoreForCharStyle(const OUString& aStr, const bool bIsSymbol)
+static bool IgnoreForCharStyle(std::u16string_view aStr, const bool bIsSymbol)
{
//Names found in PropertyIds.cxx, Lines 56-396
- return (aStr=="Adjust" || aStr=="IndentAt" || aStr=="FirstLineIndent"
- || aStr=="FirstLineOffset" || aStr=="LeftMargin"
- || aStr=="CharInteropGrabBag" || aStr=="ParaInteropGrabBag" ||
+ return (aStr==u"Adjust" || aStr==u"IndentAt" || aStr==u"FirstLineIndent"
+ || aStr==u"FirstLineOffset" || aStr==u"LeftMargin"
+ || aStr==u"CharInteropGrabBag" || aStr==u"ParaInteropGrabBag" ||
// We need font names when they are different for the bullet and for the text.
// But leave symbols alone, we only want to keep the font style for letters and numbers.
- (bIsSymbol && aStr=="CharFontName")
+ (bIsSymbol && aStr==u"CharFontName")
);
}
uno::Sequence< beans::PropertyValue > ListLevel::GetCharStyleProperties( )
diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx
index 01af8259ff91..be403b01f4e9 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.cxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.cxx
@@ -190,7 +190,7 @@ void RTFSdrImport::resolveFLine(uno::Reference<beans::XPropertySet> const& xProp
}
void RTFSdrImport::applyProperty(uno::Reference<drawing::XShape> const& xShape,
- const OUString& aKey, const OUString& aValue) const
+ std::u16string_view aKey, const OUString& aValue) const
{
uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY);
sal_Int16 nHoriOrient = 0;
@@ -198,7 +198,7 @@ void RTFSdrImport::applyProperty(uno::Reference<drawing::XShape> const& xShape,
boost::logic::tribool obFitShapeToText(boost::logic::indeterminate);
bool bFilled = true;
- if (aKey == "posh")
+ if (aKey == u"posh")
{
switch (aValue.toInt32())
{
@@ -221,7 +221,7 @@ void RTFSdrImport::applyProperty(uno::Reference<drawing::XShape> const& xShape,
break;
}
}
- else if (aKey == "posv")
+ else if (aKey == u"posv")
{
switch (aValue.toInt32())
{
@@ -238,11 +238,11 @@ void RTFSdrImport::applyProperty(uno::Reference<drawing::XShape> const& xShape,
break;
}
}
- else if (aKey == "fFitShapeToText")
+ else if (aKey == u"fFitShapeToText")
obFitShapeToText = aValue.toInt32() == 1;
- else if (aKey == "fFilled")
+ else if (aKey == u"fFilled")
bFilled = aValue.toInt32() == 1;
- else if (aKey == "rotation")
+ else if (aKey == u"rotation")
{
// See DffPropertyReader::Fix16ToAngle(): in RTF, positive rotation angles are clockwise, we have them as counter-clockwise.
// Additionally, RTF type is 0..360*2^16, our is 0..360*100.
@@ -1133,12 +1133,12 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap
void RTFSdrImport::close() { m_rImport.Mapper().endShape(); }
-void RTFSdrImport::append(const OUString& aKey, const OUString& aValue)
+void RTFSdrImport::append(std::u16string_view aKey, const OUString& aValue)
{
applyProperty(m_xShape, aKey, aValue);
}
-void RTFSdrImport::appendGroupProperty(const OUString& aKey, const OUString& aValue)
+void RTFSdrImport::appendGroupProperty(std::u16string_view aKey, const OUString& aValue)
{
if (m_aParents.empty())
return;
diff --git a/writerfilter/source/rtftok/rtfsdrimport.hxx b/writerfilter/source/rtftok/rtfsdrimport.hxx
index f8d29b68701b..073244b913b1 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.hxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.hxx
@@ -54,9 +54,9 @@ public:
};
void resolve(RTFShape& rShape, bool bClose, ShapeOrPict shapeOrPict);
void close();
- void append(const OUString& aKey, const OUString& aValue);
+ void append(std::u16string_view aKey, const OUString& aValue);
/// Append property on the current parent.
- void appendGroupProperty(const OUString& aKey, const OUString& aValue);
+ void appendGroupProperty(std::u16string_view aKey, const OUString& aValue);
void resolveDhgt(css::uno::Reference<css::beans::XPropertySet> const& xPropertySet,
sal_Int32 nZOrder, bool bOldStyle);
/// Set line color and line width on the shape, using the relevant API depending on if the shape is a text frame or not.
@@ -83,7 +83,7 @@ private:
void createShape(const OUString& rService, css::uno::Reference<css::drawing::XShape>& xShape,
css::uno::Reference<css::beans::XPropertySet>& xPropertySet);
void applyProperty(css::uno::Reference<css::drawing::XShape> const& xShape,
- const OUString& aKey, const OUString& aValue) const;
+ std::u16string_view aKey, const OUString& aValue) const;
int initShape(css::uno::Reference<css::drawing::XShape>& o_xShape,
css::uno::Reference<css::beans::XPropertySet>& o_xPropSet, bool& o_rIsCustomShape,
RTFShape const& rShape, bool bClose, ShapeOrPict shapeOrPict);
diff --git a/writerperfect/source/writer/exp/xmlimp.cxx b/writerperfect/source/writer/exp/xmlimp.cxx
index 5f22f372b9ad..33870c026e78 100644
--- a/writerperfect/source/writer/exp/xmlimp.cxx
+++ b/writerperfect/source/writer/exp/xmlimp.cxx
@@ -451,10 +451,10 @@ const uno::Reference<uno::XComponentContext>& XMLImport::GetComponentContext() c
}
rtl::Reference<XMLImportContext>
-XMLImport::CreateContext(const OUString& rName,
+XMLImport::CreateContext(std::u16string_view rName,
const uno::Reference<xml::sax::XAttributeList>& /*xAttribs*/)
{
- if (rName == "office:document")
+ if (rName == u"office:document")
return new XMLOfficeDocContext(*this);
return nullptr;
}
diff --git a/writerperfect/source/writer/exp/xmlimp.hxx b/writerperfect/source/writer/exp/xmlimp.hxx
index 85cec8506819..7c689d30c65f 100644
--- a/writerperfect/source/writer/exp/xmlimp.hxx
+++ b/writerperfect/source/writer/exp/xmlimp.hxx
@@ -102,7 +102,7 @@ public:
const std::vector<FixedLayoutPage>& rPageMetafiles);
rtl::Reference<XMLImportContext>
- CreateContext(const OUString& rName,
+ CreateContext(std::u16string_view rName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttribs);
librevenge::RVNGTextInterface& GetGenerator() const;
diff --git a/writerperfect/source/writer/exp/xmltext.cxx b/writerperfect/source/writer/exp/xmltext.cxx
index 01e185c4391c..933cf43e1880 100644
--- a/writerperfect/source/writer/exp/xmltext.cxx
+++ b/writerperfect/source/writer/exp/xmltext.cxx
@@ -36,16 +36,16 @@ rtl::Reference<XMLImportContext> XMLBodyContentContext::CreateChildContext(
return CreateTextChildContext(GetImport(), rName, true);
}
-rtl::Reference<XMLImportContext> CreateTextChildContext(XMLImport& rImport, const OUString& rName,
- bool bTopLevel)
+rtl::Reference<XMLImportContext> CreateTextChildContext(XMLImport& rImport,
+ std::u16string_view rName, bool bTopLevel)
{
- if (rName == "text:p" || rName == "text:h")
+ if (rName == u"text:p" || rName == u"text:h")
return new XMLParaContext(rImport, bTopLevel);
- if (rName == "text:section")
+ if (rName == u"text:section")
return new XMLSectionContext(rImport);
- if (rName == "table:table")
+ if (rName == u"table:table")
return new XMLTableContext(rImport, bTopLevel);
- if (rName == "text:list")
+ if (rName == u"text:list")
return new XMLTextListContext(rImport);
return nullptr;
}
diff --git a/writerperfect/source/writer/exp/xmltext.hxx b/writerperfect/source/writer/exp/xmltext.hxx
index 2a7ef2654637..1d91fbbb05fe 100644
--- a/writerperfect/source/writer/exp/xmltext.hxx
+++ b/writerperfect/source/writer/exp/xmltext.hxx
@@ -27,8 +27,8 @@ public:
};
/// Context factory for body text, section, table cell, etc.
-rtl::Reference<XMLImportContext> CreateTextChildContext(XMLImport& rImport, const OUString& rName,
- bool bTopLevel = false);
+rtl::Reference<XMLImportContext>
+CreateTextChildContext(XMLImport& rImport, std::u16string_view rName, bool bTopLevel = false);
} // namespace writerperfect::exp
diff --git a/xmloff/inc/txtflde.hxx b/xmloff/inc/txtflde.hxx
index 1e2d26229529..91d27690bd74 100644
--- a/xmloff/inc/txtflde.hxx
+++ b/xmloff/inc/txtflde.hxx
@@ -201,7 +201,7 @@ public:
static enum ::xmloff::token::XMLTokenEnum MapReferenceSource(sal_Int16 nType);
static enum ::xmloff::token::XMLTokenEnum MapReferenceType(sal_Int16 nType);
static enum ::xmloff::token::XMLTokenEnum MapCountFieldName(FieldIdEnum nToken);
- static enum ::xmloff::token::XMLTokenEnum MapBibliographyFieldName(const OUString& sName);
+ static enum ::xmloff::token::XMLTokenEnum MapBibliographyFieldName(std::u16string_view sName);
static enum ::xmloff::token::XMLTokenEnum MapMeasureKind(sal_Int16 nKind);
static enum ::xmloff::token::XMLTokenEnum MapPageNumberName(const css::uno::Reference< css::beans::XPropertySet> & xPropSet,
sal_Int32& nOffset); /// also adjust page offset
diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx b/xmloff/source/chart/SchXMLAxisContext.cxx
index d395fbae78f2..4447c093c566 100644
--- a/xmloff/source/chart/SchXMLAxisContext.cxx
+++ b/xmloff/source/chart/SchXMLAxisContext.cxx
@@ -671,12 +671,12 @@ Reference< chart2::XAxis > lcl_getAxis( const Reference< chart2::XCoordinateSyst
} // anonymous namespace
void SchXMLAxisContext::CorrectAxisPositions( const Reference< chart2::XChartDocument >& xNewDoc,
- const OUString& rChartTypeServiceName,
- const OUString& rODFVersionOfFile,
+ std::u16string_view rChartTypeServiceName,
+ std::u16string_view rODFVersionOfFile,
bool bAxisPositionAttributeImported )
{
- if( !(rODFVersionOfFile.isEmpty() || rODFVersionOfFile == "1.0" || rODFVersionOfFile == "1.1"
- || ( rODFVersionOfFile == "1.2" && !bAxisPositionAttributeImported )) )
+ if( !(rODFVersionOfFile.empty() || rODFVersionOfFile == u"1.0" || rODFVersionOfFile == u"1.1"
+ || ( rODFVersionOfFile == u"1.2" && !bAxisPositionAttributeImported )) )
return;
try
@@ -702,7 +702,7 @@ void SchXMLAxisContext::CorrectAxisPositions( const Reference< chart2::XChartDoc
if( xMainXAxisProp.is() && xMainYAxisProp.is() )
{
chart2::ScaleData aMainXScale = xMainXAxis->getScaleData();
- if( rChartTypeServiceName == "com.sun.star.chart2.ScatterChartType" )
+ if( rChartTypeServiceName == u"com.sun.star.chart2.ScatterChartType" )
{
xMainYAxisProp->setPropertyValue("CrossoverPosition"
, uno::makeAny( css::chart::ChartAxisPosition_VALUE) );
diff --git a/xmloff/source/chart/SchXMLAxisContext.hxx b/xmloff/source/chart/SchXMLAxisContext.hxx
index 8cb8f78098e9..ab2516a0bffd 100644
--- a/xmloff/source/chart/SchXMLAxisContext.hxx
+++ b/xmloff/source/chart/SchXMLAxisContext.hxx
@@ -49,8 +49,8 @@ public:
const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
static void CorrectAxisPositions( const css::uno::Reference< css::chart2::XChartDocument >& xNewDoc,
- const OUString& rChartTypeServiceName,
- const OUString& rODFVersionOfFile,
+ std::u16string_view rChartTypeServiceName,
+ std::u16string_view rODFVersionOfFile,
bool bAxisPositionAttributeImported );
private:
diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx
index 02c4df000d36..5221ffd67140 100644
--- a/xmloff/source/chart/SchXMLChartContext.cxx
+++ b/xmloff/source/chart/SchXMLChartContext.cxx
@@ -602,11 +602,11 @@ void lcl_swapPointAndSeriesStylesForDonutCharts( ::std::vector< DataRowPointStyl
}
bool lcl_SpecialHandlingForDonutChartNeeded(
- const OUString & rServiceName,
+ std::u16string_view rServiceName,
const SvXMLImport & rImport )
{
bool bResult = false;
- if( rServiceName == "com.sun.star.chart2.DonutChartType" )
+ if( rServiceName == u"com.sun.star.chart2.DonutChartType" )
{
bResult = SchXMLTools::isDocumentGeneratedWithOpenOfficeOlderThan2_3( rImport.GetModel() );
}
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index af1f9e33bd4b..0ae039da9a3e 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -205,7 +205,7 @@ public:
void exportAxis( enum XMLTokenEnum eDimension, enum XMLTokenEnum eAxisName,
const Reference< beans::XPropertySet >& rAxisProps, const Reference< chart2::XAxis >& rChart2Axis,
const OUString& rCategoriesRanges,
- bool bHasTitle, bool bHasMajorGrid, bool bHasMinorGrid, bool bExportContent, OUString sChartType );
+ bool bHasTitle, bool bHasMajorGrid, bool bHasMinorGrid, bool bExportContent, std::u16string_view sChartType );
void exportGrid( const Reference< beans::XPropertySet >& rGridProperties, bool bMajor, bool bExportContent );
void exportDateScale( const Reference< beans::XPropertySet >& rAxisProps );
void exportAxisTitle( const Reference< beans::XPropertySet >& rTitleProps, bool bExportContent );
@@ -2290,7 +2290,7 @@ void SchXMLExportHelper_Impl::exportAxis(
const Reference< chart2::XAxis >& rChart2Axis,
const OUString& rCategoriesRange,
bool bHasTitle, bool bHasMajorGrid, bool bHasMinorGrid,
- bool bExportContent, OUString sChartType )
+ bool bExportContent, std::u16string_view sChartType )
{
std::vector< XMLPropertyState > aPropertyStates;
std::unique_ptr<SvXMLElementExport> pAxis;
@@ -2304,7 +2304,7 @@ void SchXMLExportHelper_Impl::exportAxis(
{
chart2::ScaleData aScaleData(rChart2Axis->getScaleData());
bool bShiftedCatPos = aScaleData.ShiftedCategoryPosition;
- if (sChartType == "com.sun.star.chart.BarDiagram" || sChartType == "com.sun.star.chart.StockDiagram")
+ if (sChartType == u"com.sun.star.chart.BarDiagram" || sChartType == u"com.sun.star.chart.StockDiagram")
{
if (!bShiftedCatPos)
rAxisProps->setPropertyValue("MajorOrigin", uno::makeAny(0.0));
diff --git a/xmloff/source/core/xmlmultiimagehelper.cxx b/xmloff/source/core/xmlmultiimagehelper.cxx
index af03e7bb1361..f48ae6e9a576 100644
--- a/xmloff/source/core/xmlmultiimagehelper.cxx
+++ b/xmloff/source/core/xmlmultiimagehelper.cxx
@@ -37,52 +37,52 @@ namespace
return sMimeType;
}
- sal_uInt32 getQualityIndex(const OUString& rMimeType)
+ sal_uInt32 getQualityIndex(std::u16string_view rMimeType)
{
// pixel formats first
- if (rMimeType == "image/bmp")
+ if (rMimeType == u"image/bmp")
{
return 10;
}
- if (rMimeType == "image/gif")
+ if (rMimeType == u"image/gif")
{
return 20;
}
- if (rMimeType == "image/jpeg")
+ if (rMimeType == u"image/jpeg")
{
return 30;
}
- if (rMimeType == "image/png")
+ if (rMimeType == u"image/png")
{
return 40;
}
// vector formats, prefer always
- if (rMimeType == "image/x-vclgraphic") // MIMETYPE_VCLGRAPHIC
+ if (rMimeType == u"image/x-vclgraphic") // MIMETYPE_VCLGRAPHIC
{
return 990;
}
- if (rMimeType == "image/x-svm")
+ if (rMimeType == u"image/x-svm")
{
return 1000;
}
- if (rMimeType == "image/x-wmf")
+ if (rMimeType == u"image/x-wmf")
{
return 1010;
}
- if (rMimeType == "image/x-emf")
+ if (rMimeType == u"image/x-emf")
{
return 1020;
}
- if (rMimeType == "image/x-eps")
+ if (rMimeType == u"image/x-eps")
{
return 1025;
}
- if (rMimeType == "application/pdf")
+ if (rMimeType == u"application/pdf")
{
return 1030;
}
- if (rMimeType == "image/svg+xml")
+ if (rMimeType == u"image/svg+xml")
{
return 1040;
}
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 15e627ba3953..0d9a171d3848 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -125,14 +125,14 @@ SvXMLEnumMapEntry<drawing::EscapeDirection> const aXML_GlueEscapeDirection_EnumM
{ XML_TOKEN_INVALID, drawing::EscapeDirection(0) }
};
-static bool ImpIsEmptyURL( const OUString& rURL )
+static bool ImpIsEmptyURL( std::u16string_view rURL )
{
- if( rURL.isEmpty() )
+ if( rURL.empty() )
return true;
// #i13140# Also compare against 'toplevel' URLs. which also
// result in empty filename strings.
- if( rURL == "#./" )
+ if( rURL == u"#./" )
return true;
return false;
diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx
index 3a25c4c65027..ee2c51add4bb 100644
--- a/xmloff/source/draw/ximpstyl.cxx
+++ b/xmloff/source/draw/ximpstyl.cxx
@@ -1093,11 +1093,11 @@ void SdXMLStylesContext::ImpSetCellStyles() const
//master page shapes from resizing themselves due to autoheight becoming
//enabled before having autoheight turned off again and getting stuck on that
//autosized height
-static bool canSkipReset(const OUString &rName, const XMLPropStyleContext* pPropStyle,
+static bool canSkipReset(std::u16string_view rName, const XMLPropStyleContext* pPropStyle,
const uno::Reference< beans::XPropertySet > &rPropSet, const rtl::Reference < XMLPropertySetMapper >& rPrMap)
{
bool bCanSkipReset = false;
- if (pPropStyle && rName == "TextAutoGrowHeight")
+ if (pPropStyle && rName == u"TextAutoGrowHeight")
{
bool bOldStyleTextAutoGrowHeight(false);
rPropSet->getPropertyValue("TextAutoGrowHeight") >>= bOldStyleTextAutoGrowHeight;
diff --git a/xmloff/source/text/XMLRedlineExport.cxx b/xmloff/source/text/XMLRedlineExport.cxx
index 43ced7d6e1d8..966a0614a3f9 100644
--- a/xmloff/source/text/XMLRedlineExport.cxx
+++ b/xmloff/source/text/XMLRedlineExport.cxx
@@ -395,17 +395,17 @@ void XMLRedlineExport::ExportChangedRegion(
OUString const & XMLRedlineExport::ConvertTypeName(
- const OUString& sApiName)
+ std::u16string_view sApiName)
{
- if (sApiName == "Delete")
+ if (sApiName == u"Delete")
{
return sDeletion;
}
- else if (sApiName == "Insert")
+ else if (sApiName == u"Insert")
{
return sInsertion;
}
- else if (sApiName == "Format")
+ else if (sApiName == u"Format")
{
return sFormatChange;
}
diff --git a/xmloff/source/text/XMLRedlineExport.hxx b/xmloff/source/text/XMLRedlineExport.hxx
index 3da7d70ddbd8..f67d124e8a17 100644
--- a/xmloff/source/text/XMLRedlineExport.hxx
+++ b/xmloff/source/text/XMLRedlineExport.hxx
@@ -151,7 +151,7 @@ private:
const css::uno::Sequence<css::beans::PropertyValue> & rValues);
/// convert the change type from API to XML names
- OUString const & ConvertTypeName(const OUString& sApiName);
+ OUString const & ConvertTypeName(std::u16string_view sApiName);
/// Get ID string!
static OUString GetRedlineID(
diff --git a/xmloff/source/text/XMLTextMarkImportContext.cxx b/xmloff/source/text/XMLTextMarkImportContext.cxx
index f759c1b6fe8d..ef1fa9556c0a 100644
--- a/xmloff/source/text/XMLTextMarkImportContext.cxx
+++ b/xmloff/source/text/XMLTextMarkImportContext.cxx
@@ -125,14 +125,14 @@ SvXMLEnumMapEntry<lcl_MarkType> const lcl_aMarkTypeMap[] =
};
-static const char *lcl_getFormFieldmarkName(OUString const &name)
+static const sal_Unicode *lcl_getFormFieldmarkName(std::u16string_view name)
{
if (name == ODF_FORMCHECKBOX ||
- name == "msoffice.field.FORMCHECKBOX" ||
- name == "ecma.office-open-xml.field.FORMCHECKBOX")
+ name == u"msoffice.field.FORMCHECKBOX" ||
+ name == u"ecma.office-open-xml.field.FORMCHECKBOX")
return ODF_FORMCHECKBOX;
else if (name == ODF_FORMDROPDOWN ||
- name == "ecma.office-open-xml.field.FORMDROPDOWN")
+ name == u"ecma.office-open-xml.field.FORMDROPDOWN")
return ODF_FORMDROPDOWN;
else
return nullptr;
@@ -279,7 +279,7 @@ void XMLTextMarkImportContext::endFastElement(sal_Int32 )
[[fallthrough]];
case TypeFieldmark:
{
- const char *formFieldmarkName=lcl_getFormFieldmarkName(m_sFieldName);
+ const sal_Unicode *formFieldmarkName=lcl_getFormFieldmarkName(m_sFieldName);
bool bImportAsField = (nTmp==TypeFieldmark && formFieldmarkName!=nullptr); //@TODO handle abbreviation cases...
// export point bookmark
const Reference<XInterface> xContent(
@@ -292,7 +292,7 @@ void XMLTextMarkImportContext::endFastElement(sal_Int32 )
if (xContent.is() && bImportAsField) {
// setup fieldmark...
Reference< css::text::XFormField> xFormField(xContent, UNO_QUERY);
- xFormField->setFieldType(OUString::createFromAscii(formFieldmarkName));
+ xFormField->setFieldType(OUString(formFieldmarkName));
if (xFormField.is() && m_rHelper.hasCurrentFieldCtx()) {
m_rHelper.setCurrentFieldParamsTo(xFormField);
}
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index 2654a23bca7e..effacfd668df 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -3299,131 +3299,131 @@ enum XMLTokenEnum XMLTextFieldExport::MapDocInfoFieldName(
return eElement;
}
-enum XMLTokenEnum XMLTextFieldExport::MapBibliographyFieldName(const OUString& sName)
+enum XMLTokenEnum XMLTextFieldExport::MapBibliographyFieldName(std::u16string_view sName)
{
enum XMLTokenEnum eName = XML_TOKEN_INVALID;
- if( sName == "Identifier" )
+ if( sName == u"Identifier" )
{
eName = XML_IDENTIFIER;
}
- else if( sName == "BibiliographicType" )
+ else if( sName == u"BibiliographicType" )
{
eName = XML_BIBLIOGRAPHY_TYPE;
}
- else if( sName == "Address" )
+ else if( sName == u"Address" )
{
eName = XML_ADDRESS;
}
- else if( sName == "Annote" )
+ else if( sName == u"Annote" )
{
eName = XML_ANNOTE;
}
- else if( sName == "Author" )
+ else if( sName == u"Author" )
{
eName = XML_AUTHOR;
}
- else if( sName == "Booktitle" )
+ else if( sName == u"Booktitle" )
{
eName = XML_BOOKTITLE;
}
- else if( sName == "Chapter" )
+ else if( sName == u"Chapter" )
{
eName = XML_CHAPTER;
}
- else if( sName == "Edition" )
+ else if( sName == u"Edition" )
{
eName = XML_EDITION;
}
- else if( sName == "Editor" )
+ else if( sName == u"Editor" )
{
eName = XML_EDITOR;
}
- else if( sName == "Howpublished" )
+ else if( sName == u"Howpublished" )
{
eName = XML_HOWPUBLISHED;
}
- else if( sName == "Institution" )
+ else if( sName == u"Institution" )
{
eName = XML_INSTITUTION;
}
- else if( sName == "Journal" )
+ else if( sName == u"Journal" )
{
eName = XML_JOURNAL;
}
- else if( sName =="Month" )
+ else if( sName == u"Month" )
{
eName = XML_MONTH;
}
- else if( sName == "Note" )
+ else if( sName == u"Note" )
{
eName = XML_NOTE;
}
- else if( sName == "Number" )
+ else if( sName == u"Number" )
{
eName = XML_NUMBER;
}
- else if( sName == "Organizations" )
+ else if( sName == u"Organizations" )
{
eName = XML_ORGANIZATIONS;
}
- else if( sName == "Pages" )
+ else if( sName == u"Pages" )
{
eName = XML_PAGES;
}
- else if( sName == "Publisher" )
+ else if( sName == u"Publisher" )
{
eName = XML_PUBLISHER;
}
- else if( sName == "School" )
+ else if( sName == u"School" )
{
eName = XML_SCHOOL;
}
- else if( sName == "Series" )
+ else if( sName == u"Series" )
{
eName = XML_SERIES;
}
- else if( sName == "Title" )
+ else if( sName == u"Title" )
{
eName = XML_TITLE;
}
- else if( sName == "Report_Type" )
+ else if( sName == u"Report_Type" )
{
eName = XML_REPORT_TYPE;
}
- else if( sName == "Volume" )
+ else if( sName == u"Volume" )
{
eName = XML_VOLUME;
}
- else if( sName == "Year" )
+ else if( sName == u"Year" )
{
eName = XML_YEAR;
}
- else if( sName == "URL" )
+ else if( sName == u"URL" )
{
eName = XML_URL;
}
- else if( sName == "Custom1" )
+ else if( sName == u"Custom1" )
{
eName = XML_CUSTOM1;
}
- else if( sName == "Custom2" )
+ else if( sName == u"Custom2" )
{
eName = XML_CUSTOM2;
}
- else if( sName == "Custom3" )
+ else if( sName == u"Custom3" )
{
eName = XML_CUSTOM3;
}
- else if( sName == "Custom4" )
+ else if( sName == u"Custom4" )
{
eName = XML_CUSTOM4;
}
- else if( sName == "Custom5" )
+ else if( sName == u"Custom5" )
{
eName = XML_CUSTOM5;
}
- else if( sName == "ISBN" )
+ else if( sName == u"ISBN" )
{
eName = XML_ISBN;
}
diff --git a/xmlscript/source/xmldlg_imexp/imp_share.hxx b/xmlscript/source/xmldlg_imexp/imp_share.hxx
index 79ae41e4af0b..82fdfc9a879e 100644
--- a/xmlscript/source/xmldlg_imexp/imp_share.hxx
+++ b/xmlscript/source/xmldlg_imexp/imp_share.hxx
@@ -124,10 +124,10 @@ public:
sal_Int32 XMLNS_DIALOGS_UID, XMLNS_SCRIPT_UID;
bool isEventElement(
- sal_Int32 nUid, OUString const & rLocalName ) const
+ sal_Int32 nUid, std::u16string_view rLocalName ) const
{
- return ((XMLNS_SCRIPT_UID == nUid && (rLocalName == "event" || rLocalName == "listener-event" )) ||
- (XMLNS_DIALOGS_UID == nUid && rLocalName == "event" ));
+ return ((XMLNS_SCRIPT_UID == nUid && (rLocalName == u"event" || rLocalName == u"listener-event" )) ||
+ (XMLNS_DIALOGS_UID == nUid && rLocalName == u"event" ));
}
void addStyle(