UnoControls/source/controls/progressmonitor.cxx | 2 UnoControls/source/inc/progressmonitor.hxx | 2 accessibility/inc/standard/vclxaccessiblelist.hxx | 2 accessibility/source/standard/vclxaccessiblelist.cxx | 2 basctl/source/basicide/basides1.cxx | 4 basctl/source/basicide/basidesh.cxx | 2 basctl/source/basicide/bastype2.cxx | 4 basctl/source/basicide/bastypes.cxx | 4 basctl/source/basicide/scriptdocument.cxx | 4 basctl/source/inc/basidesh.hxx | 4 basctl/source/inc/bastype2.hxx | 4 basctl/source/inc/bastypes.hxx | 2 basctl/source/inc/scriptdocument.hxx | 2 binaryurp/source/bridge.cxx | 2 binaryurp/source/bridge.hxx | 2 chart2/qa/extras/PivotChartTest.cxx | 126 +++++----- chart2/qa/extras/chart2dump/chart2dump.cxx | 6 chart2/qa/extras/chart2import.cxx | 4 chart2/qa/extras/charttest.hxx | 2 chart2/source/model/template/DataInterpreter.cxx | 6 chart2/source/model/template/DataInterpreter.hxx | 2 chart2/source/view/axes/VCartesianAxis.cxx | 4 chart2/source/view/axes/VPolarAngleAxis.cxx | 2 chart2/source/view/inc/PropertyMapper.hxx | 2 chart2/source/view/main/LabelPositionHelper.cxx | 10 chart2/source/view/main/PropertyMapper.cxx | 2 chart2/source/view/main/VLegend.cxx | 2 chart2/source/view/main/VLegendSymbolFactory.cxx | 2 comphelper/source/misc/mimeconfighelper.cxx | 8 compilerplugins/clang/stringviewparam.cxx | 42 ++- compilerplugins/clang/test/stringviewparam.cxx | 5 connectivity/source/cpool/ZPoolCollection.cxx | 2 connectivity/source/cpool/ZPoolCollection.hxx | 2 connectivity/source/drivers/dbase/DTable.cxx | 2 connectivity/source/drivers/mysqlc/mysqlc_services.cxx | 2 connectivity/source/inc/dbase/DTable.hxx | 2 connectivity/source/parse/sqliterator.cxx | 2 cppu/source/uno/lbenv.cxx | 8 cui/source/customize/SvxNotebookbarConfigPage.cxx | 6 cui/source/customize/cfgutil.cxx | 2 cui/source/dialogs/hlinettp.cxx | 2 cui/source/dialogs/hlmailtp.cxx | 4 cui/source/dialogs/hlmarkwn.cxx | 4 cui/source/dialogs/scriptdlg.cxx | 6 cui/source/inc/cfgutil.hxx | 2 cui/source/inc/cuitabarea.hxx | 10 cui/source/inc/hlinettp.hxx | 2 cui/source/inc/hlmailtp.hxx | 4 cui/source/inc/hlmarkwn.hxx | 4 cui/source/inc/optdict.hxx | 2 cui/source/inc/scriptdlg.hxx | 6 cui/source/inc/treeopt.hxx | 8 cui/source/options/fontsubs.cxx | 4 cui/source/options/optdict.cxx | 2 cui/source/options/optjava.cxx | 2 cui/source/options/optjava.hxx | 2 cui/source/options/optlingu.cxx | 14 - cui/source/options/treeopt.cxx | 50 +-- cui/source/tabpages/autocdlg.cxx | 2 cui/source/tabpages/tpbitmap.cxx | 2 cui/source/tabpages/tpcolor.cxx | 2 cui/source/tabpages/tpgradnt.cxx | 2 cui/source/tabpages/tphatch.cxx | 2 cui/source/tabpages/tppattern.cxx | 2 dbaccess/source/core/api/KeySet.cxx | 16 - dbaccess/source/core/api/KeySet.hxx | 4 dbaccess/source/core/api/OptimisticSet.cxx | 2 dbaccess/source/core/api/OptimisticSet.hxx | 2 dbaccess/source/core/dataaccess/databaseregistrations.cxx | 4 dbaccess/source/core/misc/dsntypes.cxx | 4 dbaccess/source/inc/dsntypes.hxx | 2 dbaccess/source/ui/app/subcomponentmanager.cxx | 4 dbaccess/source/ui/app/subcomponentmanager.hxx | 2 dbaccess/source/ui/browser/unodatbr.cxx | 4 dbaccess/source/ui/control/FieldDescControl.cxx | 2 dbaccess/source/ui/control/dbtreelistbox.cxx | 2 dbaccess/source/ui/dlg/dbfindex.cxx | 4 dbaccess/source/ui/dlg/dbfindex.hxx | 4 dbaccess/source/ui/dlg/queryfilter.cxx | 4 dbaccess/source/ui/inc/FieldDescControl.hxx | 2 dbaccess/source/ui/inc/QueryDesignView.hxx | 4 dbaccess/source/ui/inc/TableCopyHelper.hxx | 12 dbaccess/source/ui/inc/WColumnSelect.hxx | 2 dbaccess/source/ui/inc/dbtreelistbox.hxx | 2 dbaccess/source/ui/inc/queryfilter.hxx | 4 dbaccess/source/ui/inc/unodatbr.hxx | 4 dbaccess/source/ui/misc/TableCopyHelper.cxx | 12 dbaccess/source/ui/misc/WColumnSelect.cxx | 2 dbaccess/source/ui/querydesign/QueryDesignView.cxx | 6 dbaccess/source/ui/querydesign/QueryTableView.cxx | 2 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | 14 - dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx | 10 dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx | 2 desktop/source/deployment/inc/dp_descriptioninfoset.hxx | 2 desktop/source/deployment/manager/dp_extensionmanager.cxx | 8 desktop/source/deployment/manager/dp_extensionmanager.hxx | 2 desktop/source/deployment/manager/dp_informationprovider.cxx | 4 desktop/source/deployment/misc/dp_descriptioninfoset.cxx | 2 desktop/source/deployment/misc/dp_platform.cxx | 80 +++--- desktop/source/deployment/registry/script/dp_script.cxx | 2 desktop/source/lib/init.cxx | 6 desktop/source/migration/migration.cxx | 6 desktop/source/migration/migration_impl.hxx | 6 desktop/source/pkgchk/unopkg/unopkg_app.cxx | 2 editeng/qa/unit/core-test.cxx | 30 +- editeng/source/editeng/editobj.cxx | 10 editeng/source/editeng/editobj2.hxx | 6 editeng/source/editeng/eertfpar.cxx | 2 editeng/source/editeng/eertfpar.hxx | 2 editeng/source/outliner/outlobj.cxx | 4 embeddedobj/source/commonembedding/persistence.cxx | 6 extensions/source/bibliography/datman.cxx | 2 extensions/source/propctrlr/browserlistbox.cxx | 2 extensions/source/propctrlr/browserlistbox.hxx | 2 extensions/source/propctrlr/cellbindinghelper.cxx | 2 filter/source/xsltdialog/xmlfiltercommon.hxx | 2 filter/source/xsltdialog/xmlfiltersettingsdialog.cxx | 2 forms/source/inc/frm_strings.hxx | 4 forms/source/richtext/richtextmodel.cxx | 2 forms/source/xforms/model_helper.hxx | 2 forms/source/xforms/model_ui.cxx | 10 fpicker/source/office/fileview.cxx | 8 framework/inc/jobs/helponstartup.hxx | 2 framework/inc/targets.h | 2 framework/inc/uielement/menubarmerger.hxx | 2 framework/inc/uielement/statusbarmerger.hxx | 2 framework/inc/uielement/toolbarmerger.hxx | 2 framework/source/classes/framecontainer.cxx | 2 framework/source/fwe/classes/addonmenu.cxx | 6 framework/source/jobs/helponstartup.cxx | 4 framework/source/layoutmanager/toolbarlayoutmanager.cxx | 44 +-- framework/source/layoutmanager/toolbarlayoutmanager.hxx | 44 +-- framework/source/uiconfiguration/ImageList.cxx | 4 framework/source/uiconfiguration/ImageList.hxx | 2 framework/source/uielement/menubarmerger.cxx | 2 framework/source/uielement/statusbarmerger.cxx | 2 framework/source/uielement/toolbarmerger.cxx | 2 i18npool/inc/collatorImpl.hxx | 2 include/comphelper/mimeconfighelper.hxx | 4 include/connectivity/sqliterator.hxx | 2 include/editeng/editobj.hxx | 4 include/editeng/outlobj.hxx | 4 include/framework/framecontainer.hxx | 2 include/oox/crypto/StrongEncryptionDataSpace.hxx | 2 include/oox/export/drawingml.hxx | 2 include/sfx2/StyleManager.hxx | 2 include/sfx2/classificationhelper.hxx | 2 include/sfx2/docfac.hxx | 2 include/sfx2/doctempl.hxx | 2 include/sfx2/fcontnr.hxx | 2 include/sfx2/infobar.hxx | 4 include/sfx2/objsh.hxx | 2 include/sfx2/sidebar/Deck.hxx | 2 include/sfx2/sidebar/Panel.hxx | 2 include/sfx2/sidebar/ResourceManager.hxx | 14 - include/sfx2/sidebar/Sidebar.hxx | 8 include/sfx2/sidebar/SidebarController.hxx | 18 - include/sfx2/sidebar/TabBar.hxx | 2 include/sfx2/templatedlg.hxx | 2 include/sfx2/templatedlglocalview.hxx | 2 include/sfx2/templatelocalview.hxx | 8 include/sfx2/viewfrm.hxx | 6 include/sot/stg.hxx | 2 include/svl/style.hxx | 2 include/svl/zforlist.hxx | 18 - include/svtools/inettbc.hxx | 2 include/svtools/insdlg.hxx | 2 include/svtools/langtab.hxx | 2 include/svx/ClassificationCommon.hxx | 2 include/svx/ColorSets.hxx | 2 include/svx/ctredlin.hxx | 4 include/svx/gallery.hxx | 14 - include/svx/gallery1.hxx | 8 include/svx/gallerybinaryengineentry.hxx | 2 include/svx/numfmtsh.hxx | 8 include/svx/xtable.hxx | 2 include/test/xmltesttools.hxx | 4 include/unotools/compatibility.hxx | 2 include/unotools/lingucfg.hxx | 2 include/vcl/toolkit/combobox.hxx | 2 include/vcl/toolkit/lstbox.hxx | 4 include/xmloff/odffields.hxx | 2 include/xmloff/table/XMLTableExport.hxx | 2 include/xmloff/xmlprmap.hxx | 4 linguistic/source/convdic.cxx | 4 linguistic/source/convdic.hxx | 4 linguistic/source/convdiclist.cxx | 12 linguistic/source/spelldsp.cxx | 4 linguistic/source/spelldta.cxx | 2 lotuswordpro/inc/lwpfoundry.hxx | 2 lotuswordpro/inc/xfilter/xfstylecont.hxx | 2 lotuswordpro/inc/xfilter/xfstylemanager.hxx | 6 lotuswordpro/source/filter/lwpdoc.cxx | 2 lotuswordpro/source/filter/lwpfoundry.cxx | 2 lotuswordpro/source/filter/lwpfribmark.cxx | 2 lotuswordpro/source/filter/lwpmarker.cxx | 2 lotuswordpro/source/filter/lwpmarker.hxx | 2 lotuswordpro/source/filter/lwpproplist.cxx | 6 lotuswordpro/source/filter/lwpproplist.hxx | 6 lotuswordpro/source/filter/xfilter/xfstylecont.cxx | 2 lotuswordpro/source/filter/xfilter/xfstylemanager.cxx | 6 oox/inc/drawingml/customshapeproperties.hxx | 2 oox/source/crypto/StrongEncryptionDataSpace.cxx | 4 oox/source/drawingml/customshapeproperties.cxx | 2 oox/source/drawingml/diagram/datamodel.cxx | 2 oox/source/drawingml/diagram/diagramlayoutatoms.cxx | 4 oox/source/export/drawingml.cxx | 6 opencl/source/openclwrapper.cxx | 2 sax/qa/cppunit/xmlimport.cxx | 8 sc/inc/ChartTools.hxx | 4 sc/inc/afmtuno.hxx | 2 sc/inc/arealink.hxx | 4 sc/inc/conditio.hxx | 4 sc/inc/docpool.hxx | 2 sc/inc/document.hxx | 28 +- sc/inc/documentlinkmgr.hxx | 2 sc/inc/docuno.hxx | 4 sc/inc/dpcache.hxx | 2 sc/inc/dpgroup.hxx | 2 sc/inc/dpobject.hxx | 8 sc/inc/dpsave.hxx | 6 sc/inc/dptabsrc.hxx | 2 sc/inc/drwlayer.hxx | 2 sc/inc/externalrefmgr.hxx | 2 sc/inc/linkuno.hxx | 2 sc/inc/userlist.hxx | 2 sc/qa/unit/pivottable_filters_test.cxx | 70 ++--- sc/qa/unit/subsequent_export-test.cxx | 2 sc/qa/unit/ucalc.cxx | 2 sc/qa/unit/ucalc.hxx | 2 sc/qa/unit/ucalc_pivottable.cxx | 30 +- sc/source/core/data/conditio.cxx | 4 sc/source/core/data/docpool.cxx | 2 sc/source/core/data/documen3.cxx | 4 sc/source/core/data/documen5.cxx | 12 sc/source/core/data/documen8.cxx | 12 sc/source/core/data/dpcache.cxx | 2 sc/source/core/data/dpgroup.cxx | 2 sc/source/core/data/dpobject.cxx | 8 sc/source/core/data/dpsave.cxx | 6 sc/source/core/data/dptabsrc.cxx | 2 sc/source/core/data/drwlayer.cxx | 4 sc/source/core/tool/addincol.cxx | 4 sc/source/core/tool/interpr2.cxx | 2 sc/source/core/tool/interpr7.cxx | 2 sc/source/core/tool/userlist.cxx | 2 sc/source/filter/excel/xechart.cxx | 4 sc/source/filter/excel/xelink.cxx | 24 - sc/source/filter/excel/xepivot.cxx | 14 - sc/source/filter/excel/xiname.cxx | 2 sc/source/filter/inc/xechart.hxx | 4 sc/source/filter/inc/xepivot.hxx | 12 sc/source/filter/inc/xiname.hxx | 2 sc/source/filter/inc/xlchart.hxx | 26 +- sc/source/filter/oox/condformatbuffer.cxx | 2 sc/source/filter/oox/formulabuffer.cxx | 2 sc/source/filter/oox/querytablebuffer.cxx | 4 sc/source/filter/xml/xmlexprt.cxx | 58 ++-- sc/source/filter/xml/xmlimprt.cxx | 2 sc/source/filter/xml/xmlimprt.hxx | 2 sc/source/ui/cctrl/checklistmenu.cxx | 6 sc/source/ui/dbgui/pvfundlg.cxx | 4 sc/source/ui/dbgui/scuiimoptdlg.cxx | 4 sc/source/ui/docshell/arealink.cxx | 4 sc/source/ui/docshell/docsh4.cxx | 6 sc/source/ui/docshell/documentlinkmgr.cxx | 2 sc/source/ui/docshell/externalrefmgr.cxx | 2 sc/source/ui/inc/checklistmenu.hxx | 6 sc/source/ui/inc/content.hxx | 2 sc/source/ui/inc/docsh.hxx | 2 sc/source/ui/inc/drawview.hxx | 6 sc/source/ui/inc/navipi.hxx | 2 sc/source/ui/inc/pvfundlg.hxx | 4 sc/source/ui/inc/solverutil.hxx | 4 sc/source/ui/inc/tabview.hxx | 2 sc/source/ui/inc/tabvwsh.hxx | 2 sc/source/ui/inc/viewfunc.hxx | 4 sc/source/ui/miscdlgs/solverutil.cxx | 4 sc/source/ui/navipi/content.cxx | 4 sc/source/ui/navipi/navipi.cxx | 2 sc/source/ui/undo/undoblk3.cxx | 6 sc/source/ui/unoobj/ChartTools.cxx | 4 sc/source/ui/unoobj/afmtuno.cxx | 4 sc/source/ui/unoobj/cellsuno.cxx | 4 sc/source/ui/unoobj/dapiuno.cxx | 2 sc/source/ui/unoobj/docuno.cxx | 4 sc/source/ui/unoobj/eventuno.cxx | 2 sc/source/ui/unoobj/linkuno.cxx | 2 sc/source/ui/vba/vbaworksheet.cxx | 2 sc/source/ui/vba/vbaworksheet.hxx | 2 sc/source/ui/vba/vbaworksheets.cxx | 2 sc/source/ui/vba/vbaworksheets.hxx | 2 sc/source/ui/view/dbfunc3.cxx | 2 sc/source/ui/view/drawview.cxx | 6 sc/source/ui/view/gridwin.cxx | 2 sc/source/ui/view/tabview3.cxx | 2 sc/source/ui/view/tabvwsh2.cxx | 2 sc/source/ui/view/tabvwsh3.cxx | 2 sc/source/ui/view/tabvwsh9.cxx | 2 sc/source/ui/view/tabvwsha.cxx | 2 sc/source/ui/view/viewfun2.cxx | 4 sc/source/ui/view/viewfun5.cxx | 2 sc/source/ui/view/viewfun7.cxx | 2 scaddins/source/analysis/analysishelper.hxx | 4 scaddins/source/datefunc/datefunc.hxx | 2 scaddins/source/pricing/pricing.hxx | 2 sd/inc/CustomAnimationEffect.hxx | 4 sd/inc/CustomAnimationPreset.hxx | 2 sd/inc/drawdoc.hxx | 6 sd/qa/unit/export-tests.cxx | 2 sd/qa/unit/tiledrendering/tiledrendering.cxx | 4 sd/source/core/CustomAnimationEffect.cxx | 4 sd/source/core/CustomAnimationPreset.cxx | 2 sd/source/core/drawdoc2.cxx | 6 sd/source/core/drawdoc3.cxx | 4 sd/source/core/stlpool.cxx | 4 sd/source/filter/eppt/pptexsoundcollection.cxx | 2 sd/source/filter/eppt/pptexsoundcollection.hxx | 2 sd/source/ui/animations/CustomAnimationPane.cxx | 26 +- sd/source/ui/annotations/annotationmanager.cxx | 2 sd/source/ui/annotations/annotationmanagerimpl.hxx | 2 sd/source/ui/dlg/LayerTabBar.cxx | 2 sd/source/ui/dlg/sdtreelb.cxx | 10 sd/source/ui/docshell/docshel2.cxx | 2 sd/source/ui/docshell/docshel3.cxx | 6 sd/source/ui/framework/factories/BasicPaneFactory.cxx | 2 sd/source/ui/func/fuconrec.cxx | 4 sd/source/ui/inc/DrawDocShell.hxx | 2 sd/source/ui/inc/LayerTabBar.hxx | 2 sd/source/ui/inc/RemoteServer.hxx | 2 sd/source/ui/inc/sdtreelb.hxx | 6 sd/source/ui/inc/unomodel.hxx | 2 sd/source/ui/inc/unopage.hxx | 2 sd/source/ui/remotecontrol/Server.cxx | 2 sd/source/ui/slideshow/slideshowimpl.cxx | 6 sd/source/ui/slideshow/slideshowimpl.hxx | 2 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx | 4 sd/source/ui/table/tablefunction.cxx | 2 sd/source/ui/uitest/uiobject.cxx | 2 sd/source/ui/unoidl/unocpres.cxx | 2 sd/source/ui/unoidl/unocpres.hxx | 2 sd/source/ui/unoidl/unomodel.cxx | 2 sd/source/ui/unoidl/unopage.cxx | 2 sd/source/ui/view/ViewShellImplementation.cxx | 2 sd/source/ui/view/drviews2.cxx | 2 sdext/source/minimizer/impoptimizer.cxx | 2 sdext/source/minimizer/pagecollector.cxx | 4 sdext/source/minimizer/pagecollector.hxx | 4 sdext/source/presenter/PresenterConfigurationAccess.cxx | 2 sdext/source/presenter/PresenterConfigurationAccess.hxx | 2 sfx2/inc/autoredactdialog.hxx | 4 sfx2/source/appl/newhelp.cxx | 2 sfx2/source/appl/newhelp.hxx | 2 sfx2/source/bastyp/fltfnc.cxx | 2 sfx2/source/control/templatedlglocalview.cxx | 2 sfx2/source/control/templatelocalview.cxx | 8 sfx2/source/dialog/filedlghelper.cxx | 4 sfx2/source/dialog/filedlgimpl.hxx | 4 sfx2/source/dialog/infobar.cxx | 4 sfx2/source/dialog/templdlg.cxx | 2 sfx2/source/doc/autoredactdialog.cxx | 4 sfx2/source/doc/docfac.cxx | 2 sfx2/source/doc/doctempl.cxx | 8 sfx2/source/doc/doctemplates.cxx | 8 sfx2/source/doc/objcont.cxx | 4 sfx2/source/doc/objmisc.cxx | 4 sfx2/source/doc/objserv.cxx | 10 sfx2/source/doc/templatedlg.cxx | 2 sfx2/source/sidebar/Deck.cxx | 2 sfx2/source/sidebar/Panel.cxx | 2 sfx2/source/sidebar/ResourceManager.cxx | 14 - sfx2/source/sidebar/Sidebar.cxx | 8 sfx2/source/sidebar/SidebarController.cxx | 20 - sfx2/source/sidebar/SidebarDockingWindow.cxx | 2 sfx2/source/sidebar/TabBar.cxx | 2 sfx2/source/styles/StyleManager.cxx | 2 sfx2/source/view/classificationhelper.cxx | 8 sfx2/source/view/viewfrm.cxx | 10 sot/source/sdstor/ucbstorage.cxx | 6 starmath/inc/dialog.hxx | 4 starmath/inc/smmod.hxx | 4 starmath/inc/symbol.hxx | 2 starmath/source/cfgitem.cxx | 4 starmath/source/cfgitem.hxx | 4 starmath/source/dialog.cxx | 6 starmath/source/parse.cxx | 2 starmath/source/smmod.cxx | 4 starmath/source/symbol.cxx | 4 stoc/source/implementationregistration/implreg.cxx | 12 stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx | 4 svl/source/items/style.cxx | 2 svl/source/numbers/zforfind.cxx | 2 svl/source/numbers/zforfind.hxx | 2 svl/source/numbers/zforlist.cxx | 22 - svl/source/passwordcontainer/passwordcontainer.cxx | 8 svl/source/passwordcontainer/passwordcontainer.hxx | 6 svtools/source/dialogs/insdlg.cxx | 2 svtools/source/misc/langtab.cxx | 6 svx/inc/galbrws2.hxx | 2 svx/source/dialog/ClassificationCommon.cxx | 2 svx/source/dialog/ctredlin.cxx | 4 svx/source/gallery2/galbrws1.cxx | 2 svx/source/gallery2/galbrws1.hxx | 2 svx/source/gallery2/galbrws2.cxx | 2 svx/source/gallery2/galexpl.cxx | 14 - svx/source/gallery2/galini.cxx | 2 svx/source/gallery2/gallery1.cxx | 10 svx/source/inc/datanavi.hxx | 4 svx/source/items/numfmtsh.cxx | 8 svx/source/styles/ColorSets.cxx | 2 svx/source/svdraw/svdotext.cxx | 6 svx/source/tbxctrls/tbcontrl.cxx | 6 svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx | 6 svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx | 6 svx/source/unodraw/unomtabl.cxx | 2 svx/source/unogallery/unogaltheme.cxx | 2 svx/source/unogallery/unogaltheme.hxx | 2 svx/source/xoutdev/xtable.cxx | 2 sw/inc/PostItMgr.hxx | 2 sw/inc/authfld.hxx | 2 sw/inc/cellfml.hxx | 2 sw/inc/crsrsh.hxx | 4 sw/inc/doc.hxx | 20 - sw/inc/editsh.hxx | 10 sw/inc/format.hxx | 2 sw/inc/iodetect.hxx | 6 sw/inc/pagedesc.hxx | 6 sw/inc/swcrsr.hxx | 2 sw/inc/tblafmt.hxx | 6 sw/inc/unostyle.hxx | 2 sw/qa/core/uwriter.cxx | 2 sw/qa/extras/layout/layout.cxx | 2 sw/qa/extras/odfimport/odfimport.cxx | 6 sw/qa/extras/ooxmlexport/ooxmlexport10.cxx | 2 sw/qa/extras/ooxmlexport/ooxmlexport13.cxx | 4 sw/qa/extras/ooxmlexport/ooxmlexport4.cxx | 2 sw/qa/extras/ooxmlexport/ooxmlexport6.cxx | 6 sw/qa/extras/ooxmlexport/ooxmlexport9.cxx | 2 sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 2 sw/qa/extras/ooxmlimport/ooxmlimport2.cxx | 6 sw/qa/extras/rtfimport/rtfimport.cxx | 8 sw/qa/extras/uiwriter/uiwriter.cxx | 28 +- sw/qa/extras/unowriter/unowriter.cxx | 4 sw/qa/extras/ww8import/ww8import.cxx | 4 sw/qa/inc/swmodeltestbase.hxx | 2 sw/qa/unit/swmodeltestbase.cxx | 2 sw/source/core/crsr/crstrvl.cxx | 2 sw/source/core/crsr/trvlreg.cxx | 4 sw/source/core/doc/doc.cxx | 4 sw/source/core/doc/docchart.cxx | 2 sw/source/core/doc/docfmt.cxx | 4 sw/source/core/doc/docglbl.cxx | 2 sw/source/core/doc/docnum.cxx | 2 sw/source/core/doc/tblafmt.cxx | 6 sw/source/core/docnode/ndtbl.cxx | 4 sw/source/core/edit/edfcol.cxx | 16 - sw/source/core/edit/edfmt.cxx | 4 sw/source/core/edit/editsh.cxx | 6 sw/source/core/fields/authfld.cxx | 2 sw/source/core/fields/cellfml.cxx | 2 sw/source/core/layout/pagedesc.cxx | 2 sw/source/core/text/porlay.hxx | 2 sw/source/core/text/txtftn.cxx | 2 sw/source/core/txtnode/ndtxt.cxx | 4 sw/source/core/unocore/unochart.cxx | 2 sw/source/core/unocore/unostyle.cxx | 6 sw/source/filter/basflt/iodetect.cxx | 2 sw/source/filter/ww8/docxattributeoutput.cxx | 2 sw/source/filter/ww8/ww8par.cxx | 4 sw/source/filter/ww8/ww8par.hxx | 4 sw/source/filter/ww8/ww8par2.cxx | 2 sw/source/filter/xml/XMLRedlineImportHelper.cxx | 2 sw/source/filter/xml/XMLRedlineImportHelper.hxx | 2 sw/source/ui/dbui/selectdbtabledialog.cxx | 2 sw/source/ui/dbui/selectdbtabledialog.hxx | 2 sw/source/ui/dialog/uiregionsw.cxx | 2 sw/source/ui/envelp/label1.cxx | 2 sw/source/ui/fldui/changedb.cxx | 2 sw/source/ui/fldui/flddb.cxx | 4 sw/source/ui/index/swuiidxmrk.cxx | 2 sw/source/ui/misc/glossary.cxx | 6 sw/source/ui/misc/outline.cxx | 2 sw/source/ui/vba/vbadocument.cxx | 2 sw/source/ui/vba/vbadocument.hxx | 2 sw/source/uibase/app/docsh2.cxx | 4 sw/source/uibase/app/docstyle.cxx | 2 sw/source/uibase/dbui/dbtree.cxx | 6 sw/source/uibase/docvw/PostItMgr.cxx | 2 sw/source/uibase/fldui/fldmgr.cxx | 2 sw/source/uibase/inc/dbtree.hxx | 4 sw/source/uibase/inc/fldmgr.hxx | 2 sw/source/uibase/inc/gloslst.hxx | 4 sw/source/uibase/inc/glossary.hxx | 2 sw/source/uibase/inc/label.hxx | 2 sw/source/uibase/inc/langhelper.hxx | 4 sw/source/uibase/inc/outline.hxx | 2 sw/source/uibase/inc/regionsw.hxx | 2 sw/source/uibase/inc/wrtsh.hxx | 6 sw/source/uibase/shells/frmsh.cxx | 2 sw/source/uibase/shells/langhelper.cxx | 4 sw/source/uibase/sidebar/StylePresetsPanel.cxx | 8 sw/source/uibase/sidebar/ThemePanel.cxx | 6 sw/source/uibase/uiview/view2.cxx | 2 sw/source/uibase/utlui/content.cxx | 4 sw/source/uibase/utlui/gloslst.cxx | 4 sw/source/uibase/wrtsh/move.cxx | 2 sw/source/uibase/wrtsh/wrtsh1.cxx | 8 test/source/text/textsettings.cxx | 2 test/source/xmltesttools.cxx | 2 toolkit/inc/controls/controlmodelcontainerbase.hxx | 2 toolkit/source/controls/controlmodelcontainerbase.cxx | 2 tools/qa/cppunit/test_color.cxx | 34 +- ucb/source/cacher/cachedcontentresultset.cxx | 12 ucb/source/ucp/ftp/ftpcontentprovider.cxx | 6 ucb/source/ucp/ftp/ftpcontentprovider.hxx | 6 ucbhelper/source/client/proxydecider.cxx | 2 ucbhelper/source/provider/contentinfo.cxx | 4 ucbhelper/source/provider/contentinfo.hxx | 4 ucbhelper/source/provider/resultset.cxx | 4 unoidl/source/sourceprovider-parser.y | 4 unoidl/source/sourceprovider-scanner.hxx | 2 unotools/source/config/lingucfg.cxx | 4 unotools/source/misc/fontdefs.cxx | 2 uui/source/iahndl-ioexceptions.cxx | 18 - vcl/inc/fontinstance.hxx | 2 vcl/inc/listbox.hxx | 2 vcl/inc/outdev.h | 2 vcl/inc/ppdparser.hxx | 4 vcl/source/control/combobox.cxx | 2 vcl/source/control/imp_listbox.cxx | 2 vcl/source/control/listbox.cxx | 4 vcl/source/filter/graphicfilter.cxx | 2 vcl/source/font/fontinstance.cxx | 2 vcl/source/outdev/font.cxx | 2 vcl/unx/generic/printer/ppdparser.cxx | 4 vcl/workben/vcldemo.cxx | 4 writerfilter/source/dmapper/DomainMapperTableHandler.cxx | 2 writerfilter/source/dmapper/DomainMapper_Impl.cxx | 2 writerfilter/source/dmapper/DomainMapper_Impl.hxx | 2 writerfilter/source/dmapper/NumberingManager.cxx | 2 writerfilter/source/dmapper/PropertyMap.cxx | 18 - writerfilter/source/dmapper/SettingsTable.cxx | 2 writerfilter/source/dmapper/SettingsTable.hxx | 2 writerfilter/source/dmapper/StyleSheetTable.cxx | 4 writerfilter/source/dmapper/StyleSheetTable.hxx | 4 writerfilter/source/rtftok/rtfdocumentimpl.cxx | 2 writerperfect/qa/unit/EPUBExportTest.cxx | 58 ++-- writerperfect/source/common/DirectoryStream.cxx | 2 xmlhelp/source/cxxhelp/provider/databases.cxx | 2 xmlhelp/source/cxxhelp/provider/databases.hxx | 2 xmloff/inc/txtlists.hxx | 4 xmloff/source/chart/SchXMLAxisContext.cxx | 2 xmloff/source/chart/SchXMLExport.cxx | 2 xmloff/source/chart/SchXMLPlotAreaContext.cxx | 32 +- xmloff/source/chart/SchXMLSeries2Context.cxx | 10 xmloff/source/chart/SchXMLTools.cxx | 2 xmloff/source/chart/SchXMLTools.hxx | 2 xmloff/source/draw/XMLGraphicsDefaultStyle.cxx | 6 xmloff/source/draw/sdxmlexp.cxx | 4 xmloff/source/draw/sdxmlexp_impl.hxx | 2 xmloff/source/draw/ximpstyl.cxx | 2 xmloff/source/forms/formcellbinding.cxx | 2 xmloff/source/style/xmlnumfi.cxx | 4 xmloff/source/style/xmlprmap.cxx | 4 xmloff/source/table/XMLTableExport.cxx | 2 xmloff/source/text/txtexppr.cxx | 4 xmloff/source/text/txtimp.cxx | 6 xmloff/source/text/txtlists.cxx | 8 xmlscript/source/xmldlg_imexp/imp_share.hxx | 2 xmlscript/source/xmldlg_imexp/xmldlg_import.cxx | 2 xmlsecurity/inc/xsecctl.hxx | 2 xmlsecurity/source/component/certificatecontainer.cxx | 12 xmlsecurity/source/helper/xsecverify.cxx | 2 573 files changed, 1502 insertions(+), 1469 deletions(-)
New commits: commit bb06f51308428500c9c8d11ae05f0aa03ecc179c Author: Noel <noelgran...@gmail.com> AuthorDate: Wed Nov 18 10:10:40 2020 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Nov 24 09:45:04 2020 +0100 loplugin:stringviewparam extend to comparison operators which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/UnoControls/source/controls/progressmonitor.cxx b/UnoControls/source/controls/progressmonitor.cxx index cabbdc1e4204..9902758f8536 100644 --- a/UnoControls/source/controls/progressmonitor.cxx +++ b/UnoControls/source/controls/progressmonitor.cxx @@ -788,7 +788,7 @@ void ProgressMonitor::impl_cleanMemory () } // private method -IMPL_TextlistItem* ProgressMonitor::impl_searchTopic ( const OUString& rTopic, bool bbeforeProgress ) +IMPL_TextlistItem* ProgressMonitor::impl_searchTopic ( std::u16string_view rTopic, bool bbeforeProgress ) { // Get right textlist for following operations. ::std::vector< std::unique_ptr<IMPL_TextlistItem> >* pTextList; diff --git a/UnoControls/source/inc/progressmonitor.hxx b/UnoControls/source/inc/progressmonitor.hxx index ad4accba562d..7be8056396f3 100644 --- a/UnoControls/source/inc/progressmonitor.hxx +++ b/UnoControls/source/inc/progressmonitor.hxx @@ -219,7 +219,7 @@ private: void impl_cleanMemory(); - IMPL_TextlistItem* impl_searchTopic( const OUString& sTopic , bool bbeforeProgress ); + IMPL_TextlistItem* impl_searchTopic( std::u16string_view sTopic , bool bbeforeProgress ); // debug methods diff --git a/accessibility/inc/standard/vclxaccessiblelist.hxx b/accessibility/inc/standard/vclxaccessiblelist.hxx index 7d05067b0aa6..49f48d9b8b56 100644 --- a/accessibility/inc/standard/vclxaccessiblelist.hxx +++ b/accessibility/inc/standard/vclxaccessiblelist.hxx @@ -74,7 +74,7 @@ public: This string contains the text of the currently selected item. It is used to retrieve the index of that item. */ - void UpdateSelection (const OUString& sTextOfSelectedItem); + void UpdateSelection (std::u16string_view sTextOfSelectedItem); // XInterface DECLARE_XINTERFACE() diff --git a/accessibility/source/standard/vclxaccessiblelist.cxx b/accessibility/source/standard/vclxaccessiblelist.cxx index ecb3274d0b0e..353312e6bbae 100644 --- a/accessibility/source/standard/vclxaccessiblelist.cxx +++ b/accessibility/source/standard/vclxaccessiblelist.cxx @@ -435,7 +435,7 @@ void VCLXAccessibleList::ProcessWindowEvent (const VclWindowEvent& rVclWindowEve state of the associated accessibility objects accordingly we exploit the fact that the */ -void VCLXAccessibleList::UpdateSelection (const OUString& sTextOfSelectedItem) +void VCLXAccessibleList::UpdateSelection (std::u16string_view sTextOfSelectedItem) { if ( m_aBoxType != COMBOBOX ) return; diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx index 25967f4f4ca4..d49060c0719d 100644 --- a/basctl/source/basicide/basides1.cxx +++ b/basctl/source/basicide/basides1.cxx @@ -1250,12 +1250,12 @@ void Shell::ManageToolbars() VclPtr<BaseWindow> Shell::FindApplicationWindow() { - return FindWindow( ScriptDocument::getApplicationScriptDocument(), "", "", TYPE_UNKNOWN ); + return FindWindow( ScriptDocument::getApplicationScriptDocument(), u"", u"", TYPE_UNKNOWN ); } VclPtr<BaseWindow> Shell::FindWindow( ScriptDocument const& rDocument, - OUString const& rLibName, OUString const& rName, + std::u16string_view rLibName, std::u16string_view rName, ItemType eType, bool bFindSuspended ) { diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index 3cf2ed621457..28fea6e3dcc1 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -563,7 +563,7 @@ void Shell::CheckWindows() } -void Shell::RemoveWindows( const ScriptDocument& rDocument, const OUString& rLibName ) +void Shell::RemoveWindows( const ScriptDocument& rDocument, std::u16string_view rLibName ) { bool bChangeCurWindow = pCurWin; std::vector<VclPtr<BaseWindow> > aDeleteVec; diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx index 904ff8307670..eed521ce3fd6 100644 --- a/basctl/source/basicide/bastype2.cxx +++ b/basctl/source/basicide/bastype2.cxx @@ -475,7 +475,7 @@ void SbTreeListBox::ImpCreateLibSubSubEntriesInVBAMode(const weld::TreeIter& rLi } } -bool SbTreeListBox::ImpFindEntry(weld::TreeIter& rIter, const OUString& rText) +bool SbTreeListBox::ImpFindEntry(weld::TreeIter& rIter, std::u16string_view rText) { bool bValidIter = m_xControl->iter_children(rIter); while (bValidIter) @@ -599,7 +599,7 @@ void SbTreeListBox::RemoveEntry (ScriptDocument const& rDocument) } } -bool SbTreeListBox::FindEntry(const OUString& rText, EntryType eType, weld::TreeIter& rIter) +bool SbTreeListBox::FindEntry(std::u16string_view rText, EntryType eType, weld::TreeIter& rIter) { bool bValidIter = m_xControl->iter_children(rIter); while (bValidIter) diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index eabb6ea12f69..99a54894a3e8 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -226,14 +226,14 @@ void BaseWindow::InsertLibInfo () const bool BaseWindow::Is ( ScriptDocument const& rDocument, - OUString const& rLibName, OUString const& rName, + std::u16string_view rLibName, std::u16string_view rName, ItemType eType, bool bFindSuspended ) { if (bFindSuspended || !IsSuspended()) { // any non-suspended window is ok - if (rLibName.isEmpty() || rName.isEmpty() || eType == TYPE_UNKNOWN) + if (rLibName.empty() || rName.empty() || eType == TYPE_UNKNOWN) return true; // ok if the parameters match if (m_aDocument == rDocument && m_aLibName == rLibName && m_aName == rName && GetType() == eType) diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx index d557bd5f31f4..61c2747d5eb3 100644 --- a/basctl/source/basicide/scriptdocument.cxx +++ b/basctl/source/basicide/scriptdocument.cxx @@ -1068,10 +1068,10 @@ namespace basctl } - ScriptDocument ScriptDocument::getDocumentWithURLOrCaption( const OUString& _rUrlOrCaption ) + ScriptDocument ScriptDocument::getDocumentWithURLOrCaption( std::u16string_view _rUrlOrCaption ) { ScriptDocument aDocument( getApplicationScriptDocument() ); - if ( _rUrlOrCaption.isEmpty() ) + if ( _rUrlOrCaption.empty() ) return aDocument; docs::Documents aDocuments; diff --git a/basctl/source/inc/basidesh.hxx b/basctl/source/inc/basidesh.hxx index 6f04b4269a2b..d8fe56feb43c 100644 --- a/basctl/source/inc/basidesh.hxx +++ b/basctl/source/inc/basidesh.hxx @@ -93,7 +93,7 @@ private: void InitTabBar(); void InitScrollBars(); void CheckWindows(); - void RemoveWindows( const ScriptDocument& rDocument, const OUString& rLibName ); + void RemoveWindows( const ScriptDocument& rDocument, std::u16string_view rLibName ); void UpdateWindows(); static void InvalidateBasicIDESlots(); void StoreAllWindowData( bool bPersistent = true ); @@ -183,7 +183,7 @@ public: bool CallBasicErrorHdl( StarBASIC const * pBasic ); BasicDebugFlags CallBasicBreakHdl( StarBASIC const * pBasic ); - VclPtr<BaseWindow> FindWindow( const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rName, ItemType nType, bool bFindSuspended = false ); + VclPtr<BaseWindow> FindWindow( const ScriptDocument& rDocument, std::u16string_view rLibName, std::u16string_view rName, ItemType nType, bool bFindSuspended = false ); VclPtr<DialogWindow> FindDlgWin( const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rName, bool bCreateIfNotExist = false, bool bFindSuspended = false ); VclPtr<ModulWindow> FindBasWin( const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rModName, bool bCreateIfNotExist = false, bool bFindSuspended = false ); VclPtr<BaseWindow> FindApplicationWindow(); diff --git a/basctl/source/inc/bastype2.hxx b/basctl/source/inc/bastype2.hxx index 5325bb75c1c5..3eb4de6beec9 100644 --- a/basctl/source/inc/bastype2.hxx +++ b/basctl/source/inc/bastype2.hxx @@ -189,7 +189,7 @@ protected: void ImpCreateLibSubEntries(const weld::TreeIter& rLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName); void ImpCreateLibSubEntriesInVBAMode(const weld::TreeIter& rLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName ); void ImpCreateLibSubSubEntriesInVBAMode(const weld::TreeIter& rLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName); - bool ImpFindEntry(weld::TreeIter& rIter, const OUString& rText); + bool ImpFindEntry(weld::TreeIter& rIter, std::u16string_view rText); // DocumentEventListener virtual void onDocumentCreated( const ScriptDocument& _rDocument ) override; @@ -218,7 +218,7 @@ public: SbModule* FindModule(const weld::TreeIter* pEntry); SbxVariable* FindVariable(const weld::TreeIter* pEntry); bool FindRootEntry(const ScriptDocument& rDocument, LibraryLocation eLocation, weld::TreeIter& rIter); - bool FindEntry(const OUString& rText, EntryType eType, weld::TreeIter& rIter); + bool FindEntry(std::u16string_view rText, EntryType eType, weld::TreeIter& rIter); EntryDescriptor GetEntryDescriptor(const weld::TreeIter* pEntry); static ItemType ConvertType (EntryType eType); diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx index 052bd2f420c7..21e6c0227a9c 100644 --- a/basctl/source/inc/bastypes.hxx +++ b/basctl/source/inc/bastypes.hxx @@ -236,7 +236,7 @@ public: virtual char const* GetHid () const = 0; virtual ItemType GetType () const = 0; void InsertLibInfo () const; - bool Is (ScriptDocument const&, OUString const&, OUString const&, ItemType, bool bFindSuspended); + bool Is (ScriptDocument const&, std::u16string_view, std::u16string_view, ItemType, bool bFindSuspended); virtual bool HasActiveEditor () const; }; diff --git a/basctl/source/inc/scriptdocument.hxx b/basctl/source/inc/scriptdocument.hxx index 6a0bfb2f0f62..da7f2b50d307 100644 --- a/basctl/source/inc/scriptdocument.hxx +++ b/basctl/source/inc/scriptdocument.hxx @@ -121,7 +121,7 @@ namespace basctl @see getApplicationScriptDocument */ static ScriptDocument - getDocumentWithURLOrCaption( const OUString& _rUrlOrCaption ); + getDocumentWithURLOrCaption( std::u16string_view _rUrlOrCaption ); /** operation mode for getAllScriptDocuments */ diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx index 9a73a04b9039..fccef42d98f4 100644 --- a/binaryurp/source/bridge.cxx +++ b/binaryurp/source/bridge.cxx @@ -818,7 +818,7 @@ OutgoingRequest Bridge::lastOutgoingRequest(rtl::ByteSequence const & tid) { } bool Bridge::isProtocolPropertiesRequest( - OUString const & oid, css::uno::TypeDescription const & type) const + std::u16string_view oid, css::uno::TypeDescription const & type) const { return oid == protPropOid_ && type.equals(protPropType_); } diff --git a/binaryurp/source/bridge.hxx b/binaryurp/source/bridge.hxx index f3a6badd2283..1a51ffac0626 100644 --- a/binaryurp/source/bridge.hxx +++ b/binaryurp/source/bridge.hxx @@ -158,7 +158,7 @@ public: OutgoingRequest lastOutgoingRequest(rtl::ByteSequence const & tid); bool isProtocolPropertiesRequest( - OUString const & oid, + std::u16string_view oid, com::sun::star::uno::TypeDescription const & type) const; void setCurrentContextMode(); diff --git a/chart2/qa/extras/PivotChartTest.cxx b/chart2/qa/extras/PivotChartTest.cxx index 80bfcf14202b..44998835dbcc 100644 --- a/chart2/qa/extras/PivotChartTest.cxx +++ b/chart2/qa/extras/PivotChartTest.cxx @@ -60,7 +60,7 @@ namespace { void lclModifyOrientation(uno::Reference<sheet::XDataPilotDescriptor> const & xDescriptor, - OUString const & sFieldName, + std::u16string_view sFieldName, sheet::DataPilotFieldOrientation eOrientation) { uno::Reference<container::XIndexAccess> xIndexAccess(xDescriptor->getDataPilotFields(), UNO_SET_THROW); @@ -76,7 +76,7 @@ void lclModifyOrientation(uno::Reference<sheet::XDataPilotDescriptor> const & xD } void lclModifyFunction(uno::Reference<sheet::XDataPilotDescriptor> const & xDescriptor, - OUString const & sFieldName, + std::u16string_view sFieldName, sheet::GeneralFunction eFunction) { uno::Reference<container::XIndexAccess> xPilotIndexAccess(xDescriptor->getDataPilotFields(), UNO_SET_THROW); @@ -92,7 +92,7 @@ void lclModifyFunction(uno::Reference<sheet::XDataPilotDescriptor> const & xDesc } void lclModifyLayoutInfo(uno::Reference<sheet::XDataPilotDescriptor> const & xDescriptor, - OUString const & sFieldName, + std::u16string_view sFieldName, sheet::DataPilotFieldLayoutInfo aLayoutInfo) { uno::Reference<container::XIndexAccess> xIndexAccess(xDescriptor->getDataPilotFields(), UNO_SET_THROW); @@ -112,7 +112,7 @@ void lclModifyLayoutInfo(uno::Reference<sheet::XDataPilotDescriptor> const & xDe } void lclModifySubtotals(uno::Reference<sheet::XDataPilotDescriptor> const & xDescriptor, - OUString const & sFieldName, + std::u16string_view sFieldName, uno::Sequence<sheet::GeneralFunction> const & rSubtotalFunctions) { uno::Reference<container::XIndexAccess> xIndexAccess(xDescriptor->getDataPilotFields(), UNO_SET_THROW); @@ -325,12 +325,12 @@ void PivotChartTest::testRoundtrip() // Check the data series { - xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData(); + xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData(); lclCheckSequence(aReference1, xSequence, 1E-4); CPPUNIT_ASSERT_EQUAL(OUString("Exp."), lclGetLabel(xChartDoc, 0)); } { - xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 1)->getData(); + xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 1)->getData(); lclCheckSequence(aReference2, xSequence, 1E-4); CPPUNIT_ASSERT_EQUAL(OUString("Rev."), lclGetLabel(xChartDoc, 1)); } @@ -339,14 +339,14 @@ void PivotChartTest::testRoundtrip() { uno::Reference<sheet::XDataPilotTable> xDataPilotTable = lclGetPivotTableByName(1, "DataPilot1", mxComponent); uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor(xDataPilotTable, UNO_QUERY_THROW); - lclModifyOrientation(xDataPilotDescriptor, "Exp.", sheet::DataPilotFieldOrientation_HIDDEN); + lclModifyOrientation(xDataPilotDescriptor, u"Exp.", sheet::DataPilotFieldOrientation_HIDDEN); } CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getNumberOfDataSeries(xChartDoc)); // Check again the data series { - xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData(); + xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData(); lclCheckSequence(aReference2, xSequence, 1E-4); CPPUNIT_ASSERT_EQUAL(OUString("Total"), lclGetLabel(xChartDoc, 0)); } @@ -360,7 +360,7 @@ void PivotChartTest::testRoundtrip() // Check again the data series { - xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData(); + xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData(); lclCheckSequence(aReference2, xSequence, 1E-4); CPPUNIT_ASSERT_EQUAL(OUString("Total"), lclGetLabel(xChartDoc, 0)); } @@ -398,7 +398,7 @@ void PivotChartTest::testChangePivotTable() { std::vector<double> aReference { 10162.033139, 16614.523063, 27944.146101 }; - xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData(); + xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData(); lclCheckSequence(aReference, xSequence, 1E-4); CPPUNIT_ASSERT_EQUAL(OUString("Exp."), lclGetLabel(xChartDoc, 0)); @@ -408,7 +408,7 @@ void PivotChartTest::testChangePivotTable() { std::vector<double> aReference { 101879.458079, 178636.929704, 314626.484864 }; - xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 1)->getData(); + xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 1)->getData(); lclCheckSequence(aReference, xSequence, 1E-4); CPPUNIT_ASSERT_EQUAL(OUString("Rev."), lclGetLabel(xChartDoc, 1)); @@ -419,9 +419,9 @@ void PivotChartTest::testChangePivotTable() { uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor(xDataPilotTable, UNO_QUERY_THROW); - lclModifyOrientation(xDataPilotDescriptor, "Service Month", sheet::DataPilotFieldOrientation_ROW); - lclModifyOrientation(xDataPilotDescriptor, "Group Segment", sheet::DataPilotFieldOrientation_COLUMN); - lclModifyOrientation(xDataPilotDescriptor, "Rev.", sheet::DataPilotFieldOrientation_HIDDEN); + lclModifyOrientation(xDataPilotDescriptor, u"Service Month", sheet::DataPilotFieldOrientation_ROW); + lclModifyOrientation(xDataPilotDescriptor, u"Group Segment", sheet::DataPilotFieldOrientation_COLUMN); + lclModifyOrientation(xDataPilotDescriptor, u"Rev.", sheet::DataPilotFieldOrientation_HIDDEN); } // Check the pivot chart again as we expect it has been updated when we updated the pivot table @@ -432,7 +432,7 @@ void PivotChartTest::testChangePivotTable() { std::vector<double> aReference { 2855.559, 1780.326, 2208.713, 2130.064, 1187.371 }; - xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData(); + xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData(); lclCheckSequence(aReference, xSequence, 1E-3); CPPUNIT_ASSERT_EQUAL(OUString("Big"), lclGetLabel(xChartDoc, 0)); @@ -442,7 +442,7 @@ void PivotChartTest::testChangePivotTable() { std::vector<double> aReference { 4098.908, 2527.286, 4299.716, 2362.225, 3326.389 }; - xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 1)->getData(); + xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 1)->getData(); lclCheckSequence(aReference, xSequence, 1E-3); CPPUNIT_ASSERT_EQUAL(OUString("Medium"), lclGetLabel(xChartDoc, 1)); @@ -452,7 +452,7 @@ void PivotChartTest::testChangePivotTable() { std::vector<double> aReference { 4926.303, 5684.060, 4201.398, 7290.795, 5841.591 }; - xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 2)->getData(); + xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 2)->getData(); lclCheckSequence(aReference, xSequence, 1E-3); CPPUNIT_ASSERT_EQUAL(OUString("Small"), lclGetLabel(xChartDoc, 2)); @@ -461,7 +461,7 @@ void PivotChartTest::testChangePivotTable() // Remove "Service Month" so row fields are empty - check we handle empty rows { uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor(xDataPilotTable, uno::UNO_QUERY_THROW); - lclModifyOrientation(xDataPilotDescriptor, "Service Month", sheet::DataPilotFieldOrientation_HIDDEN); + lclModifyOrientation(xDataPilotDescriptor, u"Service Month", sheet::DataPilotFieldOrientation_HIDDEN); } // Check the pivot chart again as we expect it has been updated when we updated the pivot table @@ -471,21 +471,21 @@ void PivotChartTest::testChangePivotTable() // Check the first data series { std::vector<double> aReference { 10162.033139 }; - xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData(); + xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData(); lclCheckSequence(aReference, xSequence, 1E-3); CPPUNIT_ASSERT_EQUAL(OUString("Big"), lclGetLabel(xChartDoc, 0)); } // Check the second data series { std::vector<double> aReference { 16614.523063 }; - xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 1)->getData(); + xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 1)->getData(); lclCheckSequence(aReference, xSequence, 1E-3); CPPUNIT_ASSERT_EQUAL(OUString("Medium"), lclGetLabel(xChartDoc, 1)); } // Check the third data series { std::vector<double> aReference { 27944.146101 }; - xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 2)->getData(); + xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 2)->getData(); lclCheckSequence(aReference, xSequence, 1E-3); CPPUNIT_ASSERT_EQUAL(OUString("Small"), lclGetLabel(xChartDoc, 2)); } @@ -501,21 +501,21 @@ void PivotChartTest::testChangePivotTable() // Check the first data series { std::vector<double> aReference { 10162.033139 }; - xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData(); + xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData(); lclCheckSequence(aReference, xSequence, 1E-3); CPPUNIT_ASSERT_EQUAL(OUString("Big"), lclGetLabel(xChartDoc, 0)); } // Check the second data series { std::vector<double> aReference { 16614.523063 }; - xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 1)->getData(); + xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 1)->getData(); lclCheckSequence(aReference, xSequence, 1E-3); CPPUNIT_ASSERT_EQUAL(OUString("Medium"), lclGetLabel(xChartDoc, 1)); } // Check the third data series { std::vector<double> aReference { 27944.146101 }; - xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 2)->getData(); + xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 2)->getData(); lclCheckSequence(aReference, xSequence, 1E-3); CPPUNIT_ASSERT_EQUAL(OUString("Small"), lclGetLabel(xChartDoc, 2)); } @@ -542,9 +542,9 @@ void PivotChartTest::testPivotChartWithOneColumnField() uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor = xDataPilotTables->createDataPilotDescriptor(); xDataPilotDescriptor->setSourceRange(sCellRangeAdress); - lclModifyOrientation(xDataPilotDescriptor, "Country", sheet::DataPilotFieldOrientation_COLUMN); - lclModifyOrientation(xDataPilotDescriptor, "Sales T1", sheet::DataPilotFieldOrientation_DATA); - lclModifyFunction(xDataPilotDescriptor, "Sales T1", sheet::GeneralFunction_SUM); + lclModifyOrientation(xDataPilotDescriptor, u"Country", sheet::DataPilotFieldOrientation_COLUMN); + lclModifyOrientation(xDataPilotDescriptor, u"Sales T1", sheet::DataPilotFieldOrientation_DATA); + lclModifyFunction(xDataPilotDescriptor, u"Sales T1", sheet::GeneralFunction_SUM); xDataPilotTables->insertNewByName(sPivotTableName, table::CellAddress{1, 0, 0}, xDataPilotDescriptor); @@ -577,7 +577,7 @@ void PivotChartTest::testPivotChartWithOneColumnField() { std::vector<double> aReference { 1738.0 }; - xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData(); + xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData(); lclCheckSequence(aReference, xSequence, 1E-4); CPPUNIT_ASSERT_EQUAL(OUString("DE"), lclGetLabel(xChartDoc, 0)); @@ -587,7 +587,7 @@ void PivotChartTest::testPivotChartWithOneColumnField() { std::vector<double> aReference { 2003.0 }; - xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 1)->getData(); + xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 1)->getData(); lclCheckSequence(aReference, xSequence, 1E-4); CPPUNIT_ASSERT_EQUAL(OUString("EN"), lclGetLabel(xChartDoc, 1)); @@ -596,7 +596,7 @@ void PivotChartTest::testPivotChartWithOneColumnField() { std::vector<double> aReference { 1936.0 }; - xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 2)->getData(); + xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 2)->getData(); lclCheckSequence(aReference, xSequence, 1E-4); CPPUNIT_ASSERT_EQUAL(OUString("FR"), lclGetLabel(xChartDoc, 2)); @@ -624,9 +624,9 @@ void PivotChartTest::testPivotChartWithOneRowField() uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor = xDataPilotTables->createDataPilotDescriptor(); xDataPilotDescriptor->setSourceRange(sCellRangeAdress); - lclModifyOrientation(xDataPilotDescriptor, "Country", sheet::DataPilotFieldOrientation_ROW); - lclModifyOrientation(xDataPilotDescriptor, "Sales T1", sheet::DataPilotFieldOrientation_DATA); - lclModifyFunction(xDataPilotDescriptor, "Sales T1", sheet::GeneralFunction_SUM); + lclModifyOrientation(xDataPilotDescriptor, u"Country", sheet::DataPilotFieldOrientation_ROW); + lclModifyOrientation(xDataPilotDescriptor, u"Sales T1", sheet::DataPilotFieldOrientation_DATA); + lclModifyFunction(xDataPilotDescriptor, u"Sales T1", sheet::GeneralFunction_SUM); xDataPilotTables->insertNewByName(sPivotTableName, table::CellAddress{1, 0, 0}, xDataPilotDescriptor); @@ -659,7 +659,7 @@ void PivotChartTest::testPivotChartWithOneRowField() { std::vector<double> aReference { 1738.0, 2003.0, 1936.0 }; - xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData(); + xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData(); lclCheckSequence(aReference, xSequence, 1E-4); CPPUNIT_ASSERT_EQUAL(OUString("Total"), lclGetLabel(xChartDoc, 0)); @@ -684,13 +684,13 @@ void PivotChartTest::testPivotTableDataProvider_PivotTableFields() uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor = xDataPilotTables->createDataPilotDescriptor(); xDataPilotDescriptor->setSourceRange(sCellRangeAdress); - lclModifyOrientation(xDataPilotDescriptor, "City", sheet::DataPilotFieldOrientation_ROW); - lclModifyOrientation(xDataPilotDescriptor, "Country", sheet::DataPilotFieldOrientation_COLUMN); - lclModifyOrientation(xDataPilotDescriptor, "Type", sheet::DataPilotFieldOrientation_COLUMN); - lclModifyOrientation(xDataPilotDescriptor, "Sales T1", sheet::DataPilotFieldOrientation_DATA); - lclModifyFunction(xDataPilotDescriptor, "Sales T1", sheet::GeneralFunction_SUM); - lclModifyOrientation(xDataPilotDescriptor, "Sales T2", sheet::DataPilotFieldOrientation_DATA); - lclModifyFunction(xDataPilotDescriptor, "Sales T2", sheet::GeneralFunction_SUM); + lclModifyOrientation(xDataPilotDescriptor, u"City", sheet::DataPilotFieldOrientation_ROW); + lclModifyOrientation(xDataPilotDescriptor, u"Country", sheet::DataPilotFieldOrientation_COLUMN); + lclModifyOrientation(xDataPilotDescriptor, u"Type", sheet::DataPilotFieldOrientation_COLUMN); + lclModifyOrientation(xDataPilotDescriptor, u"Sales T1", sheet::DataPilotFieldOrientation_DATA); + lclModifyFunction(xDataPilotDescriptor, u"Sales T1", sheet::GeneralFunction_SUM); + lclModifyOrientation(xDataPilotDescriptor, u"Sales T2", sheet::DataPilotFieldOrientation_DATA); + lclModifyFunction(xDataPilotDescriptor, u"Sales T2", sheet::GeneralFunction_SUM); lclModifyColumnGrandTotal(xDataPilotDescriptor, true); lclModifyRowGrandTotal(xDataPilotDescriptor, true); @@ -743,14 +743,14 @@ void PivotChartTest::testPivotTableDataProvider_PivotTableFields() CPPUNIT_ASSERT_EQUAL(OUString("Sum - Sales T2"), aFieldEntries[1].Name); // Data to column fields - lclModifyOrientation(xDataPilotDescriptor, "Data", sheet::DataPilotFieldOrientation_COLUMN); + lclModifyOrientation(xDataPilotDescriptor, u"Data", sheet::DataPilotFieldOrientation_COLUMN); // Change the order of column fields: expected data, type, country - lclModifyOrientation(xDataPilotDescriptor, "Country", sheet::DataPilotFieldOrientation_HIDDEN); - lclModifyOrientation(xDataPilotDescriptor, "Type", sheet::DataPilotFieldOrientation_HIDDEN); + lclModifyOrientation(xDataPilotDescriptor, u"Country", sheet::DataPilotFieldOrientation_HIDDEN); + lclModifyOrientation(xDataPilotDescriptor, u"Type", sheet::DataPilotFieldOrientation_HIDDEN); - lclModifyOrientation(xDataPilotDescriptor, "Type", sheet::DataPilotFieldOrientation_COLUMN); - lclModifyOrientation(xDataPilotDescriptor, "Country", sheet::DataPilotFieldOrientation_COLUMN); + lclModifyOrientation(xDataPilotDescriptor, u"Type", sheet::DataPilotFieldOrientation_COLUMN); + lclModifyOrientation(xDataPilotDescriptor, u"Country", sheet::DataPilotFieldOrientation_COLUMN); // set the XPivotTableDataProvider again as the old one was exchanged xPivotTableDataProvider.set(xChartDoc->getDataProvider(), uno::UNO_QUERY_THROW); @@ -792,10 +792,10 @@ void PivotChartTest::testPivotChartRowFieldInOutlineMode() uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor = xDataPilotTables->createDataPilotDescriptor(); xDataPilotDescriptor->setSourceRange(sCellRangeAdress); - lclModifyOrientation(xDataPilotDescriptor, "Country", sheet::DataPilotFieldOrientation_ROW); - lclModifyOrientation(xDataPilotDescriptor, "City", sheet::DataPilotFieldOrientation_ROW); - lclModifyOrientation(xDataPilotDescriptor, "Sales T1", sheet::DataPilotFieldOrientation_DATA); - lclModifyFunction(xDataPilotDescriptor, "Sales T1", sheet::GeneralFunction_SUM); + lclModifyOrientation(xDataPilotDescriptor, u"Country", sheet::DataPilotFieldOrientation_ROW); + lclModifyOrientation(xDataPilotDescriptor, u"City", sheet::DataPilotFieldOrientation_ROW); + lclModifyOrientation(xDataPilotDescriptor, u"Sales T1", sheet::DataPilotFieldOrientation_DATA); + lclModifyFunction(xDataPilotDescriptor, u"Sales T1", sheet::GeneralFunction_SUM); xDataPilotTables->insertNewByName(sPivotTableName, table::CellAddress{1, 0, 0}, xDataPilotDescriptor); // TEST @@ -830,7 +830,7 @@ void PivotChartTest::testPivotChartRowFieldInOutlineMode() { std::vector<double> aReference { 1116.0, 622.0, 298.0, 562.0, 1143.0, 1168.0, 768.0 }; - xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData(); + xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData(); lclCheckSequence(aReference, xSequence, 1E-4); CPPUNIT_ASSERT_EQUAL(OUString("Total"), lclGetLabel(xChartDoc, 0)); @@ -851,18 +851,18 @@ void PivotChartTest::testPivotChartRowFieldInOutlineMode() // Enable subtotals - set to auto aGeneralFunctionSequence[0] = sheet::GeneralFunction_AUTO; - lclModifySubtotals(xDataPilotDescriptor, "Country", aGeneralFunctionSequence); + lclModifySubtotals(xDataPilotDescriptor, u"Country", aGeneralFunctionSequence); // Set Subtotals layout to bottom + add empty lines aLayoutInfoValue.AddEmptyLines = true; aLayoutInfoValue.LayoutMode = sheet::DataPilotFieldLayoutMode::OUTLINE_SUBTOTALS_BOTTOM; - lclModifyLayoutInfo(xDataPilotDescriptor, "Country", aLayoutInfoValue); + lclModifyLayoutInfo(xDataPilotDescriptor, u"Country", aLayoutInfoValue); // Check data is unchanged CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getNumberOfDataSeries(xChartDoc)); { std::vector<double> aReference { 1116.0, 622.0, 298.0, 562.0, 1143.0, 1168.0, 768.0 }; - xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData(); + xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData(); lclCheckSequence(aReference, xSequence, 1E-4); CPPUNIT_ASSERT_EQUAL(OUString("Total"), lclGetLabel(xChartDoc, 0)); @@ -880,18 +880,18 @@ void PivotChartTest::testPivotChartRowFieldInOutlineMode() // Enable subtotals - set to auto aGeneralFunctionSequence[0] = sheet::GeneralFunction_AUTO; - lclModifySubtotals(xDataPilotDescriptor, "Country", aGeneralFunctionSequence); + lclModifySubtotals(xDataPilotDescriptor, u"Country", aGeneralFunctionSequence); // Set Subtotals layout to top + add empty lines aLayoutInfoValue.AddEmptyLines = true; aLayoutInfoValue.LayoutMode = sheet::DataPilotFieldLayoutMode::OUTLINE_SUBTOTALS_TOP; - lclModifyLayoutInfo(xDataPilotDescriptor, "Country", aLayoutInfoValue); + lclModifyLayoutInfo(xDataPilotDescriptor, u"Country", aLayoutInfoValue); // Check data is unchanged CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getNumberOfDataSeries(xChartDoc)); { std::vector<double> aReference { 1116.0, 622.0, 298.0, 562.0, 1143.0, 1168.0, 768.0 }; - xSequence = getDataSequenceFromDocByRole(xChartDoc, "values-y", 0)->getData(); + xSequence = getDataSequenceFromDocByRole(xChartDoc, u"values-y", 0)->getData(); lclCheckSequence(aReference, xSequence, 1E-4); CPPUNIT_ASSERT_EQUAL(OUString("Total"), lclGetLabel(xChartDoc, 0)); @@ -923,12 +923,12 @@ void PivotChartTest::testPivotChartWithDateRowField() uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor = xDataPilotTables->createDataPilotDescriptor(); xDataPilotDescriptor->setSourceRange(sCellRangeAdress); - lclModifyOrientation(xDataPilotDescriptor, "Date", sheet::DataPilotFieldOrientation_ROW); - lclModifyOrientation(xDataPilotDescriptor, "City", sheet::DataPilotFieldOrientation_ROW); - lclModifyOrientation(xDataPilotDescriptor, "Country", sheet::DataPilotFieldOrientation_ROW); - lclModifyOrientation(xDataPilotDescriptor, "Type", sheet::DataPilotFieldOrientation_COLUMN); - lclModifyOrientation(xDataPilotDescriptor, "Sales T1", sheet::DataPilotFieldOrientation_DATA); - lclModifyFunction(xDataPilotDescriptor, "Sales T1", sheet::GeneralFunction_SUM); + lclModifyOrientation(xDataPilotDescriptor, u"Date", sheet::DataPilotFieldOrientation_ROW); + lclModifyOrientation(xDataPilotDescriptor, u"City", sheet::DataPilotFieldOrientation_ROW); + lclModifyOrientation(xDataPilotDescriptor, u"Country", sheet::DataPilotFieldOrientation_ROW); + lclModifyOrientation(xDataPilotDescriptor, u"Type", sheet::DataPilotFieldOrientation_COLUMN); + lclModifyOrientation(xDataPilotDescriptor, u"Sales T1", sheet::DataPilotFieldOrientation_DATA); + lclModifyFunction(xDataPilotDescriptor, u"Sales T1", sheet::GeneralFunction_SUM); lclModifyColumnGrandTotal(xDataPilotDescriptor, true); lclModifyRowGrandTotal(xDataPilotDescriptor, true); diff --git a/chart2/qa/extras/chart2dump/chart2dump.cxx b/chart2/qa/extras/chart2dump/chart2dump.cxx index 0c011aa93fd3..544eec6b5373 100644 --- a/chart2/qa/extras/chart2dump/chart2dump.cxx +++ b/chart2/qa/extras/chart2dump/chart2dump.cxx @@ -366,19 +366,19 @@ DECLARE_DUMP_TEST(ChartDataTest, Chart2DumpTest, false) // Check source ranges for (size_t nIndex = 0; nIndex < aDataSeriesYValues.size(); ++nIndex) { - Reference< chart2::data::XDataSequence > xDataSeq = getDataSequenceFromDocByRole(xChartDoc2, "values-x", nIndex); + Reference< chart2::data::XDataSequence > xDataSeq = getDataSequenceFromDocByRole(xChartDoc2, u"values-x", nIndex); if (xDataSeq.is()) { OUString aXValuesSourceRange = xDataSeq->getSourceRangeRepresentation(); CPPUNIT_DUMP_ASSERT_STRINGS_EQUAL(aXValuesSourceRange); } - xDataSeq.set(getDataSequenceFromDocByRole(xChartDoc2, "values-y", nIndex)); + xDataSeq.set(getDataSequenceFromDocByRole(xChartDoc2, u"values-y", nIndex)); if (xDataSeq.is()) { OUString aYValuesSourceRange = xDataSeq->getSourceRangeRepresentation(); CPPUNIT_DUMP_ASSERT_STRINGS_EQUAL(aYValuesSourceRange); } - xDataSeq.set(getDataSequenceFromDocByRole(xChartDoc2, "categories", nIndex)); + xDataSeq.set(getDataSequenceFromDocByRole(xChartDoc2, u"categories", nIndex)); if (xDataSeq.is()) { OUString aCategoriesSourceRange = xDataSeq->getSourceRangeRepresentation(); diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx index 6b55d112d5fb..8e8f0886d50f 100644 --- a/chart2/qa/extras/chart2import.cxx +++ b/chart2/qa/extras/chart2import.cxx @@ -918,7 +918,7 @@ void Chart2ImportTest::testDelayedCellImport() load("/chart2/qa/extras/data/xlsx/", "fdo70609.xlsx"); uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent ); Reference< chart2::data::XDataSequence > xDataSeq = - getDataSequenceFromDocByRole(xChartDoc, "values-x"); + getDataSequenceFromDocByRole(xChartDoc, u"values-x"); OUString aRange = xDataSeq->getSourceRangeRepresentation(); CPPUNIT_ASSERT_EQUAL(OUString("$Sheet2.$C$5:$C$9"), aRange); @@ -2399,7 +2399,7 @@ void Chart2ImportTest::testXaxisValues() uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); CPPUNIT_ASSERT(xChartDoc.is()); - const uno::Reference< chart2::data::XDataSequence > xDataSeq = getDataSequenceFromDocByRole(xChartDoc, "values-x"); + const uno::Reference< chart2::data::XDataSequence > xDataSeq = getDataSequenceFromDocByRole(xChartDoc, u"values-x"); Sequence<uno::Any> xSequence = xDataSeq->getData(); // test X values CPPUNIT_ASSERT_EQUAL(uno::Any(0.04), xSequence[0]); diff --git a/chart2/qa/extras/charttest.hxx b/chart2/qa/extras/charttest.hxx index bcd1f101189d..04794bbeb607 100644 --- a/chart2/qa/extras/charttest.hxx +++ b/chart2/qa/extras/charttest.hxx @@ -349,7 +349,7 @@ Reference< chart2::data::XDataSequence > getLabelDataSequenceFromDoc( } Reference< chart2::data::XDataSequence > getDataSequenceFromDocByRole( - Reference< chart2::XChartDocument > const & xChartDoc, const OUString& rRole, + Reference< chart2::XChartDocument > const & xChartDoc, std::u16string_view rRole, sal_Int32 nDataSeries = 0, sal_Int32 nChartType = 0 ) { Reference< chart2::XDataSeries > xDataSeries = diff --git a/chart2/source/model/template/DataInterpreter.cxx b/chart2/source/model/template/DataInterpreter.cxx index 7e85e0b36199..ad473df9e8d7 100644 --- a/chart2/source/model/template/DataInterpreter.cxx +++ b/chart2/source/model/template/DataInterpreter.cxx @@ -335,7 +335,7 @@ void DataInterpreter::SetRole( const Reference< data::XDataSequence > & xSeq, co uno::Any DataInterpreter::GetProperty( const Sequence< beans::PropertyValue > & aArguments, - const OUString & rName ) + std::u16string_view rName ) { for( sal_Int32 i=aArguments.getLength(); i--; ) { @@ -352,7 +352,7 @@ bool DataInterpreter::HasCategories( bool bHasCategories = false; if( rArguments.hasElements() ) - GetProperty( rArguments, "HasCategories" ) >>= bHasCategories; + GetProperty( rArguments, u"HasCategories" ) >>= bHasCategories; for( sal_Int32 nLSeqIdx=0; ! bHasCategories && nLSeqIdx<rData.getLength(); ++nLSeqIdx ) bHasCategories = ( rData[nLSeqIdx].is() && GetRole( rData[nLSeqIdx]->getValues() ) == "categories"); @@ -364,7 +364,7 @@ bool DataInterpreter::UseCategoriesAsX( const Sequence< beans::PropertyValue > & { bool bUseCategoriesAsX = true; if( rArguments.hasElements() ) - GetProperty( rArguments, "UseCategoriesAsX" ) >>= bUseCategoriesAsX; + GetProperty( rArguments, u"UseCategoriesAsX" ) >>= bUseCategoriesAsX; return bUseCategoriesAsX; } diff --git a/chart2/source/model/template/DataInterpreter.hxx b/chart2/source/model/template/DataInterpreter.hxx index 2b8bd50fc3a2..8294f5ca4c9c 100644 --- a/chart2/source/model/template/DataInterpreter.hxx +++ b/chart2/source/model/template/DataInterpreter.hxx @@ -47,7 +47,7 @@ public: static css::uno::Any GetProperty( const css::uno::Sequence<css::beans::PropertyValue > & aArguments, - const OUString & rName ); + std::u16string_view rName ); static bool HasCategories( const css::uno::Sequence< css::beans::PropertyValue > & rArguments, diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx index 44e64973e0b8..cb57a6a62207 100644 --- a/chart2/source/view/axes/VCartesianAxis.cxx +++ b/chart2/source/view/axes/VCartesianAxis.cxx @@ -790,7 +790,7 @@ bool VCartesianAxis::createTextShapes( tAnySequence aPropValues; getAxisLabelProperties(aPropNames, aPropValues, m_aAxisProperties, rAxisLabelProperties, nLimitedSpaceForText, bLimitedHeight); - uno::Any* pColorAny = PropertyMapper::getValuePointer(aPropValues,aPropNames,"CharColor"); + uno::Any* pColorAny = PropertyMapper::getValuePointer(aPropValues,aPropNames,u"CharColor"); Color nColor = COL_AUTO; if(pColorAny) *pColorAny >>= nColor; @@ -981,7 +981,7 @@ bool VCartesianAxis::createTextShapesSimple( tAnySequence aPropValues; getAxisLabelProperties(aPropNames, aPropValues, m_aAxisProperties, rAxisLabelProperties, -1, bLimitedHeight); - uno::Any* pColorAny = PropertyMapper::getValuePointer(aPropValues,aPropNames,"CharColor"); + uno::Any* pColorAny = PropertyMapper::getValuePointer(aPropValues,aPropNames,u"CharColor"); Color nColor = COL_AUTO; if(pColorAny) *pColorAny >>= nColor; diff --git a/chart2/source/view/axes/VPolarAngleAxis.cxx b/chart2/source/view/axes/VPolarAngleAxis.cxx index 70d9ac85fbb4..ae06bcf4d6da 100644 --- a/chart2/source/view/axes/VPolarAngleAxis.cxx +++ b/chart2/source/view/axes/VPolarAngleAxis.cxx @@ -67,7 +67,7 @@ void VPolarAngleAxis::createTextShapes_ForAngleAxis( LabelPositionHelper::doDynamicFontResize( aPropValues, aPropNames, xProps , rAxisLabelProperties.m_aFontReferenceSize ); - uno::Any* pColorAny = PropertyMapper::getValuePointer(aPropValues,aPropNames,"CharColor"); + uno::Any* pColorAny = PropertyMapper::getValuePointer(aPropValues,aPropNames,u"CharColor"); Color nColor = COL_AUTO; if(pColorAny) *pColorAny >>= nColor; diff --git a/chart2/source/view/inc/PropertyMapper.hxx b/chart2/source/view/inc/PropertyMapper.hxx index 7a44584349b8..2039ebdde185 100644 --- a/chart2/source/view/inc/PropertyMapper.hxx +++ b/chart2/source/view/inc/PropertyMapper.hxx @@ -82,7 +82,7 @@ public: static css::uno::Any* getValuePointer( tAnySequence& rPropValues , const tNameSequence& rPropNames - , const OUString& rPropName ); + , std::u16string_view rPropName ); static css::uno::Any* getValuePointerForLimitedSpace( tAnySequence& rPropValues diff --git a/chart2/source/view/main/LabelPositionHelper.cxx b/chart2/source/view/main/LabelPositionHelper.cxx index 35d19ebc5ab5..74fd1ed78174 100644 --- a/chart2/source/view/main/LabelPositionHelper.cxx +++ b/chart2/source/view/main/LabelPositionHelper.cxx @@ -61,7 +61,7 @@ void LabelPositionHelper::changeTextAdjustment( tAnySequence& rPropValues, const eHorizontalAdjust = drawing::TextHorizontalAdjust_LEFT; else if( eAlignment==LABEL_ALIGN_LEFT || eAlignment==LABEL_ALIGN_LEFT_TOP || eAlignment==LABEL_ALIGN_LEFT_BOTTOM ) eHorizontalAdjust = drawing::TextHorizontalAdjust_RIGHT; - uno::Any* pHorizontalAdjustAny = PropertyMapper::getValuePointer(rPropValues,rPropNames,"TextHorizontalAdjust"); + uno::Any* pHorizontalAdjustAny = PropertyMapper::getValuePointer(rPropValues,rPropNames,u"TextHorizontalAdjust"); if(pHorizontalAdjustAny) *pHorizontalAdjustAny <<= eHorizontalAdjust; } @@ -73,7 +73,7 @@ void LabelPositionHelper::changeTextAdjustment( tAnySequence& rPropValues, const eVerticalAdjust = drawing::TextVerticalAdjust_BOTTOM; else if( eAlignment==LABEL_ALIGN_BOTTOM || eAlignment==LABEL_ALIGN_RIGHT_BOTTOM || eAlignment==LABEL_ALIGN_LEFT_BOTTOM ) eVerticalAdjust = drawing::TextVerticalAdjust_TOP; - uno::Any* pVerticalAdjustAny = PropertyMapper::getValuePointer(rPropValues,rPropNames,"TextVerticalAdjust"); + uno::Any* pVerticalAdjustAny = PropertyMapper::getValuePointer(rPropValues,rPropNames,u"TextVerticalAdjust"); if(pVerticalAdjustAny) *pVerticalAdjustAny <<= eVerticalAdjust; } @@ -101,11 +101,11 @@ void LabelPositionHelper::doDynamicFontResize( tAnySequence& rPropValues awt::Size aOldReferenceSize; if( xAxisModelProps->getPropertyValue( "ReferencePageSize") >>= aOldReferenceSize ) { - uno::Any* pAOldAndNewFontHeightAny = PropertyMapper::getValuePointer( rPropValues, rPropNames, "CharHeight" ); + uno::Any* pAOldAndNewFontHeightAny = PropertyMapper::getValuePointer( rPropValues, rPropNames, u"CharHeight" ); lcl_doDynamicFontResize( pAOldAndNewFontHeightAny, aOldReferenceSize, rNewReferenceSize ); - pAOldAndNewFontHeightAny = PropertyMapper::getValuePointer( rPropValues, rPropNames, "CharHeightAsian" ); + pAOldAndNewFontHeightAny = PropertyMapper::getValuePointer( rPropValues, rPropNames, u"CharHeightAsian" ); lcl_doDynamicFontResize( pAOldAndNewFontHeightAny, aOldReferenceSize, rNewReferenceSize ); - pAOldAndNewFontHeightAny = PropertyMapper::getValuePointer( rPropValues, rPropNames, "CharHeightComplex" ); + pAOldAndNewFontHeightAny = PropertyMapper::getValuePointer( rPropValues, rPropNames, u"CharHeightComplex" ); lcl_doDynamicFontResize( pAOldAndNewFontHeightAny, aOldReferenceSize, rNewReferenceSize ); } } diff --git a/chart2/source/view/main/PropertyMapper.cxx b/chart2/source/view/main/PropertyMapper.cxx index 8611cef5d43a..c7327974249a 100644 --- a/chart2/source/view/main/PropertyMapper.cxx +++ b/chart2/source/view/main/PropertyMapper.cxx @@ -159,7 +159,7 @@ void PropertyMapper::getMultiPropertyListsFromValueMap( uno::Any* PropertyMapper::getValuePointer( tAnySequence& rPropValues , const tNameSequence& rPropNames - , const OUString& rPropName ) + , std::u16string_view rPropName ) { sal_Int32 nCount = rPropNames.getLength(); for( sal_Int32 nN = 0; nN < nCount; nN++ ) diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx index 2a2048c35016..353fd4d9630c 100644 --- a/chart2/source/view/main/VLegend.cxx +++ b/chart2/source/view/main/VLegend.cxx @@ -291,7 +291,7 @@ awt::Size lcl_placeLegendEntries( const sal_Int32 nSymbolToTextDistance = static_cast< sal_Int32 >( std::max( 100.0, fViewFontSize * 0.22 ) );//minimum 1mm const sal_Int32 nSymbolPlusDistanceWidth = rMaxSymbolExtent.Width + nSymbolToTextDistance; sal_Int32 nMaxTextWidth = rRemainingSpace.Width - nSymbolPlusDistanceWidth; - uno::Any* pFrameWidthAny = PropertyMapper::getValuePointer( rTextProperties.second, rTextProperties.first, "TextMaximumFrameWidth"); + uno::Any* pFrameWidthAny = PropertyMapper::getValuePointer( rTextProperties.second, rTextProperties.first, u"TextMaximumFrameWidth"); if(pFrameWidthAny) { if( eExpansion == css::chart::ChartLegendExpansion_HIGH ) diff --git a/chart2/source/view/main/VLegendSymbolFactory.cxx b/chart2/source/view/main/VLegendSymbolFactory.cxx index 1ccc0de34324..8af21c374dba 100644 --- a/chart2/source/view/main/VLegendSymbolFactory.cxx +++ b/chart2/source/view/main/VLegendSymbolFactory.cxx @@ -60,7 +60,7 @@ void getPropNamesAndValues( const Reference< beans::XPropertySet >& xProp, ::chart::PropertyMapper::getMultiPropertyListsFromValueMap( rNames, rValues, aValueMap ); - uno::Any* pLineWidthAny = ::chart::PropertyMapper::getValuePointer(rValues,rNames,"LineWidth"); + uno::Any* pLineWidthAny = ::chart::PropertyMapper::getValuePointer(rValues,rNames,u"LineWidth"); sal_Int32 nLineWidth = 0; if( pLineWidthAny && (*pLineWidthAny>>=nLineWidth) ) { diff --git a/comphelper/source/misc/mimeconfighelper.cxx b/comphelper/source/misc/mimeconfighelper.cxx index b41b1d3850c7..73adf6918baf 100644 --- a/comphelper/source/misc/mimeconfighelper.cxx +++ b/comphelper/source/misc/mimeconfighelper.cxx @@ -443,9 +443,9 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByFilt } -uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocumentName( const OUString& aDocName ) +uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocumentName( std::u16string_view aDocName ) { - if ( !aDocName.isEmpty() ) + if ( !aDocName.empty() ) { uno::Reference< container::XNameAccess > xObjConfig = GetObjConfiguration(); if ( xObjConfig.is() ) @@ -507,11 +507,11 @@ OUString MimeConfigurationHelper::GetFactoryNameByStringClassID( const OUString& } -OUString MimeConfigurationHelper::GetFactoryNameByDocumentName( const OUString& aDocName ) +OUString MimeConfigurationHelper::GetFactoryNameByDocumentName( std::u16string_view aDocName ) { OUString aResult; - if ( !aDocName.isEmpty() ) + if ( !aDocName.empty() ) { uno::Reference< container::XNameAccess > xObjConfig = GetObjConfiguration(); if ( xObjConfig.is() ) diff --git a/compilerplugins/clang/stringviewparam.cxx b/compilerplugins/clang/stringviewparam.cxx index 0f5ebfc70a3b..c359c1a9dc82 100644 --- a/compilerplugins/clang/stringviewparam.cxx +++ b/compilerplugins/clang/stringviewparam.cxx @@ -106,9 +106,14 @@ DeclRefExpr const* relevantDeclRefExpr(Expr const* expr) return e; } +bool isStringView(QualType qt) +{ + return bool(loplugin::TypeCheck(qt).ClassOrStruct("basic_string_view").StdNamespace()); +} + DeclRefExpr const* relevantImplicitCastExpr(ImplicitCastExpr const* expr) { - if (!loplugin::TypeCheck(expr->getType()).ClassOrStruct("basic_string_view").StdNamespace()) + if (!isStringView(expr->getType())) { return nullptr; } @@ -158,17 +163,38 @@ DeclRefExpr const* relevantCXXMemberCallExpr(CXXMemberCallExpr const* expr) DeclRefExpr const* relevantCXXOperatorCallExpr(CXXOperatorCallExpr const* expr) { - // TODO OO_EqualEqual and similar - if (expr->getOperator() != OO_Subscript) + if (expr->getOperator() == OO_Subscript) { - return nullptr; + auto const e = expr->getArg(0); + if (relevantStringType(e->getType()) == StringType::None) + { + return nullptr; + } + return relevantDeclRefExpr(e); } - auto const e = expr->getArg(0); - if (relevantStringType(e->getType()) == StringType::None) + else if (compat::isComparisonOp(expr)) { - return nullptr; + // 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()); + if (st1 == StringType::RtlOustring && st2 == StringType::RtlOustring) + { + auto e1 = relevantDeclRefExpr(expr->getArg(0)); + if (e1) + return e1; + return relevantDeclRefExpr(expr->getArg(1)); + } + if (st1 == StringType::RtlOustring && isStringView(expr->getArg(1)->getType())) + { + return relevantDeclRefExpr(expr->getArg(0)); + } + if (st2 == StringType::RtlOustring && isStringView(expr->getArg(0)->getType())) + { + return relevantDeclRefExpr(expr->getArg(1)); + } } - return relevantDeclRefExpr(e); + return nullptr; } class StringViewParam final diff --git a/compilerplugins/clang/test/stringviewparam.cxx b/compilerplugins/clang/test/stringviewparam.cxx index afa0454b0b43..decd17408506 100644 --- a/compilerplugins/clang/test/stringviewparam.cxx +++ b/compilerplugins/clang/test/stringviewparam.cxx @@ -50,4 +50,9 @@ template <> void f5<OUString>(OUString const&) {} void f6([[maybe_unused]] OUString const&) {} +// expected-error@+1 {{replace function parameter of type 'const rtl::OUString &' with 'std::u16string_view' [loplugin:stringviewparam]}} +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; } + /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/connectivity/source/cpool/ZPoolCollection.cxx b/connectivity/source/cpool/ZPoolCollection.cxx index 53c1cea0d3c3..34d24b0be4f9 100644 --- a/connectivity/source/cpool/ZPoolCollection.cxx +++ b/connectivity/source/cpool/ZPoolCollection.cxx @@ -188,7 +188,7 @@ Reference< XDriver > SAL_CALL OPoolCollection::getDriverByURL( const OUString& _ return xDriver; } -bool OPoolCollection::isDriverPoolingEnabled(const OUString& _sDriverImplName, +bool OPoolCollection::isDriverPoolingEnabled(std::u16string_view _sDriverImplName, Reference< XInterface >& _rxDriverNode) { bool bEnabled = false; diff --git a/connectivity/source/cpool/ZPoolCollection.hxx b/connectivity/source/cpool/ZPoolCollection.hxx index f9078c1baa72..dc54e2f6b171 100644 --- a/connectivity/source/cpool/ZPoolCollection.hxx +++ b/connectivity/source/cpool/ZPoolCollection.hxx @@ -88,7 +88,7 @@ namespace connectivity static css::uno::Reference< css::uno::XInterface > openNode( const OUString& _rPath, const css::uno::Reference< css::uno::XInterface >& _xTreeNode) throw(); bool isPoolingEnabled(); - bool isDriverPoolingEnabled(const OUString& _sDriverImplName, + bool isDriverPoolingEnabled(std::u16string_view _sDriverImplName, css::uno::Reference< css::uno::XInterface >& _rxDriverNode); bool isPoolingEnabledByUrl( const OUString& _sUrl, css::uno::Reference< css::sdbc::XDriver >& _rxDriver, diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index f16d2f1ee3eb..4f3e07be5938 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -589,7 +589,7 @@ void ODbaseTable::ReadMemoHeader() } } -OUString ODbaseTable::getEntry(file::OConnection const * _pConnection,const OUString& _sName ) +OUString ODbaseTable::getEntry(file::OConnection const * _pConnection, std::u16string_view _sName ) { OUString sURL; try diff --git a/connectivity/source/drivers/mysqlc/mysqlc_services.cxx b/connectivity/source/drivers/mysqlc/mysqlc_services.cxx index de611375c371..6e4e2fbb5e84 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_services.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_services.cxx @@ -48,7 +48,7 @@ struct ProviderRequest { } - bool CREATE_PROVIDER(const OUString& Implname, const Sequence<OUString>& Services, + bool CREATE_PROVIDER(std::u16string_view Implname, const Sequence<OUString>& Services, ::cppu::ComponentInstantiation Factory, createFactoryFunc creator) { if (!xRet.is() && (Implname == sImplementationName)) diff --git a/connectivity/source/inc/dbase/DTable.hxx b/connectivity/source/inc/dbase/DTable.hxx index 49b7bcc5a264..872b4d3d8c1b 100644 --- a/connectivity/source/inc/dbase/DTable.hxx +++ b/connectivity/source/inc/dbase/DTable.hxx @@ -182,7 +182,7 @@ namespace connectivity::dbase virtual void addColumn(const css::uno::Reference< css::beans::XPropertySet>& descriptor) override; virtual void dropColumn(sal_Int32 _nPos) override; - static OUString getEntry(file::OConnection const * _pConnection,const OUString& _sURL ); + static OUString getEntry(file::OConnection const * _pConnection, std::u16string_view _sURL ); static bool Drop_Static(const OUString& _sUrl, bool _bHasMemoFields, sdbcx::OCollection* _pIndexes ); virtual void refreshHeader() override; diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx index a91390eca2b8..d7d7512b7acd 100644 --- a/connectivity/source/parse/sqliterator.cxx +++ b/connectivity/source/parse/sqliterator.cxx @@ -1919,7 +1919,7 @@ const OSQLParseNode* OSQLParseTreeIterator::getSimpleHavingTree() const } -Reference< XPropertySet > OSQLParseTreeIterator::findSelectColumn( const OUString & rColumnName ) +Reference< XPropertySet > OSQLParseTreeIterator::findSelectColumn( std::u16string_view rColumnName ) { for (auto const& lookupColumn : *m_aSelectColumns) { diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx index 32529b8e4564..3a86f9882b7f 100644 --- a/cppu/source/uno/lbenv.cxx +++ b/cppu/source/uno/lbenv.cxx @@ -121,7 +121,7 @@ struct EnvironmentsData void registerEnvironment( uno_Environment ** ppEnv ); void getRegisteredEnvironments( uno_Environment *** pppEnvs, sal_Int32 * pnLen, - uno_memAlloc memAlloc, const OUString & rEnvDcp ); + uno_memAlloc memAlloc, std::u16string_view rEnvDcp ); bool isDisposing; }; @@ -968,7 +968,7 @@ void EnvironmentsData::registerEnvironment( uno_Environment ** ppEnv ) void EnvironmentsData::getRegisteredEnvironments( uno_Environment *** pppEnvs, sal_Int32 * pnLen, uno_memAlloc memAlloc, - const OUString & rEnvDcp ) + std::u16string_view rEnvDcp ) { assert(pppEnvs && pnLen && memAlloc && "### null ptr!"); @@ -980,8 +980,8 @@ void EnvironmentsData::getRegisteredEnvironments( for ( const auto& rEntry : aName2EnvMap ) { uno_Environment * pWeak = rEntry.second; - if (rEnvDcp.isEmpty() || - rEnvDcp == pWeak->pTypeName ) + if (rEnvDcp.empty() || + rEnvDcp == OUString::unacquired(&pWeak->pTypeName) ) { aFounds[nSize] = nullptr; (*pWeak->harden)( &aFounds[nSize], pWeak ); diff --git a/cui/source/customize/SvxNotebookbarConfigPage.cxx b/cui/source/customize/SvxNotebookbarConfigPage.cxx index c8b594b9039e..b3dd97f1d43d 100644 --- a/cui/source/customize/SvxNotebookbarConfigPage.cxx +++ b/cui/source/customize/SvxNotebookbarConfigPage.cxx @@ -49,8 +49,8 @@ namespace container = com::sun::star::container; namespace beans = com::sun::star::beans; namespace graphic = com::sun::star::graphic; -static bool isCategoryAvailable(const OUString& sClassId, const OUString& sUIItemId, - const OUString& sActiveCategory, bool& isCategory) +static bool isCategoryAvailable(const OUString& sClassId, std::u16string_view sUIItemId, + std::u16string_view sActiveCategory, bool& isCategory) { if (sUIItemId == sActiveCategory) return true; @@ -474,7 +474,7 @@ SvxNotebookbarEntriesListBox::SvxNotebookbarEntriesListBox(std::unique_ptr<weld: SvxNotebookbarEntriesListBox::~SvxNotebookbarEntriesListBox() {} -static void EditRegistryFile(const OUString& sUIItemId, const OUString& sSetEntry, +static void EditRegistryFile(std::u16string_view sUIItemId, const OUString& sSetEntry, const OUString& sNotebookbarInterface) { int nFlag = 0; diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx index f1c5ccef7221..778e2940ba1d 100644 --- a/cui/source/customize/cfgutil.cxx +++ b/cui/source/customize/cfgutil.cxx @@ -757,7 +757,7 @@ OUString CuiConfigGroupListBox::GetImage( } Reference< XInterface > -CuiConfigGroupListBox::getDocumentModel( Reference< XComponentContext > const & xCtx, OUString const & docName ) +CuiConfigGroupListBox::getDocumentModel( Reference< XComponentContext > const & xCtx, std::u16string_view docName ) { Reference< XInterface > xModel; Reference< frame::XDesktop2 > desktop = frame::Desktop::create( xCtx ); diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx index f2deeb9b3c78..140d2a59da3b 100644 --- a/cui/source/dialogs/hlinettp.cxx +++ b/cui/source/dialogs/hlinettp.cxx @@ -279,7 +279,7 @@ void SvxHyperlinkInternetTp::SetScheme(const OUString& rScheme) |* |************************************************************************/ -void SvxHyperlinkInternetTp::RemoveImproperProtocol(const OUString& aProperScheme) +void SvxHyperlinkInternetTp::RemoveImproperProtocol(std::u16string_view aProperScheme) { OUString aStrURL ( m_xCbbTarget->get_active_text() ); if ( !aStrURL.isEmpty() ) diff --git a/cui/source/dialogs/hlmailtp.cxx b/cui/source/dialogs/hlmailtp.cxx index 1cae4b29d2fa..521af033b422 100644 --- a/cui/source/dialogs/hlmailtp.cxx +++ b/cui/source/dialogs/hlmailtp.cxx @@ -167,7 +167,7 @@ void SvxHyperlinkMailTp::SetInitFocus() /************************************************************************* |************************************************************************/ -void SvxHyperlinkMailTp::SetScheme(const OUString& rScheme) +void SvxHyperlinkMailTp::SetScheme(std::u16string_view rScheme) { //update target: RemoveImproperProtocol(rScheme); @@ -183,7 +183,7 @@ void SvxHyperlinkMailTp::SetScheme(const OUString& rScheme) |* Remove protocol if it does not fit to the current button selection |* |************************************************************************/ -void SvxHyperlinkMailTp::RemoveImproperProtocol(const OUString& aProperScheme) +void SvxHyperlinkMailTp::RemoveImproperProtocol(std::u16string_view aProperScheme) { OUString aStrURL(m_xCbbReceiver->get_active_text()); if ( !aStrURL.isEmpty() ) diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx index ab28675b4932..8996c0e6790c 100644 --- a/cui/source/dialogs/hlmarkwn.cxx +++ b/cui/source/dialogs/hlmarkwn.cxx @@ -382,7 +382,7 @@ void SvxHlinkDlgMarkWnd::ClearTree() } // Find Entry for String -std::unique_ptr<weld::TreeIter> SvxHlinkDlgMarkWnd::FindEntry (const OUString& aStrName) +std::unique_ptr<weld::TreeIter> SvxHlinkDlgMarkWnd::FindEntry (std::u16string_view aStrName) { bool bFound=false; std::unique_ptr<weld::TreeIter> xEntry = mxLbTree->make_iterator(); @@ -404,7 +404,7 @@ std::unique_ptr<weld::TreeIter> SvxHlinkDlgMarkWnd::FindEntry (const OUString& a } // Select Entry -bool SvxHlinkDlgMarkWnd::SelectEntry(const OUString& aStrMark) +bool SvxHlinkDlgMarkWnd::SelectEntry(std::u16string_view aStrMark) { std::unique_ptr<weld::TreeIter> xEntry = FindEntry(aStrMark); if (!xEntry) diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index 78bb8be5d8f8..cb7d8776dcbd 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -113,7 +113,7 @@ void SvxScriptOrgDialog::deleteAllTree() while (bNextEntry); } -void SvxScriptOrgDialog::Init( const OUString& language ) +void SvxScriptOrgDialog::Init( std::u16string_view language ) { m_xScriptsBox->freeze(); @@ -202,7 +202,7 @@ void SvxScriptOrgDialog::Init( const OUString& language ) } Reference< XInterface > -SvxScriptOrgDialog::getDocumentModel( Reference< XComponentContext > const & xCtx, OUString const & docName ) +SvxScriptOrgDialog::getDocumentModel( Reference< XComponentContext > const & xCtx, std::u16string_view docName ) { Reference< XInterface > xModel; Reference< frame::XDesktop2 > desktop = frame::Desktop::create(xCtx); @@ -229,7 +229,7 @@ SvxScriptOrgDialog::getDocumentModel( Reference< XComponentContext > const & xCt } Reference< browse::XBrowseNode > -SvxScriptOrgDialog::getLangNodeFromRootNode( Reference< browse::XBrowseNode > const & rootNode, OUString const & language ) +SvxScriptOrgDialog::getLangNodeFromRootNode( Reference< browse::XBrowseNode > const & rootNode, std::u16string_view language ) { Reference< browse::XBrowseNode > langNode; diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx index c4d50e2aeb12..8187d5e14314 100644 --- a/cui/source/inc/cfgutil.hxx +++ b/cui/source/inc/cfgutil.hxx @@ -196,7 +196,7 @@ class CuiConfigGroupListBox static css::uno::Reference< css::uno::XInterface > getDocumentModel( css::uno::Reference< css::uno::XComponentContext > const & xCtx, - OUString const & docName); + std::u16string_view docName); void InitModule(); void FillScriptList(const css::uno::Reference< css::script::browse::XBrowseNode >& xRootNode, diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx index a1927624f20d..aa660c6d791d 100644 --- a/cui/source/inc/cuitabarea.hxx +++ b/cui/source/inc/cuitabarea.hxx @@ -392,7 +392,7 @@ private: void ModifiedHdl_Impl(void const *); void SetControlState_Impl( css::awt::GradientStyle eXGS ); - sal_Int32 SearchGradientList(const OUString& rGradientName); + sal_Int32 SearchGradientList(std::u16string_view rGradientName); public: SvxGradientTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs); @@ -460,7 +460,7 @@ private: DECL_LINK( ClickRenameHdl_Impl, SvxPresetListBox*, void ); DECL_LINK( ClickDeleteHdl_Impl, SvxPresetListBox*, void ); - sal_Int32 SearchHatchList(const OUString& rHatchName); + sal_Int32 SearchHatchList(std::u16string_view rHatchName); public: SvxHatchTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs); @@ -538,7 +538,7 @@ private: DECL_LINK( ClickImportHdl, weld::Button&, void ); void ClickBitmapHdl_Impl(); void CalculateBitmapPresetSize(); - sal_Int32 SearchBitmapList(const OUString& rBitmapName); + sal_Int32 SearchBitmapList(std::u16string_view rBitmapName); sal_Int32 SearchBitmapList(const GraphicObject& rGraphicObject); public: @@ -593,7 +593,7 @@ private: DECL_LINK( ClickRenameHdl_Impl, SvxPresetListBox*, void ); DECL_LINK( ClickDeleteHdl_Impl, SvxPresetListBox*, void ); - sal_Int32 SearchPatternList(const OUString& rPatternName); + sal_Int32 SearchPatternList(std::u16string_view rPatternName); public: SvxPatternTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs); @@ -706,7 +706,7 @@ private: void UpdateModified(); - static sal_Int32 FindInCustomColors( OUString const & aColorName ); + static sal_Int32 FindInCustomColors( std::u16string_view aColorName ); sal_Int32 FindInPalette( const Color& rColor ); public: diff --git a/cui/source/inc/hlinettp.hxx b/cui/source/inc/hlinettp.hxx index 528a54594fcb..c317fc122fd4 100644 --- a/cui/source/inc/hlinettp.hxx +++ b/cui/source/inc/hlinettp.hxx @@ -55,7 +55,7 @@ private: void SetScheme(const OUString& rScheme); - void RemoveImproperProtocol(const OUString& rProperScheme); + void RemoveImproperProtocol(std::u16string_view rProperScheme); OUString GetSchemeFromButtons() const; INetProtocol GetSmartProtocolFromButtons() const; diff --git a/cui/source/inc/hlmailtp.hxx b/cui/source/inc/hlmailtp.hxx index 12600f32e890..8b8bc39d88cb 100644 --- a/cui/source/inc/hlmailtp.hxx +++ b/cui/source/inc/hlmailtp.hxx @@ -38,8 +38,8 @@ private: ///< Button : Address book DECL_LINK (ModifiedReceiverHdl_Impl, weld::ComboBox&, void ); ///< Combobox "receiver" modified - void SetScheme(const OUString& rScheme); - void RemoveImproperProtocol(const OUString& aProperScheme); + void SetScheme(std::u16string_view rScheme); + void RemoveImproperProtocol(std::u16string_view aProperScheme); OUString CreateAbsoluteURL() const; diff --git a/cui/source/inc/hlmarkwn.hxx b/cui/source/inc/hlmarkwn.hxx index ee7924e3aa03..9552bc10097c 100644 --- a/cui/source/inc/hlmarkwn.hxx +++ b/cui/source/inc/hlmarkwn.hxx @@ -47,7 +47,7 @@ protected: bool RefreshFromDoc( const OUString& aURL ); void RestoreLastSelection(); - std::unique_ptr<weld::TreeIter> FindEntry(const OUString& aStrName); + std::unique_ptr<weld::TreeIter> FindEntry(std::u16string_view aStrName); void ClearTree(); int FillTree( const css::uno::Reference< css::container::XNameAccess >& xLinks, const weld::TreeIter* pParentEntry =nullptr ); @@ -61,7 +61,7 @@ public: void MoveTo(const Point& rNewPos); void RefreshTree(const OUString& aStrURL); - bool SelectEntry(const OUString& aStrMark); + bool SelectEntry(std::u16string_view aStrMark); sal_uInt16 SetError( sal_uInt16 nError); }; diff --git a/cui/source/inc/optdict.hxx b/cui/source/inc/optdict.hxx index 2465613322af..1449e9457ad9 100644 --- a/cui/source/inc/optdict.hxx +++ b/cui/source/inc/optdict.hxx @@ -102,7 +102,7 @@ private: int GetLBInsertPos(const OUString &rDicWord); public: - SvxEditDictionaryDialog(weld::Window* pParent, const OUString& rName); + SvxEditDictionaryDialog(weld::Window* pParent, std::u16string_view rName); virtual ~SvxEditDictionaryDialog() override; }; diff --git a/cui/source/inc/scriptdlg.hxx b/cui/source/inc/scriptdlg.hxx index 65e76e534ffd..6a1cbd15ae5c 100644 --- a/cui/source/inc/scriptdlg.hxx +++ b/cui/source/inc/scriptdlg.hxx @@ -115,7 +115,7 @@ protected: void StoreCurrentSelection(); void RestorePreviousSelection(); - void Init(const OUString& language); + void Init(std::u16string_view language); void delUserData(const weld::TreeIter& rIter); void deleteTree(weld::TreeIter& rIter); void deleteAllTree(); @@ -135,9 +135,9 @@ protected: css::uno::Reference< css::frame::XModel>& model); static css::uno::Reference< css::script::browse::XBrowseNode > - getLangNodeFromRootNode( css::uno::Reference< css::script::browse::XBrowseNode > const & root, OUString const & language ); + getLangNodeFromRootNode( css::uno::Reference< css::script::browse::XBrowseNode > const & root, std::u16string_view language ); - static css::uno::Reference< css::uno::XInterface > getDocumentModel( css::uno::Reference< css::uno::XComponentContext > const & xCtx, OUString const & docName ); + static css::uno::Reference< css::uno::XInterface > getDocumentModel( css::uno::Reference< css::uno::XComponentContext > const & xCtx, std::u16string_view docName ); public: // prob need another arg in the ctor diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx index a07232848b6c..59f7ef2d3e03 100644 --- a/cui/source/inc/treeopt.hxx +++ b/cui/source/inc/treeopt.hxx @@ -150,11 +150,11 @@ private: void Initialize( const css::uno::Reference< css::frame::XFrame >& _xFrame ); void InitWidgets(); - void LoadExtensionOptions( const OUString& rExtensionId ); + void LoadExtensionOptions( std::u16string_view rExtensionId ); static OUString GetModuleIdentifier( const css::uno::Reference< css::frame::XFrame >& xFrame ); - static std::unique_ptr<Module> LoadModule( const OUString& rModuleIdentifier ); - static VectorOfNodes LoadNodes( Module* pModule, const OUString& rExtensionId ); + static std::unique_ptr<Module> LoadModule( std::u16string_view rModuleIdentifier ); + static VectorOfNodes LoadNodes( Module* pModule, std::u16string_view rExtensionId ); void InsertNodes( const VectorOfNodes& rNodeList ); void ApplyOptions(); @@ -177,7 +177,7 @@ public: OfaTreeOptionsDialog(weld::Window* pParent, const css::uno::Reference< css::frame::XFrame >& _xFrame, bool bActivateLastSelection); - OfaTreeOptionsDialog(weld::Window* pParent, const OUString& rExtensionId); + OfaTreeOptionsDialog(weld::Window* pParent, std::u16string_view rExtensionId); virtual ~OfaTreeOptionsDialog() override; OptionsPageInfo* AddTabPage( sal_uInt16 nId, const OUString& rPageName, sal_uInt16 nGroup ); diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx index b067aaf05f80..997f57798860 100644 --- a/cui/source/options/fontsubs.cxx +++ b/cui/source/options/fontsubs.cxx @@ -267,7 +267,7 @@ IMPL_LINK(SvxFontSubstTabPage, SelectComboBoxHdl, weld::ComboBox&, rBox, void) namespace { // search in the "font" column - int findText(const weld::TreeView& rTreeView, const OUString& rCol) + int findText(const weld::TreeView& rTreeView, std::u16string_view rCol) { for (int i = 0, nEntryCount = rTreeView.n_children(); i < nEntryCount; ++i) { @@ -277,7 +277,7 @@ namespace return -1; } - bool findRow(const weld::TreeView& rTreeView, const OUString& rCol1, const OUString& rCol2) + bool findRow(const weld::TreeView& rTreeView, std::u16string_view rCol1, std::u16string_view rCol2) { int nRow = findText(rTreeView, rCol1); if (nRow == -1) diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx index 5832e8321c53..55bfd4b72224 100644 --- a/cui/source/options/optdict.cxx +++ b/cui/source/options/optdict.cxx @@ -198,7 +198,7 @@ IMPL_LINK_NOARG(SvxNewDictionaryDialog, ModifyHdl_Impl, weld::Entry&, void) // class SvxEditDictionaryDialog ------------------------------------------- -SvxEditDictionaryDialog::SvxEditDictionaryDialog(weld::Window* pParent, const OUString& rName) +SvxEditDictionaryDialog::SvxEditDictionaryDialog(weld::Window* pParent, std::u16string_view rName) : GenericDialogController(pParent, "cui/ui/editdictionarydialog.ui", "EditDictionaryDialog") , sModify(CuiResId(STR_MODIFY)) , bFirstSelect(false) diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx index ed695295b583..e6af34320fe7 100644 --- a/cui/source/options/optjava.cxx +++ b/cui/source/options/optjava.cxx @@ -893,7 +893,7 @@ IMPL_LINK_NOARG(SvxJavaClassPathDlg, SelectHdl_Impl, weld::TreeView&, void) EnableRemoveButton(); } -bool SvxJavaClassPathDlg::IsPathDuplicate( const OUString& _rPath ) +bool SvxJavaClassPathDlg::IsPathDuplicate( std::u16string_view _rPath ) { bool bRet = false; int nCount = m_xPathList->n_children(); diff --git a/cui/source/options/optjava.hxx b/cui/source/options/optjava.hxx index d850986a45b0..a3af9aaf71b1 100644 --- a/cui/source/options/optjava.hxx +++ b/cui/source/options/optjava.hxx @@ -185,7 +185,7 @@ private: DECL_LINK(RemoveHdl_Impl, weld::Button&, void); DECL_LINK(SelectHdl_Impl, weld::TreeView&, void); - bool IsPathDuplicate(const OUString& _rPath); + bool IsPathDuplicate(std::u16string_view _rPath); void EnableRemoveButton() { m_xRemoveBtn->set_sensitive(m_xPathList->get_selected_index() != -1); diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index 09cdb0d9e1b5..1b646fc51043 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -75,7 +75,7 @@ const char cThes[] = SN_THESAURUS; // static ---------------------------------------------------------------- static sal_Int32 lcl_SeqGetEntryPos( - const Sequence< OUString > &rSeq, const OUString &rEntry ) + const Sequence< OUString > &rSeq, std::u16string_view rEntry ) { sal_Int32 i; sal_Int32 nLen = rSeq.getLength(); @@ -357,7 +357,7 @@ public: uno::Reference<XLinguServiceManager2> & GetManager() { return xLinguSrvcMgr; } void SetChecked( const Sequence< OUString > &rConfiguredServices ); - void Reconfigure( const OUString &rDisplayName, bool bEnable ); + void Reconfigure( std::u16string_view rDisplayName, bool bEnable ); const Sequence<Locale> & GetAllSupportedLocales() const { return aAllServiceLocales; } @@ -380,11 +380,11 @@ public: // language. Sequence< OUString > GetSortedImplNames( LanguageType nLang, sal_uInt8 nType ); - ServiceInfo_Impl * GetInfoByImplName( const OUString &rSvcImplName ); + ServiceInfo_Impl * GetInfoByImplName( std::u16string_view rSvcImplName ); }; -static sal_Int32 lcl_SeqGetIndex( const Sequence< OUString > &rSeq, const OUString &rTxt ) +static sal_Int32 lcl_SeqGetIndex( const Sequence< OUString > &rSeq, std::u16string_view rTxt ) { sal_Int32 nRes = -1; sal_Int32 nLen = rSeq.getLength(); @@ -449,7 +449,7 @@ Sequence< OUString > SvxLinguData_Impl::GetSortedImplNames( LanguageType nLang, } -ServiceInfo_Impl * SvxLinguData_Impl::GetInfoByImplName( const OUString &rSvcImplName ) +ServiceInfo_Impl * SvxLinguData_Impl::GetInfoByImplName( std::u16string_view rSvcImplName ) { for (sal_uInt32 i = 0; i < nDisplayServices; ++i) { @@ -730,9 +730,9 @@ bool SvxLinguData_Impl::AddRemove( } -void SvxLinguData_Impl::Reconfigure( const OUString &rDisplayName, bool bEnable ) +void SvxLinguData_Impl::Reconfigure( std::u16string_view rDisplayName, bool bEnable ) { - DBG_ASSERT( !rDisplayName.isEmpty(), "empty DisplayName" ); + DBG_ASSERT( !rDisplayName.empty(), "empty DisplayName" ); ServiceInfo_Impl *pInfo = nullptr; for (sal_uInt32 i = 0; i < nDisplayServices; ++i) diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 6e822e974c5e..6f63828c173f 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -159,7 +159,7 @@ static ModuleToGroupNameMap_Impl ModuleMap[] = { u"Base", OUString(), SID_SB_STARBASEOPTIONS }, }; -static void setGroupName( const OUString& rModule, const OUString& rGroupName ) +static void setGroupName( std::u16string_view rModule, const OUString& rGroupName ) { for (ModuleToGroupNameMap_Impl& rEntry : ModuleMap) { @@ -209,7 +209,7 @@ static void deleteGroupNames() rEntry.m_sGroupName.clear(); } -static sal_uInt16 getGroupNodeId( const OUString& rModule ) +static sal_uInt16 getGroupNodeId( std::u16string_view rModule ) { sal_uInt16 nNodeId = 0xFFFF; for (const ModuleToGroupNameMap_Impl& rEntry : ModuleMap) @@ -496,7 +496,7 @@ OfaTreeOptionsDialog::OfaTreeOptionsDialog(weld::Window* pParent, const Referenc InitTreeAndHandler(); Initialize( _xFrame ); - LoadExtensionOptions( OUString() ); + LoadExtensionOptions( u"" ); if (bActivateLastSelection) ActivateLastSelection(); @@ -504,13 +504,13 @@ OfaTreeOptionsDialog::OfaTreeOptionsDialog(weld::Window* pParent, const Referenc } // Ctor() with ExtensionId ----------------------------------------------- -OfaTreeOptionsDialog::OfaTreeOptionsDialog(weld::Window* pParent, const OUString& rExtensionId) +OfaTreeOptionsDialog::OfaTreeOptionsDialog(weld::Window* pParent, std::u16string_view rExtensionId) : SfxOkDialogController(pParent, "cui/ui/optionsdialog.ui", "OptionsDialog") INI_LIST() { InitWidgets(); - bIsFromExtensionManager = ( !rExtensionId.isEmpty() ); + bIsFromExtensionManager = ( !rExtensionId.empty() ); InitTreeAndHandler(); LoadExtensionOptions( rExtensionId ); ActivateLastSelection(); @@ -1359,7 +1359,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) // %PRODUCTNAME options if ( !lcl_isOptionHidden( SID_GENERAL_OPTIONS, aOptionsDlgOpt ) ) { - setGroupName("ProductName", CuiResId(SID_GENERAL_OPTIONS_RES[0].first)); + setGroupName(u"ProductName", CuiResId(SID_GENERAL_OPTIONS_RES[0].first)); nGroup = AddGroup(CuiResId(SID_GENERAL_OPTIONS_RES[0].first), nullptr, nullptr, SID_GENERAL_OPTIONS ); const sal_uInt16 nEnd = static_cast<sal_uInt16>(SAL_N_ELEMENTS(SID_GENERAL_OPTIONS_RES)); @@ -1399,7 +1399,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) // Load and Save options if ( !lcl_isOptionHidden( SID_FILTER_DLG, aOptionsDlgOpt ) ) { - setGroupName( "LoadSave", CuiResId(SID_FILTER_DLG_RES[0].first) ); + setGroupName( u"LoadSave", CuiResId(SID_FILTER_DLG_RES[0].first) ); nGroup = AddGroup( CuiResId(SID_FILTER_DLG_RES[0].first), nullptr, nullptr, SID_FILTER_DLG ); for ( size_t i = 1; i < SAL_N_ELEMENTS(SID_FILTER_DLG_RES); ++i ) { @@ -1413,7 +1413,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) SvtLanguageOptions aLanguageOptions; if ( !lcl_isOptionHidden( SID_LANGUAGE_OPTIONS, aOptionsDlgOpt ) ) { - setGroupName("LanguageSettings", CuiResId(SID_LANGUAGE_OPTIONS_RES[0].first)); + setGroupName(u"LanguageSettings", CuiResId(SID_LANGUAGE_OPTIONS_RES[0].first)); nGroup = AddGroup(CuiResId(SID_LANGUAGE_OPTIONS_RES[0].first), nullptr, nullptr, SID_LANGUAGE_OPTIONS ); for (size_t i = 1; i < SAL_N_ELEMENTS(SID_LANGUAGE_OPTIONS_RES); ++i) { @@ -1443,9 +1443,9 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) if ( !lcl_isOptionHidden( SID_SW_EDITOPTIONS, aOptionsDlgOpt ) ) { if ( aFactory == "com.sun.star.text.WebDocument" ) - setGroupName( "WriterWeb", CuiResId(SID_SW_EDITOPTIONS_RES[0].first) ); + setGroupName( u"WriterWeb", CuiResId(SID_SW_EDITOPTIONS_RES[0].first) ); else - setGroupName( "Writer", CuiResId(SID_SW_EDITOPTIONS_RES[0].first) ); + setGroupName( u"Writer", CuiResId(SID_SW_EDITOPTIONS_RES[0].first) ); nGroup = AddGroup(CuiResId(SID_SW_EDITOPTIONS_RES[0].first), pSwMod, pSwMod, SID_SW_EDITOPTIONS ); for ( size_t i = 1; i < SAL_N_ELEMENTS(SID_SW_EDITOPTIONS_RES); ++i ) { @@ -1487,7 +1487,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) if ( !lcl_isOptionHidden( SID_SC_EDITOPTIONS, aOptionsDlgOpt ) ) { SfxModule* pScMod = SfxApplication::GetModule( SfxToolsModule::Calc ); - setGroupName( "Calc", CuiResId(SID_SC_EDITOPTIONS_RES[0].first) ); + setGroupName( u"Calc", CuiResId(SID_SC_EDITOPTIONS_RES[0].first) ); nGroup = AddGroup( CuiResId(SID_SC_EDITOPTIONS_RES[0].first), pScMod, pScMod, SID_SC_EDITOPTIONS ); const sal_uInt16 nCount = static_cast<sal_uInt16>(SAL_N_ELEMENTS(SID_SC_EDITOPTIONS_RES)); for ( sal_uInt16 i = 1; i < nCount; ++i ) @@ -1510,7 +1510,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) { if ( !lcl_isOptionHidden( SID_SD_EDITOPTIONS, aOptionsDlgOpt ) ) { - setGroupName( "Impress", CuiResId(SID_SD_EDITOPTIONS_RES[0].first) ); + setGroupName( u"Impress", CuiResId(SID_SD_EDITOPTIONS_RES[0].first) ); nGroup = AddGroup( CuiResId(SID_SD_EDITOPTIONS_RES[0].first), pSdMod, pSdMod, SID_SD_EDITOPTIONS ); const sal_uInt16 nCount = static_cast<sal_uInt16>(SAL_N_ELEMENTS(SID_SD_EDITOPTIONS_RES)); for ( sal_uInt16 i = 1; i < nCount; ++i ) @@ -1532,7 +1532,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) { if ( !lcl_isOptionHidden( SID_SD_GRAPHIC_OPTIONS, aOptionsDlgOpt ) ) { - setGroupName( "Draw", CuiResId(SID_SD_GRAPHIC_OPTIONS_RES[0].first) ); + setGroupName( u"Draw", CuiResId(SID_SD_GRAPHIC_OPTIONS_RES[0].first) ); nGroup = AddGroup( CuiResId(SID_SD_GRAPHIC_OPTIONS_RES[0].first), pSdMod, pSdMod, SID_SD_GRAPHIC_OPTIONS ); const sal_uInt16 nCount = static_cast<sal_uInt16>(SAL_N_ELEMENTS(SID_SD_GRAPHIC_OPTIONS_RES)); for ( sal_uInt16 i = 1; i < nCount; ++i ) @@ -1555,7 +1555,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) if ( !lcl_isOptionHidden( SID_SM_EDITOPTIONS, aOptionsDlgOpt ) ) { SfxModule* pSmMod = SfxApplication::GetModule(SfxToolsModule::Math); - setGroupName( "Math", CuiResId(SID_SM_EDITOPTIONS_RES[0].first) ); + setGroupName( u"Math", CuiResId(SID_SM_EDITOPTIONS_RES[0].first) ); nGroup = AddGroup(CuiResId(SID_SM_EDITOPTIONS_RES[0].first), pSmMod, pSmMod, SID_SM_EDITOPTIONS ); for ( size_t i = 1; i < SAL_N_ELEMENTS(SID_SM_EDITOPTIONS_RES); ++i ) { @@ -1574,7 +1574,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) || aModuleOpt.IsModuleInstalled( SvtModuleOptions::EModule::CALC ) ) ) { - setGroupName( "Base", CuiResId(SID_SB_STARBASEOPTIONS_RES[0].first) ); + setGroupName( u"Base", CuiResId(SID_SB_STARBASEOPTIONS_RES[0].first) ); nGroup = AddGroup( CuiResId(SID_SB_STARBASEOPTIONS_RES[0].first), nullptr, nullptr, SID_SB_STARBASEOPTIONS ); for ( size_t i = 1; i < SAL_N_ELEMENTS(SID_SB_STARBASEOPTIONS_RES); ++i ) { @@ -1587,7 +1587,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) // Chart options (always installed and active) if ( !lcl_isOptionHidden( SID_SCH_EDITOPTIONS, aOptionsDlgOpt ) ) { - setGroupName( "Charts", CuiResId(SID_SCH_EDITOPTIONS_RES[0].first) ); + setGroupName( u"Charts", CuiResId(SID_SCH_EDITOPTIONS_RES[0].first) ); nGroup = AddGroup( CuiResId(SID_SCH_EDITOPTIONS_RES[0].first), nullptr, nullptr, SID_SCH_EDITOPTIONS ); for ( size_t i = 1; i < SAL_N_ELEMENTS(SID_SCH_EDITOPTIONS_RES); ++i ) { @@ -1601,7 +1601,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) if ( lcl_isOptionHidden( SID_INET_DLG, aOptionsDlgOpt ) ) return; - setGroupName("Internet", CuiResId(SID_INET_DLG_RES[0].first)); + setGroupName(u"Internet", CuiResId(SID_INET_DLG_RES[0].first)); nGroup = AddGroup(CuiResId(SID_INET_DLG_RES[0].first), nullptr, nullptr, SID_INET_DLG ); for ( size_t i = 1; i < SAL_N_ELEMENTS(SID_INET_DLG_RES); ++i ) @@ -1645,12 +1645,12 @@ static bool isNodeActive( OptionsNode const * pNode, Module* pModule ) return false; } -void OfaTreeOptionsDialog::LoadExtensionOptions( const OUString& rExtensionId ) +void OfaTreeOptionsDialog::LoadExtensionOptions( std::u16string_view rExtensionId ) { std::unique_ptr<Module> pModule; // when called by Tools - Options then load nodes of active module - if ( rExtensionId.isEmpty() ) + if ( rExtensionId.empty() ) { pModule = LoadModule( GetModuleIdentifier( Reference< XFrame >() ) ); } @@ -1691,7 +1691,7 @@ OUString OfaTreeOptionsDialog::GetModuleIdentifier( const Reference< XFrame >& r } std::unique_ptr<Module> OfaTreeOptionsDialog::LoadModule( - const OUString& rModuleIdentifier ) + std::u16string_view rModuleIdentifier ) { std::unique_ptr<Module> pModule; Reference< XNameAccess > xSet( @@ -1754,7 +1754,7 @@ std::unique_ptr<Module> OfaTreeOptionsDialog::LoadModule( } VectorOfNodes OfaTreeOptionsDialog::LoadNodes( - Module* pModule, const OUString& rExtensionId) + Module* pModule, std::u16string_view rExtensionId) { VectorOfNodes aOutNodeList; @@ -1780,12 +1780,12 @@ VectorOfNodes OfaTreeOptionsDialog::LoadNodes( if ( sLabel.isEmpty() ) sLabel = sGroupName; - OUString sTemp = getGroupName( sLabel, !rExtensionId.isEmpty() ); + OUString sTemp = getGroupName( sLabel, !rExtensionId.empty() ); if ( !sTemp.isEmpty() ) sLabel = sTemp; std::unique_ptr<OptionsNode> pNode(new OptionsNode(sNodeId, sLabel, bAllModules)); - if ( rExtensionId.isEmpty() && !isNodeActive( pNode.get(), pModule ) ) + if ( rExtensionId.empty() && !isNodeActive( pNode.get(), pModule ) ) { continue; } @@ -1812,7 +1812,7 @@ VectorOfNodes OfaTreeOptionsDialog::LoadNodes( xLeaveAccess->getByName( "GroupId" ) >>= sLeafGrpId; xLeaveAccess->getByName( "GroupIndex" ) >>= nLeafGrpIdx; - if ( rExtensionId.isEmpty() || sId == rExtensionId ) + if ( rExtensionId.empty() || sId == rExtensionId ) { std::unique_ptr<OptionsLeaf> pLeaf(new OptionsLeaf( sLeafLabel, sLeafURL, sEventHdl, sLeafGrpId, nLeafGrpIdx )); @@ -1883,7 +1883,7 @@ VectorOfNodes OfaTreeOptionsDialog::LoadNodes( return aOutNodeList; } -static sal_uInt16 lcl_getGroupId( const OUString& rGroupName, const weld::TreeView& rTreeLB ) +static sal_uInt16 lcl_getGroupId( std::u16string_view rGroupName, const weld::TreeView& rTreeLB ) { sal_uInt16 nRet = 0; diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 2328277eb4d8..9b5ff2e30418 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -1175,7 +1175,7 @@ IMPL_LINK(OfaAutocorrReplacePage, ModifyHdl, weld::Entry&, rEdt, void) m_xNewReplacePB->set_sensitive(bEnableNew); } -static bool lcl_FindInArray(std::vector<OUString>& rStrings, const OUString& rString) +static bool lcl_FindInArray(std::vector<OUString>& rStrings, std::u16string_view rString) { for (auto const& elem : rStrings) { diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index ebb4426f6ce2..647bcaa105e3 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -802,7 +802,7 @@ sal_Int32 SvxBitmapTabPage::SearchBitmapList(const GraphicObject& rGraphicObject return nPos; } -sal_Int32 SvxBitmapTabPage::SearchBitmapList(const OUString& rBitmapName) +sal_Int32 SvxBitmapTabPage::SearchBitmapList(std::u16string_view rBitmapName) { tools::Long nCount = m_pBitmapList->Count(); bool bValidBitmapName = true; diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index c9a6060f8169..6eac86883c99 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -620,7 +620,7 @@ void SvxColorTabPage::UpdateColorValues( bool bUpdatePreset ) } } -sal_Int32 SvxColorTabPage::FindInCustomColors(OUString const & aColorName) +sal_Int32 SvxColorTabPage::FindInCustomColors(std::u16string_view aColorName) { css::uno::Sequence< OUString > aCustomColorNameList(officecfg::Office::Common::UserColors::CustomColorName::get()); tools::Long nCount = aCustomColorNameList.getLength(); diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx index 76b58d775cc0..573659a471aa 100644 --- a/cui/source/tabpages/tpgradnt.cxx +++ b/cui/source/tabpages/tpgradnt.cxx @@ -609,7 +609,7 @@ void SvxGradientTabPage::SetControlState_Impl( css::awt::GradientStyle eXGS ) } } -sal_Int32 SvxGradientTabPage::SearchGradientList(const OUString& rGradientName) +sal_Int32 SvxGradientTabPage::SearchGradientList(std::u16string_view rGradientName) { tools::Long nCount = m_pGradientList->Count(); bool bValidGradientName = true; diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx index f2ff5360e73b..ec391dba935d 100644 --- a/cui/source/tabpages/tphatch.cxx +++ b/cui/source/tabpages/tphatch.cxx @@ -199,7 +199,7 @@ DeactivateRC SvxHatchTabPage::DeactivatePage( SfxItemSet* _pSet ) return DeactivateRC::LeavePage; } -sal_Int32 SvxHatchTabPage::SearchHatchList(const OUString& rHatchName) +sal_Int32 SvxHatchTabPage::SearchHatchList(std::u16string_view rHatchName) { tools::Long nCount = m_pHatchingList->Count(); bool bValidHatchName = true; diff --git a/cui/source/tabpages/tppattern.cxx b/cui/source/tabpages/tppattern.cxx index 227100915483..9dfa12799c93 100644 --- a/cui/source/tabpages/tppattern.cxx +++ b/cui/source/tabpages/tppattern.cxx @@ -534,7 +534,7 @@ void SvxPatternTabPage::PointChanged(weld::DrawingArea* pDrawingArea, RectPoint) m_xPatternLB->SetNoSelection(); } -sal_Int32 SvxPatternTabPage::SearchPatternList(const OUString& rPatternName) +sal_Int32 SvxPatternTabPage::SearchPatternList(std::u16string_view rPatternName) { tools::Long nCount = m_pPatternList->Count(); bool bValidPatternName = true; diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx index 513f99105962..21c1ff0ef9a7 100644 --- a/dbaccess/source/core/api/KeySet.cxx +++ b/dbaccess/source/core/api/KeySet.cxx @@ -527,10 +527,10 @@ void OKeySet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOrigi ::dbtools::throwSQLException( DBA_RES( RID_STR_NO_CONDITION_FOR_PK ), StandardSQLState::GENERAL_ERROR, m_xConnection ); // now create end execute the prepared statement - executeUpdate(_rInsertRow ,_rOriginalRow,aSql.makeStringAndClear(),"",aIndexColumnPositions); + executeUpdate(_rInsertRow ,_rOriginalRow,aSql.makeStringAndClear(),u"",aIndexColumnPositions); } -void OKeySet::executeUpdate(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOriginalRow,const OUString& i_sSQL,const OUString& i_sTableName,const std::vector<sal_Int32>& _aIndexColumnPositions) +void OKeySet::executeUpdate(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOriginalRow,const OUString& i_sSQL,std::u16string_view i_sTableName,const std::vector<sal_Int32>& _aIndexColumnPositions) { // now create end execute the prepared statement Reference< XPreparedStatement > xPrep(m_xConnection->prepareStatement(i_sSQL)); @@ -542,7 +542,7 @@ void OKeySet::executeUpdate(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rO // first the set values for (auto const& columnName : *m_pColumnNames) { - if ( i_sTableName.isEmpty() || columnName.second.sTableName == i_sTableName ) + if ( i_sTableName.empty() || columnName.second.sTableName == i_sTableName ) { sal_Int32 nPos = columnName.second.nPosition; if((*_rInsertRow)[nPos].isModified()) @@ -560,7 +560,7 @@ void OKeySet::executeUpdate(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rO // and then the values of the where condition for (auto const& keyColumnName : *m_pKeyColumnNames) { - if ( i_sTableName.isEmpty() || keyColumnName.second.sTableName == i_sTableName ) + if ( i_sTableName.empty() || keyColumnName.second.sTableName == i_sTableName ) { setParameter(i++,xParameter,(*_rOriginalRow)[keyColumnName.second.nPosition],keyColumnName.second.nType,keyColumnName.second.nScale); } @@ -621,10 +621,10 @@ void OKeySet::insertRow( const ORowSetRow& _rInsertRow,const connectivity::OSQLT aValues[aValues.getLength() - 1] = ')'; aSql.append(aValues.makeStringAndClear()); // now create,fill and execute the prepared statement - executeInsert(_rInsertRow,aSql.makeStringAndClear(),"",bRefetch); + executeInsert(_rInsertRow,aSql.makeStringAndClear(),u"",bRefetch); } -void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const OUString& i_sSQL,const OUString& i_sTableName,bool bRefetch ) +void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const OUString& i_sSQL,std::u16string_view i_sTableName,bool bRefetch ) { // now create,fill and execute the prepared statement Reference< XPreparedStatement > xPrep(m_xConnection->prepareStatement(i_sSQL)); @@ -633,7 +633,7 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const OUString& i_sSQ sal_Int32 i = 1; for (auto const& columnName : *m_pColumnNames) { - if ( i_sTableName.isEmpty() || columnName.second.sTableName == i_sTableName ) + if ( i_sTableName.empty() || columnName.second.sTableName == i_sTableName ) { const sal_Int32 nPos = columnName.second.nPosition; if((*_rInsertRow)[nPos].isModified()) @@ -703,7 +703,7 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const OUString& i_sSQ ::comphelper::disposeComponent(xPrep); - if ( i_sTableName.isEmpty() && !bAutoValuesFetched && m_bInserted ) + if ( i_sTableName.empty() && !bAutoValuesFetched && m_bInserted ) { // first check if all key column values were set const OUString sQuote = getIdentifierQuoteString(); diff --git a/dbaccess/source/core/api/KeySet.hxx b/dbaccess/source/core/api/KeySet.hxx index cc6175923063..e5d3c61ea5ac 100644 --- a/dbaccess/source/core/api/KeySet.hxx +++ b/dbaccess/source/core/api/KeySet.hxx @@ -136,8 +136,8 @@ namespace dbaccess /// @throws css::uno::RuntimeException bool doTryRefetch_throw(); void tryRefetch(const ORowSetRow& _rInsertRow,bool bRefetch); - void executeUpdate(const ORowSetRow& _rInsertRow, const ORowSetRow& _rOriginalRow, const OUString& i_sSQL, const OUString& i_sTableName,const std::vector<sal_Int32>& _aIndexColumnPositions = std::vector<sal_Int32>()); - void executeInsert( const ORowSetRow& _rInsertRow, const OUString& i_sSQL, const OUString& i_sTableName, bool bRefetch = false); + void executeUpdate(const ORowSetRow& _rInsertRow, const ORowSetRow& _rOriginalRow, const OUString& i_sSQL, std::u16string_view i_sTableName,const std::vector<sal_Int32>& _aIndexColumnPositions = std::vector<sal_Int32>()); + void executeInsert( const ORowSetRow& _rInsertRow, const OUString& i_sSQL, std::u16string_view i_sTableName, bool bRefetch = false); void executeStatement(OUStringBuffer& io_aFilter, css::uno::Reference< css::sdb::XSingleSelectQueryComposer>& io_xAnalyzer); virtual ~OKeySet() override; diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx index 67fd18aaaea7..7db4ca08740b 100644 --- a/dbaccess/source/core/api/OptimisticSet.cxx +++ b/dbaccess/source/core/api/OptimisticSet.cxx @@ -336,7 +336,7 @@ void OptimisticSet::deleteRow(const ORowSetRow& _rDeleteRow,const connectivity:: } } -void OptimisticSet::executeDelete(const ORowSetRow& _rDeleteRow,const OUString& i_sSQL,const OUString& i_sTableName) +void OptimisticSet::executeDelete(const ORowSetRow& _rDeleteRow,const OUString& i_sSQL,std::u16string_view i_sTableName) { // now create and execute the prepared statement Reference< XPreparedStatement > xPrep(m_xConnection->prepareStatement(i_sSQL)); diff --git a/dbaccess/source/core/api/OptimisticSet.hxx b/dbaccess/source/core/api/OptimisticSet.hxx index d5c2c069579c..bf5e3a80370a 100644 ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits