avmedia/source/framework/MediaControlBase.cxx | 2 basic/source/inc/runtime.hxx | 2 basic/source/runtime/dllmgr-none.cxx | 10 basic/source/runtime/dllmgr-x64.cxx | 2 basic/source/runtime/dllmgr-x86.cxx | 2 basic/source/runtime/dllmgr.hxx | 2 basic/source/runtime/runtime.cxx | 4 canvas/inc/parametricpolypolygon.hxx | 2 canvas/source/tools/parametricpolypolygon.cxx | 16 - chart2/source/controller/main/ChartController.cxx | 98 ++++---- chart2/source/controller/main/ChartController_Properties.cxx | 8 chart2/source/controller/sidebar/ChartColorWrapper.cxx | 6 chart2/source/controller/sidebar/ChartColorWrapper.hxx | 2 chart2/source/inc/InternalDataProvider.hxx | 2 chart2/source/inc/RegressionCurveHelper.hxx | 4 chart2/source/tools/InternalDataProvider.cxx | 14 - chart2/source/tools/RegressionCurveHelper.cxx | 30 +- chart2/source/view/inc/VDataSeries.hxx | 2 chart2/source/view/main/VDataSeries.cxx | 20 - comphelper/qa/unit/test_hash.cxx | 2 comphelper/source/misc/docpasswordhelper.cxx | 14 - compilerplugins/clang/stringviewparam.cxx | 15 + compilerplugins/clang/test/stringviewparam.cxx | 10 configmgr/source/components.cxx | 4 configmgr/source/components.hxx | 2 connectivity/source/drivers/firebird/Util.cxx | 6 connectivity/source/drivers/mork/MConnection.hxx | 2 cui/source/customize/SvxConfigPageHelper.cxx | 28 +- cui/source/customize/SvxNotebookbarConfigPage.cxx | 28 +- cui/source/customize/cfg.cxx | 4 cui/source/inc/SvxConfigPageHelper.hxx | 2 cui/source/inc/cfg.hxx | 4 cui/source/options/optlingu.cxx | 8 cui/source/options/treeopt.cxx | 16 - dbaccess/source/filter/hsqldb/createparser.cxx | 44 +-- desktop/source/deployment/manager/dp_extensionmanager.cxx | 12 desktop/source/deployment/manager/dp_extensionmanager.hxx | 2 desktop/source/deployment/misc/dp_misc.cxx | 8 desktop/source/deployment/misc/dp_platform.cxx | 82 +++--- desktop/source/lib/init.cxx | 4 desktop/source/migration/migration.cxx | 28 +- desktop/source/migration/migration_impl.hxx | 4 filter/source/storagefilterdetect/filterdetect.cxx | 54 ++-- forms/source/component/ImageControl.cxx | 4 fpicker/source/office/fileview.cxx | 4 framework/inc/targets.h | 12 framework/inc/uielement/statusbarmerger.hxx | 2 framework/inc/xml/acceleratorconfigurationreader.hxx | 4 framework/source/inc/loadenv/targethelper.hxx | 2 framework/source/loadenv/targethelper.cxx | 2 framework/source/uielement/statusbarmerger.cxx | 8 framework/source/uielement/styletoolbarcontroller.cxx | 18 - framework/source/xml/acceleratorconfigurationreader.cxx | 20 - i18nlangtag/qa/cppunit/test_languagetag.cxx | 122 +++++----- i18npool/inc/numberformatcode.hxx | 4 i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx | 4 i18npool/source/localedata/LocaleNode.hxx | 2 i18npool/source/localedata/filewriter.cxx | 4 i18npool/source/numberformatcode/numberformatcode.cxx | 26 +- include/avmedia/MediaControlBase.hxx | 2 include/comphelper/docpasswordhelper.hxx | 6 include/editeng/unoprnms.hxx | 16 - include/linguistic/misc.hxx | 8 include/oox/core/filterdetect.hxx | 2 include/oox/drawingml/color.hxx | 2 include/oox/dump/dumperbase.hxx | 4 include/oox/export/drawingml.hxx | 2 include/oox/helper/attributelist.hxx | 2 include/oox/ppt/slidetransition.hxx | 2 include/sfx2/charwin.hxx | 2 include/sfx2/infobar.hxx | 2 include/sfx2/lokhelper.hxx | 2 include/sfx2/templatedlglocalview.hxx | 2 include/sfx2/templatelocalview.hxx | 4 include/svx/SvxPresetListBox.hxx | 2 include/svx/charmap.hxx | 2 include/svx/imapdlg.hxx | 2 include/unotools/moduleoptions.hxx | 4 include/vcl/IconThemeInfo.hxx | 2 include/vcl/builder.hxx | 2 include/xmloff/odffields.hxx | 4 jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx | 4 linguistic/source/convdicxml.cxx | 6 linguistic/source/lngsvcmgr.cxx | 6 linguistic/source/lngsvcmgr.hxx | 2 oox/source/core/filterdetect.cxx | 32 +- oox/source/crypto/AgileEngine.cxx | 10 oox/source/drawingml/chart/seriesconverter.cxx | 14 - oox/source/drawingml/color.cxx | 58 ++-- oox/source/dump/dumperbase.cxx | 36 +- oox/source/export/chartexport.cxx | 42 +-- oox/source/export/drawingml.cxx | 20 - oox/source/helper/attributelist.cxx | 4 oox/source/ppt/slidetransition.cxx | 4 reportdesign/inc/strings.hxx | 4 reportdesign/source/core/sdr/formatnormalizer.cxx | 8 reportdesign/source/core/sdr/formatnormalizer.hxx | 4 reportdesign/source/ui/dlg/Condition.cxx | 2 reportdesign/source/ui/dlg/Condition.hxx | 2 reportdesign/source/ui/dlg/Navigator.cxx | 2 reportdesign/source/ui/inc/ReportController.hxx | 2 reportdesign/source/ui/report/ReportController.cxx | 2 sax/qa/cppunit/xmlimport.cxx | 10 sc/inc/styleuno.hxx | 2 sc/inc/tabprotection.hxx | 2 sc/source/core/data/tabprotection.cxx | 10 sc/source/core/inc/addinhelpid.hxx | 4 sc/source/core/tool/addinhelpid.cxx | 8 sc/source/filter/html/htmlexp.cxx | 6 sc/source/filter/inc/htmlexp.hxx | 2 sc/source/filter/lotus/lotform.cxx | 4 sc/source/filter/xml/XMLTableShapeImportHelper.cxx | 4 sc/source/filter/xml/XMLTableShapeImportHelper.hxx | 2 sc/source/filter/xml/xmlcondformat.cxx | 16 - sc/source/ui/unoobj/styleuno.cxx | 6 sc/source/ui/vba/vbaworkbooks.cxx | 4 sc/source/ui/vba/vbaworkbooks.hxx | 2 sd/source/core/CustomAnimationEffect.cxx | 4 sd/source/filter/eppt/pptexanimations.cxx | 40 +-- sd/source/filter/eppt/pptexanimations.hxx | 2 sd/source/ui/animations/CustomAnimationPane.cxx | 40 +-- sd/source/ui/annotations/annotationmanager.cxx | 2 sd/source/ui/func/fuconbez.cxx | 8 sd/source/ui/func/fuconrec.cxx | 8 sd/source/ui/slideshow/slideshowimpl.cxx | 28 +- sd/source/ui/slideshow/slideshowimpl.hxx | 2 sdext/source/presenter/PresenterBitmapContainer.cxx | 8 sdext/source/presenter/PresenterBitmapContainer.hxx | 2 sdext/source/presenter/PresenterTheme.cxx | 6 sfx2/inc/recentdocsview.hxx | 2 sfx2/source/appl/newhelp.cxx | 6 sfx2/source/appl/newhelp.hxx | 6 sfx2/source/control/charwin.cxx | 2 sfx2/source/control/recentdocsview.cxx | 18 - sfx2/source/control/templatedlglocalview.cxx | 2 sfx2/source/control/templatelocalview.cxx | 20 - sfx2/source/control/templatesearchview.cxx | 2 sfx2/source/dialog/filedlghelper.cxx | 20 - sfx2/source/dialog/infobar.cxx | 14 - sfx2/source/doc/doctemplates.cxx | 6 sfx2/source/doc/sfxmodelfactory.cxx | 4 sfx2/source/inc/sfxurlrelocator.hxx | 2 sfx2/source/inc/templatesearchview.hxx | 2 sfx2/source/sidebar/SidebarController.cxx | 16 - sfx2/source/view/lokhelper.cxx | 8 slideshow/source/engine/shapes/shapeimporter.cxx | 14 - slideshow/source/inc/shapeimporter.hxx | 4 svtools/source/filter/exportdialog.cxx | 20 - svx/inc/galbrws2.hxx | 2 svx/source/dialog/ClassificationDialog.cxx | 2 svx/source/dialog/_contdlg.cxx | 4 svx/source/dialog/charmap.cxx | 2 svx/source/dialog/contimp.hxx | 4 svx/source/dialog/imapdlg.cxx | 2 svx/source/form/datanavi.cxx | 4 svx/source/gallery2/galbrws1.cxx | 2 svx/source/gallery2/galbrws1.hxx | 2 svx/source/gallery2/galbrws2.cxx | 2 svx/source/inc/datanavi.hxx | 4 svx/source/sidebar/line/LinePropertyPanelBase.cxx | 4 svx/source/stbctrls/pszctrl.cxx | 4 svx/source/stbctrls/selctrl.cxx | 4 svx/source/tbxctrls/SvxPresetListBox.cxx | 2 svx/source/xoutdev/xattr.cxx | 14 - sw/inc/textboxhelper.hxx | 2 sw/inc/unocrsrhelper.hxx | 6 sw/inc/unoprnms.hxx | 2 sw/inc/unotextrange.hxx | 2 sw/qa/extras/uiwriter/uiwriter.cxx | 6 sw/source/core/crsr/bookmrk.cxx | 2 sw/source/core/doc/textboxhelper.cxx | 4 sw/source/core/fields/reffld.cxx | 10 sw/source/core/inc/bookmrk.hxx | 2 sw/source/core/inc/unoport.hxx | 2 sw/source/core/unocore/unocrsrhelper.cxx | 24 - sw/source/core/unocore/unofield.cxx | 10 sw/source/core/unocore/unoparagraph.cxx | 8 sw/source/core/unocore/unoredline.cxx | 20 - sw/source/core/unocore/unosect.cxx | 4 sw/source/core/unocore/unostyle.cxx | 4 sw/source/core/unocore/unotbl.cxx | 2 sw/source/filter/html/css1atr.cxx | 14 - sw/source/filter/html/htmlatr.cxx | 4 sw/source/filter/html/wrthtml.hxx | 12 sw/source/filter/ww8/docxattributeoutput.cxx | 4 sw/source/filter/ww8/ww8par5.cxx | 8 sw/source/uibase/docvw/HeaderFooterWin.cxx | 2 sw/source/uibase/inc/HeaderFooterWin.hxx | 2 sw/source/uibase/inc/conttree.hxx | 8 sw/source/uibase/utlui/content.cxx | 2 sw/source/uibase/utlui/glbltree.cxx | 6 ucb/source/ucp/hierarchy/hierarchydatasource.cxx | 6 ucb/source/ucp/hierarchy/hierarchydatasource.hxx | 2 ucb/source/ucp/tdoc/tdoc_content.cxx | 2 ucb/source/ucp/tdoc/tdoc_provider.hxx | 8 ucb/source/ucp/webdav-neon/DateTimeHelper.cxx | 26 +- ucb/source/ucp/webdav-neon/DateTimeHelper.hxx | 2 unodevtools/source/skeletonmaker/javacompskeleton.cxx | 8 unodevtools/source/skeletonmaker/skeletoncommon.cxx | 4 unodevtools/source/skeletonmaker/skeletoncommon.hxx | 2 unoidl/source/unoidlprovider.cxx | 14 - unotools/source/config/moduleoptions.cxx | 30 +- unotools/source/config/securityoptions.cxx | 42 +-- uui/source/iahndl.cxx | 4 vbahelper/source/vbahelper/vbalineformat.cxx | 14 - vbahelper/source/vbahelper/vbalineformat.hxx | 2 vcl/inc/implimagetree.hxx | 2 vcl/source/app/IconThemeInfo.cxx | 4 vcl/source/gdi/FileDefinitionWidgetDraw.cxx | 4 vcl/source/helper/driverblocklist.cxx | 4 vcl/source/image/ImplImageTree.cxx | 8 vcl/source/window/builder.cxx | 50 ++-- vcl/source/window/window2.cxx | 10 vcl/unx/generic/fontmanager/fontmanager.cxx | 4 writerfilter/source/dmapper/ConversionHelper.cxx | 8 writerfilter/source/dmapper/ConversionHelper.hxx | 2 writerfilter/source/dmapper/NumberingManager.cxx | 10 writerfilter/source/rtftok/rtfsdrimport.cxx | 16 - writerfilter/source/rtftok/rtfsdrimport.hxx | 6 writerperfect/source/writer/exp/xmlimp.cxx | 4 writerperfect/source/writer/exp/xmlimp.hxx | 2 writerperfect/source/writer/exp/xmltext.cxx | 12 writerperfect/source/writer/exp/xmltext.hxx | 4 xmloff/inc/txtflde.hxx | 2 xmloff/source/chart/SchXMLAxisContext.cxx | 10 xmloff/source/chart/SchXMLAxisContext.hxx | 4 xmloff/source/chart/SchXMLChartContext.cxx | 4 xmloff/source/chart/SchXMLExport.cxx | 6 xmloff/source/core/xmlmultiimagehelper.cxx | 24 - xmloff/source/draw/ximpshap.cxx | 6 xmloff/source/draw/ximpstyl.cxx | 4 xmloff/source/text/XMLRedlineExport.cxx | 8 xmloff/source/text/XMLRedlineExport.hxx | 2 xmloff/source/text/XMLTextMarkImportContext.cxx | 12 xmloff/source/text/txtflde.cxx | 64 ++--- xmlscript/source/xmldlg_imexp/imp_share.hxx | 6 236 files changed, 1154 insertions(+), 1133 deletions(-)
New commits: commit 8332d6d8200e8ca1f22dd98d9373efd5a431d09c Author: Noel <noelgran...@gmail.com> AuthorDate: Wed Nov 25 08:14:07 2020 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Mon Nov 30 12:32:14 2020 +0100 loplugin:stringviewparam include comparisons with string literals Change-Id: I8ba1214500dddaf413c506a4b82f43d63cda804b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> 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" ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits