summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-12-28 17:56:40 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-12-29 16:42:33 +0100
commit042033f1e6da22616cb76c8d950c20c9efecbad5 (patch)
tree26b3f1f42d067506f44550b410f3fb9640616a5b
parentccfd8e9d09f9ac0a0ea92d0f378391006faaf934 (diff)
loplugin:stringviewparam: operator +
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--avmedia/source/framework/mediaitem.cxx4
-rw-r--r--basctl/qa/unit/basctl-dialogs-test.cxx2
-rw-r--r--basctl/source/basicide/bastype3.cxx4
-rw-r--r--basctl/source/basicide/bastypes.cxx18
-rw-r--r--basctl/source/basicide/localizationmgr.cxx37
-rw-r--r--basctl/source/basicide/moduldlg.cxx4
-rw-r--r--basctl/source/basicide/moduldlg.hxx6
-rw-r--r--basctl/source/inc/basidesh.hxx3
-rw-r--r--basctl/source/inc/bastypes.hxx13
-rw-r--r--basctl/source/inc/localizationmgr.hxx24
-rw-r--r--basic/qa/cppunit/basic_coverage.cxx2
-rw-r--r--basic/qa/cppunit/test_vba.cxx2
-rw-r--r--basic/source/classes/sbunoobj.cxx10
-rw-r--r--basic/source/inc/sbunoobj.hxx2
-rw-r--r--basic/source/uno/namecont.cxx7
-rw-r--r--canvas/source/tools/propertysethelper.cxx10
-rw-r--r--chart2/qa/extras/PivotChartTest.cxx4
-rw-r--r--chart2/qa/extras/chart2_trendcalculators.cxx2
-rw-r--r--chart2/qa/extras/chart2dump/chart2dump.cxx21
-rw-r--r--chart2/qa/extras/chart2export.cxx304
-rw-r--r--chart2/qa/extras/chart2geometry.cxx28
-rw-r--r--chart2/qa/extras/chart2import.cxx222
-rw-r--r--chart2/qa/extras/charttest.hxx13
-rw-r--r--chart2/qa/extras/xshape/chart2xshape.cxx28
-rw-r--r--chart2/qa/unit/chart2-dialogs-test.cxx2
-rw-r--r--chart2/source/inc/ObjectIdentifier.hxx6
-rw-r--r--chart2/source/tools/ObjectIdentifier.cxx2
-rw-r--r--codemaker/source/codemaker/typemanager.cxx2
-rw-r--r--codemaker/source/commoncpp/commoncpp.cxx4
-rw-r--r--codemaker/source/commonjava/commonjava.cxx4
-rw-r--r--codemaker/source/cppumaker/cpputype.cxx54
-rw-r--r--codemaker/source/cppumaker/dependencies.cxx6
-rw-r--r--codemaker/source/cppumaker/dependencies.hxx3
-rw-r--r--codemaker/source/javamaker/javatype.cxx57
-rw-r--r--comphelper/source/misc/DirectoryHelper.cxx7
-rw-r--r--comphelper/source/misc/backupfilehelper.cxx95
-rw-r--r--comphelper/source/misc/configuration.cxx7
-rw-r--r--comphelper/source/property/propertystatecontainer.cxx8
-rw-r--r--comphelper/source/xml/ofopxmlhelper.cxx4
-rw-r--r--compilerplugins/clang/stringviewparam.cxx5
-rw-r--r--configmgr/source/components.cxx4
-rw-r--r--configmgr/source/components.hxx3
-rw-r--r--configmgr/source/writemodfile.cxx6
-rw-r--r--configmgr/source/xcuparser.cxx6
-rw-r--r--configmgr/source/xcuparser.hxx3
-rw-r--r--connectivity/qa/connectivity/ado/DriverTest.cxx2
-rw-r--r--connectivity/source/commontools/TColumnsHelper.cxx2
-rw-r--r--connectivity/source/commontools/dbtools2.cxx6
-rw-r--r--connectivity/source/drivers/firebird/DatabaseMetaData.cxx6
-rw-r--r--connectivity/source/drivers/firebird/DatabaseMetaData.hxx6
-rw-r--r--connectivity/source/drivers/firebird/Table.cxx2
-rw-r--r--connectivity/source/drivers/firebird/Table.hxx6
-rw-r--r--connectivity/source/drivers/hsqldb/HTable.cxx2
-rw-r--r--connectivity/source/drivers/mysql_jdbc/YTable.cxx2
-rw-r--r--connectivity/source/drivers/postgresql/pq_databasemetadata.cxx8
-rw-r--r--connectivity/source/drivers/postgresql/pq_statement.cxx2
-rw-r--r--connectivity/source/drivers/postgresql/pq_statement.hxx7
-rw-r--r--connectivity/source/drivers/postgresql/pq_tools.cxx4
-rw-r--r--connectivity/source/drivers/postgresql/pq_tools.hxx2
-rw-r--r--connectivity/source/inc/hsqldb/HTable.hxx6
-rw-r--r--connectivity/source/inc/mysql/YTable.hxx6
-rw-r--r--connectivity/source/parse/sqlnode.cxx4
-rw-r--r--cppu/source/uno/lbenv.cxx4
-rw-r--r--cppuhelper/source/servicemanager.cxx12
-rw-r--r--cppuhelper/source/servicemanager.hxx5
-rw-r--r--cppuhelper/source/shlib.cxx7
-rw-r--r--cui/qa/unit/cui-dialogs-test.cxx2
-rw-r--r--cui/qa/unit/cui-dialogs-test_2.cxx2
-rw-r--r--cui/qa/unit/cui-dialogs-test_3.cxx2
-rw-r--r--cui/qa/unit/cui-dialogs-test_4.cxx2
-rw-r--r--cui/source/customize/cfg.cxx4
-rw-r--r--cui/source/customize/cfgutil.cxx9
-rw-r--r--cui/source/dialogs/SignatureLineDialogBase.cxx4
-rw-r--r--cui/source/dialogs/cuigaldlg.cxx4
-rw-r--r--cui/source/dialogs/postdlg.cxx4
-rw-r--r--cui/source/dialogs/screenshotannotationdlg.cxx10
-rw-r--r--cui/source/dialogs/scriptdlg.cxx13
-rw-r--r--cui/source/inc/SignatureLineDialogBase.hxx6
-rw-r--r--cui/source/inc/cfg.hxx3
-rw-r--r--cui/source/inc/cfgutil.hxx6
-rw-r--r--cui/source/inc/cuigaldlg.hxx4
-rw-r--r--cui/source/inc/postdlg.hxx6
-rw-r--r--cui/source/options/optsave.cxx16
-rw-r--r--dbaccess/qa/extras/dialog-save.cxx2
-rw-r--r--dbaccess/qa/extras/empty-stdlib-save.cxx2
-rw-r--r--dbaccess/qa/extras/macros-test.cxx2
-rw-r--r--dbaccess/qa/extras/nolib-save.cxx2
-rw-r--r--dbaccess/qa/extras/rowsetclones.cxx2
-rw-r--r--dbaccess/qa/unit/dbaccess-dialogs-test.cxx2
-rw-r--r--dbaccess/qa/unit/dbtest_base.cxx10
-rw-r--r--dbaccess/qa/unit/embeddeddb_performancetest.cxx2
-rw-r--r--dbaccess/qa/unit/firebird-regression.cxx4
-rw-r--r--dbaccess/qa/unit/firebird.cxx4
-rw-r--r--dbaccess/qa/unit/hsql_binary_import.cxx2
-rw-r--r--dbaccess/qa/unit/hsqldb.cxx2
-rw-r--r--dbaccess/qa/unit/tdf119625.cxx2
-rw-r--r--dbaccess/qa/unit/tdf126268.cxx2
-rw-r--r--dbaccess/source/core/api/KeySet.cxx8
-rw-r--r--dbaccess/source/core/api/SingleSelectQueryComposer.cxx2
-rw-r--r--dbaccess/source/filter/hsqldb/parseschema.cxx8
-rw-r--r--dbaccess/source/ui/app/DocumentInfoPreview.cxx4
-rw-r--r--dbaccess/source/ui/app/DocumentInfoPreview.hxx5
-rw-r--r--dbaccess/source/ui/dlg/directsql.cxx11
-rw-r--r--dbaccess/source/ui/inc/directsql.hxx5
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignView.cxx5
-rw-r--r--desktop/inc/app.hxx3
-rw-r--r--desktop/inc/lib/init.hxx3
-rw-r--r--desktop/qa/desktop_lib/test_desktop_lib.cxx63
-rw-r--r--desktop/qa/unit/desktop-dialogs-test.cxx2
-rw-r--r--desktop/source/app/app.cxx7
-rw-r--r--desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx9
-rw-r--r--desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx6
-rw-r--r--desktop/source/deployment/gui/license_dialog.cxx5
-rw-r--r--desktop/source/deployment/inc/dp_descriptioninfoset.hxx6
-rw-r--r--desktop/source/deployment/inc/dp_identifier.hxx6
-rw-r--r--desktop/source/deployment/manager/dp_extensionmanager.cxx3
-rw-r--r--desktop/source/deployment/manager/dp_manager.cxx2
-rw-r--r--desktop/source/deployment/manager/dp_manager.h4
-rw-r--r--desktop/source/deployment/manager/dp_properties.cxx8
-rw-r--r--desktop/source/deployment/manager/dp_properties.hxx5
-rw-r--r--desktop/source/deployment/misc/dp_descriptioninfoset.cxx18
-rw-r--r--desktop/source/deployment/misc/dp_identifier.cxx6
-rw-r--r--desktop/source/deployment/registry/component/dp_compbackenddb.cxx22
-rw-r--r--desktop/source/deployment/registry/component/dp_compbackenddb.hxx4
-rw-r--r--desktop/source/deployment/registry/component/dp_component.cxx8
-rw-r--r--desktop/source/deployment/registry/configuration/dp_configuration.cxx23
-rw-r--r--desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx10
-rw-r--r--desktop/source/deployment/registry/configuration/dp_configurationbackenddb.hxx4
-rw-r--r--desktop/source/deployment/registry/dp_backenddb.cxx40
-rw-r--r--desktop/source/deployment/registry/executable/dp_executable.cxx10
-rw-r--r--desktop/source/deployment/registry/help/dp_help.cxx13
-rw-r--r--desktop/source/deployment/registry/help/dp_helpbackenddb.cxx8
-rw-r--r--desktop/source/deployment/registry/help/dp_helpbackenddb.hxx4
-rw-r--r--desktop/source/deployment/registry/inc/dp_backenddb.hxx41
-rw-r--r--desktop/source/deployment/registry/package/dp_extbackenddb.cxx10
-rw-r--r--desktop/source/deployment/registry/package/dp_extbackenddb.hxx5
-rw-r--r--desktop/source/deployment/registry/package/dp_package.cxx9
-rw-r--r--desktop/source/deployment/registry/script/dp_script.cxx10
-rw-r--r--desktop/source/lib/init.cxx24
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx7
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_misc.cxx18
-rw-r--r--editeng/source/lookuptree/Trie.cxx14
-rw-r--r--embeddedobj/qa/cppunit/general.cxx6
-rw-r--r--embeddedobj/source/msole/oleembed.cxx2
-rw-r--r--embeddedobj/source/msole/ownview.cxx6
-rw-r--r--embeddedobj/source/msole/ownview.hxx6
-rw-r--r--emfio/qa/cppunit/emf/EmfImportTest.cxx23
-rw-r--r--emfio/qa/cppunit/wmf/wmfimporttest.cxx18
-rw-r--r--extensions/qa/update/test_update.cxx14
-rw-r--r--extensions/source/propctrlr/eformshelper.cxx6
-rw-r--r--extensions/source/propctrlr/eventhandler.cxx3
-rw-r--r--extensions/source/update/check/updateprotocol.cxx8
-rw-r--r--extensions/source/update/check/updateprotocol.hxx10
-rw-r--r--extensions/source/update/feed/updatefeed.cxx14
-rw-r--r--filter/qa/cppunit/filters-dxf-test.cxx2
-rw-r--r--filter/qa/cppunit/filters-eps-test.cxx2
-rw-r--r--filter/qa/cppunit/filters-met-test.cxx2
-rw-r--r--filter/qa/cppunit/filters-pcd-test.cxx2
-rw-r--r--filter/qa/cppunit/filters-pcx-test.cxx2
-rw-r--r--filter/qa/cppunit/filters-pict-test.cxx2
-rw-r--r--filter/qa/cppunit/filters-ppm-test.cxx4
-rw-r--r--filter/qa/cppunit/filters-psd-test.cxx2
-rw-r--r--filter/qa/cppunit/filters-ras-test.cxx2
-rw-r--r--filter/qa/cppunit/filters-tga-test.cxx2
-rw-r--r--filter/qa/cppunit/filters-tiff-test.cxx2
-rw-r--r--filter/qa/cppunit/xslt-test.cxx12
-rw-r--r--filter/qa/unit/filter-dialogs-test.cxx2
-rw-r--r--filter/qa/unit/svg.cxx16
-rw-r--r--filter/source/msfilter/mstoolbar.cxx5
-rw-r--r--filter/source/msfilter/msvbahelper.cxx2
-rw-r--r--filter/source/pdf/impdialog.cxx4
-rw-r--r--filter/source/pdf/pdffilter.cxx2
-rw-r--r--filter/source/svg/svgexport.cxx11
-rw-r--r--filter/source/svg/svgfilter.hxx3
-rw-r--r--filter/source/xsltdialog/typedetectionexport.cxx7
-rw-r--r--filter/source/xsltdialog/xmlfiltercommon.hxx3
-rw-r--r--filter/source/xsltdialog/xmlfiltersettingsdialog.cxx6
-rw-r--r--forms/source/component/DatabaseForm.cxx12
-rw-r--r--forms/source/component/DatabaseForm.hxx6
-rw-r--r--forms/source/xforms/submission.cxx11
-rw-r--r--formula/qa/unit/formula-dialogs-test.cxx2
-rw-r--r--fpicker/qa/unit/fpicker-dialogs-test.cxx2
-rw-r--r--fpicker/source/office/iodlg.cxx16
-rw-r--r--fpicker/source/office/iodlg.hxx4
-rw-r--r--fpicker/source/office/iodlgimp.cxx8
-rw-r--r--framework/inc/helper/persistentwindowstate.hxx4
-rw-r--r--framework/inc/jobs/helponstartup.hxx10
-rw-r--r--framework/inc/jobs/jobdata.hxx3
-rw-r--r--framework/inc/uifactory/configurationaccessfactorymanager.hxx7
-rw-r--r--framework/inc/uifactory/factoryconfiguration.hxx10
-rw-r--r--framework/source/accelerators/acceleratorconfiguration.cxx10
-rw-r--r--framework/source/accelerators/presethandler.cxx16
-rw-r--r--framework/source/fwe/classes/addonsoptions.cxx68
-rw-r--r--framework/source/helper/persistentwindowstate.cxx8
-rw-r--r--framework/source/inc/accelerators/presethandler.hxx12
-rw-r--r--framework/source/jobs/helponstartup.cxx8
-rw-r--r--framework/source/jobs/jobdata.cxx4
-rw-r--r--framework/source/services/pathsettings.cxx15
-rw-r--r--framework/source/uiconfiguration/ImageList.cxx4
-rw-r--r--framework/source/uiconfiguration/ImageList.hxx4
-rw-r--r--framework/source/uiconfiguration/uicategorydescription.cxx8
-rw-r--r--framework/source/uiconfiguration/windowstateconfiguration.cxx8
-rw-r--r--framework/source/uielement/uicommanddescription.cxx16
-rw-r--r--framework/source/uifactory/factoryconfiguration.cxx31
-rw-r--r--framework/source/uifactory/uicontrollerfactory.cxx19
-rw-r--r--framework/source/uifactory/uielementfactorymanager.cxx19
-rw-r--r--helpcompiler/source/HelpIndexer.cxx6
-rw-r--r--helpcompiler/source/HelpLinker.cxx4
-rw-r--r--hwpfilter/qa/cppunit/test_hwpfilter.cxx2
-rw-r--r--i18nlangtag/source/languagetag/languagetag.cxx4
-rw-r--r--i18npool/inc/indexentrysupplier.hxx6
-rw-r--r--i18npool/source/indexentry/indexentrysupplier.cxx12
-rw-r--r--i18npool/source/nativenumber/nativenumbersupplier.cxx8
-rw-r--r--include/avmedia/mediaitem.hxx4
-rw-r--r--include/codemaker/commoncpp.hxx2
-rw-r--r--include/codemaker/commonjava.hxx4
-rw-r--r--include/codemaker/typemanager.hxx2
-rw-r--r--include/comphelper/DirectoryHelper.hxx3
-rw-r--r--include/comphelper/backupfilehelper.hxx19
-rw-r--r--include/comphelper/configuration.hxx4
-rw-r--r--include/comphelper/ofopxmlhelper.hxx6
-rw-r--r--include/connectivity/dbtools.hxx4
-rw-r--r--include/filter/msfilter/mstoolbar.hxx3
-rw-r--r--include/filter/msfilter/msvbahelper.hxx6
-rw-r--r--include/helpcompiler/HelpIndexer.hxx3
-rw-r--r--include/helpcompiler/compilehelp.hxx2
-rw-r--r--include/i18nlangtag/languagetag.hxx3
-rw-r--r--include/oox/core/contexthandler.hxx3
-rw-r--r--include/oox/core/relations.hxx5
-rw-r--r--include/oox/core/xmlfilterbase.hxx3
-rw-r--r--include/oox/drawingml/shape.hxx3
-rw-r--r--include/oox/dump/dumperbase.hxx4
-rw-r--r--include/oox/export/drawingml.hxx3
-rw-r--r--include/oox/export/vmlexport.hxx6
-rw-r--r--include/oox/ole/vbaproject.hxx5
-rw-r--r--include/sfx2/linkmgr.hxx6
-rw-r--r--include/sfx2/lokhelper.hxx4
-rw-r--r--include/sfx2/notebookbar/SfxNotebookBar.hxx7
-rw-r--r--include/sfx2/objsh.hxx4
-rw-r--r--include/svl/lockfilecommon.hxx4
-rw-r--r--include/svtools/HtmlWriter.hxx2
-rw-r--r--include/svtools/parhtml.hxx3
-rw-r--r--include/svx/SmartTagMgr.hxx5
-rw-r--r--include/svx/xmlgrhlp.hxx5
-rw-r--r--include/test/helper/form.hxx7
-rw-r--r--include/test/helper/shape.hxx10
-rw-r--r--include/test/screenshot_test.hxx2
-rw-r--r--include/test/unoapi_test.hxx5
-rw-r--r--include/test/xmltesttools.hxx3
-rw-r--r--include/unotest/directories.hxx10
-rw-r--r--include/unotest/filters-test.hxx6
-rw-r--r--include/unotest/gettestargument.hxx6
-rw-r--r--include/unotools/optionsdlg.hxx16
-rw-r--r--include/vbahelper/vbahelper.hxx5
-rw-r--r--include/vbahelper/vbashapes.hxx3
-rw-r--r--include/vcl/FilterConfigItem.hxx10
-rw-r--r--include/vcl/embeddedfontshelper.hxx5
-rw-r--r--include/vcl/formatter.hxx3
-rw-r--r--include/vcl/opengl/OpenGLHelper.hxx7
-rw-r--r--include/xmloff/xmlimp.hxx3
-rw-r--r--io/source/acceptor/acceptor.cxx5
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx8
-rw-r--r--l10ntools/inc/common.hxx4
-rw-r--r--l10ntools/inc/export.hxx11
-rw-r--r--l10ntools/inc/helper.hxx5
-rw-r--r--l10ntools/inc/helpmerge.hxx6
-rw-r--r--l10ntools/inc/po.hxx10
-rw-r--r--l10ntools/inc/xrmmerge.hxx4
-rw-r--r--l10ntools/source/common.cxx2
-rw-r--r--l10ntools/source/helper.cxx4
-rw-r--r--l10ntools/source/helpmerge.cxx2
-rw-r--r--l10ntools/source/merge.cxx12
-rw-r--r--l10ntools/source/po.cxx18
-rw-r--r--l10ntools/source/xrmmerge.cxx4
-rw-r--r--linguistic/source/convdiclist.cxx6
-rw-r--r--linguistic/source/misc2.cxx17
-rw-r--r--lotuswordpro/qa/cppunit/test_lotuswordpro.cxx2
-rw-r--r--oox/qa/unit/shape.cxx12
-rw-r--r--oox/qa/unit/vba_compression.cxx28
-rw-r--r--oox/qa/unit/vml.cxx14
-rw-r--r--oox/source/core/contexthandler.cxx3
-rw-r--r--oox/source/core/relations.cxx18
-rw-r--r--oox/source/core/xmlfilterbase.cxx11
-rw-r--r--oox/source/drawingml/diagram/diagram.cxx2
-rw-r--r--oox/source/drawingml/graphicshapecontext.cxx8
-rw-r--r--oox/source/drawingml/shape.cxx6
-rw-r--r--oox/source/dump/dumperbase.cxx7
-rw-r--r--oox/source/export/drawingml.cxx9
-rw-r--r--oox/source/export/vmlexport.cxx7
-rw-r--r--oox/source/ole/vbaproject.cxx8
-rw-r--r--oox/source/ppt/pptimport.cxx8
-rw-r--r--oox/source/ppt/presentationfragmenthandler.cxx10
-rw-r--r--oox/source/ppt/slidefragmenthandler.cxx4
-rw-r--r--oox/source/shape/ShapeContextHandler.cxx4
-rw-r--r--oox/source/shape/ShapeFilterBase.cxx2
-rw-r--r--opencl/inc/opencl_device.hxx6
-rw-r--r--opencl/source/opencl_device.cxx9
-rw-r--r--package/inc/ZipPackageFolder.hxx4
-rw-r--r--package/qa/cppunit/test_package.cxx4
-rw-r--r--package/source/xstor/owriteablestream.cxx14
-rw-r--r--package/source/xstor/owriteablestream.hxx5
-rw-r--r--package/source/xstor/xstorage.cxx23
-rw-r--r--package/source/xstor/xstorage.hxx8
-rw-r--r--package/source/zippackage/ZipPackage.cxx3
-rw-r--r--package/source/zippackage/ZipPackageFolder.cxx8
-rw-r--r--pyuno/source/module/pyuno_impl.hxx6
-rw-r--r--pyuno/source/module/pyuno_util.cxx12
-rw-r--r--registry/source/keyimpl.cxx37
-rw-r--r--registry/source/keyimpl.hxx22
-rw-r--r--reportdesign/qa/unit/reportdesign-dialogs-test.cxx2
-rw-r--r--reportdesign/source/ui/inc/GeometryHandler.hxx4
-rw-r--r--reportdesign/source/ui/inspection/GeometryHandler.cxx6
-rw-r--r--sax/qa/cppunit/xmlimport.cxx2
-rw-r--r--sax/source/expatwrap/sax_expat.cxx5
-rw-r--r--sc/inc/addincol.hxx3
-rw-r--r--sc/inc/calcconfig.hxx3
-rw-r--r--sc/inc/chartlis.hxx3
-rw-r--r--sc/inc/dpdimsave.hxx4
-rw-r--r--sc/inc/global.hxx5
-rw-r--r--sc/inc/unitconv.hxx7
-rw-r--r--sc/qa/extras/anchor.cxx16
-rw-r--r--sc/qa/extras/htmlexporttest.cxx8
-rw-r--r--sc/qa/extras/macros-test.cxx30
-rw-r--r--sc/qa/extras/new_cond_format.cxx2
-rw-r--r--sc/qa/extras/recordchanges-test.cxx2
-rw-r--r--sc/qa/extras/scannotationobj.cxx2
-rw-r--r--sc/qa/extras/scannotationsobj.cxx2
-rw-r--r--sc/qa/extras/scarealinkobj.cxx4
-rw-r--r--sc/qa/extras/sccellcursorobj.cxx2
-rw-r--r--sc/qa/extras/sccellrangeobj.cxx2
-rw-r--r--sc/qa/extras/scdatabaserangeobj.cxx2
-rw-r--r--sc/qa/extras/scdatapilotfieldobj.cxx2
-rw-r--r--sc/qa/extras/scdatapilottableobj.cxx2
-rw-r--r--sc/qa/extras/scddelinkobj.cxx2
-rw-r--r--sc/qa/extras/scddelinksobj.cxx6
-rw-r--r--sc/qa/extras/scmodelobj.cxx2
-rw-r--r--sc/qa/extras/scnamedrangeobj.cxx2
-rw-r--r--sc/qa/extras/scnamedrangesobj.cxx2
-rw-r--r--sc/qa/extras/scoutlineobj.cxx2
-rw-r--r--sc/qa/extras/scsheetlinkobj.cxx4
-rw-r--r--sc/qa/extras/scsheetlinksobj.cxx4
-rw-r--r--sc/qa/extras/scstylefamiliesobj.cxx2
-rw-r--r--sc/qa/extras/sctablesheetobj.cxx2
-rw-r--r--sc/qa/unit/bugfix-test.cxx55
-rw-r--r--sc/qa/unit/chart2dataprovider.cxx2
-rw-r--r--sc/qa/unit/cond_format_merge.cxx2
-rw-r--r--sc/qa/unit/copy_paste_test.cxx29
-rw-r--r--sc/qa/unit/dataproviders_test.cxx8
-rw-r--r--sc/qa/unit/filters-test.cxx66
-rw-r--r--sc/qa/unit/functions_addin.cxx2
-rw-r--r--sc/qa/unit/functions_array.cxx2
-rw-r--r--sc/qa/unit/functions_database.cxx2
-rw-r--r--sc/qa/unit/functions_datetime.cxx2
-rw-r--r--sc/qa/unit/functions_financial.cxx2
-rw-r--r--sc/qa/unit/functions_information.cxx2
-rw-r--r--sc/qa/unit/functions_logical.cxx2
-rw-r--r--sc/qa/unit/functions_mathematical.cxx2
-rw-r--r--sc/qa/unit/functions_spreadsheet.cxx2
-rw-r--r--sc/qa/unit/functions_statistical.cxx2
-rw-r--r--sc/qa/unit/functions_test_old.cxx2
-rw-r--r--sc/qa/unit/functions_text.cxx2
-rw-r--r--sc/qa/unit/helper/qahelper.cxx4
-rw-r--r--sc/qa/unit/helper/qahelper.hxx6
-rw-r--r--sc/qa/unit/jumbosheets-test.cxx2
-rw-r--r--sc/qa/unit/opencl-test.cxx453
-rw-r--r--sc/qa/unit/pivottable_filters_test.cxx96
-rw-r--r--sc/qa/unit/screenshots/screenshots.cxx2
-rw-r--r--sc/qa/unit/scshapetest.cxx52
-rw-r--r--sc/qa/unit/subsequent_export-test.cxx315
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx331
-rw-r--r--sc/source/core/data/dpdimsave.cxx2
-rw-r--r--sc/source/core/data/dpoutput.cxx4
-rw-r--r--sc/source/core/data/global2.cxx6
-rw-r--r--sc/source/core/tool/addincol.cxx4
-rw-r--r--sc/source/core/tool/calcconfig.cxx4
-rw-r--r--sc/source/core/tool/chartlis.cxx2
-rw-r--r--sc/source/core/tool/unitconv.cxx6
-rw-r--r--sc/source/filter/excel/excimp8.cxx2
-rw-r--r--sc/source/filter/excel/xecontent.cxx8
-rw-r--r--sc/source/filter/excel/xehelper.cxx2
-rw-r--r--sc/source/filter/excel/xelink.cxx4
-rw-r--r--sc/source/filter/ftools/ftools.cxx2
-rw-r--r--sc/source/filter/inc/ftools.hxx4
-rw-r--r--sc/source/filter/inc/xehelper.hxx4
-rw-r--r--sc/source/filter/oox/excelfilter.cxx2
-rw-r--r--sc/source/filter/oox/excelvbaproject.cxx2
-rw-r--r--sc/source/filter/oox/workbookfragment.cxx8
-rw-r--r--sc/source/filter/oox/worksheetfragment.cxx8
-rw-r--r--sc/source/filter/xml/XMLTableShapeResizer.cxx2
-rw-r--r--sc/source/ui/app/inputwin.cxx5
-rw-r--r--sc/source/ui/dbgui/PivotLayoutTreeListData.cxx4
-rw-r--r--sc/source/ui/docshell/docsh4.cxx2
-rw-r--r--sc/source/ui/inc/hfedtdlg.hxx26
-rw-r--r--sc/source/ui/inc/optsolver.hxx3
-rw-r--r--sc/source/ui/miscdlgs/optsolver.cxx2
-rw-r--r--sc/source/ui/navipi/content.cxx4
-rw-r--r--sc/source/ui/pagedlg/hfedtdlg.cxx22
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx2
-rw-r--r--sc/source/ui/unoobj/linkuno.cxx5
-rw-r--r--sc/source/ui/vba/vbachartobjects.cxx4
-rw-r--r--sc/source/ui/vba/vbaformatconditions.cxx2
-rw-r--r--sc/source/ui/vba/vbaworksheet.cxx10
-rw-r--r--sc/source/ui/view/colrowba.cxx8
-rw-r--r--sc/source/ui/view/dbfunc3.cxx3
-rw-r--r--sccomp/qa/unit/SwarmSolverTest.cxx10
-rw-r--r--sd/inc/drawdoc.hxx6
-rw-r--r--sd/inc/sdpage.hxx3
-rw-r--r--sd/inc/stlpool.hxx17
-rw-r--r--sd/qa/unit/HtmlExportTest.cxx2
-rw-r--r--sd/qa/unit/SVGExportTests.cxx8
-rw-r--r--sd/qa/unit/SdrPdfImportTest.cxx4
-rw-r--r--sd/qa/unit/activex-controls-tests.cxx26
-rw-r--r--sd/qa/unit/dialogs-test.cxx2
-rw-r--r--sd/qa/unit/export-tests-ooxml1.cxx92
-rw-r--r--sd/qa/unit/export-tests-ooxml2.cxx233
-rw-r--r--sd/qa/unit/export-tests.cxx71
-rw-r--r--sd/qa/unit/filters-test.cxx10
-rw-r--r--sd/qa/unit/import-tests-smartart.cxx88
-rw-r--r--sd/qa/unit/import-tests.cxx201
-rw-r--r--sd/qa/unit/layout-tests.cxx6
-rw-r--r--sd/qa/unit/misc-tests.cxx32
-rw-r--r--sd/qa/unit/sdmodeltestbase.hxx2
-rw-r--r--sd/qa/unit/uiimpress.cxx14
-rw-r--r--sd/source/core/drawdoc2.cxx4
-rw-r--r--sd/source/core/drawdoc3.cxx7
-rw-r--r--sd/source/core/sdpage2.cxx4
-rw-r--r--sd/source/core/stlpool.cxx32
-rw-r--r--sd/source/filter/eppt/pptx-epptooxml.cxx2
-rw-r--r--sd/source/filter/html/htmlex.cxx8
-rw-r--r--sd/source/filter/html/htmlex.hxx8
-rw-r--r--sd/source/filter/html/pubdlg.cxx2
-rw-r--r--sd/source/ui/docshell/docshell.cxx4
-rw-r--r--sd/source/ui/sidebar/DocumentHelper.cxx2
-rw-r--r--sd/source/ui/sidebar/DocumentHelper.hxx3
-rw-r--r--sd/source/ui/unoidl/sddetect.cxx2
-rw-r--r--sd/source/ui/view/ToolBarManager.cxx6
-rw-r--r--sdext/source/pdfimport/test/tests.cxx12
-rw-r--r--sdext/source/presenter/PresenterScreen.cxx4
-rw-r--r--sdext/source/presenter/PresenterScreen.hxx3
-rw-r--r--sfx2/inc/guisaveas.hxx6
-rw-r--r--sfx2/qa/cppunit/test_misc.cxx8
-rw-r--r--sfx2/qa/unit/sfx2-dialogs-test.cxx2
-rw-r--r--sfx2/source/appl/linkmgr2.cxx4
-rw-r--r--sfx2/source/doc/graphhelp.cxx6
-rw-r--r--sfx2/source/doc/graphhelp.hxx6
-rw-r--r--sfx2/source/doc/guisaveas.cxx25
-rw-r--r--sfx2/source/doc/objmisc.cxx4
-rw-r--r--sfx2/source/notebookbar/SfxNotebookBar.cxx6
-rw-r--r--sfx2/source/view/ipclient.cxx2
-rw-r--r--sfx2/source/view/lokhelper.cxx10
-rw-r--r--sfx2/source/view/viewfrm.cxx4
-rw-r--r--smoketest/smoketest.cxx2
-rw-r--r--sot/qa/cppunit/test_sot.cxx5
-rw-r--r--starmath/qa/extras/mmlimport-test.cxx16
-rw-r--r--starmath/qa/unit/starmath-dialogs-test.cxx2
-rw-r--r--starmath/source/cfgitem.cxx8
-rw-r--r--starmath/source/cfgitem.hxx7
-rw-r--r--stoc/source/implementationregistration/implreg.cxx5
-rw-r--r--stoc/source/security/file_policy.cxx25
-rw-r--r--stoc/source/servicemanager/servicemanager.cxx11
-rw-r--r--svgio/qa/cppunit/SvgImportTest.cxx73
-rw-r--r--svl/qa/unit/lockfiles/test_lockfiles.cxx70
-rw-r--r--svl/source/misc/documentlockfile.cxx2
-rw-r--r--svl/source/misc/lockfilecommon.cxx3
-rw-r--r--svl/source/misc/sharecontrolfile.cxx2
-rw-r--r--svtools/qa/unit/svtools-dialogs-test.cxx2
-rw-r--r--svtools/qa/unit/testHtmlReader.cxx2
-rw-r--r--svtools/source/config/extcolorcfg.cxx9
-rw-r--r--svtools/source/dialogs/prnsetup.cxx6
-rw-r--r--svtools/source/misc/langtab.cxx8
-rw-r--r--svtools/source/svhtml/HtmlWriter.cxx6
-rw-r--r--svtools/source/svhtml/parhtml.cxx4
-rw-r--r--svx/qa/unit/customshapes.cxx19
-rw-r--r--svx/qa/unit/gallery/test_gallery.cxx6
-rw-r--r--svx/qa/unit/sdr.cxx2
-rw-r--r--svx/qa/unit/svx-dialogs-test.cxx2
-rw-r--r--svx/qa/unit/xoutdev.cxx2
-rw-r--r--svx/source/form/fmview.cxx2
-rw-r--r--svx/source/form/fmvwimp.cxx4
-rw-r--r--svx/source/inc/fmvwimp.hxx5
-rw-r--r--svx/source/smarttags/SmartTagMgr.cxx7
-rw-r--r--svx/source/svdraw/svdomedia.cxx2
-rw-r--r--svx/source/xml/xmlgrhlp.cxx7
-rw-r--r--sw/inc/docstyle.hxx7
-rw-r--r--sw/inc/unocrsrhelper.hxx7
-rw-r--r--sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx2
-rw-r--r--sw/qa/core/filters-test.cxx24
-rw-r--r--sw/qa/core/filters-test2.cxx2
-rw-r--r--sw/qa/core/macros-test.cxx13
-rw-r--r--sw/qa/extras/globalfilter/globalfilter.cxx36
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport10.cxx7
-rw-r--r--sw/qa/extras/rtfexport/rtfexport2.cxx12
-rw-r--r--sw/qa/extras/rtfexport/rtfexport5.cxx6
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx8
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx21
-rw-r--r--sw/qa/extras/uiwriter/uiwriter2.cxx2
-rw-r--r--sw/qa/inc/swmodeltestbase.hxx9
-rw-r--r--sw/qa/unit/sw-dialogs-test.cxx2
-rw-r--r--sw/qa/unit/sw-dialogs-test_2.cxx2
-rw-r--r--sw/qa/unit/swmodeltestbase.cxx8
-rw-r--r--sw/source/core/bastyp/SwSmartTagMgr.cxx2
-rw-r--r--sw/source/core/crsr/annotationmark.cxx2
-rw-r--r--sw/source/core/crsr/bookmrk.cxx10
-rw-r--r--sw/source/core/crsr/crossrefbookmark.cxx4
-rw-r--r--sw/source/core/doc/docnew.cxx3
-rw-r--r--sw/source/core/edit/edfcol.cxx2
-rw-r--r--sw/source/core/graphic/ndgrf.cxx6
-rw-r--r--sw/source/core/inc/bookmrk.hxx4
-rw-r--r--sw/source/core/inc/crossrefbookmark.hxx6
-rw-r--r--sw/source/core/text/porfld.cxx2
-rw-r--r--sw/source/core/text/porfld.hxx6
-rw-r--r--sw/source/core/text/porhyph.hxx10
-rw-r--r--sw/source/core/text/txthyph.cxx2
-rw-r--r--sw/source/core/undo/unbkmk.cxx6
-rw-r--r--sw/source/core/unocore/unochart.cxx17
-rw-r--r--sw/source/core/unocore/unoobj.cxx15
-rw-r--r--sw/source/filter/html/htmlcss1.cxx6
-rw-r--r--sw/source/filter/html/htmlform.cxx6
-rw-r--r--sw/source/filter/html/swcss1.hxx6
-rw-r--r--sw/source/filter/html/wrthtml.cxx4
-rw-r--r--sw/source/filter/html/wrthtml.hxx2
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx4
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.hxx4
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx4
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx6
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par.hxx2
-rw-r--r--sw/source/filter/xml/xmlexp.hxx4
-rw-r--r--sw/source/filter/xml/xmltble.cxx27
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx42
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx15
-rw-r--r--sw/source/ui/dochdl/selglos.cxx2
-rw-r--r--sw/source/uibase/app/docsh.cxx2
-rw-r--r--sw/source/uibase/app/docstyle.cxx6
-rw-r--r--sw/source/uibase/inc/inputwin.hxx6
-rw-r--r--sw/source/uibase/inc/selglos.hxx10
-rw-r--r--sw/source/uibase/misc/glosdoc.cxx5
-rw-r--r--sw/source/uibase/ribbar/inputwin.cxx4
-rw-r--r--test/source/bootstrapfixture.cxx8
-rw-r--r--test/source/helper/form.cxx11
-rw-r--r--test/source/helper/shape.cxx16
-rw-r--r--test/source/screenshot_test.cxx2
-rw-r--r--test/source/unoapi_test.cxx2
-rw-r--r--test/source/view/xcontrolaccess.cxx2
-rw-r--r--test/source/xmltesttools.cxx2
-rw-r--r--tools/qa/cppunit/test_config.cxx2
-rw-r--r--tools/qa/cppunit/test_xmlwalker.cxx2
-rw-r--r--ucb/source/core/ucb.cxx13
-rw-r--r--ucb/source/ucp/file/filglob.cxx4
-rw-r--r--ucb/source/ucp/file/filglob.hxx2
-rw-r--r--ucb/source/ucp/package/pkgcontent.cxx4
-rw-r--r--ucb/source/ucp/package/pkgcontent.hxx5
-rw-r--r--unodevtools/source/skeletonmaker/cppcompskeleton.cxx15
-rw-r--r--unodevtools/source/skeletonmaker/cpptypemaker.cxx7
-rw-r--r--unodevtools/source/skeletonmaker/javatypemaker.cxx6
-rw-r--r--unodevtools/source/skeletonmaker/skeletoncommon.cxx13
-rw-r--r--unodevtools/source/skeletonmaker/skeletoncpp.hxx3
-rw-r--r--unodevtools/source/skeletonmaker/skeletonjava.hxx3
-rw-r--r--unoidl/source/unoidl-check.cxx13
-rw-r--r--unoidl/source/unoidl-read.cxx7
-rw-r--r--unotest/source/cpp/directories.cxx8
-rw-r--r--unotest/source/cpp/filters-test.cxx8
-rw-r--r--unotest/source/cpp/getargument.cxx4
-rw-r--r--unotest/source/cpp/getargument.hxx4
-rw-r--r--unotest/source/cpp/gettestargument.cxx4
-rw-r--r--unotest/source/cpp/macros_test.cxx5
-rw-r--r--unotest/source/cpp/officeconnection.cxx6
-rw-r--r--unotools/source/config/bootstrap.cxx12
-rw-r--r--unotools/source/config/dynamicmenuoptions.cxx10
-rw-r--r--unotools/source/config/moduleoptions.cxx12
-rw-r--r--unotools/source/config/optionsdlg.cxx42
-rw-r--r--uui/qa/unit/uui-dialogs-test.cxx2
-rw-r--r--vbahelper/source/vbahelper/vbahelper.cxx4
-rw-r--r--vbahelper/source/vbahelper/vbashapes.cxx10
-rw-r--r--vcl/inc/unx/printerjob.hxx5
-rw-r--r--vcl/qa/api/XGraphicTest.cxx8
-rw-r--r--vcl/qa/cppunit/BitmapFilterTest.cxx19
-rw-r--r--vcl/qa/cppunit/GraphicFormatDetectorTest.cxx40
-rw-r--r--vcl/qa/cppunit/GraphicNativeMetadataTest.cxx18
-rw-r--r--vcl/qa/cppunit/GraphicTest.cxx2
-rw-r--r--vcl/qa/cppunit/PDFiumLibraryTest.cxx18
-rw-r--r--vcl/qa/cppunit/VectorGraphicSearchTest.cxx16
-rw-r--r--vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx14
-rw-r--r--vcl/qa/cppunit/blocklistparsertest.cxx6
-rw-r--r--vcl/qa/cppunit/graphicfilter/filters-test.cxx18
-rw-r--r--vcl/qa/cppunit/jpeg/JpegReaderTest.cxx14
-rw-r--r--vcl/qa/cppunit/jpeg/JpegWriterTest.cxx10
-rw-r--r--vcl/qa/cppunit/pdfexport/pdfexport.cxx39
-rw-r--r--vcl/qa/cppunit/png/PngFilterTest.cxx6
-rw-r--r--vcl/qa/cppunit/svm/svmtest.cxx91
-rw-r--r--vcl/qa/cppunit/widgetdraw/WidgetDefinitionReaderTest.cxx17
-rw-r--r--vcl/qa/unit/vcl-dialogs-test.cxx2
-rw-r--r--vcl/source/app/brand.cxx12
-rw-r--r--vcl/source/control/fmtfield.cxx6
-rw-r--r--vcl/source/control/notebookbar.cxx8
-rw-r--r--vcl/source/filter/FilterConfigItem.cxx8
-rw-r--r--vcl/source/filter/graphicfilter.cxx2
-rw-r--r--vcl/source/gdi/FileDefinitionWidgetDraw.cxx10
-rw-r--r--vcl/source/gdi/embeddedfontshelper.cxx4
-rw-r--r--vcl/source/image/ImplImageTree.cxx13
-rw-r--r--vcl/source/opengl/OpenGLHelper.cxx36
-rw-r--r--vcl/unx/generic/print/glyphset.cxx6
-rw-r--r--vcl/unx/generic/print/glyphset.hxx3
-rw-r--r--vcl/unx/generic/print/printerjob.cxx12
-rw-r--r--vcl/unx/gtk3/gtk3gtkinst.cxx2
-rw-r--r--writerfilter/qa/cppunittests/filters-test/filters-test.cxx2
-rw-r--r--writerfilter/source/filter/WriterFilter.cxx2
-rw-r--r--writerfilter/source/ooxml/OOXMLDocumentImpl.cxx4
-rw-r--r--writerperfect/qa/unit/EPUBExportTest.cxx107
-rw-r--r--writerperfect/qa/unit/ImportTest.cxx17
-rw-r--r--writerperfect/qa/unit/WpftCalcFilterTest.cxx8
-rw-r--r--writerperfect/qa/unit/WpftDrawFilterTest.cxx21
-rw-r--r--writerperfect/qa/unit/WpftFilterTestBase.cxx4
-rw-r--r--writerperfect/qa/unit/WpftFilterTestBase.hxx5
-rw-r--r--writerperfect/qa/unit/WpftImpressFilterTest.cxx4
-rw-r--r--writerperfect/qa/unit/WpftWriterFilterTest.cxx14
-rw-r--r--writerperfect/qa/unit/writerperfect-dialogs-test.cxx2
-rw-r--r--writerperfect/source/common/WPXSvInputStream.cxx12
-rw-r--r--xmlhelp/source/cxxhelp/provider/databases.cxx25
-rw-r--r--xmlhelp/source/cxxhelp/provider/databases.hxx7
-rw-r--r--xmloff/inc/txtflde.hxx2
-rw-r--r--xmloff/qa/unit/style.cxx10
-rw-r--r--xmloff/source/core/xmlimp.cxx6
-rw-r--r--xmloff/source/style/xmlnumfi.cxx3
-rw-r--r--xmloff/source/text/XMLTextFrameContext.cxx3
-rw-r--r--xmloff/source/text/txtflde.cxx4
-rw-r--r--xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx12
-rw-r--r--xmlsecurity/qa/unit/xmlsecurity-dialogs-test.cxx2
-rw-r--r--xmlsecurity/source/helper/documentsignaturehelper.cxx27
-rw-r--r--xmlsecurity/source/helper/xmlsignaturehelper.cxx4
631 files changed, 4168 insertions, 3491 deletions
diff --git a/avmedia/source/framework/mediaitem.cxx b/avmedia/source/framework/mediaitem.cxx
index 3b83f3853ce8..f42065e8e81e 100644
--- a/avmedia/source/framework/mediaitem.cxx
+++ b/avmedia/source/framework/mediaitem.cxx
@@ -478,7 +478,7 @@ bool EmbedMedia(uno::Reference<frame::XModel> const& xModel,
}
bool CreateMediaTempFile(uno::Reference<io::XInputStream> const& xInStream,
- OUString& o_rTempFileURL, const OUString& rDesiredExtension)
+ OUString& o_rTempFileURL, std::u16string_view rDesiredExtension)
{
OUString tempFileURL;
::osl::FileBase::RC const err =
@@ -489,7 +489,7 @@ bool CreateMediaTempFile(uno::Reference<io::XInputStream> const& xInStream,
return false;
}
- if (!rDesiredExtension.isEmpty())
+ if (!rDesiredExtension.empty())
{
OUString newTempFileURL = tempFileURL + rDesiredExtension;
if (osl::File::move(tempFileURL, newTempFileURL) != osl::FileBase::E_None)
diff --git a/basctl/qa/unit/basctl-dialogs-test.cxx b/basctl/qa/unit/basctl-dialogs-test.cxx
index b907681f629d..3b58757f38dc 100644
--- a/basctl/qa/unit/basctl-dialogs-test.cxx
+++ b/basctl/qa/unit/basctl-dialogs-test.cxx
@@ -51,7 +51,7 @@ VclPtr<VclAbstractDialog> BasctlDialogsTest::createDialogByID(sal_uInt32 /*nID*/
void BasctlDialogsTest::openAnyDialog()
{
/// process input file containing the UXMLDescriptions of the dialogs to dump
- processDialogBatchFile("basctl/qa/unit/data/basctl-dialogs-test.txt");
+ processDialogBatchFile(u"basctl/qa/unit/data/basctl-dialogs-test.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(BasctlDialogsTest);
diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx
index 4318ad803306..5e409a267423 100644
--- a/basctl/source/basicide/bastype3.cxx
+++ b/basctl/source/basicide/bastype3.cxx
@@ -429,9 +429,9 @@ bool SbTreeListBox::FindRootEntry( const ScriptDocument& rDocument, LibraryLocat
return false;
}
-OUString CreateMgrAndLibStr( const OUString& rMgrName, const OUString& rLibName )
+OUString CreateMgrAndLibStr( std::u16string_view rMgrName, std::u16string_view rLibName )
{
- return "[" + rMgrName + "]." + rLibName;
+ return OUString::Concat("[") + rMgrName + "]." + rLibName;
}
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index 99a54894a3e8..0a4f2efc62cf 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <strings.hrc>
#include <helpids.h>
#include <iderid.hxx>
@@ -692,36 +696,36 @@ LibInfo::Item::Item (
m_eCurrentType(eCurrentType)
{ }
-static bool QueryDel(const OUString& rName, const OUString &rStr, weld::Widget* pParent)
+static bool QueryDel(std::u16string_view rName, const OUString &rStr, weld::Widget* pParent)
{
- OUString aName = "\'" + rName + "\'";
+ OUString aName = OUString::Concat("\'") + rName + "\'";
OUString aQuery = rStr.replaceAll("XX", aName);
std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pParent,
VclMessageType::Question, VclButtonsType::YesNo, aQuery));
return (xQueryBox->run() == RET_YES);
}
-bool QueryDelMacro( const OUString& rName, weld::Widget* pParent )
+bool QueryDelMacro( std::u16string_view rName, weld::Widget* pParent )
{
return QueryDel( rName, IDEResId( RID_STR_QUERYDELMACRO ), pParent );
}
-bool QueryReplaceMacro( const OUString& rName, weld::Widget* pParent )
+bool QueryReplaceMacro( std::u16string_view rName, weld::Widget* pParent )
{
return QueryDel( rName, IDEResId( RID_STR_QUERYREPLACEMACRO ), pParent );
}
-bool QueryDelDialog( const OUString& rName, weld::Widget* pParent )
+bool QueryDelDialog( std::u16string_view rName, weld::Widget* pParent )
{
return QueryDel( rName, IDEResId( RID_STR_QUERYDELDIALOG ), pParent );
}
-bool QueryDelLib( const OUString& rName, bool bRef, weld::Widget* pParent )
+bool QueryDelLib( std::u16string_view rName, bool bRef, weld::Widget* pParent )
{
return QueryDel( rName, IDEResId( bRef ? RID_STR_QUERYDELLIBREF : RID_STR_QUERYDELLIB ), pParent );
}
-bool QueryDelModule( const OUString& rName, weld::Widget* pParent )
+bool QueryDelModule( std::u16string_view rName, weld::Widget* pParent )
{
return QueryDel( rName, IDEResId( RID_STR_QUERYDELMODULE ), pParent );
}
diff --git a/basctl/source/basicide/localizationmgr.cxx b/basctl/source/basicide/localizationmgr.cxx
index 1e31f8a47d0f..72408cd61ac0 100644
--- a/basctl/source/basicide/localizationmgr.cxx
+++ b/basctl/source/basicide/localizationmgr.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <localizationmgr.hxx>
#include <basidesh.hxx>
@@ -146,7 +150,7 @@ void LocalizationMgr::implEnableDisableResourceForAllLibraryDialogs( HandleResou
Any aDialogCtrl;
aDialogCtrl <<= xDialog;
implHandleControlResourceProperties( aDialogCtrl, aDlgName,
- OUString(), m_xStringResourceManager, xDummyStringResolver, eMode );
+ std::u16string_view(), m_xStringResourceManager, xDummyStringResolver, eMode );
// Handle all controls
Sequence< OUString > aNames = xDialog->getElementNames();
@@ -166,7 +170,7 @@ void LocalizationMgr::implEnableDisableResourceForAllLibraryDialogs( HandleResou
static OUString implCreatePureResourceId
- ( const OUString& aDialogName, const OUString& aCtrlName,
+ ( std::u16string_view aDialogName, std::u16string_view aCtrlName,
const OUString& aPropName,
const Reference< XStringResourceManager >& xStringResourceManager )
{
@@ -175,7 +179,7 @@ static OUString implCreatePureResourceId
+ aDot
+ aDialogName
+ aDot;
- if( !aCtrlName.isEmpty() )
+ if( !aCtrlName.empty() )
{
aPureIdStr += aCtrlName + aDot;
}
@@ -187,7 +191,7 @@ static OUString implCreatePureResourceId
// anyway only one language should exist when calling this method then,
// either the first one for mode SET_IDS or the last one for mode RESET_IDS
sal_Int32 LocalizationMgr::implHandleControlResourceProperties
- (const Any& rControlAny, const OUString& aDialogName, const OUString& aCtrlName,
+ (const Any& rControlAny, std::u16string_view aDialogName, std::u16string_view aCtrlName,
const Reference< XStringResourceManager >& xStringResourceManager,
const Reference< XStringResourceResolver >& xSourceStringResolver, HandleResourceMode eMode )
{
@@ -791,7 +795,7 @@ static DialogWindow* FindDialogWindowForEditor( DlgEditor const * pEditor )
void LocalizationMgr::setControlResourceIDsForNewEditorObject( DlgEditor const * pEditor,
- const Any& rControlAny, const OUString& aCtrlName )
+ const Any& rControlAny, std::u16string_view aCtrlName )
{
// Get library for DlgEditor
DialogWindow* pDlgWin = FindDialogWindowForEditor( pEditor );
@@ -821,7 +825,7 @@ void LocalizationMgr::setControlResourceIDsForNewEditorObject( DlgEditor const *
}
void LocalizationMgr::renameControlResourceIDsForEditorObject( DlgEditor const * pEditor,
- const css::uno::Any& rControlAny, const OUString& aNewCtrlName )
+ const css::uno::Any& rControlAny, std::u16string_view aNewCtrlName )
{
// Get library for DlgEditor
DialogWindow* pDlgWin = FindDialogWindowForEditor( pEditor );
@@ -849,7 +853,7 @@ void LocalizationMgr::renameControlResourceIDsForEditorObject( DlgEditor const *
void LocalizationMgr::deleteControlResourceIDsForDeletedEditorObject( DlgEditor const * pEditor,
- const Any& rControlAny, const OUString& aCtrlName )
+ const Any& rControlAny, std::u16string_view aCtrlName )
{
// Get library for DlgEditor
DialogWindow* pDlgWin = FindDialogWindowForEditor( pEditor );
@@ -875,7 +879,7 @@ void LocalizationMgr::deleteControlResourceIDsForDeletedEditorObject( DlgEditor
}
void LocalizationMgr::setStringResourceAtDialog( const ScriptDocument& rDocument, const OUString& aLibName,
- const OUString& aDlgName, const Reference< container::XNameContainer >& xDialogModel )
+ std::u16string_view aDlgName, const Reference< container::XNameContainer >& xDialogModel )
{
// Get library
Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, true ) );
@@ -894,7 +898,7 @@ void LocalizationMgr::setStringResourceAtDialog( const ScriptDocument& rDocument
aDialogCtrl <<= xDialogModel;
Reference< XStringResourceResolver > xDummyStringResolver;
implHandleControlResourceProperties( aDialogCtrl, aDlgName,
- OUString(), xStringResourceManager,
+ std::u16string_view(), xStringResourceManager,
xDummyStringResolver, SET_IDS );
}
@@ -903,7 +907,7 @@ void LocalizationMgr::setStringResourceAtDialog( const ScriptDocument& rDocument
}
void LocalizationMgr::renameStringResourceIDs( const ScriptDocument& rDocument, const OUString& aLibName,
- const OUString& aDlgName, const Reference< container::XNameContainer >& xDialogModel )
+ std::u16string_view aDlgName, const Reference< container::XNameContainer >& xDialogModel )
{
// Get library
Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, true ) );
@@ -916,7 +920,7 @@ void LocalizationMgr::renameStringResourceIDs( const ScriptDocument& rDocument,
aDialogCtrl <<= xDialogModel;
Reference< XStringResourceResolver > xDummyStringResolver;
implHandleControlResourceProperties( aDialogCtrl, aDlgName,
- OUString(), xStringResourceManager,
+ std::u16string_view(), xStringResourceManager,
xDummyStringResolver, RENAME_DIALOG_IDS );
// Handle all controls
@@ -934,7 +938,7 @@ void LocalizationMgr::renameStringResourceIDs( const ScriptDocument& rDocument,
}
void LocalizationMgr::removeResourceForDialog( const ScriptDocument& rDocument, const OUString& aLibName,
- const OUString& aDlgName, const Reference< container::XNameContainer >& xDialogModel )
+ std::u16string_view aDlgName, const Reference< container::XNameContainer >& xDialogModel )
{
// Get library
Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, true ) );
@@ -947,7 +951,7 @@ void LocalizationMgr::removeResourceForDialog( const ScriptDocument& rDocument,
aDialogCtrl <<= xDialogModel;
Reference< XStringResourceResolver > xDummyStringResolver;
implHandleControlResourceProperties( aDialogCtrl, aDlgName,
- OUString(), xStringResourceManager,
+ std::u16string_view(), xStringResourceManager,
xDummyStringResolver, REMOVE_IDS_FROM_RESOURCE );
// Handle all controls
@@ -1019,7 +1023,7 @@ void LocalizationMgr::setResourceIDsForDialog( const Reference< container::XName
}
void LocalizationMgr::copyResourcesForPastedEditorObject( DlgEditor const * pEditor,
- const Any& rControlAny, const OUString& aCtrlName,
+ const Any& rControlAny, std::u16string_view aCtrlName,
const Reference< XStringResourceResolver >& xSourceStringResolver )
{
// Get library for DlgEditor
@@ -1046,7 +1050,8 @@ void LocalizationMgr::copyResourcesForPastedEditorObject( DlgEditor const * pEdi
}
void LocalizationMgr::copyResourceForDroppedDialog( const Reference< container::XNameContainer >& xDialogModel,
- const OUString& aDialogName, const Reference< XStringResourceManager >& xStringResourceManager,
+ std::u16string_view aDialogName,
+ const Reference< XStringResourceManager >& xStringResourceManager,
const Reference< XStringResourceResolver >& xSourceStringResolver )
{
if( !xStringResourceManager.is() )
@@ -1056,7 +1061,7 @@ void LocalizationMgr::copyResourceForDroppedDialog( const Reference< container::
Any aDialogCtrl;
aDialogCtrl <<= xDialogModel;
implHandleControlResourceProperties( aDialogCtrl, aDialogName,
- OUString(), xStringResourceManager, xSourceStringResolver, MOVE_RESOURCES );
+ std::u16string_view(), xStringResourceManager, xSourceStringResolver, MOVE_RESOURCES );
// Handle all controls
Sequence< OUString > aNames = xDialogModel->getElementNames();
diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx
index 92c3ee9654ff..9f5daa34d644 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -133,7 +133,7 @@ void Shell::CopyDialogResources(
OUString const& rSourceLibName,
ScriptDocument const& rDestDoc,
OUString const& rDestLibName,
- OUString const& rDlgName
+ std::u16string_view rDlgName
)
{
if ( !io_xISP.is() )
@@ -906,7 +906,7 @@ LibDialog::~LibDialog()
{
}
-void LibDialog::SetStorageName( const OUString& rName )
+void LibDialog::SetStorageName( std::u16string_view rName )
{
OUString aName = IDEResId(RID_STR_FILENAME) + rName;
m_xStorageFrame->set_label(aName);
diff --git a/basctl/source/basicide/moduldlg.hxx b/basctl/source/basicide/moduldlg.hxx
index 37e3d9556185..b7fb13d8901e 100644
--- a/basctl/source/basicide/moduldlg.hxx
+++ b/basctl/source/basicide/moduldlg.hxx
@@ -19,6 +19,10 @@
#pragma once
+#include <sal/config.h>
+
+#include <string_view>
+
#include <bastype2.hxx>
#include <tools/solar.h>
#include <vcl/weld.hxx>
@@ -94,7 +98,7 @@ public:
explicit LibDialog(weld::Window* pParent);
virtual ~LibDialog() override;
- void SetStorageName( const OUString& rName );
+ void SetStorageName( std::u16string_view rName );
weld::TreeView& GetLibBox() { return *m_xLibBox; }
bool IsReference() const { return m_xReferenceBox->get_active(); }
diff --git a/basctl/source/inc/basidesh.hxx b/basctl/source/inc/basidesh.hxx
index d8fe56feb43c..f3127186ce93 100644
--- a/basctl/source/inc/basidesh.hxx
+++ b/basctl/source/inc/basidesh.hxx
@@ -29,6 +29,7 @@
#include <vcl/scrbar.hxx>
#include <map>
#include <memory>
+#include <string_view>
class SfxViewFactory;
class SdrView;
@@ -197,7 +198,7 @@ public:
static void CopyDialogResources(
css::uno::Reference< css::io::XInputStreamProvider >& io_xISP,
const ScriptDocument& rSourceDoc, const OUString& rSourceLibName, const ScriptDocument& rDestDoc,
- const OUString& rDestLibName, const OUString& rDlgName );
+ const OUString& rDestLibName, std::u16string_view rDlgName );
static void InvalidateControlSlots();
diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx
index 21e6c0227a9c..fecebced52ee 100644
--- a/basctl/source/inc/bastypes.hxx
+++ b/basctl/source/inc/bastypes.hxx
@@ -26,6 +26,7 @@
#include <vcl/dockwin.hxx>
#include <vcl/weld.hxx>
+#include <string_view>
#include <unordered_map>
class SbModule;
@@ -288,14 +289,14 @@ private:
};
void CutLines( OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines );
-OUString CreateMgrAndLibStr( const OUString& rMgrName, const OUString& rLibName );
+OUString CreateMgrAndLibStr( std::u16string_view rMgrName, std::u16string_view rLibName );
sal_uInt32 CalcLineCount( SvStream& rStream );
-bool QueryReplaceMacro( const OUString& rName, weld::Widget* pParent );
-bool QueryDelMacro( const OUString& rName, weld::Widget* pParent );
-bool QueryDelDialog( const OUString& rName, weld::Widget* pParent );
-bool QueryDelModule( const OUString& rName, weld::Widget* pParent );
-bool QueryDelLib( const OUString& rName, bool bRef, weld::Widget* pParent );
+bool QueryReplaceMacro( std::u16string_view rName, weld::Widget* pParent );
+bool QueryDelMacro( std::u16string_view rName, weld::Widget* pParent );
+bool QueryDelDialog( std::u16string_view rName, weld::Widget* pParent );
+bool QueryDelModule( std::u16string_view rName, weld::Widget* pParent );
+bool QueryDelLib( std::u16string_view rName, bool bRef, weld::Widget* pParent );
bool QueryPassword(weld::Widget* pDialogParent, const css::uno::Reference< css::script::XLibraryContainer >& xLibContainer, const OUString& rLibName, OUString& rPassword, bool bRepeat = false, bool bNewTitle = false);
class ModuleInfoHelper
diff --git a/basctl/source/inc/localizationmgr.hxx b/basctl/source/inc/localizationmgr.hxx
index 4b72a7d8e58d..847ef0f75729 100644
--- a/basctl/source/inc/localizationmgr.hxx
+++ b/basctl/source/inc/localizationmgr.hxx
@@ -19,6 +19,10 @@
#pragma once
+#include <sal/config.h>
+
+#include <string_view>
+
#include "scriptdocument.hxx"
#include <com/sun/star/resource/XStringResourceManager.hpp>
@@ -51,8 +55,8 @@ class LocalizationMgr
COPY_RESOURCES
};
static sal_Int32 implHandleControlResourceProperties(const css::uno::Any& rControlAny,
- const OUString& aDialogName,
- const OUString& aCtrlName,
+ std::u16string_view aDialogName,
+ std::u16string_view aCtrlName,
const css::uno::Reference< css::resource::XStringResourceManager >& xStringResourceManager,
const css::uno::Reference< css::resource::XStringResourceResolver >& xSourceStringResolver,
HandleResourceMode eMode );
@@ -95,21 +99,21 @@ public:
void handleBasicStopped();
static void setControlResourceIDsForNewEditorObject(DlgEditor const * pEditor,
- const css::uno::Any& rControlAny, const OUString& aCtrlName);
+ const css::uno::Any& rControlAny, std::u16string_view aCtrlName);
static void renameControlResourceIDsForEditorObject(DlgEditor const * pEditor,
- const css::uno::Any& rControlAny, const OUString& aNewCtrlName);
+ const css::uno::Any& rControlAny, std::u16string_view aNewCtrlName);
static void deleteControlResourceIDsForDeletedEditorObject(DlgEditor const * pEditor,
- const css::uno::Any& rControlAny, const OUString& aCtrlName);
+ const css::uno::Any& rControlAny, std::u16string_view aCtrlName);
- static void setStringResourceAtDialog( const ScriptDocument& rDocument, const OUString& aLibName, const OUString& aDlgName,
+ static void setStringResourceAtDialog( const ScriptDocument& rDocument, const OUString& aLibName, std::u16string_view aDlgName,
const css::uno::Reference< css::container::XNameContainer >& xDialogModel );
- static void renameStringResourceIDs( const ScriptDocument& rDocument, const OUString& aLibName, const OUString& aDlgName,
+ static void renameStringResourceIDs( const ScriptDocument& rDocument, const OUString& aLibName, std::u16string_view aDlgName,
const css::uno::Reference< css::container::XNameContainer >& xDialogModel );
- static void removeResourceForDialog( const ScriptDocument& rDocument, const OUString& aLibName, const OUString& aDlgName,
+ static void removeResourceForDialog( const ScriptDocument& rDocument, const OUString& aLibName, std::u16string_view aDlgName,
const css::uno::Reference< css::container::XNameContainer >& xDialogModel );
static css::uno::Reference< css::resource::XStringResourceManager >
@@ -125,12 +129,12 @@ public:
const css::uno::Reference< css::resource::XStringResourceManager >& xStringResourceManager );
static void copyResourcesForPastedEditorObject( DlgEditor const * pEditor,
- const css::uno::Any& rControlAny, const OUString& aCtrlName,
+ const css::uno::Any& rControlAny, std::u16string_view aCtrlName,
const css::uno::Reference< css::resource::XStringResourceResolver >& xSourceStringResolver );
static void copyResourceForDroppedDialog(
const css::uno::Reference< css::container::XNameContainer >& xDialogModel,
- const OUString& aDialogName,
+ std::u16string_view aDialogName,
const css::uno::Reference< css::resource::XStringResourceManager >& xStringResourceManager,
const css::uno::Reference< css::resource::XStringResourceResolver >& xSourceStringResolver );
diff --git a/basic/qa/cppunit/basic_coverage.cxx b/basic/qa/cppunit/basic_coverage.cxx
index effda584dee7..856736b293be 100644
--- a/basic/qa/cppunit/basic_coverage.cxx
+++ b/basic/qa/cppunit/basic_coverage.cxx
@@ -130,7 +130,7 @@ void Coverage::process_directory(const OUString& sDirName)
void Coverage::Coverage_Iterator()
{
- OUString sDirName = m_directories.getURLFromSrc("/basic/qa/basic_coverage/");
+ OUString sDirName = m_directories.getURLFromSrc(u"/basic/qa/basic_coverage/");
CPPUNIT_ASSERT(!sDirName.isEmpty());
process_directory(sDirName); // any files in the root test dir are run in test harness default locale ( en-US )
diff --git a/basic/qa/cppunit/test_vba.cxx b/basic/qa/cppunit/test_vba.cxx
index 3f0818424a70..a38e4ceaab16 100644
--- a/basic/qa/cppunit/test_vba.cxx
+++ b/basic/qa/cppunit/test_vba.cxx
@@ -145,7 +145,7 @@ void VBATest::testMiscVBAFunctions()
#endif
"win32compatb.vb" // same methods, different signatures.
};
- OUString sMacroPathURL = m_directories.getURLFromSrc("/basic/qa/vba_tests/");
+ OUString sMacroPathURL = m_directories.getURLFromSrc(u"/basic/qa/vba_tests/");
OUString sMacroUtilsURL = sMacroPathURL + "_test_asserts.vb";
// Some test data expects the uk locale
LanguageTag aLocale(LANGUAGE_ENGLISH_UK);
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 82ffb8c11699..af9ca9e73da1 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -83,6 +83,7 @@
#include <algorithm>
#include <math.h>
#include <memory>
+#include <string_view>
#include <unordered_map>
#include <com/sun/star/reflection/XTypeDescriptionEnumerationAccess.hpp>
#include <com/sun/star/reflection/XConstantsTypeDescription.hpp>
@@ -4179,7 +4180,7 @@ class ModuleInvocationProxy : public WeakImplHelper< XInvocation, XComponent >
::comphelper::OInterfaceContainerHelper2 m_aListeners;
public:
- ModuleInvocationProxy( OUString const & aPrefix, SbxObjectRef const & xScopeObj );
+ ModuleInvocationProxy( std::u16string_view aPrefix, SbxObjectRef const & xScopeObj );
// XInvocation
virtual Reference< XIntrospectionAccess > SAL_CALL getIntrospection() override;
@@ -4201,9 +4202,9 @@ public:
}
-ModuleInvocationProxy::ModuleInvocationProxy( OUString const & aPrefix, SbxObjectRef const & xScopeObj )
+ModuleInvocationProxy::ModuleInvocationProxy( std::u16string_view aPrefix, SbxObjectRef const & xScopeObj )
: m_aMutex()
- , m_aPrefix( aPrefix + "_" )
+ , m_aPrefix( OUString::Concat(aPrefix) + "_" )
, m_xScopeObj( xScopeObj )
, m_aListeners( m_aMutex )
{
@@ -4381,7 +4382,8 @@ void SAL_CALL ModuleInvocationProxy::removeEventListener( const Reference< XEven
Reference< XInterface > createComListener( const Any& aControlAny, const OUString& aVBAType,
- const OUString& aPrefix, const SbxObjectRef& xScopeObj )
+ std::u16string_view aPrefix,
+ const SbxObjectRef& xScopeObj )
{
Reference< XInterface > xRet;
diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx
index 6476c3f65c01..47081b7633f3 100644
--- a/basic/source/inc/sbunoobj.hxx
+++ b/basic/source/inc/sbunoobj.hxx
@@ -379,7 +379,7 @@ SbxVariable* getDefaultProp( SbxVariable* pRef );
css::uno::Reference< css::uno::XInterface > createComListener( const css::uno::Any& aControlAny,
const OUString& aVBAType,
- const OUString& aPrefix,
+ std::u16string_view aPrefix,
const SbxObjectRef& xScopeObj );
bool checkUnoObjectType(SbUnoObject& refVal, const OUString& aClass);
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index ec112b466f3f..dc83ae5a3546 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -66,6 +66,7 @@
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <memory>
+#include <string_view>
namespace basic
{
@@ -571,8 +572,8 @@ static void checkAndCopyFileImpl( const INetURLObject& rSourceFolderInetObj,
}
}
-static void createVariableURL( OUString& rStr, const OUString& rLibName,
- const OUString& rInfoFileName, bool bUser )
+static void createVariableURL( OUString& rStr, std::u16string_view rLibName,
+ std::u16string_view rInfoFileName, bool bUser )
{
if( bUser )
{
@@ -582,7 +583,7 @@ static void createVariableURL( OUString& rStr, const OUString& rLibName,
{
rStr = "$(INST)/" LIBO_SHARE_FOLDER "/basic/";
}
- rStr += rLibName + "/" + rInfoFileName + ".xlb/";
+ rStr += OUString::Concat(rLibName) + "/" + rInfoFileName + ".xlb/";
}
void SfxLibraryContainer::init( const OUString& rInitialDocumentURL, const uno::Reference< embed::XStorage >& rxInitialStorage )
diff --git a/canvas/source/tools/propertysethelper.cxx b/canvas/source/tools/propertysethelper.cxx
index e7880fe4bd83..92f2e3bd28e4 100644
--- a/canvas/source/tools/propertysethelper.cxx
+++ b/canvas/source/tools/propertysethelper.cxx
@@ -19,6 +19,8 @@
#include <sal/config.h>
+#include <string_view>
+
#include <propertysethelper.hxx>
#include <com/sun/star/beans/PropertyVetoException.hpp>
#include <com/sun/star/beans/UnknownPropertyException.hpp>
@@ -29,18 +31,18 @@ namespace canvas
{
namespace
{
- void throwUnknown( const OUString& aPropertyName )
+ void throwUnknown( std::u16string_view aPropertyName )
{
throw beans::UnknownPropertyException(
- "PropertySetHelper: property " +
+ OUString::Concat("PropertySetHelper: property ") +
aPropertyName + " not found."
);
}
- void throwVeto( const OUString& aPropertyName )
+ void throwVeto( std::u16string_view aPropertyName )
{
throw beans::PropertyVetoException(
- "PropertySetHelper: property " +
+ OUString::Concat("PropertySetHelper: property ") +
aPropertyName + " access was vetoed." );
}
diff --git a/chart2/qa/extras/PivotChartTest.cxx b/chart2/qa/extras/PivotChartTest.cxx
index 44998835dbcc..cda42a2bd632 100644
--- a/chart2/qa/extras/PivotChartTest.cxx
+++ b/chart2/qa/extras/PivotChartTest.cxx
@@ -316,7 +316,7 @@ void PivotChartTest::testRoundtrip()
std::vector<double> aReference2 { 101879.458079, 178636.929704, 314626.484864 };
- load("/chart2/qa/extras/data/ods/", "PivotChartRoundTrip.ods");
+ load(u"/chart2/qa/extras/data/ods/", "PivotChartRoundTrip.ods");
xChartDoc = getPivotChartDocFromSheet(1, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -371,7 +371,7 @@ void PivotChartTest::testChangePivotTable()
uno::Sequence<uno::Any> xSequence;
Reference<chart2::XChartDocument> xChartDoc;
- load("/chart2/qa/extras/data/ods/", "PivotTableExample.ods");
+ load(u"/chart2/qa/extras/data/ods/", "PivotTableExample.ods");
// Check we have the Pivot Table
OUString sPivotTableName("DataPilot1");
diff --git a/chart2/qa/extras/chart2_trendcalculators.cxx b/chart2/qa/extras/chart2_trendcalculators.cxx
index 42dce791d83b..b8eb367524bb 100644
--- a/chart2/qa/extras/chart2_trendcalculators.cxx
+++ b/chart2/qa/extras/chart2_trendcalculators.cxx
@@ -64,7 +64,7 @@ private:
void Chart2TrendCalculators::setUp()
{
ChartTest::setUp();
- load("/chart2/qa/extras/data/ods/", "trend_calculators.ods");
+ load(u"/chart2/qa/extras/data/ods/", "trend_calculators.ods");
}
void Chart2TrendCalculators::tearDown()
diff --git a/chart2/qa/extras/chart2dump/chart2dump.cxx b/chart2/qa/extras/chart2dump/chart2dump.cxx
index 77739fb67034..838234f7c78c 100644
--- a/chart2/qa/extras/chart2dump/chart2dump.cxx
+++ b/chart2/qa/extras/chart2dump/chart2dump.cxx
@@ -22,6 +22,7 @@
#include <rtl/ustrbuf.hxx>
#include <fstream>
+#include <string_view>
#if defined(X86)
#define INT_EPS 2.1
@@ -50,7 +51,7 @@
else \
{ \
OString sTestFileName = OUStringToOString(getTestFileName(), RTL_TEXTENCODING_UTF8); \
- CPPUNIT_ASSERT_EQUAL_MESSAGE(OString("Failing test file is: " + sTestFileName).getStr(), readExpected(#aActual), OUString(OUString::number(aActual))); \
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(OString("Failing test file is: " + sTestFileName).getStr(), readExpected(u ## #aActual), OUString(OUString::number(aActual))); \
}
#define CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aActual, EPS_) \
@@ -59,7 +60,7 @@
else \
{ \
OString sTestFileName = OUStringToOString(getTestFileName(), RTL_TEXTENCODING_UTF8); \
- CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(OString("Failing test file is: " + sTestFileName).getStr(), readExpectedDouble(#aActual), aActual, EPS_); \
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(OString("Failing test file is: " + sTestFileName).getStr(), readExpectedDouble(u ## #aActual), aActual, EPS_); \
}
#define CPPUNIT_DUMP_ASSERT_STRINGS_EQUAL(aActual) \
@@ -68,7 +69,7 @@
else \
{ \
OString sTestFileName = OUStringToOString(getTestFileName(), RTL_TEXTENCODING_UTF8); \
- CPPUNIT_ASSERT_EQUAL_MESSAGE(OString("Failing test file is: " + sTestFileName).getStr(), readExpected(#aActual), aActual.trim()); \
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(OString("Failing test file is: " + sTestFileName).getStr(), readExpected(u ## #aActual), aActual.trim()); \
}
#define CPPUNIT_DUMP_ASSERT_TRANSFORMATIONS_EQUAL(aActual, EPS_) \
@@ -77,7 +78,7 @@
else \
{ \
OUString expectedTransform; \
- if (!readAndCheckTransformation (aActual, #aActual, EPS_, expectedTransform)) \
+ if (!readAndCheckTransformation (aActual, u ## #aActual, EPS_, expectedTransform)) \
{ \
OString sTestFileName = OUStringToOString(getTestFileName(), RTL_TEXTENCODING_UTF8); \
CPPUNIT_ASSERT_EQUAL_MESSAGE(OString("Failing test file is: " + sTestFileName).getStr(), expectedTransform, transformationToOneLineString(aActual)); \
@@ -143,7 +144,7 @@ protected:
CPPUNIT_FAIL("verify method must be overridden");
}
- OUString readExpected(const OUString& sCheck)
+ OUString readExpected(std::u16string_view sCheck)
{
assert(!m_bDumpMode);
assert(m_aReferenceFile.is_open());
@@ -152,7 +153,7 @@ protected:
OString sAssertMessage =
"The reference file does not contain the right content. Maybe it needs an update:"
+ OUStringToOString(m_sTestFileName, RTL_TEXTENCODING_UTF8);
- CPPUNIT_ASSERT_EQUAL_MESSAGE(sAssertMessage.getStr(), OUString("// " + sCheck), OUString(sTemp.data(), sTemp.length(), RTL_TEXTENCODING_UTF8));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(sAssertMessage.getStr(), OUString(OUString::Concat("// ") + sCheck), OUString(sTemp.data(), sTemp.length(), RTL_TEXTENCODING_UTF8));
getline(m_aReferenceFile, sTemp);
return OUString(sTemp.data(), sTemp.length(), RTL_TEXTENCODING_UTF8);
}
@@ -165,7 +166,7 @@ protected:
m_aDumpFile << sActualValue.trim() << "\n"; // Write out the checked value, will be used as reference later
}
- void readNote(const OUString& sNote)
+ void readNote(std::u16string_view sNote)
{
assert(!m_bDumpMode);
assert(m_aReferenceFile.is_open());
@@ -174,7 +175,7 @@ protected:
OString sAssertMessage =
"The reference file does not contain the right content. Maybe it needs an update:"
+ OUStringToOString(m_sTestFileName, RTL_TEXTENCODING_UTF8);
- CPPUNIT_ASSERT_EQUAL_MESSAGE(sAssertMessage.getStr(), OUString("/// " + sNote), OUString(sTemp.data(), sTemp.length(), RTL_TEXTENCODING_UTF8));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(sAssertMessage.getStr(), OUString(OUString::Concat("/// ") + sNote), OUString(sTemp.data(), sTemp.length(), RTL_TEXTENCODING_UTF8));
}
void writeNote(const OUString& sNote)
@@ -184,7 +185,7 @@ protected:
m_aDumpFile << "/// " << sNote << "\n";
}
- double readExpectedDouble(const OUString& sCheck)
+ double readExpectedDouble(std::u16string_view sCheck)
{
OUString sExpected = readExpected(sCheck);
return sExpected.toDouble();
@@ -195,7 +196,7 @@ protected:
writeActual(transformationToOneLineString(rTransform), sCheck);
}
- bool readAndCheckTransformation(const drawing::HomogenMatrix3& rTransform, const OUString& sCheck, const double fEPS, OUString& rExpectedTransform)
+ bool readAndCheckTransformation(const drawing::HomogenMatrix3& rTransform, std::u16string_view sCheck, const double fEPS, OUString& rExpectedTransform)
{
rExpectedTransform = readExpected(sCheck); // Reference transformation string
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx
index d0cd3be67d66..a702d5113b13 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -580,7 +580,7 @@ void checkTrendlinesInChart(uno::Reference< chart2::XChartDocument > const & xCh
// improve the test
void Chart2ExportTest::testErrorBarXLSX()
{
- load("/chart2/qa/extras/data/ods/", "error_bar.ods");
+ load(u"/chart2/qa/extras/data/ods/", "error_bar.ods");
{
// make sure the ODS import was successful
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent );
@@ -616,7 +616,7 @@ void Chart2ExportTest::testErrorBarXLSX()
void Chart2ExportTest::testErrorBarPropXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "testErrorBarProp.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "testErrorBarProp.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart","Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -636,7 +636,7 @@ void Chart2ExportTest::testErrorBarPropXLSX()
void Chart2ExportTest::testTrendline()
{
mbSkipValidation = true;
- load("/chart2/qa/extras/data/ods/", "trendline.ods");
+ load(u"/chart2/qa/extras/data/ods/", "trendline.ods");
checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent));
reload("calc8");
checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent));
@@ -644,7 +644,7 @@ void Chart2ExportTest::testTrendline()
void Chart2ExportTest::testTrendlineOOXML()
{
- load("/chart2/qa/extras/data/ods/", "trendline.ods");
+ load(u"/chart2/qa/extras/data/ods/", "trendline.ods");
checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent));
reload("Calc Office Open XML");
checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent));
@@ -653,7 +653,7 @@ void Chart2ExportTest::testTrendlineOOXML()
void Chart2ExportTest::testTrendlineXLS()
{
mbSkipValidation = true;
- load("/chart2/qa/extras/data/ods/", "trendline.ods");
+ load(u"/chart2/qa/extras/data/ods/", "trendline.ods");
checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent));
reload("MS Excel 97");
checkTrendlinesInChart(getChartDocFromSheet( 0, mxComponent));
@@ -668,7 +668,7 @@ void Chart2ExportTest::testStockChart()
* an attribute val of index should start from 1 and not from 0.
* Which was problem area.
*/
- load("/chart2/qa/extras/data/docx/", "testStockChart.docx");
+ load(u"/chart2/qa/extras/data/docx/", "testStockChart.docx");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
@@ -683,7 +683,7 @@ void Chart2ExportTest::testStockChart()
void Chart2ExportTest::testBarChart()
{
- load("/chart2/qa/extras/data/docx/", "testBarChart.docx");
+ load(u"/chart2/qa/extras/data/docx/", "testBarChart.docx");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
@@ -692,7 +692,7 @@ void Chart2ExportTest::testBarChart()
void Chart2ExportTest::testCrosses()
{
- load("/chart2/qa/extras/data/docx/", "Bar_horizontal_cone.docx");
+ load(u"/chart2/qa/extras/data/docx/", "Bar_horizontal_cone.docx");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:crosses", "val", "autoZero");
@@ -700,7 +700,7 @@ void Chart2ExportTest::testCrosses()
void Chart2ExportTest::testScatterChartTextXValues()
{
- load("/chart2/qa/extras/data/docx/", "scatter-chart-text-x-values.docx");
+ load(u"/chart2/qa/extras/data/docx/", "scatter-chart-text-x-values.docx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -748,7 +748,7 @@ void Chart2ExportTest::testScatterChartTextXValues()
void Chart2ExportTest::testScatterXAxisValues()
{
- load("/chart2/qa/extras/data/odt/", "tdf114657.odt");
+ load(u"/chart2/qa/extras/data/odt/", "tdf114657.odt");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
@@ -762,7 +762,7 @@ void Chart2ExportTest::testScatterXAxisValues()
void Chart2ExportTest::testScatterXAxisCategories()
{
- load("/chart2/qa/extras/data/odt/", "tdf131143.odt");
+ load(u"/chart2/qa/extras/data/odt/", "tdf131143.odt");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
@@ -773,7 +773,7 @@ void Chart2ExportTest::testScatterXAxisCategories()
void Chart2ExportTest::testChartDataTable()
{
- load("/chart2/qa/extras/data/docx/", "testChartDataTable.docx");
+ load(u"/chart2/qa/extras/data/docx/", "testChartDataTable.docx");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
@@ -784,7 +784,7 @@ void Chart2ExportTest::testChartDataTable()
void Chart2ExportTest::testChartExternalData()
{
- load("/chart2/qa/extras/data/docx/", "testMultipleChart.docx");
+ load(u"/chart2/qa/extras/data/docx/", "testMultipleChart.docx");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
@@ -799,7 +799,7 @@ void Chart2ExportTest::testEmbeddingsGrabBag()
// after saving file.
// This test case tests whether embeddings files grabbagged properly in correct object.
- load("/chart2/qa/extras/data/docx/", "testMultiplechartembeddings.docx" );
+ load(u"/chart2/qa/extras/data/docx/", "testMultiplechartembeddings.docx" );
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xTextDocumentPropertySet(xTextDocument, uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aGrabBag(0);
@@ -834,7 +834,7 @@ void Chart2ExportTest::testEmbeddingsGrabBag()
void Chart2ExportTest::testAreaChartLoad()
{
- load ("/chart2/qa/extras/data/docx/", "testAreaChartLoad.docx");
+ load (u"/chart2/qa/extras/data/docx/", "testAreaChartLoad.docx");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:areaChart/c:ser/c:dLbls/c:showVal", "val", "1");
@@ -853,7 +853,7 @@ void Chart2ExportTest::testUpDownBars()
void Chart2ExportTest::testDoughnutChart()
{
- load("/chart2/qa/extras/data/docx/", "doughnutChart.docx");
+ load(u"/chart2/qa/extras/data/docx/", "doughnutChart.docx");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
@@ -862,7 +862,7 @@ void Chart2ExportTest::testDoughnutChart()
void Chart2ExportTest::testDisplayUnits()
{
- load("/chart2/qa/extras/data/docx/", "DisplayUnits.docx");
+ load(u"/chart2/qa/extras/data/docx/", "DisplayUnits.docx");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
@@ -880,7 +880,7 @@ void Chart2ExportTest::testDisplayUnits()
void Chart2ExportTest::testFdo74115WallBitmapFill()
{
- load("/chart2/qa/extras/data/docx/", "fdo74115_WallBitmapFill.docx");
+ load(u"/chart2/qa/extras/data/docx/", "fdo74115_WallBitmapFill.docx");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:blipFill");
@@ -888,7 +888,7 @@ void Chart2ExportTest::testFdo74115WallBitmapFill()
void Chart2ExportTest::testPieChartWallLineStyle()
{
- load("/chart2/qa/extras/data/odt/", "testPieChartWallLineStyle.odt");
+ load(u"/chart2/qa/extras/data/odt/", "testPieChartWallLineStyle.odt");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:ln/a:noFill");
@@ -898,7 +898,7 @@ void Chart2ExportTest::testPieChartWallLineStyle()
void Chart2ExportTest::testFdo78290LineChartMarkerX()
{
- load("/chart2/qa/extras/data/docx/", "fdo78290_Line_Chart_Marker_x.docx");
+ load(u"/chart2/qa/extras/data/docx/", "fdo78290_Line_Chart_Marker_x.docx");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:marker[1]/c:symbol[1]","val","x");
@@ -909,7 +909,7 @@ void Chart2ExportTest::testFdo78290LineChartMarkerX()
void Chart2ExportTest::testFdo78290ScatterChartMarkerX()
{
- load("/chart2/qa/extras/data/docx/", "fdo78290_Scatter_Chart_Marker_x.docx");
+ load(u"/chart2/qa/extras/data/docx/", "fdo78290_Scatter_Chart_Marker_x.docx");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:scatterChart[1]/c:ser[1]/c:marker[1]/c:symbol[1]","val","x");
@@ -921,7 +921,7 @@ void Chart2ExportTest::testFdo78290ScatterChartMarkerX()
void Chart2ExportTest::testFdo78290CombinationChartMarkerX()
{
- load("/chart2/qa/extras/data/docx/", "fdo78290_Combination_Chart_Marker_x.docx");
+ load(u"/chart2/qa/extras/data/docx/", "fdo78290_Combination_Chart_Marker_x.docx");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:marker[1]/c:symbol[1]","val","x");
@@ -931,7 +931,7 @@ void Chart2ExportTest::testFdo78290CombinationChartMarkerX()
void Chart2ExportTest::testTdf126115IndividualMarker()
{
// Check individual marker properties.
- load("/chart2/qa/extras/data/xlsx/", "tdf126115.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf126115.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
// 1. series
@@ -981,7 +981,7 @@ void Chart2ExportTest::testAxisNumberFormatODS()
} aTest;
- load("/chart2/qa/extras/data/ods/", "axis-numformats-linked.ods");
+ load(u"/chart2/qa/extras/data/ods/", "axis-numformats-linked.ods");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
aTest.check(xChartDoc);
@@ -1037,7 +1037,7 @@ void Chart2ExportTest::testAxisNumberFormatXLS()
} aTest;
- load( "/chart2/qa/extras/data/xls/", "axis_sourceformatting.xls" );
+ load( u"/chart2/qa/extras/data/xls/", "axis_sourceformatting.xls" );
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet( 0, mxComponent );
aTest.check( xChartDoc, true, util::NumberFormat::PERCENT );
@@ -1136,7 +1136,7 @@ void Chart2ExportTest::testDataLabelBordersDOCX()
} aTest;
- load("/chart2/qa/extras/data/docx/", "data-label-borders.docx");
+ load(u"/chart2/qa/extras/data/docx/", "data-label-borders.docx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
@@ -1164,7 +1164,7 @@ void Chart2ExportTest::testDataLabelBordersDOCX()
void Chart2ExportTest::testDataLabel3DChartDOCX()
{
- load("/chart2/qa/extras/data/docx/", "3d-bar-label.docx");
+ load(u"/chart2/qa/extras/data/docx/", "3d-bar-label.docx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1180,7 +1180,7 @@ void Chart2ExportTest::testDataLabel3DChartDOCX()
void Chart2ExportTest::testDataLabelBarChartDOCX()
{
- load("/chart2/qa/extras/data/docx/", "bar-chart-labels.docx");
+ load(u"/chart2/qa/extras/data/docx/", "bar-chart-labels.docx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1195,7 +1195,7 @@ void Chart2ExportTest::testDataLabelBarChartDOCX()
void Chart2ExportTest::testDataLabelClusteredBarChartDOCX()
{
- load("/chart2/qa/extras/data/docx/", "clustered-bar-chart-labels.docx");
+ load(u"/chart2/qa/extras/data/docx/", "clustered-bar-chart-labels.docx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1209,7 +1209,7 @@ void Chart2ExportTest::testDataLabelClusteredBarChartDOCX()
void Chart2ExportTest::testDataLabelRadarChartDOCX()
{
- load("/chart2/qa/extras/data/docx/", "radar-chart-labels.docx");
+ load(u"/chart2/qa/extras/data/docx/", "radar-chart-labels.docx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1224,7 +1224,7 @@ void Chart2ExportTest::testDataLabelRadarChartDOCX()
void Chart2ExportTest::testDataLabelDoughnutChartDOCX()
{
- load("/chart2/qa/extras/data/docx/", "doughnut-chart-labels.docx");
+ load(u"/chart2/qa/extras/data/docx/", "doughnut-chart-labels.docx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1239,7 +1239,7 @@ void Chart2ExportTest::testDataLabelDoughnutChartDOCX()
void Chart2ExportTest::testDataLabelAreaChartDOCX()
{
- load("/chart2/qa/extras/data/docx/", "area-chart-labels.docx");
+ load(u"/chart2/qa/extras/data/docx/", "area-chart-labels.docx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1258,7 +1258,7 @@ void Chart2ExportTest::testDataLabelDefaultLineChartDOCX()
// label position (2010 does). Make sure its default data label position
// is RIGHT when exporting.
- load("/chart2/qa/extras/data/docx/", "line-chart-label-default-placement.docx");
+ load(u"/chart2/qa/extras/data/docx/", "line-chart-label-default-placement.docx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1277,7 +1277,7 @@ void Chart2ExportTest::testDataLabelDefaultLineChartDOCX()
void Chart2ExportTest::testIndividualDataLabelProps()
{
- load("/chart2/qa/extras/data/xlsx/", "tdf122915.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf122915.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart","Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser[3]/c:dLbls/c:dLbl/c:txPr/a:p/a:pPr/a:defRPr", "b", "1");
@@ -1288,7 +1288,7 @@ void Chart2ExportTest::testIndividualDataLabelProps()
void Chart2ExportTest::testTdf108107()
{
- load("/chart2/qa/extras/data/xlsx/", "tdf108107.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf108107.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:dLbls/c:dLbl[1]/c:idx", "val", "1");
@@ -1298,7 +1298,7 @@ void Chart2ExportTest::testTdf108107()
void Chart2ExportTest::testTdf114139()
{
- load("/chart2/qa/extras/data/xlsx/", "tdf114139.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf114139.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -1310,7 +1310,7 @@ void Chart2ExportTest::testTdf114139()
void Chart2ExportTest::testTdf64224()
{
- load("/chart2/qa/extras/data/ods/", "tdf64224.ods");
+ load(u"/chart2/qa/extras/data/ods/", "tdf64224.ods");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -1321,7 +1321,7 @@ void Chart2ExportTest::testTdf64224()
void Chart2ExportTest::testChartTitlePropertiesColorFillDOCX()
{
- load("/chart2/qa/extras/data/docx/", "testChartTitlePropertiesColorFill.docx");
+ load(u"/chart2/qa/extras/data/docx/", "testChartTitlePropertiesColorFill.docx");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr", "val", "ff0000");
@@ -1330,7 +1330,7 @@ void Chart2ExportTest::testChartTitlePropertiesColorFillDOCX()
void Chart2ExportTest::testChartTitlePropertiesGradientFillDOCX()
{
- load("/chart2/qa/extras/data/docx/", "testChartTitlePropertiesGradientFill.docx");
+ load(u"/chart2/qa/extras/data/docx/", "testChartTitlePropertiesGradientFill.docx");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr", "val", "cccccc");
@@ -1340,7 +1340,7 @@ void Chart2ExportTest::testChartTitlePropertiesGradientFillDOCX()
void Chart2ExportTest::testChartTitlePropertiesBitmapFillDOCX()
{
- load("/chart2/qa/extras/data/docx/", "testChartTitlePropertiesBitmapFill.docx");
+ load(u"/chart2/qa/extras/data/docx/", "testChartTitlePropertiesBitmapFill.docx");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:blipFill/a:blip", "embed", "rId1");
@@ -1350,7 +1350,7 @@ void Chart2ExportTest::testChartTitlePropertiesBitmapFillDOCX()
void Chart2ExportTest::testColorGradientWithTransparencyDOCX()
{
// Test color gradient (two color) with gradient transparency
- load("/chart2/qa/extras/data/docx/", "testColorGradientWithTransparency.docx");
+ load(u"/chart2/qa/extras/data/docx/", "testColorGradientWithTransparency.docx");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
// Test the transparency of the first color
@@ -1362,7 +1362,7 @@ void Chart2ExportTest::testColorGradientWithTransparencyDOCX()
void Chart2ExportTest::testColorGradientWithTransparencyODS()
{
// Test color gradient (two color) with simple transparency
- load("/chart2/qa/extras/data/ods/", "testColorGradientWithTransparency.ods");
+ load(u"/chart2/qa/extras/data/ods/", "testColorGradientWithTransparency.ods");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
// Test the transparency of the first color
@@ -1374,7 +1374,7 @@ void Chart2ExportTest::testColorGradientWithTransparencyODS()
void Chart2ExportTest::testColorGradientStopXLSX()
{
// Test color gradient (two color) stop of the first color
- load("/chart2/qa/extras/data/xlsx/", "tdf128619.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf128619.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
// Test the position of the first color
@@ -1385,7 +1385,7 @@ void Chart2ExportTest::testColorGradientStopXLSX()
void Chart2ExportTest::testRadialColorGradientDOCX()
{
- load("/chart2/qa/extras/data/docx/", "tdf128794.docx");
+ load(u"/chart2/qa/extras/data/docx/", "tdf128794.docx");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
// Test the gradient style (if there is no 'a:path' attribute, it is a linear gradient)
@@ -1396,7 +1396,7 @@ void Chart2ExportTest::testRadialColorGradientDOCX()
void Chart2ExportTest::testBarChartDataPointPropDOCX()
{
- load("/chart2/qa/extras/data/docx/", "testBarChartDataPointPropDOCX.docx");
+ load(u"/chart2/qa/extras/data/docx/", "testBarChartDataPointPropDOCX.docx");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
@@ -1414,7 +1414,7 @@ void Chart2ExportTest::testBarChartDataPointPropDOCX()
void Chart2ExportTest::testBarChartRotation()
{
- load ("/chart2/qa/extras/data/docx/", "barChartRotation.docx");
+ load (u"/chart2/qa/extras/data/docx/", "barChartRotation.docx");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
@@ -1429,7 +1429,7 @@ void Chart2ExportTest::testShapeFollowedByChart()
docPr Id is being repeated, ECMA 20.4.2.5 says that the
docPr Id should be unique, ensuring the same here.
*/
- load("/chart2/qa/extras/data/docx/", "FDO74430.docx");
+ load(u"/chart2/qa/extras/data/docx/", "FDO74430.docx");
xmlDocUniquePtr pXmlDoc = parseExport("word/document", "Office Open XML Text" );
CPPUNIT_ASSERT(pXmlDoc);
@@ -1441,7 +1441,7 @@ void Chart2ExportTest::testShapeFollowedByChart()
void Chart2ExportTest::testPieChartDataLabels()
{
- load("/chart2/qa/extras/data/docx/", "PieChartDataLabels.docx");
+ load(u"/chart2/qa/extras/data/docx/", "PieChartDataLabels.docx");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pie3DChart/c:ser[1]/c:dLbls/c:dLbl[1]/c:dLblPos", "val", "outEnd");
@@ -1449,7 +1449,7 @@ void Chart2ExportTest::testPieChartDataLabels()
void Chart2ExportTest::testSeriesIdxOrder()
{
- load("/chart2/qa/extras/data/docx/", "testSeriesIdxOrder.docx");
+ load(u"/chart2/qa/extras/data/docx/", "testSeriesIdxOrder.docx");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace[1]/c:chart[1]/c:plotArea[1]/c:lineChart[1]/c:ser[1]/c:idx[1]", "val", "1");
@@ -1458,7 +1458,7 @@ void Chart2ExportTest::testSeriesIdxOrder()
void Chart2ExportTest::testScatterPlotLabels()
{
- load("/chart2/qa/extras/data/odt/", "scatter-plot-labels.odt");
+ load(u"/chart2/qa/extras/data/odt/", "scatter-plot-labels.odt");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1490,7 +1490,7 @@ void Chart2ExportTest::testScatterPlotLabels()
void Chart2ExportTest::testErrorBarDataRangeODS()
{
- load("/chart2/qa/extras/data/ods/", "ErrorBarRange.ods");
+ load(u"/chart2/qa/extras/data/ods/", "ErrorBarRange.ods");
reload("calc8");
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent );
@@ -1519,14 +1519,14 @@ void Chart2ExportTest::testErrorBarDataRangeODS()
void Chart2ExportTest::testChartCrash()
{
- load("/chart2/qa/extras/data/docx/", "FDO75975.docx");
+ load(u"/chart2/qa/extras/data/docx/", "FDO75975.docx");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
}
void Chart2ExportTest::testPieChartRotation()
{
- load ("/chart2/qa/extras/data/docx/", "pieChartRotation.docx");
+ load (u"/chart2/qa/extras/data/docx/", "pieChartRotation.docx");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:view3D/c:rotX", "val", "40");
@@ -1539,7 +1539,7 @@ void Chart2ExportTest::testEmbeddingsOleObjectGrabBag()
// after saving file.
// This test case tests whether embeddings files grabbagged properly in correct object.
- load("/chart2/qa/extras/data/docx/", "testchartoleobjectembeddings.docx" );
+ load(u"/chart2/qa/extras/data/docx/", "testchartoleobjectembeddings.docx" );
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xTextDocumentPropertySet(xTextDocument, uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aGrabBag(0);
@@ -1610,7 +1610,7 @@ void checkSheetForGapWidthAndOverlap(uno::Reference< chart2::XChartDocument > co
void Chart2ExportTest::testGapWidthXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "gapWidth.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "gapWidth.xlsx");
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent );
checkSheetForGapWidthAndOverlap(xChartDoc, 120, -60);
@@ -1629,7 +1629,7 @@ void Chart2ExportTest::testGapWidthXLSX()
void Chart2ExportTest::testSmoothedLines()
{
- load("/chart2/qa/extras/data/ods/", "smoothedLines.ods");
+ load(u"/chart2/qa/extras/data/ods/", "smoothedLines.ods");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[1]/c:smooth", "val", "0");
@@ -1637,7 +1637,7 @@ void Chart2ExportTest::testSmoothedLines()
void Chart2ExportTest::testLabelStringODS()
{
- load("/chart2/qa/extras/data/ods/", "labelString.ods");
+ load(u"/chart2/qa/extras/data/ods/", "labelString.ods");
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent );
Reference< chart2::data::XDataSequence > xLabelSeq =
@@ -1659,7 +1659,7 @@ void Chart2ExportTest::testLabelStringODS()
void Chart2ExportTest::testFdo83058dlblPos()
{
- load ("/chart2/qa/extras/data/docx/", "fdo83058_dlblPos.docx");
+ load (u"/chart2/qa/extras/data/docx/", "fdo83058_dlblPos.docx");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:dLbls[1]/c:dLbl[2]/c:dLblPos", "val", "outEnd");
@@ -1670,7 +1670,7 @@ void Chart2ExportTest::testFdo83058dlblPos()
void Chart2ExportTest::testAutoTitleDelXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "autotitledel_2007.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "autotitledel_2007.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart","Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:autoTitleDeleted", "val", "0");
@@ -1678,7 +1678,7 @@ void Chart2ExportTest::testAutoTitleDelXLSX()
void Chart2ExportTest::testDispBlanksAsXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "dispBlanksAs_2007.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "dispBlanksAs_2007.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart","Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:dispBlanksAs", "val", "gap");
@@ -1686,7 +1686,7 @@ void Chart2ExportTest::testDispBlanksAsXLSX()
void Chart2ExportTest::testMarkerColorXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "markerColor.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "markerColor.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:marker/c:spPr/a:solidFill/a:srgbClr", "val", "92d050");
@@ -1694,7 +1694,7 @@ void Chart2ExportTest::testMarkerColorXLSX()
void Chart2ExportTest::testRoundedCornersXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "markerColor.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "markerColor.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:roundedCorners", "val", "0");
@@ -1702,7 +1702,7 @@ void Chart2ExportTest::testRoundedCornersXLSX()
void Chart2ExportTest::testAxisNumberFormatXLSX()
{
- load("/chart2/qa/extras/data/ods/", "axis_number_format.ods");
+ load(u"/chart2/qa/extras/data/ods/", "axis_number_format.ods");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx", 2);
@@ -1715,7 +1715,7 @@ void Chart2ExportTest::testAxisNumberFormatXLSX()
void Chart2ExportTest::testDataPointLabelNumberFormatXLSX()
{
- load("/chart2/qa/extras/data/ods/", "tdf123774.ods");
+ load(u"/chart2/qa/extras/data/ods/", "tdf123774.ods");
{
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -1726,7 +1726,7 @@ void Chart2ExportTest::testDataPointLabelNumberFormatXLSX()
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[1]/c:numFmt", "sourceLinked", "0");
}
- load("/chart2/qa/extras/data/xlsx/", "tdf130986.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf130986.xlsx");
{
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -1738,7 +1738,7 @@ void Chart2ExportTest::testDataPointLabelNumberFormatXLSX()
void Chart2ExportTest::testDataLabelDefaultValuesXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "data_label.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "data_label.xlsx");
Reference< chart2::XChartDocument> xDoc = getChartDocFromSheet(0, mxComponent);
Reference<chart2::XDataSeries> xSeries = getDataSeriesFromDoc(xDoc, 0);
Reference<beans::XPropertySet> xPropSet(xSeries, uno::UNO_QUERY_THROW);
@@ -1755,7 +1755,7 @@ void Chart2ExportTest::testDataLabelDefaultValuesXLSX()
void Chart2ExportTest::testDataLabelFillColor()
{
- load("/chart2/qa/extras/data/xlsx/", "data_labels_fill_color.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "data_labels_fill_color.xlsx");
Reference< chart2::XChartDocument> xDoc = getChartDocFromSheet(0, mxComponent);
Reference<chart2::XDataSeries> xSeries = getDataSeriesFromDoc(xDoc, 0);
Reference<beans::XPropertySet> xPropSet(xSeries, uno::UNO_QUERY_THROW);
@@ -1770,7 +1770,7 @@ void Chart2ExportTest::testDataLabelFillColor()
void Chart2ExportTest::testTitleOverlayXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "chart_title.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "chart_title.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:overlay", "val", "0");
@@ -1778,7 +1778,7 @@ void Chart2ExportTest::testTitleOverlayXLSX()
void Chart2ExportTest::testInvertIfNegativeXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "bar_chart_simple.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "bar_chart_simple.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:invertIfNegative", "val", "0");
@@ -1786,7 +1786,7 @@ void Chart2ExportTest::testInvertIfNegativeXLSX()
void Chart2ExportTest::testBubble3DXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "bubble_chart_simple.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "bubble_chart_simple.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:bubbleChart/c:ser[1]/c:bubble3D", "val", "0");
@@ -1796,7 +1796,7 @@ void Chart2ExportTest::testBubble3DXLSX()
void Chart2ExportTest::testNoMarkerXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "no_marker.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "no_marker.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[1]/c:marker/c:symbol", "val", "none");
@@ -1806,7 +1806,7 @@ void Chart2ExportTest::testNoMarkerXLSX()
void Chart2ExportTest::testTitleManualLayoutXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "title_manual_layout.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "title_manual_layout.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:layoutTarget", 0);
@@ -1827,7 +1827,7 @@ void Chart2ExportTest::testTitleManualLayoutXLSX()
void Chart2ExportTest::testPlotAreaManualLayoutXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "plot_area_manual_layout.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "plot_area_manual_layout.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -1856,7 +1856,7 @@ void Chart2ExportTest::testPlotAreaManualLayoutXLSX()
void Chart2ExportTest::testLegendManualLayoutXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "legend_manual_layout.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "legend_manual_layout.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -1888,7 +1888,7 @@ void Chart2ExportTest::testLegendManualLayoutXLSX()
void Chart2ExportTest::testChartSubTitle()
{
- load("/chart2/qa/extras/data/ods/", "testChartSubTitle.ods");
+ load(u"/chart2/qa/extras/data/ods/", "testChartSubTitle.ods");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
// test properties of subtitle
@@ -1902,7 +1902,7 @@ void Chart2ExportTest::testChartSubTitle()
void Chart2ExportTest::testChartMainWithSubTitle()
{
- load("/chart2/qa/extras/data/ods/", "testChartMainWithSubTitle.ods");
+ load(u"/chart2/qa/extras/data/ods/", "testChartMainWithSubTitle.ods");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
// test properties of title
@@ -1917,7 +1917,7 @@ void Chart2ExportTest::testChartMainWithSubTitle()
void Chart2ExportTest::testAutoTitleDeleted()
{
- load("/chart2/qa/extras/data/xlsx/", "testAutoTitleDeleted.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "testAutoTitleDeleted.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:autoTitleDeleted", "val", "1");
@@ -1925,7 +1925,7 @@ void Chart2ExportTest::testAutoTitleDeleted()
void Chart2ExportTest::testChartTitlePropertiesColorFillXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "testChartTitlePropertiesColorFill.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "testChartTitlePropertiesColorFill.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr", "val", "ff0000");
@@ -1934,7 +1934,7 @@ void Chart2ExportTest::testChartTitlePropertiesColorFillXLSX()
void Chart2ExportTest::testChartTitlePropertiesGradientFillXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "testChartTitlePropertiesGradientFill.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "testChartTitlePropertiesGradientFill.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr", "val", "cccccc");
@@ -1944,7 +1944,7 @@ void Chart2ExportTest::testChartTitlePropertiesGradientFillXLSX()
void Chart2ExportTest::testChartTitlePropertiesBitmapFillXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "testChartTitlePropertiesBitmapFill.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "testChartTitlePropertiesBitmapFill.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:blipFill/a:blip", "embed", "rId1");
@@ -1953,7 +1953,7 @@ void Chart2ExportTest::testChartTitlePropertiesBitmapFillXLSX()
void Chart2ExportTest::testBarChartDataPointPropXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "testBarChartDataPointPropXLSX.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "testBarChartDataPointPropXLSX.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -1971,7 +1971,7 @@ void Chart2ExportTest::testBarChartDataPointPropXLSX()
void Chart2ExportTest::testDataseriesOverlapStackedChartXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "testDataseriesOverlapStackedChart.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "testDataseriesOverlapStackedChart.xlsx");
// test the overlap value of a simple Stacked Column Chart
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent );
@@ -1992,7 +1992,7 @@ void Chart2ExportTest::testDataseriesOverlapStackedChartXLSX()
void Chart2ExportTest::testAxisCharacterPropertiesXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "axis_character_properties.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "axis_character_properties.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -2009,7 +2009,7 @@ void Chart2ExportTest::testAxisCharacterPropertiesXLSX()
void Chart2ExportTest::testTitleCharacterPropertiesXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "title_character_properties.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "title_character_properties.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -2022,7 +2022,7 @@ void Chart2ExportTest::testTitleCharacterPropertiesXLSX()
void Chart2ExportTest::testPlotVisOnlyXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "hidden_cells.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "hidden_cells.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -2031,7 +2031,7 @@ void Chart2ExportTest::testPlotVisOnlyXLSX()
void Chart2ExportTest::testBarChartVaryColorsXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "tdf90876.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf90876.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -2040,7 +2040,7 @@ void Chart2ExportTest::testBarChartVaryColorsXLSX()
void Chart2ExportTest::testMultipleAxisXLSX()
{
- load("/chart2/qa/extras/data/ods/", "multiple_axis.ods");
+ load(u"/chart2/qa/extras/data/ods/", "multiple_axis.ods");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -2055,7 +2055,7 @@ void Chart2ExportTest::testMultipleAxisXLSX()
void Chart2ExportTest::testSecondaryAxisXLSX()
{
- load("/chart2/qa/extras/data/ods/", "secondary_axis.ods");
+ load(u"/chart2/qa/extras/data/ods/", "secondary_axis.ods");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -2071,7 +2071,7 @@ void Chart2ExportTest::testSecondaryAxisXLSX()
void Chart2ExportTest::testSetSeriesToSecondaryAxisXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "add_series_secondary_axis.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "add_series_secondary_axis.xlsx");
Reference< chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
// Second series
Reference<chart2::XDataSeries> xSeries = getDataSeriesFromDoc(xChartDoc, 1);
@@ -2091,7 +2091,7 @@ void Chart2ExportTest::testSetSeriesToSecondaryAxisXLSX()
void Chart2ExportTest::testCombinedChartSecondaryAxisXLSX()
{
// Original file was created with MS Office
- load("/chart2/qa/extras/data/xlsx/", "combined_chart_secondary_axis.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "combined_chart_secondary_axis.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
// Collect barchart axID on secondary Axis
@@ -2110,7 +2110,7 @@ void Chart2ExportTest::testCombinedChartSecondaryAxisXLSX()
void Chart2ExportTest::testCombinedChartSecondaryAxisODS()
{
// Original file was created with LibreOffice
- load("/chart2/qa/extras/data/ods/", "combined_chart_secondary_axis.ods");
+ load(u"/chart2/qa/extras/data/ods/", "combined_chart_secondary_axis.ods");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
// Collect barchart axID on secondary Axis
@@ -2132,13 +2132,13 @@ void Chart2ExportTest::testCrossBetweenXLSX()
{
// Original files were created with MS Office
{
- load("/chart2/qa/extras/data/xlsx/", "tdf127777.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf127777.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween", "val", "between");
}
{
- load("/chart2/qa/extras/data/xlsx/", "tdf132076.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf132076.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween", "val", "between");
@@ -2148,7 +2148,7 @@ void Chart2ExportTest::testCrossBetweenXLSX()
void Chart2ExportTest::testCrossBetweenWithDeletedAxis()
{
// Original file was created with MS Office (the category axis is deleted in the file)
- load("/chart2/qa/extras/data/xlsx/", "tdf128633.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf128633.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween", "val", "between");
@@ -2157,7 +2157,7 @@ void Chart2ExportTest::testCrossBetweenWithDeletedAxis()
void Chart2ExportTest::testCrossBetweenODS()
{
// Original file was created with LibreOffice
- load("/chart2/qa/extras/data/ods/", "test_CrossBetween.ods");
+ load(u"/chart2/qa/extras/data/ods/", "test_CrossBetween.ods");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween", "val", "between");
@@ -2165,7 +2165,7 @@ void Chart2ExportTest::testCrossBetweenODS()
void Chart2ExportTest::testAxisTitleRotationXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "axis_title_rotation.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "axis_title_rotation.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -2174,7 +2174,7 @@ void Chart2ExportTest::testAxisTitleRotationXLSX()
void Chart2ExportTest::testAxisTitlePositionDOCX()
{
- load("/chart2/qa/extras/data/docx/", "testAxisTitlePosition.docx");
+ load(u"/chart2/qa/extras/data/docx/", "testAxisTitlePosition.docx");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
@@ -2198,14 +2198,14 @@ void Chart2ExportTest::testAxisTitlePositionDOCX()
void Chart2ExportTest::testAxisCrossBetweenDOCX()
{
- load("/chart2/qa/extras/data/odt/", "axis-position.odt");
+ load(u"/chart2/qa/extras/data/odt/", "axis-position.odt");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
assertXPath(pXmlDoc, "(//c:crossBetween)[1]", "val", "midCat");
}
void Chart2ExportTest::testPieChartDataPointExplosionXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "pie_chart_datapoint_explosion.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "pie_chart_datapoint_explosion.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -2214,7 +2214,7 @@ void Chart2ExportTest::testPieChartDataPointExplosionXLSX()
void Chart2ExportTest::testCustomDataLabel()
{
- load("/chart2/qa/extras/data/pptx/", "tdf115107.pptx");
+ load(u"/chart2/qa/extras/data/pptx/", "tdf115107.pptx");
xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1", "Impress MS PowerPoint 2007 XML");
CPPUNIT_ASSERT(pXmlDoc);
// Check the data labels font color for the complete data series
@@ -2312,7 +2312,7 @@ void Chart2ExportTest::testCustomDataLabel()
void Chart2ExportTest::testCustomPositionofDataLabel()
{
- load("/chart2/qa/extras/data/xlsx/", "testCustomPosDataLabels.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "testCustomPosDataLabels.xlsx");
{
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -2328,7 +2328,7 @@ void Chart2ExportTest::testCustomPositionofDataLabel()
CPPUNIT_ASSERT_DOUBLES_EQUAL(-0.0742140311063737, nY, 1e-7);
}
- load("/chart2/qa/extras/data/docx/", "testTdf108110.docx");
+ load(u"/chart2/qa/extras/data/docx/", "testTdf108110.docx");
{
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
@@ -2344,7 +2344,7 @@ void Chart2ExportTest::testCustomPositionofDataLabel()
CPPUNIT_ASSERT_DOUBLES_EQUAL(0.172648731408574, nY, 1e-7);
}
- load("/chart2/qa/extras/data/ods/", "tdf136024.ods");
+ load(u"/chart2/qa/extras/data/ods/", "tdf136024.ods");
{
reload("calc8");
// tdf#136024: test custom position of pie chart data label after an ods export
@@ -2364,7 +2364,7 @@ void Chart2ExportTest::testCustomPositionofDataLabel()
void Chart2ExportTest::testCustomDataLabelMultipleSeries()
{
- load("/chart2/qa/extras/data/pptx/", "tdf115107-2.pptx");
+ load(u"/chart2/qa/extras/data/pptx/", "tdf115107-2.pptx");
xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart2", "Impress MS PowerPoint 2007 XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -2421,14 +2421,14 @@ void Chart2ExportTest::testCustomDataLabelMultipleSeries()
void Chart2ExportTest::testLeaderLines()
{
- load("/chart2/qa/extras/data/xlsx/", "testTdf90749.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "testTdf90749.xlsx");
{
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[1]/c:dLbls/c:extLst/c:ext/c15:showLeaderLines", "val", "1");
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser[2]/c:dLbls/c:extLst/c:ext/c15:showLeaderLines", "val", "0");
}
- load("/chart2/qa/extras/data/docx/", "MSO_Custom_Leader_Line.docx");
+ load(u"/chart2/qa/extras/data/docx/", "MSO_Custom_Leader_Line.docx");
{
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1", "Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
@@ -2439,7 +2439,7 @@ void Chart2ExportTest::testLeaderLines()
void Chart2ExportTest::testNumberFormatExportPPTX()
{
- load("/chart2/qa/extras/data/pptx/", "tdf115859.pptx");
+ load(u"/chart2/qa/extras/data/pptx/", "tdf115859.pptx");
xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 2007 XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -2449,7 +2449,7 @@ void Chart2ExportTest::testNumberFormatExportPPTX()
void Chart2ExportTest::testLabelSeparatorExportDOCX()
{
- load("/chart2/qa/extras/data/docx/", "testLabelSeparator.docx");
+ load(u"/chart2/qa/extras/data/docx/", "testLabelSeparator.docx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -2467,7 +2467,7 @@ void Chart2ExportTest::testLabelSeparatorExportDOCX()
void Chart2ExportTest::testChartTitlePropertiesColorFillPPTX()
{
- load("/chart2/qa/extras/data/pptx/", "testChartTitlePropertiesColorFill.pptx");
+ load(u"/chart2/qa/extras/data/pptx/", "testChartTitlePropertiesColorFill.pptx");
xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 2007 XML");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:solidFill/a:srgbClr", "val", "ff0000");
@@ -2476,7 +2476,7 @@ void Chart2ExportTest::testChartTitlePropertiesColorFillPPTX()
void Chart2ExportTest::testChartTitlePropertiesGradientFillPPTX()
{
- load("/chart2/qa/extras/data/pptx/", "testChartTitlePropertiesGradientFill.pptx");
+ load(u"/chart2/qa/extras/data/pptx/", "testChartTitlePropertiesGradientFill.pptx");
xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 2007 XML");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr", "val", "f6f8fc");
@@ -2486,7 +2486,7 @@ void Chart2ExportTest::testChartTitlePropertiesGradientFillPPTX()
void Chart2ExportTest::testChartTitlePropertiesBitmapFillPPTX()
{
- load("/chart2/qa/extras/data/pptx/", "testChartTitlePropertiesBitmapFill.pptx");
+ load(u"/chart2/qa/extras/data/pptx/", "testChartTitlePropertiesBitmapFill.pptx");
xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 2007 XML");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:blipFill/a:blip", "embed", "rId1");
@@ -2495,7 +2495,7 @@ void Chart2ExportTest::testChartTitlePropertiesBitmapFillPPTX()
void Chart2ExportTest::testxAxisLabelsRotation()
{
- load ("/chart2/qa/extras/data/xlsx/", "xAxisLabelsRotation.xlsx");
+ load (u"/chart2/qa/extras/data/xlsx/", "xAxisLabelsRotation.xlsx");
xmlDocUniquePtr pXmlDoc1 = parseExport("xl/charts/chart","Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc1);
@@ -2505,7 +2505,7 @@ void Chart2ExportTest::testxAxisLabelsRotation()
void Chart2ExportTest::testMultipleCategoryAxisLablesXLSX()
{
- load("/chart2/qa/extras/data/ods/", "multilevelcat.ods");
+ load(u"/chart2/qa/extras/data/ods/", "multilevelcat.ods");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
// check category axis labels number of first level
@@ -2522,7 +2522,7 @@ void Chart2ExportTest::testMultipleCategoryAxisLablesXLSX()
void Chart2ExportTest::testMultipleCategoryAxisLablesDOCX()
{
- load("/chart2/qa/extras/data/odt/", "multilevelcat.odt");
+ load(u"/chart2/qa/extras/data/odt/", "multilevelcat.odt");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
// check category axis labels number of first level
@@ -2539,7 +2539,7 @@ void Chart2ExportTest::testMultipleCategoryAxisLablesDOCX()
void Chart2ExportTest::testTdf116163()
{
- load("/chart2/qa/extras/data/pptx/", "tdf116163.pptx");
+ load(u"/chart2/qa/extras/data/pptx/", "tdf116163.pptx");
xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 2007 XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -2548,7 +2548,7 @@ void Chart2ExportTest::testTdf116163()
void Chart2ExportTest::testTdf111824()
{
- load("/chart2/qa/extras/data/xlsx/", "tdf111824.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf111824.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -2560,7 +2560,7 @@ void Chart2ExportTest::testTdf111824()
void Chart2ExportTest::test3DAreaChartZAxis()
{
- load("/chart2/qa/extras/data/xlsx/", "test3DAreaChartZAxis.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "test3DAreaChartZAxis.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -2572,7 +2572,7 @@ void Chart2ExportTest::test3DAreaChartZAxis()
void Chart2ExportTest::testTdf119029()
{
- load("/chart2/qa/extras/data/odp/", "tdf119029.odp");
+ load(u"/chart2/qa/extras/data/odp/", "tdf119029.odp");
// Only use "chart", without number, because the number depends on the previous tests
xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 2007 XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -2584,7 +2584,7 @@ void Chart2ExportTest::testTdf119029()
void Chart2ExportTest::testTdf108022()
{
- load("/chart2/qa/extras/data/odt/", "tdf108022.odt");
+ load(u"/chart2/qa/extras/data/odt/", "tdf108022.odt");
reload("Office Open XML Text");
// assert we really have two charts
@@ -2596,7 +2596,7 @@ void Chart2ExportTest::testTdf108022()
void Chart2ExportTest::testTdf121744()
{
- load("/chart2/qa/extras/data/docx/", "tdf121744.docx");
+ load(u"/chart2/qa/extras/data/docx/", "tdf121744.docx");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
@@ -2609,7 +2609,7 @@ void Chart2ExportTest::testTdf121744()
void Chart2ExportTest::testTdf121189()
{
- load("/chart2/qa/extras/data/odp/", "tdf121189.odp");
+ load(u"/chart2/qa/extras/data/odp/", "tdf121189.odp");
reload("Impress Office Open XML");
uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY_THROW);
@@ -2623,7 +2623,7 @@ void Chart2ExportTest::testTdf122031()
{
//Checks pie chart data label format.
- load("/chart2/qa/extras/data/xlsx/", "tdf122031.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf122031.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -2635,7 +2635,7 @@ void Chart2ExportTest::testTdf122031()
void Chart2ExportTest::testTdf115012()
{
- load("/chart2/qa/extras/data/xlsx/", "tdf115012.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf115012.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart","Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
// workaround: use-zero instead of leave-gap to show the original line chart
@@ -2644,7 +2644,7 @@ void Chart2ExportTest::testTdf115012()
void Chart2ExportTest::testTdf134118()
{
- load("/chart2/qa/extras/data/xlsx/", "tdf134118.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf134118.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
// workaround: use leave-gap instead of zero to show the original line chart
@@ -2653,7 +2653,7 @@ void Chart2ExportTest::testTdf134118()
void Chart2ExportTest::testTdf123206_customLabelText()
{
- load("/chart2/qa/extras/data/docx/", "tdf123206.docx");
+ load(u"/chart2/qa/extras/data/docx/", "tdf123206.docx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -2666,7 +2666,7 @@ void Chart2ExportTest::testTdf123206_customLabelText()
void Chart2ExportTest::testCustomLabelText()
{
- load("/chart2/qa/extras/data/docx/", "testCustomlabeltext.docx");
+ load(u"/chart2/qa/extras/data/docx/", "testCustomlabeltext.docx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -2685,7 +2685,7 @@ void Chart2ExportTest::testCustomLabelText()
void Chart2ExportTest::testDeletedLegendEntries()
{
- load("/chart2/qa/extras/data/xlsx/", "deleted_legend_entry.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "deleted_legend_entry.xlsx");
{
reload("Calc Office Open XML");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
@@ -2698,7 +2698,7 @@ void Chart2ExportTest::testDeletedLegendEntries()
CPPUNIT_ASSERT(!bShowLegendEntry);
}
- load("/chart2/qa/extras/data/xlsx/", "deleted_legend_entry2.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "deleted_legend_entry2.xlsx");
{
reload("Calc Office Open XML");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
@@ -2723,7 +2723,7 @@ void Chart2ExportTest::testDeletedLegendEntries()
void Chart2ExportTest::testTdf60316()
{
- load("/chart2/qa/extras/data/pptx/", "tdf60316.pptx");
+ load(u"/chart2/qa/extras/data/pptx/", "tdf60316.pptx");
xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 2007 XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -2734,7 +2734,7 @@ void Chart2ExportTest::testTdf60316()
void Chart2ExportTest::testTdf130225()
{
- load("/chart2/qa/extras/data/docx/", "piechart_deleted_legend_entry.docx");
+ load(u"/chart2/qa/extras/data/docx/", "piechart_deleted_legend_entry.docx");
reload("Office Open XML Text");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -2748,7 +2748,7 @@ void Chart2ExportTest::testTdf130225()
void Chart2ExportTest::testTdf59857()
{
- load("/chart2/qa/extras/data/ods/", "tdf59857.ods");
+ load(u"/chart2/qa/extras/data/ods/", "tdf59857.ods");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart","Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -2760,7 +2760,7 @@ void Chart2ExportTest::testTdf59857()
void Chart2ExportTest::testTdf126076()
{
- load("/chart2/qa/extras/data/xlsx/", "auto_marker_excel10.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "auto_marker_excel10.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart","Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -2772,7 +2772,7 @@ void Chart2ExportTest::testTdf126076()
void Chart2ExportTest::testTdf75330()
{
- load("/chart2/qa/extras/data/ods/", "legend_overlay.ods");
+ load(u"/chart2/qa/extras/data/ods/", "legend_overlay.ods");
reload("calc8");
{
uno::Reference<chart2::XChartDocument> xChart2Doc = getChartDocFromSheet(0, mxComponent);
@@ -2797,7 +2797,7 @@ void Chart2ExportTest::testTdf75330()
void Chart2ExportTest::testTdf127792()
{
- load("/chart2/qa/extras/data/docx/", "MSO_axis_position.docx");
+ load(u"/chart2/qa/extras/data/docx/", "MSO_axis_position.docx");
{
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1", "Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
@@ -2812,7 +2812,7 @@ void Chart2ExportTest::testTdf127792()
void Chart2ExportTest::testTdf131979()
{
- load("/chart2/qa/extras/data/ods/", "tdf131115.ods");
+ load(u"/chart2/qa/extras/data/ods/", "tdf131115.ods");
{
reload("calc8");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
@@ -2826,7 +2826,7 @@ void Chart2ExportTest::testTdf131979()
CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to false.", !blinknumberformattosource);
}
- load("/chart2/qa/extras/data/ods/", "tdf131979.ods");
+ load(u"/chart2/qa/extras/data/ods/", "tdf131979.ods");
{
reload("calc8");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
@@ -2844,14 +2844,14 @@ void Chart2ExportTest::testTdf131979()
void Chart2ExportTest::testTdf132076()
{
{
- load("/chart2/qa/extras/data/ods/", "tdf132076.ods");
+ load(u"/chart2/qa/extras/data/ods/", "tdf132076.ods");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:numFmt", "formatCode", "dd");
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:catAx/c:numFmt", "sourceLinked", "0");
}
{
- load("/chart2/qa/extras/data/xlsx/", "tdf132076.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf132076.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:dateAx/c:numFmt", "formatCode", "dd");
@@ -2861,7 +2861,7 @@ void Chart2ExportTest::testTdf132076()
void Chart2ExportTest::testTdf125812()
{
- load("/chart2/qa/extras/data/odp/", "ellipticalGradientFill.odp");
+ load(u"/chart2/qa/extras/data/odp/", "ellipticalGradientFill.odp");
xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 2007 XML");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path", "path", "circle");
@@ -2873,7 +2873,7 @@ void Chart2ExportTest::testTdf125812()
void Chart2ExportTest::testTdf133190()
{
- load("/chart2/qa/extras/data/xlsx/", "tdf133190_tdf133191.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf133190_tdf133191.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -2884,7 +2884,7 @@ void Chart2ExportTest::testTdf133190()
void Chart2ExportTest::testTdf133191()
{
- load("/chart2/qa/extras/data/xlsx/", "tdf133190_tdf133191.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf133190_tdf133191.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -2894,7 +2894,7 @@ void Chart2ExportTest::testTdf133191()
void Chart2ExportTest::testTdf132594()
{
- load("/chart2/qa/extras/data/xlsx/", "chart_pie2007.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "chart_pie2007.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart","Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -2903,7 +2903,7 @@ void Chart2ExportTest::testTdf132594()
void Chart2ExportTest::testTdf134255()
{
- load("/chart2/qa/extras/data/docx/", "tdf134255.docx");
+ load(u"/chart2/qa/extras/data/docx/", "tdf134255.docx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -2923,7 +2923,7 @@ void Chart2ExportTest::testTdf134255()
void Chart2ExportTest::testTdf134977()
{
- load("/chart2/qa/extras/data/xlsx/", "custom_data_label.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "custom_data_label.xlsx");
//import test
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
@@ -2945,7 +2945,7 @@ void Chart2ExportTest::testTdf134977()
void Chart2ExportTest::testTdf123647()
{
- load("/chart2/qa/extras/data/xlsx/", "empty_chart.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "empty_chart.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart","Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -2954,7 +2954,7 @@ void Chart2ExportTest::testTdf123647()
void Chart2ExportTest::testTdf136267()
{
- load("/chart2/qa/extras/data/xlsx/", "tdf136267.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf136267.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -2963,7 +2963,7 @@ void Chart2ExportTest::testTdf136267()
void Chart2ExportTest::testDataLabelPlacementPieChart()
{
- load("/chart2/qa/extras/data/xlsx/", "tdf134978.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf134978.xlsx");
reload("calc8");
uno::Reference<chart::XChartDocument> xChartDoc(getChartCompFromSheet(0, mxComponent),
UNO_QUERY_THROW);
@@ -2980,7 +2980,7 @@ void Chart2ExportTest::testDataLabelPlacementPieChart()
void Chart2ExportTest::testTdf137917()
{
- load("/chart2/qa/extras/data/xlsx/", "tdf137917.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf137917.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -2993,7 +2993,7 @@ void Chart2ExportTest::testTdf137917()
void Chart2ExportTest::testTdf138204()
{
- load("/chart2/qa/extras/data/xlsx/", "tdf138204.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf138204.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -3018,7 +3018,7 @@ void Chart2ExportTest::testTdf138204()
void Chart2ExportTest::testTdf138181()
{
- load("/chart2/qa/extras/data/xlsx/", "piechart_deleted_legendentry.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "piechart_deleted_legendentry.xlsx");
Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent),
UNO_QUERY_THROW);
Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW);
@@ -3044,7 +3044,7 @@ void Chart2ExportTest::testTdf138181()
void Chart2ExportTest::testCustomShapeText()
{
- load("/chart2/qa/extras/data/ods/", "tdf72776.ods");
+ load(u"/chart2/qa/extras/data/ods/", "tdf72776.ods");
reload("calc8");
Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent),
UNO_QUERY_THROW);
@@ -3060,7 +3060,7 @@ void Chart2ExportTest::testCustomShapeText()
void Chart2ExportTest::testuserShapesXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "tdf128621.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf128621.xlsx");
reload("Calc Office Open XML");
Reference< chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
diff --git a/chart2/qa/extras/chart2geometry.cxx b/chart2/qa/extras/chart2geometry.cxx
index c15f15f66864..4f57654a3587 100644
--- a/chart2/qa/extras/chart2geometry.cxx
+++ b/chart2/qa/extras/chart2geometry.cxx
@@ -181,7 +181,7 @@ static OString OU2O(std::u16string_view sOUSource)
void Chart2GeometryTest::testTdf135184RoundLineCap()
{
// It tests chart area, data series line and regression-curve line.
- load("/chart2/qa/extras/data/xlsx/", "tdf135184RoundLineCap.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf135184RoundLineCap.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml", "calc8");
CPPUNIT_ASSERT(pXmlDoc);
@@ -208,7 +208,7 @@ void Chart2GeometryTest::testTdf135184RoundLineCap()
void Chart2GeometryTest::testTdf135184RoundLineCap2()
{
// It tests legend, data series sector and title.
- load("/chart2/qa/extras/data/xlsx/", "tdf135184RoundLineCap2.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf135184RoundLineCap2.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml", "calc8");
CPPUNIT_ASSERT(pXmlDoc);
@@ -237,7 +237,7 @@ void Chart2GeometryTest::testTdf135184RoundLineCap2()
void Chart2GeometryTest::testTdf135184RoundLineCap3()
{
// It tests chart area, data series line and regression-curve line.
- load("/chart2/qa/extras/data/xlsx/", "tdf135184RoundLineCap.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf135184RoundLineCap.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -254,7 +254,7 @@ void Chart2GeometryTest::testTdf135184RoundLineCap3()
void Chart2GeometryTest::testTdf135184RoundLineCap4()
{
// It tests legend, data series sector and title.
- load("/chart2/qa/extras/data/xlsx/", "tdf135184RoundLineCap2.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf135184RoundLineCap2.xlsx");
xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
CPPUNIT_ASSERT(pXmlDoc);
@@ -270,7 +270,7 @@ void Chart2GeometryTest::testTdf128345ChartArea_CG_TS_export()
{
// chart area with color gradient and solid transparency
// Without the patch the transparency was lost in saved pptx file.
- load("/chart2/qa/extras/data/odp/", "tdf128345_ChartArea_CG_TS.odp");
+ load(u"/chart2/qa/extras/data/odp/", "tdf128345_ChartArea_CG_TS.odp");
// Make sure the chart area has a transparency in gradient stops in saved pptx file.
xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 2007 XML");
@@ -289,7 +289,7 @@ void Chart2GeometryTest::testTdf128345ChartArea_CG_TS_import()
// Make sure chart area has transparency when pptx document is opened and resaved as odp.
// As of Aug 2020, the import generates a transparency gradient. When import is changed to
// generate solid transparency, the test needs to be adapted.
- load("/chart2/qa/extras/data/pptx/", "tdf128345_ChartArea_CG_TS.pptx");
+ load(u"/chart2/qa/extras/data/pptx/", "tdf128345_ChartArea_CG_TS.pptx");
// Find transparency gradient name
xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml", "impress8");
@@ -322,7 +322,7 @@ void Chart2GeometryTest::testTdf128345ChartWall_CS_TG_export()
{
// chart wall with solid color and transparency gradient
// Without the patch the transparency was lost.
- load("/chart2/qa/extras/data/odp/", "tdf128345_ChartWall_CS_TG.odp");
+ load(u"/chart2/qa/extras/data/odp/", "tdf128345_ChartWall_CS_TG.odp");
// Make sure the chart has a gradient with transparency in gradient stops in saved pptx file.
xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 2007 XML");
@@ -340,7 +340,7 @@ void Chart2GeometryTest::testTdf128345ChartWall_CS_TG_import()
{
// This works on the file, which was exported from file tdf128345_ChartWall_CS_TG.odp to pptx.
// Make sure chart wall has transparency when pptx document is resaved as odp.
- load("/chart2/qa/extras/data/pptx/", "tdf128345_ChartWall_CS_TG.pptx");
+ load(u"/chart2/qa/extras/data/pptx/", "tdf128345_ChartWall_CS_TG.pptx");
// Find transparency gradient name
xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml", "impress8");
@@ -371,7 +371,7 @@ void Chart2GeometryTest::testTdf128345Legend_CS_TG_axial_export()
{
// legend with solid color and transparency gradient
// Without the patch the transparency was lost.
- load("/chart2/qa/extras/data/odp/", "tdf128345_Legend_CS_TG_axial.odp");
+ load(u"/chart2/qa/extras/data/odp/", "tdf128345_Legend_CS_TG_axial.odp");
// Make sure the chart has a gradient with transparency in gradient stops in saved pptx file.
xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 2007 XML");
@@ -391,7 +391,7 @@ void Chart2GeometryTest::testTdf128345Legend_CS_TG_axial_import()
{
// This works on the file, which was exported from file tdf128345_Legend_CS_TG_axial.odp to pptx.
// Error was, that in case of axial not the middle value was taken but start and end value.
- load("/chart2/qa/extras/data/pptx/", "tdf128345_Legend_CS_TG_axial.pptx");
+ load(u"/chart2/qa/extras/data/pptx/", "tdf128345_Legend_CS_TG_axial.pptx");
// Find transparency gradient name
xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml", "impress8");
@@ -422,7 +422,7 @@ void Chart2GeometryTest::testTdf135366LabelOnSeries()
{
// Error was, that the fill and line properties of a <chart:data-label> were not
// imported at all. Here they should be at the series.
- load("/chart2/qa/extras/data/ods/", "tdf135366_data_label_series.ods");
+ load(u"/chart2/qa/extras/data/ods/", "tdf135366_data_label_series.ods");
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
Reference<chart2::XDataSeries> xDataSeries = getDataSeriesFromDoc(xChartDoc, 0);
@@ -460,7 +460,7 @@ void Chart2GeometryTest::testTdf135366LabelOnPoint()
{
// Error was, that the fill and line properties of a <chart:data-label> were not
// imported at all. Here they should be at point 2.
- load("/chart2/qa/extras/data/odt/", "tdf135366_data_label_point.odt");
+ load(u"/chart2/qa/extras/data/odt/", "tdf135366_data_label_point.odt");
uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
Reference<chart2::XDataSeries> xDataSeries = getDataSeriesFromDoc(xChartDoc, 0);
@@ -507,7 +507,7 @@ void Chart2GeometryTest::testTdf135366LabelExport()
// Error was, that line and fill properties were not exported as
// graphic-properties of a <chart:data-label> element, but only
// as loext chart-properties of the <chart:data-point> element.
- load("/chart2/qa/extras/data/odt/", "tdf135366_data_label_export.odt");
+ load(u"/chart2/qa/extras/data/odt/", "tdf135366_data_label_export.odt");
xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml", "writer8");
CPPUNIT_ASSERT(pXmlDoc);
@@ -535,7 +535,7 @@ void Chart2GeometryTest::testTdf135366_CustomLabelText()
SvtSaveOptions aSaveOpt;
const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion(aSaveOpt.GetODFDefaultVersion());
aSaveOpt.SetODFDefaultVersion(SvtSaveOptions::ODFVER_012);
- load("/chart2/qa/extras/data/pptx/", "tdf135366_CustomLabelText.pptx");
+ load(u"/chart2/qa/extras/data/pptx/", "tdf135366_CustomLabelText.pptx");
xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml", "impress8");
CPPUNIT_ASSERT(pXmlDoc);
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index 943cbd57ea99..272639ad069c 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -304,7 +304,7 @@ private:
// split method up into smaller chunks for more detailed tests
void Chart2ImportTest::Fdo60083()
{
- load("/chart2/qa/extras/data/ods/", "fdo60083.ods");
+ load(u"/chart2/qa/extras/data/ods/", "fdo60083.ods");
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent );
CPPUNIT_ASSERT(xChartDoc.is());
@@ -353,7 +353,7 @@ void Chart2ImportTest::Fdo60083()
void Chart2ImportTest::testErrorBarRange()
{
- load("/chart2/qa/extras/data/ods/", "error_bar_range.ods");
+ load(u"/chart2/qa/extras/data/ods/", "error_bar_range.ods");
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent );
CPPUNIT_ASSERT(xChartDoc.is());
@@ -382,7 +382,7 @@ void Chart2ImportTest::testErrorBarRange()
void Chart2ImportTest::testErrorBarFormatting()
{
- load("/chart2/qa/extras/data/ods/", "error_bar_properties.ods");
+ load(u"/chart2/qa/extras/data/ods/", "error_bar_properties.ods");
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent );
CPPUNIT_ASSERT(xChartDoc.is());
@@ -423,7 +423,7 @@ void Chart2ImportTest::testSteppedLines()
chart2::CurveStyle_STEP_CENTER_Y
};
- load("/chart2/qa/extras/data/ods/", "stepped_lines.ods");
+ load(u"/chart2/qa/extras/data/ods/", "stepped_lines.ods");
for(sal_Int32 nSheet = 0; nSheet < MAXSHEET; ++nSheet)
{
uno::Reference< chart2::XChartDocument > xChart2Doc = getChartDocFromSheet( nSheet, mxComponent );
@@ -451,7 +451,7 @@ static uno::Sequence < OUString > getChartColumnDescriptions( uno::Reference< ch
void Chart2ImportTest::testODSChartSeries()
{
- load("/chart2/qa/extras/data/ods/", "chart.ods");
+ load(u"/chart2/qa/extras/data/ods/", "chart.ods");
uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW);
uno::Sequence < OUString > seriesList = getChartColumnDescriptions( xChart1Doc);
CPPUNIT_ASSERT_EQUAL(OUString("Col 1"), seriesList[0]);
@@ -462,7 +462,7 @@ void Chart2ImportTest::testODSChartSeries()
void Chart2ImportTest::testXLSXChartSeries()
{
- load("/chart2/qa/extras/data/xlsx/", "chart.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "chart.xlsx");
uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW);
uno::Sequence < OUString > seriesList = getChartColumnDescriptions(xChart1Doc );
CPPUNIT_ASSERT_EQUAL(OUString("Col 1"), seriesList[0]);
@@ -473,7 +473,7 @@ void Chart2ImportTest::testXLSXChartSeries()
void Chart2ImportTest::testXLSChartSeries()
{
- load("/chart2/qa/extras/data/xls/", "chart.xls");
+ load(u"/chart2/qa/extras/data/xls/", "chart.xls");
uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW);
uno::Sequence < OUString > seriesList = getChartColumnDescriptions(xChart1Doc );
CPPUNIT_ASSERT_EQUAL(OUString("Col 1"), seriesList[0]);
@@ -484,7 +484,7 @@ void Chart2ImportTest::testXLSChartSeries()
void Chart2ImportTest::testODTChartSeries()
{
- load("/chart2/qa/extras/data/odt/", "chart.odt");
+ load(u"/chart2/qa/extras/data/odt/", "chart.odt");
uno::Sequence< OUString > seriesList = getWriterChartColumnDescriptions(mxComponent);
CPPUNIT_ASSERT_EQUAL(OUString("Column 1"), seriesList[0]);
CPPUNIT_ASSERT_EQUAL(OUString("Column 2"), seriesList[1]);
@@ -494,7 +494,7 @@ void Chart2ImportTest::testODTChartSeries()
void Chart2ImportTest::testDOCChartSeries()
{
- load("/chart2/qa/extras/data/doc/", "chart.doc");
+ load(u"/chart2/qa/extras/data/doc/", "chart.doc");
uno::Sequence< OUString > seriesList = getWriterChartColumnDescriptions(mxComponent);
CPPUNIT_ASSERT_EQUAL(OUString("Column 1"), seriesList[0]);
CPPUNIT_ASSERT_EQUAL(OUString("Column 2"), seriesList[1]);
@@ -503,7 +503,7 @@ void Chart2ImportTest::testDOCChartSeries()
void Chart2ImportTest::testDOCXChartSeries()
{
- load("/chart2/qa/extras/data/docx/", "chart.docx");
+ load(u"/chart2/qa/extras/data/docx/", "chart.docx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -519,7 +519,7 @@ void Chart2ImportTest::testDOCXChartSeries()
void Chart2ImportTest::testDOCXChartEmptySeries()
{
- load("/chart2/qa/extras/data/docx/", "tdf125337.docx");
+ load(u"/chart2/qa/extras/data/docx/", "tdf125337.docx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -545,7 +545,7 @@ void Chart2ImportTest::testDOCXChartEmptySeries()
void Chart2ImportTest::testDOCXChartValuesSize()
{
- load( "/chart2/qa/extras/data/docx/", "bubblechart.docx" );
+ load( u"/chart2/qa/extras/data/docx/", "bubblechart.docx" );
Reference<chart2::XChartDocument> xChartDoc( getChartDocFromWriter(0), uno::UNO_QUERY );
CPPUNIT_ASSERT( xChartDoc.is() );
@@ -567,7 +567,7 @@ void Chart2ImportTest::testDOCXChartValuesSize()
void Chart2ImportTest::testPPTChartSeries()
{
//test chart series names for ppt
- uno::Sequence < OUString > seriesList = getImpressChartColumnDescriptions("/chart2/qa/extras/data/ppt/", "chart.ppt");
+ uno::Sequence < OUString > seriesList = getImpressChartColumnDescriptions(u"/chart2/qa/extras/data/ppt/", "chart.ppt");
CPPUNIT_ASSERT_EQUAL(OUString("Column 1"), seriesList[0]);
CPPUNIT_ASSERT_EQUAL(OUString("Column 2"), seriesList[1]);
@@ -578,7 +578,7 @@ void Chart2ImportTest::testPPTChartSeries()
void Chart2ImportTest::testPPTXChartSeries()
{
//test chart series names for pptx
- load("/chart2/qa/extras/data/pptx/", "chart.pptx");
+ load(u"/chart2/qa/extras/data/pptx/", "chart.pptx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -595,7 +595,7 @@ void Chart2ImportTest::testPPTXChartSeries()
void Chart2ImportTest::testPPTXSparseChartSeries()
{
//test chart series sparse data for pptx
- load("/chart2/qa/extras/data/pptx/", "sparse-chart.pptx");
+ load(u"/chart2/qa/extras/data/pptx/", "sparse-chart.pptx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -616,7 +616,7 @@ void Chart2ImportTest::testPPTXSparseChartSeries()
void Chart2ImportTest::testPPTXHiddenDataSeries()
{
- load("/chart2/qa/extras/data/pptx/", "stacked-bar-chart-hidden-series.pptx");
+ load(u"/chart2/qa/extras/data/pptx/", "stacked-bar-chart-hidden-series.pptx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -655,7 +655,7 @@ void Chart2ImportTest::testPPTXHiddenDataSeries()
void Chart2ImportTest::testPPTXPercentageNumberFormats()
{
- load("/chart2/qa/extras/data/pptx/", "percentage-number-formats.pptx");
+ load(u"/chart2/qa/extras/data/pptx/", "percentage-number-formats.pptx");
// 1st chart
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
@@ -720,7 +720,7 @@ void Chart2ImportTest::testPPTXPercentageNumberFormats()
void Chart2ImportTest::testPieChartLabelsNumFormat()
{
- load("/chart2/qa/extras/data/xlsx/", "tdfPieNumFormat.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdfPieNumFormat.xlsx");
uno::Reference< chart::XChartDocument > xChartDoc(getChartCompFromSheet(0, mxComponent), UNO_QUERY_THROW);
CPPUNIT_ASSERT(xChartDoc.is());
// test data point labels format
@@ -732,7 +732,7 @@ void Chart2ImportTest::testPieChartLabelsNumFormat()
void Chart2ImportTest::testPPTXStackedNonStackedYAxis()
{
- load("/chart2/qa/extras/data/pptx/", "stacked-non-stacked-mix-y-axis.pptx");
+ load(u"/chart2/qa/extras/data/pptx/", "stacked-non-stacked-mix-y-axis.pptx");
// 1st chart is a normal stacked column.
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
@@ -792,7 +792,7 @@ void Chart2ImportTest::testPPTXStackedNonStackedYAxis()
void Chart2ImportTest::testODPChartSeries()
{
//test chart series names for odp
- uno::Sequence < OUString > seriesList = getImpressChartColumnDescriptions("/chart2/qa/extras/data/odp/", "chart.odp");
+ uno::Sequence < OUString > seriesList = getImpressChartColumnDescriptions(u"/chart2/qa/extras/data/odp/", "chart.odp");
CPPUNIT_ASSERT_EQUAL(OUString("Column 1"), seriesList[0]);
CPPUNIT_ASSERT_EQUAL(OUString("Column 2"), seriesList[1]);
CPPUNIT_ASSERT_EQUAL(OUString("Column 3"), seriesList[2]);
@@ -801,7 +801,7 @@ void Chart2ImportTest::testODPChartSeries()
void Chart2ImportTest::testBnc864396()
{
- uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromImpress("/chart2/qa/extras/data/pptx/", "bnc864396.pptx"), uno::UNO_QUERY_THROW);
+ uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromImpress(u"/chart2/qa/extras/data/pptx/", "bnc864396.pptx"), uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT(xChartDoc->hasInternalDataProvider());
uno::Reference< chart2::XInternalDataProvider > xDataProvider( xChartDoc->getDataProvider(), uno::UNO_QUERY_THROW );
@@ -816,7 +816,7 @@ void Chart2ImportTest::testBnc864396()
void Chart2ImportTest::testBnc889755()
{
- load("/chart2/qa/extras/data/pptx/", "bnc889755.pptx");
+ load(u"/chart2/qa/extras/data/pptx/", "bnc889755.pptx");
uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 6), uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT(xChartDoc->hasInternalDataProvider());
@@ -844,7 +844,7 @@ void Chart2ImportTest::testBnc889755()
void Chart2ImportTest::testBnc882383()
{
- load("/chart2/qa/extras/data/pptx/", "bnc882383.pptx");
+ load(u"/chart2/qa/extras/data/pptx/", "bnc882383.pptx");
uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY_THROW);
uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
CPPUNIT_ASSERT(xDataSeries.is());
@@ -857,7 +857,7 @@ void Chart2ImportTest::testBnc882383()
void Chart2ImportTest::testTransparancyGradientValue()
{
- load("/chart2/qa/extras/data/xlsx/", "tdf128732.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf128732.xlsx");
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
@@ -880,7 +880,7 @@ void Chart2ImportTest::testTransparancyGradientValue()
void Chart2ImportTest::testSimpleStrictXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "strict_chart.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "strict_chart.xlsx");
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent );
CPPUNIT_ASSERT(xChartDoc.is());
@@ -891,7 +891,7 @@ void Chart2ImportTest::testSimpleStrictXLSX()
void Chart2ImportTest::testDelayedCellImport()
{
- load("/chart2/qa/extras/data/xlsx/", "fdo70609.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "fdo70609.xlsx");
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent );
Reference< chart2::data::XDataSequence > xDataSeq =
getDataSequenceFromDocByRole(xChartDoc, u"values-x");
@@ -902,7 +902,7 @@ void Chart2ImportTest::testDelayedCellImport()
void Chart2ImportTest::testFlatODSStackedColumnChart()
{
- load("/chart2/qa/extras/data/fods/", "stacked-column-chart.fods");
+ load(u"/chart2/qa/extras/data/fods/", "stacked-column-chart.fods");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -919,7 +919,7 @@ void Chart2ImportTest::testFlatODSStackedColumnChart()
void Chart2ImportTest::testFdo78080()
{
- load("/chart2/qa/extras/data/xlsx/", "fdo78080.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "fdo78080.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -930,7 +930,7 @@ void Chart2ImportTest::testFdo78080()
void Chart2ImportTest::testTdf127811()
{
- load("/chart2/qa/extras/data/pptx/", "tdf127811.pptx");
+ load(u"/chart2/qa/extras/data/pptx/", "tdf127811.pptx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -949,7 +949,7 @@ void Chart2ImportTest::testTdf127811()
void Chart2ImportTest::testTdf86624()
{
- load("/chart2/qa/extras/data/ods/", "tdf86624.ods");
+ load(u"/chart2/qa/extras/data/ods/", "tdf86624.ods");
uno::Reference< chart2::XChartDocument > xChart2Doc = getChartDocFromSheet(0, mxComponent);
uno::Reference< chart::XChartDocument > xChartDoc (xChart2Doc, uno::UNO_QUERY);
uno::Reference<drawing::XShape> xLegend = xChartDoc->getLegend();
@@ -960,7 +960,7 @@ void Chart2ImportTest::testTdf86624()
void Chart2ImportTest::testTdf105517()
{
- load("/chart2/qa/extras/data/pptx/", "tdf105517.pptx");
+ load(u"/chart2/qa/extras/data/pptx/", "tdf105517.pptx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -988,7 +988,7 @@ void Chart2ImportTest::testTdf105517()
void Chart2ImportTest::testTdf106217()
{
- load("/chart2/qa/extras/data/pptx/", "tdf106217.pptx");
+ load(u"/chart2/qa/extras/data/pptx/", "tdf106217.pptx");
uno::Reference< chart::XChartDocument > xChartDoc = getChartDocFromDrawImpress(0, 0);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1011,7 +1011,7 @@ void Chart2ImportTest::testTdf106217()
void Chart2ImportTest::testTdf108021()
{
// Tdf108021 : To check TextBreak value is true.
- load("/chart2/qa/extras/data/ods/", "tdf108021.ods");
+ load(u"/chart2/qa/extras/data/ods/", "tdf108021.ods");
uno::Reference< chart::XDiagram > mxDiagram;
uno::Reference< beans::XPropertySet > xAxisProp;
bool bTextBreak = false;
@@ -1029,7 +1029,7 @@ void Chart2ImportTest::testTdf108021()
void Chart2ImportTest::testTdf100084()
{
// The test file was created with IBM Cognos, make sure there is a diagram.
- load("/chart2/qa/extras/data/xlsx/", "tdf100084.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf100084.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
Reference<beans::XPropertySet> xDiagram(xChartDoc->getFirstDiagram(), UNO_QUERY);
@@ -1038,7 +1038,7 @@ void Chart2ImportTest::testTdf100084()
void Chart2ImportTest::testTdf124817()
{
- load("/chart2/qa/extras/data/xlsx/", "tdf124817.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf124817.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -1066,7 +1066,7 @@ void Chart2ImportTest::testTdf124817()
void Chart2ImportTest::testTdf126033()
{
- load("/chart2/qa/extras/data/xlsx/", "tdf126033.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf126033.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -1083,7 +1083,7 @@ void Chart2ImportTest::testTdf126033()
void Chart2ImportTest::testTransparentBackground(OUString const & filename)
{
- load("/chart2/qa/extras/data/xlsx/", filename);
+ load(u"/chart2/qa/extras/data/xlsx/", filename);
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -1110,7 +1110,7 @@ void Chart2ImportTest::testFdo54361_1()
void Chart2ImportTest::testAutoBackgroundXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "chart-auto-background.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "chart-auto-background.xlsx");
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -1127,7 +1127,7 @@ void Chart2ImportTest::testAutoBackgroundXLSX()
void Chart2ImportTest::testAutoChartAreaBorderPropXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "chart-area-style-border.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "chart-area-style-border.xlsx");
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -1147,7 +1147,7 @@ void Chart2ImportTest::testAutoChartAreaBorderPropXLSX()
void Chart2ImportTest::testChartAreaStyleBackgroundXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "chart-area-style-background.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "chart-area-style-background.xlsx");
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -1164,7 +1164,7 @@ void Chart2ImportTest::testChartAreaStyleBackgroundXLSX()
void Chart2ImportTest::testChartHatchFillXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "chart-hatch-fill.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "chart-hatch-fill.xlsx");
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -1206,7 +1206,7 @@ void Chart2ImportTest::testChartHatchFillXLSX()
void Chart2ImportTest::testAxisTextRotationXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "axis-label-rotation.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "axis-label-rotation.xlsx");
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -1244,7 +1244,7 @@ void Chart2ImportTest::testTextCanOverlapXLSX()
void Chart2ImportTest::testTextBreakXLSX()
{
// tdf#122091: To check textbreak value is true in case of 0° degree of Axis label rotation.
- load("/chart2/qa/extras/data/xlsx/", "chart_label_text_break.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "chart_label_text_break.xlsx");
uno::Reference< chart::XDiagram > mxDiagram;
uno::Reference< beans::XPropertySet > xAxisProp;
bool textBreak = false;
@@ -1262,7 +1262,7 @@ void Chart2ImportTest::testTextBreakXLSX()
void Chart2ImportTest::testNumberFormatsXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "number-formats.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "number-formats.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -1311,7 +1311,7 @@ void Chart2ImportTest::testNumberFormatsXLSX()
void Chart2ImportTest::testNumberFormatsDOCX()
{
- load("/chart2/qa/extras/data/docx/", "tdf132174.docx");
+ load(u"/chart2/qa/extras/data/docx/", "tdf132174.docx");
{
uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1332,7 +1332,7 @@ void Chart2ImportTest::testNumberFormatsDOCX()
CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to false.", !bLinkNumberFormatToSource);
}
- load("/chart2/qa/extras/data/docx/", "tdf136650.docx");
+ load(u"/chart2/qa/extras/data/docx/", "tdf136650.docx");
{
uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1356,7 +1356,7 @@ void Chart2ImportTest::testNumberFormatsDOCX()
void Chart2ImportTest::testPercentageNumberFormatsDOCX()
{
- load("/chart2/qa/extras/data/docx/", "tdf133632.docx");
+ load(u"/chart2/qa/extras/data/docx/", "tdf133632.docx");
uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1376,7 +1376,7 @@ void Chart2ImportTest::testPercentageNumberFormatsDOCX()
void Chart2ImportTest::testAutoTitleDelDefaultValue2007XLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "autotitledel_2007.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "autotitledel_2007.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -1388,7 +1388,7 @@ void Chart2ImportTest::testAutoTitleDelDefaultValue2007XLSX()
void Chart2ImportTest::testAutoTitleDelDefaultValue2013XLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "autotitledel_2013.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "autotitledel_2013.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -1400,7 +1400,7 @@ void Chart2ImportTest::testAutoTitleDelDefaultValue2013XLSX()
void Chart2ImportTest::testDispBlanksAsDefaultValue2007XLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "dispBlanksAs_2007.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "dispBlanksAs_2007.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -1414,7 +1414,7 @@ void Chart2ImportTest::testDispBlanksAsDefaultValue2007XLSX()
void Chart2ImportTest::testDispBlanksAsDefaultValue2013XLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "dispBlanksAs_2013.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "dispBlanksAs_2013.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -1428,7 +1428,7 @@ void Chart2ImportTest::testDispBlanksAsDefaultValue2013XLSX()
void Chart2ImportTest::testSmoothDefaultValue2007XLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "smoothed_series2007.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "smoothed_series2007.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1446,7 +1446,7 @@ void Chart2ImportTest::testSmoothDefaultValue2007XLSX()
void Chart2ImportTest::testSmoothDefaultValue2013XLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "smoothed_series.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "smoothed_series.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1464,7 +1464,7 @@ void Chart2ImportTest::testSmoothDefaultValue2013XLSX()
void Chart2ImportTest::testTrendlineDefaultValue2007XLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "trendline2007.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "trendline2007.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1490,7 +1490,7 @@ void Chart2ImportTest::testTrendlineDefaultValue2007XLSX()
void Chart2ImportTest::testTrendlineDefaultValue2013XLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "trendline.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "trendline.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1516,7 +1516,7 @@ void Chart2ImportTest::testTrendlineDefaultValue2013XLSX()
void Chart2ImportTest::testVaryColorDefaultValues2007XLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "vary_color2007.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "vary_color2007.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1531,7 +1531,7 @@ void Chart2ImportTest::testVaryColorDefaultValues2007XLSX()
void Chart2ImportTest::testVaryColorDefaultValues2013XLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "vary_color.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "vary_color.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1546,7 +1546,7 @@ void Chart2ImportTest::testVaryColorDefaultValues2013XLSX()
void Chart2ImportTest::testPlotVisOnlyDefaultValue2013XLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "plotVisOnly.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "plotVisOnly.xlsx");
uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW);
Reference<beans::XPropertySet> xPropSet(xChart1Doc->getDiagram(), uno::UNO_QUERY_THROW);
uno::Any aAny = xPropSet->getPropertyValue("IncludeHiddenCells");
@@ -1558,7 +1558,7 @@ void Chart2ImportTest::testPlotVisOnlyDefaultValue2013XLSX()
void Chart2ImportTest::testRAngAxDefaultValue2013XLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "rAngAx.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "rAngAx.xlsx");
uno::Reference< chart::XChartDocument > xChart1Doc ( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW);
Reference<beans::XPropertySet> xPropSet(xChart1Doc->getDiagram(), uno::UNO_QUERY_THROW);
uno::Any aAny = xPropSet->getPropertyValue("RightAngledAxes");
@@ -1570,7 +1570,7 @@ void Chart2ImportTest::testRAngAxDefaultValue2013XLSX()
void Chart2ImportTest::testMajorTickMarksDefaultValue2013XLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "majorTickMark.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "majorTickMark.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
Reference<chart2::XAxis> xXAxis = getAxisFromDoc(xChartDoc, 0, 0, 0);
@@ -1585,7 +1585,7 @@ void Chart2ImportTest::testMajorTickMarksDefaultValue2013XLSX()
void Chart2ImportTest::testMinorTickMarksDefaultValue2013XLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "minorTickMark.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "minorTickMark.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
Reference<chart2::XAxis> xXAxis = getAxisFromDoc(xChartDoc, 0, 0, 0);
@@ -1600,7 +1600,7 @@ void Chart2ImportTest::testMinorTickMarksDefaultValue2013XLSX()
void Chart2ImportTest::testAxisTitleDefaultRotationXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "axis_title_default_rotation.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "axis_title_default_rotation.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
Reference<chart2::XAxis> xYAxis = getAxisFromDoc(xChartDoc, 0, 1, 0);
@@ -1617,7 +1617,7 @@ void Chart2ImportTest::testAxisTitleDefaultRotationXLSX()
void Chart2ImportTest::testSecondaryAxisTitleDefaultRotationXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "secondary_axis_title_default_rotation.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "secondary_axis_title_default_rotation.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
Reference<chart2::XAxis> xYAxis = getAxisFromDoc(xChartDoc, 0, 1, 1);
@@ -1634,7 +1634,7 @@ void Chart2ImportTest::testSecondaryAxisTitleDefaultRotationXLSX()
void Chart2ImportTest::testAxisTitleRotationXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "axis_title_rotated.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "axis_title_rotated.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
{
@@ -1666,7 +1666,7 @@ void Chart2ImportTest::testAxisTitleRotationXLSX()
void Chart2ImportTest::testAxisTitlePositionDOCX()
{
- load("/chart2/qa/extras/data/docx/", "testAxisTitlePosition.docx");
+ load(u"/chart2/qa/extras/data/docx/", "testAxisTitlePosition.docx");
uno::Reference< chart::XDiagram > mxDiagram;
uno::Reference< drawing::XShape > xAxisTitle;
uno::Reference< chart::XChartDocument > xChartDoc = getChartDocFromWriter(0);
@@ -1698,7 +1698,7 @@ void Chart2ImportTest::testAxisTitlePositionDOCX()
void Chart2ImportTest::testCombinedChartAttachedAxisXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "testCombinedChartAxis.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "testCombinedChartAxis.xlsx");
Reference< chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
// First series
Reference<chart2::XDataSeries> xSeries = getDataSeriesFromDoc(xChartDoc, 0);
@@ -1723,7 +1723,7 @@ void Chart2ImportTest::testCombinedChartAttachedAxisXLSX()
}
void Chart2ImportTest::testInternalDataProvider() {
- uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromImpress("/chart2/qa/extras/data/odp/", "chart.odp"), uno::UNO_QUERY_THROW);
+ uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromImpress(u"/chart2/qa/extras/data/odp/", "chart.odp"), uno::UNO_QUERY_THROW);
const uno::Reference< chart2::data::XDataProvider >& rxDataProvider = xChartDoc->getDataProvider();
// Parse 42 array
@@ -1769,7 +1769,7 @@ void Chart2ImportTest::testInternalDataProvider() {
void Chart2ImportTest::testTdf90510()
{
- load("/chart2/qa/extras/data/xls/", "piechart_outside.xls");
+ load(u"/chart2/qa/extras/data/xls/", "piechart_outside.xls");
uno::Reference< chart::XChartDocument > xChart1Doc( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW );
Reference<beans::XPropertySet> xPropSet( xChart1Doc->getDiagram()->getDataPointProperties( 0, 0 ), uno::UNO_SET_THROW );
uno::Any aAny = xPropSet->getPropertyValue( "LabelPlacement" );
@@ -1781,7 +1781,7 @@ void Chart2ImportTest::testTdf90510()
void Chart2ImportTest::testTdf109858()
{
- load("/chart2/qa/extras/data/xlsx/", "piechart_outside.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "piechart_outside.xlsx");
uno::Reference< chart::XChartDocument > xChart1Doc( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW );
// test data point labels position
@@ -1801,7 +1801,7 @@ void Chart2ImportTest::testTdf109858()
void Chart2ImportTest::testTdf130105()
{
- load("/chart2/qa/extras/data/xlsx/", "barchart_outend.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "barchart_outend.xlsx");
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
@@ -1817,13 +1817,13 @@ void Chart2ImportTest::testTdf130105()
void Chart2ImportTest::testTdf111173()
{
- load("/chart2/qa/extras/data/xlsx/", "tdf111173.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf111173.xlsx");
uno::Reference< chart::XChartDocument > xChart1Doc( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW );
}
void Chart2ImportTest::testTdf122226()
{
- load( "/chart2/qa/extras/data/docx/", "testTdf122226.docx" );
+ load( u"/chart2/qa/extras/data/docx/", "testTdf122226.docx" );
uno::Reference< chart2::XChartDocument > xChartDoc ( getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT( xChartDoc.is() );
@@ -1841,7 +1841,7 @@ void Chart2ImportTest::testTdf122226()
void Chart2ImportTest::testTdf115107()
{
- load("/chart2/qa/extras/data/pptx/", "tdf115107.pptx");
+ load(u"/chart2/qa/extras/data/pptx/", "tdf115107.pptx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1932,7 +1932,7 @@ void Chart2ImportTest::testTdf115107()
void Chart2ImportTest::testTdf115107_2()
{
- load("/chart2/qa/extras/data/pptx/", "tdf115107-2.pptx");
+ load(u"/chart2/qa/extras/data/pptx/", "tdf115107-2.pptx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -1987,7 +1987,7 @@ void Chart2ImportTest::testTdf115107_2()
void Chart2ImportTest::testTdf116163()
{
- load("/chart2/qa/extras/data/pptx/", "tdf116163.pptx");
+ load(u"/chart2/qa/extras/data/pptx/", "tdf116163.pptx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -2052,7 +2052,7 @@ void Chart2ImportTest::testTdf116163()
void Chart2ImportTest::testTdf48041()
{
- load("/chart2/qa/extras/data/pptx/", "tdf48041.pptx");
+ load(u"/chart2/qa/extras/data/pptx/", "tdf48041.pptx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -2102,7 +2102,7 @@ void Chart2ImportTest::testTdf48041()
void Chart2ImportTest::testTdf121205()
{
- load("/chart2/qa/extras/data/pptx/", "tdf121205.pptx");
+ load(u"/chart2/qa/extras/data/pptx/", "tdf121205.pptx");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
uno::Reference<chart2::XTitled> xTitled(xChartDoc, uno::UNO_QUERY_THROW);
@@ -2115,7 +2115,7 @@ void Chart2ImportTest::testTdf121205()
void Chart2ImportTest::testTdf114179()
{
- load( "/chart2/qa/extras/data/docx/", "testTdf114179.docx" );
+ load( u"/chart2/qa/extras/data/docx/", "testTdf114179.docx" );
uno::Reference< chart2::XChartDocument > xChartDoc ( getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT( xChartDoc.is() );
css::uno::Reference<chart2::XDiagram> xDiagram;
@@ -2129,7 +2129,7 @@ void Chart2ImportTest::testTdf114179()
void Chart2ImportTest::testTdf124243()
{
- load("/chart2/qa/extras/data/docx/", "tdf124243.docx");
+ load(u"/chart2/qa/extras/data/docx/", "tdf124243.docx");
uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -2146,7 +2146,7 @@ void Chart2ImportTest::testTdf124243()
void Chart2ImportTest::testTdf127393()
{
- load("/chart2/qa/extras/data/pptx/", "tdf127393.pptx");
+ load(u"/chart2/qa/extras/data/pptx/", "tdf127393.pptx");
// 1st chart
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
@@ -2173,7 +2173,7 @@ void Chart2ImportTest::testTdf127393()
void Chart2ImportTest::testTdf128733()
{
- load("/chart2/qa/extras/data/odt/", "tdf128733.odt");
+ load(u"/chart2/qa/extras/data/odt/", "tdf128733.odt");
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -2188,7 +2188,7 @@ void Chart2ImportTest::testTdf128733()
void Chart2ImportTest::testTdf128432()
{
- load("/chart2/qa/extras/data/ods/", "tdf128432.ods");
+ load(u"/chart2/qa/extras/data/ods/", "tdf128432.ods");
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -2203,7 +2203,7 @@ void Chart2ImportTest::testTdf128432()
void Chart2ImportTest::testTdf128627()
{
- load("/chart2/qa/extras/data/xlsx/", "tdf128627.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf128627.xlsx");
// Test ShiftedCategoryPosition for Radar Chart
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -2218,7 +2218,7 @@ void Chart2ImportTest::testTdf128627()
void Chart2ImportTest::testTdf128634()
{
- load("/chart2/qa/extras/data/xlsx/", "tdf128634.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf128634.xlsx");
// Test ShiftedCategoryPosition for 3D Charts
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -2233,7 +2233,7 @@ void Chart2ImportTest::testTdf128634()
void Chart2ImportTest::testTdf130657()
{
- load("/chart2/qa/extras/data/xlsx/", "tdf130657.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf130657.xlsx");
// Test ShiftedCategoryPosition for charts which is not contain a "crossbetween" OOXML tag.
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -2261,7 +2261,7 @@ void checkDataLabelProperties(const Reference<chart2::XDataSeries>& xDataSeries,
void Chart2ImportTest::testDeletedDataLabel()
{
- load("/chart2/qa/extras/data/xlsx/", "deleted_data_labels.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "deleted_data_labels.xlsx");
uno::Reference< chart2::XChartDocument > xChartDoc( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW );
Reference<chart2::XDataSeries> xDataSeries0 = getDataSeriesFromDoc(xChartDoc, 0);
CPPUNIT_ASSERT(xDataSeries0.is());
@@ -2277,7 +2277,7 @@ void Chart2ImportTest::testDeletedDataLabel()
void Chart2ImportTest::testDataPointInheritedColorDOCX()
{
- load( "/chart2/qa/extras/data/docx/", "data_point_inherited_color.docx" );
+ load( u"/chart2/qa/extras/data/docx/", "data_point_inherited_color.docx" );
uno::Reference< chart2::XChartDocument > xChartDoc ( getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT( xChartDoc.is() );
css::uno::Reference<chart2::XDiagram> xDiagram(xChartDoc->getFirstDiagram(), UNO_SET_THROW);
@@ -2291,7 +2291,7 @@ void Chart2ImportTest::testDataPointInheritedColorDOCX()
void Chart2ImportTest::testExternalStrRefsXLSX()
{
- load("/chart2/qa/extras/data/xlsx/", "external_str_ref.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "external_str_ref.xlsx");
uno::Reference< chart2::XChartDocument > xChartDoc( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW );
CPPUNIT_ASSERT(xChartDoc.is());
@@ -2304,7 +2304,7 @@ void Chart2ImportTest::testExternalStrRefsXLSX()
void Chart2ImportTest::testSourceNumberFormatComplexCategoriesXLS()
{
- load("/chart2/qa/extras/data/xls/", "source_number_format_axis.xls");
+ load(u"/chart2/qa/extras/data/xls/", "source_number_format_axis.xls");
uno::Reference< chart2::XChartDocument > xChartDoc( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW );
CPPUNIT_ASSERT(xChartDoc.is());
@@ -2316,7 +2316,7 @@ void Chart2ImportTest::testSourceNumberFormatComplexCategoriesXLS()
void Chart2ImportTest::testSimpleCategoryAxis()
{
- load("/chart2/qa/extras/data/docx/", "testSimpleCategoryAxis.docx");
+ load(u"/chart2/qa/extras/data/docx/", "testSimpleCategoryAxis.docx");
uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -2343,7 +2343,7 @@ void Chart2ImportTest::testSimpleCategoryAxis()
void Chart2ImportTest::testMultilevelCategoryAxis()
{
- load("/chart2/qa/extras/data/docx/", "testMultilevelCategoryAxis.docx");
+ load(u"/chart2/qa/extras/data/docx/", "testMultilevelCategoryAxis.docx");
uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -2371,7 +2371,7 @@ void Chart2ImportTest::testMultilevelCategoryAxis()
void Chart2ImportTest::testXaxisValues()
{
- load("/chart2/qa/extras/data/docx/", "tdf124083.docx");
+ load(u"/chart2/qa/extras/data/docx/", "tdf124083.docx");
uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -2387,7 +2387,7 @@ void Chart2ImportTest::testXaxisValues()
void Chart2ImportTest::testTdf123504()
{
- load("/chart2/qa/extras/data/ods/", "pie_chart_100_and_0.ods");
+ load(u"/chart2/qa/extras/data/ods/", "pie_chart_100_and_0.ods");
Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent),
UNO_QUERY_THROW);
@@ -2419,7 +2419,7 @@ void Chart2ImportTest::testTdf123504()
void Chart2ImportTest::testTdf122765()
{
// The horizontal position of the slices was wrong.
- load("/chart2/qa/extras/data/pptx/", "tdf122765.pptx");
+ load(u"/chart2/qa/extras/data/pptx/", "tdf122765.pptx");
Reference<chart::XChartDocument> xChartDoc = getChartDocFromDrawImpress(0, 0);
Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW);
Reference<drawing::XDrawPage> xDrawPage(xDrawPageSupplier->getDrawPage(), UNO_SET_THROW);
@@ -2442,7 +2442,7 @@ void Chart2ImportTest::testTdf123206CustomLabelField()
// File contains the deprecated "custom-label-field" attribute of the
// "data-point" element. It should be interpreted and stored as a data point
// property.
- uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromImpress("/chart2/qa/extras/data/odp/", "tdf123206.odp"), uno::UNO_QUERY_THROW);
+ uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromImpress(u"/chart2/qa/extras/data/odp/", "tdf123206.odp"), uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
CPPUNIT_ASSERT(xChartDoc.is());
Reference<chart2::XDataSeries> xDataSeries = getDataSeriesFromDoc(xChartDoc, 0);
@@ -2457,7 +2457,7 @@ void Chart2ImportTest::testTdf123206CustomLabelField()
void Chart2ImportTest::testTdf125444PercentageCustomLabel()
{
- load("/chart2/qa/extras/data/pptx/", "tdf125444.pptx");
+ load(u"/chart2/qa/extras/data/pptx/", "tdf125444.pptx");
// 1st chart
Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
@@ -2477,7 +2477,7 @@ void Chart2ImportTest::testTdf125444PercentageCustomLabel()
void Chart2ImportTest::testDataPointLabelCustomPos()
{
// test CustomLabelPosition on Bar chart
- load("/chart2/qa/extras/data/xlsx/", "testDataPointLabelCustomPos.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "testDataPointLabelCustomPos.xlsx");
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
@@ -2499,7 +2499,7 @@ void Chart2ImportTest::testDataPointLabelCustomPos()
void Chart2ImportTest::testTdf130032()
{
// test CustomLabelPosition on Line chart
- load("/chart2/qa/extras/data/xlsx/", "testTdf130032.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "testTdf130032.xlsx");
uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
@@ -2521,7 +2521,7 @@ void Chart2ImportTest::testTdf130032()
void Chart2ImportTest::testTdf134978()
{
// test CustomLabelPosition on Pie chart
- load("/chart2/qa/extras/data/xlsx/", "tdf134978.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf134978.xlsx");
uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc.is());
uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
@@ -2539,7 +2539,7 @@ void Chart2ImportTest::testTdf134978()
void Chart2ImportTest::testTdf119138MissingAutoTitleDeleted()
{
- load("/chart2/qa/extras/data/xlsx/", "tdf119138-missing-autotitledeleted.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf119138-missing-autotitledeleted.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
@@ -2550,7 +2550,7 @@ void Chart2ImportTest::testTdf119138MissingAutoTitleDeleted()
void Chart2ImportTest::testStockChartShiftedCategoryPosition()
{
- load("/chart2/qa/extras/data/odt/", "stock_chart_LO_6_2.odt");
+ load(u"/chart2/qa/extras/data/odt/", "stock_chart_LO_6_2.odt");
uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
@@ -2570,7 +2570,7 @@ void Chart2ImportTest::testTdf133376()
if (!IsDefaultDPI())
return;
- load("/chart2/qa/extras/data/xlsx/", "tdf133376.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf133376.xlsx");
Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent),
UNO_QUERY_THROW);
@@ -2589,7 +2589,7 @@ void Chart2ImportTest::testTdf133376()
void Chart2ImportTest::testTdf134225()
{
- load("/chart2/qa/extras/data/xlsx/", "tdf134225.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf134225.xlsx");
Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent),
UNO_QUERY_THROW);
@@ -2622,7 +2622,7 @@ void Chart2ImportTest::testTdf136105()
if (!IsDefaultDPI())
return;
- load("/chart2/qa/extras/data/xlsx/", "tdf136105.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf136105.xlsx");
// 1st chart with fix inner position and size
{
Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent),
@@ -2661,7 +2661,7 @@ void Chart2ImportTest::testTdf136105()
void Chart2ImportTest::testTdf91250()
{
- load("/chart2/qa/extras/data/docx/", "tdf91250.docx");
+ load(u"/chart2/qa/extras/data/docx/", "tdf91250.docx");
uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xChartDoc.is());
Reference<chart2::XInternalDataProvider> xInternalProvider(xChartDoc->getDataProvider(), uno::UNO_QUERY);
@@ -2682,7 +2682,7 @@ void Chart2ImportTest::testTdf91250()
void Chart2ImportTest::testTdf134111()
{
// tdf134111 : To check TextBreak value is true
- load("/chart2/qa/extras/data/docx/", "tdf134111.docx");
+ load(u"/chart2/qa/extras/data/docx/", "tdf134111.docx");
uno::Reference< chart::XChartDocument > xChartDoc = getChartDocFromWriter(0);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
uno::Reference< chart::XDiagram > mxDiagram(xChartDoc->getDiagram());
@@ -2698,7 +2698,7 @@ void Chart2ImportTest::testTdf134111()
void Chart2ImportTest::testTdf136752()
{
- load("/chart2/qa/extras/data/xlsx/", "tdf136752.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf136752.xlsx");
Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent),
UNO_QUERY_THROW);
@@ -2717,7 +2717,7 @@ void Chart2ImportTest::testTdf136752()
void Chart2ImportTest::testTdf137505()
{
- load("/chart2/qa/extras/data/xlsx/", "tdf137505.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf137505.xlsx");
Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent),
UNO_QUERY_THROW);
@@ -2737,7 +2737,7 @@ void Chart2ImportTest::testTdf137505()
void Chart2ImportTest::testTdf137734()
{
- load("/chart2/qa/extras/data/xlsx/", "tdf137734.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "tdf137734.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
CPPUNIT_ASSERT(xChartDoc.is());
@@ -2764,7 +2764,7 @@ void Chart2ImportTest::testTdf137734()
void Chart2ImportTest::testTdf137874()
{
- load("/chart2/qa/extras/data/xlsx/", "piechart_legend.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "piechart_legend.xlsx");
Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent),
UNO_QUERY_THROW);
Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW);
@@ -2778,7 +2778,7 @@ void Chart2ImportTest::testTdf137874()
void Chart2ImportTest::testTdfCustomShapePos()
{
- load("/chart2/qa/extras/data/docx/", "testcustomshapepos.docx");
+ load(u"/chart2/qa/extras/data/docx/", "testcustomshapepos.docx");
Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), UNO_QUERY_THROW);
Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW);
Reference<drawing::XDrawPage> xDrawPage(xDrawPageSupplier->getDrawPage(), UNO_SET_THROW);
diff --git a/chart2/qa/extras/charttest.hxx b/chart2/qa/extras/charttest.hxx
index b696231a6c54..eeebd0ea237a 100644
--- a/chart2/qa/extras/charttest.hxx
+++ b/chart2/qa/extras/charttest.hxx
@@ -54,6 +54,7 @@
#include <iostream>
#include <memory>
+#include <string_view>
#include <com/sun/star/embed/Aspects.hpp>
#include <com/sun/star/embed/XVisualObject.hpp>
@@ -71,13 +72,13 @@ class ChartTest : public test::BootstrapFixture, public unotest::MacrosTest
{
public:
ChartTest():mbSkipValidation(false) {}
- void load( const OUString& rDir, const OUString& rFileName );
+ void load( std::u16string_view rDir, const OUString& rFileName );
std::shared_ptr<utl::TempFile> save( const OUString& rFileName );
std::shared_ptr<utl::TempFile> reload( const OUString& rFileName );
- uno::Sequence < OUString > getImpressChartColumnDescriptions( const OUString& pDir, const char* pName );
+ uno::Sequence < OUString > getImpressChartColumnDescriptions( std::u16string_view pDir, const char* pName );
OUString getFileExtension( const OUString& rFileName );
- uno::Reference< chart::XChartDocument > getChartDocFromImpress( const OUString& pDir, const char* pName );
+ uno::Reference< chart::XChartDocument > getChartDocFromImpress( std::u16string_view pDir, const char* pName );
uno::Reference<chart::XChartDocument> getChartDocFromDrawImpress( sal_Int32 nPage, sal_Int32 nShape );
@@ -101,7 +102,7 @@ OUString ChartTest::getFileExtension( const OUString& aFileName )
return aFileName.copy(nDotLocation+1); // Skip the dot.
}
-void ChartTest::load( const OUString& aDir, const OUString& aName )
+void ChartTest::load( std::u16string_view aDir, const OUString& aName )
{
OUString extension = getFileExtension(aName);
if (extension == "ods" || extension == "xlsx" || extension == "fods")
@@ -476,7 +477,7 @@ std::vector<uno::Sequence<uno::Any> > getDataSeriesLabelsFromChartType( const Re
return aRet;
}
-uno::Reference< chart::XChartDocument > ChartTest::getChartDocFromImpress( const OUString& pDir, const char* pName )
+uno::Reference< chart::XChartDocument > ChartTest::getChartDocFromImpress( std::u16string_view pDir, const char* pName )
{
mxComponent = loadFromDesktop(m_directories.getURLFromSrc(pDir) + OUString::createFromAscii(pName), "com.sun.star.comp.Draw.PresentationDocument");
uno::Reference< drawing::XDrawPagesSupplier > xDoc(mxComponent, uno::UNO_QUERY_THROW );
@@ -538,7 +539,7 @@ uno::Reference<chart::XChartDocument> ChartTest::getChartDocFromWriter( sal_Int3
return xChartDoc;
}
-uno::Sequence < OUString > ChartTest::getImpressChartColumnDescriptions( const OUString& pDir, const char* pName )
+uno::Sequence < OUString > ChartTest::getImpressChartColumnDescriptions( std::u16string_view pDir, const char* pName )
{
uno::Reference< chart::XChartDocument > xChartDoc = getChartDocFromImpress( pDir, pName );
uno::Reference< chart::XChartDataArray > xChartData ( xChartDoc->getData(), uno::UNO_QUERY_THROW);
diff --git a/chart2/qa/extras/xshape/chart2xshape.cxx b/chart2/qa/extras/xshape/chart2xshape.cxx
index 3acb981cb78d..70b9a80770b4 100644
--- a/chart2/qa/extras/xshape/chart2xshape.cxx
+++ b/chart2/qa/extras/xshape/chart2xshape.cxx
@@ -43,7 +43,7 @@ public:
CPPUNIT_TEST_SUITE_END();
private:
- void compareAgainstReference(const OUString& rReferenceFile, bool bCreateReference = false);
+ void compareAgainstReference(std::u16string_view rReferenceFile, bool bCreateReference = false);
OUString getXShapeDumpString();
xmlDocUniquePtr getXShapeDumpXmlDoc();
};
@@ -76,13 +76,13 @@ xmlDocUniquePtr Chart2XShapeTest::getXShapeDumpXmlDoc()
return xmlDocUniquePtr(xmlParseDoc(reinterpret_cast<const xmlChar*>(aXmlDump.getStr())));
}
-void Chart2XShapeTest::compareAgainstReference(const OUString& rReferenceFile,
+void Chart2XShapeTest::compareAgainstReference(std::u16string_view rReferenceFile,
bool bCreateReference)
{
OUString aDump = getXShapeDumpString();
- OUString aReference
- = m_directories.getPathFromSrc("/chart2/qa/extras/xshape/data/reference/") + rReferenceFile;
+ OUString aReference = m_directories.getPathFromSrc(u"/chart2/qa/extras/xshape/data/reference/")
+ + rReferenceFile;
if (bCreateReference)
{
OString aOFile = OUStringToOString(aReference, RTL_TEXTENCODING_UTF8);
@@ -120,8 +120,8 @@ void Chart2XShapeTest::testPieChartLabels1()
return;
// inside placement for the best fit case
- load("chart2/qa/extras/xshape/data/xlsx/", "tdf90839-1.xlsx");
- compareAgainstReference("tdf90839-1.xml");
+ load(u"chart2/qa/extras/xshape/data/xlsx/", "tdf90839-1.xlsx");
+ compareAgainstReference(u"tdf90839-1.xml");
}
void Chart2XShapeTest::testPieChartLabels2()
@@ -132,8 +132,8 @@ void Chart2XShapeTest::testPieChartLabels2()
return;
// text wrap: wrap all text labels except one
- load("chart2/qa/extras/xshape/data/xlsx/", "tdf90839-2.xlsx");
- compareAgainstReference("tdf90839-2.xml");
+ load(u"chart2/qa/extras/xshape/data/xlsx/", "tdf90839-2.xlsx");
+ compareAgainstReference(u"tdf90839-2.xml");
}
void Chart2XShapeTest::testPieChartLabels3()
@@ -144,8 +144,8 @@ void Chart2XShapeTest::testPieChartLabels3()
return;
// text wrap: wrap no text label except one
- load("chart2/qa/extras/xshape/data/xlsx/", "tdf90839-3.xlsx");
- compareAgainstReference("tdf90839-3.xml");
+ load(u"chart2/qa/extras/xshape/data/xlsx/", "tdf90839-3.xlsx");
+ compareAgainstReference(u"tdf90839-3.xml");
}
void Chart2XShapeTest::testPieChartLabels4()
@@ -156,8 +156,8 @@ void Chart2XShapeTest::testPieChartLabels4()
return;
// data value and percent value are centered horizontally
- load("chart2/qa/extras/xshape/data/ods/", "tdf90839-4.ods");
- compareAgainstReference("tdf90839-4.xml");
+ load(u"chart2/qa/extras/xshape/data/ods/", "tdf90839-4.ods");
+ compareAgainstReference(u"tdf90839-4.xml");
}
void Chart2XShapeTest::testTdf76649TrendLineBug()
@@ -165,7 +165,7 @@ void Chart2XShapeTest::testTdf76649TrendLineBug()
// This bug prevents that the trendline (regression curve) is drawn
// if the first cell is empty. See tdf#76649 for details.
- load("chart2/qa/extras/xshape/data/ods/", "tdf76649_TrendLineBug.ods");
+ load(u"chart2/qa/extras/xshape/data/ods/", "tdf76649_TrendLineBug.ods");
xmlDocUniquePtr pXmlDoc = getXShapeDumpXmlDoc();
@@ -176,7 +176,7 @@ void Chart2XShapeTest::testTdf76649TrendLineBug()
void Chart2XShapeTest::testTdf88154LabelRotatedLayout()
{
- load("chart2/qa/extras/xshape/data/pptx/", "tdf88154_LabelRotatedLayout.pptx");
+ load(u"chart2/qa/extras/xshape/data/pptx/", "tdf88154_LabelRotatedLayout.pptx");
uno::Reference<chart::XChartDocument> xChartDoc = getChartDocFromDrawImpress(0, 6);
uno::Reference<qa::XDumper> xDumper(xChartDoc, UNO_QUERY_THROW);
OUString rDump = xDumper->dump();
diff --git a/chart2/qa/unit/chart2-dialogs-test.cxx b/chart2/qa/unit/chart2-dialogs-test.cxx
index c37fb1e1bbe2..00bb9179dfdf 100644
--- a/chart2/qa/unit/chart2-dialogs-test.cxx
+++ b/chart2/qa/unit/chart2-dialogs-test.cxx
@@ -51,7 +51,7 @@ VclPtr<VclAbstractDialog> Chart2DialogsTest::createDialogByID(sal_uInt32 /*nID*/
void Chart2DialogsTest::openAnyDialog()
{
/// process input file containing the UXMLDescriptions of the dialogs to dump
- processDialogBatchFile("chart2/qa/unit/data/chart2-dialogs-test.txt");
+ processDialogBatchFile(u"chart2/qa/unit/data/chart2-dialogs-test.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(Chart2DialogsTest);
diff --git a/chart2/source/inc/ObjectIdentifier.hxx b/chart2/source/inc/ObjectIdentifier.hxx
index 55f6f58bd343..6f534305359e 100644
--- a/chart2/source/inc/ObjectIdentifier.hxx
+++ b/chart2/source/inc/ObjectIdentifier.hxx
@@ -18,6 +18,10 @@
*/
#pragma once
+#include <sal/config.h>
+
+#include <string_view>
+
#include "TitleHelper.hxx"
#include "charttoolsdllapi.hxx"
@@ -177,7 +181,7 @@ public:
, const OUString& rSeriesParticle
, const OUString& rDragMethodServiceName = OUString()
, const OUString& rDragParameterString = OUString() );
- static OUString createPointCID( const OUString& rPointCID_Stub, sal_Int32 nIndex );
+ static OUString createPointCID( std::u16string_view rPointCID_Stub, sal_Int32 nIndex );
static OUString createDataCurveCID( const OUString& rSeriesParticle, sal_Int32 nCurveIndex, bool bAverageLine );
static OUString createDataCurveEquationCID( const OUString& rSeriesParticle, sal_Int32 nCurveIndex );
diff --git a/chart2/source/tools/ObjectIdentifier.cxx b/chart2/source/tools/ObjectIdentifier.cxx
index c2979f13f5b3..b5faa312d46b 100644
--- a/chart2/source/tools/ObjectIdentifier.cxx
+++ b/chart2/source/tools/ObjectIdentifier.cxx
@@ -1124,7 +1124,7 @@ OUString ObjectIdentifier::createSeriesSubObjectStub( ObjectType eSubObjectType
, rDragMethodServiceName, rDragParameterString );
}
-OUString ObjectIdentifier::createPointCID( const OUString& rPointCID_Stub, sal_Int32 nIndex )
+OUString ObjectIdentifier::createPointCID( std::u16string_view rPointCID_Stub, sal_Int32 nIndex )
{
return rPointCID_Stub + OUString::number( nIndex );
}
diff --git a/codemaker/source/codemaker/typemanager.cxx b/codemaker/source/codemaker/typemanager.cxx
index 12a00495ee56..194840ca9d5b 100644
--- a/codemaker/source/codemaker/typemanager.cxx
+++ b/codemaker/source/codemaker/typemanager.cxx
@@ -158,7 +158,7 @@ codemaker::UnoType::Sort TypeManager::getSort(
}
codemaker::UnoType::Sort TypeManager::decompose(
- OUString const & name, bool resolveTypedefs, OUString * nucleus,
+ std::u16string_view name, bool resolveTypedefs, OUString * nucleus,
sal_Int32 * rank, std::vector< OUString > * arguments,
rtl::Reference< unoidl::Entity > * entity) const
{
diff --git a/codemaker/source/commoncpp/commoncpp.cxx b/codemaker/source/commoncpp/commoncpp.cxx
index efe0dd0b48bf..c7dc2bdeb26c 100644
--- a/codemaker/source/commoncpp/commoncpp.cxx
+++ b/codemaker/source/commoncpp/commoncpp.cxx
@@ -87,7 +87,7 @@ OString translateUnoToCppType(
}
OString translateUnoToCppIdentifier(
- OString const & unoIdentifier, OString const & prefix,
+ OString const & unoIdentifier, std::string_view prefix,
IdentifierTranslationMode transmode, OString const * forbidden)
{
if (// Keywords:
@@ -287,7 +287,7 @@ OString translateUnoToCppIdentifier(
|| unoIdentifier == "NDEBUG"
|| (forbidden != nullptr && unoIdentifier == *forbidden) )
{
- return prefix + "_" + unoIdentifier;
+ return OString::Concat(prefix) + "_" + unoIdentifier;
} else {
return unoIdentifier;
}
diff --git a/codemaker/source/commonjava/commonjava.cxx b/codemaker/source/commonjava/commonjava.cxx
index d33969676ee6..0d01bee54048 100644
--- a/codemaker/source/commonjava/commonjava.cxx
+++ b/codemaker/source/commonjava/commonjava.cxx
@@ -71,7 +71,7 @@ OString translateUnoToJavaType(
}
OString translateUnoToJavaIdentifier(
- OString const & identifier, OString const & prefix)
+ OString const & identifier, std::string_view prefix)
{
if (identifier == "abstract"
|| identifier == "assert" // since Java 1.4
@@ -124,7 +124,7 @@ OString translateUnoToJavaIdentifier(
|| identifier == "volatile"
|| identifier == "while")
{
- return prefix + "_" + identifier;
+ return OString::Concat(prefix) + "_" + identifier;
} else {
return identifier;
}
diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx
index c98d8d76e214..1ab587040b82 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -165,7 +165,7 @@ public:
void dump(CppuOptions const & options);
void dumpFile(
- std::u16string_view uri, OUString const & name, bool hpp,
+ std::u16string_view uri, std::u16string_view name, bool hpp,
CppuOptions const & options);
void dumpDependedTypes(
@@ -178,7 +178,7 @@ public:
virtual void dumpHppFile(FileStream& o, codemaker::cppumaker::Includes & includes) = 0;
- OUString dumpHeaderDefine(FileStream& o, OUString const & extension) const;
+ OUString dumpHeaderDefine(FileStream& o, std::u16string_view extension) const;
void dumpGetCppuType(FileStream & out);
@@ -193,14 +193,14 @@ public:
}
void dumpType(
- FileStream & out, OUString const & name, bool isConst = false,
+ FileStream & out, std::u16string_view name, bool isConst = false,
bool isRef = false, bool native = false, bool cppuUnoType = false)
const;
OUString getTypeClass(OUString const & name, bool cStyle = false);
void dumpCppuGetType(
- FileStream & out, OUString const & name, OUString const * ownName = nullptr) const;
+ FileStream & out, std::u16string_view name, OUString const * ownName = nullptr) const;
sal_uInt32 getInheritedMemberCount();
@@ -253,7 +253,7 @@ protected:
void addDefaultHxxIncludes(codemaker::cppumaker::Includes & includes) const;
void dumpInitializer(
- FileStream & out, bool parameterized, OUString const & name) const;
+ FileStream & out, bool parameterized, std::u16string_view name) const;
void dumpHFileContent(
FileStream & out, codemaker::cppumaker::Includes & includes);
@@ -413,14 +413,14 @@ void CppuType::dump(CppuOptions const & options)
}
void CppuType::dumpFile(
- std::u16string_view uri, OUString const & name, bool hpp,
+ std::u16string_view uri, std::u16string_view name, bool hpp,
CppuOptions const & options)
{
OUString fileUri(
b2u(createFileNameFromType(
u2b(uri), u2b(name), hpp ? ".hpp" : ".hdl")));
if (fileUri.isEmpty()) {
- throw CannotDumpException("empty target URI for entity " + name);
+ throw CannotDumpException(OUString::Concat("empty target URI for entity ") + name);
}
bool exists = fileExists(u2b(fileUri));
if (exists && options.isValid("-G")) {
@@ -468,7 +468,7 @@ void CppuType::dumpDependedTypes(
}
OUString CppuType::dumpHeaderDefine(
- FileStream & out, OUString const & extension) const
+ FileStream & out, std::u16string_view extension) const
{
OUString def(
"INCLUDED_" + name_.replace('.', '_').toAsciiUpperCase() + "_"
@@ -500,7 +500,7 @@ const
}
void CppuType::dumpInitializer(
- FileStream & out, bool parameterized, OUString const & name) const
+ FileStream & out, bool parameterized, std::u16string_view name) const
{
out << "(";
if (!parameterized) {
@@ -541,7 +541,7 @@ void CppuType::dumpInitializer(
break;
default:
throw CannotDumpException(
- "unexpected entity \"" + name
+ OUString::Concat("unexpected entity \"") + name
+ "\" in call to CppuType::dumpInitializer");
}
}
@@ -553,7 +553,7 @@ void CppuType::dumpHFileContent(
FileStream & out, codemaker::cppumaker::Includes & includes)
{
addDefaultHIncludes(includes);
- dumpHeaderDefine(out, "HDL");
+ dumpHeaderDefine(out, u"HDL");
out << "\n";
includes.dump(out, nullptr, false);
// 'exceptions = false' would be wrong for services/singletons, but
@@ -746,7 +746,7 @@ OUString CppuType::getTypeClass(OUString const & name, bool cStyle)
}
void CppuType::dumpType(
- FileStream & out, OUString const & name, bool isConst, bool isRef,
+ FileStream & out, std::u16string_view name, bool isConst, bool isRef,
bool native, bool cppuUnoType) const
{
sal_Int32 k;
@@ -838,7 +838,7 @@ void CppuType::dumpType(
break;
default:
throw CannotDumpException(
- "unexpected entity \"" + name + "\" in call to CppuType::dumpType");
+ OUString::Concat("unexpected entity \"") + name + "\" in call to CppuType::dumpType");
}
for (sal_Int32 i = 0; i != k; ++i) {
out << " >";
@@ -849,7 +849,7 @@ void CppuType::dumpType(
}
void CppuType::dumpCppuGetType(
- FileStream & out, OUString const & name, OUString const * ownName) const
+ FileStream & out, std::u16string_view name, OUString const * ownName) const
{
//TODO: What are these calls good for?
OUString nucleus;
@@ -890,7 +890,7 @@ void CppuType::dumpCppuGetType(
for (;;) std::abort(); // this cannot happen
default:
throw CannotDumpException(
- "unexpected entity \"" + name
+ OUString::Concat("unexpected entity \"") + name
+ "\" in call to CppuType::dumpCppuGetType");
}
}
@@ -1182,7 +1182,7 @@ void InterfaceType::dumpDeclaration(FileStream & out)
void InterfaceType::dumpHppFile(
FileStream & out, codemaker::cppumaker::Includes & includes)
{
- OUString headerDefine(dumpHeaderDefine(out, "HPP"));
+ OUString headerDefine(dumpHeaderDefine(out, u"HPP"));
out << "\n";
addDefaultHxxIncludes(includes);
includes.dump(out, &name_, !(m_cppuTypeLeak || m_cppuTypeDynamic));
@@ -1376,7 +1376,7 @@ void InterfaceType::dumpComprehensiveGetCppuType(FileStream & out)
std::set< OUString > seen;
// Type for RuntimeException is always needed:
seen.insert("com.sun.star.uno.RuntimeException");
- dumpCppuGetType(out, "com.sun.star.uno.RuntimeException");
+ dumpCppuGetType(out, u"com.sun.star.uno.RuntimeException");
dumpAttributesCppuDecl(out, &seen);
dumpMethodsCppuDecl(out, &seen);
if (count != 0) {
@@ -1651,7 +1651,7 @@ private:
void ConstantGroup::dumpHdlFile(
FileStream & out, codemaker::cppumaker::Includes & includes)
{
- OUString headerDefine(dumpHeaderDefine(out, "HDL"));
+ OUString headerDefine(dumpHeaderDefine(out, u"HDL"));
out << "\n";
addDefaultHIncludes(includes);
includes.dump(out, nullptr, true);
@@ -1671,7 +1671,7 @@ void ConstantGroup::dumpHdlFile(
void ConstantGroup::dumpHppFile(
FileStream & out, codemaker::cppumaker::Includes &)
{
- OUString headerDefine(dumpHeaderDefine(out, "HPP"));
+ OUString headerDefine(dumpHeaderDefine(out, u"HPP"));
out << "\n";
codemaker::cppumaker::Includes::dumpInclude(out, u2b(name_), false);
out << "\n#endif // "<< headerDefine << "\n";
@@ -1867,7 +1867,7 @@ void PlainStructType::dumpDeclaration(FileStream & out)
void PlainStructType::dumpHppFile(
FileStream & out, codemaker::cppumaker::Includes & includes)
{
- OUString headerDefine(dumpHeaderDefine(out, "HPP"));
+ OUString headerDefine(dumpHeaderDefine(out, u"HPP"));
out << "\n";
includes.dump(out, &name_, true);
out << "\n";
@@ -2259,7 +2259,7 @@ void PolyStructType::dumpDeclaration(FileStream & out)
void PolyStructType::dumpHppFile(
FileStream & out, codemaker::cppumaker::Includes & includes)
{
- OUString headerDefine(dumpHeaderDefine(out, "HPP"));
+ OUString headerDefine(dumpHeaderDefine(out, u"HPP"));
out << "\n";
includes.dump(out, &name_, true);
out << "\n";
@@ -2811,7 +2811,7 @@ void ExceptionType::addComprehensiveGetCppuTypeIncludes(
void ExceptionType::dumpHppFile(
FileStream & out, codemaker::cppumaker::Includes & includes)
{
- OUString headerDefine(dumpHeaderDefine(out, "HPP"));
+ OUString headerDefine(dumpHeaderDefine(out, u"HPP"));
out << "\n";
addDefaultHxxIncludes(includes);
includes.dump(out, &name_, true);
@@ -3321,7 +3321,7 @@ void EnumType::dumpDeclaration(FileStream& o)
void EnumType::dumpHppFile(
FileStream& o, codemaker::cppumaker::Includes & includes)
{
- OUString headerDefine(dumpHeaderDefine(o, "HPP"));
+ OUString headerDefine(dumpHeaderDefine(o, u"HPP"));
o << "\n";
addDefaultHxxIncludes(includes);
@@ -3455,7 +3455,7 @@ private:
void Typedef::dumpHdlFile(
FileStream& o, codemaker::cppumaker::Includes & includes)
{
- OUString headerDefine(dumpHeaderDefine(o, "HDL"));
+ OUString headerDefine(dumpHeaderDefine(o, u"HDL"));
o << "\n";
addDefaultHIncludes(includes);
@@ -3485,7 +3485,7 @@ void Typedef::dumpDeclaration(FileStream& o)
void Typedef::dumpHppFile(
FileStream& o, codemaker::cppumaker::Includes & includes)
{
- OUString headerDefine(dumpHeaderDefine(o, "HPP"));
+ OUString headerDefine(dumpHeaderDefine(o, u"HPP"));
o << "\n";
addDefaultHxxIncludes(includes);
@@ -3607,7 +3607,7 @@ void ServiceType::dumpHppFile(
OString cppName(
codemaker::cpp::translateUnoToCppIdentifier(
u2b(id_), "service", isGlobal()));
- OUString headerDefine(dumpHeaderDefine(o, "HPP"));
+ OUString headerDefine(dumpHeaderDefine(o, u"HPP"));
o << "\n";
includes.dump(o, nullptr, true);
if (!entity_->getConstructors().empty()) {
@@ -3903,7 +3903,7 @@ void SingletonType::dumpHppFile(
u2b(id_), "singleton", isGlobal()));
OString baseName(u2b(entity_->getBase()));
OString scopedBaseName(codemaker::cpp::scopedCppName(baseName));
- OUString headerDefine(dumpHeaderDefine(o, "HPP"));
+ OUString headerDefine(dumpHeaderDefine(o, u"HPP"));
o << "\n";
//TODO: Decide whether the types added to includes should rather be added to
// m_dependencies (and thus be generated during dumpDependedTypes):
diff --git a/codemaker/source/cppumaker/dependencies.cxx b/codemaker/source/cppumaker/dependencies.cxx
index eb257c6966af..1af6b9d46061 100644
--- a/codemaker/source/cppumaker/dependencies.cxx
+++ b/codemaker/source/cppumaker/dependencies.cxx
@@ -102,7 +102,7 @@ Dependencies::Dependencies(
if (!(ent2->getDirectAttributes().empty()
&& ent2->getDirectMethods().empty()))
{
- insert("com.sun.star.uno.RuntimeException", KIND_EXCEPTION);
+ insert(u"com.sun.star.uno.RuntimeException", KIND_EXCEPTION);
}
for (const unoidl::InterfaceTypeEntity::Attribute& attr : ent2->getDirectAttributes())
{
@@ -212,7 +212,7 @@ Dependencies::Dependencies(
Dependencies::~Dependencies() {}
-void Dependencies::insert(OUString const & name, Kind kind) {
+void Dependencies::insert(std::u16string_view name, Kind kind) {
sal_Int32 k;
std::vector< OString > args;
OUString n(b2u(UnoType::decompose(u2b(name), &k, &args)));
@@ -286,7 +286,7 @@ void Dependencies::insert(OUString const & name, Kind kind) {
}
default:
throw CannotDumpException(
- "unexpected type \"" + name
+ OUString::Concat("unexpected type \"") + name
+ "\" in call to codemaker::cppumaker::Dependencies::Dependencies");
}
}
diff --git a/codemaker/source/cppumaker/dependencies.hxx b/codemaker/source/cppumaker/dependencies.hxx
index 9d805f382aae..0071397aa0ef 100644
--- a/codemaker/source/cppumaker/dependencies.hxx
+++ b/codemaker/source/cppumaker/dependencies.hxx
@@ -22,6 +22,7 @@
#include <sal/config.h>
#include <map>
+#include <string_view>
#include <rtl/ref.hxx>
@@ -100,7 +101,7 @@ public:
bool hasSequenceDependency() const { return m_sequenceDependency; }
private:
- void insert(OUString const & name, Kind kind);
+ void insert(std::u16string_view name, Kind kind);
rtl::Reference< TypeManager > m_manager;
Map m_map;
diff --git a/codemaker/source/javamaker/javatype.cxx b/codemaker/source/javamaker/javatype.cxx
index e29c5d5b6a13..25406d07234c 100644
--- a/codemaker/source/javamaker/javatype.cxx
+++ b/codemaker/source/javamaker/javatype.cxx
@@ -25,6 +25,7 @@
#include <map>
#include <memory>
#include <set>
+#include <string_view>
#include <utility>
#include <vector>
@@ -107,7 +108,7 @@ bool isSpecialType(SpecialType special) {
}
OString translateUnoidlEntityNameToJavaFullyQualifiedName(
- OUString const & name, OString const & prefix)
+ OUString const & name, std::string_view prefix)
{
assert(!name.startsWith("[]"));
assert(name.indexOf('<') == -1);
@@ -126,7 +127,7 @@ struct PolymorphicUnoType {
};
SpecialType translateUnoTypeToDescriptor(
- rtl::Reference< TypeManager > const & manager, OUString const & type,
+ rtl::Reference< TypeManager > const & manager, std::u16string_view type,
bool array, bool classType, std::set<OUString> * dependencies,
OStringBuffer * descriptor, OStringBuffer * signature,
bool * needsSignature, PolymorphicUnoType * polymorphicUnoType);
@@ -272,7 +273,7 @@ SpecialType translateUnoTypeToDescriptor(
}
SpecialType translateUnoTypeToDescriptor(
- rtl::Reference< TypeManager > const & manager, OUString const & type,
+ rtl::Reference< TypeManager > const & manager, std::u16string_view type,
bool array, bool classType, std::set<OUString> * dependencies,
OStringBuffer * descriptor, OStringBuffer * signature,
bool * needsSignature, PolymorphicUnoType * polymorphicUnoType)
@@ -290,7 +291,7 @@ SpecialType translateUnoTypeToDescriptor(
SpecialType getFieldDescriptor(
rtl::Reference< TypeManager > const & manager, std::set<OUString> * dependencies,
- OUString const & type, OString * descriptor, OString * signature,
+ std::u16string_view type, OString * descriptor, OString * signature,
PolymorphicUnoType * polymorphicUnoType)
{
assert(descriptor != nullptr);
@@ -315,12 +316,12 @@ class MethodDescriptor {
public:
MethodDescriptor(
rtl::Reference< TypeManager > const & manager,
- std::set<OUString> * dependencies, OUString const & returnType,
+ std::set<OUString> * dependencies, std::u16string_view returnType,
SpecialType * specialReturnType,
PolymorphicUnoType * polymorphicUnoType);
SpecialType addParameter(
- OUString const & type, bool array, bool dependency,
+ std::u16string_view type, bool array, bool dependency,
PolymorphicUnoType * polymorphicUnoType);
void addTypeParameter(OUString const & name);
@@ -341,7 +342,7 @@ private:
MethodDescriptor::MethodDescriptor(
rtl::Reference< TypeManager > const & manager, std::set<OUString> * dependencies,
- OUString const & returnType, SpecialType * specialReturnType,
+ std::u16string_view returnType, SpecialType * specialReturnType,
PolymorphicUnoType * polymorphicUnoType):
m_manager(manager), m_dependencies(dependencies), m_needsSignature(false)
{
@@ -363,7 +364,7 @@ MethodDescriptor::MethodDescriptor(
}
SpecialType MethodDescriptor::addParameter(
- OUString const & type, bool array, bool dependency,
+ std::u16string_view type, bool array, bool dependency,
PolymorphicUnoType * polymorphicUnoType)
{
return translateUnoTypeToDescriptor(
@@ -845,7 +846,7 @@ void addField(
sal_uInt16 addFieldInit(
rtl::Reference< TypeManager > const & manager, OString const & className,
- OUString const & fieldName, bool typeParameter, OUString const & fieldType,
+ OUString const & fieldName, bool typeParameter, std::u16string_view fieldType,
std::set<OUString> * dependencies, ClassFile::Code * code)
{
assert(manager.is());
@@ -931,7 +932,7 @@ sal_uInt16 addFieldInit(
for (;;) std::abort(); // this cannot happen
default:
throw CannotDumpException(
- "unexpected entity \"" + fieldType
+ OUString::Concat("unexpected entity \"") + fieldType
+ "\" in call to addFieldInit");
}
}
@@ -965,7 +966,7 @@ sal_uInt16 addFieldInit(
sal_uInt16 addLoadLocal(
rtl::Reference< TypeManager > const & manager, ClassFile::Code * code,
- sal_uInt16 * index, bool typeParameter, OUString const & type, bool any,
+ sal_uInt16 * index, bool typeParameter, std::u16string_view type, bool any,
std::set<OUString> * dependencies)
{
assert(manager.is());
@@ -1234,7 +1235,7 @@ sal_uInt16 addLoadLocal(
for (;;) std::abort(); // this cannot happen
default:
throw CannotDumpException(
- "unexpected entity \"" + type
+ OUString::Concat("unexpected entity \"") + type
+ "\" in call to addLoadLocal");
}
} else {
@@ -1272,7 +1273,7 @@ sal_uInt16 addLoadLocal(
for (;;) std::abort(); // this cannot happen
default:
throw CannotDumpException(
- "unexpected entity \"" + type
+ OUString::Concat("unexpected entity \"") + type
+ "\" in call to addLoadLocal");
}
}
@@ -1404,7 +1405,7 @@ void handlePlainStructType(
cf->addMethod(
ClassFile::ACC_PUBLIC, "<init>", "()V", code.get(),
std::vector< OString >(), "");
- MethodDescriptor desc(manager, dependencies, "void", nullptr, nullptr);
+ MethodDescriptor desc(manager, dependencies, u"void", nullptr, nullptr);
code = cf->newCode();
code->loadLocalReference(0);
sal_uInt16 index2 = 1;
@@ -1495,7 +1496,7 @@ void handlePolyStructType(
cf->addMethod(
ClassFile::ACC_PUBLIC, "<init>", "()V", code.get(),
std::vector< OString >(), "");
- MethodDescriptor desc(manager, dependencies, "void", nullptr, nullptr);
+ MethodDescriptor desc(manager, dependencies, u"void", nullptr, nullptr);
code = cf->newCode();
code->loadLocalReference(0);
sal_uInt16 index2 = 1;
@@ -1611,7 +1612,7 @@ void handleExceptionType(
stack,
addFieldInit(
manager, className, "Context", false,
- "com.sun.star.uno.XInterface", dependencies, code.get()));
+ u"com.sun.star.uno.XInterface", dependencies, code.get()));
}
for (std::vector< unoidl::ExceptionTypeEntity::Member >::const_iterator i(
entity->getDirectMembers().begin());
@@ -1643,7 +1644,7 @@ void handleExceptionType(
stack,
addFieldInit(
manager, className, "Context", false,
- "com.sun.star.uno.XInterface", dependencies, code.get()));
+ u"com.sun.star.uno.XInterface", dependencies, code.get()));
}
for (std::vector< unoidl::ExceptionTypeEntity::Member >::const_iterator i(
entity->getDirectMembers().begin());
@@ -1681,7 +1682,7 @@ void handleExceptionType(
stack,
addFieldInit(
manager, className, "Context", false,
- "com.sun.star.uno.XInterface", dependencies, code.get()));
+ u"com.sun.star.uno.XInterface", dependencies, code.get()));
}
for (std::vector< unoidl::ExceptionTypeEntity::Member >::const_iterator i(
entity->getDirectMembers().begin());
@@ -1712,7 +1713,7 @@ void handleExceptionType(
stack,
addFieldInit(
manager, className, "Context", false,
- "com.sun.star.uno.XInterface", dependencies, code.get()));
+ u"com.sun.star.uno.XInterface", dependencies, code.get()));
}
for (std::vector< unoidl::ExceptionTypeEntity::Member >::const_iterator i(
entity->getDirectMembers().begin());
@@ -1734,12 +1735,12 @@ void handleExceptionType(
// create (String Message, Object Context, T1 m1, ..., Tn mn) constructor
- MethodDescriptor desc1(manager, dependencies, "void", nullptr, nullptr);
+ MethodDescriptor desc1(manager, dependencies, u"void", nullptr, nullptr);
code = cf->newCode();
code->loadLocalReference(0);
sal_uInt16 index2 = 1;
code->loadLocalReference(index2++);
- desc1.addParameter("string", false, true, nullptr);
+ desc1.addParameter(u"string", false, true, nullptr);
if (!(baseException || baseRuntimeException)) {
addExceptionBaseArguments(
manager, dependencies, &desc1, code.get(), entity->getDirectBase(),
@@ -1774,13 +1775,13 @@ void handleExceptionType(
std::vector< OString >(), desc1.getSignature());
// create (Throwable Cause, String Message, Object Context, T1 m1, ..., Tn mn) constructor
- MethodDescriptor desc2(manager, dependencies, "void", nullptr, nullptr);
+ MethodDescriptor desc2(manager, dependencies, u"void", nullptr, nullptr);
code = cf->newCode();
code->loadLocalReference(0);
sal_uInt16 index3 = 3;
// Note that we hack in the java.lang.Throwable parameter further down,
// because MethodDescriptor does not know how to handle it.
- desc2.addParameter("string", false, true, nullptr);
+ desc2.addParameter(u"string", false, true, nullptr);
if (baseException || baseRuntimeException) {
code->loadLocalReference(2);
code->loadLocalReference(1);
@@ -1888,7 +1889,7 @@ void handleInterfaceType(
"get" + attrName, gdesc.getDescriptor(), nullptr, exc,
gdesc.getSignature());
if (!attr.readOnly) {
- MethodDescriptor sdesc(manager, dependencies, "void", nullptr, nullptr);
+ MethodDescriptor sdesc(manager, dependencies, u"void", nullptr, nullptr);
sdesc.addParameter(attr.type, false, true, nullptr);
std::vector< OString > exc2;
createExceptionsAttribute(
@@ -2079,7 +2080,7 @@ void addExceptionHandlers(
void addConstructor(
rtl::Reference< TypeManager > const & manager,
- OString const & realJavaBaseName, OString const & unoName,
+ std::string_view realJavaBaseName, OString const & unoName,
OString const & className,
unoidl::SingleInterfaceBasedServiceEntity::Constructor const & constructor,
OUString const & returnType, std::set<OUString> * dependencies,
@@ -2088,7 +2089,7 @@ void addConstructor(
assert(dependencies != nullptr);
assert(classFile != nullptr);
MethodDescriptor desc(manager, dependencies, returnType, nullptr, nullptr);
- desc.addParameter("com.sun.star.uno.XComponentContext", false, false, nullptr);
+ desc.addParameter(u"com.sun.star.uno.XComponentContext", false, false, nullptr);
std::unique_ptr< ClassFile::Code > code(classFile->newCode());
code->loadLocalReference(0);
// stack: context
@@ -2123,7 +2124,7 @@ void addConstructor(
if (constructor.parameters.size() == 1
&& constructor.parameters[0].rest)
{
- desc.addParameter("any", true, true, nullptr);
+ desc.addParameter(u"any", true, true, nullptr);
code->loadLocalReference(localIndex++);
// stack: factory serviceName args
stack = 4;
@@ -2345,7 +2346,7 @@ void handleSingleton(
| ClassFile::ACC_SUPER),
className, "java/lang/Object", ""));
MethodDescriptor desc(manager, dependencies, entity->getBase(), nullptr, nullptr);
- desc.addParameter("com.sun.star.uno.XComponentContext", false, false, nullptr);
+ desc.addParameter(u"com.sun.star.uno.XComponentContext", false, false, nullptr);
std::unique_ptr< ClassFile::Code > code(cf->newCode());
code->loadLocalReference(0);
// stack: context
diff --git a/comphelper/source/misc/DirectoryHelper.cxx b/comphelper/source/misc/DirectoryHelper.cxx
index 5b0ffbf68465..4ac2dfe7e829 100644
--- a/comphelper/source/misc/DirectoryHelper.cxx
+++ b/comphelper/source/misc/DirectoryHelper.cxx
@@ -142,7 +142,8 @@ bool DirectoryHelper::deleteDirRecursively(const OUString& rDirURL)
}
// both exist, move content
-bool DirectoryHelper::moveDirContent(const OUString& rSourceDirURL, const OUString& rTargetDirURL,
+bool DirectoryHelper::moveDirContent(const OUString& rSourceDirURL,
+ std::u16string_view rTargetDirURL,
const std::set<OUString>& rExcludeList)
{
std::set<OUString> aDirs;
@@ -161,7 +162,7 @@ bool DirectoryHelper::moveDirContent(const OUString& rSourceDirURL, const OUStri
if (dirExists(aNewSourceDirURL))
{
- const OUString aNewTargetDirURL(rTargetDirURL + "/" + dir);
+ const OUString aNewTargetDirURL(OUString::Concat(rTargetDirURL) + "/" + dir);
if (dirExists(aNewTargetDirURL))
{
@@ -185,7 +186,7 @@ bool DirectoryHelper::moveDirContent(const OUString& rSourceDirURL, const OUStri
if (fileExists(aSourceFileURL))
{
- OUString aTargetFileURL(rTargetDirURL + "/" + file.first);
+ OUString aTargetFileURL(OUString::Concat(rTargetDirURL) + "/" + file.first);
if (!file.second.isEmpty())
{
diff --git a/comphelper/source/misc/backupfilehelper.cxx b/comphelper/source/misc/backupfilehelper.cxx
index fcde7879255b..c7bcd4253ed0 100644
--- a/comphelper/source/misc/backupfilehelper.cxx
+++ b/comphelper/source/misc/backupfilehelper.cxx
@@ -18,6 +18,7 @@
#include <algorithm>
#include <deque>
#include <memory>
+#include <string_view>
#include <vector>
#include <zlib.h>
@@ -172,30 +173,31 @@ namespace
return osl_File_E_None == osl_writeFile(rHandle, static_cast<const void*>(rSource.getStr()), nLength, &nBaseWritten) && nLength == nBaseWritten;
}
- OUString createFileURL(const OUString& rURL, const OUString& rName, const OUString& rExt)
+ OUString createFileURL(
+ std::u16string_view rURL, std::u16string_view rName, std::u16string_view rExt)
{
OUString aRetval;
- if (!rURL.isEmpty() && !rName.isEmpty())
+ if (!rURL.empty() && !rName.empty())
{
- aRetval = rURL + "/" + rName;
+ aRetval = OUString::Concat(rURL) + "/" + rName;
- if (!rExt.isEmpty())
+ if (!rExt.empty())
{
- aRetval += "." + rExt;
+ aRetval += OUString::Concat(".") + rExt;
}
}
return aRetval;
}
- OUString createPackURL(const OUString& rURL, const OUString& rName)
+ OUString createPackURL(std::u16string_view rURL, std::u16string_view rName)
{
OUString aRetval;
- if (!rURL.isEmpty() && !rName.isEmpty())
+ if (!rURL.empty() && !rName.empty())
{
- aRetval = rURL + "/" + rName + ".pack";
+ aRetval = OUString::Concat(rURL) + "/" + rName + ".pack";
}
return aRetval;
@@ -479,21 +481,24 @@ namespace
}
public:
- void createUserExtensionRegistryEntriesFromXML(const OUString& rUserConfigWorkURL)
+ void createUserExtensionRegistryEntriesFromXML(std::u16string_view rUserConfigWorkURL)
{
- const OUString aPath(rUserConfigWorkURL + "/uno_packages/cache" + gaRegPath);
+ const OUString aPath(
+ OUString::Concat(rUserConfigWorkURL) + "/uno_packages/cache" + gaRegPath);
createExtensionRegistryEntriesFromXML(aPath);
}
- void createSharedExtensionRegistryEntriesFromXML(const OUString& rUserConfigWorkURL)
+ void createSharedExtensionRegistryEntriesFromXML(std::u16string_view rUserConfigWorkURL)
{
- const OUString aPath(rUserConfigWorkURL + "/extensions/shared" + gaRegPath);
+ const OUString aPath(
+ OUString::Concat(rUserConfigWorkURL) + "/extensions/shared" + gaRegPath);
createExtensionRegistryEntriesFromXML(aPath);
}
- void createBundledExtensionRegistryEntriesFromXML(const OUString& rUserConfigWorkURL)
+ void createBundledExtensionRegistryEntriesFromXML(std::u16string_view rUserConfigWorkURL)
{
- const OUString aPath(rUserConfigWorkURL + "/extensions/bundled" + gaRegPath);
+ const OUString aPath(
+ OUString::Concat(rUserConfigWorkURL) + "/extensions/bundled" + gaRegPath);
createExtensionRegistryEntriesFromXML(aPath);
}
@@ -657,7 +662,7 @@ namespace
public:
static void changeEnableDisableStateInXML(
- const OUString& rUserConfigWorkURL,
+ std::u16string_view rUserConfigWorkURL,
const ExtensionInfoEntryVector& rToBeEnabled,
const ExtensionInfoEntryVector& rToBeDisabled)
{
@@ -665,7 +670,7 @@ namespace
const OUString aRegPathBack(".PackageRegistryBackend/backenddb.xml");
// first appearance to check
{
- const OUString aUnoPackagReg(rUserConfigWorkURL + aRegPathFront + "bundle" + aRegPathBack);
+ const OUString aUnoPackagReg(OUString::Concat(rUserConfigWorkURL) + aRegPathFront + "bundle" + aRegPathBack);
visitNodesXMLChangeOneCase(
aUnoPackagReg,
@@ -676,7 +681,7 @@ namespace
// second appearance to check
{
- const OUString aUnoPackagReg(rUserConfigWorkURL + aRegPathFront + "configuration" + aRegPathBack);
+ const OUString aUnoPackagReg(OUString::Concat(rUserConfigWorkURL) + aRegPathFront + "configuration" + aRegPathBack);
visitNodesXMLChangeOneCase(
aUnoPackagReg,
@@ -687,7 +692,7 @@ namespace
// third appearance to check
{
- const OUString aUnoPackagReg(rUserConfigWorkURL + aRegPathFront + "script" + aRegPathBack);
+ const OUString aUnoPackagReg(OUString::Concat(rUserConfigWorkURL) + aRegPathFront + "script" + aRegPathBack);
visitNodesXMLChangeOneCase(
aUnoPackagReg,
@@ -2017,8 +2022,8 @@ namespace comphelper
bool BackupFileHelper::tryPush_Files(
const std::set< OUString >& rDirs,
const std::set< std::pair< OUString, OUString > >& rFiles,
- const OUString& rSourceURL, // source dir without trailing '/'
- const OUString& rTargetURL // target dir without trailing '/'
+ std::u16string_view rSourceURL, // source dir without trailing '/'
+ const OUString& rTargetURL // target dir without trailing '/'
)
{
bool bDidPush(false);
@@ -2037,7 +2042,7 @@ namespace comphelper
// process dirs
for (const auto& dir : rDirs)
{
- OUString aNewSourceURL(rSourceURL + "/" + dir);
+ OUString aNewSourceURL(OUString::Concat(rSourceURL) + "/" + dir);
OUString aNewTargetURL(rTargetURL + "/" + dir);
std::set< OUString > aNewDirs;
std::set< std::pair< OUString, OUString > > aNewFiles;
@@ -2067,10 +2072,10 @@ namespace comphelper
}
bool BackupFileHelper::tryPush_file(
- const OUString& rSourceURL, // source dir without trailing '/'
- const OUString& rTargetURL, // target dir without trailing '/'
- const OUString& rName, // filename
- const OUString& rExt // extension (or empty)
+ std::u16string_view rSourceURL, // source dir without trailing '/'
+ std::u16string_view rTargetURL, // target dir without trailing '/'
+ std::u16string_view rName, // filename
+ std::u16string_view rExt // extension (or empty)
)
{
const OUString aFileURL(createFileURL(rSourceURL, rName, rExt));
@@ -2099,8 +2104,8 @@ namespace comphelper
bool BackupFileHelper::isPopPossible_files(
const std::set< OUString >& rDirs,
const std::set< std::pair< OUString, OUString > >& rFiles,
- const OUString& rSourceURL, // source dir without trailing '/'
- const OUString& rTargetURL // target dir without trailing '/'
+ std::u16string_view rSourceURL, // source dir without trailing '/'
+ std::u16string_view rTargetURL // target dir without trailing '/'
)
{
bool bPopPossible(false);
@@ -2118,8 +2123,8 @@ namespace comphelper
// process dirs
for (const auto& dir : rDirs)
{
- OUString aNewSourceURL(rSourceURL + "/" + dir);
- OUString aNewTargetURL(rTargetURL + "/" + dir);
+ OUString aNewSourceURL(OUString::Concat(rSourceURL) + "/" + dir);
+ OUString aNewTargetURL(OUString::Concat(rTargetURL) + "/" + dir);
std::set< OUString > aNewDirs;
std::set< std::pair< OUString, OUString > > aNewFiles;
@@ -2142,10 +2147,10 @@ namespace comphelper
}
bool BackupFileHelper::isPopPossible_file(
- const OUString& rSourceURL, // source dir without trailing '/'
- const OUString& rTargetURL, // target dir without trailing '/'
- const OUString& rName, // filename
- const OUString& rExt // extension (or empty)
+ std::u16string_view rSourceURL, // source dir without trailing '/'
+ std::u16string_view rTargetURL, // target dir without trailing '/'
+ std::u16string_view rName, // filename
+ std::u16string_view rExt // extension (or empty)
)
{
const OUString aFileURL(createFileURL(rSourceURL, rName, rExt));
@@ -2166,7 +2171,7 @@ namespace comphelper
bool BackupFileHelper::tryPop_files(
const std::set< OUString >& rDirs,
const std::set< std::pair< OUString, OUString > >& rFiles,
- const OUString& rSourceURL, // source dir without trailing '/'
+ std::u16string_view rSourceURL, // source dir without trailing '/'
const OUString& rTargetURL // target dir without trailing '/'
)
{
@@ -2185,7 +2190,7 @@ namespace comphelper
// process dirs
for (const auto& dir : rDirs)
{
- OUString aNewSourceURL(rSourceURL + "/" + dir);
+ OUString aNewSourceURL(OUString::Concat(rSourceURL) + "/" + dir);
OUString aNewTargetURL(rTargetURL + "/" + dir);
std::set< OUString > aNewDirs;
std::set< std::pair< OUString, OUString > > aNewFiles;
@@ -2215,10 +2220,10 @@ namespace comphelper
}
bool BackupFileHelper::tryPop_file(
- const OUString& rSourceURL, // source dir without trailing '/'
- const OUString& rTargetURL, // target dir without trailing '/'
- const OUString& rName, // filename
- const OUString& rExt // extension (or empty)
+ std::u16string_view rSourceURL, // source dir without trailing '/'
+ std::u16string_view rTargetURL, // target dir without trailing '/'
+ std::u16string_view rName, // filename
+ std::u16string_view rExt // extension (or empty)
)
{
const OUString aFileURL(createFileURL(rSourceURL, rName, rExt));
@@ -2268,7 +2273,7 @@ namespace comphelper
/////////////////// ExtensionInfo helpers ///////////////////////
bool BackupFileHelper::tryPush_extensionInfo(
- const OUString& rTargetURL // target dir without trailing '/'
+ std::u16string_view rTargetURL // target dir without trailing '/'
)
{
ExtensionInfo aExtensionInfo;
@@ -2278,7 +2283,7 @@ namespace comphelper
// create current configuration and write to temp file - it exists until deleted
if (aExtensionInfo.createTempFile(aTempURL))
{
- const OUString aPackURL(createPackURL(rTargetURL, "ExtensionInfo"));
+ const OUString aPackURL(createPackURL(rTargetURL, u"ExtensionInfo"));
PackedFile aPackedFile(aPackURL);
FileSharedPtr aBaseFile = std::make_shared<osl::File>(aTempURL);
@@ -2297,22 +2302,22 @@ namespace comphelper
}
bool BackupFileHelper::isPopPossible_extensionInfo(
- const OUString& rTargetURL // target dir without trailing '/'
+ std::u16string_view rTargetURL // target dir without trailing '/'
)
{
// extensionInfo always exists internally, no test needed
- const OUString aPackURL(createPackURL(rTargetURL, "ExtensionInfo"));
+ const OUString aPackURL(createPackURL(rTargetURL, u"ExtensionInfo"));
PackedFile aPackedFile(aPackURL);
return !aPackedFile.empty();
}
bool BackupFileHelper::tryPop_extensionInfo(
- const OUString& rTargetURL // target dir without trailing '/'
+ std::u16string_view rTargetURL // target dir without trailing '/'
)
{
// extensionInfo always exists internally, no test needed
- const OUString aPackURL(createPackURL(rTargetURL, "ExtensionInfo"));
+ const OUString aPackURL(createPackURL(rTargetURL, u"ExtensionInfo"));
PackedFile aPackedFile(aPackURL);
if (!aPackedFile.empty())
diff --git a/comphelper/source/misc/configuration.cxx b/comphelper/source/misc/configuration.cxx
index a4041de4bb54..56b186dea805 100644
--- a/comphelper/source/misc/configuration.cxx
+++ b/comphelper/source/misc/configuration.cxx
@@ -11,6 +11,7 @@
#include <cassert>
#include <memory>
+#include <string_view>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/configuration/ReadOnlyAccess.hpp>
@@ -53,14 +54,14 @@ OUString getDefaultLocale(
getLocale()).getBcp47(false);
}
-OUString extendLocalizedPath(OUString const & path, OUString const & locale) {
+OUString extendLocalizedPath(std::u16string_view path, OUString const & locale) {
SAL_WARN_IF(
locale.match("*"), "comphelper",
"Locale \"" << locale << "\" starts with \"*\"");
assert(locale.indexOf('&') == -1);
assert(locale.indexOf('"') == -1);
assert(locale.indexOf('\'') == -1);
- return path + "/['*" + locale + "']";
+ return OUString::Concat(path) + "/['*" + locale + "']";
}
}
@@ -145,7 +146,7 @@ void comphelper::detail::ConfigurationWrapper::setPropertyValue(
css::uno::Any
comphelper::detail::ConfigurationWrapper::getLocalizedPropertyValue(
- OUString const & path) const
+ std::u16string_view path) const
{
return access_->getByHierarchicalName(
extendLocalizedPath(path, getDefaultLocale(context_)));
diff --git a/comphelper/source/property/propertystatecontainer.cxx b/comphelper/source/property/propertystatecontainer.cxx
index 35598b262a68..e19e78733689 100644
--- a/comphelper/source/property/propertystatecontainer.cxx
+++ b/comphelper/source/property/propertystatecontainer.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <comphelper/propertystatecontainer.hxx>
@@ -30,13 +34,13 @@ namespace comphelper
namespace
{
- OUString lcl_getUnknownPropertyErrorMessage( const OUString& _rPropertyName )
+ OUString lcl_getUnknownPropertyErrorMessage( std::u16string_view _rPropertyName )
{
// TODO: perhaps it's time to think about resources in the comphelper module?
// Would be nice to have localized exception strings (a simply resource file containing
// strings only would suffice, and could be realized with a UNO service, so we do not
// need the dependency to the Tools project)
- return "The property \"" + _rPropertyName + "\" is unknown.";
+ return OUString::Concat("The property \"") + _rPropertyName + "\" is unknown.";
}
}
diff --git a/comphelper/source/xml/ofopxmlhelper.cxx b/comphelper/source/xml/ofopxmlhelper.cxx
index 3bf5984f9d83..2da35bdd0a3a 100644
--- a/comphelper/source/xml/ofopxmlhelper.cxx
+++ b/comphelper/source/xml/ofopxmlhelper.cxx
@@ -79,10 +79,10 @@ static uno::Sequence<uno::Sequence< beans::StringPair>> ReadSequence_Impl(
uno::Sequence< uno::Sequence< beans::StringPair > > ReadRelationsInfoSequence(
const uno::Reference< io::XInputStream >& xInStream,
- const OUString & aStreamName,
+ std::u16string_view aStreamName,
const uno::Reference< uno::XComponentContext >& rContext )
{
- OUString aStringID = "_rels/" + aStreamName;
+ OUString aStringID = OUString::Concat("_rels/") + aStreamName;
return ReadSequence_Impl( xInStream, aStringID, RELATIONINFO_FORMAT, rContext );
}
diff --git a/compilerplugins/clang/stringviewparam.cxx b/compilerplugins/clang/stringviewparam.cxx
index 2ef18f75cf60..9d3aac5fed0a 100644
--- a/compilerplugins/clang/stringviewparam.cxx
+++ b/compilerplugins/clang/stringviewparam.cxx
@@ -172,7 +172,8 @@ SmallVector<DeclRefExpr const*, 2> wrap(DeclRefExpr const* expr)
SmallVector<DeclRefExpr const*, 2> relevantCXXOperatorCallExpr(CXXOperatorCallExpr const* expr)
{
- if (expr->getOperator() == OO_Subscript)
+ auto const op = expr->getOperator();
+ if (op == OO_Subscript)
{
auto const e = expr->getArg(0);
if (relevantStringType(e->getType()) == StringType::None)
@@ -181,7 +182,7 @@ SmallVector<DeclRefExpr const*, 2> relevantCXXOperatorCallExpr(CXXOperatorCallEx
}
return wrap(relevantDeclRefExpr(e));
}
- if (compat::isComparisonOp(expr))
+ if (compat::isComparisonOp(expr) || (op == OO_Plus && expr->getNumArgs() == 2))
{
SmallVector<DeclRefExpr const*, 2> v;
if (auto const e = relevantDeclRefExpr(expr->getArg(0)))
diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
index cd1fceddb2ef..65bc00da9517 100644
--- a/configmgr/source/components.cxx
+++ b/configmgr/source/components.cxx
@@ -855,8 +855,8 @@ void Components::parseXcsXcuIniLayer(
}
}
-void Components::parseResLayer(int layer, OUString const & url) {
- OUString resUrl(url + "/res");
+void Components::parseResLayer(int layer, std::u16string_view url) {
+ OUString resUrl(OUString::Concat(url) + "/res");
parseXcdFiles(layer, resUrl);
parseFiles(layer, ".xcu", &parseXcuFile, resUrl, false);
}
diff --git a/configmgr/source/components.hxx b/configmgr/source/components.hxx
index 0647002f0d15..a44097810015 100644
--- a/configmgr/source/components.hxx
+++ b/configmgr/source/components.hxx
@@ -22,6 +22,7 @@
#include <sal/config.h>
#include <set>
+#include <string_view>
#include <com/sun/star/beans/Optional.hpp>
#include <com/sun/star/uno/Reference.hxx>
@@ -131,7 +132,7 @@ private:
void parseXcsXcuIniLayer(
int layer, OUString const & url, bool recordAdditions);
- void parseResLayer(int layer, OUString const & url);
+ void parseResLayer(int layer, std::u16string_view url);
void parseModificationLayer(int layer, OUString const & url);
diff --git a/configmgr/source/writemodfile.cxx b/configmgr/source/writemodfile.cxx
index 04da5f9a50ab..759959ab3bb7 100644
--- a/configmgr/source/writemodfile.cxx
+++ b/configmgr/source/writemodfile.cxx
@@ -401,7 +401,7 @@ struct PairEntrySorter
void writeModifications(
Components & components, TempFile &handle,
- OUString const & parentPathRepresentation,
+ std::u16string_view parentPathRepresentation,
rtl::Reference< Node > const & parent, OUString const & nodeName,
rtl::Reference< Node > const & node,
Modifications::Node const & modifications)
@@ -448,7 +448,7 @@ void writeModifications(
} else {
assert(node.is());
OUString pathRep(
- parentPathRepresentation + "/" +
+ OUString::Concat(parentPathRepresentation) + "/" +
Data::createSegment(node->getTemplateName(), nodeName));
// copy configmgr::Modifications::Node's to a sortable list. Use pointers
@@ -627,7 +627,7 @@ void writeModFile(
for (const auto& j : ModNodePairEntryVector)
{
writeModifications(
- components, tmp, "", rtl::Reference< Node >(), j->first,
+ components, tmp, u"", rtl::Reference< Node >(), j->first,
data.getComponents().findNode(Data::NO_LAYER, j->first),
j->second);
}
diff --git a/configmgr/source/xcuparser.cxx b/configmgr/source/xcuparser.cxx
index 03e3c60ab067..af21518abd78 100644
--- a/configmgr/source/xcuparser.cxx
+++ b/configmgr/source/xcuparser.cxx
@@ -651,7 +651,7 @@ void XcuParser::handleUnknownGroupProp(
void XcuParser::handlePlainGroupProp(
xmlreader::XmlReader const & reader, GroupNode * group,
- NodeMap::iterator const & propertyIndex, OUString const & name,
+ NodeMap::iterator const & propertyIndex, std::u16string_view name,
Type type, Operation operation, bool finalized)
{
PropertyNode * property = static_cast< PropertyNode * >(
@@ -672,7 +672,7 @@ void XcuParser::handlePlainGroupProp(
type != property->getStaticType())
{
throw css::uno::RuntimeException(
- "invalid type for prop " + name + " in " + reader.getUrl());
+ OUString::Concat("invalid type for prop ") + name + " in " + reader.getUrl());
}
valueParser_.type_ = type == TYPE_ERROR ? property->getStaticType() : type;
switch (operation) {
@@ -685,7 +685,7 @@ void XcuParser::handlePlainGroupProp(
case OPERATION_REMOVE:
if (!property->isExtension()) {
throw css::uno::RuntimeException(
- "invalid remove of non-extension prop " + name + " in " +
+ OUString::Concat("invalid remove of non-extension prop ") + name + " in " +
reader.getUrl());
}
group->getMembers().erase(propertyIndex);
diff --git a/configmgr/source/xcuparser.hxx b/configmgr/source/xcuparser.hxx
index 9bec6a26081a..cf6fb3e91b2d 100644
--- a/configmgr/source/xcuparser.hxx
+++ b/configmgr/source/xcuparser.hxx
@@ -23,6 +23,7 @@
#include <set>
#include <stack>
+#include <string_view>
#include <rtl/ref.hxx>
#include <rtl/ustring.hxx>
@@ -89,7 +90,7 @@ private:
void handlePlainGroupProp(
xmlreader::XmlReader const & reader, GroupNode * group,
- NodeMap::iterator const & propertyIndex, OUString const & name,
+ NodeMap::iterator const & propertyIndex, std::u16string_view name,
Type type, Operation operation, bool finalized);
void handleLocalizedGroupProp(
diff --git a/connectivity/qa/connectivity/ado/DriverTest.cxx b/connectivity/qa/connectivity/ado/DriverTest.cxx
index f4dd0ebc2791..1be8c04c7fb5 100644
--- a/connectivity/qa/connectivity/ado/DriverTest.cxx
+++ b/connectivity/qa/connectivity/ado/DriverTest.cxx
@@ -62,7 +62,7 @@ void AdoDriverTest::setUp()
CPPUNIT_ASSERT_MESSAGE("no ado component!", m_xAdoComponent.is());
OUString url = "sdbc:ado:access:PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" +
- m_directories.getPathFromWorkdir("/CppunitTest/TS001018407.mdb");
+ m_directories.getPathFromWorkdir(u"/CppunitTest/TS001018407.mdb");
Sequence< PropertyValue > info;
Reference< XDriver> xDriver(m_xAdoComponent, UNO_QUERY);
diff --git a/connectivity/source/commontools/TColumnsHelper.cxx b/connectivity/source/commontools/TColumnsHelper.cxx
index f06393778953..8671df0b042f 100644
--- a/connectivity/source/commontools/TColumnsHelper.cxx
+++ b/connectivity/source/commontools/TColumnsHelper.cxx
@@ -84,7 +84,7 @@ sdbcx::ObjectType OColumnsHelper::createObject(const OUString& _rName)
if ( aFind == m_pImpl->m_aColumnInfo.end() ) // we have to fill it
{
OUString sComposedName = ::dbtools::composeTableNameForSelect( xConnection, m_pTable );
- collectColumnInformation(xConnection,sComposedName,"*" ,m_pImpl->m_aColumnInfo);
+ collectColumnInformation(xConnection,sComposedName,u"*" ,m_pImpl->m_aColumnInfo);
aFind = m_pImpl->m_aColumnInfo.find(_rName);
}
if ( aFind != m_pImpl->m_aColumnInfo.end() )
diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx
index db6e81a7400a..a57ca9749770 100644
--- a/connectivity/source/commontools/dbtools2.cxx
+++ b/connectivity/source/commontools/dbtools2.cxx
@@ -798,11 +798,11 @@ sal_Int32 getTablePrivileges(const Reference< XDatabaseMetaData>& _xMetaData,
// we need some more information about the column
void collectColumnInformation(const Reference< XConnection>& _xConnection,
- const OUString& _sComposedName,
- const OUString& _rName,
+ std::u16string_view _sComposedName,
+ std::u16string_view _rName,
ColumnInformationMap& _rInfo)
{
- OUString sSelect = "SELECT " + _rName +
+ OUString sSelect = OUString::Concat("SELECT ") + _rName +
" FROM " + _sComposedName +
" WHERE 0 = 1";
diff --git a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
index d06e7cc71985..fdea4e4026eb 100644
--- a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
+++ b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
@@ -1475,7 +1475,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getImportedKeys(
return ODatabaseMetaData::lcl_getKeys(true, table);
}
-uno::Reference< XResultSet > ODatabaseMetaData::lcl_getKeys(const bool& bIsImport, const OUString& table )
+uno::Reference< XResultSet > ODatabaseMetaData::lcl_getKeys(const bool& bIsImport, std::u16string_view table )
{
ODatabaseMetaDataResultSet* pResultSet = new
ODatabaseMetaDataResultSet(ODatabaseMetaDataResultSet::eImportedKeys);
@@ -1506,9 +1506,9 @@ uno::Reference< XResultSet > ODatabaseMetaData::lcl_getKeys(const bool& bIsImpor
"ON FOREI.RDB$INDEX_NAME = FOREIGN_INDEX.RDB$INDEX_NAME "
"WHERE FOREI.RDB$CONSTRAINT_TYPE = 'FOREIGN KEY' ";
if (bIsImport)
- sSQL += "AND FOREI.RDB$RELATION_NAME = '"+ table +"'";
+ sSQL += OUString::Concat("AND FOREI.RDB$RELATION_NAME = '")+ table +"'";
else
- sSQL += "AND PRIM.RDB$RELATION_NAME = '"+ table +"'";
+ sSQL += OUString::Concat("AND PRIM.RDB$RELATION_NAME = '")+ table +"'";
uno::Reference< XResultSet > rs = statement->executeQuery(sSQL);
uno::Reference< XRow > xRow( rs, UNO_QUERY_THROW );
diff --git a/connectivity/source/drivers/firebird/DatabaseMetaData.hxx b/connectivity/source/drivers/firebird/DatabaseMetaData.hxx
index ccad90f3925f..fda5bb31bc88 100644
--- a/connectivity/source/drivers/firebird/DatabaseMetaData.hxx
+++ b/connectivity/source/drivers/firebird/DatabaseMetaData.hxx
@@ -20,6 +20,10 @@
#ifndef INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_FIREBIRD_DATABASEMETADATA_HXX
#define INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_FIREBIRD_DATABASEMETADATA_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include "Connection.hxx"
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
@@ -38,7 +42,7 @@ namespace connectivity::firebird
{
::rtl::Reference<Connection> m_pConnection;
private:
- css::uno::Reference< css::sdbc::XResultSet > lcl_getKeys( const bool& bIsImport, const OUString& table );
+ css::uno::Reference< css::sdbc::XResultSet > lcl_getKeys( const bool& bIsImport, std::u16string_view table );
public:
explicit ODatabaseMetaData(Connection* _pCon);
diff --git a/connectivity/source/drivers/firebird/Table.cxx b/connectivity/source/drivers/firebird/Table.cxx
index e0eba9d7e264..02718c78e731 100644
--- a/connectivity/source/drivers/firebird/Table.cxx
+++ b/connectivity/source/drivers/firebird/Table.cxx
@@ -254,7 +254,7 @@ uno::Sequence< Type > SAL_CALL Table::getTypes()
return OTableHelper::getTypes();
}
-OUString Table::getAlterTableColumn(const OUString& rColumn)
+OUString Table::getAlterTableColumn(std::u16string_view rColumn)
{
return ("ALTER TABLE \"" + getName() + "\" ALTER COLUMN \"" + rColumn + "\" ");
}
diff --git a/connectivity/source/drivers/firebird/Table.hxx b/connectivity/source/drivers/firebird/Table.hxx
index 8cf0ff53f90d..d2646dcd168d 100644
--- a/connectivity/source/drivers/firebird/Table.hxx
+++ b/connectivity/source/drivers/firebird/Table.hxx
@@ -10,6 +10,10 @@
#ifndef INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_FIREBIRD_TABLE_HXX
#define INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_FIREBIRD_TABLE_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include "Tables.hxx"
#include <connectivity/TTableHelper.hxx>
@@ -31,7 +35,7 @@ namespace connectivity::firebird
* Get the ALTER TABLE [TABLE] ALTER [COLUMN] String.
* Includes a trailing space.
*/
- OUString getAlterTableColumn(const OUString& rColumn);
+ OUString getAlterTableColumn(std::u16string_view rColumn);
protected:
void construct() override;
diff --git a/connectivity/source/drivers/hsqldb/HTable.cxx b/connectivity/source/drivers/hsqldb/HTable.cxx
index f8dee57c510c..0049ff919fc3 100644
--- a/connectivity/source/drivers/hsqldb/HTable.cxx
+++ b/connectivity/source/drivers/hsqldb/HTable.cxx
@@ -269,7 +269,7 @@ void OHSQLTable::alterColumnType(sal_Int32 nNewType,const OUString& _rColName, c
executeStatement(sSql);
}
-void OHSQLTable::alterDefaultValue(const OUString& _sNewDefault,const OUString& _rColName)
+void OHSQLTable::alterDefaultValue(std::u16string_view _sNewDefault,const OUString& _rColName)
{
const OUString sQuote = getMetaData()->getIdentifierQuoteString( );
OUString sSql = getAlterTableColumnPart() +
diff --git a/connectivity/source/drivers/mysql_jdbc/YTable.cxx b/connectivity/source/drivers/mysql_jdbc/YTable.cxx
index 79da47723258..374825d32abb 100644
--- a/connectivity/source/drivers/mysql_jdbc/YTable.cxx
+++ b/connectivity/source/drivers/mysql_jdbc/YTable.cxx
@@ -281,7 +281,7 @@ void OMySQLTable::alterColumnType(sal_Int32 nNewType, const OUString& _rColName,
OUString OMySQLTable::getTypeCreatePattern() const { return "(M,D)"; }
-void OMySQLTable::alterDefaultValue(const OUString& _sNewDefault, const OUString& _rColName)
+void OMySQLTable::alterDefaultValue(std::u16string_view _sNewDefault, const OUString& _rColName)
{
const OUString sQuote = getMetaData()->getIdentifierQuoteString();
OUString sSql = getAlterTableColumnPart() + " ALTER " + ::dbtools::quoteName(sQuote, _rColName)
diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
index 22130ed7c6d8..07e0e85815c1 100644
--- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
+++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
@@ -65,6 +65,8 @@
************************************************************************/
#include <algorithm>
+#include <string_view>
+
#include <sal/log.hxx>
#include "pq_databasemetadata.hxx"
#include "pq_driver.hxx"
@@ -2162,12 +2164,12 @@ namespace
return ret;
}
- OUString construct_full_typename(const OUString &ns, const OUString &tn)
+ OUString construct_full_typename(std::u16string_view ns, const OUString &tn)
{
- if(ns.isEmpty() || ns == "pg_catalog")
+ if(ns.empty() || ns == u"pg_catalog")
return tn;
else
- return ns + "." + tn;
+ return OUString::Concat(ns) + "." + tn;
}
void pgTypeInfo2ResultSet(
diff --git a/connectivity/source/drivers/postgresql/pq_statement.cxx b/connectivity/source/drivers/postgresql/pq_statement.cxx
index ff3b05dc8190..946d25b0c91e 100644
--- a/connectivity/source/drivers/postgresql/pq_statement.cxx
+++ b/connectivity/source/drivers/postgresql/pq_statement.cxx
@@ -210,7 +210,7 @@ void Statement::close( )
}
void Statement::raiseSQLException(
- const OUString & sql, const char * errorMsg )
+ std::u16string_view sql, const char * errorMsg )
{
OUString error = "pq_driver: "
+ OUString( errorMsg, strlen(errorMsg), ConnectionSettings::encoding )
diff --git a/connectivity/source/drivers/postgresql/pq_statement.hxx b/connectivity/source/drivers/postgresql/pq_statement.hxx
index 8e93c07b7125..6f9fb3bb1ecc 100644
--- a/connectivity/source/drivers/postgresql/pq_statement.hxx
+++ b/connectivity/source/drivers/postgresql/pq_statement.hxx
@@ -36,6 +36,11 @@
#ifndef INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_POSTGRESQL_PQ_STATEMENT_HXX
#define INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_POSTGRESQL_PQ_STATEMENT_HXX
+
+#include <sal/config.h>
+
+#include <string_view>
+
#include <cppuhelper/propshlp.hxx>
#include <cppuhelper/compbase.hxx>
#include <cppuhelper/component.hxx>
@@ -161,7 +166,7 @@ private:
/// @throws css::uno::RuntimeException
void checkClosed();
/// @throws css::sdbc::SQLException
- void raiseSQLException( const OUString & sql, const char * errorMsg );
+ void raiseSQLException( std::u16string_view sql, const char * errorMsg );
};
diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx
index 543f042f921e..1bb089a5407a 100644
--- a/connectivity/source/drivers/postgresql/pq_tools.cxx
+++ b/connectivity/source/drivers/postgresql/pq_tools.cxx
@@ -87,9 +87,9 @@ using com::sun::star::container::XEnumerationAccess;
namespace pq_sdbc_driver
{
-OUString concatQualified( const OUString & a, const OUString &b)
+OUString concatQualified( std::u16string_view a, std::u16string_view b)
{
- return a + "." + b;
+ return OUString::Concat(a) + "." + b;
}
static OString iOUStringToOString( std::u16string_view str, ConnectionSettings const *settings) {
diff --git a/connectivity/source/drivers/postgresql/pq_tools.hxx b/connectivity/source/drivers/postgresql/pq_tools.hxx
index 18b105870705..6d11e9b40425 100644
--- a/connectivity/source/drivers/postgresql/pq_tools.hxx
+++ b/connectivity/source/drivers/postgresql/pq_tools.hxx
@@ -63,7 +63,7 @@ namespace pq_sdbc_driver
{
bool isWhitespace( sal_Unicode c );
-OUString concatQualified( const OUString & a, const OUString &b);
+OUString concatQualified( std::u16string_view a, std::u16string_view b);
OString OUStringToOString( std::u16string_view str, ConnectionSettings const *settings);
diff --git a/connectivity/source/inc/hsqldb/HTable.hxx b/connectivity/source/inc/hsqldb/HTable.hxx
index 455a048110fa..ff947cbf484c 100644
--- a/connectivity/source/inc/hsqldb/HTable.hxx
+++ b/connectivity/source/inc/hsqldb/HTable.hxx
@@ -20,6 +20,10 @@
#ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_HSQLDB_HTABLE_HXX
#define INCLUDED_CONNECTIVITY_SOURCE_INC_HSQLDB_HTABLE_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include <connectivity/TTableHelper.hxx>
#include <comphelper/IdPropArrayHelper.hxx>
@@ -102,7 +106,7 @@ namespace connectivity::hsqldb
// some methods to alter table structures
void alterColumnType(sal_Int32 nNewType,const OUString& _rColName,const css::uno::Reference< css::beans::XPropertySet >& _xDescriptor);
- void alterDefaultValue(const OUString& _sNewDefault,const OUString& _rColName);
+ void alterDefaultValue(std::u16string_view _sNewDefault,const OUString& _rColName);
void dropDefaultValue(const OUString& _sNewDefault);
};
diff --git a/connectivity/source/inc/mysql/YTable.hxx b/connectivity/source/inc/mysql/YTable.hxx
index a971a9f9c8f1..7df10ead2af3 100644
--- a/connectivity/source/inc/mysql/YTable.hxx
+++ b/connectivity/source/inc/mysql/YTable.hxx
@@ -20,6 +20,10 @@
#ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_MYSQL_YTABLE_HXX
#define INCLUDED_CONNECTIVITY_SOURCE_INC_MYSQL_YTABLE_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include <connectivity/TTableHelper.hxx>
#include <comphelper/IdPropArrayHelper.hxx>
@@ -101,7 +105,7 @@ namespace connectivity::mysql
// some methods to alter table structures
void alterColumnType(sal_Int32 nNewType,const OUString& _rColName,const css::uno::Reference< css::beans::XPropertySet >& _xDescriptor);
- void alterDefaultValue(const OUString& _sNewDefault,const OUString& _rColName);
+ void alterDefaultValue(std::u16string_view _sNewDefault,const OUString& _rColName);
void dropDefaultValue(const OUString& _sNewDefault);
virtual OUString getTypeCreatePattern() const override;
diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx
index 544d14e6491a..77c1306d699d 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -55,6 +55,8 @@
#include <algorithm>
#include <functional>
#include <memory>
+#include <string_view>
+
#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
@@ -104,7 +106,7 @@ namespace
@return
The quoted string.
*/
- OUString SetQuotation(const OUString& rValue, const OUString& rQuot, const OUString& rQuotToReplace)
+ OUString SetQuotation(std::u16string_view rValue, const OUString& rQuot, const OUString& rQuotToReplace)
{
OUString rNewValue = rQuot + rValue;
sal_Int32 nIndex = sal_Int32(-1); // Replace quotes with double quotes or the parser gets into problems
diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx
index 93a6a1bb588f..03dbc99eafcc 100644
--- a/cppu/source/uno/lbenv.cxx
+++ b/cppu/source/uno/lbenv.cxx
@@ -118,7 +118,7 @@ struct EnvironmentsData
~EnvironmentsData();
void getEnvironment(
- uno_Environment ** ppEnv, const OUString & rEnvDcp, void * pContext );
+ uno_Environment ** ppEnv, std::u16string_view rEnvDcp, void * pContext );
void registerEnvironment( uno_Environment ** ppEnv );
void getRegisteredEnvironments(
uno_Environment *** pppEnvs, sal_Int32 * pnLen,
@@ -908,7 +908,7 @@ EnvironmentsData::~EnvironmentsData()
void EnvironmentsData::getEnvironment(
- uno_Environment ** ppEnv, const OUString & rEnvDcp, void * pContext )
+ uno_Environment ** ppEnv, std::u16string_view rEnvDcp, void * pContext )
{
if (*ppEnv)
{
diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx
index 070f1edd966b..d7eff0b74cf6 100644
--- a/cppuhelper/source/servicemanager.cxx
+++ b/cppuhelper/source/servicemanager.cxx
@@ -1466,7 +1466,7 @@ bool cppuhelper::ServiceManager::readLegacyRdbFile(OUString const & uri) {
}
OUString cppuhelper::ServiceManager::readLegacyRdbString(
- OUString const & uri, RegistryKey & key, OUString const & path)
+ std::u16string_view uri, RegistryKey & key, OUString const & path)
{
RegistryKey subkey;
RegValueType t;
@@ -1477,7 +1477,7 @@ OUString cppuhelper::ServiceManager::readLegacyRdbString(
|| s == 0 || s > o3tl::make_unsigned(SAL_MAX_INT32))
{
throw css::uno::DeploymentException(
- "Failure reading legacy rdb file " + uri,
+ OUString::Concat("Failure reading legacy rdb file ") + uri,
static_cast< cppu::OWeakObject * >(this));
}
OUString val;
@@ -1492,14 +1492,14 @@ OUString cppuhelper::ServiceManager::readLegacyRdbString(
| RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR)))
{
throw css::uno::DeploymentException(
- "Failure reading legacy rdb file " + uri,
+ OUString::Concat("Failure reading legacy rdb file ") + uri,
static_cast< cppu::OWeakObject * >(this));
}
return val;
}
void cppuhelper::ServiceManager::readLegacyRdbStrings(
- OUString const & uri, RegistryKey & key, OUString const & path,
+ std::u16string_view uri, RegistryKey & key, OUString const & path,
std::vector< OUString > * strings)
{
assert(strings != nullptr);
@@ -1511,14 +1511,14 @@ void cppuhelper::ServiceManager::readLegacyRdbStrings(
return;
default:
throw css::uno::DeploymentException(
- "Failure reading legacy rdb file " + uri,
+ OUString::Concat("Failure reading legacy rdb file ") + uri,
static_cast< cppu::OWeakObject * >(this));
}
OUString prefix(subkey.getName() + "/");
RegistryKeyNames names;
if (subkey.getKeyNames(OUString(), names) != RegError::NO_ERROR) {
throw css::uno::DeploymentException(
- "Failure reading legacy rdb file " + uri,
+ OUString::Concat("Failure reading legacy rdb file ") + uri,
static_cast< cppu::OWeakObject * >(this));
}
for (sal_uInt32 i = 0; i != names.getLength(); ++i) {
diff --git a/cppuhelper/source/servicemanager.hxx b/cppuhelper/source/servicemanager.hxx
index 24a7e56a4ba9..f6a505492be8 100644
--- a/cppuhelper/source/servicemanager.hxx
+++ b/cppuhelper/source/servicemanager.hxx
@@ -14,6 +14,7 @@
#include <cassert>
#include <map>
#include <memory>
+#include <string_view>
#include <vector>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -321,11 +322,11 @@ private:
bool readLegacyRdbFile(OUString const & uri);
OUString readLegacyRdbString(
- OUString const & uri, RegistryKey & key,
+ std::u16string_view uri, RegistryKey & key,
OUString const & path);
void readLegacyRdbStrings(
- OUString const & uri, RegistryKey & key,
+ std::u16string_view uri, RegistryKey & key,
OUString const & path, std::vector< OUString > * strings);
void insertRdbFiles(
diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx
index 89ce8b8554db..b0a938a4abac 100644
--- a/cppuhelper/source/shlib.cxx
+++ b/cppuhelper/source/shlib.cxx
@@ -21,6 +21,7 @@
#include <cassert>
#include <cstdlib>
+#include <string_view>
#include <com/sun/star/loader/CannotActivateFactoryException.hpp>
#include <com/sun/star/registry/CannotRegisterImplementationException.hpp>
@@ -112,8 +113,8 @@ extern "C" void getFactory(va_list * args) {
css::uno::Reference<css::uno::XInterface> invokeComponentFactory(
css::uno::Environment const & source, css::uno::Environment const & target,
- component_getFactoryFunc function, OUString const & uri,
- OUString const & implementation,
+ component_getFactoryFunc function, std::u16string_view uri,
+ std::u16string_view implementation,
css::uno::Reference<css::lang::XMultiServiceFactory> const & serviceManager)
{
if (!(source.is() && target.is())) {
@@ -147,7 +148,7 @@ css::uno::Reference<css::uno::XInterface> invokeComponentFactory(
}
if (factory == nullptr) {
throw css::loader::CannotActivateFactoryException(
- ("calling factory function for \"" + implementation + "\" in <"
+ (OUString::Concat("calling factory function for \"") + implementation + "\" in <"
+ uri + "> returned null"),
css::uno::Reference<css::uno::XInterface>());
}
diff --git a/cui/qa/unit/cui-dialogs-test.cxx b/cui/qa/unit/cui-dialogs-test.cxx
index 85f6b5f55bbf..f4f73facbaa6 100644
--- a/cui/qa/unit/cui-dialogs-test.cxx
+++ b/cui/qa/unit/cui-dialogs-test.cxx
@@ -91,7 +91,7 @@ void CuiDialogsTest::openAnyDialog()
initialize();
/// process input file containing the UXMLDescriptions of the dialogs to dump
- processDialogBatchFile("cui/qa/unit/data/cui-dialogs-test.txt");
+ processDialogBatchFile(u"cui/qa/unit/data/cui-dialogs-test.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(CuiDialogsTest);
diff --git a/cui/qa/unit/cui-dialogs-test_2.cxx b/cui/qa/unit/cui-dialogs-test_2.cxx
index 2f9b07f7d465..5d98650fd84a 100644
--- a/cui/qa/unit/cui-dialogs-test_2.cxx
+++ b/cui/qa/unit/cui-dialogs-test_2.cxx
@@ -48,7 +48,7 @@ VclPtr<VclAbstractDialog> CuiDialogsTest2::createDialogByID(sal_uInt32 /*nID*/)
void CuiDialogsTest2::openAnyDialog()
{
/// process input file containing the UXMLDescriptions of the dialogs to dump
- processDialogBatchFile("cui/qa/unit/data/cui-dialogs-test_2.txt");
+ processDialogBatchFile(u"cui/qa/unit/data/cui-dialogs-test_2.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(CuiDialogsTest2);
diff --git a/cui/qa/unit/cui-dialogs-test_3.cxx b/cui/qa/unit/cui-dialogs-test_3.cxx
index 9c3a09a8d240..ebd194885415 100644
--- a/cui/qa/unit/cui-dialogs-test_3.cxx
+++ b/cui/qa/unit/cui-dialogs-test_3.cxx
@@ -48,7 +48,7 @@ VclPtr<VclAbstractDialog> CuiDialogsTest3::createDialogByID(sal_uInt32 /*nID*/)
void CuiDialogsTest3::openAnyDialog()
{
/// process input file containing the UXMLDescriptions of the dialogs to dump
- processDialogBatchFile("cui/qa/unit/data/cui-dialogs-test_3.txt");
+ processDialogBatchFile(u"cui/qa/unit/data/cui-dialogs-test_3.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(CuiDialogsTest3);
diff --git a/cui/qa/unit/cui-dialogs-test_4.cxx b/cui/qa/unit/cui-dialogs-test_4.cxx
index 11820389968c..157ffa8b3765 100644
--- a/cui/qa/unit/cui-dialogs-test_4.cxx
+++ b/cui/qa/unit/cui-dialogs-test_4.cxx
@@ -48,7 +48,7 @@ VclPtr<VclAbstractDialog> CuiDialogsTest4::createDialogByID(sal_uInt32 /*nID*/)
void CuiDialogsTest4::openAnyDialog()
{
/// process input file containing the UXMLDescriptions of the dialogs to dump
- processDialogBatchFile("cui/qa/unit/data/cui-dialogs-test_4.txt");
+ processDialogBatchFile(u"cui/qa/unit/data/cui-dialogs-test_4.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(CuiDialogsTest4);
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 3d786af57553..0988fca71feb 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -1355,13 +1355,13 @@ void SvxConfigPage::ReloadTopLevelListBox( SvxConfigEntry const * pToSelect )
}
void SvxConfigPage::AddSubMenusToUI(
- const OUString& rBaseTitle, SvxConfigEntry const * pParentData )
+ std::u16string_view rBaseTitle, SvxConfigEntry const * pParentData )
{
for (auto const& entryData : *pParentData->GetEntries())
{
if (entryData->IsPopup())
{
- OUString subMenuTitle = rBaseTitle + aMenuSeparatorStr + SvxConfigPageHelper::stripHotKey(entryData->GetName());
+ OUString subMenuTitle = OUString::Concat(rBaseTitle) + aMenuSeparatorStr + SvxConfigPageHelper::stripHotKey(entryData->GetName());
OUString sId(OUString::number(reinterpret_cast<sal_Int64>(entryData)));
m_xTopLevelListBox->append(sId, subMenuTitle);
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index e538bc25bcee..6c81c18fb573 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -76,9 +76,10 @@ const char CMDURL_FPART_ONLY [] = "FamilyName:string=";
const OUStringLiteral STYLEPROP_UINAME = u"DisplayName";
-OUString SfxStylesInfo_Impl::generateCommand(const OUString& sFamily, const OUString& sStyle)
+OUString SfxStylesInfo_Impl::generateCommand(
+ std::u16string_view sFamily, std::u16string_view sStyle)
{
- return ".uno:StyleApply?Style:string="
+ return OUString::Concat(".uno:StyleApply?Style:string=")
+ sStyle
+ "&FamilyName:string="
+ sFamily;
@@ -999,10 +1000,10 @@ void CuiConfigGroupListBox::SelectMacro( const SfxMacroInfoItem *pItem )
pItem->GetQualifiedName() );
}
-void CuiConfigGroupListBox::SelectMacro( const OUString& rBasic,
+void CuiConfigGroupListBox::SelectMacro( std::u16string_view rBasic,
const OUString& rMacro )
{
- const OUString aBasicName(rBasic + " " + xImp->m_sMacros);
+ const OUString aBasicName(OUString::Concat(rBasic) + " " + xImp->m_sMacros);
sal_Int32 nIdx {rMacro.lastIndexOf('.')};
const OUString aMethod( rMacro.copy(nIdx+1) );
OUString aLib;
diff --git a/cui/source/dialogs/SignatureLineDialogBase.cxx b/cui/source/dialogs/SignatureLineDialogBase.cxx
index d824e85e8e3e..4e591124bc44 100644
--- a/cui/source/dialogs/SignatureLineDialogBase.cxx
+++ b/cui/source/dialogs/SignatureLineDialogBase.cxx
@@ -32,9 +32,9 @@ short SignatureLineDialogBase::run()
return nRet;
}
-OUString SignatureLineDialogBase::getCDataString(const OUString& rString)
+OUString SignatureLineDialogBase::getCDataString(std::u16string_view rString)
{
- return "<![CDATA[" + rString + "]]>";
+ return OUString::Concat("<![CDATA[") + rString + "]]>";
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 76abb324b583..eae624c7e0db 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -645,12 +645,12 @@ std::unique_ptr<SfxTabPage> TPGalleryThemeProperties::Create(weld::Container* pP
return std::make_unique<TPGalleryThemeProperties>(pPage, pController, *rSet);
}
-OUString TPGalleryThemeProperties::addExtension( const OUString& _rDisplayText, const OUString& _rExtension )
+OUString TPGalleryThemeProperties::addExtension( const OUString& _rDisplayText, std::u16string_view _rExtension )
{
OUString sRet = _rDisplayText;
if ( sRet.indexOf( "(*.*)" ) == -1 )
{
- sRet += " (" + _rExtension + ")";
+ sRet += OUString::Concat(" (") + _rExtension + ")";
}
return sRet;
}
diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx
index b96c1dd85fbf..fe9f2e065bf3 100644
--- a/cui/source/dialogs/postdlg.cxx
+++ b/cui/source/dialogs/postdlg.cxx
@@ -110,9 +110,9 @@ SvxPostItDialog::~SvxPostItDialog()
{
}
-void SvxPostItDialog::ShowLastAuthor(const OUString& rAuthor, const OUString& rDate)
+void SvxPostItDialog::ShowLastAuthor(std::u16string_view rAuthor, std::u16string_view rDate)
{
- OUString sTxt = rAuthor + ", " + rDate;
+ OUString sTxt = OUString::Concat(rAuthor) + ", " + rDate;
m_xLastEditFT->set_label( sTxt );
}
diff --git a/cui/source/dialogs/screenshotannotationdlg.cxx b/cui/source/dialogs/screenshotannotationdlg.cxx
index 676dda6bca55..fd378f7686f1 100644
--- a/cui/source/dialogs/screenshotannotationdlg.cxx
+++ b/cui/source/dialogs/screenshotannotationdlg.cxx
@@ -49,7 +49,7 @@ using namespace com::sun::star;
namespace
{
- OUString lcl_genRandom( const OUString &rId )
+ OUString lcl_genRandom( std::u16string_view rId )
{
//FIXME: plus timestamp
unsigned int nRand = comphelper::rng::uniform_uint_distribution(0, 0xFFFF);
@@ -62,7 +62,7 @@ namespace
OUString aTempl("<alt id=\"%1\">"
" " //FIXME real dialog title or something
"</alt>");
- aTempl = aTempl.replaceFirst( "%1", lcl_genRandom("alt_id") );
+ aTempl = aTempl.replaceFirst( "%1", lcl_genRandom(u"alt_id") );
return aTempl;
}
@@ -73,7 +73,7 @@ namespace
" width=\"%3cm\" height=\"%4cm\">"
"%5"
"</image>");
- aTempl = aTempl.replaceFirst( "%1", lcl_genRandom("img_id") );
+ aTempl = aTempl.replaceFirst( "%1", lcl_genRandom(u"img_id") );
aTempl = aTempl.replaceFirst( "%2", rScreenshotId );
aTempl = aTempl.replaceFirst( "%3", OUString::number( rSize.Width() ) );
aTempl = aTempl.replaceFirst( "%4", OUString::number( rSize.Height() ) );
@@ -86,7 +86,7 @@ namespace
{
OUString aTempl( "<paragraph id=\"%1\" role=\"paragraph\">%2"
"</paragraph>" SAL_NEWLINE_STRING );
- aTempl = aTempl.replaceFirst( "%1", lcl_genRandom("par_id") );
+ aTempl = aTempl.replaceFirst( "%1", lcl_genRandom(u"par_id") );
aTempl = aTempl.replaceFirst( "%2", lcl_Image(rScreenshotId, rSize) );
return aTempl;
@@ -98,7 +98,7 @@ namespace
"<bookmark branch=\"hid/%2\" id=\"%3\" localize=\"false\"/>" SAL_NEWLINE_STRING;
aTempl = aTempl.replaceFirst( "%1", rWidgetId );
aTempl = aTempl.replaceFirst( "%2", rWidgetId );
- aTempl = aTempl.replaceFirst( "%3", lcl_genRandom("bm_id") );
+ aTempl = aTempl.replaceFirst( "%3", lcl_genRandom(u"bm_id") );
return aTempl;
}
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index cb7d8776dcbd..824aaa0c81d8 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -18,6 +18,7 @@
*/
#include <memory>
+#include <string_view>
#include <utility>
#include <sfx2/objsh.hxx>
@@ -1106,8 +1107,8 @@ OUString FormatErrorString(
const OUString& language,
const OUString& script,
const OUString& line,
- const OUString& type,
- const OUString& message )
+ std::u16string_view type,
+ std::u16string_view message )
{
OUString result = unformatted.copy( 0 );
@@ -1115,12 +1116,12 @@ OUString FormatErrorString(
result = ReplaceString(result, "%SCRIPTNAME", script );
result = ReplaceString(result, "%LINENUMBER", line );
- if ( !type.isEmpty() )
+ if ( !type.empty() )
{
result += "\n\n" + CuiResId(RID_SVXSTR_ERROR_TYPE_LABEL) + " " + type;
}
- if ( !message.isEmpty() )
+ if ( !message.empty() )
{
result += "\n\n" + CuiResId(RID_SVXSTR_ERROR_MESSAGE_LABEL) + " " + message;
}
@@ -1164,7 +1165,7 @@ OUString GetErrorMessage(
}
return FormatErrorString(
- unformatted, language, script, line, "", message );
+ unformatted, language, script, line, u"", message );
}
OUString GetErrorMessage(
@@ -1243,7 +1244,7 @@ OUString GetErrorMessage(
message = sError.Message;
}
return FormatErrorString(
- unformatted, language, script, OUString(), OUString(), message );
+ unformatted, language, script, OUString(), std::u16string_view(), message );
}
OUString GetErrorMessage( const css::uno::Any& aException )
diff --git a/cui/source/inc/SignatureLineDialogBase.hxx b/cui/source/inc/SignatureLineDialogBase.hxx
index 2fe0e95d1fec..3cc645819be8 100644
--- a/cui/source/inc/SignatureLineDialogBase.hxx
+++ b/cui/source/inc/SignatureLineDialogBase.hxx
@@ -8,6 +8,10 @@
*/
#pragma once
+#include <sal/config.h>
+
+#include <string_view>
+
#include <vcl/weld.hxx>
#include <com/sun/star/frame/XModel.hpp>
@@ -24,7 +28,7 @@ public:
protected:
css::uno::Reference<css::frame::XModel> m_xModel;
virtual void Apply() = 0;
- static OUString getCDataString(const OUString& rString);
+ static OUString getCDataString(std::u16string_view rString);
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx
index 4fd7fb801ebc..32e19e3bd774 100644
--- a/cui/source/inc/cfg.hxx
+++ b/cui/source/inc/cfg.hxx
@@ -34,6 +34,7 @@
#include <sfx2/tabdlg.hxx>
#include <memory>
+#include <string_view>
#include <vector>
#include "cfgutil.hxx"
@@ -446,7 +447,7 @@ protected:
int AppendEntry(SvxConfigEntry* pNewEntryData,
int nTarget);
- void AddSubMenusToUI( const OUString& rBaseTitle,
+ void AddSubMenusToUI( std::u16string_view rBaseTitle,
SvxConfigEntry const * pParentData );
void InsertEntryIntoUI(SvxConfigEntry* pNewEntryData,
diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx
index 8187d5e14314..bd4e8e8e2d76 100644
--- a/cui/source/inc/cfgutil.hxx
+++ b/cui/source/inc/cfgutil.hxx
@@ -20,6 +20,8 @@
#include <vector>
#include <memory>
+#include <string_view>
+
#include <rtl/ustring.hxx>
#include <com/sun/star/frame/DispatchInformation.hpp>
@@ -70,7 +72,7 @@ public:
std::vector< SfxStyleInfo_Impl > getStyleFamilies() const;
std::vector< SfxStyleInfo_Impl > getStyles(const OUString& sFamily);
- static OUString generateCommand(const OUString& sFamily, const OUString& sStyle);
+ static OUString generateCommand(std::u16string_view sFamily, std::u16string_view sStyle);
};
enum class SfxCfgKind
@@ -223,7 +225,7 @@ public:
{ m_pFunctionListBox = pBox; }
void GroupSelected();
void SelectMacro(const SfxMacroInfoItem*);
- void SelectMacro(const OUString&, const OUString&);
+ void SelectMacro(std::u16string_view, const OUString&);
void SetStylesInfo(SfxStylesInfo_Impl* pStyles);
};
diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx
index c89acbfc1294..4a20724ffd81 100644
--- a/cui/source/inc/cuigaldlg.hxx
+++ b/cui/source/inc/cuigaldlg.hxx
@@ -30,6 +30,8 @@
#include <com/sun/star/media/XPlayer.hpp>
#include <com/sun/star/ui/dialogs/XFolderPicker2.hpp>
#include <svtools/dialogclosedlistener.hxx>
+
+#include <string_view>
#include <vector>
class GalleryTheme;
@@ -241,7 +243,7 @@ class TPGalleryThemeProperties : public SfxTabPage
virtual void Reset( const SfxItemSet* /*rSet*/ ) override {}
virtual bool FillItemSet( SfxItemSet* /*rSet*/ ) override { return true; }
- static OUString addExtension( const OUString&, const OUString& );
+ static OUString addExtension( const OUString&, std::u16string_view );
void FillFilterList();
void SearchFiles();
diff --git a/cui/source/inc/postdlg.hxx b/cui/source/inc/postdlg.hxx
index 206dbdb181bf..b294fbcc77df 100644
--- a/cui/source/inc/postdlg.hxx
+++ b/cui/source/inc/postdlg.hxx
@@ -18,6 +18,10 @@
*/
#pragma once
+#include <sal/config.h>
+
+#include <string_view>
+
#include <sfx2/basedlgs.hxx>
// class SvxPostItDialog -------------------------------------------------
@@ -57,7 +61,7 @@ public:
{
m_xEditED->set_text(rTxt);
}
- void ShowLastAuthor(const OUString& rAuthor, const OUString& rDate);
+ void ShowLastAuthor(std::u16string_view rAuthor, std::u16string_view rDate);
void DontChangeAuthor()
{
m_xAuthorBtn->set_sensitive(false);
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 74b6f408d249..f2d54205db5c 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <svl/eitem.hxx>
#include <svl/intitem.hxx>
#include "optsave.hxx"
@@ -44,7 +48,7 @@ using namespace com::sun::star::beans;
using namespace com::sun::star::container;
using namespace comphelper;
-#define CFG_PAGE_AND_GROUP "General", "LoadSave"
+#define CFG_PAGE_AND_GROUP u"General", u"LoadSave"
struct SvxSaveTabPage_Impl
@@ -191,13 +195,13 @@ void SvxSaveTabPage::DetectHiddenControls()
{
SvtOptionsDialogOptions aOptionsDlgOpt;
- if ( aOptionsDlgOpt.IsOptionHidden( "Backup", CFG_PAGE_AND_GROUP ) )
+ if ( aOptionsDlgOpt.IsOptionHidden( u"Backup", CFG_PAGE_AND_GROUP ) )
{
// hide controls of "Backup"
m_xBackupCB->hide();
}
- if ( aOptionsDlgOpt.IsOptionHidden( "AutoSave", CFG_PAGE_AND_GROUP ) )
+ if ( aOptionsDlgOpt.IsOptionHidden( u"AutoSave", CFG_PAGE_AND_GROUP ) )
{
// hide controls of "AutoSave"
m_xAutoSaveCB->hide();
@@ -205,7 +209,7 @@ void SvxSaveTabPage::DetectHiddenControls()
m_xMinuteFT->hide();
}
- if ( aOptionsDlgOpt.IsOptionHidden( "UserAutoSave", CFG_PAGE_AND_GROUP ) )
+ if ( aOptionsDlgOpt.IsOptionHidden( u"UserAutoSave", CFG_PAGE_AND_GROUP ) )
{
// hide controls of "UserAutoSave"
m_xUserAutoSaveCB->hide();
@@ -485,7 +489,7 @@ IMPL_LINK(SvxSaveTabPage, AutoClickHdl_Impl, weld::Button&, rBox, void)
}
}
-static OUString lcl_ExtracUIName(const Sequence<PropertyValue> &rProperties, const OUString& rExtension)
+static OUString lcl_ExtracUIName(const Sequence<PropertyValue> &rProperties, std::u16string_view rExtension)
{
OUString sName;
const PropertyValue* pPropVal = rProperties.getConstArray();
@@ -498,7 +502,7 @@ static OUString lcl_ExtracUIName(const Sequence<PropertyValue> &rProperties, con
OUString sUIName;
if ( ( pPropVal->Value >>= sUIName ) && sUIName.getLength() )
{
- if (!rExtension.isEmpty())
+ if (!rExtension.empty())
{
return sUIName + " (" + rExtension + ")";
}
diff --git a/dbaccess/qa/extras/dialog-save.cxx b/dbaccess/qa/extras/dialog-save.cxx
index af7b9fda3f8e..5eac41e67041 100644
--- a/dbaccess/qa/extras/dialog-save.cxx
+++ b/dbaccess/qa/extras/dialog-save.cxx
@@ -55,7 +55,7 @@ void DialogSaveTest::test()
// be locked anyway:
SolarMutexReleaser rel;
- const OUString aFileName(m_directories.getURLFromWorkdir("CppunitTest/testDialogSave.odb"));
+ const OUString aFileName(m_directories.getURLFromWorkdir(u"CppunitTest/testDialogSave.odb"));
{
uno::Reference< lang::XComponent > xComponent = loadFromDesktop(aFileName);
CPPUNIT_ASSERT(xComponent.is());
diff --git a/dbaccess/qa/extras/empty-stdlib-save.cxx b/dbaccess/qa/extras/empty-stdlib-save.cxx
index ea9c660a4e87..aa7dd293004f 100644
--- a/dbaccess/qa/extras/empty-stdlib-save.cxx
+++ b/dbaccess/qa/extras/empty-stdlib-save.cxx
@@ -53,7 +53,7 @@ void DialogSaveTest::test()
// be locked anyway:
SolarMutexReleaser rel;
- const OUString aFileName(m_directories.getURLFromWorkdir("CppunitTest/testEmptyStdlibSave.odb"));
+ const OUString aFileName(m_directories.getURLFromWorkdir(u"CppunitTest/testEmptyStdlibSave.odb"));
{
uno::Reference< lang::XComponent > xComponent = loadFromDesktop(aFileName);
CPPUNIT_ASSERT(xComponent.is());
diff --git a/dbaccess/qa/extras/macros-test.cxx b/dbaccess/qa/extras/macros-test.cxx
index 5d65133664b3..e102c75896b3 100644
--- a/dbaccess/qa/extras/macros-test.cxx
+++ b/dbaccess/qa/extras/macros-test.cxx
@@ -35,7 +35,7 @@ DBAccessTest::DBAccessTest()
void DBAccessTest::test()
{
OUString aFileName;
- createFileURL("testdb.odb", aFileName);
+ createFileURL(u"testdb.odb", aFileName);
uno::Reference<lang::XComponent> xComponent = loadFromDesktop(aFileName);
CPPUNIT_ASSERT(xComponent.is());
xComponent->dispose();
diff --git a/dbaccess/qa/extras/nolib-save.cxx b/dbaccess/qa/extras/nolib-save.cxx
index 5914511e6dbe..e191402425f9 100644
--- a/dbaccess/qa/extras/nolib-save.cxx
+++ b/dbaccess/qa/extras/nolib-save.cxx
@@ -53,7 +53,7 @@ void DialogSaveTest::test()
// be locked anyway:
SolarMutexReleaser rel;
- const OUString aFileName(m_directories.getURLFromWorkdir("CppunitTest/testNolibSave.odb"));
+ const OUString aFileName(m_directories.getURLFromWorkdir(u"CppunitTest/testNolibSave.odb"));
{
uno::Reference< lang::XComponent > xComponent = loadFromDesktop(aFileName);
CPPUNIT_ASSERT(xComponent.is());
diff --git a/dbaccess/qa/extras/rowsetclones.cxx b/dbaccess/qa/extras/rowsetclones.cxx
index f62314205be3..d4637c5d8ae6 100644
--- a/dbaccess/qa/extras/rowsetclones.cxx
+++ b/dbaccess/qa/extras/rowsetclones.cxx
@@ -48,7 +48,7 @@ RowSetClones::RowSetClones()
void RowSetClones::test()
{
- const OUString sFilePath(m_directories.getURLFromWorkdir("CppunitTest/RowSetClones.odb"));
+ const OUString sFilePath(m_directories.getURLFromWorkdir(u"CppunitTest/RowSetClones.odb"));
uno::Reference< lang::XComponent > xComponent (loadFromDesktop(sFilePath));
CPPUNIT_ASSERT(xComponent.is());
diff --git a/dbaccess/qa/unit/dbaccess-dialogs-test.cxx b/dbaccess/qa/unit/dbaccess-dialogs-test.cxx
index 49eff86ecd9a..0551b31187a5 100644
--- a/dbaccess/qa/unit/dbaccess-dialogs-test.cxx
+++ b/dbaccess/qa/unit/dbaccess-dialogs-test.cxx
@@ -51,7 +51,7 @@ VclPtr<VclAbstractDialog> DbaccessDialogsTest::createDialogByID(sal_uInt32 /*nID
void DbaccessDialogsTest::openAnyDialog()
{
/// process input file containing the UXMLDescriptions of the dialogs to dump
- processDialogBatchFile("dbaccess/qa/unit/data/dbaccess-dialogs-test.txt");
+ processDialogBatchFile(u"dbaccess/qa/unit/data/dbaccess-dialogs-test.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(DbaccessDialogsTest);
diff --git a/dbaccess/qa/unit/dbtest_base.cxx b/dbaccess/qa/unit/dbtest_base.cxx
index f0b276cbb1ea..caee25fa70ac 100644
--- a/dbaccess/qa/unit/dbtest_base.cxx
+++ b/dbaccess/qa/unit/dbtest_base.cxx
@@ -9,6 +9,8 @@
#include <sal/config.h>
+#include <string_view>
+
#include <cppunit/TestAssert.h>
#include <test/unoapi_test.hxx>
@@ -28,10 +30,10 @@ class DBTestBase
public:
DBTestBase() : UnoApiTest("dbaccess/qa/unit/data") {};
- utl::TempFile createTempCopy(OUString const & pathname);
+ utl::TempFile createTempCopy(std::u16string_view pathname);
uno::Reference< XOfficeDatabaseDocument >
- getDocumentForFileName(const OUString &sFileName);
+ getDocumentForFileName(std::u16string_view sFileName);
uno::Reference<XOfficeDatabaseDocument> getDocumentForUrl(OUString const & url);
@@ -40,7 +42,7 @@ public:
uno::Reference< XOfficeDatabaseDocument > const & xDocument);
};
-utl::TempFile DBTestBase::createTempCopy(OUString const & pathname) {
+utl::TempFile DBTestBase::createTempCopy(std::u16string_view pathname) {
OUString url;
createFileURL(pathname, url);
utl::TempFile tmp;
@@ -56,7 +58,7 @@ utl::TempFile DBTestBase::createTempCopy(OUString const & pathname) {
}
uno::Reference< XOfficeDatabaseDocument >
- DBTestBase::getDocumentForFileName(const OUString &sFileName)
+ DBTestBase::getDocumentForFileName(std::u16string_view sFileName)
{
OUString sFilePath;
createFileURL(sFileName, sFilePath);
diff --git a/dbaccess/qa/unit/embeddeddb_performancetest.cxx b/dbaccess/qa/unit/embeddeddb_performancetest.cxx
index abd72db66fe4..e4119804d3b1 100644
--- a/dbaccess/qa/unit/embeddeddb_performancetest.cxx
+++ b/dbaccess/qa/unit/embeddeddb_performancetest.cxx
@@ -125,7 +125,7 @@ public:
SvFileStream* EmbeddedDBPerformanceTest::getWordListStream()
{
OUString wlPath;
- createFileURL("wordlist", wlPath);
+ createFileURL(u"wordlist", wlPath);
return new SvFileStream(wlPath, StreamMode::READ);
}
diff --git a/dbaccess/qa/unit/firebird-regression.cxx b/dbaccess/qa/unit/firebird-regression.cxx
index faf0a834b9c4..d5c53b93a64d 100644
--- a/dbaccess/qa/unit/firebird-regression.cxx
+++ b/dbaccess/qa/unit/firebird-regression.cxx
@@ -43,7 +43,7 @@ void FirebirdTest::testEmptyDBConnection()
#ifdef OSL_BIGENDIAN
auto const tmp = createTempCopy("firebird_empty_be.odb");
#else
- auto const tmp = createTempCopy("firebird_empty_le.odb");
+ auto const tmp = createTempCopy(u"firebird_empty_le.odb");
#endif
uno::Reference< XOfficeDatabaseDocument > xDocument =
getDocumentForUrl(tmp.GetURL());
@@ -64,7 +64,7 @@ void FirebirdTest::testIntegerDatabase()
getDocumentForFileName("firebird_integer_be_ods12.odb");
#else
uno::Reference< XOfficeDatabaseDocument > xDocument =
- getDocumentForFileName("firebird_integer_le_ods12.odb");
+ getDocumentForFileName(u"firebird_integer_le_ods12.odb");
#endif
uno::Reference< XConnection > xConnection =
diff --git a/dbaccess/qa/unit/firebird.cxx b/dbaccess/qa/unit/firebird.cxx
index 95581332466a..e67a4d10c097 100644
--- a/dbaccess/qa/unit/firebird.cxx
+++ b/dbaccess/qa/unit/firebird.cxx
@@ -40,7 +40,7 @@ public:
*/
void FirebirdTest::testEmptyDBConnection()
{
- auto const tmp = createTempCopy("firebird_empty.odb");
+ auto const tmp = createTempCopy(u"firebird_empty.odb");
uno::Reference< XOfficeDatabaseDocument > xDocument =
getDocumentForUrl(tmp.GetURL());
@@ -56,7 +56,7 @@ void FirebirdTest::testEmptyDBConnection()
void FirebirdTest::testIntegerDatabase()
{
uno::Reference< XOfficeDatabaseDocument > xDocument =
- getDocumentForFileName("firebird_integer_ods12.odb");
+ getDocumentForFileName(u"firebird_integer_ods12.odb");
uno::Reference< XConnection > xConnection =
getConnectionForDocument(xDocument);
diff --git a/dbaccess/qa/unit/hsql_binary_import.cxx b/dbaccess/qa/unit/hsql_binary_import.cxx
index 842e03e74621..4eac0cdc4130 100644
--- a/dbaccess/qa/unit/hsql_binary_import.cxx
+++ b/dbaccess/qa/unit/hsql_binary_import.cxx
@@ -46,7 +46,7 @@ void HsqlBinaryImportTest::testBinaryImport()
}
// the migration requires the file to be writable
- utl::TempFile const temp(createTempCopy("hsqldb_migration_test.odb"));
+ utl::TempFile const temp(createTempCopy(u"hsqldb_migration_test.odb"));
uno::Reference<XOfficeDatabaseDocument> const xDocument = getDocumentForUrl(temp.GetURL());
uno::Reference<XConnection> xConnection = getConnectionForDocument(xDocument);
diff --git a/dbaccess/qa/unit/hsqldb.cxx b/dbaccess/qa/unit/hsqldb.cxx
index 0e3c2494bc5b..5ee011af276e 100644
--- a/dbaccess/qa/unit/hsqldb.cxx
+++ b/dbaccess/qa/unit/hsqldb.cxx
@@ -32,7 +32,7 @@ public:
*/
void HSQLDBTest::testEmptyDBConnection()
{
- auto const file = createTempCopy("hsqldb_empty.odb");
+ auto const file = createTempCopy(u"hsqldb_empty.odb");
uno::Reference<XOfficeDatabaseDocument> xDocument = getDocumentForUrl(file.GetURL());
getConnectionForDocument(xDocument);
diff --git a/dbaccess/qa/unit/tdf119625.cxx b/dbaccess/qa/unit/tdf119625.cxx
index 632089f94e9e..22fb5849305e 100644
--- a/dbaccess/qa/unit/tdf119625.cxx
+++ b/dbaccess/qa/unit/tdf119625.cxx
@@ -66,7 +66,7 @@ void Tdf119625Test::testTime()
}
// the migration requires the file to be writable
- utl::TempFile const temp(createTempCopy("tdf119625.odb"));
+ utl::TempFile const temp(createTempCopy(u"tdf119625.odb"));
uno::Reference<XOfficeDatabaseDocument> const xDocument = getDocumentForUrl(temp.GetURL());
uno::Reference<XConnection> xConnection = getConnectionForDocument(xDocument);
diff --git a/dbaccess/qa/unit/tdf126268.cxx b/dbaccess/qa/unit/tdf126268.cxx
index 5cba7c1923f7..a4ed9dc3b868 100644
--- a/dbaccess/qa/unit/tdf126268.cxx
+++ b/dbaccess/qa/unit/tdf126268.cxx
@@ -60,7 +60,7 @@ void Tdf126268Test::testNumbers()
}
// the migration requires the file to be writable
- utl::TempFile const temp(createTempCopy("tdf126268.odb"));
+ utl::TempFile const temp(createTempCopy(u"tdf126268.odb"));
uno::Reference<XOfficeDatabaseDocument> const xDocument = getDocumentForUrl(temp.GetURL());
uno::Reference<XConnection> xConnection = getConnectionForDocument(xDocument);
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index 21c1ff0ef9a7..e61259bf61b1 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -18,6 +18,8 @@
*/
#include <memory>
+#include <string_view>
+
#include "KeySet.hxx"
#include <sal/log.hxx>
#include <core_resource.hxx>
@@ -209,13 +211,13 @@ void OKeySet::findTableColumnsMatching_throw( const Any& i_aTable,
namespace
{
- void appendOneKeyColumnClause( const OUString &tblName, const OUString &colName, const connectivity::ORowSetValue &_rValue, OUStringBuffer &o_buf )
+ void appendOneKeyColumnClause( std::u16string_view tblName, const OUString &colName, const connectivity::ORowSetValue &_rValue, OUStringBuffer &o_buf )
{
OUString fullName;
- if (tblName.isEmpty())
+ if (tblName.empty())
fullName = colName;
else
- fullName = tblName + "." + colName;
+ fullName = OUString::Concat(tblName) + "." + colName;
if ( _rValue.isNull() )
{
o_buf.append(fullName).append(" IS NULL ");
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index 6ca83d6d9879..f3f401b3cb99 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -611,7 +611,7 @@ void SAL_CALL OSingleSelectQueryComposer::setElementaryQuery( const OUString& _r
namespace
{
OUString getComposedClause( const OUString& _rElementaryClause, const OUString& _rAdditionalClause,
- TokenComposer& _rComposer, const OUString& _rKeyword )
+ TokenComposer& _rComposer, std::u16string_view _rKeyword )
{
_rComposer.clear();
_rComposer.append( _rElementaryClause );
diff --git a/dbaccess/source/filter/hsqldb/parseschema.cxx b/dbaccess/source/filter/hsqldb/parseschema.cxx
index e1d794cdca8b..3e615428f2d4 100644
--- a/dbaccess/source/filter/hsqldb/parseschema.cxx
+++ b/dbaccess/source/filter/hsqldb/parseschema.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include "parseschema.hxx"
#include "fbcreateparser.hxx"
#include "fbalterparser.hxx"
@@ -89,9 +93,9 @@ public:
}
};
-OUString lcl_createAlterForeign(const OUString& sForeignPart, const OUString& sTableName)
+OUString lcl_createAlterForeign(std::u16string_view sForeignPart, std::u16string_view sTableName)
{
- return "ALTER TABLE " + sTableName + " ADD " + sForeignPart;
+ return OUString::Concat("ALTER TABLE ") + sTableName + " ADD " + sForeignPart;
}
} // anonymous namespace
diff --git a/dbaccess/source/ui/app/DocumentInfoPreview.cxx b/dbaccess/source/ui/app/DocumentInfoPreview.cxx
index d112c7fb0427..d00a77899572 100644
--- a/dbaccess/source/ui/app/DocumentInfoPreview.cxx
+++ b/dbaccess/source/ui/app/DocumentInfoPreview.cxx
@@ -117,13 +117,13 @@ namespace
}
void ODocumentInfoPreview::insertEntry(
- OUString const & title, OUString const & value)
+ std::u16string_view title, OUString const & value)
{
if (!m_xEditEngine->GetText().isEmpty()) {
m_xEditEngine->QuickInsertText("\n\n", InsertAtEnd(*m_xEditEngine));
}
- OUString caption(title + ":\n");
+ OUString caption(OUString::Concat(title) + ":\n");
m_xEditEngine->QuickInsertText(caption, InsertAtEnd(*m_xEditEngine));
SfxItemSet aSet(m_xEditEngine->GetEmptyItemSet());
diff --git a/dbaccess/source/ui/app/DocumentInfoPreview.hxx b/dbaccess/source/ui/app/DocumentInfoPreview.hxx
index 9fb69af4d0f3..0c9548d0a759 100644
--- a/dbaccess/source/ui/app/DocumentInfoPreview.hxx
+++ b/dbaccess/source/ui/app/DocumentInfoPreview.hxx
@@ -20,6 +20,9 @@
#pragma once
#include <sal/config.h>
+
+#include <string_view>
+
#include <svx/weldeditview.hxx>
namespace com :: sun :: star :: uno { template <typename > class Reference; }
@@ -44,7 +47,7 @@ public:
void fill(css::uno::Reference< css::document::XDocumentProperties > const & xDocProps);
private:
- void insertEntry(OUString const & title, OUString const & value);
+ void insertEntry(std::u16string_view title, OUString const & value);
void insertNonempty(tools::Long id, OUString const & value);
diff --git a/dbaccess/source/ui/dlg/directsql.cxx b/dbaccess/source/ui/dlg/directsql.cxx
index ffd174ba1d29..fc8191707c44 100644
--- a/dbaccess/source/ui/dlg/directsql.cxx
+++ b/dbaccess/source/ui/dlg/directsql.cxx
@@ -194,7 +194,8 @@ namespace dbaui
display(xRS);
}
else
- addOutputText(OUString::number(xMR->getUpdateCount()) + " rows updated\n");
+ addOutputText(
+ OUString(OUString::number(xMR->getUpdateCount()) + " rows updated\n"));
for (;;)
{
hasRS = xMR->getMoreResults();
@@ -219,7 +220,7 @@ namespace dbaui
else
{
sal_Int32 resultCount = xStatement->executeUpdate(_rStatement);
- addOutputText(OUString::number(resultCount) + " rows updated\n");
+ addOutputText(OUString(OUString::number(resultCount) + " rows updated\n"));
}
}
// successful
@@ -270,7 +271,7 @@ namespace dbaui
}
}
- void DirectSQLDialog::addStatusText(const OUString& _rMessage)
+ void DirectSQLDialog::addStatusText(std::u16string_view _rMessage)
{
OUString sAppendMessage = OUString::number(m_nStatusCount++) + ": " + _rMessage + "\n\n";
@@ -280,9 +281,9 @@ namespace dbaui
m_xStatus->select_region(sCompleteMessage.getLength(), sCompleteMessage.getLength());
}
- void DirectSQLDialog::addOutputText(const OUString& _rMessage)
+ void DirectSQLDialog::addOutputText(std::u16string_view _rMessage)
{
- OUString sAppendMessage = _rMessage + "\n";
+ OUString sAppendMessage = OUString::Concat(_rMessage) + "\n";
OUString sCompleteMessage = m_xOutput->get_text() + sAppendMessage;
m_xOutput->set_text(sCompleteMessage);
diff --git a/dbaccess/source/ui/inc/directsql.hxx b/dbaccess/source/ui/inc/directsql.hxx
index b67ad6d264fc..b9f419d9a686 100644
--- a/dbaccess/source/ui/inc/directsql.hxx
+++ b/dbaccess/source/ui/inc/directsql.hxx
@@ -24,6 +24,7 @@
#include <sal/log.hxx>
#include <vcl/weld.hxx>
#include <deque>
+#include <string_view>
#include <com/sun/star/sdbc/XConnection.hpp>
#include <unotools/eventlisteneradapter.hxx>
@@ -94,10 +95,10 @@ namespace dbaui
void implExecuteStatement(const OUString& _rStatement);
/// adds a status text to the status list
- void addStatusText(const OUString& _rMessage);
+ void addStatusText(std::u16string_view _rMessage);
/// adds a status text to the output list
- void addOutputText(const OUString& _rMessage);
+ void addOutputText(std::u16string_view _rMessage);
/// displays resultset
void display(const css::uno::Reference< css::sdbc::XResultSet >& xRS);
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index b8aa3f7c4b81..e2f338b30737 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -49,6 +49,7 @@
#include <unotools/syslocale.hxx>
#include <memory>
#include <set>
+#include <string_view>
using namespace ::dbaui;
using namespace ::utl;
@@ -368,7 +369,7 @@ namespace
}
OUString BuildJoin( const Reference< XConnection>& _xConnection,
const OUString& rLh,
- const OUString& rRh,
+ std::u16string_view rRh,
const OQueryTableConnectionData* pData)
{
@@ -395,7 +396,7 @@ namespace
aErg += " FULL OUTER ";
break;
}
- aErg += "JOIN " + rRh;
+ aErg += OUString::Concat("JOIN ") + rRh;
if ( CROSS_JOIN != pData->GetJoinType() && !pData->isNatural() )
{
aErg += " ON " + BuildJoinCriteria(_xConnection,&pData->GetConnLineDataList(),pData);
diff --git a/desktop/inc/app.hxx b/desktop/inc/app.hxx
index 26e4691ab53c..e2ecf5920aa0 100644
--- a/desktop/inc/app.hxx
+++ b/desktop/inc/app.hxx
@@ -29,6 +29,7 @@
#include <com/sun/star/uno/Reference.h>
#include <memory>
+#include <string_view>
#include <thread>
namespace com::sun::star::uno { class XComponentContext; }
@@ -135,7 +136,7 @@ class Desktop final : public Application
static void FlushConfiguration();
static bool InitializeQuickstartMode( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
- static void HandleBootstrapPathErrors( ::utl::Bootstrap::Status, const OUString& aMsg );
+ static void HandleBootstrapPathErrors( ::utl::Bootstrap::Status, std::u16string_view aMsg );
// Create an error message depending on bootstrap failure code and an optional file url
static OUString CreateErrorMsgString( utl::Bootstrap::FailureCode nFailureCode,
diff --git a/desktop/inc/lib/init.hxx b/desktop/inc/lib/init.hxx
index 84d9d5299fd4..e47c92cc5c0a 100644
--- a/desktop/inc/lib/init.hxx
+++ b/desktop/inc/lib/init.hxx
@@ -13,6 +13,7 @@
#include <unordered_map>
#include <memory>
#include <mutex>
+#include <string_view>
#include <boost/property_tree/ptree.hpp>
#include <boost/variant.hpp>
@@ -177,7 +178,7 @@ namespace desktop {
/// Helper function to extract the value from parameters delimited by
/// comma, like: Name1=Value1,Name2=Value2,Name3=Value3.
/// @param rOptions When extracted, the Param=Value is removed from it.
- DESKTOP_DLLPUBLIC OUString extractParameter(OUString& aOptions, const OUString& rName);
+ DESKTOP_DLLPUBLIC OUString extractParameter(OUString& aOptions, std::u16string_view rName);
/// Helper function to convert JSON to a vector of PropertyValues.
/// Public to be unit-test-able.
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 82586de384b1..99fba50f14bb 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -8,6 +8,8 @@
*/
#include <memory>
+#include <string_view>
+
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/text/XTextDocument.hpp>
@@ -94,7 +96,8 @@ public:
{
}
- void readFileIntoByteVector(OUString const & sFilename, std::vector<sal_uInt8> & rByteVector);
+ void readFileIntoByteVector(
+ std::u16string_view sFilename, std::vector<sal_uInt8> & rByteVector);
virtual void setUp() override
{
@@ -696,7 +699,7 @@ void DesktopLOKTest::testPasteWriterJPEG()
LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
OUString aFileURL;
- createFileURL("paste.jpg", aFileURL);
+ createFileURL(u"paste.jpg", aFileURL);
std::ifstream aImageStream(aFileURL.toUtf8().copy(strlen("file://")).getStr());
std::vector<char> aImageContents((std::istreambuf_iterator<char>(aImageStream)), std::istreambuf_iterator<char>());
@@ -2418,32 +2421,32 @@ void DesktopLOKTest::testRunMacro()
void DesktopLOKTest::testExtractParameter()
{
OUString aOptions("Language=de-DE");
- OUString aValue = extractParameter(aOptions, "Language");
+ OUString aValue = extractParameter(aOptions, u"Language");
CPPUNIT_ASSERT_EQUAL(OUString("de-DE"), aValue);
CPPUNIT_ASSERT_EQUAL(OUString(), aOptions);
aOptions = "Language=en-US,Something";
- aValue = extractParameter(aOptions, "Language");
+ aValue = extractParameter(aOptions, u"Language");
CPPUNIT_ASSERT_EQUAL(OUString("en-US"), aValue);
CPPUNIT_ASSERT_EQUAL(OUString("Something"), aOptions);
aOptions = "SomethingElse,Language=cs-CZ";
- aValue = extractParameter(aOptions, "Language");
+ aValue = extractParameter(aOptions, u"Language");
CPPUNIT_ASSERT_EQUAL(OUString("cs-CZ"), aValue);
CPPUNIT_ASSERT_EQUAL(OUString("SomethingElse"), aOptions);
aOptions = "Something1,Language=hu-HU,Something2";
- aValue = extractParameter(aOptions, "Language");
+ aValue = extractParameter(aOptions, u"Language");
CPPUNIT_ASSERT_EQUAL(OUString("hu-HU"), aValue);
CPPUNIT_ASSERT_EQUAL(OUString("Something1,Something2"), aOptions);
aOptions = "Something1,Something2=blah,Something3";
- aValue = extractParameter(aOptions, "Language");
+ aValue = extractParameter(aOptions, u"Language");
CPPUNIT_ASSERT_EQUAL(OUString(), aValue);
CPPUNIT_ASSERT_EQUAL(OUString("Something1,Something2=blah,Something3"), aOptions);
}
-void DesktopLOKTest::readFileIntoByteVector(OUString const & sFilename, std::vector<unsigned char> & rByteVector)
+void DesktopLOKTest::readFileIntoByteVector(std::u16string_view sFilename, std::vector<unsigned char> & rByteVector)
{
rByteVector.clear();
OUString aURL;
@@ -2469,14 +2472,14 @@ void DesktopLOKTest::testGetSignatureState_Signed()
std::vector<unsigned char> aCertificate;
{
- readFileIntoByteVector("rootCA.der", aCertificate);
+ readFileIntoByteVector(u"rootCA.der", aCertificate);
bool bResult = pDocument->m_pDocumentClass->addCertificate(
pDocument, aCertificate.data(), int(aCertificate.size()));
CPPUNIT_ASSERT(bResult);
}
{
- readFileIntoByteVector("intermediateRootCA.der", aCertificate);
+ readFileIntoByteVector(u"intermediateRootCA.der", aCertificate);
bool bResult = pDocument->m_pDocumentClass->addCertificate(
pDocument, aCertificate.data(), int(aCertificate.size()));
CPPUNIT_ASSERT(bResult);
@@ -2515,7 +2518,7 @@ void DesktopLOKTest::testInsertCertificate_DER_ODT()
std::vector<unsigned char> aPrivateKey;
{
- readFileIntoByteVector("rootCA.der", aCertificate);
+ readFileIntoByteVector(u"rootCA.der", aCertificate);
bool bResult = pDocument->m_pDocumentClass->addCertificate(
pDocument, aCertificate.data(), int(aCertificate.size()));
@@ -2523,7 +2526,7 @@ void DesktopLOKTest::testInsertCertificate_DER_ODT()
}
{
- readFileIntoByteVector("intermediateRootCA.der", aCertificate);
+ readFileIntoByteVector(u"intermediateRootCA.der", aCertificate);
bool bResult = pDocument->m_pDocumentClass->addCertificate(
pDocument, aCertificate.data(), int(aCertificate.size()));
@@ -2531,8 +2534,8 @@ void DesktopLOKTest::testInsertCertificate_DER_ODT()
}
{
- readFileIntoByteVector("certificate.der", aCertificate);
- readFileIntoByteVector("certificatePrivateKey.der", aPrivateKey);
+ readFileIntoByteVector(u"certificate.der", aCertificate);
+ readFileIntoByteVector(u"certificatePrivateKey.der", aPrivateKey);
bool bResult = pDocument->m_pDocumentClass->insertCertificate(pDocument,
aCertificate.data(), int(aCertificate.size()),
@@ -2565,7 +2568,7 @@ void DesktopLOKTest::testInsertCertificate_PEM_ODT()
std::vector<unsigned char> aPrivateKey;
{
- readFileIntoByteVector("test-cert-chain-1.pem", aCertificate);
+ readFileIntoByteVector(u"test-cert-chain-1.pem", aCertificate);
bool bResult = pDocument->m_pDocumentClass->addCertificate(
pDocument, aCertificate.data(), int(aCertificate.size()));
@@ -2573,7 +2576,7 @@ void DesktopLOKTest::testInsertCertificate_PEM_ODT()
}
{
- readFileIntoByteVector("test-cert-chain-2.pem", aCertificate);
+ readFileIntoByteVector(u"test-cert-chain-2.pem", aCertificate);
bool bResult = pDocument->m_pDocumentClass->addCertificate(
pDocument, aCertificate.data(), int(aCertificate.size()));
@@ -2581,7 +2584,7 @@ void DesktopLOKTest::testInsertCertificate_PEM_ODT()
}
{
- readFileIntoByteVector("test-cert-chain-3.pem", aCertificate);
+ readFileIntoByteVector(u"test-cert-chain-3.pem", aCertificate);
bool bResult = pDocument->m_pDocumentClass->addCertificate(
pDocument, aCertificate.data(), int(aCertificate.size()));
@@ -2589,8 +2592,8 @@ void DesktopLOKTest::testInsertCertificate_PEM_ODT()
}
{
- readFileIntoByteVector("test-cert-signing.pem", aCertificate);
- readFileIntoByteVector("test-PK-signing.pem", aPrivateKey);
+ readFileIntoByteVector(u"test-cert-signing.pem", aCertificate);
+ readFileIntoByteVector(u"test-PK-signing.pem", aPrivateKey);
bool bResult = pDocument->m_pDocumentClass->insertCertificate(pDocument,
aCertificate.data(), int(aCertificate.size()),
@@ -2622,7 +2625,7 @@ void DesktopLOKTest::testInsertCertificate_PEM_DOCX()
std::vector<unsigned char> aPrivateKey;
{
- readFileIntoByteVector("test-cert-chain-1.pem", aCertificate);
+ readFileIntoByteVector(u"test-cert-chain-1.pem", aCertificate);
bool bResult = pDocument->m_pDocumentClass->addCertificate(
pDocument, aCertificate.data(), int(aCertificate.size()));
@@ -2630,7 +2633,7 @@ void DesktopLOKTest::testInsertCertificate_PEM_DOCX()
}
{
- readFileIntoByteVector("test-cert-chain-2.pem", aCertificate);
+ readFileIntoByteVector(u"test-cert-chain-2.pem", aCertificate);
bool bResult = pDocument->m_pDocumentClass->addCertificate(
pDocument, aCertificate.data(), int(aCertificate.size()));
@@ -2638,7 +2641,7 @@ void DesktopLOKTest::testInsertCertificate_PEM_DOCX()
}
{
- readFileIntoByteVector("test-cert-chain-3.pem", aCertificate);
+ readFileIntoByteVector(u"test-cert-chain-3.pem", aCertificate);
bool bResult = pDocument->m_pDocumentClass->addCertificate(
pDocument, aCertificate.data(), int(aCertificate.size()));
@@ -2646,8 +2649,8 @@ void DesktopLOKTest::testInsertCertificate_PEM_DOCX()
}
{
- readFileIntoByteVector("test-cert-signing.pem", aCertificate);
- readFileIntoByteVector("test-PK-signing.pem", aPrivateKey);
+ readFileIntoByteVector(u"test-cert-signing.pem", aCertificate);
+ readFileIntoByteVector(u"test-PK-signing.pem", aPrivateKey);
bool bResult = pDocument->m_pDocumentClass->insertCertificate(pDocument,
aCertificate.data(), int(aCertificate.size()),
@@ -2675,7 +2678,7 @@ void DesktopLOKTest::testSignDocument_PEM_PDF()
std::vector<unsigned char> aPrivateKey;
{
- readFileIntoByteVector("test-cert-chain-1.pem", aCertificate);
+ readFileIntoByteVector(u"test-cert-chain-1.pem", aCertificate);
bool bResult = pDocument->m_pDocumentClass->addCertificate(
pDocument, aCertificate.data(), int(aCertificate.size()));
@@ -2683,7 +2686,7 @@ void DesktopLOKTest::testSignDocument_PEM_PDF()
}
{
- readFileIntoByteVector("test-cert-chain-2.pem", aCertificate);
+ readFileIntoByteVector(u"test-cert-chain-2.pem", aCertificate);
bool bResult = pDocument->m_pDocumentClass->addCertificate(
pDocument, aCertificate.data(), int(aCertificate.size()));
@@ -2691,7 +2694,7 @@ void DesktopLOKTest::testSignDocument_PEM_PDF()
}
{
- readFileIntoByteVector("test-cert-chain-3.pem", aCertificate);
+ readFileIntoByteVector(u"test-cert-chain-3.pem", aCertificate);
bool bResult = pDocument->m_pDocumentClass->addCertificate(
pDocument, aCertificate.data(), int(aCertificate.size()));
@@ -2704,8 +2707,8 @@ void DesktopLOKTest::testSignDocument_PEM_PDF()
Scheduler::ProcessEventsToIdle();
- readFileIntoByteVector("test-cert-signing.pem", aCertificate);
- readFileIntoByteVector("test-PK-signing.pem", aPrivateKey);
+ readFileIntoByteVector(u"test-cert-signing.pem", aCertificate);
+ readFileIntoByteVector(u"test-PK-signing.pem", aPrivateKey);
LibLibreOffice_Impl aOffice;
bool bResult = aOffice.m_pOfficeClass->signDocument(&aOffice, aTempFile.GetURL().toUtf8().getStr(),
@@ -2821,7 +2824,7 @@ void DesktopLOKTest::testComplexSelection()
// Paste an image.
OUString aFileURL;
- createFileURL("paste.jpg", aFileURL);
+ createFileURL(u"paste.jpg", aFileURL);
std::ifstream aImageStream(aFileURL.toUtf8().copy(strlen("file://")).getStr());
std::vector<char> aImageContents((std::istreambuf_iterator<char>(aImageStream)), std::istreambuf_iterator<char>());
CPPUNIT_ASSERT(pDocument->pClass->paste(pDocument, "image/jpeg", aImageContents.data(), aImageContents.size()));
diff --git a/desktop/qa/unit/desktop-dialogs-test.cxx b/desktop/qa/unit/desktop-dialogs-test.cxx
index 54cadc33794c..56c39eb7108a 100644
--- a/desktop/qa/unit/desktop-dialogs-test.cxx
+++ b/desktop/qa/unit/desktop-dialogs-test.cxx
@@ -51,7 +51,7 @@ VclPtr<VclAbstractDialog> DesktopDialogsTest::createDialogByID(sal_uInt32 /*nID*
void DesktopDialogsTest::openAnyDialog()
{
/// process input file containing the UXMLDescriptions of the dialogs to dump
- processDialogBatchFile("desktop/qa/unit/data/desktop-dialogs-test.txt");
+ processDialogBatchFile(u"desktop/qa/unit/data/desktop-dialogs-test.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(DesktopDialogsTest);
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 596e83b14ebf..2f4fcdc6904b 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -28,6 +28,7 @@
#include <sal/config.h>
#include <iostream>
+#include <string_view>
#include <app.hxx>
#include <dp_shared.hxx>
@@ -335,7 +336,7 @@ void RemoveIconCacheDirectory()
namespace {
-OUString MakeStartupErrorMessage(OUString const & aErrorMessage)
+OUString MakeStartupErrorMessage(std::u16string_view aErrorMessage)
{
return DpResId(STR_BOOTSTRAP_ERR_CANNOT_START) + "\n" + aErrorMessage;
}
@@ -597,7 +598,7 @@ void Desktop::Shutdown()
framework::getDesktop(::comphelper::getProcessComponentContext())->shutdown();
}
-void Desktop::HandleBootstrapPathErrors( ::utl::Bootstrap::Status aBootstrapStatus, const OUString& aDiagnosticMessage )
+void Desktop::HandleBootstrapPathErrors( ::utl::Bootstrap::Status aBootstrapStatus, std::u16string_view aDiagnosticMessage )
{
if ( aBootstrapStatus == ::utl::Bootstrap::DATA_OK )
return;
@@ -614,7 +615,7 @@ void Desktop::HandleBootstrapPathErrors( ::utl::Bootstrap::Status aBootstrapStat
if ( !aTemp.isEmpty() )
aProductKey = aTemp;
- OUString const aMessage(aDiagnosticMessage + "\n");
+ OUString const aMessage(OUString::Concat(aDiagnosticMessage) + "\n");
std::unique_ptr<weld::MessageDialog> xBootstrapFailedBox(Application::CreateMessageDialog(nullptr,
VclMessageType::Warning, VclButtonsType::Ok, aMessage));
diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
index bf15f687f0dd..5983313de51b 100644
--- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
@@ -52,6 +52,7 @@
#include <com/sun/star/uno/Sequence.h>
#include <comphelper/anytostring.hxx>
+#include <string_view>
#include <vector>
using dp_misc::StrTitle;
@@ -233,7 +234,7 @@ void UpdateInstallDialog::updateDone()
// make sure the solar mutex is locked before calling
//sets an error message in the text area
void UpdateInstallDialog::setError(INSTALL_ERROR err, std::u16string_view sExtension,
- OUString const & exceptionMessage)
+ std::u16string_view exceptionMessage)
{
OUString sError;
m_bError = true;
@@ -264,7 +265,7 @@ void UpdateInstallDialog::setError(INSTALL_ERROR err, std::u16string_view sExten
sMsg += "\n";
sMsg += sError;
//Insert more information about the error
- if (!exceptionMessage.isEmpty())
+ if (!exceptionMessage.empty())
sMsg += m_sThisErrorOccurred + exceptionMessage + "\n";
sMsg += m_sNoInstall + "\n";
@@ -272,7 +273,7 @@ void UpdateInstallDialog::setError(INSTALL_ERROR err, std::u16string_view sExten
m_xMle_info->set_text(sMsg);
}
-void UpdateInstallDialog::setError(OUString const & exceptionMessage)
+void UpdateInstallDialog::setError(std::u16string_view exceptionMessage)
{
m_bError = true;
m_xMle_info->set_text(m_xMle_info->get_text() + exceptionMessage + "\n");
@@ -493,7 +494,7 @@ void UpdateInstallDialog::Thread::installExtensions()
return;
}
m_dialog.setError(UpdateInstallDialog::ERROR_LICENSE_DECLINED,
- updateData.aInstalledPackage->getDisplayName(), OUString());
+ updateData.aInstalledPackage->getDisplayName(), std::u16string_view());
}
else if (!xExtension.is() || bError)
{
diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx
index 7e970f7b346c..224307f71b30 100644
--- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx
+++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx
@@ -22,6 +22,8 @@
#include <sal/config.h>
#include <vcl/weld.hxx>
#include <rtl/ref.hxx>
+
+#include <string_view>
#include <vector>
/// @HTML
@@ -78,8 +80,8 @@ private:
ERROR_INSTALLATION,
ERROR_LICENSE_DECLINED
};
- void setError(INSTALL_ERROR err, std::u16string_view sExtension, OUString const & exceptionMessage);
- void setError(OUString const & exceptionMessage);
+ void setError(INSTALL_ERROR err, std::u16string_view sExtension, std::u16string_view exceptionMessage);
+ void setError(std::u16string_view exceptionMessage);
const css::uno::Reference< css::deployment::XExtensionManager >& getExtensionManager() const
{ return m_xExtensionManager; }
diff --git a/desktop/source/deployment/gui/license_dialog.cxx b/desktop/source/deployment/gui/license_dialog.cxx
index ef2b64b91101..34fa924b8128 100644
--- a/desktop/source/deployment/gui/license_dialog.cxx
+++ b/desktop/source/deployment/gui/license_dialog.cxx
@@ -29,6 +29,7 @@
#include "license_dialog.hxx"
#include <functional>
+#include <string_view>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -64,7 +65,7 @@ struct LicenseDialogImpl : public weld::GenericDialogController
DECL_LINK(SizeAllocHdl, const Size&, void);
LicenseDialogImpl(weld::Window * pParent,
- const OUString & sExtensionName,
+ std::u16string_view sExtensionName,
const OUString & sLicenseText);
bool IsEndReached() const;
@@ -74,7 +75,7 @@ struct LicenseDialogImpl : public weld::GenericDialogController
LicenseDialogImpl::LicenseDialogImpl(
weld::Window * pParent,
- const OUString & sExtensionName,
+ std::u16string_view sExtensionName,
const OUString & sLicenseText)
: GenericDialogController(pParent, "desktop/ui/licensedialog.ui", "LicenseDialog")
, m_bLicenseRead(false)
diff --git a/desktop/source/deployment/inc/dp_descriptioninfoset.hxx b/desktop/source/deployment/inc/dp_descriptioninfoset.hxx
index 40197f7efb7c..08d533a79d3a 100644
--- a/desktop/source/deployment/inc/dp_descriptioninfoset.hxx
+++ b/desktop/source/deployment/inc/dp_descriptioninfoset.hxx
@@ -22,6 +22,8 @@
#include <sal/config.h>
#include <optional>
+#include <string_view>
+
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <sal/types.h>
@@ -225,7 +227,7 @@ private:
SAL_DLLPRIVATE css::uno::Reference< css::xml::dom::XNode>
matchLanguageTag(
css::uno::Reference< css::xml::dom::XNode > const & xParent,
- OUString const & rTag) const;
+ std::u16string_view rTag) const;
/** If there is no child element with a locale matching the office locale, then we use
the first child. In the case of the simple-license we also use the former default locale, which
@@ -279,7 +281,7 @@ inline bool DescriptionInfoset::hasDescription() const
the description.xml.
*/
DESKTOP_DEPLOYMENTMISC_DLLPUBLIC
-DescriptionInfoset getDescriptionInfoset(OUString const & sExtensionFolderURL);
+DescriptionInfoset getDescriptionInfoset(std::u16string_view sExtensionFolderURL);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/inc/dp_identifier.hxx b/desktop/source/deployment/inc/dp_identifier.hxx
index 85735c659357..bd11170b6a7e 100644
--- a/desktop/source/deployment/inc/dp_identifier.hxx
+++ b/desktop/source/deployment/inc/dp_identifier.hxx
@@ -22,6 +22,8 @@
#include <sal/config.h>
#include <optional>
+#include <string_view>
+
#include <com/sun/star/uno/Reference.hxx>
#include "dp_misc_api.hxx"
@@ -47,7 +49,7 @@ namespace dp_misc {
*/
DESKTOP_DEPLOYMENTMISC_DLLPUBLIC OUString generateIdentifier(
::std::optional< OUString > const & optional,
- OUString const & fileName);
+ std::u16string_view fileName);
/**
Gets the identifier of a package.
@@ -75,7 +77,7 @@ DESKTOP_DEPLOYMENTMISC_DLLPUBLIC OUString getIdentifier(
a legacy identifier based on the given file name
*/
DESKTOP_DEPLOYMENTMISC_DLLPUBLIC OUString generateLegacyIdentifier(
- OUString const & fileName);
+ std::u16string_view fileName);
}
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx
index 62063f81e148..2a17e2d6860c 100644
--- a/desktop/source/deployment/manager/dp_extensionmanager.cxx
+++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx
@@ -54,6 +54,7 @@
#include <vector>
#include <algorithm>
#include <set>
+#include <string_view>
namespace lang = com::sun::star::lang;
namespace task = com::sun::star::task;
@@ -566,7 +567,7 @@ bool ExtensionManager::doChecksForAddExtension(
}
//Prevent showing the license if requested.
Reference<ucb::XCommandEnvironment> _xCmdEnv(xCmdEnv);
- ExtensionProperties props(OUString(), properties, Reference<ucb::XCommandEnvironment>(), m_xContext);
+ ExtensionProperties props(std::u16string_view(), properties, Reference<ucb::XCommandEnvironment>(), m_xContext);
dp_misc::DescriptionInfoset info(dp_misc::getDescriptionInfoset(xTmpExtension->getURL()));
const ::std::optional<dp_misc::SimpleLicenseAttributes> licenseAttributes =
diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx
index 22fd91370f11..5ff55abe6b33 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -974,7 +974,7 @@ Reference<deployment::XPackage> PackageManagerImpl::getDeployedPackage_(
Reference<deployment::XPackage> PackageManagerImpl::getDeployedPackage_(
- OUString const & id, ActivePackages::Data const & data,
+ std::u16string_view id, ActivePackages::Data const & data,
Reference<XCommandEnvironment> const & xCmdEnv, bool ignoreAlienPlatforms )
{
if (ignoreAlienPlatforms)
diff --git a/desktop/source/deployment/manager/dp_manager.h b/desktop/source/deployment/manager/dp_manager.h
index 335099d3215d..ec34461aa6f7 100644
--- a/desktop/source/deployment/manager/dp_manager.h
+++ b/desktop/source/deployment/manager/dp_manager.h
@@ -27,7 +27,7 @@
#include <com/sun/star/deployment/XPackageRegistry.hpp>
#include <com/sun/star/deployment/XPackageManager.hpp>
#include <memory>
-
+#include <string_view>
namespace dp_manager {
@@ -173,7 +173,7 @@ public:
OUString const & id, OUString const & fileName,
css::uno::Reference<css::ucb::XCommandEnvironment> const & xCmdEnv );
css::uno::Reference<css::deployment::XPackage> getDeployedPackage_(
- OUString const & id, ActivePackages::Data const & data,
+ std::u16string_view id, ActivePackages::Data const & data,
css::uno::Reference<css::ucb::XCommandEnvironment> const & xCmdEnv,
bool ignoreAlienPlatforms = false );
virtual css::uno::Reference<css::deployment::XPackage> SAL_CALL
diff --git a/desktop/source/deployment/manager/dp_properties.cxx b/desktop/source/deployment/manager/dp_properties.cxx
index ab5ccc7eb5c7..92d7191111d3 100644
--- a/desktop/source/deployment/manager/dp_properties.cxx
+++ b/desktop/source/deployment/manager/dp_properties.cxx
@@ -41,12 +41,12 @@ namespace dp_manager {
//Reading the file
ExtensionProperties::ExtensionProperties(
- OUString const & urlExtension,
+ std::u16string_view urlExtension,
Reference<ucb::XCommandEnvironment> const & xCmdEnv,
Reference<uno::XComponentContext> const & xContext) :
m_xCmdEnv(xCmdEnv), m_xContext(xContext)
{
- m_propFileUrl = urlExtension + "properties";
+ m_propFileUrl = OUString::Concat(urlExtension) + "properties";
std::vector< std::pair< OUString, OUString> > props;
if (! dp_misc::create_ucb_content(nullptr, m_propFileUrl, nullptr, false))
@@ -64,13 +64,13 @@ ExtensionProperties::ExtensionProperties(
//Writing the file
ExtensionProperties::ExtensionProperties(
- OUString const & urlExtension,
+ std::u16string_view urlExtension,
uno::Sequence<css::beans::NamedValue> const & properties,
Reference<ucb::XCommandEnvironment> const & xCmdEnv,
Reference<uno::XComponentContext> const & xContext) :
m_xCmdEnv(xCmdEnv), m_xContext(xContext)
{
- m_propFileUrl = urlExtension + "properties";
+ m_propFileUrl = OUString::Concat(urlExtension) + "properties";
for (css::beans::NamedValue const & v : properties)
{
diff --git a/desktop/source/deployment/manager/dp_properties.hxx b/desktop/source/deployment/manager/dp_properties.hxx
index d87e2951ccb2..06139ece3c7d 100644
--- a/desktop/source/deployment/manager/dp_properties.hxx
+++ b/desktop/source/deployment/manager/dp_properties.hxx
@@ -23,6 +23,7 @@
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <optional>
+#include <string_view>
namespace dp_manager
{
@@ -37,11 +38,11 @@ class ExtensionProperties final
static OUString getPropertyValue(css::beans::NamedValue const& v);
public:
- ExtensionProperties(OUString const& urlExtension,
+ ExtensionProperties(std::u16string_view urlExtension,
css::uno::Reference<css::ucb::XCommandEnvironment> const& xCmdEnv,
css::uno::Reference<css::uno::XComponentContext> const& xContext);
- ExtensionProperties(OUString const& urlExtension,
+ ExtensionProperties(std::u16string_view urlExtension,
css::uno::Sequence<css::beans::NamedValue> const& properties,
css::uno::Reference<css::ucb::XCommandEnvironment> const& xCmdEnv,
css::uno::Reference<css::uno::XComponentContext> const& xContext);
diff --git a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
index 183434efba24..2db2145070fc 100644
--- a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
+++ b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <dp_descriptioninfoset.hxx>
#include <dp_resource.h>
@@ -118,7 +122,7 @@ public:
*/
ExtensionDescription(
const css::uno::Reference<css::uno::XComponentContext>& xContext,
- const OUString& installDir,
+ std::u16string_view installDir,
const css::uno::Reference< css::ucb::XCommandEnvironment >& xCmdEnv);
const css::uno::Reference<css::xml::dom::XNode>& getRootElement() const
@@ -160,7 +164,7 @@ public:
ExtensionDescription::ExtensionDescription(
const Reference<css::uno::XComponentContext>& xContext,
- const OUString& installDir,
+ std::u16string_view installDir,
const Reference< css::ucb::XCommandEnvironment >& xCmdEnv)
{
try {
@@ -168,7 +172,7 @@ ExtensionDescription::ExtensionDescription(
//If there is no description.xml then ucb will start an interaction which
//brings up a dialog.We want to prevent this. Therefore we wrap the xCmdEnv
//and filter the respective exception out.
- OUString sDescriptionUri(installDir + "/description.xml");
+ OUString sDescriptionUri(OUString::Concat(installDir) + "/description.xml");
Reference<css::ucb::XCommandEnvironment> xFilter = new FileDoesNotExistFilter(xCmdEnv);
::ucbhelper::Content descContent(sDescriptionUri, xFilter, xContext);
@@ -289,7 +293,7 @@ void FileDoesNotExistFilter::handle(
namespace dp_misc {
-DescriptionInfoset getDescriptionInfoset(OUString const & sExtensionFolderURL)
+DescriptionInfoset getDescriptionInfoset(std::u16string_view sExtensionFolderURL)
{
Reference< css::xml::dom::XNode > root;
Reference<css::uno::XComponentContext> context(
@@ -706,13 +710,13 @@ DescriptionInfoset::getLocalizedChild( const OUString & sParent) const
css::uno::Reference<css::xml::dom::XNode>
DescriptionInfoset::matchLanguageTag(
- css::uno::Reference< css::xml::dom::XNode > const & xParent, OUString const & rTag) const
+ css::uno::Reference< css::xml::dom::XNode > const & xParent, std::u16string_view rTag) const
{
OSL_ASSERT(xParent.is());
css::uno::Reference<css::xml::dom::XNode> nodeMatch;
//first try exact match for lang
- const OUString exp1("*[@lang=\"" + rTag + "\"]");
+ const OUString exp1(OUString::Concat("*[@lang=\"") + rTag + "\"]");
try {
nodeMatch = m_xpath->selectSingleNode(xParent, exp1);
} catch (const css::xml::xpath::XPathException &) {
@@ -724,7 +728,7 @@ DescriptionInfoset::matchLanguageTag(
if (!nodeMatch.is())
{
const OUString exp2(
- "*[starts-with(@lang,\"" + rTag + "-\")]");
+ OUString::Concat("*[starts-with(@lang,\"") + rTag + "-\")]");
try {
nodeMatch = m_xpath->selectSingleNode(xParent, exp2);
} catch (const css::xml::xpath::XPathException &) {
diff --git a/desktop/source/deployment/misc/dp_identifier.cxx b/desktop/source/deployment/misc/dp_identifier.cxx
index 350f9a1f0541..8669710c7b16 100644
--- a/desktop/source/deployment/misc/dp_identifier.cxx
+++ b/desktop/source/deployment/misc/dp_identifier.cxx
@@ -33,7 +33,7 @@ namespace dp_misc {
OUString generateIdentifier(
::std::optional< OUString > const & optional,
- OUString const & fileName)
+ std::u16string_view fileName)
{
return optional ? *optional : generateLegacyIdentifier(fileName);
}
@@ -47,8 +47,8 @@ OUString getIdentifier(
? id.Value : generateLegacyIdentifier(package->getName());
}
-OUString generateLegacyIdentifier(OUString const & fileName) {
- return "org.openoffice.legacy." + fileName;
+OUString generateLegacyIdentifier(std::u16string_view fileName) {
+ return OUString::Concat("org.openoffice.legacy.") + fileName;
}
}
diff --git a/desktop/source/deployment/registry/component/dp_compbackenddb.cxx b/desktop/source/deployment/registry/component/dp_compbackenddb.cxx
index 05f265404f55..37356fd78333 100644
--- a/desktop/source/deployment/registry/component/dp_compbackenddb.cxx
+++ b/desktop/source/deployment/registry/component/dp_compbackenddb.cxx
@@ -67,22 +67,22 @@ void ComponentBackendDb::addEntry(OUString const & url, Data const & data)
if (!activateEntry(url))
{
Reference<css::xml::dom::XNode> componentNode = writeKeyElement(url);
- writeSimpleElement("java-type-library",
+ writeSimpleElement(u"java-type-library",
OUString::boolean(data.javaTypeLibrary),
componentNode);
writeSimpleList(
data.implementationNames,
- "implementation-names",
- "name",
+ u"implementation-names",
+ u"name",
componentNode);
writeVectorOfPair(
data.singletons,
- "singletons",
- "item",
- "key",
- "value",
+ u"singletons",
+ u"item",
+ u"key",
+ u"value",
componentNode);
save();
@@ -97,7 +97,7 @@ void ComponentBackendDb::addEntry(OUString const & url, Data const & data)
}
}
-ComponentBackendDb::Data ComponentBackendDb::getEntry(OUString const & url)
+ComponentBackendDb::Data ComponentBackendDb::getEntry(std::u16string_view url)
{
try
{
@@ -105,14 +105,14 @@ ComponentBackendDb::Data ComponentBackendDb::getEntry(OUString const & url)
Reference<css::xml::dom::XNode> aNode = getKeyElement(url);
if (aNode.is())
{
- bool bJava = readSimpleElement("java-type-library", aNode) == "true";
+ bool bJava = readSimpleElement(u"java-type-library", aNode) == "true";
retData.javaTypeLibrary = bJava;
retData.implementationNames =
- readList( aNode, "implementation-names", "name");
+ readList( aNode, u"implementation-names", u"name");
retData.singletons =
- readVectorOfPair( aNode, "singletons", "item", "key", "value");
+ readVectorOfPair( aNode, u"singletons", u"item", u"key", u"value");
}
return retData;
}
diff --git a/desktop/source/deployment/registry/component/dp_compbackenddb.hxx b/desktop/source/deployment/registry/component/dp_compbackenddb.hxx
index e1797056d498..84153b6fa259 100644
--- a/desktop/source/deployment/registry/component/dp_compbackenddb.hxx
+++ b/desktop/source/deployment/registry/component/dp_compbackenddb.hxx
@@ -23,6 +23,8 @@
#include <rtl/string.hxx>
#include <vector>
#include <deque>
+#include <string_view>
+
#include <dp_backenddb.hxx>
namespace com::sun::star::uno { class XComponentContext; }
@@ -81,7 +83,7 @@ public:
void addEntry(OUString const & url, Data const & data);
- Data getEntry(OUString const & url);
+ Data getEntry(std::u16string_view url);
};
diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx
index 3ff6d653477a..5bf230c17f68 100644
--- a/desktop/source/deployment/registry/component/dp_component.cxx
+++ b/desktop/source/deployment/registry/component/dp_component.cxx
@@ -287,8 +287,8 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
std::unique_ptr<ComponentBackendDb> m_backendDb;
void addDataToDb(OUString const & url, ComponentBackendDb::Data const & data);
- ComponentBackendDb::Data readDataFromDb(OUString const & url);
- void revokeEntryFromDb(OUString const & url);
+ ComponentBackendDb::Data readDataFromDb(std::u16string_view url);
+ void revokeEntryFromDb(std::u16string_view url);
Reference<registry::XSimpleRegistry> m_xCommonRDB;
Reference<registry::XSimpleRegistry> m_xNativeRDB;
@@ -576,7 +576,7 @@ void BackendImpl::addDataToDb(
m_backendDb->addEntry(url, data);
}
-ComponentBackendDb::Data BackendImpl::readDataFromDb(OUString const & url)
+ComponentBackendDb::Data BackendImpl::readDataFromDb(std::u16string_view url)
{
ComponentBackendDb::Data data;
if (m_backendDb)
@@ -584,7 +584,7 @@ ComponentBackendDb::Data BackendImpl::readDataFromDb(OUString const & url)
return data;
}
-void BackendImpl::revokeEntryFromDb(OUString const & url)
+void BackendImpl::revokeEntryFromDb(std::u16string_view url)
{
if (m_backendDb)
m_backendDb->revokeEntry(url);
diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
index 578e164f13b7..7949ab353b0a 100644
--- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx
+++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
@@ -42,6 +42,7 @@
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <deque>
#include <memory>
+#include <string_view>
#include <utility>
#include "dp_configurationbackenddb.hxx"
@@ -129,10 +130,10 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
Reference<XCommandEnvironment> const & xCmdEnv );
#endif
void addDataToDb(OUString const & url, ConfigurationBackendDb::Data const & data);
- ::std::optional<ConfigurationBackendDb::Data> readDataFromDb(OUString const & url);
- void revokeEntryFromDb(OUString const & url);
- bool hasActiveEntry(OUString const & url);
- bool activateEntry(OUString const & url);
+ ::std::optional<ConfigurationBackendDb::Data> readDataFromDb(std::u16string_view url);
+ void revokeEntryFromDb(std::u16string_view url);
+ bool hasActiveEntry(std::u16string_view url);
+ bool activateEntry(std::u16string_view url);
public:
BackendImpl( Sequence<Any> const & args,
@@ -261,7 +262,7 @@ void BackendImpl::addDataToDb(
}
::std::optional<ConfigurationBackendDb::Data> BackendImpl::readDataFromDb(
- OUString const & url)
+ std::u16string_view url)
{
::std::optional<ConfigurationBackendDb::Data> data;
if (m_backendDb)
@@ -269,20 +270,20 @@ void BackendImpl::addDataToDb(
return data;
}
-void BackendImpl::revokeEntryFromDb(OUString const & url)
+void BackendImpl::revokeEntryFromDb(std::u16string_view url)
{
if (m_backendDb)
m_backendDb->revokeEntry(url);
}
-bool BackendImpl::hasActiveEntry(OUString const & url)
+bool BackendImpl::hasActiveEntry(std::u16string_view url)
{
if (m_backendDb)
return m_backendDb->hasActiveEntry(url);
return false;
}
-bool BackendImpl::activateEntry(OUString const & url)
+bool BackendImpl::activateEntry(std::u16string_view url)
{
if (m_backendDb)
return m_backendDb->activateEntry(url);
@@ -600,7 +601,7 @@ OUString encodeForXml( OUString const & text )
OUString replaceOrigin(
- OUString const & url, OUString const & destFolder, Reference< XCommandEnvironment > const & xCmdEnv, Reference< XComponentContext > const & xContext, bool & out_replaced)
+ OUString const & url, std::u16string_view destFolder, Reference< XCommandEnvironment > const & xCmdEnv, Reference< XComponentContext > const & xContext, bool & out_replaced)
{
// looking for %origin%:
::ucbhelper::Content ucb_content( url, xCmdEnv, xContext );
@@ -671,11 +672,11 @@ OUString replaceOrigin(
if (write_pos < filtered.size())
filtered.resize( write_pos );
OUString newUrl(url);
- if (!destFolder.isEmpty())
+ if (!destFolder.empty())
{
//get the file name of the xcu and add it to the url of the temporary folder
sal_Int32 i = url.lastIndexOf('/');
- newUrl = destFolder + url.subView(i);
+ newUrl = OUString::Concat(destFolder) + url.subView(i);
}
ucbhelper::Content(newUrl, xCmdEnv, xContext).writeStream(
diff --git a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx
index fd5d3b3c4833..0028f32ce352 100644
--- a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx
+++ b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx
@@ -71,8 +71,8 @@ void ConfigurationBackendDb::addEntry(OUString const & url, Data const & data)
Reference<css::xml::dom::XNode> helpNode
= writeKeyElement(url);
- writeSimpleElement("data-url", data.dataUrl, helpNode);
- writeSimpleElement("ini-entry", data.iniEntry, helpNode);
+ writeSimpleElement(u"data-url", data.dataUrl, helpNode);
+ writeSimpleElement(u"ini-entry", data.iniEntry, helpNode);
save();
}
}
@@ -91,7 +91,7 @@ void ConfigurationBackendDb::addEntry(OUString const & url, Data const & data)
::std::optional<ConfigurationBackendDb::Data>
-ConfigurationBackendDb::getEntry(OUString const & url)
+ConfigurationBackendDb::getEntry(std::u16string_view url)
{
try
{
@@ -99,8 +99,8 @@ ConfigurationBackendDb::getEntry(OUString const & url)
Reference<css::xml::dom::XNode> aNode = getKeyElement(url);
if (aNode.is())
{
- retData.dataUrl = readSimpleElement("data-url", aNode);
- retData.iniEntry = readSimpleElement("ini-entry", aNode);
+ retData.dataUrl = readSimpleElement(u"data-url", aNode);
+ retData.iniEntry = readSimpleElement(u"ini-entry", aNode);
}
else
{
diff --git a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.hxx b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.hxx
index 15ac91853019..bd48aab7b2f8 100644
--- a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.hxx
+++ b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.hxx
@@ -23,6 +23,8 @@
#include <rtl/string.hxx>
#include <vector>
#include <optional>
+#include <string_view>
+
#include <dp_backenddb.hxx>
namespace com::sun::star::uno
@@ -64,7 +66,7 @@ public:
void addEntry(OUString const& url, Data const& data);
- ::std::optional<Data> getEntry(OUString const& url);
+ ::std::optional<Data> getEntry(std::u16string_view url);
std::vector<OUString> getAllDataUrls();
};
}
diff --git a/desktop/source/deployment/registry/dp_backenddb.cxx b/desktop/source/deployment/registry/dp_backenddb.cxx
index edc64b1996ef..1cd3007b25a3 100644
--- a/desktop/source/deployment/registry/dp_backenddb.cxx
+++ b/desktop/source/deployment/registry/dp_backenddb.cxx
@@ -147,7 +147,7 @@ void BackendDb::removeElement(OUString const & sXPathExpression)
}
}
-void BackendDb::removeEntry(OUString const & url)
+void BackendDb::removeEntry(std::u16string_view url)
{
const OUString sKeyElement = getKeyElementName();
const OUString sPrefix = getNSPrefix();
@@ -162,7 +162,7 @@ void BackendDb::removeEntry(OUString const & url)
removeElement(sExpression);
}
-void BackendDb::revokeEntry(OUString const & url)
+void BackendDb::revokeEntry(std::u16string_view url)
{
try
{
@@ -182,7 +182,7 @@ void BackendDb::revokeEntry(OUString const & url)
}
}
-bool BackendDb::activateEntry(OUString const & url)
+bool BackendDb::activateEntry(std::u16string_view url)
{
try
{
@@ -206,7 +206,7 @@ bool BackendDb::activateEntry(OUString const & url)
}
}
-bool BackendDb::hasActiveEntry(OUString const & url)
+bool BackendDb::hasActiveEntry(std::u16string_view url)
{
try
{
@@ -231,7 +231,7 @@ bool BackendDb::hasActiveEntry(OUString const & url)
}
Reference<css::xml::dom::XNode> BackendDb::getKeyElement(
- OUString const & url)
+ std::u16string_view url)
{
try
{
@@ -262,10 +262,10 @@ Reference<css::xml::dom::XNode> BackendDb::getKeyElement(
//Only writes the data if there is at least one entry
void BackendDb::writeVectorOfPair(
std::vector< std::pair< OUString, OUString > > const & vecPairs,
- OUString const & sVectorTagName,
- OUString const & sPairTagName,
- OUString const & sFirstTagName,
- OUString const & sSecondTagName,
+ std::u16string_view sVectorTagName,
+ std::u16string_view sPairTagName,
+ std::u16string_view sFirstTagName,
+ std::u16string_view sSecondTagName,
css::uno::Reference<css::xml::dom::XNode> const & xParent)
{
try{
@@ -332,10 +332,10 @@ void BackendDb::writeVectorOfPair(
std::vector< std::pair< OUString, OUString > >
BackendDb::readVectorOfPair(
Reference<css::xml::dom::XNode> const & parent,
- OUString const & sListTagName,
- OUString const & sPairTagName,
- OUString const & sFirstTagName,
- OUString const & sSecondTagName)
+ std::u16string_view sListTagName,
+ std::u16string_view sPairTagName,
+ std::u16string_view sFirstTagName,
+ std::u16string_view sSecondTagName)
{
try
{
@@ -378,8 +378,8 @@ BackendDb::readVectorOfPair(
//Only writes the data if there is at least one entry
void BackendDb::writeSimpleList(
std::deque< OUString> const & list,
- OUString const & sListTagName,
- OUString const & sMemberTagName,
+ std::u16string_view sListTagName,
+ std::u16string_view sMemberTagName,
Reference<css::xml::dom::XNode> const & xParent)
{
try
@@ -422,7 +422,7 @@ void BackendDb::writeSimpleList(
//Writes only the element if is has a value.
//The prefix is automatically added to the element name
void BackendDb::writeSimpleElement(
- OUString const & sElementName, OUString const & value,
+ std::u16string_view sElementName, OUString const & value,
Reference<css::xml::dom::XNode> const & xParent)
{
try
@@ -501,7 +501,7 @@ Reference<css::xml::dom::XNode> BackendDb::writeKeyElement(
}
OUString BackendDb::readSimpleElement(
- OUString const & sElementName, Reference<css::xml::dom::XNode> const & xParent)
+ std::u16string_view sElementName, Reference<css::xml::dom::XNode> const & xParent)
{
try
{
@@ -526,8 +526,8 @@ OUString BackendDb::readSimpleElement(
std::deque< OUString> BackendDb::readList(
Reference<css::xml::dom::XNode> const & parent,
- OUString const & sListTagName,
- OUString const & sMemberTagName)
+ std::u16string_view sListTagName,
+ std::u16string_view sMemberTagName)
{
try
{
@@ -558,7 +558,7 @@ std::deque< OUString> BackendDb::readList(
}
std::vector<OUString> BackendDb::getOneChildFromAllEntries(
- OUString const & name)
+ std::u16string_view name)
{
try
{
diff --git a/desktop/source/deployment/registry/executable/dp_executable.cxx b/desktop/source/deployment/registry/executable/dp_executable.cxx
index 7631c6402a9a..f41836f8e4d0 100644
--- a/desktop/source/deployment/registry/executable/dp_executable.cxx
+++ b/desktop/source/deployment/registry/executable/dp_executable.cxx
@@ -19,6 +19,8 @@
#include <memory>
+#include <string_view>
+
#include <dp_misc.h>
#include <dp_backend.h>
#include <dp_ucb.h>
@@ -77,8 +79,8 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
OUString const & identifier, Reference<XCommandEnvironment> const & xCmdEnv ) override;
void addDataToDb(OUString const & url);
- bool hasActiveEntry(OUString const & url);
- void revokeEntryFromDb(OUString const & url);
+ bool hasActiveEntry(std::u16string_view url);
+ void revokeEntryFromDb(std::u16string_view url);
Reference<deployment::XPackageTypeInfo> m_xExecutableTypeInfo;
std::unique_ptr<ExecutableBackendDb> m_backendDb;
@@ -137,13 +139,13 @@ void BackendImpl::addDataToDb(OUString const & url)
m_backendDb->addEntry(url);
}
-void BackendImpl::revokeEntryFromDb(OUString const & url)
+void BackendImpl::revokeEntryFromDb(std::u16string_view url)
{
if (m_backendDb)
m_backendDb->revokeEntry(url);
}
-bool BackendImpl::hasActiveEntry(OUString const & url)
+bool BackendImpl::hasActiveEntry(std::u16string_view url)
{
if (m_backendDb)
return m_backendDb->hasActiveEntry(url);
diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx
index 49be2a23f87d..1f1eb5f2fe90 100644
--- a/desktop/source/deployment/registry/help/dp_help.cxx
+++ b/desktop/source/deployment/registry/help/dp_help.cxx
@@ -40,6 +40,7 @@
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
#include <com/sun/star/util/XMacroExpander.hpp>
#include <optional>
+#include <string_view>
using namespace ::dp_misc;
using namespace ::com::sun::star;
@@ -94,9 +95,9 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
void implCollectXhpFiles( const OUString& aDir,
std::vector< OUString >& o_rXhpFileVector );
- ::std::optional<HelpBackendDb::Data> readDataFromDb(OUString const & url);
- bool hasActiveEntry(OUString const & url);
- bool activateEntry(OUString const & url);
+ ::std::optional<HelpBackendDb::Data> readDataFromDb(std::u16string_view url);
+ bool hasActiveEntry(std::u16string_view url);
+ bool activateEntry(std::u16string_view url);
Reference< ucb::XSimpleFileAccess3 > const & getFileAccess();
Reference< ucb::XSimpleFileAccess3 > m_xSFA;
@@ -221,7 +222,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
}
::std::optional<HelpBackendDb::Data> BackendImpl::readDataFromDb(
- OUString const & url)
+ std::u16string_view url)
{
::std::optional<HelpBackendDb::Data> data;
if (m_backendDb)
@@ -229,14 +230,14 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
return data;
}
-bool BackendImpl::hasActiveEntry(OUString const & url)
+bool BackendImpl::hasActiveEntry(std::u16string_view url)
{
if (m_backendDb)
return m_backendDb->hasActiveEntry(url);
return false;
}
-bool BackendImpl::activateEntry(OUString const & url)
+bool BackendImpl::activateEntry(std::u16string_view url)
{
if (m_backendDb)
return m_backendDb->activateEntry(url);
diff --git a/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx b/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx
index 73b7279d13de..5d208d821e07 100644
--- a/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx
+++ b/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx
@@ -70,7 +70,7 @@ void HelpBackendDb::addEntry(OUString const & url, Data const & data)
Reference<css::xml::dom::XNode> helpNode
= writeKeyElement(url);
- writeSimpleElement("data-url", data.dataUrl, helpNode);
+ writeSimpleElement(u"data-url", data.dataUrl, helpNode);
save();
}
}
@@ -88,7 +88,7 @@ void HelpBackendDb::addEntry(OUString const & url, Data const & data)
::std::optional<HelpBackendDb::Data>
-HelpBackendDb::getEntry(OUString const & url)
+HelpBackendDb::getEntry(std::u16string_view url)
{
try
{
@@ -96,7 +96,7 @@ HelpBackendDb::getEntry(OUString const & url)
Reference<css::xml::dom::XNode> aNode = getKeyElement(url);
if (aNode.is())
{
- retData.dataUrl = readSimpleElement("data-url", aNode);
+ retData.dataUrl = readSimpleElement(u"data-url", aNode);
}
else
{
@@ -118,7 +118,7 @@ HelpBackendDb::getEntry(OUString const & url)
std::vector<OUString> HelpBackendDb::getAllDataUrls()
{
- return getOneChildFromAllEntries("data-url");
+ return getOneChildFromAllEntries(u"data-url");
}
} // namespace dp_registry::backend::help
diff --git a/desktop/source/deployment/registry/help/dp_helpbackenddb.hxx b/desktop/source/deployment/registry/help/dp_helpbackenddb.hxx
index 60172f32e6f3..a46bd8663cd7 100644
--- a/desktop/source/deployment/registry/help/dp_helpbackenddb.hxx
+++ b/desktop/source/deployment/registry/help/dp_helpbackenddb.hxx
@@ -21,6 +21,8 @@
#include <rtl/ustring.hxx>
#include <optional>
+#include <string_view>
+
#include <dp_backenddb.hxx>
namespace com::sun::star::uno
@@ -58,7 +60,7 @@ public:
void addEntry(OUString const& url, Data const& data);
- ::std::optional<Data> getEntry(OUString const& url);
+ ::std::optional<Data> getEntry(std::u16string_view url);
//must also return the data urls for entries with @active="false". That is,
//those are currently revoked.
std::vector<OUString> getAllDataUrls();
diff --git a/desktop/source/deployment/registry/inc/dp_backenddb.hxx b/desktop/source/deployment/registry/inc/dp_backenddb.hxx
index 7c8d5397fb1d..785201466772 100644
--- a/desktop/source/deployment/registry/inc/dp_backenddb.hxx
+++ b/desktop/source/deployment/registry/inc/dp_backenddb.hxx
@@ -22,6 +22,7 @@
#include <com/sun/star/uno/Reference.hxx>
#include <rtl/ustring.hxx>
#include <deque>
+#include <string_view>
#include <vector>
namespace com::sun::star {
@@ -66,50 +67,50 @@ protected:
void removeElement(OUString const & sXPathExpression);
css::uno::Reference<css::xml::dom::XNode> getKeyElement(
- OUString const & url);
+ std::u16string_view url);
void writeSimpleList(
std::deque< OUString> const & list,
- OUString const & sListTagName,
- OUString const & sMemberTagName,
+ std::u16string_view sListTagName,
+ std::u16string_view sMemberTagName,
css::uno::Reference<css::xml::dom::XNode> const & xParent);
void writeVectorOfPair(
std::vector< std::pair< OUString, OUString > > const & vecPairs,
- OUString const & sVectorTagName,
- OUString const & sPairTagName,
- OUString const & sFirstTagName,
- OUString const & sSecondTagName,
+ std::u16string_view sVectorTagName,
+ std::u16string_view sPairTagName,
+ std::u16string_view sFirstTagName,
+ std::u16string_view sSecondTagName,
css::uno::Reference<css::xml::dom::XNode> const & xParent);
void writeSimpleElement(
- OUString const & sElementName, OUString const & value,
+ std::u16string_view sElementName, OUString const & value,
css::uno::Reference<css::xml::dom::XNode> const & xParent);
css::uno::Reference<css::xml::dom::XNode> writeKeyElement(
OUString const & url);
OUString readSimpleElement(
- OUString const & sElementName,
+ std::u16string_view sElementName,
css::uno::Reference<css::xml::dom::XNode> const & xParent);
std::vector< std::pair< OUString, OUString > >
readVectorOfPair(
css::uno::Reference<css::xml::dom::XNode> const & parent,
- OUString const & sListTagName,
- OUString const & sPairTagName,
- OUString const & sFirstTagName,
- OUString const & sSecondTagName);
+ std::u16string_view sListTagName,
+ std::u16string_view sPairTagName,
+ std::u16string_view sFirstTagName,
+ std::u16string_view sSecondTagName);
std::deque< OUString> readList(
css::uno::Reference<css::xml::dom::XNode> const & parent,
- OUString const & sListTagName,
- OUString const & sMemberTagName);
+ std::u16string_view sListTagName,
+ std::u16string_view sMemberTagName);
/* returns the values of one particularly child element of all key elements.
*/
std::vector< OUString> getOneChildFromAllEntries(
- OUString const & sElementName);
+ std::u16string_view sElementName);
/* returns the namespace which is to be written as xmlns attribute
@@ -133,18 +134,18 @@ public:
OUString const & url);
virtual ~BackendDb() {};
- void removeEntry(OUString const & url);
+ void removeEntry(std::u16string_view url);
/* This is called to write the "revoked" attribute to the entry.
This is done when XPackage::revokePackage is called.
*/
- void revokeEntry(OUString const & url);
+ void revokeEntry(std::u16string_view url);
/* returns false if the entry does not exist yet.
*/
- bool activateEntry(OUString const & url);
+ bool activateEntry(std::u16string_view url);
- bool hasActiveEntry(OUString const & url);
+ bool hasActiveEntry(std::u16string_view url);
};
diff --git a/desktop/source/deployment/registry/package/dp_extbackenddb.cxx b/desktop/source/deployment/registry/package/dp_extbackenddb.cxx
index c96d1466b51f..ac4180f87f70 100644
--- a/desktop/source/deployment/registry/package/dp_extbackenddb.cxx
+++ b/desktop/source/deployment/registry/package/dp_extbackenddb.cxx
@@ -68,8 +68,8 @@ void ExtensionBackendDb::addEntry(OUString const & url, Data const & data)
if (!activateEntry(url))
{
Reference<css::xml::dom::XNode> extensionNodeNode = writeKeyElement(url);
- writeVectorOfPair( data.items, "extension-items", "item",
- "url", "media-type", extensionNodeNode);
+ writeVectorOfPair( data.items, u"extension-items", u"item",
+ u"url", u"media-type", extensionNodeNode);
save();
}
}
@@ -82,7 +82,7 @@ void ExtensionBackendDb::addEntry(OUString const & url, Data const & data)
}
}
-ExtensionBackendDb::Data ExtensionBackendDb::getEntry(OUString const & url)
+ExtensionBackendDb::Data ExtensionBackendDb::getEntry(std::u16string_view url)
{
try
{
@@ -92,8 +92,8 @@ ExtensionBackendDb::Data ExtensionBackendDb::getEntry(OUString const & url)
if (aNode.is())
{
retData.items =
- readVectorOfPair( aNode, "extension-items", "item",
- "url", "media-type");
+ readVectorOfPair( aNode, u"extension-items", u"item",
+ u"url", u"media-type");
}
return retData;
}
diff --git a/desktop/source/deployment/registry/package/dp_extbackenddb.hxx b/desktop/source/deployment/registry/package/dp_extbackenddb.hxx
index c9a607e7a8c0..fb736e6e260c 100644
--- a/desktop/source/deployment/registry/package/dp_extbackenddb.hxx
+++ b/desktop/source/deployment/registry/package/dp_extbackenddb.hxx
@@ -19,6 +19,9 @@
#pragma once
+#include <sal/config.h>
+
+#include <string_view>
#include <utility>
#include <vector>
@@ -59,7 +62,7 @@ public:
void addEntry(OUString const& url, Data const& data);
- Data getEntry(OUString const& url);
+ Data getEntry(std::u16string_view url);
};
}
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index e0adb4395f4c..0f20a9203ea6 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -69,6 +69,7 @@
#include <algorithm>
#include <memory>
+#include <string_view>
#include <vector>
#include "dp_extbackenddb.hxx"
@@ -214,8 +215,8 @@ class BackendImpl : public ImplBaseT
std::unique_ptr<ExtensionBackendDb> m_backendDb;
void addDataToDb(OUString const & url, ExtensionBackendDb::Data const & data);
- ExtensionBackendDb::Data readDataFromDb(OUString const & url);
- void revokeEntryFromDb(OUString const & url);
+ ExtensionBackendDb::Data readDataFromDb(std::u16string_view url);
+ void revokeEntryFromDb(std::u16string_view url);
// PackageRegistryBackend
virtual Reference<deployment::XPackage> bindPackage_(
@@ -419,7 +420,7 @@ void BackendImpl::addDataToDb(
}
ExtensionBackendDb::Data BackendImpl::readDataFromDb(
- OUString const & url)
+ std::u16string_view url)
{
ExtensionBackendDb::Data data;
if (m_backendDb)
@@ -427,7 +428,7 @@ ExtensionBackendDb::Data BackendImpl::readDataFromDb(
return data;
}
-void BackendImpl::revokeEntryFromDb(OUString const & url)
+void BackendImpl::revokeEntryFromDb(std::u16string_view url)
{
if (m_backendDb)
m_backendDb->revokeEntry(url);
diff --git a/desktop/source/deployment/registry/script/dp_script.cxx b/desktop/source/deployment/registry/script/dp_script.cxx
index e4fd8e07fead..fa0cc83d0618 100644
--- a/desktop/source/deployment/registry/script/dp_script.cxx
+++ b/desktop/source/deployment/registry/script/dp_script.cxx
@@ -28,6 +28,8 @@
#include <com/sun/star/util/XUpdatable.hpp>
#include <com/sun/star/script/XLibraryContainer3.hpp>
#include <memory>
+#include <string_view>
+
#include "dp_scriptbackenddb.hxx"
#include <cppuhelper/supportsservice.hxx>
@@ -81,8 +83,8 @@ class BackendImpl : public t_helper
Reference<XCommandEnvironment> const & xCmdEnv ) override;
void addDataToDb(OUString const & url);
- bool hasActiveEntry(OUString const & url);
- void revokeEntryFromDb(OUString const & url);
+ bool hasActiveEntry(std::u16string_view url);
+ void revokeEntryFromDb(std::u16string_view url);
const Reference<deployment::XPackageTypeInfo> m_xBasicLibTypeInfo;
const Reference<deployment::XPackageTypeInfo> m_xDialogLibTypeInfo;
@@ -189,7 +191,7 @@ void BackendImpl::addDataToDb(OUString const & url)
m_backendDb->addEntry(url);
}
-bool BackendImpl::hasActiveEntry(OUString const & url)
+bool BackendImpl::hasActiveEntry(std::u16string_view url)
{
if (m_backendDb)
return m_backendDb->hasActiveEntry(url);
@@ -210,7 +212,7 @@ BackendImpl::getSupportedPackageTypes()
{
return m_typeInfos;
}
-void BackendImpl::revokeEntryFromDb(OUString const & url)
+void BackendImpl::revokeEntryFromDb(std::u16string_view url)
{
if (m_backendDb)
m_backendDb->revokeEntry(url);
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 2b87faecc677..a512f33868ac 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -946,12 +946,12 @@ VclPtr<Window> getSidebarWindow()
// Could be anonymous in principle, but for the unit testing purposes, we
// declare it in init.hxx.
-OUString desktop::extractParameter(OUString& rOptions, const OUString& rName)
+OUString desktop::extractParameter(OUString& rOptions, std::u16string_view rName)
{
OUString aValue;
- OUString aNameEquals(rName + "=");
- OUString aCommaNameEquals("," + rName + "=");
+ OUString aNameEquals(OUString::Concat(rName) + "=");
+ OUString aCommaNameEquals(OUString::Concat(",") + rName + "=");
int nIndex = -1;
if (rOptions.startsWith(aNameEquals))
@@ -2212,7 +2212,7 @@ static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis,
// 'Language=...' is an option that LOK consumes by itself, and does
// not pass it as a parameter to the filter
OUString aOptions = getUString(pOptions);
- const OUString aLanguage = extractParameter(aOptions, "Language");
+ const OUString aLanguage = extractParameter(aOptions, u"Language");
bool isValidLangTag = LanguageTag::isValidBcp47(aLanguage, nullptr);
if (!aLanguage.isEmpty() && isValidLangTag)
@@ -2230,7 +2230,7 @@ static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis,
SvNumberFormatter::resetTheCurrencyTable();
}
- const OUString aDeviceFormFactor = extractParameter(aOptions, "DeviceFormFactor");
+ const OUString aDeviceFormFactor = extractParameter(aOptions, u"DeviceFormFactor");
SfxLokHelper::setDeviceFormFactor(aDeviceFormFactor);
uno::Sequence<css::beans::PropertyValue> aFilterOptions(3);
@@ -5128,7 +5128,7 @@ static int doc_createViewWithOptions(LibreOfficeKitDocument* pThis,
SetLastExceptionMsg();
OUString aOptions = getUString(pOptions);
- const OUString aLanguage = extractParameter(aOptions, "Language");
+ const OUString aLanguage = extractParameter(aOptions, u"Language");
if (!aLanguage.isEmpty())
{
@@ -5137,7 +5137,7 @@ static int doc_createViewWithOptions(LibreOfficeKitDocument* pThis,
comphelper::LibreOfficeKit::setLocale(LanguageTag(aLanguage));
}
- const OUString aDeviceFormFactor = extractParameter(aOptions, "DeviceFormFactor");
+ const OUString aDeviceFormFactor = extractParameter(aOptions, u"DeviceFormFactor");
SfxLokHelper::setDeviceFormFactor(aDeviceFormFactor);
LibLODocument_Impl* pDocument = static_cast<LibLODocument_Impl*>(pThis);
@@ -6028,9 +6028,9 @@ public:
}
};
-static void activateNotebookbar(const OUString& rApp)
+static void activateNotebookbar(std::u16string_view rApp)
{
- OUString aPath = "org.openoffice.Office.UI.ToolbarMode/Applications/" + rApp;
+ OUString aPath = OUString::Concat("org.openoffice.Office.UI.ToolbarMode/Applications/") + rApp;
const utl::OConfigurationTreeRoot aAppNode(xContext, aPath, true);
@@ -6354,9 +6354,9 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char
if (bNotebookbar)
{
- activateNotebookbar("Writer");
- activateNotebookbar("Calc");
- activateNotebookbar("Impress");
+ activateNotebookbar(u"Writer");
+ activateNotebookbar(u"Calc");
+ activateNotebookbar(u"Impress");
}
return bInitialized;
diff --git a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
index 1d4907b9a263..2180695d85b7 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
@@ -17,6 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
#include <strings.hrc>
#include <dp_misc.h>
@@ -64,7 +67,7 @@ class CommandEnvironmentImpl
/// @throws RuntimeException
void update_( Any const & Status );
- void printLicense(std::u16string_view sName,const OUString& sLicense,
+ void printLicense(std::u16string_view sName,std::u16string_view sLicense,
bool & accept, bool & decline);
public:
@@ -125,7 +128,7 @@ CommandEnvironmentImpl::~CommandEnvironmentImpl()
//May throw exceptions
void CommandEnvironmentImpl::printLicense(
- std::u16string_view sName, const OUString& sLicense, bool & accept, bool &decline)
+ std::u16string_view sName, std::u16string_view sLicense, bool & accept, bool &decline)
{
OUString s1tmp(DpResId(RID_STR_UNOPKG_ACCEPT_LIC_1));
OUString s1(s1tmp.replaceAll("$NAME", sName));
diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
index 3b16dc59855e..6861f6459cc0 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
@@ -232,10 +232,10 @@ void printf_space( sal_Int32 space )
void printf_line(
- OUString const & name, OUString const & value, sal_Int32 level )
+ std::u16string_view name, std::u16string_view value, sal_Int32 level )
{
printf_space( level );
- dp_misc::writeConsole(OUString(name + ": " + value + "\n"));
+ dp_misc::writeConsole(OUString(OUString::Concat(name) + ": " + value + "\n"));
}
@@ -249,11 +249,11 @@ void printf_package(
true, dp_misc::getIdentifier( xPackage ) )
: xPackage->getIdentifier() );
if (id.IsPresent)
- printf_line( "Identifier", id.Value, level );
+ printf_line( u"Identifier", id.Value, level );
OUString version(xPackage->getVersion());
if (!version.isEmpty())
- printf_line( "Version", version, level + 1 );
- printf_line( "URL", xPackage->getURL(), level + 1 );
+ printf_line( u"Version", version, level + 1 );
+ printf_line( u"URL", xPackage->getURL(), level + 1 );
beans::Optional< beans::Ambiguous<sal_Bool> > option(
xPackage->isRegistered( Reference<task::XAbortChannel>(), xCmdEnv ) );
@@ -267,15 +267,15 @@ void printf_package(
}
else
value = "n/a";
- printf_line( "is registered", value, level + 1 );
+ printf_line( u"is registered", value, level + 1 );
const Reference<deployment::XPackageTypeInfo> xPackageType(
xPackage->getPackageType() );
OSL_ASSERT( xPackageType.is() );
if (xPackageType.is()) {
- printf_line( "Media-Type", xPackageType->getMediaType(), level + 1 );
+ printf_line( u"Media-Type", xPackageType->getMediaType(), level + 1 );
}
- printf_line( "Description", xPackage->getDescription(), level + 1 );
+ printf_line( u"Description", xPackage->getDescription(), level + 1 );
if (!xPackage->isBundle())
return;
@@ -298,7 +298,7 @@ static void printf_unaccepted_licenses(
{
OUString id(
dp_misc::getIdentifier(ext) );
- printf_line( "Identifier", id, 0 );
+ printf_line( u"Identifier", id, 0 );
printf_space(1);
dp_misc::writeConsole(u"License not accepted\n\n");
}
diff --git a/editeng/source/lookuptree/Trie.cxx b/editeng/source/lookuptree/Trie.cxx
index 87a285fcdddc..153fe01e1c6d 100644
--- a/editeng/source/lookuptree/Trie.cxx
+++ b/editeng/source/lookuptree/Trie.cxx
@@ -7,6 +7,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <editeng/Trie.hxx>
namespace editeng
@@ -31,8 +35,8 @@ struct TrieNode final
TrieNode* findChild(sal_Unicode aCharacter);
TrieNode* traversePath(const OUString& sPath);
void addNewChild(TrieNode* pChild);
- void collectSuggestions(const OUString& sPath, std::vector<OUString>& rSuggestionList);
- static void collectSuggestionsForCurrentNode(TrieNode* pCurrent, const OUString& sPath, vector<OUString>& rSuggestionList);
+ void collectSuggestions(std::u16string_view sPath, std::vector<OUString>& rSuggestionList);
+ static void collectSuggestionsForCurrentNode(TrieNode* pCurrent, std::u16string_view sPath, vector<OUString>& rSuggestionList);
};
TrieNode::TrieNode(sal_Unicode aCharacter) :
@@ -80,7 +84,7 @@ TrieNode* TrieNode::findChild(sal_Unicode aInputCharacter)
return nullptr;
}
-void TrieNode::collectSuggestions(const OUString& sPath, vector<OUString>& rSuggestionList)
+void TrieNode::collectSuggestions(std::u16string_view sPath, vector<OUString>& rSuggestionList)
{
// first traverse nodes for alphabet characters
for (auto const & pCurrent : mLatinArray)
@@ -97,7 +101,7 @@ void TrieNode::collectSuggestions(const OUString& sPath, vector<OUString>& rSugg
}
}
-void TrieNode::collectSuggestionsForCurrentNode(TrieNode* pCurrent, const OUString& sPath, vector<OUString>& rSuggestionList)
+void TrieNode::collectSuggestionsForCurrentNode(TrieNode* pCurrent, std::u16string_view sPath, vector<OUString>& rSuggestionList)
{
OUString aStringPath = sPath + OUStringChar(pCurrent->mCharacter);
if(pCurrent->mMarker)
@@ -179,7 +183,7 @@ size_t Trie::size() const
if (!mRoot)
return 0;
std::vector<OUString> entries;
- mRoot->collectSuggestions(OUString(), entries);
+ mRoot->collectSuggestions(std::u16string_view(), entries);
return entries.size();
}
diff --git a/embeddedobj/qa/cppunit/general.cxx b/embeddedobj/qa/cppunit/general.cxx
index b1a28828391c..815656519c83 100644
--- a/embeddedobj/qa/cppunit/general.cxx
+++ b/embeddedobj/qa/cppunit/general.cxx
@@ -69,7 +69,7 @@ CPPUNIT_TEST_FIXTURE(EmbeddedobjGeneralTest, testInsertFileConfig)
uno::Reference<embed::XStorage> xStorage = comphelper::OStorageHelper::GetTemporaryStorage();
comphelper::EmbeddedObjectContainer aContainer(xStorage);
OUString aFileName
- = m_directories.getURLFromSrc("embeddedobj/qa/cppunit/data/insert-file-config.doc");
+ = m_directories.getURLFromSrc(u"embeddedobj/qa/cppunit/data/insert-file-config.doc");
uno::Sequence<beans::PropertyValue> aMedium{ comphelper::makePropertyValue("URL", aFileName) };
OUString aName("Object 1");
uno::Reference<embed::XEmbeddedObject> xObject
@@ -102,7 +102,7 @@ CPPUNIT_TEST_FIXTURE(EmbeddedobjGeneralTest, testInsertFileConfigVsdx)
uno::Reference<embed::XStorage> xStorage = comphelper::OStorageHelper::GetTemporaryStorage();
comphelper::EmbeddedObjectContainer aContainer(xStorage);
OUString aFileName
- = m_directories.getURLFromSrc("embeddedobj/qa/cppunit/data/insert-file-config.vsdx");
+ = m_directories.getURLFromSrc(u"embeddedobj/qa/cppunit/data/insert-file-config.vsdx");
uno::Sequence<beans::PropertyValue> aMedium{ comphelper::makePropertyValue("URL", aFileName) };
OUString aName("Object 1");
uno::Reference<embed::XEmbeddedObject> xObject
@@ -135,7 +135,7 @@ CPPUNIT_TEST_FIXTURE(EmbeddedobjGeneralTest, testInsertFileConfigPdf)
uno::Reference<embed::XStorage> xStorage = comphelper::OStorageHelper::GetTemporaryStorage();
comphelper::EmbeddedObjectContainer aContainer(xStorage);
OUString aFileName
- = m_directories.getURLFromSrc("embeddedobj/qa/cppunit/data/insert-file-config.pdf");
+ = m_directories.getURLFromSrc(u"embeddedobj/qa/cppunit/data/insert-file-config.pdf");
uno::Sequence<beans::PropertyValue> aMedium{ comphelper::makePropertyValue("URL", aFileName) };
OUString aName("Object 1");
uno::Reference<embed::XEmbeddedObject> xObject
diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx
index 1d5da382a8f7..890457af909f 100644
--- a/embeddedobj/source/msole/oleembed.cxx
+++ b/embeddedobj/source/msole/oleembed.cxx
@@ -263,7 +263,7 @@ bool OleEmbeddedObject::TryToConvertToOOo( const uno::Reference< io::XStream >&
// the stream must be seekable
uno::Reference< io::XSeekable > xSeekable( xStream, uno::UNO_QUERY_THROW );
xSeekable->seek( 0 );
- m_aFilterName = OwnView_Impl::GetFilterNameFromExtentionAndInStream( m_xContext, OUString(), xStream->getInputStream() );
+ m_aFilterName = OwnView_Impl::GetFilterNameFromExtentionAndInStream( m_xContext, std::u16string_view(), xStream->getInputStream() );
if ( !m_aFilterName.isEmpty()
&& ( m_aFilterName == "Calc MS Excel 2007 XML" || m_aFilterName == "Impress MS PowerPoint 2007 XML" || m_aFilterName == "MS Word 2007 XML"
diff --git a/embeddedobj/source/msole/ownview.cxx b/embeddedobj/source/msole/ownview.cxx
index 9cb811b7c672..75a41d0a1ac9 100644
--- a/embeddedobj/source/msole/ownview.cxx
+++ b/embeddedobj/source/msole/ownview.cxx
@@ -179,7 +179,7 @@ bool OwnView_Impl::CreateModel( bool bUseNative )
OUString OwnView_Impl::GetFilterNameFromExtentionAndInStream(
const css::uno::Reference< css::uno::XComponentContext >& xContext,
- const OUString& aNameWithExtention,
+ std::u16string_view aNameWithExtention,
const uno::Reference< io::XInputStream >& xInputStream )
{
if ( !xInputStream.is() )
@@ -191,9 +191,9 @@ OUString OwnView_Impl::GetFilterNameFromExtentionAndInStream(
OUString aTypeName;
- if ( !aNameWithExtention.isEmpty() )
+ if ( !aNameWithExtention.empty() )
{
- OUString aURLToAnalyze = "file:///" + aNameWithExtention;
+ OUString aURLToAnalyze = OUString::Concat("file:///") + aNameWithExtention;
aTypeName = xTypeDetection->queryTypeByURL( aURLToAnalyze );
}
diff --git a/embeddedobj/source/msole/ownview.hxx b/embeddedobj/source/msole/ownview.hxx
index 5277602bb198..d939aff86013 100644
--- a/embeddedobj/source/msole/ownview.hxx
+++ b/embeddedobj/source/msole/ownview.hxx
@@ -19,6 +19,10 @@
#pragma once
+#include <sal/config.h>
+
+#include <string_view>
+
#include <com/sun/star/util/XCloseListener.hpp>
#include <com/sun/star/document/XEventListener.hpp>
#include <com/sun/star/frame/XModel.hpp>
@@ -57,7 +61,7 @@ private:
public:
static OUString GetFilterNameFromExtentionAndInStream(
const css::uno::Reference< css::uno::XComponentContext >& xContext,
- const OUString& aNameWithExtention,
+ std::u16string_view aNameWithExtention,
const css::uno::Reference< css::io::XInputStream >& xInputStream );
OwnView_Impl( const css::uno::Reference< css::uno::XComponentContext >& xContext,
diff --git a/emfio/qa/cppunit/emf/EmfImportTest.cxx b/emfio/qa/cppunit/emf/EmfImportTest.cxx
index a4e8cc920382..20e84ca86c4a 100644
--- a/emfio/qa/cppunit/emf/EmfImportTest.cxx
+++ b/emfio/qa/cppunit/emf/EmfImportTest.cxx
@@ -29,6 +29,7 @@
#include <vcl/BitmapReadAccess.hxx>
#include <memory>
+#include <string_view>
namespace
{
@@ -54,7 +55,7 @@ class Test : public test::BootstrapFixture, public XmlTestTools, public unotest:
void TestCreatePen();
void TestPdfInEmf();
- Primitive2DSequence parseEmf(const OUString& aSource);
+ Primitive2DSequence parseEmf(std::u16string_view aSource);
public:
void setUp() override;
@@ -89,7 +90,7 @@ void Test::tearDown()
test::BootstrapFixture::tearDown();
}
-Primitive2DSequence Test::parseEmf(const OUString& aSource)
+Primitive2DSequence Test::parseEmf(std::u16string_view aSource)
{
const Reference<XEmfParser> xEmfParser = EmfTools::create(m_xContext);
@@ -111,7 +112,7 @@ Primitive2DSequence Test::parseEmf(const OUString& aSource)
void Test::testPolyPolygon()
{
- Primitive2DSequence aSequence = parseEmf("/emfio/qa/cppunit/emf/data/fdo79679-2.emf");
+ Primitive2DSequence aSequence = parseEmf(u"/emfio/qa/cppunit/emf/data/fdo79679-2.emf");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequence.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
xmlDocUniquePtr pDocument = dumper.dumpAndParse(comphelper::sequenceToContainer<Primitive2DContainer>(aSequence));
@@ -151,7 +152,7 @@ void Test::TestDrawString()
// Since the text is undecorated the optimal choice is a simpletextportion primitive
// first, get the sequence of primitives and dump it
- Primitive2DSequence aSequence = parseEmf("/emfio/qa/cppunit/emf/data/TestDrawString.emf");
+ Primitive2DSequence aSequence = parseEmf(u"/emfio/qa/cppunit/emf/data/TestDrawString.emf");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequence.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
xmlDocUniquePtr pDocument = dumper.dumpAndParse(comphelper::sequenceToContainer<Primitive2DContainer>(aSequence));
@@ -173,7 +174,7 @@ void Test::TestDrawStringTransparent()
// This unit checks for a correct import of an EMF+ file with one DrawString Record with transparency
// first, get the sequence of primitives and dump it
- Primitive2DSequence aSequence = parseEmf("/emfio/qa/cppunit/emf/data/TestDrawStringTransparent.emf");
+ Primitive2DSequence aSequence = parseEmf(u"/emfio/qa/cppunit/emf/data/TestDrawStringTransparent.emf");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequence.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
xmlDocUniquePtr pDocument = dumper.dumpAndParse(comphelper::sequenceToContainer<Primitive2DContainer>(aSequence));
@@ -196,7 +197,7 @@ void Test::TestDrawLine()
// The line is colored and has a specified width, therefore a polypolygonstroke primitive is the optimal choice
// first, get the sequence of primitives and dump it
- Primitive2DSequence aSequence = parseEmf("/emfio/qa/cppunit/emf/data/TestDrawLine.emf");
+ Primitive2DSequence aSequence = parseEmf(u"/emfio/qa/cppunit/emf/data/TestDrawLine.emf");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequence.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
xmlDocUniquePtr pDocument = dumper.dumpAndParse(comphelper::sequenceToContainer<Primitive2DContainer>(aSequence));
@@ -210,7 +211,7 @@ void Test::TestDrawLine()
void Test::TestLinearGradient()
{
// This unit checks for a correct import of an EMF+ file with LinearGradient brush
- Primitive2DSequence aSequence = parseEmf("/emfio/qa/cppunit/emf/data/TestLinearGradient.emf");
+ Primitive2DSequence aSequence = parseEmf(u"/emfio/qa/cppunit/emf/data/TestLinearGradient.emf");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequence.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
xmlDocUniquePtr pDocument = dumper.dumpAndParse(comphelper::sequenceToContainer<Primitive2DContainer>(aSequence));
@@ -244,7 +245,7 @@ void Test::TestTextMapMode()
{
// Check import of EMF image with records: SETMAPMODE with MM_TEXT MapMode, POLYLINE16, EXTCREATEPEN, EXTTEXTOUTW
// MM_TEXT is mapped to one device pixel. Positive x is to the right; positive y is down.
- Primitive2DSequence aSequence = parseEmf("/emfio/qa/cppunit/emf/data/TextMapMode.emf");
+ Primitive2DSequence aSequence = parseEmf(u"/emfio/qa/cppunit/emf/data/TextMapMode.emf");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequence.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
xmlDocUniquePtr pDocument = dumper.dumpAndParse(comphelper::sequenceToContainer<Primitive2DContainer>(aSequence));
@@ -278,7 +279,7 @@ void Test::TestEnglishMapMode()
{
// Check import of EMF image with records: SETMAPMODE with MM_ENGLISH MapMode, STROKEANDFILLPATH, EXTTEXTOUTW, SETTEXTALIGN, STRETCHDIBITS
// MM_LOENGLISH is mapped to 0.01 inch. Positive x is to the right; positive y is up.M
- Primitive2DSequence aSequence = parseEmf("/emfio/qa/cppunit/emf/data/test_mm_hienglish_ref.emf");
+ Primitive2DSequence aSequence = parseEmf(u"/emfio/qa/cppunit/emf/data/test_mm_hienglish_ref.emf");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequence.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
xmlDocUniquePtr pDocument = dumper.dumpAndParse(comphelper::sequenceToContainer<Primitive2DContainer>(aSequence));
@@ -313,7 +314,7 @@ void Test::TestCreatePen()
{
// Check import of EMF image with records: RESTOREDC, SAVEDC, MOVETOEX, LINETO, POLYLINE16, EXTTEXTOUTW with DxBuffer
// The CREATEPEN record is used with PS_COSMETIC line style, which will be displayed as solid hairline
- Primitive2DSequence aSequence = parseEmf("/emfio/qa/cppunit/emf/data/TestCreatePen.emf");
+ Primitive2DSequence aSequence = parseEmf(u"/emfio/qa/cppunit/emf/data/TestCreatePen.emf");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequence.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
xmlDocUniquePtr pDocument = dumper.dumpAndParse(comphelper::sequenceToContainer<Primitive2DContainer>(aSequence));
@@ -362,7 +363,7 @@ void Test::TestCreatePen()
void Test::TestPdfInEmf()
{
// Load a PPTX file, which has a shape, with a bitmap fill, which is an EMF, containing a PDF.
- OUString aURL = m_directories.getURLFromSrc("emfio/qa/cppunit/emf/data/pdf-in-emf.pptx");
+ OUString aURL = m_directories.getURLFromSrc(u"emfio/qa/cppunit/emf/data/pdf-in-emf.pptx");
getComponent() = loadFromDesktop(aURL);
// Get the EMF.
diff --git a/emfio/qa/cppunit/wmf/wmfimporttest.cxx b/emfio/qa/cppunit/wmf/wmfimporttest.cxx
index 5dfcfdad2041..9be21a2735bd 100644
--- a/emfio/qa/cppunit/wmf/wmfimporttest.cxx
+++ b/emfio/qa/cppunit/wmf/wmfimporttest.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <test/xmltesttools.hxx>
#include <test/bootstrapfixture.hxx>
#include <vcl/gdimtf.hxx>
@@ -29,7 +33,7 @@ class WmfTest : public test::BootstrapFixture, public XmlTestTools
{
OUString maDataUrl;
- OUString getFullUrl(const OUString& sFileName)
+ OUString getFullUrl(std::u16string_view sFileName)
{
return m_directories.getURLFromSrc(maDataUrl) + sFileName;
}
@@ -66,7 +70,7 @@ public:
void WmfTest::testNonPlaceableWmf()
{
- SvFileStream aFileStream(getFullUrl("visio_import_source.wmf"), StreamMode::READ);
+ SvFileStream aFileStream(getFullUrl(u"visio_import_source.wmf"), StreamMode::READ);
GDIMetaFile aGDIMetaFile;
ReadWindowMetafile(aFileStream, aGDIMetaFile);
@@ -95,7 +99,7 @@ void WmfTest::testNonPlaceableWmf()
void WmfTest::testSine()
{
- SvFileStream aFileStream(getFullUrl("sine_wave.emf"), StreamMode::READ);
+ SvFileStream aFileStream(getFullUrl(u"sine_wave.emf"), StreamMode::READ);
GDIMetaFile aGDIMetaFile;
ReadWindowMetafile(aFileStream, aGDIMetaFile);
@@ -111,7 +115,7 @@ void WmfTest::testSine()
void WmfTest::testEmfProblem()
{
- SvFileStream aFileStream(getFullUrl("computer_mail.emf"), StreamMode::READ);
+ SvFileStream aFileStream(getFullUrl(u"computer_mail.emf"), StreamMode::READ);
GDIMetaFile aGDIMetaFile;
ReadWindowMetafile(aFileStream, aGDIMetaFile);
@@ -130,7 +134,7 @@ void WmfTest::testEmfProblem()
void WmfTest::testEmfLineStyles()
{
- SvFileStream aFileStream(getFullUrl("line_styles.emf"), StreamMode::READ);
+ SvFileStream aFileStream(getFullUrl(u"line_styles.emf"), StreamMode::READ);
GDIMetaFile aGDIMetaFile;
ReadWindowMetafile(aFileStream, aGDIMetaFile);
@@ -190,7 +194,7 @@ void WmfTest::testEmfLineStyles()
void WmfTest::testWorldTransformFontSize()
{
- SvFileStream aFileStream(getFullUrl("image1.emf"), StreamMode::READ);
+ SvFileStream aFileStream(getFullUrl(u"image1.emf"), StreamMode::READ);
GDIMetaFile aGDIMetaFile;
ReadWindowMetafile(aFileStream, aGDIMetaFile);
@@ -220,7 +224,7 @@ void WmfTest::testWorldTransformFontSize()
void WmfTest::testTdf93750()
{
- SvFileStream aFileStream(getFullUrl("tdf93750.emf"), StreamMode::READ);
+ SvFileStream aFileStream(getFullUrl(u"tdf93750.emf"), StreamMode::READ);
GDIMetaFile aGDIMetaFile;
ReadWindowMetafile(aFileStream, aGDIMetaFile);
diff --git a/extensions/qa/update/test_update.cxx b/extensions/qa/update/test_update.cxx
index fe6316245cc4..f99855dc6198 100644
--- a/extensions/qa/update/test_update.cxx
+++ b/extensions/qa/update/test_update.cxx
@@ -38,7 +38,7 @@ public:
// repositories that we will be checking
m_aRepositoryList.realloc( 1 );
- m_aRepositoryList[0] = m_directories.getURLFromSrc( "/extensions/qa/update/simple.xml" );
+ m_aRepositoryList[0] = m_directories.getURLFromSrc( u"/extensions/qa/update/simple.xml" );
}
virtual void tearDown() override
@@ -102,10 +102,10 @@ protected:
rtl::Reference< UpdateCheck > aController( UpdateCheck::get() );
if ( checkForUpdates( aInfo, m_xContext, aController->getInteractionHandler(), m_xProvider,
- "Linux",
- "x86",
+ u"Linux",
+ u"x86",
m_aRepositoryList,
- "111111-222222-333333-444444",
+ u"111111-222222-333333-444444",
"InstallSetID" ) )
{
CPPUNIT_ASSERT_EQUAL( std::size_t(1), aInfo.Sources.size() );
@@ -122,10 +122,10 @@ protected:
rtl::Reference< UpdateCheck > aController( UpdateCheck::get() );
if ( checkForUpdates( aInfo, m_xContext, aController->getInteractionHandler(), m_xProvider,
- "Linux",
- "x86",
+ u"Linux",
+ u"x86",
m_aRepositoryList,
- "123456-abcdef-1a2b3c-4d5e6f",
+ u"123456-abcdef-1a2b3c-4d5e6f",
"InstallSetID" ) )
{
CPPUNIT_ASSERT( aInfo.Sources.empty() );
diff --git a/extensions/source/propctrlr/eformshelper.cxx b/extensions/source/propctrlr/eformshelper.cxx
index 196bce45ddf7..94f8e7a4b969 100644
--- a/extensions/source/propctrlr/eformshelper.cxx
+++ b/extensions/source/propctrlr/eformshelper.cxx
@@ -18,6 +18,8 @@
*/
#include <memory>
+#include <string_view>
+
#include "eformshelper.hxx"
#include "formstrings.hxx"
#include <strings.hrc>
@@ -54,9 +56,9 @@ namespace pcr
namespace
{
- OUString composeModelElementUIName( const OUString& _rModelName, const OUString& _rElementName )
+ OUString composeModelElementUIName( std::u16string_view _rModelName, std::u16string_view _rElementName )
{
- OUString a = "["
+ OUString a = OUString::Concat("[")
+ _rModelName + "] "
+ _rElementName;
return a;
diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx
index 45a27113aff5..4ec979682aea 100644
--- a/extensions/source/propctrlr/eventhandler.cxx
+++ b/extensions/source/propctrlr/eventhandler.cxx
@@ -63,6 +63,7 @@
#include <map>
#include <algorithm>
#include <iterator>
+#include <string_view>
namespace pcr
{
@@ -195,7 +196,7 @@ namespace pcr
return true;
}
- OUString lcl_getEventPropertyName( const OUString& _rListenerClassName, const OUString& _rMethodName )
+ OUString lcl_getEventPropertyName( std::u16string_view _rListenerClassName, std::u16string_view _rMethodName )
{
return _rListenerClassName + OUStringChar(';') + _rMethodName;
}
diff --git a/extensions/source/update/check/updateprotocol.cxx b/extensions/source/update/check/updateprotocol.cxx
index 369489fed399..4417565c4752 100644
--- a/extensions/source/update/check/updateprotocol.cxx
+++ b/extensions/source/update/check/updateprotocol.cxx
@@ -101,10 +101,10 @@ checkForUpdates(
const uno::Reference< uno::XComponentContext > & rxContext,
const uno::Reference< task::XInteractionHandler > & rxInteractionHandler,
const uno::Reference< deployment::XUpdateInformationProvider >& rUpdateInfoProvider,
- const OUString &rOS,
- const OUString &rArch,
+ std::u16string_view rOS,
+ std::u16string_view rArch,
const uno::Sequence< OUString > &rRepositoryList,
- const OUString &rGitID,
+ std::u16string_view rGitID,
const OUString &rInstallSetID )
{
if( !rxContext.is() )
@@ -129,7 +129,7 @@ checkForUpdates(
return false; // something went wrong ..
OUString aXPathExpression =
- "/child::inst:description[inst:os=\'"+
+ OUString::Concat("/child::inst:description[inst:os=\'")+
rOS +
"\' and inst:arch=\'"+
rArch +
diff --git a/extensions/source/update/check/updateprotocol.hxx b/extensions/source/update/check/updateprotocol.hxx
index 5b6422a02e1b..248fe2b2a389 100644
--- a/extensions/source/update/check/updateprotocol.hxx
+++ b/extensions/source/update/check/updateprotocol.hxx
@@ -20,6 +20,10 @@
#ifndef INCLUDED_EXTENSIONS_SOURCE_UPDATE_CHECK_UPDATEPROTOCOL_HXX
#define INCLUDED_EXTENSIONS_SOURCE_UPDATE_CHECK_UPDATEPROTOCOL_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/task/XInteractionHandler.hpp>
#include <com/sun/star/deployment/XUpdateInformationProvider.hpp>
@@ -41,10 +45,10 @@ checkForUpdates(
const css::uno::Reference< css::uno::XComponentContext > & rxContext,
const css::uno::Reference< css::task::XInteractionHandler > & rxInteractionHandler,
const css::uno::Reference< css::deployment::XUpdateInformationProvider >& rUpdateInfoProvider,
- const OUString &rOS,
- const OUString &rArch,
+ std::u16string_view rOS,
+ std::u16string_view rArch,
const css::uno::Sequence< OUString > &rRepositoryList,
- const OUString &rGitID,
+ std::u16string_view rGitID,
const OUString &rInstallID
);
diff --git a/extensions/source/update/feed/updatefeed.cxx b/extensions/source/update/feed/updatefeed.cxx
index 0e00bcd18848..153233bbb67c 100644
--- a/extensions/source/update/feed/updatefeed.cxx
+++ b/extensions/source/update/feed/updatefeed.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <config_folders.h>
#include <cppuhelper/exc_hlp.hxx>
@@ -120,7 +124,7 @@ class UpdateInformationProvider :
bool isUserAgentExtended() const;
public:
uno::Reference< xml::dom::XElement > getDocumentRoot(const uno::Reference< xml::dom::XNode >& rxNode);
- uno::Reference< xml::dom::XNode > getChildNode(const uno::Reference< xml::dom::XNode >& rxNode, const OUString& rName);
+ uno::Reference< xml::dom::XNode > getChildNode(const uno::Reference< xml::dom::XNode >& rxNode, std::u16string_view rName);
// XUpdateInformationService
@@ -220,14 +224,14 @@ public:
uno::Reference< xml::dom::XNode > xAtomEntryNode( m_xNodeList->item(m_nCount++) );
uno::Reference< xml::dom::XNode > xSummaryNode(
- m_xUpdateInformationProvider->getChildNode( xAtomEntryNode, "summary/text()" )
+ m_xUpdateInformationProvider->getChildNode( xAtomEntryNode, u"summary/text()" )
);
if( xSummaryNode.is() )
aEntry.Description = xSummaryNode->getNodeValue();
uno::Reference< xml::dom::XNode > xContentNode(
- m_xUpdateInformationProvider->getChildNode( xAtomEntryNode, "content" ) );
+ m_xUpdateInformationProvider->getChildNode( xAtomEntryNode, u"content" ) );
if( xContentNode.is() )
aEntry.UpdateDocument = m_xUpdateInformationProvider->getDocumentRoot(xContentNode);
@@ -532,11 +536,11 @@ UpdateInformationProvider::getDocumentRoot(const uno::Reference< xml::dom::XNode
uno::Reference< xml::dom::XNode >
UpdateInformationProvider::getChildNode(const uno::Reference< xml::dom::XNode >& rxNode,
- const OUString& rName)
+ std::u16string_view rName)
{
OSL_ASSERT(m_xXPathAPI.is());
try {
- return m_xXPathAPI->selectSingleNode(rxNode, "./atom:" + rName);
+ return m_xXPathAPI->selectSingleNode(rxNode, OUString::Concat("./atom:") + rName);
} catch (const xml::xpath::XPathException &) {
// ignore
return nullptr;
diff --git a/filter/qa/cppunit/filters-dxf-test.cxx b/filter/qa/cppunit/filters-dxf-test.cxx
index dcadeae17d19..2dddac45d026 100644
--- a/filter/qa/cppunit/filters-dxf-test.cxx
+++ b/filter/qa/cppunit/filters-dxf-test.cxx
@@ -57,7 +57,7 @@ bool DxfFilterTest::load(const OUString &,
void DxfFilterTest::testCVEs()
{
testDir(OUString(),
- m_directories.getURLFromSrc("/filter/qa/cppunit/data/dxf/"));
+ m_directories.getURLFromSrc(u"/filter/qa/cppunit/data/dxf/"));
}
CPPUNIT_TEST_SUITE_REGISTRATION(DxfFilterTest);
diff --git a/filter/qa/cppunit/filters-eps-test.cxx b/filter/qa/cppunit/filters-eps-test.cxx
index a79bcab7f596..d3f7a18220d5 100644
--- a/filter/qa/cppunit/filters-eps-test.cxx
+++ b/filter/qa/cppunit/filters-eps-test.cxx
@@ -57,7 +57,7 @@ bool EpsFilterTest::load(const OUString &,
void EpsFilterTest::testCVEs()
{
testDir(OUString(),
- m_directories.getURLFromSrc("/filter/qa/cppunit/data/eps/"));
+ m_directories.getURLFromSrc(u"/filter/qa/cppunit/data/eps/"));
}
CPPUNIT_TEST_SUITE_REGISTRATION(EpsFilterTest);
diff --git a/filter/qa/cppunit/filters-met-test.cxx b/filter/qa/cppunit/filters-met-test.cxx
index 596be1237be9..e850a06a37df 100644
--- a/filter/qa/cppunit/filters-met-test.cxx
+++ b/filter/qa/cppunit/filters-met-test.cxx
@@ -57,7 +57,7 @@ bool MetFilterTest::load(const OUString &,
void MetFilterTest::testCVEs()
{
testDir(OUString(),
- m_directories.getURLFromSrc("/filter/qa/cppunit/data/met/"));
+ m_directories.getURLFromSrc(u"/filter/qa/cppunit/data/met/"));
}
CPPUNIT_TEST_SUITE_REGISTRATION(MetFilterTest);
diff --git a/filter/qa/cppunit/filters-pcd-test.cxx b/filter/qa/cppunit/filters-pcd-test.cxx
index 2104b539653a..dc32e33469e7 100644
--- a/filter/qa/cppunit/filters-pcd-test.cxx
+++ b/filter/qa/cppunit/filters-pcd-test.cxx
@@ -57,7 +57,7 @@ bool PcdFilterTest::load(const OUString &,
void PcdFilterTest::testCVEs()
{
testDir(OUString(),
- m_directories.getURLFromSrc("/filter/qa/cppunit/data/pcd/"));
+ m_directories.getURLFromSrc(u"/filter/qa/cppunit/data/pcd/"));
}
CPPUNIT_TEST_SUITE_REGISTRATION(PcdFilterTest);
diff --git a/filter/qa/cppunit/filters-pcx-test.cxx b/filter/qa/cppunit/filters-pcx-test.cxx
index 1c8faa01a3e8..3a28e24626fa 100644
--- a/filter/qa/cppunit/filters-pcx-test.cxx
+++ b/filter/qa/cppunit/filters-pcx-test.cxx
@@ -57,7 +57,7 @@ bool PcxFilterTest::load(const OUString &,
void PcxFilterTest::testCVEs()
{
testDir(OUString(),
- m_directories.getURLFromSrc("/filter/qa/cppunit/data/pcx/"));
+ m_directories.getURLFromSrc(u"/filter/qa/cppunit/data/pcx/"));
}
CPPUNIT_TEST_SUITE_REGISTRATION(PcxFilterTest);
diff --git a/filter/qa/cppunit/filters-pict-test.cxx b/filter/qa/cppunit/filters-pict-test.cxx
index 7b62c71b9d32..b4f0432441db 100644
--- a/filter/qa/cppunit/filters-pict-test.cxx
+++ b/filter/qa/cppunit/filters-pict-test.cxx
@@ -43,7 +43,7 @@ public:
OUString pictURL()
{
- return m_directories.getURLFromSrc("/filter/qa/cppunit/data/pict/");
+ return m_directories.getURLFromSrc(u"/filter/qa/cppunit/data/pict/");
}
/**
diff --git a/filter/qa/cppunit/filters-ppm-test.cxx b/filter/qa/cppunit/filters-ppm-test.cxx
index 1a11eedd5d38..43ae966a0c57 100644
--- a/filter/qa/cppunit/filters-ppm-test.cxx
+++ b/filter/qa/cppunit/filters-ppm-test.cxx
@@ -57,10 +57,10 @@ bool PpmFilterTest::load(const OUString &,
void PpmFilterTest::testCVEs()
{
testDir(OUString(),
- m_directories.getURLFromSrc("/filter/qa/cppunit/data/ppm/"));
+ m_directories.getURLFromSrc(u"/filter/qa/cppunit/data/ppm/"));
testDir(OUString(),
- m_directories.getURLFromSrc("/filter/qa/cppunit/data/pbm/"));
+ m_directories.getURLFromSrc(u"/filter/qa/cppunit/data/pbm/"));
}
CPPUNIT_TEST_SUITE_REGISTRATION(PpmFilterTest);
diff --git a/filter/qa/cppunit/filters-psd-test.cxx b/filter/qa/cppunit/filters-psd-test.cxx
index 3b983df1d1f5..7a3447a1b1ec 100644
--- a/filter/qa/cppunit/filters-psd-test.cxx
+++ b/filter/qa/cppunit/filters-psd-test.cxx
@@ -57,7 +57,7 @@ bool PsdFilterTest::load(const OUString &,
void PsdFilterTest::testCVEs()
{
testDir(OUString(),
- m_directories.getURLFromSrc("/filter/qa/cppunit/data/psd/"));
+ m_directories.getURLFromSrc(u"/filter/qa/cppunit/data/psd/"));
}
CPPUNIT_TEST_SUITE_REGISTRATION(PsdFilterTest);
diff --git a/filter/qa/cppunit/filters-ras-test.cxx b/filter/qa/cppunit/filters-ras-test.cxx
index 0c5b0df1a12b..2f3b678e4e0a 100644
--- a/filter/qa/cppunit/filters-ras-test.cxx
+++ b/filter/qa/cppunit/filters-ras-test.cxx
@@ -57,7 +57,7 @@ bool RasFilterTest::load(const OUString &,
void RasFilterTest::testCVEs()
{
testDir(OUString(),
- m_directories.getURLFromSrc("/filter/qa/cppunit/data/ras/"));
+ m_directories.getURLFromSrc(u"/filter/qa/cppunit/data/ras/"));
}
CPPUNIT_TEST_SUITE_REGISTRATION(RasFilterTest);
diff --git a/filter/qa/cppunit/filters-tga-test.cxx b/filter/qa/cppunit/filters-tga-test.cxx
index 53f424dac78e..c87216803120 100644
--- a/filter/qa/cppunit/filters-tga-test.cxx
+++ b/filter/qa/cppunit/filters-tga-test.cxx
@@ -57,7 +57,7 @@ bool TgaFilterTest::load(const OUString &,
void TgaFilterTest::testCVEs()
{
testDir(OUString(),
- m_directories.getURLFromSrc("/filter/qa/cppunit/data/tga/"));
+ m_directories.getURLFromSrc(u"/filter/qa/cppunit/data/tga/"));
}
CPPUNIT_TEST_SUITE_REGISTRATION(TgaFilterTest);
diff --git a/filter/qa/cppunit/filters-tiff-test.cxx b/filter/qa/cppunit/filters-tiff-test.cxx
index 93968e9be9b7..a1ce322a4614 100644
--- a/filter/qa/cppunit/filters-tiff-test.cxx
+++ b/filter/qa/cppunit/filters-tiff-test.cxx
@@ -38,7 +38,7 @@ public:
OUString getUrl()
{
- return m_directories.getURLFromSrc("/filter/qa/cppunit/data/tiff/");
+ return m_directories.getURLFromSrc(u"/filter/qa/cppunit/data/tiff/");
}
/**
diff --git a/filter/qa/cppunit/xslt-test.cxx b/filter/qa/cppunit/xslt-test.cxx
index 24740097b4a5..1dcb2a7d5455 100644
--- a/filter/qa/cppunit/xslt-test.cxx
+++ b/filter/qa/cppunit/xslt-test.cxx
@@ -96,14 +96,14 @@ void XsltFilterTest::testXsltCopyNew()
osl_closeFile(tempFile); // close it so xSFA can open it on WNT
OUString source(
- m_directories.getURLFromSrc("/filter/source/xsltfilter/xsltfilter.component"));
+ m_directories.getURLFromSrc(u"/filter/source/xsltfilter/xsltfilter.component"));
uno::Sequence<uno::Any> args(7);
args[0] <<= beans::NamedValue("StylesheetURL",
- uno::makeAny(m_directories.getURLFromSrc("/filter/qa/cppunit/data/xslt/copy.xslt")));
+ uno::makeAny(m_directories.getURLFromSrc(u"/filter/qa/cppunit/data/xslt/copy.xslt")));
args[1] <<= beans::NamedValue("SourceURL", uno::makeAny(source));
args[2] <<= beans::NamedValue("TargetURL", uno::makeAny(tempURL));
args[3] <<= beans::NamedValue("SourceBaseURL",
- uno::makeAny(m_directories.getURLFromSrc("/filter/source/xsltfilter/")));
+ uno::makeAny(m_directories.getURLFromSrc(u"/filter/source/xsltfilter/")));
args[4] <<= beans::NamedValue("TargetBaseURL", uno::makeAny(tempDirURL));
args[5] <<= beans::NamedValue("SystemType", uno::makeAny(OUString()));
args[6] <<= beans::NamedValue("PublicType", uno::makeAny(OUString()));
@@ -150,14 +150,14 @@ void XsltFilterTest::testXsltCopyOld()
osl_closeFile(tempFile); // close it so xSFA can open it on WNT
OUString source(
- m_directories.getURLFromSrc("/filter/source/xsltfilter/xsltfilter.component"));
+ m_directories.getURLFromSrc(u"/filter/source/xsltfilter/xsltfilter.component"));
uno::Sequence<uno::Any> args(7);
args[0] <<= beans::NamedValue("StylesheetURL",
- uno::makeAny(m_directories.getURLFromSrc("/filter/qa/cppunit/data/xslt/copy.xslt")));
+ uno::makeAny(m_directories.getURLFromSrc(u"/filter/qa/cppunit/data/xslt/copy.xslt")));
args[1] <<= beans::NamedValue("SourceURL", uno::makeAny(source));
args[2] <<= beans::NamedValue("TargetURL", uno::makeAny(tempURL));
args[3] <<= beans::NamedValue("SourceBaseURL",
- uno::makeAny(m_directories.getURLFromSrc("/filter/source/xsltfilter/")));
+ uno::makeAny(m_directories.getURLFromSrc(u"/filter/source/xsltfilter/")));
args[4] <<= beans::NamedValue("TargetBaseURL", uno::makeAny(tempDirURL));
args[5] <<= beans::NamedValue("SystemType", uno::makeAny(OUString()));
args[6] <<= beans::NamedValue("PublicType", uno::makeAny(OUString()));
diff --git a/filter/qa/unit/filter-dialogs-test.cxx b/filter/qa/unit/filter-dialogs-test.cxx
index d74f1dadc0ee..946a1961d106 100644
--- a/filter/qa/unit/filter-dialogs-test.cxx
+++ b/filter/qa/unit/filter-dialogs-test.cxx
@@ -51,7 +51,7 @@ VclPtr<VclAbstractDialog> FilterDialogsTest::createDialogByID(sal_uInt32 /*nID*/
void FilterDialogsTest::openAnyDialog()
{
/// process input file containing the UXMLDescriptions of the dialogs to dump
- processDialogBatchFile("filter/qa/unit/data/filter-dialogs-test.txt");
+ processDialogBatchFile(u"filter/qa/unit/data/filter-dialogs-test.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(FilterDialogsTest);
diff --git a/filter/qa/unit/svg.cxx b/filter/qa/unit/svg.cxx
index d870307a1c4d..3fbf8369b38b 100644
--- a/filter/qa/unit/svg.cxx
+++ b/filter/qa/unit/svg.cxx
@@ -7,6 +7,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <test/bootstrapfixture.hxx>
#include <unotest/macros_test.hxx>
#include <test/xmltesttools.hxx>
@@ -33,7 +37,7 @@ public:
void tearDown() override;
void registerNamespaces(xmlXPathContextPtr& pXmlXpathCtx) override;
uno::Reference<lang::XComponent>& getComponent() { return mxComponent; }
- void load(const OUString& rURL);
+ void load(std::u16string_view rURL);
};
void SvgFilterTest::setUp()
@@ -51,7 +55,7 @@ void SvgFilterTest::tearDown()
test::BootstrapFixture::tearDown();
}
-void SvgFilterTest::load(const OUString& rFileName)
+void SvgFilterTest::load(std::u16string_view rFileName)
{
OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + rFileName;
mxComponent = loadFromDesktop(aURL);
@@ -66,7 +70,7 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, testPreserveJpg)
{
#if !defined(MACOSX)
// Load a document with a jpeg image in it.
- load("preserve-jpg.odt");
+ load(u"preserve-jpg.odt");
// Select the image.
dispatchCommand(getComponent(), ".uno:JumpToNextFrame", {});
@@ -97,7 +101,7 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, testPreserveJpg)
CPPUNIT_TEST_FIXTURE(SvgFilterTest, testSemiTransparentLine)
{
// Load a document with a semi-transparent line shape.
- load("semi-transparent-line.odg");
+ load(u"semi-transparent-line.odg");
// Export it to SVG.
uno::Reference<frame::XStorable> xStorable(getComponent(), uno::UNO_QUERY_THROW);
@@ -129,7 +133,7 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, testSemiTransparentText)
// correct transparency factor applied for the first shape.
// Load draw document with transparent text in one box
- load("TransparentText.odg");
+ load(u"TransparentText.odg");
// Export to SVG.
uno::Reference<frame::XStorable> xStorable(getComponent(), uno::UNO_QUERY_THROW);
@@ -163,7 +167,7 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, testSemiTransparentText)
CPPUNIT_TEST_FIXTURE(SvgFilterTest, testShapeNographic)
{
// Load a document containing a 3D shape.
- load("shape-nographic.odp");
+ load(u"shape-nographic.odp");
// Export to SVG.
uno::Reference<frame::XStorable> xStorable(getComponent(), uno::UNO_QUERY_THROW);
diff --git a/filter/source/msfilter/mstoolbar.cxx b/filter/source/msfilter/mstoolbar.cxx
index 336eed1b59ef..817844e2364b 100644
--- a/filter/source/msfilter/mstoolbar.cxx
+++ b/filter/source/msfilter/mstoolbar.cxx
@@ -92,11 +92,12 @@ CustomToolBarImportHelper::getCfgManager()
uno::Any
-CustomToolBarImportHelper::createCommandFromMacro( const OUString& sCmd )
+CustomToolBarImportHelper::createCommandFromMacro( std::u16string_view sCmd )
{
//"vnd.sun.star.script:Standard.Module1.Main?language=Basic&location=document"
// create script url
- OUString scriptURL = "vnd.sun.star.script:" + sCmd + "?language=Basic&location=document";
+ OUString scriptURL
+ = OUString::Concat("vnd.sun.star.script:") + sCmd + "?language=Basic&location=document";
return uno::makeAny( scriptURL );
}
diff --git a/filter/source/msfilter/msvbahelper.cxx b/filter/source/msfilter/msvbahelper.cxx
index 1d1c877c652c..d6e4442c2584 100644
--- a/filter/source/msfilter/msvbahelper.cxx
+++ b/filter/source/msfilter/msvbahelper.cxx
@@ -51,7 +51,7 @@ namespace ooo::vba {
constexpr OUStringLiteral sUrlPart0( u"vnd.sun.star.script:" );
constexpr OUStringLiteral sUrlPart1( u"?language=Basic&location=document" );
-OUString makeMacroURL( const OUString& sMacroName )
+OUString makeMacroURL( std::u16string_view sMacroName )
{
return sUrlPart0 + sMacroName + sUrlPart1;
}
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 31f712c47edf..050c1aa4d5cc 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -59,8 +59,8 @@ ImpPDFTabDialog::ImpPDFTabDialog(weld::Window* pParent, Sequence< PropertyValue
: SfxTabDialogController(pParent, "filter/ui/pdfoptionsdialog.ui", "PdfOptionsDialog"),
mrDoc(rxDoc),
mpParent(pParent),
- maConfigItem( "Office.Common/Filter/PDF/Export/", &rFilterData ),
- maConfigI18N( "Office.Common/I18N/CTL/" ),
+ maConfigItem( u"Office.Common/Filter/PDF/Export/", &rFilterData ),
+ maConfigI18N( u"Office.Common/I18N/CTL/" ),
mbIsPresentation( false ),
mbIsSpreadsheet( false ),
mbIsWriter( false ),
diff --git a/filter/source/pdf/pdffilter.cxx b/filter/source/pdf/pdffilter.cxx
index 3bdc5a8cb756..4d8580420670 100644
--- a/filter/source/pdf/pdffilter.cxx
+++ b/filter/source/pdf/pdffilter.cxx
@@ -76,7 +76,7 @@ bool PDFFilter::implExport( const Sequence< PropertyValue >& rDescriptor )
to pdf, but we have to use the last user settings (especially for the CompressMode) */
if ( !aFilterData.hasElements() )
{
- FilterConfigItem aCfgItem( "Office.Common/Filter/PDF/Export/" );
+ FilterConfigItem aCfgItem( u"Office.Common/Filter/PDF/Export/" );
aCfgItem.ReadBool( "UseLosslessCompression", false );
aCfgItem.ReadInt32( "Quality", 90 );
aCfgItem.ReadBool( "ReduceImageResolution", false );
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index a77457687076..cb80cfd7f643 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -63,6 +63,7 @@
#include <tools/diagnose_ex.h>
#include <memory>
+#include <string_view>
using namespace css::animations;
using namespace css::presentation;
@@ -1023,7 +1024,7 @@ void SVGFilter::implExportDocumentHeaderWriterOrCalc(sal_Int32 nDocX, sal_Int32
template< typename TextFieldType >
static OUString implGenerateFieldId( std::vector< std::unique_ptr<TextField> > & aFieldSet,
const TextFieldType & aField,
- const OUString & sOOOElemField,
+ std::u16string_view sOOOElemField,
const Reference< css::drawing::XDrawPage >& xMasterPage )
{
bool bFound = false;
@@ -1037,7 +1038,7 @@ static OUString implGenerateFieldId( std::vector< std::unique_ptr<TextField> > &
break;
}
}
- OUString sFieldId(sOOOElemField + "_");
+ OUString sFieldId(OUString::Concat(sOOOElemField) + "_");
if( !bFound )
{
aFieldSet.emplace_back( new TextFieldType( aField ) );
@@ -1708,7 +1709,7 @@ void SVGFilter::implExportDrawPages( const std::vector< Reference< css::drawing:
}
-bool SVGFilter::implExportPage( const OUString & sPageId,
+bool SVGFilter::implExportPage( std::u16string_view sPageId,
const Reference< css::drawing::XDrawPage > & rxPage,
const Reference< css::drawing::XShapes > & xShapes,
bool bMaster )
@@ -1746,7 +1747,7 @@ bool SVGFilter::implExportPage( const OUString & sPageId,
if( rMtf.GetActionSize() )
{
// background id = "bg-" + page id
- OUString sBackgroundId = "bg-" + sPageId;
+ OUString sBackgroundId = OUString::Concat("bg-") + sPageId;
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", sBackgroundId );
// At present (LibreOffice 3.4.0) the 'IsBackgroundVisible' property is not handled
@@ -1780,7 +1781,7 @@ bool SVGFilter::implExportPage( const OUString & sPageId,
if( bMaster )
{
// background objects id = "bo-" + page id
- OUString sBackgroundObjectsId = "bo-" + sPageId;
+ OUString sBackgroundObjectsId = OUString::Concat("bo-") + sPageId;
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", sBackgroundObjectsId );
if( !mbPresentation )
{
diff --git a/filter/source/svg/svgfilter.hxx b/filter/source/svg/svgfilter.hxx
index b06889a1a489..5bce011ba7fb 100644
--- a/filter/source/svg/svgfilter.hxx
+++ b/filter/source/svg/svgfilter.hxx
@@ -39,6 +39,7 @@
#include <svx/unoapi.hxx>
#include <xmloff/xmlexp.hxx>
#include <cstdio>
+#include <string_view>
#include <unordered_set>
#include <unordered_map>
@@ -241,7 +242,7 @@ private:
sal_Int32 nFirstPage, sal_Int32 nLastPage );
void implExportDrawPages( const std::vector< Reference< css::drawing::XDrawPage > >& rxPages,
sal_Int32 nFirstPage, sal_Int32 nLastPage );
- bool implExportPage( const OUString & sPageId,
+ bool implExportPage( std::u16string_view sPageId,
const Reference< css::drawing::XDrawPage > & rxPage,
const Reference< css::drawing::XShapes > & xShapes,
bool bMaster );
diff --git a/filter/source/xsltdialog/typedetectionexport.cxx b/filter/source/xsltdialog/typedetectionexport.cxx
index 68ed95a065e5..8a8f92c772c8 100644
--- a/filter/source/xsltdialog/typedetectionexport.cxx
+++ b/filter/source/xsltdialog/typedetectionexport.cxx
@@ -17,6 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
#include <com/sun/star/xml/sax/XAttributeList.hpp>
#include <com/sun/star/xml/sax/Writer.hpp>
@@ -40,7 +43,7 @@ TypeDetectionExporter::TypeDetectionExporter( Reference< XComponentContext > con
{
}
-static OUString createRelativeURL( const OUString& rFilterName, const OUString& rURL )
+static OUString createRelativeURL( std::u16string_view rFilterName, const OUString& rURL )
{
if( !rURL.isEmpty() &&
!rURL.startsWith("http:") &&
@@ -63,7 +66,7 @@ static OUString createRelativeURL( const OUString& rFilterName, const OUString&
}
}
- return OUString( "vnd.sun.star.Package:" + rFilterName + "/" + aName );
+ return OUString( OUString::Concat("vnd.sun.star.Package:") + rFilterName + "/" + aName );
}
else
{
diff --git a/filter/source/xsltdialog/xmlfiltercommon.hxx b/filter/source/xsltdialog/xmlfiltercommon.hxx
index f9fa9424c8c9..53f9592b76b0 100644
--- a/filter/source/xsltdialog/xmlfiltercommon.hxx
+++ b/filter/source/xsltdialog/xmlfiltercommon.hxx
@@ -22,6 +22,7 @@
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/io/XOutputStream.hpp>
+#include <string_view>
#include <vector>
@@ -75,7 +76,7 @@ struct application_info_impl
extern std::vector< application_info_impl > const & getApplicationInfos();
-extern OUString getApplicationUIName( const OUString& rServiceName );
+extern OUString getApplicationUIName( std::u16string_view rServiceName );
extern const application_info_impl* getApplicationInfo( std::u16string_view rServiceName );
OUString XsltResId(const char* pId);
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index 959667db8cf0..3124ee5b9855 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -1201,7 +1201,7 @@ const application_info_impl* getApplicationInfo( std::u16string_view rServiceNam
return nullptr;
}
-OUString getApplicationUIName( const OUString& rServiceName )
+OUString getApplicationUIName( std::u16string_view rServiceName )
{
const application_info_impl* pInfo = getApplicationInfo( rServiceName );
if( pInfo )
@@ -1211,9 +1211,9 @@ OUString getApplicationUIName( const OUString& rServiceName )
else
{
OUString aRet = XsltResId(STR_UNKNOWN_APPLICATION);
- if( !rServiceName.isEmpty() )
+ if( !rServiceName.empty() )
{
- aRet += " (" + rServiceName + ")";
+ aRet += OUString::Concat(" (") + rServiceName + ")";
}
return aRet;
}
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index 11b8bd14d352..0374c9fb956e 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -518,7 +518,7 @@ namespace
}
-void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Reference<XPropertySet>& xComponentSet, const OUString& rNamePrefix,
+void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Reference<XPropertySet>& xComponentSet, std::u16string_view rNamePrefix,
const Reference<XControl>& rxSubmitButton, const css::awt::MouseEvent& MouseEvt)
{
if (!xComponentSet.is())
@@ -857,7 +857,7 @@ void ODatabaseForm::FillSuccessfulList( HtmlSuccessfulObjList& rList,
for( sal_Int32 nIndex=0; nIndex < getCount(); nIndex++ )
{
getByIndex( nIndex ) >>= xComponentSet;
- AppendComponent(rList, xComponentSet, OUString(), rxSubmitButton, MouseEvt);
+ AppendComponent(rList, xComponentSet, std::u16string_view(), rxSubmitButton, MouseEvt);
}
}
@@ -918,7 +918,7 @@ void ODatabaseForm::Encode( OUString& rString )
}
-void ODatabaseForm::InsertTextPart( INetMIMEMessage& rParent, const OUString& rName,
+void ODatabaseForm::InsertTextPart( INetMIMEMessage& rParent, std::u16string_view rName,
std::u16string_view rData )
{
// Create part as MessageChild
@@ -927,7 +927,7 @@ void ODatabaseForm::InsertTextPart( INetMIMEMessage& rParent, const OUString& rN
// Header
//TODO: Encode rName into a properly formatted Content-Disposition header
// field as per RFC 2231:
- OUString aContentDisp = "form-data; name=\"" + rName + "\"";
+ OUString aContentDisp = OUString::Concat("form-data; name=\"") + rName + "\"";
pChild->SetContentDisposition(aContentDisp);
rtl_TextEncoding eSystemEncoding = osl_getThreadTextEncoding();
@@ -947,7 +947,7 @@ void ODatabaseForm::InsertTextPart( INetMIMEMessage& rParent, const OUString& rN
}
-void ODatabaseForm::InsertFilePart( INetMIMEMessage& rParent, const OUString& rName,
+void ODatabaseForm::InsertFilePart( INetMIMEMessage& rParent, std::u16string_view rName,
const OUString& rFileName )
{
OUString aFileName(rFileName);
@@ -989,7 +989,7 @@ void ODatabaseForm::InsertFilePart( INetMIMEMessage& rParent, const OUString& rN
//TODO: Encode rName and aFileName into a properly formatted
// Content-Disposition header field as per RFC 2231:
OUString aContentDisp =
- "form-data; name=\"" +
+ OUString::Concat("form-data; name=\"") +
rName +
"\""
"; filename=\"" +
diff --git a/forms/source/component/DatabaseForm.hxx b/forms/source/component/DatabaseForm.hxx
index c89a197ba4e9..4e7a670d0d23 100644
--- a/forms/source/component/DatabaseForm.hxx
+++ b/forms/source/component/DatabaseForm.hxx
@@ -501,13 +501,13 @@ private:
css::uno::Sequence<sal_Int8> GetDataMultiPartEncoded(const css::uno::Reference< css::awt::XControl>& SubmitButton, const css::awt::MouseEvent& MouseEvt,
OUString& rContentType);
- void AppendComponent(HtmlSuccessfulObjList& rList, const css::uno::Reference< css::beans::XPropertySet>& xComponentSet, const OUString& rNamePrefix,
+ void AppendComponent(HtmlSuccessfulObjList& rList, const css::uno::Reference< css::beans::XPropertySet>& xComponentSet, std::u16string_view rNamePrefix,
const css::uno::Reference< css::awt::XControl>& rxSubmitButton, const css::awt::MouseEvent& MouseEvt);
void FillSuccessfulList(HtmlSuccessfulObjList& rList, const css::uno::Reference< css::awt::XControl>& rxSubmitButton, const css::awt::MouseEvent& MouseEvt);
- static void InsertTextPart(INetMIMEMessage& rParent, const OUString& rName, std::u16string_view rData);
- static void InsertFilePart(INetMIMEMessage& rParent, const OUString& rName, const OUString& rFileName);
+ static void InsertTextPart(INetMIMEMessage& rParent, std::u16string_view rName, std::u16string_view rData);
+ static void InsertFilePart(INetMIMEMessage& rParent, std::u16string_view rName, const OUString& rFileName);
static void Encode(OUString& rString);
css::uno::Reference< css::sdbc::XConnection > getConnection();
diff --git a/forms/source/xforms/submission.cxx b/forms/source/xforms/submission.cxx
index 6b759e18453e..5f7fdd007315 100644
--- a/forms/source/xforms/submission.cxx
+++ b/forms/source/xforms/submission.cxx
@@ -49,6 +49,7 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/servicehelper.hxx>
#include <memory>
+#include <string_view>
using com::sun::star::util::VetoException;
using com::sun::star::form::submission::XSubmissionVetoListener;
@@ -381,9 +382,9 @@ sal_Int64 SAL_CALL Submission::getSomething(
}
-static OUString lcl_message( const OUString& rID, const OUString& rText )
+static OUString lcl_message( std::u16string_view rID, std::u16string_view rText )
{
- OUString aMessage = "XForms submission '" + rID + "' failed" + rText + ".";
+ OUString aMessage = OUString::Concat("XForms submission '") + rID + "' failed" + rText + ".";
return aMessage;
}
@@ -410,7 +411,7 @@ void SAL_CALL Submission::submitWithInteraction(
if( ! bValid )
{
InvalidDataOnSubmitException aInvalidDataException(
- lcl_message(sID, " due to invalid data" ), *this );
+ lcl_message(sID, u" due to invalid data" ), *this );
if( _rxHandler.is() )
{
@@ -462,7 +463,7 @@ void SAL_CALL Submission::submitWithInteraction(
css::uno::Any anyEx = cppu::getCaughtException();
// exception caught: re-throw as wrapped target exception
throw WrappedTargetException(
- lcl_message( sID, " due to exception being thrown" ),
+ lcl_message( sID, u" due to exception being thrown" ),
*this, anyEx );
}
@@ -470,7 +471,7 @@ void SAL_CALL Submission::submitWithInteraction(
{
// other failure: throw wrapped target exception, too.
throw WrappedTargetException(
- lcl_message( sID, OUString() ), *this, Any() );
+ lcl_message( sID, std::u16string_view() ), *this, Any() );
}
mxModel->rebuild();
}
diff --git a/formula/qa/unit/formula-dialogs-test.cxx b/formula/qa/unit/formula-dialogs-test.cxx
index 8f1f7e334a75..a801ab2fb6d9 100644
--- a/formula/qa/unit/formula-dialogs-test.cxx
+++ b/formula/qa/unit/formula-dialogs-test.cxx
@@ -51,7 +51,7 @@ VclPtr<VclAbstractDialog> FormulaDialogsTest::createDialogByID(sal_uInt32 /*nID*
void FormulaDialogsTest::openAnyDialog()
{
/// process input file containing the UXMLDescriptions of the dialogs to dump
- processDialogBatchFile("formula/qa/unit/data/formula-dialogs-test.txt");
+ processDialogBatchFile(u"formula/qa/unit/data/formula-dialogs-test.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(FormulaDialogsTest);
diff --git a/fpicker/qa/unit/fpicker-dialogs-test.cxx b/fpicker/qa/unit/fpicker-dialogs-test.cxx
index 8c8a78df00e5..dfce816df62d 100644
--- a/fpicker/qa/unit/fpicker-dialogs-test.cxx
+++ b/fpicker/qa/unit/fpicker-dialogs-test.cxx
@@ -51,7 +51,7 @@ VclPtr<VclAbstractDialog> FpickerDialogsTest::createDialogByID(sal_uInt32 /*nID*
void FpickerDialogsTest::openAnyDialog()
{
/// process input file containing the UXMLDescriptions of the dialogs to dump
- processDialogBatchFile("fpicker/qa/unit/data/fpicker-dialogs-test.txt");
+ processDialogBatchFile(u"fpicker/qa/unit/data/fpicker-dialogs-test.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(FpickerDialogsTest);
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index cabdd16af71d..cbb354ecf585 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -75,6 +75,7 @@
#include <algorithm>
#include <memory>
+#include <string_view>
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::ui::dialogs;
@@ -142,20 +143,21 @@ namespace
}
- void SetFsysExtension_Impl( OUString& rFile, const OUString& rExtension )
+ void SetFsysExtension_Impl( OUString& rFile, std::u16string_view rExtension )
{
const sal_Int32 nDotPos{ rFile.lastIndexOf('.') };
if (nDotPos>=0)
{
- if (!rExtension.isEmpty())
- rFile = rFile.subView(0, nDotPos) + rExtension; // replace old extension with new (not empty) one
+ if (!rExtension.empty())
+ rFile = OUString::Concat(rFile.subView(0, nDotPos)) + rExtension; // replace old extension with new (not empty) one
else if (nDotPos)
rFile = rFile.copy(0, nDotPos-1); // truncate extension (new one is empty)
else
rFile.clear(); // Filename was just an extension
}
- else if (!rExtension.isEmpty())
- rFile += "." + rExtension; // no extension was present, append new one if not empty
+ else if (!rExtension.empty())
+ rFile += OUString::Concat(".") + rExtension;
+ // no extension was present, append new one if not empty
}
void lcl_autoUpdateFileExtension( SvtFileDialog* _pDialog, const OUString& _rLastFilterExt )
@@ -2252,7 +2254,7 @@ bool SvtFileDialog::ContentGetTitle( const OUString& rURL, OUString& rTitle )
}
void SvtFileDialog::appendDefaultExtension(OUString& rFileName,
- const OUString& rFilterDefaultExtension,
+ std::u16string_view rFilterDefaultExtension,
const OUString& rFilterExtensions)
{
const OUString aType(rFilterExtensions.toAsciiLowerCase());
@@ -2275,7 +2277,7 @@ void SvtFileDialog::appendDefaultExtension(OUString& rFileName,
}
while (nPos>=0);
- rFileName += "." + rFilterDefaultExtension;
+ rFileName += OUString::Concat(".") + rFilterDefaultExtension;
}
void SvtFileDialog::initDefaultPlaces( )
diff --git a/fpicker/source/office/iodlg.hxx b/fpicker/source/office/iodlg.hxx
index 12f1d1bd7ca2..32ff56462151 100644
--- a/fpicker/source/office/iodlg.hxx
+++ b/fpicker/source/office/iodlg.hxx
@@ -33,7 +33,7 @@
#include <vcl/timer.hxx>
#include <set>
-
+#include <string_view>
class SvtFileView;
class SvtFileDialogFilter_Impl;
@@ -256,7 +256,7 @@ private:
*/
static void appendDefaultExtension(
OUString& _rFileName,
- const OUString& _rFilterDefaultExtension,
+ std::u16string_view _rFilterDefaultExtension,
const OUString& _rFilterExtensions);
void initDefaultPlaces( );
diff --git a/fpicker/source/office/iodlgimp.cxx b/fpicker/source/office/iodlgimp.cxx
index eef79a9a2233..86b43c038a5b 100644
--- a/fpicker/source/office/iodlgimp.cxx
+++ b/fpicker/source/office/iodlgimp.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include "fileview.hxx"
#include "iodlgimp.hxx"
#include <tools/debug.hxx>
@@ -136,9 +140,9 @@ void SvtExpFileDlg_Impl::SetStandardDir( const OUString& _rDir )
}
namespace {
- OUString lcl_DecoratedFilter( const OUString& _rOriginalFilter )
+ OUString lcl_DecoratedFilter( std::u16string_view _rOriginalFilter )
{
- return "<" + _rOriginalFilter + ">";
+ return "<" + OUString::Concat(_rOriginalFilter) + ">";
}
}
diff --git a/framework/inc/helper/persistentwindowstate.hxx b/framework/inc/helper/persistentwindowstate.hxx
index 6b811b9ec3d9..86e477fd7920 100644
--- a/framework/inc/helper/persistentwindowstate.hxx
+++ b/framework/inc/helper/persistentwindowstate.hxx
@@ -117,7 +117,7 @@ class PersistentWindowState final : public ::cppu::WeakImplHelper<
contains the information about position and size.
*/
static OUString implst_getWindowStateFromConfig(const css::uno::Reference< css::uno::XComponentContext >& rxContext ,
- const OUString& sModuleName);
+ std::u16string_view sModuleName);
/** @short retrieve the window state from the container window.
@@ -144,7 +144,7 @@ class PersistentWindowState final : public ::cppu::WeakImplHelper<
contains the information about position and size.
*/
static void implst_setWindowStateOnConfig(const css::uno::Reference< css::uno::XComponentContext >& rxContext,
- const OUString& sModuleName ,
+ std::u16string_view sModuleName ,
const OUString& sWindowState );
/** @short restore the position and size on the container window.
diff --git a/framework/inc/jobs/helponstartup.hxx b/framework/inc/jobs/helponstartup.hxx
index d22e8b98071f..4f3f5c51b5ed 100644
--- a/framework/inc/jobs/helponstartup.hxx
+++ b/framework/inc/jobs/helponstartup.hxx
@@ -20,6 +20,10 @@
#ifndef INCLUDED_FRAMEWORK_INC_JOBS_HELPONSTARTUP_HXX
#define INCLUDED_FRAMEWORK_INC_JOBS_HELPONSTARTUP_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include <cppuhelper/implbase.hxx>
#include <com/sun/star/task/XJob.hpp>
@@ -175,9 +179,9 @@ class HelpOnStartup final : public ::cppu::WeakImplHelper< css::lang::XServiceIn
e.g. "vnd.sun.star.help://swriter/?Language=en-US&System=WIN"
or "vnd.sun.star.help://swriter/67351?Language=en-US&System=WIN"
*/
- static OUString ist_createHelpURL(const OUString& sBaseURL,
- const OUString& sLocale ,
- const OUString& sSystem );
+ static OUString ist_createHelpURL(std::u16string_view sBaseURL,
+ std::u16string_view sLocale ,
+ std::u16string_view sSystem );
};
} // namespace framework
diff --git a/framework/inc/jobs/jobdata.hxx b/framework/inc/jobs/jobdata.hxx
index 5d64bcb8ce98..e6cdea7ff13e 100644
--- a/framework/inc/jobs/jobdata.hxx
+++ b/framework/inc/jobs/jobdata.hxx
@@ -25,6 +25,7 @@
#include <rtl/ustring.hxx>
+#include <string_view>
#include <vector>
namespace framework{
@@ -190,7 +191,7 @@ class JobData final
void disableJob ( );
static std::vector< OUString > getEnabledJobsForEvent( const css::uno::Reference< css::uno::XComponentContext >& rxContext,
- const OUString& sEvent );
+ std::u16string_view sEvent );
static void appendEnabledJobsForEvent( const css::uno::Reference< css::uno::XComponentContext >& rxContext,
const OUString& sEvent ,
diff --git a/framework/inc/uifactory/configurationaccessfactorymanager.hxx b/framework/inc/uifactory/configurationaccessfactorymanager.hxx
index cf4f151f40dc..7b12048e1223 100644
--- a/framework/inc/uifactory/configurationaccessfactorymanager.hxx
+++ b/framework/inc/uifactory/configurationaccessfactorymanager.hxx
@@ -30,6 +30,7 @@
#include <cppuhelper/implbase.hxx>
#include <rtl/ustring.hxx>
+#include <string_view>
#include <unordered_map>
namespace framework {
@@ -42,9 +43,9 @@ class ConfigurationAccess_FactoryManager final : public ::cppu::WeakImplHelper<
void readConfigurationData();
- OUString getFactorySpecifierFromTypeNameModule( const OUString& rType, const OUString& rName, const OUString& rModule ) const;
- void addFactorySpecifierToTypeNameModule( const OUString& rType, const OUString& rName, const OUString& rModule, const OUString& aServiceSpecifier );
- void removeFactorySpecifierFromTypeNameModule( const OUString& rType, const OUString& rName, const OUString& rModule );
+ OUString getFactorySpecifierFromTypeNameModule( std::u16string_view rType, const OUString& rName, std::u16string_view rModule ) const;
+ void addFactorySpecifierToTypeNameModule( std::u16string_view rType, std::u16string_view rName, std::u16string_view rModule, const OUString& aServiceSpecifier );
+ void removeFactorySpecifierFromTypeNameModule( std::u16string_view rType, std::u16string_view rName, std::u16string_view rModule );
css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > getFactoriesDescription() const;
// container.XContainerListener
diff --git a/framework/inc/uifactory/factoryconfiguration.hxx b/framework/inc/uifactory/factoryconfiguration.hxx
index 9a8112702ec0..1ba2a622c74c 100644
--- a/framework/inc/uifactory/factoryconfiguration.hxx
+++ b/framework/inc/uifactory/factoryconfiguration.hxx
@@ -26,6 +26,8 @@
#include <cppuhelper/implbase.hxx>
#include <rtl/ustring.hxx>
+
+#include <string_view>
#include <unordered_map>
// Namespace
@@ -45,10 +47,10 @@ public:
void readConfigurationData();
void updateConfigurationData();
- OUString getServiceFromCommandModule( const OUString& rCommandURL, const OUString& rModule ) const;
- OUString getValueFromCommandModule( const OUString& rCommandURL, const OUString& rModule ) const;
- void addServiceToCommandModule( const OUString& rCommandURL, const OUString& rModule, const OUString& rServiceSpecifier );
- void removeServiceFromCommandModule( const OUString& rCommandURL, const OUString& rModule );
+ OUString getServiceFromCommandModule( std::u16string_view rCommandURL, std::u16string_view rModule ) const;
+ OUString getValueFromCommandModule( std::u16string_view rCommandURL, std::u16string_view rModule ) const;
+ void addServiceToCommandModule( std::u16string_view rCommandURL, std::u16string_view rModule, const OUString& rServiceSpecifier );
+ void removeServiceFromCommandModule( std::u16string_view rCommandURL, std::u16string_view rModule );
// container.XContainerListener
virtual void SAL_CALL elementInserted( const css::container::ContainerEvent& Event ) override;
diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx
index abb929be4230..eb01a00c5291 100644
--- a/framework/source/accelerators/acceleratorconfiguration.cxx
+++ b/framework/source/accelerators/acceleratorconfiguration.cxx
@@ -52,7 +52,7 @@
#include <sal/log.hxx>
#include <rtl/ustrbuf.hxx>
-#define PRESET_DEFAULT "default"
+#define PRESET_DEFAULT u"default"
#define TARGET_CURRENT "current"
namespace framework
@@ -217,7 +217,7 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::reload()
css::uno::Reference< css::io::XStream > xStreamNoLang;
{
SolarMutexGuard g;
- xStream = m_aPresetHandler.openTarget(TARGET_CURRENT,
+ xStream = m_aPresetHandler.openTarget(u"" TARGET_CURRENT,
css::embed::ElementModes::READ);
try
{
@@ -257,7 +257,7 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::store()
css::uno::Reference< css::io::XStream > xStream;
{
SolarMutexGuard g;
- xStream = m_aPresetHandler.openTarget(TARGET_CURRENT,
+ xStream = m_aPresetHandler.openTarget(u"" TARGET_CURRENT,
css::embed::ElementModes::READWRITE); // open or create!
}
@@ -308,7 +308,7 @@ sal_Bool SAL_CALL XMLBasedAcceleratorConfiguration::isReadOnly()
css::uno::Reference< css::io::XStream > xStream;
{
SolarMutexGuard g;
- xStream = m_aPresetHandler.openTarget(TARGET_CURRENT,
+ xStream = m_aPresetHandler.openTarget(u"" TARGET_CURRENT,
css::embed::ElementModes::READWRITE); // open or create!
}
@@ -343,7 +343,7 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::reset()
{
{
SolarMutexGuard g;
- m_aPresetHandler.copyPresetToTarget(PRESET_DEFAULT, TARGET_CURRENT);
+ m_aPresetHandler.copyPresetToTarget(PRESET_DEFAULT, u"" TARGET_CURRENT);
}
reload();
diff --git a/framework/source/accelerators/presethandler.cxx b/framework/source/accelerators/presethandler.cxx
index 491f48a35c96..bce2e3861499 100644
--- a/framework/source/accelerators/presethandler.cxx
+++ b/framework/source/accelerators/presethandler.cxx
@@ -449,8 +449,8 @@ void PresetHandler::connectToResource( PresetHandler::EConfigType
}
}
-void PresetHandler::copyPresetToTarget(const OUString& sPreset,
- const OUString& sTarget)
+void PresetHandler::copyPresetToTarget(std::u16string_view sPreset,
+ std::u16string_view sTarget)
{
// don't check our preset list, if element exists
// We try to open it and forward all errors to the user!
@@ -474,8 +474,8 @@ void PresetHandler::copyPresetToTarget(const OUString& sPreset,
return;
}
- OUString sPresetFile = sPreset + ".xml";
- OUString sTargetFile = sTarget + ".xml";
+ OUString sPresetFile = OUString::Concat(sPreset) + ".xml";
+ OUString sTargetFile = OUString::Concat(sTarget) + ".xml";
// remove existing elements before you try to copy the preset to that location ...
// Otherwise w will get an ElementExistException inside copyElementTo()!
@@ -490,7 +490,7 @@ void PresetHandler::copyPresetToTarget(const OUString& sPreset,
commitUserChanges();
}
-css::uno::Reference< css::io::XStream > PresetHandler::openPreset(const OUString& sPreset)
+css::uno::Reference< css::io::XStream > PresetHandler::openPreset(std::u16string_view sPreset)
{
css::uno::Reference< css::embed::XStorage > xFolder;
{
@@ -502,7 +502,7 @@ css::uno::Reference< css::io::XStream > PresetHandler::openPreset(const OUString
if (!xFolder.is())
return css::uno::Reference< css::io::XStream >();
- OUString sFile = sPreset + ".xml";
+ OUString sFile = OUString::Concat(sPreset) + ".xml";
// inform user about errors (use original exceptions!)
css::uno::Reference< css::io::XStream > xStream = xFolder->openStreamElement(sFile, css::embed::ElementModes::READ);
@@ -510,7 +510,7 @@ css::uno::Reference< css::io::XStream > PresetHandler::openPreset(const OUString
}
css::uno::Reference< css::io::XStream > PresetHandler::openTarget(
- const OUString& sTarget, sal_Int32 const nMode)
+ std::u16string_view sTarget, sal_Int32 const nMode)
{
css::uno::Reference< css::embed::XStorage > xFolder;
{
@@ -522,7 +522,7 @@ css::uno::Reference< css::io::XStream > PresetHandler::openTarget(
if (!xFolder.is())
return css::uno::Reference< css::io::XStream >();
- OUString const sFile(sTarget + ".xml");
+ OUString const sFile(OUString::Concat(sTarget) + ".xml");
return xFolder->openStreamElement(sFile, nMode);
}
diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx
index 8d2aa243f702..a8aed7ab7e4d 100644
--- a/framework/source/fwe/classes/addonsoptions.cxx
+++ b/framework/source/fwe/classes/addonsoptions.cxx
@@ -37,6 +37,7 @@
#include <vcl/svapp.hxx>
#include <algorithm>
+#include <string_view>
#include <unordered_map>
#include <vector>
@@ -289,18 +290,18 @@ class AddonsOptions_Impl : public ConfigItem
void ReadNotebookBarMergeInstructions( NotebookBarMergingInstructions& rNotebookBarMergeMap );
void ReadStatusbarMergeInstructions( MergeStatusbarInstructionContainer& rContainer );
- void ReadMergeMenuData( const OUString& aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > >& rMergeMenu );
- bool ReadMergeToolbarData( const OUString& aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > >& rMergeToolbarItems );
- bool ReadMergeNotebookBarData( const OUString& aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > >& rMergeNotebookBarItems );
- bool ReadMergeStatusbarData( const OUString& aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > >& rMergeStatusbar );
- bool ReadMenuItem( const OUString& aMenuItemNodeName, Sequence< PropertyValue >& aMenuItem, bool bIgnoreSubMenu = false );
- bool ReadPopupMenu( const OUString& aPopupMenuNodeName, Sequence< PropertyValue >& aPopupMenu );
+ void ReadMergeMenuData( std::u16string_view aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > >& rMergeMenu );
+ bool ReadMergeToolbarData( std::u16string_view aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > >& rMergeToolbarItems );
+ bool ReadMergeNotebookBarData( std::u16string_view aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > >& rMergeNotebookBarItems );
+ bool ReadMergeStatusbarData( std::u16string_view aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > >& rMergeStatusbar );
+ bool ReadMenuItem( std::u16string_view aMenuItemNodeName, Sequence< PropertyValue >& aMenuItem, bool bIgnoreSubMenu = false );
+ bool ReadPopupMenu( std::u16string_view aPopupMenuNodeName, Sequence< PropertyValue >& aPopupMenu );
void AppendPopupMenu( Sequence< PropertyValue >& aTargetPopupMenu, const Sequence< PropertyValue >& rSourcePopupMenu );
- bool ReadToolBarItem( const OUString& aToolBarItemNodeName, Sequence< PropertyValue >& aToolBarItem );
- bool ReadNotebookBarItem( const OUString& aNotebookBarItemNodeName, Sequence< PropertyValue >& aNotebookBarItem );
+ bool ReadToolBarItem( std::u16string_view aToolBarItemNodeName, Sequence< PropertyValue >& aToolBarItem );
+ bool ReadNotebookBarItem( std::u16string_view aNotebookBarItemNodeName, Sequence< PropertyValue >& aNotebookBarItem );
- bool ReadStatusBarItem( const OUString& aStatusbarItemNodeName, Sequence< PropertyValue >& aStatusbarItem );
- std::unique_ptr<ImageEntry> ReadImageData( const OUString& aImagesNodeName );
+ bool ReadStatusBarItem( std::u16string_view aStatusbarItemNodeName, Sequence< PropertyValue >& aStatusbarItem );
+ std::unique_ptr<ImageEntry> ReadImageData( std::u16string_view aImagesNodeName );
void ReadAndAssociateImages( const OUString& aURL, const OUString& aImageId );
BitmapEx ReadImageFromURL( const OUString& aURL );
bool HasAssociatedImages( const OUString& aURL );
@@ -309,13 +310,16 @@ class AddonsOptions_Impl : public ConfigItem
void ReadSubMenuEntries( const Sequence< OUString >& aSubMenuNodeNames, Sequence< Sequence< PropertyValue > >& rSubMenu );
OUString GeneratePrefixURL();
- Sequence< OUString > GetPropertyNamesMenuItem( const OUString& aPropertyRootNode ) const;
- Sequence< OUString > GetPropertyNamesPopupMenu( const OUString& aPropertyRootNode ) const;
- Sequence< OUString > GetPropertyNamesToolBarItem( const OUString& aPropertyRootNode ) const;
- Sequence< OUString > GetPropertyNamesNotebookBarItem( const OUString& aPropertyRootNode ) const;
+ Sequence< OUString > GetPropertyNamesMenuItem( std::u16string_view aPropertyRootNode )
+ const;
+ Sequence< OUString > GetPropertyNamesPopupMenu( std::u16string_view aPropertyRootNode )
+ const;
+ Sequence< OUString > GetPropertyNamesToolBarItem( std::u16string_view aPropertyRootNode )
+ const;
+ Sequence< OUString > GetPropertyNamesNotebookBarItem( std::u16string_view aPropertyRootNode ) const;
- Sequence< OUString > GetPropertyNamesStatusbarItem( const OUString& aPropertyRootNode ) const;
- Sequence< OUString > GetPropertyNamesImages( const OUString& aPropertyRootNode ) const;
+ Sequence< OUString > GetPropertyNamesStatusbarItem( std::u16string_view aPropertyRootNode ) const;
+ Sequence< OUString > GetPropertyNamesImages( std::u16string_view aPropertyRootNode ) const;
bool CreateImageFromSequence( BitmapEx& rImage, Sequence< sal_Int8 >& rBitmapDataSeq ) const;
DECL_LINK(NotifyEvent, void*, void);
@@ -991,7 +995,7 @@ void AddonsOptions_Impl::ReadMenuMergeInstructions( MergeMenuInstructionContaine
}
}
-void AddonsOptions_Impl::ReadMergeMenuData( const OUString& aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > >& rMergeMenu )
+void AddonsOptions_Impl::ReadMergeMenuData( std::u16string_view aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > >& rMergeMenu )
{
OUString aMergeMenuBaseNode( aMergeAddonInstructionBase+m_aPropMergeMenuNames[ OFFSET_MERGEMENU_MENUITEMS ] );
@@ -1073,7 +1077,7 @@ void AddonsOptions_Impl::ReadToolbarMergeInstructions( ToolbarMergingInstruction
}
}
-bool AddonsOptions_Impl::ReadMergeToolbarData( const OUString& aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > >& rMergeToolbarItems )
+bool AddonsOptions_Impl::ReadMergeToolbarData( std::u16string_view aMergeAddonInstructionBase, Sequence< Sequence< PropertyValue > >& rMergeToolbarItems )
{
OUString aMergeToolbarBaseNode = aMergeAddonInstructionBase +
m_aPropMergeToolbarNames[ OFFSET_MERGETOOLBAR_TOOLBARITEMS ];
@@ -1154,7 +1158,7 @@ void AddonsOptions_Impl::ReadNotebookBarMergeInstructions(
}
bool AddonsOptions_Impl::ReadMergeNotebookBarData(
- const OUString& aMergeAddonInstructionBase,
+ std::u16string_view aMergeAddonInstructionBase,
Sequence<Sequence<PropertyValue>>& rMergeNotebookBarItems)
{
OUString aMergeNotebookBarBaseNode = aMergeAddonInstructionBase +
@@ -1225,7 +1229,7 @@ void AddonsOptions_Impl::ReadStatusbarMergeInstructions( MergeStatusbarInstructi
}
bool AddonsOptions_Impl::ReadMergeStatusbarData(
- const OUString& aMergeAddonInstructionBase,
+ std::u16string_view aMergeAddonInstructionBase,
Sequence< Sequence< PropertyValue > >& rMergeStatusbarItems )
{
sal_uInt32 nStatusbarItemCount = rMergeStatusbarItems.getLength();
@@ -1263,7 +1267,7 @@ bool AddonsOptions_Impl::ReadMergeStatusbarData(
}
bool AddonsOptions_Impl::ReadStatusBarItem(
- const OUString& aStatusarItemNodeName,
+ std::u16string_view aStatusarItemNodeName,
Sequence< PropertyValue >& aStatusbarItem )
{
bool bResult( false );
@@ -1294,7 +1298,7 @@ bool AddonsOptions_Impl::ReadStatusBarItem(
return bResult;
}
-bool AddonsOptions_Impl::ReadMenuItem( const OUString& aMenuNodeName, Sequence< PropertyValue >& aMenuItem, bool bIgnoreSubMenu )
+bool AddonsOptions_Impl::ReadMenuItem( std::u16string_view aMenuNodeName, Sequence< PropertyValue >& aMenuItem, bool bIgnoreSubMenu )
{
bool bResult = false;
OUString aStrValue;
@@ -1364,7 +1368,7 @@ bool AddonsOptions_Impl::ReadMenuItem( const OUString& aMenuNodeName, Sequence<
return bResult;
}
-bool AddonsOptions_Impl::ReadPopupMenu( const OUString& aPopupMenuNodeName, Sequence< PropertyValue >& aPopupMenu )
+bool AddonsOptions_Impl::ReadPopupMenu( std::u16string_view aPopupMenuNodeName, Sequence< PropertyValue >& aPopupMenu )
{
bool bResult = false;
OUString aStrValue;
@@ -1417,7 +1421,7 @@ void AddonsOptions_Impl::AppendPopupMenu( Sequence< PropertyValue >& rTargetPopu
}
}
-bool AddonsOptions_Impl::ReadToolBarItem( const OUString& aToolBarItemNodeName, Sequence< PropertyValue >& aToolBarItem )
+bool AddonsOptions_Impl::ReadToolBarItem( std::u16string_view aToolBarItemNodeName, Sequence< PropertyValue >& aToolBarItem )
{
bool bResult = false;
OUString aURL;
@@ -1470,7 +1474,7 @@ bool AddonsOptions_Impl::ReadToolBarItem( const OUString& aToolBarItemNodeName,
return bResult;
}
-bool AddonsOptions_Impl::ReadNotebookBarItem( const OUString& aNotebookBarItemNodeName, Sequence< PropertyValue >& aNotebookBarItem )
+bool AddonsOptions_Impl::ReadNotebookBarItem( std::u16string_view aNotebookBarItemNodeName, Sequence< PropertyValue >& aNotebookBarItem )
{
bool bResult = false;
OUString aURL;
@@ -1616,7 +1620,7 @@ void AddonsOptions_Impl::ReadAndAssociateImages( const OUString& aURL, const OUS
m_aImageManager.emplace( aURL, aImageEntry );
}
-std::unique_ptr<AddonsOptions_Impl::ImageEntry> AddonsOptions_Impl::ReadImageData( const OUString& aImagesNodeName )
+std::unique_ptr<AddonsOptions_Impl::ImageEntry> AddonsOptions_Impl::ReadImageData( std::u16string_view aImagesNodeName )
{
Sequence< OUString > aImageDataNodeNames = GetPropertyNamesImages( aImagesNodeName );
Sequence< Any > aPropertyData;
@@ -1683,7 +1687,7 @@ bool AddonsOptions_Impl::CreateImageFromSequence( BitmapEx& rImage, Sequence< sa
return bResult;
}
-Sequence< OUString > AddonsOptions_Impl::GetPropertyNamesMenuItem( const OUString& aPropertyRootNode ) const
+Sequence< OUString > AddonsOptions_Impl::GetPropertyNamesMenuItem( std::u16string_view aPropertyRootNode ) const
{
Sequence< OUString > lResult( PROPERTYCOUNT_MENUITEM );
@@ -1698,7 +1702,7 @@ Sequence< OUString > AddonsOptions_Impl::GetPropertyNamesMenuItem( const OUStrin
return lResult;
}
-Sequence< OUString > AddonsOptions_Impl::GetPropertyNamesPopupMenu( const OUString& aPropertyRootNode ) const
+Sequence< OUString > AddonsOptions_Impl::GetPropertyNamesPopupMenu( std::u16string_view aPropertyRootNode ) const
{
// The URL is automatically set and not read from the configuration.
Sequence< OUString > lResult( PROPERTYCOUNT_POPUPMENU-1 );
@@ -1711,7 +1715,7 @@ Sequence< OUString > AddonsOptions_Impl::GetPropertyNamesPopupMenu( const OUStri
return lResult;
}
-Sequence< OUString > AddonsOptions_Impl::GetPropertyNamesToolBarItem( const OUString& aPropertyRootNode ) const
+Sequence< OUString > AddonsOptions_Impl::GetPropertyNamesToolBarItem( std::u16string_view aPropertyRootNode ) const
{
Sequence< OUString > lResult( PROPERTYCOUNT_TOOLBARITEM );
@@ -1727,7 +1731,7 @@ Sequence< OUString > AddonsOptions_Impl::GetPropertyNamesToolBarItem( const OUSt
return lResult;
}
-Sequence< OUString > AddonsOptions_Impl::GetPropertyNamesNotebookBarItem( const OUString& aPropertyRootNode ) const
+Sequence< OUString > AddonsOptions_Impl::GetPropertyNamesNotebookBarItem( std::u16string_view aPropertyRootNode ) const
{
Sequence< OUString > lResult( PROPERTYCOUNT_NOTEBOOKBARITEM );
@@ -1745,7 +1749,7 @@ Sequence< OUString > AddonsOptions_Impl::GetPropertyNamesNotebookBarItem( const
}
Sequence< OUString > AddonsOptions_Impl::GetPropertyNamesStatusbarItem(
- const OUString& aPropertyRootNode ) const
+ std::u16string_view aPropertyRootNode ) const
{
Sequence< OUString > lResult( PROPERTYCOUNT_STATUSBARITEM );
@@ -1761,7 +1765,7 @@ Sequence< OUString > AddonsOptions_Impl::GetPropertyNamesStatusbarItem(
return lResult;
}
-Sequence< OUString > AddonsOptions_Impl::GetPropertyNamesImages( const OUString& aPropertyRootNode ) const
+Sequence< OUString > AddonsOptions_Impl::GetPropertyNamesImages( std::u16string_view aPropertyRootNode ) const
{
Sequence< OUString > lResult( PROPERTYCOUNT_IMAGES );
diff --git a/framework/source/helper/persistentwindowstate.cxx b/framework/source/helper/persistentwindowstate.cxx
index 5d4212e1ac2a..d2e78df8d98c 100644
--- a/framework/source/helper/persistentwindowstate.cxx
+++ b/framework/source/helper/persistentwindowstate.cxx
@@ -159,14 +159,14 @@ OUString PersistentWindowState::implst_identifyModule(const css::uno::Reference<
OUString PersistentWindowState::implst_getWindowStateFromConfig(
const css::uno::Reference< css::uno::XComponentContext >& rxContext,
- const OUString& sModuleName)
+ std::u16string_view sModuleName)
{
OUString sWindowState;
try
{
::comphelper::ConfigurationHelper::readDirectKey(rxContext,
"org.openoffice.Setup/",
- "Office/Factories/*[\"" + sModuleName + "\"]",
+ OUString::Concat("Office/Factories/*[\"") + sModuleName + "\"]",
"ooSetupFactoryWindowAttributes",
::comphelper::EConfigurationModes::ReadOnly) >>= sWindowState;
}
@@ -180,13 +180,13 @@ OUString PersistentWindowState::implst_getWindowStateFromConfig(
void PersistentWindowState::implst_setWindowStateOnConfig(
const css::uno::Reference< css::uno::XComponentContext >& rxContext,
- const OUString& sModuleName, const OUString& sWindowState)
+ std::u16string_view sModuleName, const OUString& sWindowState)
{
try
{
::comphelper::ConfigurationHelper::writeDirectKey(rxContext,
"org.openoffice.Setup/",
- "Office/Factories/*[\"" + sModuleName + "\"]",
+ OUString::Concat("Office/Factories/*[\"") + sModuleName + "\"]",
"ooSetupFactoryWindowAttributes",
css::uno::makeAny(sWindowState),
::comphelper::EConfigurationModes::Standard);
diff --git a/framework/source/inc/accelerators/presethandler.hxx b/framework/source/inc/accelerators/presethandler.hxx
index f30278696cfb..ad0a2e1260d5 100644
--- a/framework/source/inc/accelerators/presethandler.hxx
+++ b/framework/source/inc/accelerators/presethandler.hxx
@@ -20,6 +20,10 @@
#ifndef INCLUDED_FRAMEWORK_SOURCE_INC_ACCELERATORS_PRESETHANDLER_HXX
#define INCLUDED_FRAMEWORK_SOURCE_INC_ACCELERATORS_PRESETHANDLER_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include <accelerators/storageholder.hxx>
#include <com/sun/star/embed/XStorage.hpp>
@@ -229,8 +233,8 @@ class PresetHandler
@throw css::io::IOException
if copying failed.
*/
- void copyPresetToTarget(const OUString& sPreset,
- const OUString& sTarget);
+ void copyPresetToTarget(std::u16string_view sPreset,
+ std::u16string_view sTarget);
/** @short open the specified preset as stream object
and return it.
@@ -245,7 +249,7 @@ class PresetHandler
@return The opened preset stream ... or NULL if the preset does not exists.
*/
- css::uno::Reference< css::io::XStream > openPreset(const OUString& sPreset);
+ css::uno::Reference< css::io::XStream > openPreset(std::u16string_view sPreset);
/** @short open the specified target as stream object
and return it.
@@ -262,7 +266,7 @@ class PresetHandler
or couldn't be created as new one.
*/
css::uno::Reference< css::io::XStream > openTarget(
- const OUString& sTarget, sal_Int32 nMode);
+ std::u16string_view sTarget, sal_Int32 nMode);
/** @short do anything which is necessary to flush all changes
back to disk.
diff --git a/framework/source/jobs/helponstartup.cxx b/framework/source/jobs/helponstartup.cxx
index 43b94cfa8021..f022cbb73e05 100644
--- a/framework/source/jobs/helponstartup.cxx
+++ b/framework/source/jobs/helponstartup.cxx
@@ -316,11 +316,11 @@ OUString HelpOnStartup::its_checkIfHelpEnabledAndGetURL(const OUString& sModule)
return sHelpURL;
}
-OUString HelpOnStartup::ist_createHelpURL(const OUString& sBaseURL,
- const OUString& sLocale ,
- const OUString& sSystem )
+OUString HelpOnStartup::ist_createHelpURL(std::u16string_view sBaseURL,
+ std::u16string_view sLocale ,
+ std::u16string_view sSystem )
{
- return sBaseURL + "?Language=" + sLocale + "&System=" + sSystem;
+ return OUString::Concat(sBaseURL) + "?Language=" + sLocale + "&System=" + sSystem;
}
} // namespace framework
diff --git a/framework/source/jobs/jobdata.cxx b/framework/source/jobs/jobdata.cxx
index e04b18227326..6013812e0e7f 100644
--- a/framework/source/jobs/jobdata.cxx
+++ b/framework/source/jobs/jobdata.cxx
@@ -478,7 +478,7 @@ bool JobData::hasCorrectContext(const OUString& rModuleIdent) const
}
std::vector< OUString > JobData::getEnabledJobsForEvent( const css::uno::Reference< css::uno::XComponentContext >& rxContext,
- const OUString& sEvent )
+ std::u16string_view sEvent )
{
// create a config access to "/org.openoffice.Office.Jobs/Events"
ConfigAccess aConfig(rxContext, "/org.openoffice.Office.Jobs/Events");
@@ -491,7 +491,7 @@ std::vector< OUString > JobData::getEnabledJobsForEvent( const css::uno::Referen
return std::vector< OUString >();
// check if the given event exist inside list of registered ones
- OUString sPath(sEvent + "/JobList");
+ OUString sPath(OUString::Concat(sEvent) + "/JobList");
if (!xEventRegistry->hasByHierarchicalName(sPath))
return std::vector< OUString >();
diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx
index 6f288ce96da4..72c15015f586 100644
--- a/framework/source/services/pathsettings.cxx
+++ b/framework/source/services/pathsettings.cxx
@@ -19,6 +19,7 @@
#include <sal/config.h>
+#include <string_view>
#include <utility>
#include <unordered_map>
@@ -402,9 +403,9 @@ private:
void impl_storePath(const PathSettings::PathInfo& aPath);
- css::uno::Sequence< sal_Int32 > impl_mapPathName2IDList(const OUString& sPath);
+ css::uno::Sequence< sal_Int32 > impl_mapPathName2IDList(std::u16string_view sPath);
- void impl_notifyPropListener( const OUString& sPath ,
+ void impl_notifyPropListener( std::u16string_view sPath ,
const PathSettings::PathInfo* pPathOld,
const PathSettings::PathInfo* pPathNew);
@@ -793,11 +794,11 @@ PathSettings::EChangeOp PathSettings::impl_updatePath(const OUString& sPath
return eOp;
}
-css::uno::Sequence< sal_Int32 > PathSettings::impl_mapPathName2IDList(const OUString& sPath)
+css::uno::Sequence< sal_Int32 > PathSettings::impl_mapPathName2IDList(std::u16string_view sPath)
{
- OUString sInternalProp = sPath+POSTFIX_INTERNAL_PATHS;
- OUString sUserProp = sPath+POSTFIX_USER_PATHS;
- OUString sWriteProp = sPath+POSTFIX_WRITE_PATH;
+ OUString sInternalProp = OUString::Concat(sPath)+POSTFIX_INTERNAL_PATHS;
+ OUString sUserProp = OUString::Concat(sPath)+POSTFIX_USER_PATHS;
+ OUString sWriteProp = OUString::Concat(sPath)+POSTFIX_WRITE_PATH;
// Attention: The default set of IDs is fix and must follow these schema.
// Otherwise the outside code ant work for new added properties.
@@ -835,7 +836,7 @@ css::uno::Sequence< sal_Int32 > PathSettings::impl_mapPathName2IDList(const OUSt
return lIDs;
}
-void PathSettings::impl_notifyPropListener( const OUString& sPath,
+void PathSettings::impl_notifyPropListener( std::u16string_view sPath,
const PathSettings::PathInfo* pPathOld,
const PathSettings::PathInfo* pPathNew)
{
diff --git a/framework/source/uiconfiguration/ImageList.cxx b/framework/source/uiconfiguration/ImageList.cxx
index 8aef25517fb4..e047e6a340c7 100644
--- a/framework/source/uiconfiguration/ImageList.cxx
+++ b/framework/source/uiconfiguration/ImageList.cxx
@@ -177,12 +177,12 @@ void ImageList::GetImageNames( std::vector< OUString >& rNames ) const
}
}
-void ImageList::ImplAddImage( const OUString &aPrefix, const OUString &aName,
+void ImageList::ImplAddImage( std::u16string_view aPrefix, const OUString &aName,
sal_uInt16 nId, const Image &aImage )
{
Image aInsert = aImage;
if (!aInsert)
- aInsert = Image( "private:graphicrepository/" + aPrefix + aName );
+ aInsert = Image( OUString::Concat("private:graphicrepository/") + aPrefix + aName );
ImageAryData *pImg = new ImageAryData{ aName, nId, aInsert };
maImages.emplace_back( pImg );
diff --git a/framework/source/uiconfiguration/ImageList.hxx b/framework/source/uiconfiguration/ImageList.hxx
index b91a9482c07b..668b958a07c4 100644
--- a/framework/source/uiconfiguration/ImageList.hxx
+++ b/framework/source/uiconfiguration/ImageList.hxx
@@ -21,6 +21,8 @@
#define FRAMEWORK_SOURCE_UICONFIGURATION_IMAGELIST_HXX
#include <vcl/image.hxx>
+
+#include <string_view>
#include <unordered_map>
#include <vector>
@@ -67,7 +69,7 @@ private:
OUString maPrefix;
sal_uInt16 ImplGetImageId( const OUString& rImageName ) const;
- void ImplAddImage( const OUString &aPrefix, const OUString &aName, sal_uInt16 nId, const Image &aImage );
+ void ImplAddImage( std::u16string_view aPrefix, const OUString &aName, sal_uInt16 nId, const Image &aImage );
void ImplRemoveImage( sal_uInt16 nPos );
};
diff --git a/framework/source/uiconfiguration/uicategorydescription.cxx b/framework/source/uiconfiguration/uicategorydescription.cxx
index d83382b3361e..279b8b7fd192 100644
--- a/framework/source/uiconfiguration/uicategorydescription.cxx
+++ b/framework/source/uiconfiguration/uicategorydescription.cxx
@@ -33,6 +33,7 @@
#include <comphelper/propertysequence.hxx>
+#include <string_view>
#include <unordered_map>
using namespace com::sun::star::uno;
@@ -48,7 +49,7 @@ class ConfigurationAccess_UICategory : public ::cppu::WeakImplHelper<XNameAccess
{
osl::Mutex aMutex;
public:
- ConfigurationAccess_UICategory( const OUString& aModuleName, const Reference< XNameAccess >& xGenericUICommands, const Reference< XComponentContext >& rxContext );
+ ConfigurationAccess_UICategory( std::u16string_view aModuleName, const Reference< XNameAccess >& xGenericUICommands, const Reference< XComponentContext >& rxContext );
virtual ~ConfigurationAccess_UICategory() override;
// XNameAccess
@@ -96,9 +97,10 @@ class ConfigurationAccess_UICategory : public ::cppu::WeakImplHelper<XNameAccess
// XInterface, XTypeProvider
-ConfigurationAccess_UICategory::ConfigurationAccess_UICategory( const OUString& aModuleName, const Reference< XNameAccess >& rGenericUICategories, const Reference< XComponentContext >& rxContext ) :
+ConfigurationAccess_UICategory::ConfigurationAccess_UICategory( std::u16string_view aModuleName, const Reference< XNameAccess >& rGenericUICategories, const Reference< XComponentContext >& rxContext ) :
// Create configuration hierarchical access name
- m_aConfigCategoryAccess( "/org.openoffice.Office.UI." + aModuleName + "/Commands/Categories"),
+ m_aConfigCategoryAccess(
+ OUString::Concat("/org.openoffice.Office.UI.") + aModuleName + "/Commands/Categories"),
m_aPropUIName( "Name" ),
m_xGenericUICategories( rGenericUICategories ),
m_xConfigProvider(theDefaultProvider::get( rxContext )),
diff --git a/framework/source/uiconfiguration/windowstateconfiguration.cxx b/framework/source/uiconfiguration/windowstateconfiguration.cxx
index e1efab20592a..2d6d2b95e102 100644
--- a/framework/source/uiconfiguration/windowstateconfiguration.cxx
+++ b/framework/source/uiconfiguration/windowstateconfiguration.cxx
@@ -44,6 +44,7 @@
#include <comphelper/sequence.hxx>
#include <sal/log.hxx>
+#include <string_view>
#include <unordered_map>
#include <vector>
@@ -104,7 +105,7 @@ const char* CONFIGURATION_PROPERTIES[] =
class ConfigurationAccess_WindowState : public ::cppu::WeakImplHelper< XNameContainer, XContainerListener >
{
public:
- ConfigurationAccess_WindowState( const OUString& aWindowStateConfigFile, const Reference< XComponentContext >& rxContext );
+ ConfigurationAccess_WindowState( std::u16string_view aWindowStateConfigFile, const Reference< XComponentContext >& rxContext );
virtual ~ConfigurationAccess_WindowState() override;
// XNameAccess
@@ -213,9 +214,10 @@ class ConfigurationAccess_WindowState : public ::cppu::WeakImplHelper< XNameCon
std::vector< OUString > m_aPropArray;
};
-ConfigurationAccess_WindowState::ConfigurationAccess_WindowState( const OUString& aModuleName, const Reference< XComponentContext >& rxContext ) :
+ConfigurationAccess_WindowState::ConfigurationAccess_WindowState( std::u16string_view aModuleName, const Reference< XComponentContext >& rxContext ) :
// Create configuration hierarchical access name
- m_aConfigWindowAccess( "/org.openoffice.Office.UI." + aModuleName + "/UIElements/States"),
+ m_aConfigWindowAccess(
+ OUString::Concat("/org.openoffice.Office.UI.") + aModuleName + "/UIElements/States"),
m_xConfigProvider(theDefaultProvider::get( rxContext )),
m_bConfigAccessInitialized( false ),
m_bModified( false )
diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx
index 23ef0b8654f4..85a2a3e4ccc4 100644
--- a/framework/source/uielement/uicommanddescription.cxx
+++ b/framework/source/uielement/uicommanddescription.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <uielement/uicommanddescription.hxx>
#include <properties.h>
@@ -68,7 +72,7 @@ class ConfigurationAccess_UICommand : // Order is necessary for right initializa
{
osl::Mutex m_aMutex;
public:
- ConfigurationAccess_UICommand( const OUString& aModuleName, const Reference< XNameAccess >& xGenericUICommands, const Reference< XComponentContext >& rxContext );
+ ConfigurationAccess_UICommand( std::u16string_view aModuleName, const Reference< XNameAccess >& xGenericUICommands, const Reference< XComponentContext >& rxContext );
virtual ~ConfigurationAccess_UICommand() override;
// XNameAccess
@@ -153,10 +157,12 @@ class ConfigurationAccess_UICommand : // Order is necessary for right initializa
// XInterface, XTypeProvider
-ConfigurationAccess_UICommand::ConfigurationAccess_UICommand( const OUString& aModuleName, const Reference< XNameAccess >& rGenericUICommands, const Reference< XComponentContext>& rxContext ) :
+ConfigurationAccess_UICommand::ConfigurationAccess_UICommand( std::u16string_view aModuleName, const Reference< XNameAccess >& rGenericUICommands, const Reference< XComponentContext>& rxContext ) :
// Create configuration hierarchical access name
- m_aConfigCmdAccess( CONFIGURATION_ROOT_ACCESS + aModuleName + "/UserInterface/Commands"),
- m_aConfigPopupAccess( CONFIGURATION_ROOT_ACCESS + aModuleName + "/UserInterface/Popups"),
+ m_aConfigCmdAccess(
+ OUString::Concat(CONFIGURATION_ROOT_ACCESS) + aModuleName + "/UserInterface/Commands"),
+ m_aConfigPopupAccess(
+ OUString::Concat(CONFIGURATION_ROOT_ACCESS) + aModuleName + "/UserInterface/Popups"),
m_aPropProperties( "Properties" ),
m_xGenericUICommands( rGenericUICommands ),
m_xConfigProvider( theDefaultProvider::get( rxContext ) ),
@@ -559,7 +565,7 @@ void UICommandDescription::ensureGenericUICommandsForLanguage(const LanguageTag&
if (xGenericUICommands == m_xGenericUICommands.end())
{
Reference< XNameAccess > xEmpty;
- m_xGenericUICommands[rLanguage] = new ConfigurationAccess_UICommand( "GenericCommands", xEmpty, m_xContext );
+ m_xGenericUICommands[rLanguage] = new ConfigurationAccess_UICommand( u"GenericCommands", xEmpty, m_xContext );
}
}
diff --git a/framework/source/uifactory/factoryconfiguration.cxx b/framework/source/uifactory/factoryconfiguration.cxx
index 485b5a0a94e7..c0c75db7bba8 100644
--- a/framework/source/uifactory/factoryconfiguration.cxx
+++ b/framework/source/uifactory/factoryconfiguration.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <uifactory/factoryconfiguration.hxx>
#include <services.h>
@@ -41,9 +45,10 @@ using namespace com::sun::star::container;
namespace framework
{
-static OUString getHashKeyFromStrings( const OUString& aCommandURL, const OUString& aModuleName )
+static OUString getHashKeyFromStrings(
+ std::u16string_view aCommandURL, std::u16string_view aModuleName )
{
- return aCommandURL + "-" + aModuleName;
+ return OUString::Concat(aCommandURL) + "-" + aModuleName;
}
// XInterface, XTypeProvider
@@ -68,17 +73,18 @@ ConfigurationAccess_ControllerFactory::~ConfigurationAccess_ControllerFactory()
xContainer->removeContainerListener(m_xConfigAccessListener);
}
-OUString ConfigurationAccess_ControllerFactory::getServiceFromCommandModule( const OUString& rCommandURL, const OUString& rModule ) const
+OUString ConfigurationAccess_ControllerFactory::getServiceFromCommandModule( std::u16string_view rCommandURL, std::u16string_view rModule ) const
{
osl::MutexGuard g(m_mutex);
MenuControllerMap::const_iterator pIter = m_aMenuControllerMap.find( getHashKeyFromStrings( rCommandURL, rModule ));
if ( pIter != m_aMenuControllerMap.end() )
return pIter->second.m_aImplementationName;
- else if ( !rModule.isEmpty() )
+ else if ( !rModule.empty() )
{
// Try to detect if we have a generic popup menu controller
- pIter = m_aMenuControllerMap.find( getHashKeyFromStrings( rCommandURL, OUString() ));
+ pIter = m_aMenuControllerMap.find(
+ getHashKeyFromStrings( rCommandURL, std::u16string_view() ));
if ( pIter != m_aMenuControllerMap.end() )
return pIter->second.m_aImplementationName;
@@ -86,7 +92,7 @@ OUString ConfigurationAccess_ControllerFactory::getServiceFromCommandModule( con
return OUString();
}
-OUString ConfigurationAccess_ControllerFactory::getValueFromCommandModule( const OUString& rCommandURL, const OUString& rModule ) const
+OUString ConfigurationAccess_ControllerFactory::getValueFromCommandModule( std::u16string_view rCommandURL, std::u16string_view rModule ) const
{
osl::MutexGuard g(m_mutex);
@@ -94,10 +100,11 @@ OUString ConfigurationAccess_ControllerFactory::getValueFromCommandModule( const
if ( pIter != m_aMenuControllerMap.end() )
return pIter->second.m_aValue;
- else if ( !rModule.isEmpty() )
+ else if ( !rModule.empty() )
{
// Try to detect if we have a generic popup menu controller
- pIter = m_aMenuControllerMap.find( getHashKeyFromStrings( rCommandURL, OUString() ));
+ pIter = m_aMenuControllerMap.find(
+ getHashKeyFromStrings( rCommandURL, std::u16string_view() ));
if ( pIter != m_aMenuControllerMap.end() )
return pIter->second.m_aValue;
@@ -107,8 +114,8 @@ OUString ConfigurationAccess_ControllerFactory::getValueFromCommandModule( const
}
void ConfigurationAccess_ControllerFactory::addServiceToCommandModule(
- const OUString& rCommandURL,
- const OUString& rModule,
+ std::u16string_view rCommandURL,
+ std::u16string_view rModule,
const OUString& rServiceSpecifier )
{
osl::MutexGuard g(m_mutex);
@@ -118,8 +125,8 @@ void ConfigurationAccess_ControllerFactory::addServiceToCommandModule(
}
void ConfigurationAccess_ControllerFactory::removeServiceFromCommandModule(
- const OUString& rCommandURL,
- const OUString& rModule )
+ std::u16string_view rCommandURL,
+ std::u16string_view rModule )
{
osl::MutexGuard g(m_mutex);
diff --git a/framework/source/uifactory/uicontrollerfactory.cxx b/framework/source/uifactory/uicontrollerfactory.cxx
index 73959546a0ce..619b66d7c420 100644
--- a/framework/source/uifactory/uicontrollerfactory.cxx
+++ b/framework/source/uifactory/uicontrollerfactory.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <uifactory/factoryconfiguration.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
@@ -58,7 +62,7 @@ public:
virtual void SAL_CALL deregisterController( const OUString& aCommandURL, const OUString& aModuleName ) override;
protected:
- UIControllerFactory( const css::uno::Reference< css::uno::XComponentContext >& xContext, const OUString &rUINode );
+ UIControllerFactory( const css::uno::Reference< css::uno::XComponentContext >& xContext, std::u16string_view rUINode );
bool m_bConfigRead;
css::uno::Reference< css::uno::XComponentContext > m_xContext;
rtl::Reference<ConfigurationAccess_ControllerFactory> m_pConfigAccess;
@@ -69,14 +73,15 @@ private:
UIControllerFactory::UIControllerFactory(
const Reference< XComponentContext >& xContext,
- const OUString &rConfigurationNode )
+ std::u16string_view rConfigurationNode )
: UIControllerFactory_BASE(m_aMutex)
, m_bConfigRead( false )
, m_xContext( xContext )
, m_pConfigAccess()
{
m_pConfigAccess = new ConfigurationAccess_ControllerFactory(m_xContext,
- "/org.openoffice.Office.UI.Controller/Registered/" + rConfigurationNode);
+ OUString::Concat("/org.openoffice.Office.UI.Controller/Registered/")
+ + rConfigurationNode);
}
UIControllerFactory::~UIControllerFactory()
@@ -104,7 +109,7 @@ Reference< XInterface > SAL_CALL UIControllerFactory::createInstanceWithContext(
m_pConfigAccess->readConfigurationData();
}
- OUString aServiceName = m_pConfigAccess->getServiceFromCommandModule( aServiceSpecifier, OUString() );
+ OUString aServiceName = m_pConfigAccess->getServiceFromCommandModule( aServiceSpecifier, std::u16string_view() );
if ( !aServiceName.isEmpty() )
return m_xContext->getServiceManager()->createInstanceWithContext( aServiceName, m_xContext );
else
@@ -252,7 +257,7 @@ public:
};
PopupMenuControllerFactory::PopupMenuControllerFactory( const Reference< XComponentContext >& xContext ) :
- UIControllerFactory( xContext, "PopupMenu" )
+ UIControllerFactory( xContext, u"PopupMenu" )
{
}
@@ -297,7 +302,7 @@ public:
};
ToolbarControllerFactory::ToolbarControllerFactory( const Reference< XComponentContext >& xContext ) :
- UIControllerFactory( xContext, "ToolBar" )
+ UIControllerFactory( xContext, u"ToolBar" )
{
}
@@ -342,7 +347,7 @@ public:
};
StatusbarControllerFactory::StatusbarControllerFactory( const Reference< XComponentContext >& xContext ) :
- UIControllerFactory( xContext, "StatusBar" )
+ UIControllerFactory( xContext, u"StatusBar" )
{
}
diff --git a/framework/source/uifactory/uielementfactorymanager.cxx b/framework/source/uifactory/uielementfactorymanager.cxx
index 68e2286836cb..02d5435bab80 100644
--- a/framework/source/uifactory/uielementfactorymanager.cxx
+++ b/framework/source/uifactory/uielementfactorymanager.cxx
@@ -19,6 +19,8 @@
#include <sal/config.h>
+#include <string_view>
+
#include <uifactory/configurationaccessfactorymanager.hxx>
#include <helper/mischelper.hxx>
@@ -56,9 +58,9 @@ namespace framework
{
// global function needed by both implementations
-static OUString getHashKeyFromStrings( const OUString& aType, const OUString& aName, const OUString& aModuleName )
+static OUString getHashKeyFromStrings( std::u16string_view aType, std::u16string_view aName, std::u16string_view aModuleName )
{
- return aType + "^" + aName + "^" + aModuleName;
+ return OUString::Concat(aType) + "^" + aName + "^" + aModuleName;
}
ConfigurationAccess_FactoryManager::ConfigurationAccess_FactoryManager( const Reference< XComponentContext >& rxContext, const OUString& _sRoot ) :
@@ -82,7 +84,7 @@ ConfigurationAccess_FactoryManager::~ConfigurationAccess_FactoryManager()
xContainer->removeContainerListener(m_xConfigListener);
}
-OUString ConfigurationAccess_FactoryManager::getFactorySpecifierFromTypeNameModule( const OUString& rType, const OUString& rName, const OUString& rModule ) const
+OUString ConfigurationAccess_FactoryManager::getFactorySpecifierFromTypeNameModule( std::u16string_view rType, const OUString& rName, std::u16string_view rModule ) const
{
// SAFE
osl::MutexGuard g(m_aMutex);
@@ -93,7 +95,8 @@ OUString ConfigurationAccess_FactoryManager::getFactorySpecifierFromTypeNameModu
return pIter->second;
else
{
- pIter = m_aFactoryManagerMap.find( getHashKeyFromStrings( rType, rName, OUString() ));
+ pIter = m_aFactoryManagerMap.find(
+ getHashKeyFromStrings( rType, rName, std::u16string_view() ));
if ( pIter != m_aFactoryManagerMap.end() )
return pIter->second;
else
@@ -103,12 +106,12 @@ OUString ConfigurationAccess_FactoryManager::getFactorySpecifierFromTypeNameModu
if ( nIndex > 0 )
{
OUString aName = rName.copy( 0, nIndex+1 );
- pIter = m_aFactoryManagerMap.find( getHashKeyFromStrings( rType, aName, OUString() ));
+ pIter = m_aFactoryManagerMap.find( getHashKeyFromStrings( rType, aName, std::u16string_view() ));
if ( pIter != m_aFactoryManagerMap.end() )
return pIter->second;
}
- pIter = m_aFactoryManagerMap.find( getHashKeyFromStrings( rType, OUString(), OUString() ));
+ pIter = m_aFactoryManagerMap.find( getHashKeyFromStrings( rType, std::u16string_view(), std::u16string_view() ));
if ( pIter != m_aFactoryManagerMap.end() )
return pIter->second;
}
@@ -117,7 +120,7 @@ OUString ConfigurationAccess_FactoryManager::getFactorySpecifierFromTypeNameModu
return OUString();
}
-void ConfigurationAccess_FactoryManager::addFactorySpecifierToTypeNameModule( const OUString& rType, const OUString& rName, const OUString& rModule, const OUString& rServiceSpecifier )
+void ConfigurationAccess_FactoryManager::addFactorySpecifierToTypeNameModule( std::u16string_view rType, std::u16string_view rName, std::u16string_view rModule, const OUString& rServiceSpecifier )
{
// SAFE
osl::MutexGuard g(m_aMutex);
@@ -131,7 +134,7 @@ void ConfigurationAccess_FactoryManager::addFactorySpecifierToTypeNameModule( co
m_aFactoryManagerMap.emplace( aHashKey, rServiceSpecifier );
}
-void ConfigurationAccess_FactoryManager::removeFactorySpecifierFromTypeNameModule( const OUString& rType, const OUString& rName, const OUString& rModule )
+void ConfigurationAccess_FactoryManager::removeFactorySpecifierFromTypeNameModule( std::u16string_view rType, std::u16string_view rName, std::u16string_view rModule )
{
// SAFE
osl::MutexGuard g(m_aMutex);
diff --git a/helpcompiler/source/HelpIndexer.cxx b/helpcompiler/source/HelpIndexer.cxx
index dca372ea3700..b8889a619ee9 100644
--- a/helpcompiler/source/HelpIndexer.cxx
+++ b/helpcompiler/source/HelpIndexer.cxx
@@ -23,12 +23,12 @@
using namespace lucene::document;
HelpIndexer::HelpIndexer(OUString const &lang, OUString const &module,
- OUString const &srcDir, OUString const &outDir)
+ std::u16string_view srcDir, std::u16string_view outDir)
: d_lang(lang), d_module(module)
{
d_indexDir = outDir + OUStringChar('/') + module + ".idxl";
- d_captionDir = srcDir + "/caption";
- d_contentDir = srcDir + "/content";
+ d_captionDir = OUString::Concat(srcDir) + "/caption";
+ d_contentDir = OUString::Concat(srcDir) + "/content";
}
bool HelpIndexer::indexDocuments()
diff --git a/helpcompiler/source/HelpLinker.cxx b/helpcompiler/source/HelpLinker.cxx
index 166ff9918f76..b272d2c010e5 100644
--- a/helpcompiler/source/HelpLinker.cxx
+++ b/helpcompiler/source/HelpLinker.cxx
@@ -848,7 +848,7 @@ bool compileExtensionHelp
(
const OUString& aOfficeHelpPath,
std::u16string_view aExtensionName,
- const OUString& aExtensionLanguageRoot,
+ std::u16string_view aExtensionLanguageRoot,
sal_Int32 nXhpFileCount, const OUString* pXhpFiles,
std::u16string_view aDestination,
HelpProcessingErrorInfo& o_rHelpProcessingErrorInfo
@@ -905,7 +905,7 @@ bool compileExtensionHelp
// The following basically checks if the help.tree is well formed XML.
// Apparently there have been cases when translations contained
// non-well-formed XML in the past.
- OUString aTreeFileURL = aExtensionLanguageRoot + "/help.tree";
+ OUString aTreeFileURL = OUString::Concat(aExtensionLanguageRoot) + "/help.tree";
osl::DirectoryItem aTreeFileItem;
osl::FileBase::RC rcGet = osl::DirectoryItem::get( aTreeFileURL, aTreeFileItem );
osl::FileStatus aFileStatus( osl_FileStatus_Mask_FileSize );
diff --git a/hwpfilter/qa/cppunit/test_hwpfilter.cxx b/hwpfilter/qa/cppunit/test_hwpfilter.cxx
index 040c98edb1b7..125b115cc3d2 100644
--- a/hwpfilter/qa/cppunit/test_hwpfilter.cxx
+++ b/hwpfilter/qa/cppunit/test_hwpfilter.cxx
@@ -52,7 +52,7 @@ namespace
void HwpFilterTest::test()
{
testDir(OUString(),
- m_directories.getURLFromSrc("/hwpfilter/qa/cppunit/data/"));
+ m_directories.getURLFromSrc(u"/hwpfilter/qa/cppunit/data/"));
}
CPPUNIT_TEST_SUITE_REGISTRATION(HwpFilterTest);
diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx
index 70895cab1651..148a102a5733 100644
--- a/i18nlangtag/source/languagetag/languagetag.cxx
+++ b/i18nlangtag/source/languagetag/languagetag.cxx
@@ -528,7 +528,7 @@ LanguageTag::LanguageTag( LanguageType nLanguage )
LanguageTag::LanguageTag( const OUString& rBcp47, const OUString& rLanguage,
- const OUString& rScript, const OUString& rCountry )
+ std::u16string_view rScript, const OUString& rCountry )
:
maBcp47( rBcp47),
mnLangID( LANGUAGE_DONTKNOW),
@@ -541,7 +541,7 @@ LanguageTag::LanguageTag( const OUString& rBcp47, const OUString& rLanguage,
if (mbSystemLocale || mbInitializedBcp47)
return;
- if (rScript.isEmpty())
+ if (rScript.empty())
{
maBcp47 = rLanguage + "-" + rCountry;
mbInitializedBcp47 = true;
diff --git a/i18npool/inc/indexentrysupplier.hxx b/i18npool/inc/indexentrysupplier.hxx
index 6a441f3f91e2..44056d32ced2 100644
--- a/i18npool/inc/indexentrysupplier.hxx
+++ b/i18npool/inc/indexentrysupplier.hxx
@@ -19,6 +19,10 @@
#ifndef INCLUDED_I18NPOOL_INC_INDEXENTRYSUPPLIER_HXX
#define INCLUDED_I18NPOOL_INC_INDEXENTRYSUPPLIER_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include <com/sun/star/i18n/XExtendedIndexEntrySupplier.hpp>
#include <cppuhelper/implbase.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
@@ -77,7 +81,7 @@ private:
css::uno::Reference < css::i18n::XExtendedIndexEntrySupplier > xIES;
css::uno::Reference < css::uno::XComponentContext > m_xContext;
/// @throws css::uno::RuntimeException
- bool createLocaleSpecificIndexEntrySupplier(const OUString& name);
+ bool createLocaleSpecificIndexEntrySupplier(std::u16string_view name);
/// @throws css::uno::RuntimeException
css::uno::Reference < css::i18n::XExtendedIndexEntrySupplier > const & getLocaleSpecificIndexEntrySupplier(
const css::lang::Locale& rLocale, const OUString& rSortAlgorithm);
diff --git a/i18npool/source/indexentry/indexentrysupplier.cxx b/i18npool/source/indexentry/indexentrysupplier.cxx
index f98856ee2227..9fa060ee3c85 100644
--- a/i18npool/source/indexentry/indexentrysupplier.cxx
+++ b/i18npool/source/indexentry/indexentrysupplier.cxx
@@ -93,10 +93,10 @@ OUString SAL_CALL IndexEntrySupplier::getIndexCharacter( const OUString& rIndexE
getIndexCharacter( rIndexEntry, rLocale, rSortAlgorithm );
}
-bool IndexEntrySupplier::createLocaleSpecificIndexEntrySupplier(const OUString& name)
+bool IndexEntrySupplier::createLocaleSpecificIndexEntrySupplier(std::u16string_view name)
{
Reference < XInterface > xI = m_xContext->getServiceManager()->createInstanceWithContext(
- "com.sun.star.i18n.IndexEntrySupplier_" + name, m_xContext);
+ OUString::Concat("com.sun.star.i18n.IndexEntrySupplier_") + name, m_xContext);
if ( xI.is() ) {
xIES.set( xI, UNO_QUERY );
@@ -129,13 +129,15 @@ IndexEntrySupplier::getLocaleSpecificIndexEntrySupplier(const Locale& rLocale, c
// Load service with name <base>_<lang>_<country>_<algorithm>
// or <base>_<bcp47>_<algorithm> and fallbacks.
bLoaded = createLocaleSpecificIndexEntrySupplier(
- LocaleDataImpl::getFirstLocaleServiceName( rLocale) + "_" + aSortAlgorithm);
+ OUString(
+ LocaleDataImpl::getFirstLocaleServiceName( rLocale) + "_"
+ + aSortAlgorithm));
if (!bLoaded)
{
::std::vector< OUString > aFallbacks( LocaleDataImpl::getFallbackLocaleServiceNames( rLocale));
for (auto const& fallback : aFallbacks)
{
- bLoaded = createLocaleSpecificIndexEntrySupplier(fallback + "_" + aSortAlgorithm);
+ bLoaded = createLocaleSpecificIndexEntrySupplier(OUString(fallback + "_" + aSortAlgorithm));
if (bLoaded)
break;
}
@@ -149,7 +151,7 @@ IndexEntrySupplier::getLocaleSpecificIndexEntrySupplier(const Locale& rLocale, c
if (!bLoaded)
{
// load default service with name <base>_Unicode
- bLoaded = createLocaleSpecificIndexEntrySupplier( "Unicode");
+ bLoaded = createLocaleSpecificIndexEntrySupplier( u"Unicode");
if (!bLoaded)
{
throw RuntimeException(); // could not load any service
diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx b/i18npool/source/nativenumber/nativenumbersupplier.cxx
index a745396782df..a854d279f7bf 100644
--- a/i18npool/source/nativenumber/nativenumbersupplier.cxx
+++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx
@@ -565,7 +565,7 @@ Separators getLocaleSeparators(const Locale& rLocale, const OUString& rLocStr)
}
OUString getNumberText(const Locale& rLocale, const OUString& rNumberString,
- const OUString& sNumberTextParams)
+ std::u16string_view sNumberTextParams)
{
sal_Int32 i, count = 0;
const sal_Int32 len = rNumberString.getLength();
@@ -605,8 +605,8 @@ OUString getNumberText(const Locale& rLocale, const OUString& rNumberString,
= css::linguistic2::NumberText::create(comphelper::getProcessComponentContext());
OUString numbertext_prefix;
// default "cardinal" gets empty prefix
- if (!sNumberTextParams.isEmpty() && sNumberTextParams != "cardinal")
- numbertext_prefix = sNumberTextParams + " ";
+ if (!sNumberTextParams.empty() && sNumberTextParams != u"cardinal")
+ numbertext_prefix = OUString::Concat(sNumberTextParams) + " ";
// Several hundreds of headings could result typing lags because
// of the continuous update of the multiple number names during typing.
// We fix this by buffering the result of the conversion.
@@ -673,7 +673,7 @@ OUString NativeNumberSupplierService::getNativeNumberString(const OUString& aNum
if (nStripCase > 0 && (rNativeNumberParams.getLength() == nStripCase ||
rNativeNumberParams[nStripCase++] == ' '))
{
- OUString aStr = getNumberText(rLocale, aNumberString, rNativeNumberParams.copy(nStripCase));
+ OUString aStr = getNumberText(rLocale, aNumberString, rNativeNumberParams.subView(nStripCase));
if (!xCharClass.is())
xCharClass = CharacterClassification::create(comphelper::getProcessComponentContext());
diff --git a/include/avmedia/mediaitem.hxx b/include/avmedia/mediaitem.hxx
index b30689c6fe30..7246c9e7e2a1 100644
--- a/include/avmedia/mediaitem.hxx
+++ b/include/avmedia/mediaitem.hxx
@@ -24,6 +24,8 @@
#include <com/sun/star/media/ZoomLevel.hpp>
#include <avmedia/avmediadllapi.h>
#include <memory>
+#include <string_view>
+
#include <o3tl/typed_flags_set.hxx>
namespace com::sun::star::embed { class XStorage; }
@@ -135,7 +137,7 @@ bool AVMEDIA_DLLPUBLIC EmbedMedia(
bool AVMEDIA_DLLPUBLIC CreateMediaTempFile(
::css::uno::Reference<::css::io::XInputStream> const& xInStream,
OUString& o_rTempFileURL,
- const OUString& rDesiredExtension);
+ std::u16string_view rDesiredExtension);
OUString GetFilename(OUString const& rSourceURL);
diff --git a/include/codemaker/commoncpp.hxx b/include/codemaker/commoncpp.hxx
index dc1b61c6b32c..9c55fcc6a5d5 100644
--- a/include/codemaker/commoncpp.hxx
+++ b/include/codemaker/commoncpp.hxx
@@ -53,7 +53,7 @@ enum class IdentifierTranslationMode {
};
rtl::OString translateUnoToCppIdentifier(
- rtl::OString const & identifier, rtl::OString const & prefix,
+ rtl::OString const & identifier, std::string_view prefix,
IdentifierTranslationMode transmode = IdentifierTranslationMode::Global,
rtl::OString const * forbidden = nullptr);
diff --git a/include/codemaker/commonjava.hxx b/include/codemaker/commonjava.hxx
index 11e1446bf64a..10d7c28ba576 100644
--- a/include/codemaker/commonjava.hxx
+++ b/include/codemaker/commonjava.hxx
@@ -22,6 +22,8 @@
#include <sal/config.h>
+#include <string_view>
+
#include <codemaker/unotype.hxx>
namespace rtl { class OString; }
@@ -33,7 +35,7 @@ rtl::OString translateUnoToJavaType(
bool referenceType);
rtl::OString translateUnoToJavaIdentifier(
- rtl::OString const & identifier, rtl::OString const & prefix);
+ rtl::OString const & identifier, std::string_view prefix);
}
diff --git a/include/codemaker/typemanager.hxx b/include/codemaker/typemanager.hxx
index f76fbb4ca7ea..3e6f67fe4b3f 100644
--- a/include/codemaker/typemanager.hxx
+++ b/include/codemaker/typemanager.hxx
@@ -52,7 +52,7 @@ public:
rtl::Reference< unoidl::MapCursor > * cursor = nullptr) const;
codemaker::UnoType::Sort decompose(
- OUString const & name, bool resolveTypedefs, OUString * nucleus,
+ std::u16string_view name, bool resolveTypedefs, OUString * nucleus,
sal_Int32 * rank, std::vector< OUString > * arguments,
rtl::Reference< unoidl::Entity > * entity) const;
diff --git a/include/comphelper/DirectoryHelper.hxx b/include/comphelper/DirectoryHelper.hxx
index 61b0287e9f77..e614252beaf4 100644
--- a/include/comphelper/DirectoryHelper.hxx
+++ b/include/comphelper/DirectoryHelper.hxx
@@ -14,6 +14,7 @@
#include <comphelper/comphelperdllapi.h>
#include <rtl/ustring.hxx>
#include <set>
+#include <string_view>
namespace comphelper
{
@@ -26,7 +27,7 @@ public:
static void scanDirsAndFiles(const OUString& rDirURL, std::set<OUString>& rDirs,
std::set<std::pair<OUString, OUString>>& rFiles);
static bool deleteDirRecursively(const OUString& rDirURL);
- static bool moveDirContent(const OUString& rSourceDirURL, const OUString& rTargetDirURL,
+ static bool moveDirContent(const OUString& rSourceDirURL, std::u16string_view rTargetDirURL,
const std::set<OUString>& rExcludeList);
};
}
diff --git a/include/comphelper/backupfilehelper.hxx b/include/comphelper/backupfilehelper.hxx
index e0a2ca244fb0..abf8044a28ca 100644
--- a/include/comphelper/backupfilehelper.hxx
+++ b/include/comphelper/backupfilehelper.hxx
@@ -15,6 +15,7 @@
#include <comphelper/comphelperdllapi.h>
#include <rtl/ustring.hxx>
#include <set>
+#include <string_view>
#include <vector>
namespace comphelper
@@ -189,21 +190,21 @@ namespace comphelper
static const std::vector< OUString >& getCustomizationFileNames();
// file push helpers
- bool tryPush_Files(const std::set< OUString >& rDirs, const std::set< std::pair< OUString, OUString > >& rFiles, const OUString& rSourceURL, const OUString& rTargetURL);
- bool tryPush_file(const OUString& rSourceURL, const OUString& rTargetURL, const OUString& rName, const OUString& rExt);
+ bool tryPush_Files(const std::set< OUString >& rDirs, const std::set< std::pair< OUString, OUString > >& rFiles, std::u16string_view rSourceURL, const OUString& rTargetURL);
+ bool tryPush_file(std::u16string_view rSourceURL, std::u16string_view rTargetURL, std::u16string_view rName, std::u16string_view rExt);
// file pop possibilities helper
- bool isPopPossible_files(const std::set< OUString >& rDirs, const std::set< std::pair< OUString, OUString > >& rFiles, const OUString& rSourceURL, const OUString& rTargetURL);
- static bool isPopPossible_file(const OUString& rSourceURL, const OUString& rTargetURL, const OUString& rName, const OUString& rExt);
+ bool isPopPossible_files(const std::set< OUString >& rDirs, const std::set< std::pair< OUString, OUString > >& rFiles, std::u16string_view rSourceURL, std::u16string_view rTargetURL);
+ static bool isPopPossible_file(std::u16string_view rSourceURL, std::u16string_view rTargetURL, std::u16string_view rName, std::u16string_view rExt);
// file pop helpers
- bool tryPop_files(const std::set< OUString >& rDirs, const std::set< std::pair< OUString, OUString > >& rFiles, const OUString& rSourceURL, const OUString& rTargetURL);
- bool tryPop_file(const OUString& rSourceURL, const OUString& rTargetURL, const OUString& rName, const OUString& rExt);
+ bool tryPop_files(const std::set< OUString >& rDirs, const std::set< std::pair< OUString, OUString > >& rFiles, std::u16string_view rSourceURL, const OUString& rTargetURL);
+ bool tryPop_file(std::u16string_view rSourceURL, std::u16string_view rTargetURL, std::u16string_view rName, std::u16string_view rExt);
// ExtensionInfo helpers
- bool tryPush_extensionInfo(const OUString& rTargetURL);
- static bool isPopPossible_extensionInfo(const OUString& rTargetURL);
- bool tryPop_extensionInfo(const OUString& rTargetURL);
+ bool tryPush_extensionInfo(std::u16string_view rTargetURL);
+ static bool isPopPossible_extensionInfo(std::u16string_view rTargetURL);
+ bool tryPop_extensionInfo(std::u16string_view rTargetURL);
// FileDirInfo helpers
void fillDirFileInfo();
diff --git a/include/comphelper/configuration.hxx b/include/comphelper/configuration.hxx
index e56951281f9e..1ed37dcd45c3 100644
--- a/include/comphelper/configuration.hxx
+++ b/include/comphelper/configuration.hxx
@@ -13,6 +13,8 @@
#include <sal/config.h>
#include <optional>
+#include <string_view>
+
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Reference.h>
#include <comphelper/comphelperdllapi.h>
@@ -102,7 +104,7 @@ public:
OUString const & path, css::uno::Any const & value);
css::uno::Any getLocalizedPropertyValue(
- OUString const & path) const;
+ std::u16string_view path) const;
static void setLocalizedPropertyValue(
std::shared_ptr< ConfigurationChanges > const & batch,
diff --git a/include/comphelper/ofopxmlhelper.hxx b/include/comphelper/ofopxmlhelper.hxx
index 2fa651406411..fe778bf1e6ca 100644
--- a/include/comphelper/ofopxmlhelper.hxx
+++ b/include/comphelper/ofopxmlhelper.hxx
@@ -20,6 +20,10 @@
#ifndef INCLUDED_COMPHELPER_OFOPXMLHELPER_HXX
#define INCLUDED_COMPHELPER_OFOPXMLHELPER_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include <com/sun/star/uno/Sequence.h>
#include <comphelper/comphelperdllapi.h>
@@ -40,7 +44,7 @@ namespace comphelper::OFOPXMLHelper {
css::uno::Sequence< css::uno::Sequence< css::beans::StringPair > >
ReadRelationsInfoSequence(
const css::uno::Reference< css::io::XInputStream >& xInStream,
- const OUString & aStreamName,
+ std::u16string_view aStreamName,
const css::uno::Reference< css::uno::XComponentContext >& rContext );
// returns sequence containing two entries of type sequence<StringPair>
diff --git a/include/connectivity/dbtools.hxx b/include/connectivity/dbtools.hxx
index 0aa999ae729a..f4f19b66f57e 100644
--- a/include/connectivity/dbtools.hxx
+++ b/include/connectivity/dbtools.hxx
@@ -752,8 +752,8 @@ namespace dbtools
*/
OOO_DLLPUBLIC_DBTOOLS
void collectColumnInformation( const css::uno::Reference< css::sdbc::XConnection>& _xConnection,
- const OUString& _sComposedTableName,
- const OUString& _rName,
+ std::u16string_view _sComposedTableName,
+ std::u16string_view _rName,
ColumnInformationMap& _rInfo);
diff --git a/include/filter/msfilter/mstoolbar.hxx b/include/filter/msfilter/mstoolbar.hxx
index 1f8069ba70c6..dacc21c3180b 100644
--- a/include/filter/msfilter/mstoolbar.hxx
+++ b/include/filter/msfilter/mstoolbar.hxx
@@ -10,6 +10,7 @@
#define INCLUDED_FILTER_MSFILTER_MSTOOLBAR_HXX
#include <memory>
+#include <string_view>
#include <vector>
#include <com/sun/star/uno/Any.hxx>
@@ -61,7 +62,7 @@ public:
const css::uno::Reference< css::ui::XUIConfigurationManager >& getAppCfgManager() const { return m_xAppCfgMgr;}
- static css::uno::Any createCommandFromMacro( const OUString& sCmd );
+ static css::uno::Any createCommandFromMacro( std::u16string_view sCmd );
void addIcon( const css::uno::Reference< css::graphic::XGraphic >& xImage, const OUString& sString );
void applyIcons();
diff --git a/include/filter/msfilter/msvbahelper.hxx b/include/filter/msfilter/msvbahelper.hxx
index 7bc7483b660c..d5cb1e96f533 100644
--- a/include/filter/msfilter/msvbahelper.hxx
+++ b/include/filter/msfilter/msvbahelper.hxx
@@ -19,6 +19,10 @@
#ifndef INCLUDED_FILTER_MSFILTER_MSVBAHELPER_HXX
#define INCLUDED_FILTER_MSFILTER_MSVBAHELPER_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include <com/sun/star/awt/KeyEvent.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
@@ -51,7 +55,7 @@ struct MSFILTER_DLLPUBLIC MacroResolvedInfo
explicit MacroResolvedInfo( SfxObjectShell* pDocContext = nullptr ) : mpDocContext( pDocContext ), mbFound( false ) {}
};
-MSFILTER_DLLPUBLIC OUString makeMacroURL( const OUString& sMacroName );
+MSFILTER_DLLPUBLIC OUString makeMacroURL( std::u16string_view sMacroName );
MSFILTER_DLLPUBLIC OUString extractMacroName( const OUString& rMacroUrl );
MSFILTER_DLLPUBLIC OUString getDefaultProjectName( SfxObjectShell const * pShell );
MSFILTER_DLLPUBLIC OUString resolveVBAMacro( SfxObjectShell const * pShell, const OUString& rLibName, const OUString& rModuleName, const OUString& rMacroName );
diff --git a/include/helpcompiler/HelpIndexer.hxx b/include/helpcompiler/HelpIndexer.hxx
index 832780f6b1d2..2f8e7f32293a 100644
--- a/include/helpcompiler/HelpIndexer.hxx
+++ b/include/helpcompiler/HelpIndexer.hxx
@@ -14,6 +14,7 @@
#include <rtl/ustring.hxx>
#include <set>
+#include <string_view>
// I assume that TCHAR is defined as wchar_t throughout
@@ -48,7 +49,7 @@ class L10N_DLLPUBLIC HelpIndexer {
* @param outDir The directory to write the "module".idxl directory to
*/
HelpIndexer(OUString const &lang, OUString const &module,
- OUString const &srcDir, OUString const &outDir);
+ std::u16string_view srcDir, std::u16string_view outDir);
/**
* Run the indexer.
diff --git a/include/helpcompiler/compilehelp.hxx b/include/helpcompiler/compilehelp.hxx
index 6d2d99be2a24..8944257bd5c2 100644
--- a/include/helpcompiler/compilehelp.hxx
+++ b/include/helpcompiler/compilehelp.hxx
@@ -63,7 +63,7 @@ HELPLINKER_DLLPUBLIC bool compileExtensionHelp
(
const OUString& aOfficeHelpPath,
std::u16string_view aExtensionName,
- const OUString& aExtensionLanguageRoot,
+ std::u16string_view aExtensionLanguageRoot,
sal_Int32 nXhpFileCount, const OUString* pXhpFiles,
std::u16string_view aDestination,
HelpProcessingErrorInfo& o_rHelpProcessingErrorInfo
diff --git a/include/i18nlangtag/languagetag.hxx b/include/i18nlangtag/languagetag.hxx
index 66b18d3faec7..d7c1c8787a53 100644
--- a/include/i18nlangtag/languagetag.hxx
+++ b/include/i18nlangtag/languagetag.hxx
@@ -18,6 +18,7 @@
#include <i18nlangtag/lang.h>
#include <memory>
+#include <string_view>
#include <vector>
/** The ISO 639-2 code reserved for local use used to indicate that a
@@ -99,7 +100,7 @@ public:
distinct attributes.
*/
explicit LanguageTag( const OUString& rBcp47, const OUString& rLanguage,
- const OUString& rScript, const OUString& rCountry );
+ std::u16string_view rScript, const OUString& rCountry );
/** Init LanguageTag with rtl_Locale.
diff --git a/include/oox/core/contexthandler.hxx b/include/oox/core/contexthandler.hxx
index 0d06e548ee32..503b36d0c083 100644
--- a/include/oox/core/contexthandler.hxx
+++ b/include/oox/core/contexthandler.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_OOX_CORE_CONTEXTHANDLER_HXX
#include <memory>
+#include <string_view>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Reference.hxx>
@@ -72,7 +73,7 @@ public:
OUString getFragmentPathFromRelId( const OUString& rRelId ) const;
/** Returns the full fragment path for the first relation of the passed type. */
OUString getFragmentPathFromFirstType( std::u16string_view rType ) const;
- OUString getFragmentPathFromFirstTypeFromOfficeDoc( const OUString& rType ) const;
+ OUString getFragmentPathFromFirstTypeFromOfficeDoc( std::u16string_view rType ) const;
// com.sun.star.xml.sax.XFastContextHandler interface ---------------------
diff --git a/include/oox/core/relations.hxx b/include/oox/core/relations.hxx
index 23d6a9320243..166652afe5e8 100644
--- a/include/oox/core/relations.hxx
+++ b/include/oox/core/relations.hxx
@@ -23,6 +23,7 @@
#include <cstddef>
#include <map>
#include <memory>
+#include <string_view>
#include <oox/dllapi.h>
#include <rtl/ustring.hxx>
@@ -91,7 +92,7 @@ public:
/** Returns the first relation with the passed type. */
const Relation* getRelationFromFirstType( std::u16string_view rType ) const;
/** Finds all relations associated with the passed type. */
- RelationsRef getRelationsFromTypeFromOfficeDoc( const OUString& rType ) const;
+ RelationsRef getRelationsFromTypeFromOfficeDoc( std::u16string_view rType ) const;
/** Returns the external target of the relation with the passed relation identifier. */
OUString getExternalTargetFromRelId( const OUString& rRelId ) const;
@@ -104,7 +105,7 @@ public:
OUString getFragmentPathFromRelId( const OUString& rRelId ) const;
/** Returns the full fragment path for the first relation of the passed type. */
OUString getFragmentPathFromFirstType( std::u16string_view rType ) const;
- OUString getFragmentPathFromFirstTypeFromOfficeDoc( const OUString& rType ) const;
+ OUString getFragmentPathFromFirstTypeFromOfficeDoc( std::u16string_view rType ) const;
private:
::std::map< OUString, Relation > maMap;
diff --git a/include/oox/core/xmlfilterbase.hxx b/include/oox/core/xmlfilterbase.hxx
index 99b73e5b18bd..ce8ab9e3ae47 100644
--- a/include/oox/core/xmlfilterbase.hxx
+++ b/include/oox/core/xmlfilterbase.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_OOX_CORE_XMLFILTERBASE_HXX
#include <memory>
+#include <string_view>
#include <vector>
#include <com/sun/star/uno/Reference.hxx>
@@ -113,7 +114,7 @@ public:
virtual ::oox::drawingml::table::TableStyleListPtr getTableStyles() = 0;
- OUString getFragmentPathFromFirstTypeFromOfficeDoc( const OUString& rPart );
+ OUString getFragmentPathFromFirstTypeFromOfficeDoc( std::u16string_view rPart );
/** Imports a fragment using the passed fragment handler, which contains
the full path to the fragment stream.
diff --git a/include/oox/drawingml/shape.hxx b/include/oox/drawingml/shape.hxx
index fea94105b65d..eac27b68c7a5 100644
--- a/include/oox/drawingml/shape.hxx
+++ b/include/oox/drawingml/shape.hxx
@@ -22,6 +22,7 @@
#include <map>
#include <memory>
+#include <string_view>
#include <vector>
#include <com/sun/star/awt/Point.hpp>
@@ -209,7 +210,7 @@ public:
void setDiagramDoms(const css::uno::Sequence<css::beans::PropertyValue>& rDiagramDoms) { maDiagramDoms = rDiagramDoms; }
void setDiagramData(const DiagramDataPtr& pDiagramData) { mpDiagramData = pDiagramData; }
css::uno::Sequence< css::uno::Sequence< css::uno::Any > >resolveRelationshipsOfTypeFromOfficeDoc(
- core::XmlFilterBase& rFilter, const OUString& sFragment, const OUString& sType );
+ core::XmlFilterBase& rFilter, const OUString& sFragment, std::u16string_view sType );
void setLinkedTxbxAttributes(const LinkedTxbxAttr& rhs){ maLinkedTxbxAttr = rhs; };
void setTxbxHasLinkedTxtBox( const bool rhs){ mbHasLinkedTxbx = rhs; };
const LinkedTxbxAttr& getLinkedTxbxAttributes() const { return maLinkedTxbxAttr; };
diff --git a/include/oox/dump/dumperbase.hxx b/include/oox/dump/dumperbase.hxx
index 54bbb6f6af0f..bfdacf53b42c 100644
--- a/include/oox/dump/dumperbase.hxx
+++ b/include/oox/dump/dumperbase.hxx
@@ -1160,7 +1160,7 @@ protected:
private:
static OUString getSysFileName(
const OUString& rStrmName,
- const OUString& rSysOutPath );
+ std::u16string_view rSysOutPath );
void extractStream(
StorageBase& rStrg,
@@ -1176,7 +1176,7 @@ private:
const StorageRef& rxStrg,
const OUString& rStrgPath,
const OUString& rItemName,
- const OUString& rSysPath,
+ std::u16string_view rSysPath,
bool bIsStrg, bool bIsStrm );
private:
diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index afd1d994eafd..022a0df00e4e 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_OOX_EXPORT_DRAWINGML_HXX
#include <map>
+#include <string_view>
#include <vector>
#include <com/sun/star/beans/PropertyState.hpp>
@@ -294,7 +295,7 @@ public:
void WriteDiagram(const css::uno::Reference<css::drawing::XShape>& rXShape, int nDiagramId);
void writeDiagramRels(const css::uno::Sequence<css::uno::Sequence<css::uno::Any>>& xRelSeq,
const css::uno::Reference<css::io::XOutputStream>& xOutStream,
- const OUString& sGrabBagProperyName, int nDiagramId);
+ std::u16string_view sGrabBagProperyName, int nDiagramId);
static void WriteFromTo(const css::uno::Reference<css::drawing::XShape>& rXShape, const css::awt::Size& aPageSize,
const sax_fastparser::FSHelperPtr& pDrawing);
diff --git a/include/oox/export/vmlexport.hxx b/include/oox/export/vmlexport.hxx
index 9aea58378660..a1c79fda73a8 100644
--- a/include/oox/export/vmlexport.hxx
+++ b/include/oox/export/vmlexport.hxx
@@ -20,6 +20,10 @@
#ifndef INCLUDED_OOX_EXPORT_VMLEXPORT_HXX
#define INCLUDED_OOX_EXPORT_VMLEXPORT_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include <com/sun/star/uno/Reference.hxx>
#include <editeng/outlobj.hxx>
#include <filter/msfilter/escherex.hxx>
@@ -148,7 +152,7 @@ public:
void SetHashMarkForType(bool bUseHashMarkForType) { m_bUseHashMarkForType = bUseHashMarkForType; }
void OverrideShapeIDGen(bool bOverrideShapeIdGeneration,
const OString& sShapeIDPrefix = OString());
- static OString GetVMLShapeTypeDefinition(const OString& sShapeID, const bool bIsPictureFrame);
+ static OString GetVMLShapeTypeDefinition(std::string_view sShapeID, const bool bIsPictureFrame);
protected:
/// Add an attribute to the generated <v:shape/> element.
diff --git a/include/oox/ole/vbaproject.hxx b/include/oox/ole/vbaproject.hxx
index e46db83d337f..4a9b3e1a4e5b 100644
--- a/include/oox/ole/vbaproject.hxx
+++ b/include/oox/ole/vbaproject.hxx
@@ -22,6 +22,7 @@
#include <functional>
#include <map>
+#include <string_view>
#include <com/sun/star/uno/Reference.hxx>
#include <oox/dllapi.h>
@@ -54,7 +55,7 @@ class VbaFilterConfig
public:
explicit VbaFilterConfig(
const css::uno::Reference< css::uno::XComponentContext >& rxContext,
- const OUString& rConfigCompName );
+ std::u16string_view rConfigCompName );
~VbaFilterConfig();
/** Returns true, if the VBA source code and forms should be imported. */
@@ -116,7 +117,7 @@ public:
explicit VbaProject(
const css::uno::Reference< css::uno::XComponentContext >& rxContext,
const css::uno::Reference< css::frame::XModel >& rxDocModel,
- const OUString& rConfigCompName );
+ std::u16string_view rConfigCompName );
virtual ~VbaProject();
/** Imports the entire VBA project from the passed storage.
diff --git a/include/sfx2/linkmgr.hxx b/include/sfx2/linkmgr.hxx
index deb9f00c0797..4a159e16df3e 100644
--- a/include/sfx2/linkmgr.hxx
+++ b/include/sfx2/linkmgr.hxx
@@ -25,6 +25,8 @@
#include <sfx2/linksrc.hxx>
#include <sfx2/lnkbase.hxx>
#include <o3tl/sorted_vector.hxx>
+
+#include <string_view>
#include <vector>
class SfxObjectShell;
@@ -95,7 +97,7 @@ public:
void InsertDDELink( SvBaseLink*,
const OUString& rServer,
const OUString& rTopic,
- const OUString& rItem );
+ std::u16string_view rItem );
// if everything is already set at the link!
void InsertDDELink( SvBaseLink* );
@@ -175,7 +177,7 @@ const sal_Unicode cTokenSeparator = 0xFFFF;
SFX2_DLLPUBLIC void MakeLnkName( OUString& rName,
const OUString* pType, // Can also be null!!
const OUString& rFile,
- const OUString& rLink,
+ std::u16string_view rLink,
const OUString* pFilter = nullptr );
}
diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx
index 6cc9c277ef53..847a6bc06c25 100644
--- a/include/sfx2/lokhelper.hxx
+++ b/include/sfx2/lokhelper.hxx
@@ -81,14 +81,14 @@ public:
static void forEachOtherView(ViewShellType* pThisViewShell, FunctionType f);
/// Invoke the LOK callback of all other views showing the same document as pThisView, with a payload of rKey-rPayload.
- static void notifyOtherViews(const SfxViewShell* pThisView, int nType, const OString& rKey,
+ static void notifyOtherViews(const SfxViewShell* pThisView, int nType, std::string_view rKey,
const OString& rPayload);
/// Invoke the LOK callback of all views except pThisView, with a JSON payload created from the given property tree.
static void notifyOtherViews(const SfxViewShell* pThisView, int nType,
const boost::property_tree::ptree& rTree);
/// Same as notifyOtherViews(), but works on a selected "other" view, not on all of them.
static void notifyOtherView(const SfxViewShell* pThisView, SfxViewShell const* pOtherView,
- int nType, const OString& rKey, const OString& rPayload);
+ int nType, std::string_view rKey, const OString& rPayload);
/// Same as notifyOtherViews(), the property-tree version, but works on a selected "other" view, not on all of them.
static void notifyOtherView(const SfxViewShell* pThisView, SfxViewShell const* pOtherView,
int nType, const boost::property_tree::ptree& rTree);
diff --git a/include/sfx2/notebookbar/SfxNotebookBar.hxx b/include/sfx2/notebookbar/SfxNotebookBar.hxx
index acc5a9c50250..cb94dd2b4603 100644
--- a/include/sfx2/notebookbar/SfxNotebookBar.hxx
+++ b/include/sfx2/notebookbar/SfxNotebookBar.hxx
@@ -13,6 +13,7 @@
#include <sfx2/dllapi.h>
#include <rtl/ustring.hxx>
#include <map>
+#include <string_view>
namespace com::sun::star::frame
{
@@ -45,11 +46,11 @@ public:
static void ExecMethod(SfxBindings& rBindings, const OUString& rUIName);
/// Function to be called from the sdi's StateMethod.
- static bool StateMethod(SfxBindings& rBindings, const OUString& rUIFile,
+ static bool StateMethod(SfxBindings& rBindings, std::u16string_view rUIFile,
bool bReloadNotebookbar = false);
static bool StateMethod(SystemWindow* pSysWindow,
const css::uno::Reference<css::frame::XFrame>& xFrame,
- const OUString& rUIFile, bool bReloadNotebookbar = false);
+ std::u16string_view rUIFile, bool bReloadNotebookbar = false);
/// Method temporarily blocks showing of the NotebookBar
static void LockNotebookBar();
@@ -63,7 +64,7 @@ public:
/** Show menu bar only in current frame */
static void ShowMenubar(SfxViewFrame const* pViewFrame, bool bShow);
static void ToggleMenubar();
- static void ReloadNotebookBar(const OUString& sUIPath);
+ static void ReloadNotebookBar(std::u16string_view sUIPath);
private:
static bool m_bLock;
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 42070bd4c090..a14ce7d39e11 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -38,6 +38,8 @@
#include <comphelper/embeddedobjectcontainer.hxx>
#include <memory>
#include <set>
+#include <string_view>
+
#include <o3tl/typed_flags_set.hxx>
#include <functional>
#include <sfx2/AccessibilityIssue.hxx>
@@ -467,7 +469,7 @@ public:
void AvoidRecentDocs(bool bAvoid) { mbAvoidRecentDocs = bAvoid; }
/// On first error ask user if import should continue; return saved answer.
- bool IsContinueImportOnFilterExceptions(const OUString& aErrMessage);
+ bool IsContinueImportOnFilterExceptions(std::u16string_view aErrMessage);
// Transfer IFace
bool IsAbortingImport() const;
diff --git a/include/svl/lockfilecommon.hxx b/include/svl/lockfilecommon.hxx
index 77349c48a4a4..f94e41b6cb20 100644
--- a/include/svl/lockfilecommon.hxx
+++ b/include/svl/lockfilecommon.hxx
@@ -27,6 +27,8 @@
#include <osl/mutex.hxx>
#include <tools/urlobj.hxx>
#include <o3tl/enumarray.hxx>
+
+#include <string_view>
#include <vector>
enum class LockFileComponent
@@ -48,7 +50,7 @@ protected:
::osl::Mutex m_aMutex;
/// This method generates the URL of the lock file based on the document URL and the specified prefix.
- static OUString GenerateOwnLockFileURL(const OUString& aOrigURL, const OUString& aPrefix);
+ static OUString GenerateOwnLockFileURL(const OUString& aOrigURL, std::u16string_view aPrefix);
public:
LockFileCommon(const OUString& aLockFileURL);
diff --git a/include/svtools/HtmlWriter.hxx b/include/svtools/HtmlWriter.hxx
index d6e0294cafce..e9939f712941 100644
--- a/include/svtools/HtmlWriter.hxx
+++ b/include/svtools/HtmlWriter.hxx
@@ -32,7 +32,7 @@ private:
OString maNamespace;
public:
- HtmlWriter(SvStream& rStream, const OString& rNamespace = OString());
+ HtmlWriter(SvStream& rStream, std::string_view rNamespace = std::string_view());
~HtmlWriter();
void prettyPrint(bool b);
diff --git a/include/svtools/parhtml.hxx b/include/svtools/parhtml.hxx
index 7915dc91a5db..02cdc2042645 100644
--- a/include/svtools/parhtml.hxx
+++ b/include/svtools/parhtml.hxx
@@ -23,6 +23,7 @@
#include <svtools/svparser.hxx>
#include <svtools/htmltokn.h>
+#include <string_view>
#include <vector>
namespace com :: sun :: star :: uno { template <class interface_type> class Reference; }
@@ -184,7 +185,7 @@ protected:
void FinishHeader() { bIsInHeader = false; }
- void SetNamespace(const OUString& rNamespace);
+ void SetNamespace(std::u16string_view rNamespace);
public:
HTMLParser( SvStream& rIn, bool bReadNewDoc = true );
diff --git a/include/svx/SmartTagMgr.hxx b/include/svx/SmartTagMgr.hxx
index b20f68a60002..510f5d53ae9e 100644
--- a/include/svx/SmartTagMgr.hxx
+++ b/include/svx/SmartTagMgr.hxx
@@ -30,6 +30,7 @@
#include <vector>
#include <map>
#include <set>
+#include <string_view>
namespace com::sun::star::uno {
class XComponentContext;
@@ -103,7 +104,7 @@ private:
/** Prepare configuration access.
*/
- void PrepareConfiguration( const OUString& rConfigurationGroupName );
+ void PrepareConfiguration( std::u16string_view rConfigurationGroupName );
/** Reads the configuration data.
*/
@@ -125,7 +126,7 @@ public:
/** Triggers configuration reading, library loading and listener registration
NOTE: MUST BE CALLED AFTER CONSTRUCTION!
*/
- void Init( const OUString& rConfigurationGroupName );
+ void Init( std::u16string_view rConfigurationGroupName );
/** Dispatches the recognize call to all installed smart tag recognizers
diff --git a/include/svx/xmlgrhlp.hxx b/include/svx/xmlgrhlp.hxx
index e72bae191b54..966339451c2f 100644
--- a/include/svx/xmlgrhlp.hxx
+++ b/include/svx/xmlgrhlp.hxx
@@ -24,6 +24,8 @@
#include <osl/mutex.hxx>
#include <vcl/graph.hxx>
#include <rtl/ref.hxx>
+
+#include <string_view>
#include <vector>
#include <unordered_map>
#include <utility>
@@ -82,7 +84,8 @@ private:
virtual void SAL_CALL disposing() override;
SVX_DLLPRIVATE OUString implSaveGraphic(css::uno::Reference<css::graphic::XGraphic> const & rxGraphic,
- OUString & rOutMimeType, OUString const & rRequestName);
+ OUString & rOutMimeType,
+ std::u16string_view rRequestName);
public:
SvXMLGraphicHelper( SvXMLGraphicHelperMode eCreateMode );
diff --git a/include/test/helper/form.hxx b/include/test/helper/form.hxx
index 0fbcd2c7b06a..d3b80544d7b5 100644
--- a/include/test/helper/form.hxx
+++ b/include/test/helper/form.hxx
@@ -10,12 +10,15 @@
#ifndef INCLUDED_TEST_HELPER_FORM_HXX
#define INCLUDED_TEST_HELPER_FORM_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include <com/sun/star/drawing/XControlShape.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/uno/Reference.hxx>
-#include <sal/config.h>
#include <sal/types.h>
#include <test/testdllapi.hxx>
@@ -49,7 +52,7 @@ css::uno::Reference<css::drawing::XControlShape> OOO_DLLPUBLIC_TEST createComman
* @return The created XControlShape.
*/
css::uno::Reference<css::drawing::XControlShape> OOO_DLLPUBLIC_TEST createControlShape(
- const css::uno::Reference<css::lang::XComponent>& r_xComponent, const OUString& r_aKind,
+ const css::uno::Reference<css::lang::XComponent>& r_xComponent, std::u16string_view r_aKind,
const sal_Int32 nX, const sal_Int32 nY, const sal_Int32 nHeight, const sal_Int32 nWidth);
} // namespace form
diff --git a/include/test/helper/shape.hxx b/include/test/helper/shape.hxx
index 341a9fad93fc..dbf3745219e9 100644
--- a/include/test/helper/shape.hxx
+++ b/include/test/helper/shape.hxx
@@ -11,6 +11,9 @@
#define INCLUDED_TEST_HELPER_SHAPE_HXX
#include <sal/config.h>
+
+#include <string_view>
+
#include <sal/types.h>
#include <test/testdllapi.hxx>
@@ -76,10 +79,9 @@ createRectangle(const css::uno::Reference<css::lang::XComponent>& r_xComponent,
* @param nWidth The width of the shape.
* @return The created XShape.
*/
-css::uno::Reference<css::drawing::XShape>
- OOO_DLLPUBLIC_TEST createShape(const css::uno::Reference<css::lang::XComponent>& r_xComponent,
- const OUString& r_aKind, const sal_Int32 nX, const sal_Int32 nY,
- const sal_Int32 nWidth, const sal_Int32 nHeight);
+css::uno::Reference<css::drawing::XShape> OOO_DLLPUBLIC_TEST createShape(
+ const css::uno::Reference<css::lang::XComponent>& r_xComponent, std::u16string_view r_aKind,
+ const sal_Int32 nX, const sal_Int32 nY, const sal_Int32 nWidth, const sal_Int32 nHeight);
} // namespace shape
} // namespace helper
diff --git a/include/test/screenshot_test.hxx b/include/test/screenshot_test.hxx
index 2c0bbe25eb23..ae0a2a8c14e6 100644
--- a/include/test/screenshot_test.hxx
+++ b/include/test/screenshot_test.hxx
@@ -85,7 +85,7 @@ public:
/// - lines starting with '#' are treated as comment
/// - all other lines should contain a *.ui filename in the same
/// notation as in the dialog constructors(see code)
- void processDialogBatchFile(const OUString& rFile);
+ void processDialogBatchFile(std::u16string_view rFile);
/// const access to known dialogs
const mapType& getKnownDialogs() const { return maKnownDialogs; }
diff --git a/include/test/unoapi_test.hxx b/include/test/unoapi_test.hxx
index b4a09b4a28cd..82f04cf465eb 100644
--- a/include/test/unoapi_test.hxx
+++ b/include/test/unoapi_test.hxx
@@ -11,6 +11,9 @@
#define INCLUDED_TEST_UNOAPI_TEST_HXX
#include <sal/config.h>
+
+#include <string_view>
+
#include <test/bootstrapfixture.hxx>
#include <unotest/macros_test.hxx>
#include <com/sun/star/lang/XComponent.hpp>
@@ -23,7 +26,7 @@ class OOO_DLLPUBLIC_TEST UnoApiTest : public test::BootstrapFixture, public unot
public:
UnoApiTest(const OUString& path);
- void createFileURL(const OUString& aFileBase, OUString& rFilePath);
+ void createFileURL(std::u16string_view aFileBase, OUString& rFilePath);
virtual void setUp() override;
diff --git a/include/test/xmltesttools.hxx b/include/test/xmltesttools.hxx
index cd5f30c064fe..f6bd17f0ae30 100644
--- a/include/test/xmltesttools.hxx
+++ b/include/test/xmltesttools.hxx
@@ -27,6 +27,7 @@
#include <cppunit/TestAssert.h>
+#include <string_view>
#include <vector>
class OOO_DLLPUBLIC_TEST XmlTestTools
@@ -59,7 +60,7 @@ protected:
* Get the position of the child named rName of the parent node specified by rXPath.
* Useful for checking relative order of elements.
*/
- int getXPathPosition(const xmlDocUniquePtr& pXmlDoc, const OString& rXPath, const OString& rChildName);
+ int getXPathPosition(const xmlDocUniquePtr& pXmlDoc, const OString& rXPath, std::string_view rChildName);
/**
* Assert that rXPath exists, and returns exactly one node.
*/
diff --git a/include/unotest/directories.hxx b/include/unotest/directories.hxx
index 4fcf7fe3cbba..efdcd93a6acf 100644
--- a/include/unotest/directories.hxx
+++ b/include/unotest/directories.hxx
@@ -12,6 +12,8 @@
#include <sal/config.h>
+#include <string_view>
+
#include <rtl/ustring.hxx>
#include <unotest/detail/unotestdllapi.hxx>
@@ -32,16 +34,16 @@ public:
const OUString& getSrcRootPath() const { return m_aSrcRootPath; }
// return a URL to a given path from the source directory
- OUString getURLFromSrc(const OUString& rPath) const;
+ OUString getURLFromSrc(std::u16string_view rPath) const;
// return a Path to a given path from the source directory
- OUString getPathFromSrc(const OUString& rPath) const;
+ OUString getPathFromSrc(std::u16string_view rPath) const;
// return a URL to a given path from the workdir directory
- OUString getURLFromWorkdir(const OUString& rPath) const;
+ OUString getURLFromWorkdir(std::u16string_view rPath) const;
// return a Path to a given path from the workdir directory
- OUString getPathFromWorkdir(const OUString& rPath) const;
+ OUString getPathFromWorkdir(std::u16string_view rPath) const;
};
}
diff --git a/include/unotest/filters-test.hxx b/include/unotest/filters-test.hxx
index 5af991e04d47..01570b78637a 100644
--- a/include/unotest/filters-test.hxx
+++ b/include/unotest/filters-test.hxx
@@ -10,6 +10,10 @@
#ifndef INCLUDED_UNOTEST_FILTERS_TEST_HXX
#define INCLUDED_UNOTEST_FILTERS_TEST_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include <comphelper/documentconstants.hxx>
#include <rtl/ustring.hxx>
#include <unotest/detail/unotestdllapi.hxx>
@@ -39,7 +43,7 @@ public:
//filter name
const OUString &rFilter,
//root dir of test files, must contain pass, fail, indeterminate
- const OUString &rURL,
+ std::u16string_view rURL,
//additional filter data for SfxFilter
const OUString &rUserData = OUString(),
//SfxFilterFlags for SfxFilter
diff --git a/include/unotest/gettestargument.hxx b/include/unotest/gettestargument.hxx
index 734b77e57b8a..3b6291725316 100644
--- a/include/unotest/gettestargument.hxx
+++ b/include/unotest/gettestargument.hxx
@@ -20,6 +20,10 @@
#ifndef INCLUDED_UNOTEST_GETTESTARGUMENT_HXX
#define INCLUDED_UNOTEST_GETTESTARGUMENT_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include <rtl/ustring.hxx>
#include <unotest/detail/unotestdllapi.hxx>
@@ -29,7 +33,7 @@ namespace test {
// Obtain the value of a test argument (tunneled in via an "arg-testarg.<name>"
// bootstrap variable):
OOO_DLLPUBLIC_UNOTEST bool getTestArgument(
- OUString const & name, OUString * value);
+ std::u16string_view name, OUString * value);
}
diff --git a/include/unotools/optionsdlg.hxx b/include/unotools/optionsdlg.hxx
index f20d2aa59d65..20e7789ea81d 100644
--- a/include/unotools/optionsdlg.hxx
+++ b/include/unotools/optionsdlg.hxx
@@ -19,6 +19,10 @@
#ifndef INCLUDED_UNOTOOLS_OPTIONSDLG_HXX
#define INCLUDED_UNOTOOLS_OPTIONSDLG_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include <unotools/unotoolsdllapi.h>
#include <rtl/ustring.hxx>
#include <unotools/options.hxx>
@@ -34,12 +38,12 @@ public:
SvtOptionsDialogOptions();
virtual ~SvtOptionsDialogOptions() override;
- bool IsGroupHidden ( const OUString& _rGroup ) const;
- bool IsPageHidden ( const OUString& _rPage,
- const OUString& _rGroup ) const;
- bool IsOptionHidden ( const OUString& _rOption,
- const OUString& _rPage,
- const OUString& _rGroup ) const;
+ bool IsGroupHidden ( std::u16string_view _rGroup ) const;
+ bool IsPageHidden ( std::u16string_view _rPage,
+ std::u16string_view _rGroup ) const;
+ bool IsOptionHidden ( std::u16string_view _rOption,
+ std::u16string_view _rPage,
+ std::u16string_view _rGroup ) const;
};
#endif
diff --git a/include/vbahelper/vbahelper.hxx b/include/vbahelper/vbahelper.hxx
index 60d8f0b85de4..fd4549cf99a8 100644
--- a/include/vbahelper/vbahelper.hxx
+++ b/include/vbahelper/vbahelper.hxx
@@ -20,6 +20,7 @@
#define INCLUDED_VBAHELPER_VBAHELPER_HXX
#include <memory>
+#include <string_view>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <com/sun/star/uno/Any.hxx>
@@ -248,8 +249,8 @@ class VBAHELPER_DLLPUBLIC ContainerUtilities
{
public:
- static OUString getUniqueName( const css::uno::Sequence< OUString >& _slist, const OUString& _sElementName, const OUString& _sSuffixSeparator);
- static OUString getUniqueName( const css::uno::Sequence< OUString >& _slist, const OUString& _sElementName, const OUString& _sSuffixSeparator, sal_Int32 _nStartSuffix );
+ static OUString getUniqueName( const css::uno::Sequence< OUString >& _slist, const OUString& _sElementName, std::u16string_view _sSuffixSeparator);
+ static OUString getUniqueName( const css::uno::Sequence< OUString >& _slist, const OUString& _sElementName, std::u16string_view _sSuffixSeparator, sal_Int32 _nStartSuffix );
static sal_Int32 FieldInList( const css::uno::Sequence< OUString >& SearchList, const OUString& SearchString );
};
diff --git a/include/vbahelper/vbashapes.hxx b/include/vbahelper/vbashapes.hxx
index cc8cdcdf16fb..16d40566a686 100644
--- a/include/vbahelper/vbashapes.hxx
+++ b/include/vbahelper/vbashapes.hxx
@@ -20,6 +20,7 @@
#define INCLUDED_VBAHELPER_VBASHAPES_HXX
#include <exception>
+#include <string_view>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <com/sun/star/uno/Any.hxx>
@@ -71,7 +72,7 @@ private:
css::uno::Any AddEllipse( sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth, sal_Int32 nLineHeight );
/// @throws css::uno::RuntimeException
css::uno::Any AddTextboxInWriter( sal_Int32 _nLeft, sal_Int32 _nTop, sal_Int32 _nWidth, sal_Int32 _nHeight );
- OUString createName( const OUString& sName );
+ OUString createName( std::u16string_view sName );
//TODO helperapi using a writer document
//css::awt::Point calculateTopLeftMargin( css::uno::Reference< ov::XHelperInterface > xDocument );
diff --git a/include/vcl/FilterConfigItem.hxx b/include/vcl/FilterConfigItem.hxx
index ae9e0f33c8c1..f1593b4db2c3 100644
--- a/include/vcl/FilterConfigItem.hxx
+++ b/include/vcl/FilterConfigItem.hxx
@@ -21,6 +21,10 @@
#ifndef INCLUDED_VCL_FILTERCONFIGITEM_HXX
#define INCLUDED_VCL_FILTERCONFIGITEM_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include <vcl/dllapi.h>
#include <rtl/ustring.hxx>
@@ -45,7 +49,7 @@ class VCL_DLLPUBLIC FilterConfigItem
const css::uno::Reference< css::beans::XPropertySet >& rXPropSet,
const OUString& rPropName );
- void ImpInitTree( const OUString& rTree );
+ void ImpInitTree( std::u16string_view rTree );
static css::beans::PropertyValue* GetPropertyValue(
@@ -57,9 +61,9 @@ class VCL_DLLPUBLIC FilterConfigItem
public:
- FilterConfigItem( const OUString& rSubTree );
+ FilterConfigItem( std::u16string_view rSubTree );
FilterConfigItem( css::uno::Sequence< css::beans::PropertyValue > const * pFilterData );
- FilterConfigItem( const OUString& rSubTree, css::uno::Sequence< css::beans::PropertyValue > const * pFilterData );
+ FilterConfigItem( std::u16string_view rSubTree, css::uno::Sequence< css::beans::PropertyValue > const * pFilterData );
/// Writes config in destructor
~FilterConfigItem();
/// Writes config and sets unmodified state again.
diff --git a/include/vcl/embeddedfontshelper.hxx b/include/vcl/embeddedfontshelper.hxx
index a54785ea59eb..4802c13a2d8d 100644
--- a/include/vcl/embeddedfontshelper.hxx
+++ b/include/vcl/embeddedfontshelper.hxx
@@ -15,6 +15,8 @@
#include <rtl/ustring.hxx>
#include <tools/fontenum.hxx>
#include <tools/long.hxx>
+
+#include <string_view>
#include <vector>
namespace com::sun::star::io { class XInputStream; }
@@ -49,7 +51,8 @@ public:
/**
Returns URL for a font file for the given font, or empty if it does not exist.
*/
- static OUString fontFileUrl( const OUString& familyName, FontFamily family, FontItalic italic,
+ static OUString fontFileUrl(
+ std::u16string_view familyName, FontFamily family, FontItalic italic,
FontWeight weight, FontPitch pitch, FontRights rights );
/**
diff --git a/include/vcl/formatter.hxx b/include/vcl/formatter.hxx
index 946e7e77b727..1657d5be01ba 100644
--- a/include/vcl/formatter.hxx
+++ b/include/vcl/formatter.hxx
@@ -25,6 +25,7 @@
#include <vcl/settings.hxx>
#include <map>
#include <memory>
+#include <string_view>
class SvNumberFormatter;
@@ -64,7 +65,7 @@ namespace validation
public:
NumberValidator( const sal_Unicode _cThSep, const sal_Unicode _cDecSep );
- bool isValidNumericFragment( const OUString& _rText );
+ bool isValidNumericFragment( std::u16string_view _rText );
private:
bool implValidateNormalized( const OUString& _rText );
diff --git a/include/vcl/opengl/OpenGLHelper.hxx b/include/vcl/opengl/OpenGLHelper.hxx
index a0e2d8436564..e85bb351fb2f 100644
--- a/include/vcl/opengl/OpenGLHelper.hxx
+++ b/include/vcl/opengl/OpenGLHelper.hxx
@@ -17,6 +17,7 @@
#include <rtl/ustring.hxx>
#include <sstream>
+#include <string_view>
/// Helper to do a SAL_INFO as well as a GL log.
#define VCL_GL_INFO(stream) \
@@ -47,10 +48,10 @@ struct VCL_DLLPUBLIC OpenGLHelper
public:
- static OString GetDigest(const OUString& rVertexShaderName, const OUString& rFragmentShaderName, const OString& preamble );
+ static OString GetDigest(const OUString& rVertexShaderName, const OUString& rFragmentShaderName, std::string_view preamble );
- static GLint LoadShaders(const OUString& rVertexShaderName, const OUString& rFragmentShaderName, const OUString& rGeometryShaderName, const OString& preamble, const OString& rDigest );
- static GLint LoadShaders(const OUString& rVertexShaderName, const OUString& rFragmentShaderName, const OString& preamble, const OString& rDigest );
+ static GLint LoadShaders(const OUString& rVertexShaderName, const OUString& rFragmentShaderName, const OUString& rGeometryShaderName, std::string_view preamble, std::string_view rDigest );
+ static GLint LoadShaders(const OUString& rVertexShaderName, const OUString& rFragmentShaderName, std::string_view preamble, std::string_view rDigest );
static GLint LoadShaders(const OUString& rVertexShaderName, const OUString& rFragmentShaderName, const OUString& rGeometryShaderName);
static GLint LoadShaders(const OUString& rVertexShaderName, const OUString& rFragmentShaderName);
diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx
index 494de3cbcd26..2d5013e2fe4f 100644
--- a/include/xmloff/xmlimp.hxx
+++ b/include/xmloff/xmlimp.hxx
@@ -24,6 +24,7 @@
#include <set>
#include <stack>
+#include <string_view>
#include <o3tl/deleter.hxx>
#include <xmloff/dllapi.h>
@@ -416,7 +417,7 @@ public:
bool IsPackageURL( const OUString& rURL ) const;
OUString ResolveEmbeddedObjectURL( const OUString& rURL,
- const OUString& rClassId );
+ std::u16string_view rClassId );
css::uno::Reference< css::io::XOutputStream >
GetStreamForEmbeddedObjectURLFromBase64() const;
OUString ResolveEmbeddedObjectURLFromBase64();
diff --git a/io/source/acceptor/acceptor.cxx b/io/source/acceptor/acceptor.cxx
index fe761018de52..1be39b4cb7d3 100644
--- a/io/source/acceptor/acceptor.cxx
+++ b/io/source/acceptor/acceptor.cxx
@@ -33,6 +33,7 @@
#include "acceptor.hxx"
#include <memory>
+#include <string_view>
#define IMPLEMENTATION_NAME "com.sun.star.comp.io.Acceptor"
#define SERVICE_NAME "com.sun.star.connection.Acceptor"
@@ -89,11 +90,11 @@ namespace {
struct BeingInAccept
{
/// @throws AlreadyAcceptingException
- BeingInAccept( bool *pFlag,const OUString & sConnectionDescription )
+ BeingInAccept( bool *pFlag,std::u16string_view sConnectionDescription )
: m_pFlag( pFlag )
{
if( *m_pFlag )
- throw AlreadyAcceptingException( "AlreadyAcceptingException :" + sConnectionDescription );
+ throw AlreadyAcceptingException( OUString::Concat("AlreadyAcceptingException :") + sConnectionDescription );
*m_pFlag = true;
}
~BeingInAccept()
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index ee8bcbc155db..ee0a1ec81fa7 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -98,7 +98,7 @@ struct PluginMutex: public ::rtl::Static<osl::Mutex, PluginMutex> {};
#if defined(UNX) && !defined(ANDROID)
OString getPluginJarPath(
std::u16string_view sVendor,
- const OUString& sLocation,
+ std::u16string_view sLocation,
std::u16string_view sVersion)
{
OString ret;
@@ -124,7 +124,7 @@ OString getPluginJarPath(
}
if (!sName.isEmpty())
{
- sName = sLocation + "/lib/" + sName;
+ sName = OUString::Concat(sLocation) + "/lib/" + sName;
OSL_VERIFY(
osl_getSystemPathFromFileURL(sName.pData, & sPath.pData)
== osl_File_E_None);
@@ -132,13 +132,13 @@ OString getPluginJarPath(
}
else
{
- OUString sName(sLocation + "/lib/" + sName1);
+ OUString sName(OUString::Concat(sLocation) + "/lib/" + sName1);
OUString sPath1;
OUString sPath2;
if (osl_getSystemPathFromFileURL(sName.pData, & sPath1.pData)
== osl_File_E_None)
{
- sName = sLocation + "/lib/" + sName2;
+ sName = OUString::Concat(sLocation) + "/lib/" + sName2;
if (osl_getSystemPathFromFileURL(sName.pData, & sPath2.pData)
== osl_File_E_None)
{
diff --git a/l10ntools/inc/common.hxx b/l10ntools/inc/common.hxx
index 993d5152967e..78bbbfdb83cc 100644
--- a/l10ntools/inc/common.hxx
+++ b/l10ntools/inc/common.hxx
@@ -15,6 +15,8 @@
#include <sal/config.h>
#include <iostream>
+#include <string_view>
+
#include <rtl/string.hxx>
#include "po.hxx"
@@ -48,7 +50,7 @@ void writeUsage(const OString& rName, const OString& rFileType);
/// Write out a PoEntry with attention to exceptions
void writePoEntry(
const OString& rExecutable, PoOfstream& rPoStream, const OString& rSourceFile,
- const OString& rResType, const OString& rGroupId, const OString& rLocalId,
+ std::string_view rResType, const OString& rGroupId, const OString& rLocalId,
const OString& rHelpText, const OString& rText, const PoEntry::TYPE eType = PoEntry::TTEXT );
}
diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx
index 1ca56e4fe75d..183cecea2531 100644
--- a/l10ntools/inc/export.hxx
+++ b/l10ntools/inc/export.hxx
@@ -36,6 +36,7 @@
#include <vector>
#include <queue>
#include <string>
+#include <string_view>
#ifdef _WIN32
#include <direct.h>
@@ -112,7 +113,7 @@ public:
Generate QTZ string with ResData
For executable which works one language and without PO files.
*/
- static OString GetQTZText(const ResData& rResData, const OString& rOrigText);
+ static OString GetQTZText(const ResData& rResData, std::string_view rOrigText);
};
@@ -126,8 +127,8 @@ class MergeDataFile
std::set<OString> aLanguageSet;
MergeEntrys *GetMergeData( ResData *pResData , bool bCaseSensitive = false );
- void InsertEntry(const OString &rTYP, const OString &rGID,
- const OString &rLID, const OString &nLang,
+ void InsertEntry(std::string_view rTYP, std::string_view rGID,
+ std::string_view rLID, const OString &nLang,
const OString &rTEXT, const OString &rQHTEXT,
const OString &rTITLE, const OString &sFilename,
bool bFirstLang, bool bCaseSensitive);
@@ -143,8 +144,8 @@ class MergeDataFile
MergeEntrys *GetMergeEntrys( ResData *pResData );
MergeEntrys *GetMergeEntrysCaseSensitive( ResData *pResData );
- static OString CreateKey(const OString& rTYP, const OString& rGID,
- const OString& rLID, const OString& rFilename, bool bCaseSensitive);
+ static OString CreateKey(std::string_view rTYP, std::string_view rGID,
+ std::string_view rLID, const OString& rFilename, bool bCaseSensitive);
};
diff --git a/l10ntools/inc/helper.hxx b/l10ntools/inc/helper.hxx
index 621218a0c1b7..c63f781a5d91 100644
--- a/l10ntools/inc/helper.hxx
+++ b/l10ntools/inc/helper.hxx
@@ -13,6 +13,9 @@
#define INCLUDED_L10NTOOLS_INC_HELPER_HXX
#include <sal/config.h>
+
+#include <string_view>
+
#include <sal/types.h>
#include <libxml/parser.h>
@@ -36,7 +39,7 @@ OString QuotHTML( const OString &rString );
OString UnQuotHTML( const OString& rString );
/// Check whether text is a valid XML expression
-bool isWellFormedXML( OString const & text );
+bool isWellFormedXML( std::string_view text );
/// Convert xmlChar* to OString
OString xmlStrToOString( const xmlChar* pString );
diff --git a/l10ntools/inc/helpmerge.hxx b/l10ntools/inc/helpmerge.hxx
index 99c9270df9fe..3f9426b6b4de 100644
--- a/l10ntools/inc/helpmerge.hxx
+++ b/l10ntools/inc/helpmerge.hxx
@@ -20,6 +20,10 @@
#ifndef INCLUDED_L10NTOOLS_INC_HELPMERGE_HXX
#define INCLUDED_L10NTOOLS_INC_HELPMERGE_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include "xmlparse.hxx"
#include <rtl/ustring.hxx>
#include <rtl/ustrbuf.hxx>
@@ -45,7 +49,7 @@ public:
/// Method append a PO file with the content of a parsed XML file
/// @PRECOND rHelpFile is valid
static bool CreatePO( const OString &rPOFile_in, const OString &sHelpFile,
- XMLFile *pXmlFile, const OString &rGsi1 );
+ XMLFile *pXmlFile, std::string_view rGsi1 );
/// Method merges the String into XMLfile, which must point to an existing file.
bool Merge( const OString &rDestinationFile_in ,
diff --git a/l10ntools/inc/po.hxx b/l10ntools/inc/po.hxx
index 778d70fe6cc9..db513cab1f8e 100644
--- a/l10ntools/inc/po.hxx
+++ b/l10ntools/inc/po.hxx
@@ -12,6 +12,8 @@
#include <fstream>
#include <memory>
+#include <string_view>
+
#include <rtl/string.hxx>
class PoOfstream;
@@ -44,8 +46,8 @@ public:
enum Exception { NOSOURCFILE, NORESTYPE, NOGROUPID, NOSTRING, WRONGHELPTEXT };
PoEntry();
- PoEntry( const OString& rSourceFile, const OString& rResType, const OString& rGroupId,
- const OString& rLocalId, const OString& rHelpText, const OString& rText,
+ PoEntry( const OString& rSourceFile, std::string_view rResType, std::string_view rGroupId,
+ std::string_view rLocalId, const OString& rHelpText, const OString& rText,
const TYPE eType );
~PoEntry();
@@ -87,8 +89,8 @@ public:
friend class PoOfstream;
friend class PoIfstream;
- PoHeader( const OString& rExtSrc ); ///< Template Constructor
- PoHeader( const OString& rExtSrc, const OString& rPoHeaderMsgStr );
+ PoHeader( std::string_view rExtSrc ); ///< Template Constructor
+ PoHeader( std::string_view rExtSrc, const OString& rPoHeaderMsgStr );
~PoHeader();
PoHeader(const PoHeader&) = delete;
PoHeader& operator=(const PoHeader&) = delete;
diff --git a/l10ntools/inc/xrmmerge.hxx b/l10ntools/inc/xrmmerge.hxx
index fd54f113b68b..7468f43f6122 100644
--- a/l10ntools/inc/xrmmerge.hxx
+++ b/l10ntools/inc/xrmmerge.hxx
@@ -24,7 +24,7 @@
#include <sal/config.h>
#include <fstream>
-
+#include <string_view>
/// Parser for *.xrm and description.xml files
class XRMResParser
@@ -39,7 +39,7 @@ private:
OString sCurrentCloseTag;
OString sCurrentText;
protected:
- static OString GetAttribute( const OString &rToken, const OString &rAttribute );
+ static OString GetAttribute( const OString &rToken, std::string_view rAttribute );
static void Error( const OString &rError );
virtual void Output( const OString& rOutput )=0;
diff --git a/l10ntools/source/common.cxx b/l10ntools/source/common.cxx
index 84adb767c7ba..e2d14ac36431 100644
--- a/l10ntools/source/common.cxx
+++ b/l10ntools/source/common.cxx
@@ -107,7 +107,7 @@ void writeUsage(const OString& rName, const OString& rFileType)
void writePoEntry(
const OString& rExecutable, PoOfstream& rPoStream, const OString& rSourceFile,
- const OString& rResType, const OString& rGroupId, const OString& rLocalId,
+ std::string_view rResType, const OString& rGroupId, const OString& rLocalId,
const OString& rHelpText, const OString& rText, const PoEntry::TYPE eType )
{
try
diff --git a/l10ntools/source/helper.cxx b/l10ntools/source/helper.cxx
index 053375085911..80b079e27151 100644
--- a/l10ntools/source/helper.cxx
+++ b/l10ntools/source/helper.cxx
@@ -122,12 +122,12 @@ OString UnQuotHTML( const OString& rString )
return sReturn.makeStringAndClear();
}
-bool isWellFormedXML( OString const & text )
+bool isWellFormedXML( std::string_view text )
{
xmlDocPtr doc;
bool result = true;
- OString content = "<root>" + text + "</root>";
+ OString content = OString::Concat("<root>") + text + "</root>";
doc = xmlParseMemory(content.getStr(),static_cast<int>(content.getLength()));
if (doc == nullptr) {
result = false;
diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx
index c4643ea4fac4..e1beff7a5da4 100644
--- a/l10ntools/source/helpmerge.cxx
+++ b/l10ntools/source/helpmerge.cxx
@@ -81,7 +81,7 @@ HelpParser::HelpParser( const OString &rHelpFile )
bool HelpParser::CreatePO(
/*****************************************************************************/
const OString &rPOFile_in, const OString &sHelpFile,
- XMLFile* pXmlFile, const OString &rGsi1){
+ XMLFile* pXmlFile, std::string_view rGsi1){
SimpleXMLParser aParser;
//TODO: explicit BOM handling?
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index 22beb6f1b962..02bfd9a74bbc 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -98,7 +98,7 @@ namespace
}
}
-OString MergeEntrys::GetQTZText(const ResData& rResData, const OString& rOrigText)
+OString MergeEntrys::GetQTZText(const ResData& rResData, std::string_view rOrigText)
{
const OString sFilename = rResData.sFilename.copy(rResData.sFilename.lastIndexOf('/')+1);
const OString sKey =
@@ -276,8 +276,8 @@ MergeEntrys *MergeDataFile::GetMergeEntrysCaseSensitive( ResData *pResData )
}
void MergeDataFile::InsertEntry(
- const OString &rTYP, const OString &rGID,
- const OString &rLID, const OString &nLANG,
+ std::string_view rTYP, std::string_view rGID,
+ std::string_view rLID, const OString &nLANG,
const OString &rTEXT, const OString &rQHTEXT,
const OString &rTITLE, const OString &rInFilename,
bool bFirstLang, bool bCaseSensitive )
@@ -318,11 +318,11 @@ void MergeDataFile::InsertEntry(
}
}
-OString MergeDataFile::CreateKey(const OString& rTYP, const OString& rGID,
- const OString& rLID, const OString& rFilename, bool bCaseSensitive)
+OString MergeDataFile::CreateKey(std::string_view rTYP, std::string_view rGID,
+ std::string_view rLID, const OString& rFilename, bool bCaseSensitive)
{
static const char sStroke[] = "-";
- OString sKey = rTYP + sStroke + rGID + sStroke + rLID + sStroke +
+ OString sKey = OString::Concat(rTYP) + sStroke + rGID + sStroke + rLID + sStroke +
lcl_NormalizeFilename(rFilename);
if(bCaseSensitive)
return sKey; // officecfg case sensitive identifier
diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx
index 3d001f28e3f4..5269b5e0f7f3 100644
--- a/l10ntools/source/po.cxx
+++ b/l10ntools/source/po.cxx
@@ -245,16 +245,16 @@ PoEntry::PoEntry()
}
PoEntry::PoEntry(
- const OString& rSourceFile, const OString& rResType, const OString& rGroupId,
- const OString& rLocalId, const OString& rHelpText,
+ const OString& rSourceFile, std::string_view rResType, std::string_view rGroupId,
+ std::string_view rLocalId, const OString& rHelpText,
const OString& rText, const TYPE eType )
: m_bIsInitialized( false )
{
if( rSourceFile.isEmpty() )
throw NOSOURCFILE;
- else if ( rResType.isEmpty() )
+ else if ( rResType.empty() )
throw NORESTYPE;
- else if ( rGroupId.isEmpty() )
+ else if ( rGroupId.empty() )
throw NOGROUPID;
else if ( rText.isEmpty() )
throw NOSTRING;
@@ -268,7 +268,7 @@ PoEntry::PoEntry(
OString sMsgCtxt =
sReference + "\n" +
rGroupId + "\n" +
- (rLocalId.isEmpty() ? OString() : rLocalId + "\n") +
+ (rLocalId.empty() ? OString() : OString::Concat(rLocalId) + "\n") +
rResType;
switch(eType){
case TTEXT:
@@ -444,20 +444,20 @@ namespace
}
// when updating existing files (pocheck), reuse provided po-header
-PoHeader::PoHeader( const OString& rExtSrc, const OString& rPoHeaderMsgStr )
+PoHeader::PoHeader( std::string_view rExtSrc, const OString& rPoHeaderMsgStr )
: m_pGenPo( new GenPoEntry() )
, m_bIsInitialized( false )
{
- m_pGenPo->setExtractCom("extracted from " + rExtSrc);
+ m_pGenPo->setExtractCom(OString::Concat("extracted from ") + rExtSrc);
m_pGenPo->setMsgStr(rPoHeaderMsgStr);
m_bIsInitialized = true;
}
-PoHeader::PoHeader( const OString& rExtSrc )
+PoHeader::PoHeader( std::string_view rExtSrc )
: m_pGenPo( new GenPoEntry() )
, m_bIsInitialized( false )
{
- m_pGenPo->setExtractCom("extracted from " + rExtSrc);
+ m_pGenPo->setExtractCom(OString::Concat("extracted from ") + rExtSrc);
m_pGenPo->setMsgStr(
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: https://bugs.libreoffice.org/enter_bug.cgi?"
diff --git a/l10ntools/source/xrmmerge.cxx b/l10ntools/source/xrmmerge.cxx
index 62734f04ddd9..6059ad19160d 100644
--- a/l10ntools/source/xrmmerge.cxx
+++ b/l10ntools/source/xrmmerge.cxx
@@ -258,9 +258,9 @@ void XRMResParser::Execute( int nToken, char * pToken )
}
}
-OString XRMResParser::GetAttribute( const OString &rToken, const OString &rAttribute )
+OString XRMResParser::GetAttribute( const OString &rToken, std::string_view rAttribute )
{
- const OString sSearch{ " " + rAttribute + "=" };
+ const OString sSearch{ OString::Concat(" ") + rAttribute + "=" };
OString sTmp{ rToken.replace('\t', ' ') };
sal_Int32 nPos = sTmp.indexOf( sSearch );
diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx
index afea6469ed38..f5a7e8e34b9e 100644
--- a/linguistic/source/convdiclist.cxx
+++ b/linguistic/source/convdiclist.cxx
@@ -19,6 +19,8 @@
#include <sal/config.h>
+#include <string_view>
+
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/lang/NoSupportException.hpp>
@@ -52,11 +54,11 @@ using namespace com::sun::star::container;
using namespace com::sun::star::linguistic2;
using namespace linguistic;
-static OUString GetConvDicMainURL( const OUString &rDicName, const OUString &rDirectoryURL )
+static OUString GetConvDicMainURL( std::u16string_view rDicName, const OUString &rDirectoryURL )
{
// build URL to use for new (persistent) dictionaries
- OUString aFullDicName = rDicName + CONV_DIC_DOT_EXT;
+ OUString aFullDicName = OUString::Concat(rDicName) + CONV_DIC_DOT_EXT;
INetURLObject aURLObj;
aURLObj.SetSmartProtocol( INetProtocol::File );
diff --git a/linguistic/source/misc2.cxx b/linguistic/source/misc2.cxx
index 6e48fc7aa52c..eeccadd5cb4a 100644
--- a/linguistic/source/misc2.cxx
+++ b/linguistic/source/misc2.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <tools/urlobj.hxx>
#include <ucbhelper/content.hxx>
#include <tools/debug.hxx>
@@ -73,7 +77,7 @@ bool FileExists( const OUString &rMainURL )
}
static std::vector< OUString > GetMultiPaths_Impl(
- const OUString &rPathPrefix,
+ std::u16string_view rPathPrefix,
DictionaryPathFlags nPathFlags )
{
std::vector< OUString > aRes;
@@ -85,9 +89,9 @@ static std::vector< OUString > GetMultiPaths_Impl(
uno::Reference< uno::XComponentContext > xContext( comphelper::getProcessComponentContext() );
try
{
- OUString aInternal( rPathPrefix + "_internal" );
- OUString aUser( rPathPrefix + "_user" );
- OUString aWriteable( rPathPrefix + "_writable" );
+ OUString aInternal( OUString::Concat(rPathPrefix) + "_internal" );
+ OUString aUser( OUString::Concat(rPathPrefix) + "_user" );
+ OUString aWriteable( OUString::Concat(rPathPrefix) + "_writable" );
uno::Reference< util::XPathSettings > xPathSettings =
util::thePathSettings::get( xContext );
@@ -126,7 +130,8 @@ static std::vector< OUString > GetMultiPaths_Impl(
OUString GetDictionaryWriteablePath()
{
- std::vector< OUString > aPaths( GetMultiPaths_Impl( "Dictionary", DictionaryPathFlags::NONE ) );
+ std::vector< OUString > aPaths(
+ GetMultiPaths_Impl( u"Dictionary", DictionaryPathFlags::NONE ) );
DBG_ASSERT( aPaths.size() == 1, "Dictionary_writable path corrupted?" );
OUString aRes;
if (!aPaths.empty())
@@ -136,7 +141,7 @@ OUString GetDictionaryWriteablePath()
std::vector< OUString > GetDictionaryPaths()
{
- return GetMultiPaths_Impl( "Dictionary", PATH_FLAG_ALL );
+ return GetMultiPaths_Impl( u"Dictionary", PATH_FLAG_ALL );
}
OUString GetWritableDictionaryURL( const OUString &rDicName )
diff --git a/lotuswordpro/qa/cppunit/test_lotuswordpro.cxx b/lotuswordpro/qa/cppunit/test_lotuswordpro.cxx
index e5648900841e..78a5426a5a79 100644
--- a/lotuswordpro/qa/cppunit/test_lotuswordpro.cxx
+++ b/lotuswordpro/qa/cppunit/test_lotuswordpro.cxx
@@ -59,7 +59,7 @@ namespace
void LotusWordProTest::test()
{
testDir(OUString(),
- m_directories.getURLFromSrc("/lotuswordpro/qa/cppunit/data/"));
+ m_directories.getURLFromSrc(u"/lotuswordpro/qa/cppunit/data/"));
}
CPPUNIT_TEST_SUITE_REGISTRATION(LotusWordProTest);
diff --git a/oox/qa/unit/shape.cxx b/oox/qa/unit/shape.cxx
index 24ec173ce9d5..6c88ba4ea21e 100644
--- a/oox/qa/unit/shape.cxx
+++ b/oox/qa/unit/shape.cxx
@@ -7,6 +7,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <test/bootstrapfixture.hxx>
#include <unotest/macros_test.hxx>
@@ -30,7 +34,7 @@ public:
void setUp() override;
void tearDown() override;
uno::Reference<lang::XComponent>& getComponent() { return mxComponent; }
- void load(const OUString& rURL);
+ void load(std::u16string_view rURL);
};
void OoxShapeTest::setUp()
@@ -48,7 +52,7 @@ void OoxShapeTest::tearDown()
test::BootstrapFixture::tearDown();
}
-void OoxShapeTest::load(const OUString& rFileName)
+void OoxShapeTest::load(std::u16string_view rFileName)
{
OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + rFileName;
mxComponent = loadFromDesktop(aURL);
@@ -56,7 +60,7 @@ void OoxShapeTest::load(const OUString& rFileName)
CPPUNIT_TEST_FIXTURE(OoxShapeTest, testMultipleGroupShapes)
{
- load("multiple-group-shapes.docx");
+ load(u"multiple-group-shapes.docx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
@@ -70,7 +74,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testMultipleGroupShapes)
CPPUNIT_TEST_FIXTURE(OoxShapeTest, testCustomshapePosition)
{
- load("customshape-position.docx");
+ load(u"customshape-position.docx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
diff --git a/oox/qa/unit/vba_compression.cxx b/oox/qa/unit/vba_compression.cxx
index bfe241c5995c..906e30bfc688 100644
--- a/oox/qa/unit/vba_compression.cxx
+++ b/oox/qa/unit/vba_compression.cxx
@@ -95,8 +95,8 @@ void ReadFiles(const OUString& rTestFile, const OUString& rReference,
void TestVbaCompression::testSimple1()
{
- OUString aTestFile = m_directories.getPathFromSrc("/oox/qa/unit/data/vba/simple1.bin");
- OUString aReference = m_directories.getPathFromSrc("/oox/qa/unit/data/vba/reference/simple1.bin");
+ OUString aTestFile = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/simple1.bin");
+ OUString aReference = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/reference/simple1.bin");
SvMemoryStream aOutputMemoryStream(4096, 4096);
SvMemoryStream aReferenceMemoryStream(4096, 4096);
@@ -118,8 +118,8 @@ void TestVbaCompression::testSimple1()
void TestVbaCompression::testSimple2()
{
- OUString aTestFile = m_directories.getPathFromSrc("/oox/qa/unit/data/vba/simple2.bin");
- OUString aReference = m_directories.getPathFromSrc("/oox/qa/unit/data/vba/reference/simple2.bin");
+ OUString aTestFile = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/simple2.bin");
+ OUString aReference = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/reference/simple2.bin");
SvMemoryStream aOutputMemoryStream(4096, 4096);
SvMemoryStream aReferenceMemoryStream(4096, 4096);
@@ -140,8 +140,8 @@ void TestVbaCompression::testSimple2()
void TestVbaCompression::testSimple3()
{
- OUString aTestFile = m_directories.getPathFromSrc("/oox/qa/unit/data/vba/simple3.bin");
- OUString aReference = m_directories.getPathFromSrc("/oox/qa/unit/data/vba/reference/simple3.bin");
+ OUString aTestFile = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/simple3.bin");
+ OUString aReference = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/reference/simple3.bin");
SvMemoryStream aOutputMemoryStream(4096, 4096);
SvMemoryStream aReferenceMemoryStream(4096, 4096);
@@ -162,8 +162,8 @@ void TestVbaCompression::testSimple3()
void TestVbaCompression::testComplex1()
{
- OUString aTestFile = m_directories.getPathFromSrc("/oox/qa/unit/data/vba/complex1.bin");
- OUString aReference = m_directories.getPathFromSrc("/oox/qa/unit/data/vba/reference/complex1.bin");
+ OUString aTestFile = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/complex1.bin");
+ OUString aReference = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/reference/complex1.bin");
SvMemoryStream aOutputMemoryStream(4096, 4096);
SvMemoryStream aReferenceMemoryStream(4096, 4096);
@@ -184,8 +184,8 @@ void TestVbaCompression::testComplex1()
void TestVbaCompression::testSpec321()
{
- OUString aTestFile = m_directories.getPathFromSrc("/oox/qa/unit/data/vba/spec321.bin");
- OUString aReference = m_directories.getPathFromSrc("/oox/qa/unit/data/vba/reference/spec321.bin");
+ OUString aTestFile = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/spec321.bin");
+ OUString aReference = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/reference/spec321.bin");
SvMemoryStream aOutputMemoryStream(4096, 4096);
SvMemoryStream aReferenceMemoryStream(4096, 4096);
@@ -206,8 +206,8 @@ void TestVbaCompression::testSpec321()
void TestVbaCompression::testSpec322()
{
- OUString aTestFile = m_directories.getPathFromSrc("/oox/qa/unit/data/vba/spec322.bin");
- OUString aReference = m_directories.getPathFromSrc("/oox/qa/unit/data/vba/reference/spec322.bin");
+ OUString aTestFile = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/spec322.bin");
+ OUString aReference = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/reference/spec322.bin");
SvMemoryStream aOutputMemoryStream(4096, 4096);
SvMemoryStream aReferenceMemoryStream(4096, 4096);
@@ -228,8 +228,8 @@ void TestVbaCompression::testSpec322()
void TestVbaCompression::testSpec323()
{
- OUString aTestFile = m_directories.getPathFromSrc("/oox/qa/unit/data/vba/spec323.bin");
- OUString aReference = m_directories.getPathFromSrc("/oox/qa/unit/data/vba/reference/spec323.bin");
+ OUString aTestFile = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/spec323.bin");
+ OUString aReference = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/reference/spec323.bin");
SvMemoryStream aOutputMemoryStream(4096, 4096);
SvMemoryStream aReferenceMemoryStream(4096, 4096);
diff --git a/oox/qa/unit/vml.cxx b/oox/qa/unit/vml.cxx
index d6e79a3da956..ca656a08276c 100644
--- a/oox/qa/unit/vml.cxx
+++ b/oox/qa/unit/vml.cxx
@@ -7,6 +7,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <test/bootstrapfixture.hxx>
#include <unotest/macros_test.hxx>
@@ -31,7 +35,7 @@ public:
void setUp() override;
void tearDown() override;
uno::Reference<lang::XComponent>& getComponent() { return mxComponent; }
- void load(const OUString& rURL);
+ void load(std::u16string_view rURL);
};
void OoxVmlTest::setUp()
@@ -49,7 +53,7 @@ void OoxVmlTest::tearDown()
test::BootstrapFixture::tearDown();
}
-void OoxVmlTest::load(const OUString& rFileName)
+void OoxVmlTest::load(std::u16string_view rFileName)
{
OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + rFileName;
mxComponent = loadFromDesktop(aURL);
@@ -59,7 +63,7 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, testSpt202ShapeType)
{
// Load a document with a groupshape, 2nd child is a <v:shape>, its type has o:spt set to 202
// (TextBox).
- load("group-spt202.docx");
+ load(u"group-spt202.docx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
uno::UNO_QUERY);
@@ -79,7 +83,7 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, testShapeNonAutosizeWithText)
// Load a document which has a group shape, containing a single child.
// 17.78 cm is the full group shape width, 19431/64008 is the child shape's relative width inside
// that, so 5.3975 cm should be the shape width.
- load("shape-non-autosize-with-text.docx");
+ load(u"shape-non-autosize-with-text.docx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
uno::UNO_QUERY);
@@ -94,7 +98,7 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, testShapeNonAutosizeWithText)
CPPUNIT_TEST_FIXTURE(OoxVmlTest, testGraphicStroke)
{
- load("graphic-stroke.pptx");
+ load(u"graphic-stroke.pptx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
uno::UNO_QUERY);
diff --git a/oox/source/core/contexthandler.cxx b/oox/source/core/contexthandler.cxx
index ff55f8b07bc7..80e274c4aa67 100644
--- a/oox/source/core/contexthandler.cxx
+++ b/oox/source/core/contexthandler.cxx
@@ -71,7 +71,8 @@ OUString ContextHandler::getFragmentPathFromFirstType( std::u16string_view rType
return mxBaseData->mxRelations->getFragmentPathFromFirstType( rType );
}
-OUString ContextHandler::getFragmentPathFromFirstTypeFromOfficeDoc( const OUString& rType ) const
+OUString ContextHandler::getFragmentPathFromFirstTypeFromOfficeDoc( std::u16string_view rType )
+ const
{
return mxBaseData->mxRelations->getFragmentPathFromFirstTypeFromOfficeDoc( rType );
}
diff --git a/oox/source/core/relations.cxx b/oox/source/core/relations.cxx
index bedfc125b675..986ffb1e38d0 100644
--- a/oox/source/core/relations.cxx
+++ b/oox/source/core/relations.cxx
@@ -20,6 +20,7 @@
#include <sal/config.h>
#include <algorithm>
+#include <string_view>
#include <oox/core/relations.hxx>
@@ -32,20 +33,21 @@ OUString lclRemoveFileName( const OUString& rPath )
return rPath.copy( 0, ::std::max< sal_Int32 >( rPath.lastIndexOf( '/' ), 0 ) );
}
-OUString lclAppendFileName( const OUString& rPath, const OUString& rFileName )
+OUString lclAppendFileName( std::u16string_view rPath, const OUString& rFileName )
{
- return rPath.isEmpty() ? rFileName :
+ return rPath.empty() ? rFileName :
rPath + OUStringChar('/') + rFileName;
}
-OUString createOfficeDocRelationTypeTransitional(const OUString& rType)
+OUString createOfficeDocRelationTypeTransitional(std::u16string_view rType)
{
- return "http://schemas.openxmlformats.org/officeDocument/2006/relationships/" + rType;
+ return OUString::Concat("http://schemas.openxmlformats.org/officeDocument/2006/relationships/")
+ + rType;
}
-OUString createOfficeDocRelationTypeStrict(const OUString& rType)
+OUString createOfficeDocRelationTypeStrict(std::u16string_view rType)
{
- return "http://purl.oclc.org/ooxml/officeDocument/relationships/" + rType;
+ return OUString::Concat("http://purl.oclc.org/ooxml/officeDocument/relationships/") + rType;
}
}
@@ -70,7 +72,7 @@ const Relation* Relations::getRelationFromFirstType( std::u16string_view rType )
return nullptr;
}
-RelationsRef Relations::getRelationsFromTypeFromOfficeDoc( const OUString& rType ) const
+RelationsRef Relations::getRelationsFromTypeFromOfficeDoc( std::u16string_view rType ) const
{
RelationsRef xRelations = std::make_shared<Relations>( maFragmentPath );
for (auto const& elem : maMap)
@@ -137,7 +139,7 @@ OUString Relations::getFragmentPathFromFirstType( std::u16string_view rType ) co
return pRelation ? getFragmentPathFromRelation( *pRelation ) : OUString();
}
-OUString Relations::getFragmentPathFromFirstTypeFromOfficeDoc( const OUString& rType ) const
+OUString Relations::getFragmentPathFromFirstTypeFromOfficeDoc( std::u16string_view rType ) const
{
OUString aTransitionalType(createOfficeDocRelationTypeTransitional(rType));
const Relation* pRelation = getRelationFromFirstType( aTransitionalType );
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index 42bf01bece56..fd425f3940ba 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -302,19 +302,20 @@ FastParser* XmlFilterBase::createParser()
namespace {
-OUString getTransitionalRelationshipOfficeDocType(const OUString& rPart)
+OUString getTransitionalRelationshipOfficeDocType(std::u16string_view rPart)
{
- return "http://schemas.openxmlformats.org/officeDocument/2006/relationships/" + rPart;
+ return OUString::Concat("http://schemas.openxmlformats.org/officeDocument/2006/relationships/")
+ + rPart;
}
-OUString getStrictRelationshipOfficeDocType(const OUString& rPart)
+OUString getStrictRelationshipOfficeDocType(std::u16string_view rPart)
{
- return "http://purl.oclc.org/ooxml/officeDocument/relationships/" + rPart;
+ return OUString::Concat("http://purl.oclc.org/ooxml/officeDocument/relationships/") + rPart;
}
}
-OUString XmlFilterBase::getFragmentPathFromFirstTypeFromOfficeDoc( const OUString& rPart )
+OUString XmlFilterBase::getFragmentPathFromFirstTypeFromOfficeDoc( std::u16string_view rPart )
{
// importRelations() caches the relations map for subsequence calls
const OUString aTransitionalRelationshipType = getTransitionalRelationshipOfficeDocType(rPart);
diff --git a/oox/source/drawingml/diagram/diagram.cxx b/oox/source/drawingml/diagram/diagram.cxx
index d9f35df42ebf..9a8f727b9070 100644
--- a/oox/source/drawingml/diagram/diagram.cxx
+++ b/oox/source/drawingml/diagram/diagram.cxx
@@ -271,7 +271,7 @@ void loadDiagram( ShapePtr const & pShape,
xRefDataModel);
pDiagram->getDataRelsMap() = pShape->resolveRelationshipsOfTypeFromOfficeDoc( rFilter,
- xRefDataModel->getFragmentPath(), "image" );
+ xRefDataModel->getFragmentPath(), u"image" );
// Pass the info to pShape
for (auto const& extDrawing : pData->getExtDrawings())
diff --git a/oox/source/drawingml/graphicshapecontext.cxx b/oox/source/drawingml/graphicshapecontext.cxx
index 61d96b583c67..eaf650c051ba 100644
--- a/oox/source/drawingml/graphicshapecontext.cxx
+++ b/oox/source/drawingml/graphicshapecontext.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <oox/drawingml/graphicshapecontext.hxx>
#include <osl/diagnose.h>
@@ -54,9 +58,9 @@ lcl_GetMediaStream(const OUString& rStream, const oox::core::XmlFilterBase& rFil
return xInStrm;
}
-static OUString lcl_GetMediaReference(const OUString& rStream)
+static OUString lcl_GetMediaReference(std::u16string_view rStream)
{
- return rStream.isEmpty() ? OUString() : "vnd.sun.star.Package:" + rStream;
+ return rStream.empty() ? OUString() : OUString::Concat("vnd.sun.star.Package:") + rStream;
}
namespace oox::drawingml {
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index a7ffe9655f1c..ce30b436ffec 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -1578,7 +1578,7 @@ void Shape::keepDiagramDrawing(XmlFilterBase& rFilterBase, const OUString& rFrag
maDiagramDoms.realloc(length + 1);
diagramDrawing[0] <<= rFilterBase.importFragment(rFragmentPath);
- diagramDrawing[1] <<= resolveRelationshipsOfTypeFromOfficeDoc(rFilterBase, rFragmentPath, "image");
+ diagramDrawing[1] <<= resolveRelationshipsOfTypeFromOfficeDoc(rFilterBase, rFragmentPath, u"image");
beans::PropertyValue* pValue = maDiagramDoms.getArray();
pValue[length].Name = "OOXDrawing";
@@ -1829,7 +1829,7 @@ void Shape::finalizeXShape( XmlFilterBase& rFilter, const Reference< XShapes >&
chart::ChartSpaceFragment *pChartSpaceFragment = new chart::ChartSpaceFragment(
rFilter, mxChartShapeInfo->maFragmentPath, aModel );
const OUString aThemeOverrideFragmentPath( pChartSpaceFragment->
- getFragmentPathFromFirstTypeFromOfficeDoc("themeOverride") );
+ getFragmentPathFromFirstTypeFromOfficeDoc(u"themeOverride") );
rFilter.importFragment( pChartSpaceFragment );
::oox::ppt::PowerPointImport *pPowerPointImport =
dynamic_cast< ::oox::ppt::PowerPointImport* >(&rFilter);
@@ -2005,7 +2005,7 @@ EffectProperties Shape::getActualEffectProperties(const Theme* pTheme) const
return aEffectProperties;
}
-uno::Sequence< uno::Sequence< uno::Any > > Shape::resolveRelationshipsOfTypeFromOfficeDoc(core::XmlFilterBase& rFilter, const OUString& sFragment, const OUString& sType )
+uno::Sequence< uno::Sequence< uno::Any > > Shape::resolveRelationshipsOfTypeFromOfficeDoc(core::XmlFilterBase& rFilter, const OUString& sFragment, std::u16string_view sType )
{
uno::Sequence< uno::Sequence< uno::Any > > xRelListTemp;
sal_Int32 counter = 0;
diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx
index 9c36b7ed1d02..231b9cd37306 100644
--- a/oox/source/dump/dumperbase.cxx
+++ b/oox/source/dump/dumperbase.cxx
@@ -1837,7 +1837,8 @@ void StorageObjectBase::addPreferredStorage( const String& rStrgPath )
maPreferred.emplace_back( rStrgPath, true );
}
-OUString StorageObjectBase::getSysFileName( const OUString& rStrmName, const OUString& rSysOutPath )
+OUString StorageObjectBase::getSysFileName(
+ const OUString& rStrmName, std::u16string_view rSysOutPath )
{
// encode all characters < 0x20
OUStringBuffer aBuffer;
@@ -1850,7 +1851,7 @@ OUString StorageObjectBase::getSysFileName( const OUString& rStrmName, const OUS
aFileName = aFileName.replace(cChar, '_');
// build full path
- return rSysOutPath + "/" + aFileName;
+ return OUString::Concat(rSysOutPath) + "/" + aFileName;
}
void StorageObjectBase::extractStream( StorageBase& rStrg, const OUString& rStrgPath, const OUString& rStrmName, const OUString& rSysFileName )
@@ -1901,7 +1902,7 @@ void StorageObjectBase::extractStorage( const StorageRef& rxStrg, const OUString
}
}
-void StorageObjectBase::extractItem( const StorageRef& rxStrg, const OUString& rStrgPath, const OUString& rItemName, const OUString& rSysPath, bool bIsStrg, bool bIsStrm )
+void StorageObjectBase::extractItem( const StorageRef& rxStrg, const OUString& rStrgPath, const OUString& rItemName, std::u16string_view rSysPath, bool bIsStrg, bool bIsStrm )
{
OUString aSysFileName = getSysFileName( rItemName, rSysPath );
if( bIsStrg )
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index f073fd21f06e..0571aeed7d93 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -4868,7 +4868,7 @@ void DrawingML::WriteDiagram(const css::uno::Reference<css::drawing::XShape>& rX
uno::Sequence<beans::StringPair>());
// write the associated Images and rels for data file
- writeDiagramRels(xDataRelSeq, xDataOutputStream, "OOXDiagramDataRels", nDiagramId);
+ writeDiagramRels(xDataRelSeq, xDataOutputStream, u"OOXDiagramDataRels", nDiagramId);
// write layout file
serializer.set(layoutDom, uno::UNO_QUERY);
@@ -4909,12 +4909,12 @@ void DrawingML::WriteDiagram(const css::uno::Reference<css::drawing::XShape>& rX
// write the associated Images and rels for drawing file
uno::Sequence<uno::Sequence<uno::Any>> xDrawingRelSeq;
diagramDrawing[1] >>= xDrawingRelSeq;
- writeDiagramRels(xDrawingRelSeq, xDrawingOutputStream, "OOXDiagramDrawingRels", nDiagramId);
+ writeDiagramRels(xDrawingRelSeq, xDrawingOutputStream, u"OOXDiagramDrawingRels", nDiagramId);
}
void DrawingML::writeDiagramRels(const uno::Sequence<uno::Sequence<uno::Any>>& xRelSeq,
const uno::Reference<io::XOutputStream>& xOutStream,
- const OUString& sGrabBagProperyName, int nDiagramId)
+ std::u16string_view sGrabBagProperyName, int nDiagramId)
{
// add image relationships of OOXData, OOXDiagram
OUString sType(oox::getRelationship(Relationship::IMAGE));
@@ -4947,7 +4947,8 @@ void DrawingML::writeDiagramRels(const uno::Sequence<uno::Sequence<uno::Any>>& x
new ::comphelper::SequenceInputStream(dataSeq));
//nDiagramId is used to make the name unique irrespective of the number of smart arts.
- OUString sFragment = "media/" + sGrabBagProperyName + OUString::number(nDiagramId) + "_"
+ OUString sFragment = OUString::Concat("media/") + sGrabBagProperyName
+ + OUString::number(nDiagramId) + "_"
+ OUString::number(j) + sExtension;
PropertySet aProps(xOutStream);
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index 5ef5ed096b2e..16635228e93a 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -1225,13 +1225,14 @@ sal_uInt32 VMLExport::GenerateShapeId()
return m_nShapeIDCounter++;
}
-OString VMLExport::GetVMLShapeTypeDefinition( const OString& sShapeID, const bool bIsPictureFrame )
+OString VMLExport::GetVMLShapeTypeDefinition(
+ std::string_view sShapeID, const bool bIsPictureFrame )
{
OString sShapeType;
if ( !bIsPictureFrame )
// We don't have a shape definition for host control in presetShapeDefinitions.xml
// So use a definition copied from DOCX file created with MSO
- sShapeType = "<v:shapetype id=\"shapetype_" + sShapeID +
+ sShapeType = OString::Concat("<v:shapetype id=\"shapetype_") + sShapeID +
"\" coordsize=\"21600,21600\" o:spt=\"" + sShapeID +
"\" path=\"m,l,21600l21600,21600l21600,xe\">\n"
"<v:stroke joinstyle=\"miter\"/>\n"
@@ -1241,7 +1242,7 @@ OString VMLExport::GetVMLShapeTypeDefinition( const OString& sShapeID, const boo
else
// We don't have a shape definition for picture frame in presetShapeDefinitions.xml
// So use a definition copied from DOCX file created with MSO
- sShapeType = "<v:shapetype id=\"shapetype_" + sShapeID +
+ sShapeType = OString::Concat("<v:shapetype id=\"shapetype_") + sShapeID +
"\" coordsize=\"21600,21600\" o:spt=\"" + sShapeID +
"\" o:preferrelative=\"t\" path=\"m@4@5l@4@11@9@11@9@5xe\" filled=\"f\" stroked=\"f\">\n"
"<v:stroke joinstyle=\"miter\"/>\n"
diff --git a/oox/source/ole/vbaproject.cxx b/oox/source/ole/vbaproject.cxx
index 403181ef15b6..c3f587513be5 100644
--- a/oox/source/ole/vbaproject.cxx
+++ b/oox/source/ole/vbaproject.cxx
@@ -79,13 +79,13 @@ bool lclReadConfigItem( const Reference< XInterface >& rxConfigAccess, const OUS
} // namespace
-VbaFilterConfig::VbaFilterConfig( const Reference< XComponentContext >& rxContext, const OUString& rConfigCompName )
+VbaFilterConfig::VbaFilterConfig( const Reference< XComponentContext >& rxContext, std::u16string_view rConfigCompName )
{
OSL_ENSURE( rxContext.is(), "VbaFilterConfig::VbaFilterConfig - missing component context" );
if( rxContext.is() ) try
{
- OSL_ENSURE( !rConfigCompName.isEmpty(), "VbaFilterConfig::VbaFilterConfig - invalid configuration component name" );
- OUString aConfigPackage = "org.openoffice.Office." + rConfigCompName;
+ OSL_ENSURE( !rConfigCompName.empty(), "VbaFilterConfig::VbaFilterConfig - invalid configuration component name" );
+ OUString aConfigPackage = OUString::Concat("org.openoffice.Office.") + rConfigCompName;
mxConfigAccess = ConfigurationHelper::openConfig( rxContext, aConfigPackage, comphelper::EConfigurationModes::ReadOnly );
}
catch(const Exception& )
@@ -135,7 +135,7 @@ void VbaMacroAttacherBase::resolveAndAttachMacro( const Reference< XVBAMacroReso
}
VbaProject::VbaProject( const Reference< XComponentContext >& rxContext,
- const Reference< XModel >& rxDocModel, const OUString& rConfigCompName ) :
+ const Reference< XModel >& rxDocModel, std::u16string_view rConfigCompName ) :
VbaFilterConfig( rxContext, rConfigCompName ),
mxContext( rxContext ),
mxDocModel( rxDocModel ),
diff --git a/oox/source/ppt/pptimport.cxx b/oox/source/ppt/pptimport.cxx
index 98a855c77fa4..128ff31d6267 100644
--- a/oox/source/ppt/pptimport.cxx
+++ b/oox/source/ppt/pptimport.cxx
@@ -95,11 +95,11 @@ bool PowerPointImport::importDocument()
importDocumentProperties();
- OUString aFragmentPath = getFragmentPathFromFirstTypeFromOfficeDoc( "officeDocument" );
+ OUString aFragmentPath = getFragmentPathFromFirstTypeFromOfficeDoc( u"officeDocument" );
FragmentHandlerRef xPresentationFragmentHandler( new PresentationFragmentHandler( *this, aFragmentPath ) );
- maTableStyleListPath = xPresentationFragmentHandler->getFragmentPathFromFirstTypeFromOfficeDoc( "tableStyles" );
+ maTableStyleListPath = xPresentationFragmentHandler->getFragmentPathFromFirstTypeFromOfficeDoc( u"tableStyles" );
const OUString sPresPropsPath
- = xPresentationFragmentHandler->getFragmentPathFromFirstTypeFromOfficeDoc("presProps");
+ = xPresentationFragmentHandler->getFragmentPathFromFirstTypeFromOfficeDoc(u"presProps");
bool bRet = importFragment(xPresentationFragmentHandler);
if (bRet && !sPresPropsPath.isEmpty())
@@ -279,7 +279,7 @@ GraphicHelper* PowerPointImport::implCreateGraphicHelper() const
::oox::ole::VbaProject* PowerPointImport::implCreateVbaProject() const
{
- return new ::oox::ole::VbaProject( getComponentContext(), getModel(), "Impress" );
+ return new ::oox::ole::VbaProject( getComponentContext(), getModel(), u"Impress" );
}
OUString PowerPointImport::getImplementationName()
diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx
index fd83c30b817a..2683905b8a74 100644
--- a/oox/source/ppt/presentationfragmenthandler.cxx
+++ b/oox/source/ppt/presentationfragmenthandler.cxx
@@ -254,13 +254,13 @@ void PresentationFragmentHandler::importSlide(sal_uInt32 nSlide, bool bFirstPage
FragmentHandlerRef xSlideFragmentHandler( new SlideFragmentHandler( rFilter, aSlideFragmentPath, pSlidePersistPtr, Slide ) );
// importing the corresponding masterpage/layout
- OUString aLayoutFragmentPath = xSlideFragmentHandler->getFragmentPathFromFirstTypeFromOfficeDoc( "slideLayout" );
- OUString aCommentFragmentPath = xSlideFragmentHandler->getFragmentPathFromFirstTypeFromOfficeDoc( "comments" );
+ OUString aLayoutFragmentPath = xSlideFragmentHandler->getFragmentPathFromFirstTypeFromOfficeDoc( u"slideLayout" );
+ OUString aCommentFragmentPath = xSlideFragmentHandler->getFragmentPathFromFirstTypeFromOfficeDoc( u"comments" );
if ( !aLayoutFragmentPath.isEmpty() )
{
// importing layout
RelationsRef xLayoutRelations = rFilter.importRelations( aLayoutFragmentPath );
- OUString aMasterFragmentPath = xLayoutRelations->getFragmentPathFromFirstTypeFromOfficeDoc( "slideMaster" );
+ OUString aMasterFragmentPath = xLayoutRelations->getFragmentPathFromFirstTypeFromOfficeDoc( u"slideMaster" );
if( !aMasterFragmentPath.isEmpty() )
{
// check if the corresponding masterpage+layout has already been imported
@@ -300,7 +300,7 @@ void PresentationFragmentHandler::importSlide(sal_uInt32 nSlide, bool bFirstPage
FragmentHandlerRef xMasterFragmentHandler( new SlideFragmentHandler( rFilter, aMasterFragmentPath, pMasterPersistPtr, Master ) );
// set the correct theme
- OUString aThemeFragmentPath = xMasterFragmentHandler->getFragmentPathFromFirstTypeFromOfficeDoc( "theme" );
+ OUString aThemeFragmentPath = xMasterFragmentHandler->getFragmentPathFromFirstTypeFromOfficeDoc( u"theme" );
if( !aThemeFragmentPath.isEmpty() )
{
std::map< OUString, oox::drawingml::ThemePtr >& rThemes( rFilter.getThemes() );
@@ -352,7 +352,7 @@ void PresentationFragmentHandler::importSlide(sal_uInt32 nSlide, bool bFirstPage
if(bImportNotesPage) {
// now importing the notes page
- OUString aNotesFragmentPath = xSlideFragmentHandler->getFragmentPathFromFirstTypeFromOfficeDoc( "notesSlide" );
+ OUString aNotesFragmentPath = xSlideFragmentHandler->getFragmentPathFromFirstTypeFromOfficeDoc( u"notesSlide" );
if( !aNotesFragmentPath.isEmpty() )
{
Reference< XPresentationPage > xPresentationPage( xSlide, UNO_QUERY );
diff --git a/oox/source/ppt/slidefragmenthandler.cxx b/oox/source/ppt/slidefragmenthandler.cxx
index c607e17d7a4e..4512ee156261 100644
--- a/oox/source/ppt/slidefragmenthandler.cxx
+++ b/oox/source/ppt/slidefragmenthandler.cxx
@@ -57,7 +57,7 @@ SlideFragmentHandler::SlideFragmentHandler( XmlFilterBase& rFilter, const OUStri
, mpSlidePersistPtr( pPersistPtr )
, meShapeLocation( eShapeLocation )
{
- OUString aVMLDrawingFragmentPath = getFragmentPathFromFirstTypeFromOfficeDoc( "vmlDrawing" );
+ OUString aVMLDrawingFragmentPath = getFragmentPathFromFirstTypeFromOfficeDoc( u"vmlDrawing" );
if( !aVMLDrawingFragmentPath.isEmpty() )
getFilter().importFragment( new oox::vml::DrawingFragment(
getFilter(), aVMLDrawingFragmentPath, *pPersistPtr->getDrawing() ) );
@@ -90,7 +90,7 @@ SlideFragmentHandler::~SlideFragmentHandler()
{
// Import notesMaster
PowerPointImport& rFilter = dynamic_cast< PowerPointImport& >( getFilter() );
- OUString aNotesFragmentPath = getFragmentPathFromFirstTypeFromOfficeDoc( "notesMaster" );
+ OUString aNotesFragmentPath = getFragmentPathFromFirstTypeFromOfficeDoc( u"notesMaster" );
std::vector< SlidePersistPtr >& rMasterPages( rFilter.getMasterPages() );
bool bNotesFragmentPathFound = false;
diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx
index 2368de0a3629..1513ad8d6507 100644
--- a/oox/source/shape/ShapeContextHandler.cxx
+++ b/oox/source/shape/ShapeContextHandler.cxx
@@ -274,12 +274,12 @@ void SAL_CALL ShapeContextHandler::startFastElement
// Get Target for Type = "officeDocument" from _rels/.rels file
// aOfficeDocumentFragmentPath is pointing to "word/document.xml" for docx & to "ppt/presentation.xml" for pptx
FragmentHandlerRef rFragmentHandlerRef(new ShapeFragmentHandler(*mxFilterBase, "/"));
- OUString aOfficeDocumentFragmentPath = rFragmentHandlerRef->getFragmentPathFromFirstTypeFromOfficeDoc( "officeDocument" );
+ OUString aOfficeDocumentFragmentPath = rFragmentHandlerRef->getFragmentPathFromFirstTypeFromOfficeDoc( u"officeDocument" );
// Get the theme DO NOT use msRelationFragmentPath for getting theme as for a document there is a single theme in document.xml.rels
// and the same is used by header and footer as well.
FragmentHandlerRef rFragmentHandler(new ShapeFragmentHandler(*mxFilterBase, aOfficeDocumentFragmentPath));
- OUString aThemeFragmentPath = rFragmentHandler->getFragmentPathFromFirstTypeFromOfficeDoc( "theme" );
+ OUString aThemeFragmentPath = rFragmentHandler->getFragmentPathFromFirstTypeFromOfficeDoc( u"theme" );
if(!aThemeFragmentPath.isEmpty())
{
diff --git a/oox/source/shape/ShapeFilterBase.cxx b/oox/source/shape/ShapeFilterBase.cxx
index 33c9da8bb0ed..f5bb1af03955 100644
--- a/oox/source/shape/ShapeFilterBase.cxx
+++ b/oox/source/shape/ShapeFilterBase.cxx
@@ -69,7 +69,7 @@ void ShapeFilterBase::setCurrentTheme(const ::oox::drawingml::ThemePtr& pTheme)
::oox::ole::VbaProject* ShapeFilterBase::implCreateVbaProject() const
{
- return new ::oox::ole::VbaProject( getComponentContext(), getModel(), "Writer" );
+ return new ::oox::ole::VbaProject( getComponentContext(), getModel(), u"Writer" );
}
OUString ShapeFilterBase::getImplementationName()
diff --git a/opencl/inc/opencl_device.hxx b/opencl/inc/opencl_device.hxx
index 69a9cbbc9c1a..036a06fb2736 100644
--- a/opencl/inc/opencl_device.hxx
+++ b/opencl/inc/opencl_device.hxx
@@ -10,6 +10,10 @@
#ifndef INCLUDED_OPENCL_INC_OPENCL_DEVICE_HXX
#define INCLUDED_OPENCL_INC_OPENCL_DEVICE_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include <rtl/ustring.hxx>
namespace openclwrapper
@@ -18,7 +22,7 @@ struct GPUEnv;
}
struct ds_device;
-ds_device const& getDeviceSelection(OUString const& pFileName, bool bForceSelection);
+ds_device const& getDeviceSelection(std::u16string_view pFileName, bool bForceSelection);
void releaseOpenCLEnv(openclwrapper::GPUEnv* gpuInfo);
diff --git a/opencl/source/opencl_device.cxx b/opencl/source/opencl_device.cxx
index 682b92d0eb47..a5b249182a3d 100644
--- a/opencl/source/opencl_device.cxx
+++ b/opencl/source/opencl_device.cxx
@@ -10,6 +10,7 @@
#include <float.h>
#include <iostream>
#include <memory>
+#include <string_view>
#include <vector>
#include <algorithm>
@@ -454,9 +455,9 @@ public:
};
-void writeDevicesLog(std::unique_ptr<ds_profile> const & rProfile, OUString const & sProfilePath, int nSelectedIndex)
+void writeDevicesLog(std::unique_ptr<ds_profile> const & rProfile, std::u16string_view sProfilePath, int nSelectedIndex)
{
- OUString aCacheFile(sProfilePath + "opencl_devices.log");
+ OUString aCacheFile(OUString::Concat(sProfilePath) + "opencl_devices.log");
LogWriter aWriter(aCacheFile);
int nIndex = 0;
@@ -493,7 +494,7 @@ void writeDevicesLog(std::unique_ptr<ds_profile> const & rProfile, OUString cons
} // end anonymous namespace
ds_device const & getDeviceSelection(
- OUString const & sProfilePath, bool bForceSelection)
+ std::u16string_view sProfilePath, bool bForceSelection)
{
/* Run only if device is not yet selected */
if (!bIsDeviceSelected || bForceSelection)
@@ -511,7 +512,7 @@ ds_device const & getDeviceSelection(
}
/* Try reading scores from file */
- OUString sFilePath = sProfilePath + "opencl_profile.xml";
+ OUString sFilePath = OUString::Concat(sProfilePath) + "opencl_profile.xml";
if (!bForceSelection)
{
diff --git a/package/inc/ZipPackageFolder.hxx b/package/inc/ZipPackageFolder.hxx
index c99f8f2a6b27..96d486fc6e3c 100644
--- a/package/inc/ZipPackageFolder.hxx
+++ b/package/inc/ZipPackageFolder.hxx
@@ -26,6 +26,8 @@
#include "HashMaps.hxx"
#include "ZipPackageEntry.hxx"
#include <cppuhelper/implbase.hxx>
+
+#include <string_view>
#include <vector>
class ZipOutputStream;
@@ -52,7 +54,7 @@ public:
const OUString& GetVersion() const { return m_sVersion; }
void SetVersion( const OUString& aVersion ) { m_sVersion = aVersion; }
- bool LookForUnexpectedODF12Streams( const OUString& aPath );
+ bool LookForUnexpectedODF12Streams( std::u16string_view aPath );
void setChildStreamsTypeByExtension( const css::beans::StringPair& aPair );
diff --git a/package/qa/cppunit/test_package.cxx b/package/qa/cppunit/test_package.cxx
index 29a8d9281cb5..62c718421c7c 100644
--- a/package/qa/cppunit/test_package.cxx
+++ b/package/qa/cppunit/test_package.cxx
@@ -51,7 +51,7 @@ namespace
void PackageTest::setUp()
{
BootstrapFixtureBase::setUp();
- OUString aURL = m_directories.getURLFromSrc("/package/qa/cppunit/data/a2z.zip");
+ OUString aURL = m_directories.getURLFromSrc(u"/package/qa/cppunit/data/a2z.zip");
uno::Sequence<beans::NamedValue> aNVs(1);
aNVs[0].Name = "URL";
@@ -93,7 +93,7 @@ namespace
void PackageTest::test()
{
testDir(OUString(),
- m_directories.getURLFromSrc("/package/qa/cppunit/data/"));
+ m_directories.getURLFromSrc(u"/package/qa/cppunit/data/"));
}
void PackageTest::verifyStreams( std::vector<std::vector<char>> &aBuffers )
diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx
index 408003386ea2..9655240c4602 100644
--- a/package/source/xstor/owriteablestream.cxx
+++ b/package/source/xstor/owriteablestream.cxx
@@ -984,7 +984,7 @@ void OWriteStream_Impl::ReadRelInfoIfNecessary()
if ( m_xOrigRelInfoStream.is() )
m_aOrigRelInfo = ::comphelper::OFOPXMLHelper::ReadRelationsInfoSequence(
m_xOrigRelInfoStream,
- "_rels/*.rels",
+ u"_rels/*.rels",
m_xContext );
// in case of success the stream must be thrown away, that means that the OrigRelInfo is initialized
@@ -1009,7 +1009,7 @@ void OWriteStream_Impl::ReadRelInfoIfNecessary()
if ( m_xNewRelInfoStream.is() )
m_aNewRelInfo = ::comphelper::OFOPXMLHelper::ReadRelationsInfoSequence(
m_xNewRelInfoStream,
- "_rels/*.rels",
+ u"_rels/*.rels",
m_xContext );
m_nRelInfoStatus = RELINFO_CHANGED_STREAM_READ;
@@ -1496,7 +1496,7 @@ void OWriteStream_Impl::GetCopyOfLastCommit( uno::Reference< io::XStream >& xTar
CreateReadonlyCopyBasedOnData( xDataToCopy, m_aProps, xTargetStream );
}
-void OWriteStream_Impl::CommitStreamRelInfo( const uno::Reference< embed::XStorage >& xRelStorage, const OUString& aOrigStreamName, const OUString& aNewStreamName )
+void OWriteStream_Impl::CommitStreamRelInfo( const uno::Reference< embed::XStorage >& xRelStorage, std::u16string_view aOrigStreamName, std::u16string_view aNewStreamName )
{
// at this point of time the old stream must be already cleaned
OSL_ENSURE( m_nStorageType == embed::StorageFormats::OFOPXML, "The method should be used only with OFOPXML format!" );
@@ -1504,17 +1504,17 @@ void OWriteStream_Impl::CommitStreamRelInfo( const uno::Reference< embed::XStora
if ( m_nStorageType != embed::StorageFormats::OFOPXML )
return;
- OSL_ENSURE( !aOrigStreamName.isEmpty() && !aNewStreamName.isEmpty() && xRelStorage.is(),
+ OSL_ENSURE( !aOrigStreamName.empty() && !aNewStreamName.empty() && xRelStorage.is(),
"Wrong relation persistence information is provided!" );
- if ( !xRelStorage.is() || aOrigStreamName.isEmpty() || aNewStreamName.isEmpty() )
+ if ( !xRelStorage.is() || aOrigStreamName.empty() || aNewStreamName.empty() )
throw uno::RuntimeException();
if ( m_nRelInfoStatus == RELINFO_BROKEN || m_nRelInfoStatus == RELINFO_CHANGED_BROKEN )
throw io::IOException(); // TODO:
- OUString aOrigRelStreamName = aOrigStreamName + ".rels";
- OUString aNewRelStreamName = aNewStreamName + ".rels";
+ OUString aOrigRelStreamName = OUString::Concat(aOrigStreamName) + ".rels";
+ OUString aNewRelStreamName = OUString::Concat(aNewStreamName) + ".rels";
bool bRenamed = aOrigRelStreamName != aNewRelStreamName;
if ( m_nRelInfoStatus == RELINFO_CHANGED
diff --git a/package/source/xstor/owriteablestream.hxx b/package/source/xstor/owriteablestream.hxx
index 3c8bbbf2aed5..ecb810c32529 100644
--- a/package/source/xstor/owriteablestream.hxx
+++ b/package/source/xstor/owriteablestream.hxx
@@ -47,6 +47,7 @@
#include <vector>
#include <memory>
+#include <string_view>
#include "ocompinstream.hxx"
@@ -214,8 +215,8 @@ public:
void CommitStreamRelInfo(
const css::uno::Reference< css::embed::XStorage >& xRelStorage,
- const OUString& aOrigStreamName,
- const OUString& aNewStreamName );
+ std::u16string_view aOrigStreamName,
+ std::u16string_view aNewStreamName );
void ReadRelInfoIfNecessary();
diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx
index 8a13fd82b32d..13e93c9da9ad 100644
--- a/package/source/xstor/xstorage.cxx
+++ b/package/source/xstor/xstorage.cxx
@@ -22,6 +22,7 @@
#include <sal/log.hxx>
#include <cassert>
+#include <string_view>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
@@ -525,13 +526,14 @@ void OStorage_Impl::ReadRelInfoIfNecessary()
if ( m_nRelInfoStatus == RELINFO_NO_INIT )
{
// Init from original stream
- uno::Reference< io::XInputStream > xRelInfoStream = GetRelInfoStreamForName( OUString() );
+ uno::Reference< io::XInputStream > xRelInfoStream
+ = GetRelInfoStreamForName( std::u16string_view() );
try
{
if ( xRelInfoStream.is() )
m_aRelInfo = ::comphelper::OFOPXMLHelper::ReadRelationsInfoSequence(
xRelInfoStream,
- "_rels/.rels",
+ u"_rels/.rels",
m_xContext );
m_nRelInfoStatus = RELINFO_READ;
}
@@ -548,7 +550,7 @@ void OStorage_Impl::ReadRelInfoIfNecessary()
if ( m_xNewRelInfoStream.is() )
m_aRelInfo = ::comphelper::OFOPXMLHelper::ReadRelationsInfoSequence(
m_xNewRelInfoStream,
- "_rels/.rels",
+ u"_rels/.rels",
m_xContext );
m_nRelInfoStatus = RELINFO_CHANGED_STREAM_READ;
@@ -1579,14 +1581,14 @@ void OStorage_Impl::CloneStreamElement( const OUString& aStreamName,
pElement->m_xStream->GetCopyOfLastCommit(xTargetStream);
}
-void OStorage_Impl::RemoveStreamRelInfo( const OUString& aOriginalName )
+void OStorage_Impl::RemoveStreamRelInfo( std::u16string_view aOriginalName )
{
// this method should be used only in OStorage_Impl::Commit() method
// the aOriginalName can be empty, in this case the storage relation info should be removed
if ( m_nStorageType == embed::StorageFormats::OFOPXML && m_xRelStorage.is() )
{
- OUString aRelStreamName = aOriginalName + ".rels";
+ OUString aRelStreamName = OUString::Concat(aOriginalName) + ".rels";
if ( m_xRelStorage->hasByName( aRelStreamName ) )
m_xRelStorage->removeElement( aRelStreamName );
@@ -1619,7 +1621,7 @@ void OStorage_Impl::CreateRelStorage()
m_xRelStorage.set( static_cast<embed::XStorage*>(pResultStorage) );
}
-void OStorage_Impl::CommitStreamRelInfo( const OUString &rName, SotElement_Impl const * pStreamElement )
+void OStorage_Impl::CommitStreamRelInfo( std::u16string_view rName, SotElement_Impl const * pStreamElement )
{
// this method should be used only in OStorage_Impl::Commit() method
@@ -1629,7 +1631,7 @@ void OStorage_Impl::CommitStreamRelInfo( const OUString &rName, SotElement_Impl
if (m_nStorageType == embed::StorageFormats::OFOPXML && pStreamElement->m_xStream)
{
- SAL_WARN_IF( rName.isEmpty(), "package.xstor", "The name must not be empty!" );
+ SAL_WARN_IF( rName.empty(), "package.xstor", "The name must not be empty!" );
if ( !m_xRelStorage.is() )
{
@@ -1641,14 +1643,15 @@ void OStorage_Impl::CommitStreamRelInfo( const OUString &rName, SotElement_Impl
}
}
-uno::Reference< io::XInputStream > OStorage_Impl::GetRelInfoStreamForName( const OUString& aName )
+uno::Reference< io::XInputStream > OStorage_Impl::GetRelInfoStreamForName(
+ std::u16string_view aName )
{
if ( m_nStorageType == embed::StorageFormats::OFOPXML )
{
ReadContents();
if ( m_xRelStorage.is() )
{
- OUString aRelStreamName = aName + ".rels";
+ OUString aRelStreamName = OUString::Concat(aName) + ".rels";
if ( m_xRelStorage->hasByName( aRelStreamName ) )
{
uno::Reference< io::XStream > xStream = m_xRelStorage->openStreamElement( aRelStreamName, embed::ElementModes::READ );
@@ -1700,7 +1703,7 @@ void OStorage_Impl::CommitRelInfo( const uno::Reference< container::XNameContain
m_nRelInfoStatus = RELINFO_READ;
}
else if (m_xRelStorage.is())
- RemoveStreamRelInfo(OUString()); // remove own rel info
+ RemoveStreamRelInfo(std::u16string_view()); // remove own rel info
}
else if (m_nRelInfoStatus == RELINFO_CHANGED_STREAM_READ
|| m_nRelInfoStatus == RELINFO_CHANGED_STREAM)
diff --git a/package/source/xstor/xstorage.hxx b/package/source/xstor/xstorage.hxx
index 959a7aea72e6..cddaa7d6fbe1 100644
--- a/package/source/xstor/xstorage.hxx
+++ b/package/source/xstor/xstorage.hxx
@@ -53,6 +53,7 @@
#include <vector>
#include <memory>
+#include <string_view>
namespace com::sun::star::uno {
class XComponentContext;
@@ -249,10 +250,11 @@ struct OStorage_Impl
const ::comphelper::SequenceAsHashMap& aEncryptionData,
css::uno::Reference< css::io::XStream >& xTargetStream );
- void RemoveStreamRelInfo( const OUString& aOriginalName );
+ void RemoveStreamRelInfo( std::u16string_view aOriginalName );
void CreateRelStorage();
- void CommitStreamRelInfo( const OUString& rName, SotElement_Impl const * pStreamElement );
- css::uno::Reference< css::io::XInputStream > GetRelInfoStreamForName( const OUString& aName );
+ void CommitStreamRelInfo( std::u16string_view rName, SotElement_Impl const * pStreamElement );
+ css::uno::Reference< css::io::XInputStream > GetRelInfoStreamForName(
+ std::u16string_view aName );
void CommitRelInfo( const css::uno::Reference< css::container::XNameContainer >& xNewPackageFolder );
static void completeStorageStreamCopy_Impl(
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index d2b76ef12098..c65e63c5cf43 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -70,6 +70,7 @@
#include <cstring>
#include <memory>
+#include <string_view>
#include <vector>
#include <comphelper/processfactory.hxx>
@@ -427,7 +428,7 @@ void ZipPackage::parseManifest()
m_xRootFolder->removeByName( sMimetype );
}
- m_bInconsistent = m_xRootFolder->LookForUnexpectedODF12Streams( OUString() );
+ m_bInconsistent = m_xRootFolder->LookForUnexpectedODF12Streams( std::u16string_view() );
bool bODF12AndNewer = ( m_xRootFolder->GetVersion().compareTo( u"" ODFVER_012_TEXT ) >= 0 );
if ( !m_bForceRecovery && bODF12AndNewer )
diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx
index c95849df91a0..f867b4571b91 100644
--- a/package/source/zippackage/ZipPackageFolder.cxx
+++ b/package/source/zippackage/ZipPackageFolder.cxx
@@ -79,7 +79,7 @@ ZipPackageFolder::~ZipPackageFolder()
{
}
-bool ZipPackageFolder::LookForUnexpectedODF12Streams( const OUString& aPath )
+bool ZipPackageFolder::LookForUnexpectedODF12Streams( std::u16string_view aPath )
{
bool bHasUnexpected = false;
@@ -89,7 +89,7 @@ bool ZipPackageFolder::LookForUnexpectedODF12Streams( const OUString& aPath )
if ( rInfo.bFolder )
{
- if ( aPath == "META-INF/" )
+ if ( aPath == u"META-INF/" )
{
// META-INF is not allowed to contain subfolders
bHasUnexpected = true;
@@ -102,7 +102,7 @@ bool ZipPackageFolder::LookForUnexpectedODF12Streams( const OUString& aPath )
}
else
{
- if ( aPath == "META-INF/" )
+ if ( aPath == u"META-INF/" )
{
if ( rShortName != "manifest.xml"
&& rShortName.indexOf( "signatures" ) == -1 )
@@ -117,7 +117,7 @@ bool ZipPackageFolder::LookForUnexpectedODF12Streams( const OUString& aPath )
{
// the stream is not in META-INF and is not registered in manifest.xml,
// check whether it is an internal part of the package format
- if ( !aPath.isEmpty() || rShortName != "mimetype" )
+ if ( !aPath.empty() || rShortName != "mimetype" )
{
// if it is not "mimetype" from the root it is not a part of the package
bHasUnexpected = true;
diff --git a/pyuno/source/module/pyuno_impl.hxx b/pyuno/source/module/pyuno_impl.hxx
index e48dae7ce9ac..9fda901886cb 100644
--- a/pyuno/source/module/pyuno_impl.hxx
+++ b/pyuno/source/module/pyuno_impl.hxx
@@ -80,14 +80,14 @@ bool isLog( RuntimeCargo const *cargo, sal_Int32 loglevel );
void log( RuntimeCargo *cargo, sal_Int32 level, std::u16string_view logString );
void log( RuntimeCargo *cargo, sal_Int32 level, const char *str );
void logCall( RuntimeCargo *cargo, const char *intro,
- void * ptr, const OUString & aFunctionName,
+ void * ptr, std::u16string_view aFunctionName,
const css::uno::Sequence< css::uno::Any > & args );
void logReply( RuntimeCargo *cargo, const char *intro,
- void * ptr, const OUString & aFunctionName,
+ void * ptr, std::u16string_view aFunctionName,
const css::uno::Any &returnValue,
const css::uno::Sequence< css::uno::Any > & args );
void logException( RuntimeCargo *cargo, const char *intro,
- void * ptr, const OUString &aFunctionName,
+ void * ptr, std::u16string_view aFunctionName,
const void * data, const css::uno::Type & type );
const sal_Int32 VAL2STR_MODE_DEEP = 0;
const sal_Int32 VAL2STR_MODE_SHALLOW = 1;
diff --git a/pyuno/source/module/pyuno_util.cxx b/pyuno/source/module/pyuno_util.cxx
index 35b96183c739..6023a4e310c6 100644
--- a/pyuno/source/module/pyuno_util.cxx
+++ b/pyuno/source/module/pyuno_util.cxx
@@ -143,7 +143,7 @@ void appendPointer(OUStringBuffer & buffer, void * pointer) {
}
void logException( RuntimeCargo *cargo, const char *intro,
- void * ptr, const OUString &aFunctionName,
+ void * ptr, std::u16string_view aFunctionName,
const void * data, const css::uno::Type & type )
{
if( isLog( cargo, LogLevel::CALL ) )
@@ -151,7 +151,7 @@ void logException( RuntimeCargo *cargo, const char *intro,
OUStringBuffer buf( 128 );
buf.appendAscii( intro );
appendPointer(buf, ptr);
- buf.append( "]." + aFunctionName + " = " );
+ buf.append( OUString::Concat("].") + aFunctionName + " = " );
buf.append(
val2str( data, type.getTypeLibType(), VAL2STR_MODE_SHALLOW ) );
log( cargo,LogLevel::CALL, buf.makeStringAndClear() );
@@ -163,14 +163,14 @@ void logReply(
RuntimeCargo *cargo,
const char *intro,
void * ptr,
- const OUString & aFunctionName,
+ std::u16string_view aFunctionName,
const Any &returnValue,
const Sequence< Any > & aParams )
{
OUStringBuffer buf( 128 );
buf.appendAscii( intro );
appendPointer(buf, ptr);
- buf.append( "]." + aFunctionName + "()=" );
+ buf.append( OUString::Concat("].") + aFunctionName + "()=" );
if( isLog( cargo, LogLevel::ARGS ) )
{
buf.append(
@@ -186,13 +186,13 @@ void logReply(
}
void logCall( RuntimeCargo *cargo, const char *intro,
- void * ptr, const OUString & aFunctionName,
+ void * ptr, std::u16string_view aFunctionName,
const Sequence< Any > & aParams )
{
OUStringBuffer buf( 128 );
buf.appendAscii( intro );
appendPointer(buf, ptr);
- buf.append( "]." + aFunctionName + "(" );
+ buf.append( OUString::Concat("].") + aFunctionName + "(" );
if( isLog( cargo, LogLevel::ARGS ) )
{
for( int i = 0; i < aParams.getLength() ; i ++ )
diff --git a/registry/source/keyimpl.cxx b/registry/source/keyimpl.cxx
index 437aa3114e10..00b227efe986 100644
--- a/registry/source/keyimpl.cxx
+++ b/registry/source/keyimpl.cxx
@@ -215,7 +215,7 @@ RegError ORegKey::deleteKey(const OUString& keyName)
// getValueType
-RegError ORegKey::getValueInfo(const OUString& valueName, RegValueType* pValueType, sal_uInt32* pValueSize) const
+RegError ORegKey::getValueInfo(std::u16string_view valueName, RegValueType* pValueType, sal_uInt32* pValueSize) const
{
OStoreStream rValue;
std::unique_ptr<sal_uInt8[]> pBuffer;
@@ -226,7 +226,7 @@ RegError ORegKey::getValueInfo(const OUString& valueName, RegValueType* pValueTy
accessMode = storeAccessMode::ReadOnly;
}
- OUString sImplValueName = VALUE_PREFIX + valueName;
+ OUString sImplValueName = OUString::Concat(VALUE_PREFIX) + valueName;
REG_GUARD(m_pRegistry->m_mutex);
@@ -270,7 +270,7 @@ RegError ORegKey::getValueInfo(const OUString& valueName, RegValueType* pValueTy
// setValue
-RegError ORegKey::setValue(const OUString& valueName, RegValueType vType, RegValue value, sal_uInt32 vSize)
+RegError ORegKey::setValue(std::u16string_view valueName, RegValueType vType, RegValue value, sal_uInt32 vSize)
{
OStoreStream rValue;
std::unique_ptr<sal_uInt8[]> pBuffer;
@@ -285,7 +285,7 @@ RegError ORegKey::setValue(const OUString& valueName, RegValueType vType, RegVal
return RegError::INVALID_VALUE;
}
- OUString sImplValueName = VALUE_PREFIX + valueName;
+ OUString sImplValueName = OUString::Concat(VALUE_PREFIX) + valueName;
REG_GUARD(m_pRegistry->m_mutex);
@@ -341,7 +341,7 @@ RegError ORegKey::setValue(const OUString& valueName, RegValueType vType, RegVal
// setLongListValue
-RegError ORegKey::setLongListValue(const OUString& valueName, sal_Int32 const * pValueList, sal_uInt32 len)
+RegError ORegKey::setLongListValue(std::u16string_view valueName, sal_Int32 const * pValueList, sal_uInt32 len)
{
OStoreStream rValue;
std::unique_ptr<sal_uInt8[]> pBuffer;
@@ -351,7 +351,7 @@ RegError ORegKey::setLongListValue(const OUString& valueName, sal_Int32 const *
return RegError::REGISTRY_READONLY;
}
- OUString sImplValueName = VALUE_PREFIX + valueName;
+ OUString sImplValueName = OUString::Concat(VALUE_PREFIX) + valueName;
REG_GUARD(m_pRegistry->m_mutex);
@@ -396,7 +396,8 @@ RegError ORegKey::setLongListValue(const OUString& valueName, sal_Int32 const *
// setStringListValue
-RegError ORegKey::setStringListValue(const OUString& valueName, char** pValueList, sal_uInt32 len)
+RegError ORegKey::setStringListValue(
+ std::u16string_view valueName, char** pValueList, sal_uInt32 len)
{
OStoreStream rValue;
std::unique_ptr<sal_uInt8[]> pBuffer;
@@ -406,7 +407,7 @@ RegError ORegKey::setStringListValue(const OUString& valueName, char** pValueLis
return RegError::REGISTRY_READONLY;
}
- OUString sImplValueName = VALUE_PREFIX + valueName;
+ OUString sImplValueName = OUString::Concat(VALUE_PREFIX) + valueName;
REG_GUARD(m_pRegistry->m_mutex);
@@ -460,7 +461,7 @@ RegError ORegKey::setStringListValue(const OUString& valueName, char** pValueLis
// setUnicodeListValue
-RegError ORegKey::setUnicodeListValue(const OUString& valueName, sal_Unicode** pValueList, sal_uInt32 len)
+RegError ORegKey::setUnicodeListValue(std::u16string_view valueName, sal_Unicode** pValueList, sal_uInt32 len)
{
OStoreStream rValue;
std::unique_ptr<sal_uInt8[]> pBuffer;
@@ -470,7 +471,7 @@ RegError ORegKey::setUnicodeListValue(const OUString& valueName, sal_Unicode** p
return RegError::REGISTRY_READONLY;
}
- OUString sImplValueName = VALUE_PREFIX + valueName;
+ OUString sImplValueName = OUString::Concat(VALUE_PREFIX) + valueName;
REG_GUARD(m_pRegistry->m_mutex);
@@ -524,7 +525,7 @@ RegError ORegKey::setUnicodeListValue(const OUString& valueName, sal_Unicode** p
// getValue
-RegError ORegKey::getValue(const OUString& valueName, RegValue value) const
+RegError ORegKey::getValue(std::u16string_view valueName, RegValue value) const
{
OStoreStream rValue;
std::unique_ptr<sal_uInt8[]> pBuffer;
@@ -537,7 +538,7 @@ RegError ORegKey::getValue(const OUString& valueName, RegValue value) const
accessMode = storeAccessMode::ReadOnly;
}
- OUString sImplValueName = VALUE_PREFIX + valueName;
+ OUString sImplValueName = OUString::Concat(VALUE_PREFIX) + valueName;
REG_GUARD(m_pRegistry->m_mutex);
@@ -609,7 +610,7 @@ RegError ORegKey::getValue(const OUString& valueName, RegValue value) const
// getLongListValue
-RegError ORegKey::getLongListValue(const OUString& valueName, sal_Int32** pValueList, sal_uInt32* pLen) const
+RegError ORegKey::getLongListValue(std::u16string_view valueName, sal_Int32** pValueList, sal_uInt32* pLen) const
{
OStoreStream rValue;
std::unique_ptr<sal_uInt8[]> pBuffer;
@@ -622,7 +623,7 @@ RegError ORegKey::getLongListValue(const OUString& valueName, sal_Int32** pValue
accessMode = storeAccessMode::ReadOnly;
}
- OUString sImplValueName = VALUE_PREFIX + valueName;
+ OUString sImplValueName = OUString::Concat(VALUE_PREFIX) + valueName;
REG_GUARD(m_pRegistry->m_mutex);
@@ -712,7 +713,7 @@ RegError ORegKey::getLongListValue(const OUString& valueName, sal_Int32** pValue
// getStringListValue
-RegError ORegKey::getStringListValue(const OUString& valueName, char*** pValueList, sal_uInt32* pLen) const
+RegError ORegKey::getStringListValue(std::u16string_view valueName, char*** pValueList, sal_uInt32* pLen) const
{
OStoreStream rValue;
std::unique_ptr<sal_uInt8[]> pBuffer;
@@ -725,7 +726,7 @@ RegError ORegKey::getStringListValue(const OUString& valueName, char*** pValueLi
accessMode = storeAccessMode::ReadOnly;
}
- OUString sImplValueName = VALUE_PREFIX + valueName;
+ OUString sImplValueName = OUString::Concat(VALUE_PREFIX) + valueName;
REG_GUARD(m_pRegistry->m_mutex);
@@ -809,7 +810,7 @@ RegError ORegKey::getStringListValue(const OUString& valueName, char*** pValueLi
// getUnicodeListValue
-RegError ORegKey::getUnicodeListValue(const OUString& valueName, sal_Unicode*** pValueList, sal_uInt32* pLen) const
+RegError ORegKey::getUnicodeListValue(std::u16string_view valueName, sal_Unicode*** pValueList, sal_uInt32* pLen) const
{
OStoreStream rValue;
std::unique_ptr<sal_uInt8[]> pBuffer;
@@ -822,7 +823,7 @@ RegError ORegKey::getUnicodeListValue(const OUString& valueName, sal_Unicode***
accessMode = storeAccessMode::ReadOnly;
}
- OUString sImplValueName = VALUE_PREFIX + valueName;
+ OUString sImplValueName = OUString::Concat(VALUE_PREFIX) + valueName;
REG_GUARD(m_pRegistry->m_mutex);
diff --git a/registry/source/keyimpl.hxx b/registry/source/keyimpl.hxx
index 3233bcad860a..17b7023dce75 100644
--- a/registry/source/keyimpl.hxx
+++ b/registry/source/keyimpl.hxx
@@ -20,6 +20,10 @@
#ifndef INCLUDED_REGISTRY_SOURCE_KEYIMPL_HXX
#define INCLUDED_REGISTRY_SOURCE_KEYIMPL_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include "regimpl.hxx"
#include <rtl/ustring.hxx>
@@ -54,38 +58,38 @@ public:
RegError deleteKey(const OUString& keyName);
- RegError getValueInfo(const OUString& valueName,
+ RegError getValueInfo(std::u16string_view valueName,
RegValueType* pValueTye,
sal_uInt32* pValueSize) const;
- RegError setValue(const OUString& valueName,
+ RegError setValue(std::u16string_view valueName,
RegValueType vType,
RegValue value,
sal_uInt32 vSize);
- RegError setLongListValue(const OUString& valueName,
+ RegError setLongListValue(std::u16string_view valueName,
sal_Int32 const * pValueList,
sal_uInt32 len);
- RegError setStringListValue(const OUString& valueName,
+ RegError setStringListValue(std::u16string_view valueName,
char** pValueList,
sal_uInt32 len);
- RegError setUnicodeListValue(const OUString& valueName,
+ RegError setUnicodeListValue(std::u16string_view valueName,
sal_Unicode** pValueList,
sal_uInt32 len);
- RegError getValue(const OUString& valueName, RegValue value) const;
+ RegError getValue(std::u16string_view valueName, RegValue value) const;
- RegError getLongListValue(const OUString& valueName,
+ RegError getLongListValue(std::u16string_view valueName,
sal_Int32** pValueList,
sal_uInt32* pLen) const;
- RegError getStringListValue(const OUString& valueName,
+ RegError getStringListValue(std::u16string_view valueName,
char*** pValueList,
sal_uInt32* pLen) const;
- RegError getUnicodeListValue(const OUString& valueName,
+ RegError getUnicodeListValue(std::u16string_view valueName,
sal_Unicode*** pValueList,
sal_uInt32* pLen) const;
diff --git a/reportdesign/qa/unit/reportdesign-dialogs-test.cxx b/reportdesign/qa/unit/reportdesign-dialogs-test.cxx
index 30e421409c41..0f3295ea602f 100644
--- a/reportdesign/qa/unit/reportdesign-dialogs-test.cxx
+++ b/reportdesign/qa/unit/reportdesign-dialogs-test.cxx
@@ -51,7 +51,7 @@ VclPtr<VclAbstractDialog> ReportdesignDialogsTest::createDialogByID(sal_uInt32 /
void ReportdesignDialogsTest::openAnyDialog()
{
/// process input file containing the UXMLDescriptions of the dialogs to dump
- processDialogBatchFile("reportdesign/qa/unit/data/reportdesign-dialogs-test.txt");
+ processDialogBatchFile(u"reportdesign/qa/unit/data/reportdesign-dialogs-test.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(ReportdesignDialogsTest);
diff --git a/reportdesign/source/ui/inc/GeometryHandler.hxx b/reportdesign/source/ui/inc/GeometryHandler.hxx
index bd6b6e24c861..e5852694600d 100644
--- a/reportdesign/source/ui/inc/GeometryHandler.hxx
+++ b/reportdesign/source/ui/inc/GeometryHandler.hxx
@@ -35,6 +35,8 @@
#include <com/sun/star/sdbc/XRowSet.hpp>
#include <map>
#include <memory>
+#include <string_view>
+
#include <comphelper/stl_types.hxx>
#include <comphelper/listenernotification.hxx>
@@ -218,7 +220,7 @@ namespace rptui
* \param _sFunction The name of the function.
* \param _sDataField The name of the data field.
*/
- void createDefaultFunction(::osl::ResettableMutexGuard& _aGuard ,const OUString& _sFunction,const OUString& _sDataField);
+ void createDefaultFunction(::osl::ResettableMutexGuard& _aGuard ,const OUString& _sFunction,std::u16string_view _sDataField);
void removeFunction();
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index b5b78e02f74e..52a2d46320e4 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -100,9 +100,9 @@ using namespace ::com::sun::star;
namespace{
-OUString lcl_getQuotedFunctionName(const OUString& _sFunction)
+OUString lcl_getQuotedFunctionName(std::u16string_view _sFunction)
{
- return "[" + _sFunction + "]";
+ return OUString::Concat("[") + _sFunction + "]";
}
OUString lcl_getQuotedFunctionName(const uno::Reference< report::XFunction>& _xFunction)
@@ -1914,7 +1914,7 @@ void GeometryHandler::loadDefaultFunctions()
m_aDefaultFunctions.push_back(aDefault);
}
-void GeometryHandler::createDefaultFunction(::osl::ResettableMutexGuard& _aGuard ,const OUString& _sFunction,const OUString& _sDataField)
+void GeometryHandler::createDefaultFunction(::osl::ResettableMutexGuard& _aGuard ,const OUString& _sFunction,std::u16string_view _sDataField)
{
try
{
diff --git a/sax/qa/cppunit/xmlimport.cxx b/sax/qa/cppunit/xmlimport.cxx
index 9d7832b8c4b6..459dcd09bd27 100644
--- a/sax/qa/cppunit/xmlimport.cxx
+++ b/sax/qa/cppunit/xmlimport.cxx
@@ -373,7 +373,7 @@ void XMLImportTest::setUp()
}
xInit->initialize( namespaceArgs );
- m_sDirPath = m_directories.getPathFromSrc( "/sax/qa/data/" );
+ m_sDirPath = m_directories.getPathFromSrc( u"/sax/qa/data/" );
}
void XMLImportTest::parse()
diff --git a/sax/source/expatwrap/sax_expat.cxx b/sax/source/expatwrap/sax_expat.cxx
index b23bf2f9f1f1..885d9757dc43 100644
--- a/sax/source/expatwrap/sax_expat.cxx
+++ b/sax/source/expatwrap/sax_expat.cxx
@@ -21,6 +21,7 @@
#include <cassert>
#include <memory>
#include <utility>
+#include <string_view>
#include <vector>
@@ -540,7 +541,7 @@ css::uno::Sequence< OUString > SaxExpatParser::getSupportedServiceNames()
*
*
*-------------------------------------------*/
-OUString getErrorMessage( XML_Error xmlE, const OUString& sSystemId , sal_Int32 nLine )
+OUString getErrorMessage( XML_Error xmlE, std::u16string_view sSystemId , sal_Int32 nLine )
{
OUString Message;
if( XML_ERROR_NONE == xmlE ) {
@@ -613,7 +614,7 @@ OUString getErrorMessage( XML_Error xmlE, const OUString& sSystemId , sal_Int32
Message = "not standalone";
}
- OUString str = "[" +
+ OUString str = OUString::Concat("[") +
sSystemId +
" line " +
OUString::number( nLine ) +
diff --git a/sc/inc/addincol.hxx b/sc/inc/addincol.hxx
index 9ef43a033ae0..d36396a1f29b 100644
--- a/sc/inc/addincol.hxx
+++ b/sc/inc/addincol.hxx
@@ -32,6 +32,7 @@
#include "types.hxx"
+#include <string_view>
#include <vector>
#include <unordered_map>
@@ -146,7 +147,7 @@ private:
void ReadConfiguration();
void ReadFromAddIn( const css::uno::Reference< css::uno::XInterface>& xInterface );
void UpdateFromAddIn( const css::uno::Reference< css::uno::XInterface>& xInterface,
- const OUString& rServiceName );
+ std::u16string_view rServiceName );
void LoadComponent( const ScUnoAddInFuncData& rFuncData );
public:
diff --git a/sc/inc/calcconfig.hxx b/sc/inc/calcconfig.hxx
index 9781aa7414fc..00c49d66ffee 100644
--- a/sc/inc/calcconfig.hxx
+++ b/sc/inc/calcconfig.hxx
@@ -13,6 +13,7 @@
#include "scdllapi.h"
#include <memory>
+#include <string_view>
#include <o3tl/sorted_vector.hxx>
#include <formula/grammar.hxx>
@@ -81,7 +82,7 @@ struct SC_DLLPUBLIC ScCalcConfig
};
OUString ScOpCodeSetToSymbolicString(const ScCalcConfig::OpCodeSet& rOpCodes);
-ScCalcConfig::OpCodeSet ScStringToOpCodeSet(const OUString& rOpCodes);
+ScCalcConfig::OpCodeSet ScStringToOpCodeSet(std::u16string_view rOpCodes);
#endif
diff --git a/sc/inc/chartlis.hxx b/sc/inc/chartlis.hxx
index f6baf78bc124..c5a882b40a4a 100644
--- a/sc/inc/chartlis.hxx
+++ b/sc/inc/chartlis.hxx
@@ -27,6 +27,7 @@
#include <memory>
#include <map>
+#include <string_view>
#include <unordered_map>
#include <unordered_set>
#include <vector>
@@ -169,7 +170,7 @@ public:
* Create a unique name that's not taken by any existing chart listener
* objects. The name consists of a prefix given followed by a number.
*/
- OUString getUniqueName(const OUString& rPrefix) const;
+ OUString getUniqueName(std::u16string_view rPrefix) const;
void ChangeListening( const OUString& rName,
const ScRangeListRef& rRangeListRef );
diff --git a/sc/inc/dpdimsave.hxx b/sc/inc/dpdimsave.hxx
index 20642f57bcab..a22342ed893a 100644
--- a/sc/inc/dpdimsave.hxx
+++ b/sc/inc/dpdimsave.hxx
@@ -24,6 +24,8 @@
#include <vector>
#include <map>
+#include <string_view>
+
#include "dpitemdata.hxx"
#include "dpnumgroupinfo.hxx"
#include "scdllapi.h"
@@ -109,7 +111,7 @@ public:
sal_Int32 GetDatePart() const { return nDatePart; }
const ScDPNumGroupInfo& GetDateInfo() const { return aDateInfo; }
- OUString CreateGroupName( const OUString& rPrefix );
+ OUString CreateGroupName( std::u16string_view rPrefix );
const ScDPSaveGroupItem* GetNamedGroup( const OUString& rGroupName ) const;
ScDPSaveGroupItem* GetNamedGroupAcc( const OUString& rGroupName );
void RemoveFromGroups( const OUString& rItemName );
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index f6b4e83842e7..6e0836fe8342 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -36,6 +36,7 @@
#undef bool
#include <memory>
+#include <string_view>
namespace com::sun::star::uno { template <typename > class Reference; }
@@ -568,8 +569,8 @@ public:
static bool ShouldOpenURL();
SC_DLLPUBLIC static OUString GetAbsDocName( const OUString& rFileName,
const SfxObjectShell* pShell );
- SC_DLLPUBLIC static OUString GetDocTabName( const OUString& rFileName,
- const OUString& rTabName );
+ SC_DLLPUBLIC static OUString GetDocTabName( std::u16string_view rFileName,
+ std::u16string_view rTabName );
SC_DLLPUBLIC static sal_uInt32 GetStandardFormat( SvNumberFormatter&, sal_uInt32 nFormat, SvNumFormatType nType );
SC_DLLPUBLIC static sal_uInt16 GetStandardRowHeight();
diff --git a/sc/inc/unitconv.hxx b/sc/inc/unitconv.hxx
index d16ee89391e1..fe301b32f14d 100644
--- a/sc/inc/unitconv.hxx
+++ b/sc/inc/unitconv.hxx
@@ -23,6 +23,7 @@
#include <rtl/ustring.hxx>
#include <map>
+#include <string_view>
class ScUnitConverterData
{
@@ -30,14 +31,14 @@ class ScUnitConverterData
double mfValue;
public:
- ScUnitConverterData(const OUString& rFromUnit, const OUString& rToUnit, double fValue);
+ ScUnitConverterData(std::u16string_view rFromUnit, std::u16string_view rToUnit, double fValue);
ScUnitConverterData(const ScUnitConverterData&) = default;
ScUnitConverterData& operator=(const ScUnitConverterData&) = delete;
double GetValue() const { return mfValue; }
const OUString& GetIndexString() const { return maIndexString; }
- static OUString BuildIndexString(const OUString& rFromUnit, const OUString& rToUnit);
+ static OUString BuildIndexString(std::u16string_view rFromUnit, std::u16string_view rToUnit);
};
class ScUnitConverter
@@ -51,7 +52,7 @@ public:
const ScUnitConverter& operator=(const ScUnitConverter&) = delete;
~ScUnitConverter();
- bool GetValue(double& fValue, const OUString& rFromUnit, const OUString& rToUnit) const;
+ bool GetValue(double& fValue, std::u16string_view rFromUnit, std::u16string_view rToUnit) const;
};
#endif
diff --git a/sc/qa/extras/anchor.cxx b/sc/qa/extras/anchor.cxx
index 5e96425627b7..6fb801a6c6f5 100644
--- a/sc/qa/extras/anchor.cxx
+++ b/sc/qa/extras/anchor.cxx
@@ -65,7 +65,7 @@ ScAnchorTest::ScAnchorTest()
void ScAnchorTest::testUndoAnchor()
{
OUString aFileURL;
- createFileURL("document_with_linked_graphic.ods", aFileURL);
+ createFileURL(u"document_with_linked_graphic.ods", aFileURL);
// open the document with graphic included
uno::Reference<css::lang::XComponent> xComponent = loadFromDesktop(aFileURL);
CPPUNIT_ASSERT(xComponent.is());
@@ -197,7 +197,7 @@ void ScAnchorTest::testTdf76183()
void ScAnchorTest::testODFAnchorTypes()
{
OUString aFileURL;
- createFileURL("3AnchorTypes.ods", aFileURL);
+ createFileURL(u"3AnchorTypes.ods", aFileURL);
// open the document with graphic included
uno::Reference<css::lang::XComponent> xComponent = loadFromDesktop(aFileURL);
CPPUNIT_ASSERT(xComponent.is());
@@ -242,7 +242,7 @@ void ScAnchorTest::testODFAnchorTypes()
void ScAnchorTest::testCopyColumnWithImages()
{
OUString aFileURL;
- createFileURL("3AnchorTypes.ods", aFileURL);
+ createFileURL(u"3AnchorTypes.ods", aFileURL);
// open the document with graphic included
uno::Reference<css::lang::XComponent> xComponent = loadFromDesktop(aFileURL);
CPPUNIT_ASSERT(xComponent.is());
@@ -314,7 +314,7 @@ void ScAnchorTest::testCopyColumnWithImages()
void ScAnchorTest::testCutWithImages()
{
OUString aFileURL;
- createFileURL("3AnchorTypes.ods", aFileURL);
+ createFileURL(u"3AnchorTypes.ods", aFileURL);
// open the document with graphic included
uno::Reference<css::lang::XComponent> xComponent = loadFromDesktop(aFileURL);
CPPUNIT_ASSERT(xComponent.is());
@@ -373,7 +373,7 @@ void ScAnchorTest::testCutWithImages()
void ScAnchorTest::testTdf121963()
{
OUString aFileURL;
- createFileURL("tdf121963.ods", aFileURL);
+ createFileURL(u"tdf121963.ods", aFileURL);
uno::Reference<css::lang::XComponent> xComponent = loadFromDesktop(aFileURL);
CPPUNIT_ASSERT(xComponent.is());
@@ -387,7 +387,7 @@ void ScAnchorTest::testTdf121963()
void ScAnchorTest::testTdf129552()
{
OUString aFileURL;
- createFileURL("tdf129552.fods", aFileURL);
+ createFileURL(u"tdf129552.fods", aFileURL);
uno::Reference<css::lang::XComponent> xComponent = loadFromDesktop(aFileURL);
CPPUNIT_ASSERT(xComponent.is());
@@ -401,7 +401,7 @@ void ScAnchorTest::testTdf129552()
void ScAnchorTest::testTdf130556()
{
OUString aFileURL;
- createFileURL("tdf130556.ods", aFileURL);
+ createFileURL(u"tdf130556.ods", aFileURL);
uno::Reference<css::lang::XComponent> xComponent = loadFromDesktop(aFileURL);
CPPUNIT_ASSERT(xComponent.is());
@@ -415,7 +415,7 @@ void ScAnchorTest::testTdf130556()
void ScAnchorTest::testTdf134161()
{
OUString aFileURL;
- createFileURL("tdf134161.ods", aFileURL);
+ createFileURL(u"tdf134161.ods", aFileURL);
uno::Reference<css::lang::XComponent> xComponent = loadFromDesktop(aFileURL);
CPPUNIT_ASSERT(xComponent.is());
diff --git a/sc/qa/extras/htmlexporttest.cxx b/sc/qa/extras/htmlexporttest.cxx
index d7bbb7038fa4..a27e3ac6d319 100644
--- a/sc/qa/extras/htmlexporttest.cxx
+++ b/sc/qa/extras/htmlexporttest.cxx
@@ -9,6 +9,8 @@
#include <sal/config.h>
+#include <string_view>
+
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/lang/XComponent.hpp>
@@ -31,7 +33,7 @@ class ScHTMLExportTest : public test::BootstrapFixture, public unotest::MacrosTe
Reference<XComponent> mxComponent;
OUString maFilterOptions;
- void load(const OUString& pDir, const char* pName)
+ void load(std::u16string_view pDir, const char* pName)
{
if (mxComponent.is())
mxComponent->dispose();
@@ -75,7 +77,7 @@ public:
htmlDocUniquePtr pDoc;
- load("/sc/qa/extras/testdocuments/", "BaseForHTMLExport.ods");
+ load(u"/sc/qa/extras/testdocuments/", "BaseForHTMLExport.ods");
save("HTML (StarCalc)", aTempFile);
pDoc = parseHtml(aTempFile);
CPPUNIT_ASSERT (pDoc);
@@ -83,7 +85,7 @@ public:
assertXPath(pDoc, "/html/body", 1);
assertXPath(pDoc, "/html/body/table/tr/td/img", 1);
- load("/sc/qa/extras/testdocuments/", "BaseForHTMLExport.ods");
+ load(u"/sc/qa/extras/testdocuments/", "BaseForHTMLExport.ods");
maFilterOptions = "SkipImages";
save("HTML (StarCalc)", aTempFile);
diff --git a/sc/qa/extras/macros-test.cxx b/sc/qa/extras/macros-test.cxx
index 2970a587ecc5..b5a48353b4e4 100644
--- a/sc/qa/extras/macros-test.cxx
+++ b/sc/qa/extras/macros-test.cxx
@@ -99,7 +99,7 @@ void ScMacrosTest::saveAndReload(css::uno::Reference<css::lang::XComponent>& xCo
void ScMacrosTest::testMSP()
{
OUString aFileName;
- createFileURL("MasterScriptProviderProblem.ods", aFileName);
+ createFileURL(u"MasterScriptProviderProblem.ods", aFileName);
uno::Reference< css::lang::XComponent > xComponent = loadFromDesktop(aFileName, "com.sun.star.sheet.SpreadsheetDocument");
CPPUNIT_ASSERT_MESSAGE("Failed to load MasterScriptProviderProblem.ods", xComponent.is());
@@ -130,7 +130,7 @@ void ScMacrosTest::testMSP()
void ScMacrosTest::testPasswordProtectedStarBasic()
{
OUString aFileName;
- createFileURL("testTypePassword.ods", aFileName);
+ createFileURL(u"testTypePassword.ods", aFileName);
uno::Reference< css::lang::XComponent > xComponent = loadFromDesktop(aFileName, "com.sun.star.sheet.SpreadsheetDocument");
CPPUNIT_ASSERT_MESSAGE("Failed to load testTypePassword.ods", xComponent.is());
@@ -184,7 +184,7 @@ void ScMacrosTest::testPasswordProtectedStarBasic()
void ScMacrosTest::testStarBasic()
{
OUString aFileName;
- createFileURL("StarBasic.ods", aFileName);
+ createFileURL(u"StarBasic.ods", aFileName);
uno::Reference< css::lang::XComponent > xComponent = loadFromDesktop(aFileName, "com.sun.star.sheet.SpreadsheetDocument");
CPPUNIT_ASSERT_MESSAGE("Failed to load StarBasic.ods", xComponent.is());
@@ -332,7 +332,7 @@ void ScMacrosTest::testVba()
for (const auto& rTestInfo : testInfo)
{
OUString aFileName;
- createFileURL(rTestInfo.sFileBaseName + "xls", aFileName);
+ createFileURL(OUString(rTestInfo.sFileBaseName + "xls"), aFileName);
uno::Reference< css::lang::XComponent > xComponent = loadFromDesktop(aFileName, "com.sun.star.sheet.SpreadsheetDocument");
OUString sMsg( "Failed to load " + aFileName );
CPPUNIT_ASSERT_MESSAGE( OUStringToOString( sMsg, RTL_TEXTENCODING_UTF8 ).getStr(), xComponent.is() );
@@ -384,7 +384,7 @@ void ScMacrosTest::testVba()
void ScMacrosTest::testTdf107885()
{
OUString aFileName;
- createFileURL("tdf107885.xlsm", aFileName);
+ createFileURL(u"tdf107885.xlsm", aFileName);
uno::Reference< css::lang::XComponent > xComponent = loadFromDesktop(aFileName, "com.sun.star.sheet.SpreadsheetDocument");
CPPUNIT_ASSERT_MESSAGE("Failed to load the doc", xComponent.is());
@@ -434,7 +434,7 @@ void ScMacrosTest::testTdf107885()
void ScMacrosTest::testRowColumn()
{
OUString aFileName;
- createFileURL("StarBasic.ods", aFileName);
+ createFileURL(u"StarBasic.ods", aFileName);
uno::Reference< css::lang::XComponent > xComponent = loadFromDesktop(aFileName, "com.sun.star.sheet.SpreadsheetDocument");
CPPUNIT_ASSERT_MESSAGE("Failed to load StarBasic.ods", xComponent.is());
@@ -471,7 +471,7 @@ void ScMacrosTest::testRowColumn()
void ScMacrosTest::testTdf131562()
{
OUString aFileName;
- createFileURL("tdf131562.xlsm", aFileName);
+ createFileURL(u"tdf131562.xlsm", aFileName);
uno::Reference< css::lang::XComponent > xComponent = loadFromDesktop(aFileName, "com.sun.star.sheet.SpreadsheetDocument");
CPPUNIT_ASSERT_MESSAGE("Failed to load the doc", xComponent.is());
@@ -510,7 +510,7 @@ void ScMacrosTest::testPasswordProtectedUnicodeString()
const OUString sLibName("Protected");
OUString aFileName;
- createFileURL("tdf57113.ods", aFileName);
+ createFileURL(u"tdf57113.ods", aFileName);
auto xComponent = loadFromDesktop(aFileName, "com.sun.star.sheet.SpreadsheetDocument");
CPPUNIT_ASSERT(xComponent);
@@ -569,7 +569,7 @@ void ScMacrosTest::testPasswordProtectedArrayInUserType()
const OUString sLibName("Protected");
OUString aFileName;
- createFileURL("ProtectedArrayInCustomType.ods", aFileName);
+ createFileURL(u"ProtectedArrayInCustomType.ods", aFileName);
auto xComponent = loadFromDesktop(aFileName, "com.sun.star.sheet.SpreadsheetDocument");
CPPUNIT_ASSERT(xComponent);
@@ -624,7 +624,7 @@ void ScMacrosTest::testPasswordProtectedArrayInUserType()
void ScMacrosTest::testTdf114427()
{
OUString aFileName;
- createFileURL("tdf114427.ods", aFileName);
+ createFileURL(u"tdf114427.ods", aFileName);
uno::Reference< css::lang::XComponent > xComponent = loadFromDesktop(aFileName, "com.sun.star.sheet.SpreadsheetDocument");
CPPUNIT_ASSERT_MESSAGE("Failed to load the doc", xComponent.is());
@@ -660,7 +660,7 @@ void ScMacrosTest::testTdf114427()
void ScMacrosTest::testTdf107902()
{
OUString aFileName;
- createFileURL("tdf107902.xlsm", aFileName);
+ createFileURL(u"tdf107902.xlsm", aFileName);
uno::Reference< css::lang::XComponent > xComponent = loadFromDesktop(aFileName, "com.sun.star.sheet.SpreadsheetDocument");
CPPUNIT_ASSERT_MESSAGE("Failed to load the doc", xComponent.is());
@@ -711,7 +711,7 @@ void ScMacrosTest::testTdf131296_legacy()
});
OUString aFileName;
- createFileURL("tdf131296_legacy.ods", aFileName);
+ createFileURL(u"tdf131296_legacy.ods", aFileName);
auto xComponent = loadFromDesktop(aFileName, "com.sun.star.sheet.SpreadsheetDocument");
CPPUNIT_ASSERT(xComponent);
@@ -751,7 +751,7 @@ void ScMacrosTest::testTdf131296_new()
});
OUString aFileName;
- createFileURL("tdf131296_new.ods", aFileName);
+ createFileURL(u"tdf131296_new.ods", aFileName);
auto xComponent = loadFromDesktop(aFileName, "com.sun.star.sheet.SpreadsheetDocument");
CPPUNIT_ASSERT(xComponent);
@@ -781,7 +781,7 @@ void ScMacrosTest::testTdf131296_new()
void ScMacrosTest::testTdf128218()
{
OUString aFileName;
- createFileURL("tdf128218.ods", aFileName);
+ createFileURL(u"tdf128218.ods", aFileName);
uno::Reference< css::lang::XComponent > xComponent = loadFromDesktop(aFileName, "com.sun.star.sheet.SpreadsheetDocument");
CPPUNIT_ASSERT_MESSAGE("Failed to load the doc", xComponent.is());
@@ -843,7 +843,7 @@ void ScMacrosTest::testTdf71271()
void ScMacrosTest::testTdf43003()
{
OUString aFileName;
- createFileURL("tdf43003.ods", aFileName);
+ createFileURL(u"tdf43003.ods", aFileName);
auto xComponent = loadFromDesktop(aFileName, "com.sun.star.sheet.SpreadsheetDocument");
CPPUNIT_ASSERT(xComponent);
diff --git a/sc/qa/extras/new_cond_format.cxx b/sc/qa/extras/new_cond_format.cxx
index caebb4b4a3db..817b4c6c9eab 100644
--- a/sc/qa/extras/new_cond_format.cxx
+++ b/sc/qa/extras/new_cond_format.cxx
@@ -445,7 +445,7 @@ void ScConditionalFormatTest::setUp()
CalcUnoApiTest::setUp();
// get the test file
OUString aFileURL;
- createFileURL("new_cond_format_api.ods", aFileURL);
+ createFileURL(u"new_cond_format_api.ods", aFileURL);
mxComponent = loadFromDesktop(aFileURL);
}
diff --git a/sc/qa/extras/recordchanges-test.cxx b/sc/qa/extras/recordchanges-test.cxx
index 709a80238af6..9eb0e6ffbcae 100644
--- a/sc/qa/extras/recordchanges-test.cxx
+++ b/sc/qa/extras/recordchanges-test.cxx
@@ -65,7 +65,7 @@ void ScRecordChangesTest::testCheckRecordChangesProtection()
{
// test with protected changes
OUString aFileName;
- createFileURL("RecordChangesProtected.ods", aFileName);
+ createFileURL(u"RecordChangesProtected.ods", aFileName);
uno::Reference<css::lang::XComponent> xComponent = loadFromDesktop(aFileName);
uno::Reference<sheet::XSpreadsheetDocument> xDoc(xComponent, UNO_QUERY_THROW);
diff --git a/sc/qa/extras/scannotationobj.cxx b/sc/qa/extras/scannotationobj.cxx
index a8ee3ecfe29b..0e849f5edc3b 100644
--- a/sc/qa/extras/scannotationobj.cxx
+++ b/sc/qa/extras/scannotationobj.cxx
@@ -128,7 +128,7 @@ void ScAnnontationObj::setUp()
// get the test file
OUString aFileURL;
- createFileURL("ScAnnotationObj.ods", aFileURL);
+ createFileURL(u"ScAnnotationObj.ods", aFileURL);
mxComponent = loadFromDesktop(aFileURL);
}
diff --git a/sc/qa/extras/scannotationsobj.cxx b/sc/qa/extras/scannotationsobj.cxx
index aba02c32f060..4e993977200a 100644
--- a/sc/qa/extras/scannotationsobj.cxx
+++ b/sc/qa/extras/scannotationsobj.cxx
@@ -105,7 +105,7 @@ void ScAnnontationsObj::setUp()
// get the test file
OUString aFileURL;
- createFileURL("ScAnnotationObj.ods", aFileURL);
+ createFileURL(u"ScAnnotationObj.ods", aFileURL);
mxComponent = loadFromDesktop(aFileURL);
}
diff --git a/sc/qa/extras/scarealinkobj.cxx b/sc/qa/extras/scarealinkobj.cxx
index ccde1b55079f..d28161f140bf 100644
--- a/sc/qa/extras/scarealinkobj.cxx
+++ b/sc/qa/extras/scarealinkobj.cxx
@@ -73,7 +73,7 @@ private:
ScAreaLinkObj::ScAreaLinkObj()
: CalcUnoApiTest("/sc/qa/extras/testdocuments")
- , CellAreaLink(m_directories.getURLFromSrc("/sc/qa/extras/testdocuments/scarealinkobj.ods"))
+ , CellAreaLink(m_directories.getURLFromSrc(u"/sc/qa/extras/testdocuments/scarealinkobj.ods"))
{
}
@@ -87,7 +87,7 @@ uno::Reference<uno::XInterface> ScAreaLinkObj::init()
table::CellAddress aCellAddress(1, 2, 3);
xLinks->insertAtPosition(
- aCellAddress, m_directories.getURLFromSrc("/sc/qa/extras/testdocuments/scarealinkobj.ods"),
+ aCellAddress, m_directories.getURLFromSrc(u"/sc/qa/extras/testdocuments/scarealinkobj.ods"),
"a2:b5", "", "");
uno::Reference<sheet::XAreaLink> xLink(xLinks->getByIndex(0), uno::UNO_QUERY_THROW);
diff --git a/sc/qa/extras/sccellcursorobj.cxx b/sc/qa/extras/sccellcursorobj.cxx
index 9402c8cb2780..f0092c707d67 100644
--- a/sc/qa/extras/sccellcursorobj.cxx
+++ b/sc/qa/extras/sccellcursorobj.cxx
@@ -207,7 +207,7 @@ void ScCellCursorObj::setUp()
CalcUnoApiTest::setUp();
OUString aFileURL;
- createFileURL("ScCellCursorObj.ods", aFileURL);
+ createFileURL(u"ScCellCursorObj.ods", aFileURL);
mxComponent = loadFromDesktop(aFileURL, "com.sun.star.sheet.SpreadsheetDocument");
}
diff --git a/sc/qa/extras/sccellrangeobj.cxx b/sc/qa/extras/sccellrangeobj.cxx
index 689783dafcbd..6be41e688461 100644
--- a/sc/qa/extras/sccellrangeobj.cxx
+++ b/sc/qa/extras/sccellrangeobj.cxx
@@ -249,7 +249,7 @@ void ScCellRangeObj::setUp()
CalcUnoApiTest::setUp();
OUString aFileURL;
- createFileURL("xcellrangesquery.ods", aFileURL);
+ createFileURL(u"xcellrangesquery.ods", aFileURL);
mxComponent = loadFromDesktop(aFileURL, "com.sun.star.sheet.SpreadsheetDocument");
}
diff --git a/sc/qa/extras/scdatabaserangeobj.cxx b/sc/qa/extras/scdatabaserangeobj.cxx
index d7ffdf80c3bf..246ac3680bdb 100644
--- a/sc/qa/extras/scdatabaserangeobj.cxx
+++ b/sc/qa/extras/scdatabaserangeobj.cxx
@@ -101,7 +101,7 @@ void ScDatabaseRangeObj::setUp()
CalcUnoApiTest::setUp();
OUString aFileURL;
- createFileURL("ScDatabaseRangeObj.ods", aFileURL);
+ createFileURL(u"ScDatabaseRangeObj.ods", aFileURL);
mxComponent = loadFromDesktop(aFileURL, "com.sun.star.sheet.SpreadsheetDocument");
}
diff --git a/sc/qa/extras/scdatapilotfieldobj.cxx b/sc/qa/extras/scdatapilotfieldobj.cxx
index 89ad71daeb18..969f07b2b9b6 100644
--- a/sc/qa/extras/scdatapilotfieldobj.cxx
+++ b/sc/qa/extras/scdatapilotfieldobj.cxx
@@ -115,7 +115,7 @@ void ScDataPilotFieldObj::setUp()
CalcUnoApiTest::setUp();
OUString aFileURL;
- createFileURL("scdatapilotfieldobj.ods", aFileURL);
+ createFileURL(u"scdatapilotfieldobj.ods", aFileURL);
mxComponent = loadFromDesktop(aFileURL, "com.sun.star.sheet.SpreadsheetDocument");
}
diff --git a/sc/qa/extras/scdatapilottableobj.cxx b/sc/qa/extras/scdatapilottableobj.cxx
index b9896862fa73..4963c05d70f4 100644
--- a/sc/qa/extras/scdatapilottableobj.cxx
+++ b/sc/qa/extras/scdatapilottableobj.cxx
@@ -136,7 +136,7 @@ void ScDataPilotTableObj::setUp()
CalcUnoApiTest::setUp();
// create a calc document
OUString aFileURL;
- createFileURL("ScDataPilotTableObj.ods", aFileURL);
+ createFileURL(u"ScDataPilotTableObj.ods", aFileURL);
mxComponent = loadFromDesktop(aFileURL, "com.sun.star.sheet.SpreadsheetDocument");
}
diff --git a/sc/qa/extras/scddelinkobj.cxx b/sc/qa/extras/scddelinkobj.cxx
index 70726260d85b..14273198ff49 100644
--- a/sc/qa/extras/scddelinkobj.cxx
+++ b/sc/qa/extras/scddelinkobj.cxx
@@ -93,7 +93,7 @@ private:
ScDDELinkObj::ScDDELinkObj()
: CalcUnoApiTest("/sc/qa/extras/testdocuments")
- , TempFileBase(m_directories.getURLFromSrc("/sc/qa/unoapi/testdocuments/ScDDELinksObj.ods"))
+ , TempFileBase(m_directories.getURLFromSrc(u"/sc/qa/unoapi/testdocuments/ScDDELinksObj.ods"))
, XDDELink(m_TempFile.GetURL())
, XNamed("soffice|" + m_TempFile.GetURL() + "!Sheet1.A1")
{
diff --git a/sc/qa/extras/scddelinksobj.cxx b/sc/qa/extras/scddelinksobj.cxx
index a8bd6aff8775..d546c47dd440 100644
--- a/sc/qa/extras/scddelinksobj.cxx
+++ b/sc/qa/extras/scddelinksobj.cxx
@@ -85,11 +85,11 @@ private:
ScDDELinksObj::ScDDELinksObj()
: CalcUnoApiTest("/sc/qa/extras/testdocuments")
- , XDDELinks(m_directories.getURLFromSrc("/sc/qa/unoapi/testdocuments/ScDDELinksObj.ods"))
+ , XDDELinks(m_directories.getURLFromSrc(u"/sc/qa/unoapi/testdocuments/ScDDELinksObj.ods"))
, XElementAccess(cppu::UnoType<sheet::XDDELink>::get())
, XIndexAccess(1)
, XNameAccess("soffice|"
- + m_directories.getURLFromSrc("/sc/qa/unoapi/testdocuments/ScDDELinksObj.ods")
+ + m_directories.getURLFromSrc(u"/sc/qa/unoapi/testdocuments/ScDDELinksObj.ods")
+ "!Sheet1.A1")
, XServiceInfo("ScDDELinksObj", "com.sun.star.sheet.DDELinks")
{
@@ -104,7 +104,7 @@ uno::Reference<uno::XInterface> ScDDELinksObj::init()
uno::Reference<sheet::XSpreadsheet> xSheet(xIA->getByIndex(0), uno::UNO_QUERY_THROW);
const OUString testdoc
- = m_directories.getURLFromSrc("/sc/qa/unoapi/testdocuments/ScDDELinksObj.ods");
+ = m_directories.getURLFromSrc(u"/sc/qa/unoapi/testdocuments/ScDDELinksObj.ods");
xSheet->getCellByPosition(5, 5)->setFormula("=DDE(\"soffice\";\"" + testdoc
+ "\";\"Sheet1.A1\")");
diff --git a/sc/qa/extras/scmodelobj.cxx b/sc/qa/extras/scmodelobj.cxx
index 8c4a67f963ab..c5fcbd41cb14 100644
--- a/sc/qa/extras/scmodelobj.cxx
+++ b/sc/qa/extras/scmodelobj.cxx
@@ -113,7 +113,7 @@ void ScModelObj::setUp()
UnoApiTest::setUp();
// create a calc document
OUString aFileURL;
- createFileURL("ScModelObj.ods", aFileURL);
+ createFileURL(u"ScModelObj.ods", aFileURL);
mxComponent = loadFromDesktop(aFileURL, "com.sun.star.sheet.SpreadsheetDocument");
}
diff --git a/sc/qa/extras/scnamedrangeobj.cxx b/sc/qa/extras/scnamedrangeobj.cxx
index 710b40bb2654..7ba7ec222fb5 100644
--- a/sc/qa/extras/scnamedrangeobj.cxx
+++ b/sc/qa/extras/scnamedrangeobj.cxx
@@ -95,7 +95,7 @@ void ScNamedRangeObj::setUp()
CalcUnoApiTest::setUp();
// create a calc document
OUString aFileURL;
- createFileURL("ScNamedRangeObj.ods", aFileURL);
+ createFileURL(u"ScNamedRangeObj.ods", aFileURL);
mxComponent = loadFromDesktop(aFileURL, "com.sun.star.sheet.SpreadsheetDocument");
}
diff --git a/sc/qa/extras/scnamedrangesobj.cxx b/sc/qa/extras/scnamedrangesobj.cxx
index 1b61fa098262..34543cf5ea61 100644
--- a/sc/qa/extras/scnamedrangesobj.cxx
+++ b/sc/qa/extras/scnamedrangesobj.cxx
@@ -139,7 +139,7 @@ void ScNamedRangesObj::setUp()
CalcUnoApiTest::setUp();
// create a calc document
OUString aFileURL;
- createFileURL("ScNamedRangeObj.ods", aFileURL);
+ createFileURL(u"ScNamedRangeObj.ods", aFileURL);
mxComponent = loadFromDesktop(aFileURL, "com.sun.star.sheet.SpreadsheetDocument");
}
diff --git a/sc/qa/extras/scoutlineobj.cxx b/sc/qa/extras/scoutlineobj.cxx
index 8133cdb25614..e47580238e03 100644
--- a/sc/qa/extras/scoutlineobj.cxx
+++ b/sc/qa/extras/scoutlineobj.cxx
@@ -67,7 +67,7 @@ void ScOutlineObj::setUp()
CalcUnoApiTest::setUp();
// create a calc document
OUString aFileURL;
- createFileURL("ScOutlineObj.ods", aFileURL);
+ createFileURL(u"ScOutlineObj.ods", aFileURL);
mxComponent = loadFromDesktop(aFileURL);
}
diff --git a/sc/qa/extras/scsheetlinkobj.cxx b/sc/qa/extras/scsheetlinkobj.cxx
index 7b248c0a9603..c45c9b2db806 100644
--- a/sc/qa/extras/scsheetlinkobj.cxx
+++ b/sc/qa/extras/scsheetlinkobj.cxx
@@ -62,7 +62,7 @@ private:
ScSheetLinkObj::ScSheetLinkObj()
: CalcUnoApiTest("/sc/qa/extras/testdocuments")
- , XNamed(m_directories.getURLFromSrc("/sc/qa/extras/testdocuments/ScSheetLinkObj.ods"))
+ , XNamed(m_directories.getURLFromSrc(u"/sc/qa/extras/testdocuments/ScSheetLinkObj.ods"))
{
}
@@ -75,7 +75,7 @@ uno::Reference<uno::XInterface> ScSheetLinkObj::init()
uno::Reference<sheet::XSpreadsheet> xSheet(xIA->getByIndex(0), uno::UNO_QUERY_THROW);
uno::Reference<sheet::XSheetLinkable> xSL(xSheet, uno::UNO_QUERY_THROW);
- xSL->link(m_directories.getURLFromSrc("/sc/qa/extras/testdocuments/ScSheetLinkObj.ods"),
+ xSL->link(m_directories.getURLFromSrc(u"/sc/qa/extras/testdocuments/ScSheetLinkObj.ods"),
"Sheet1", "", "", sheet::SheetLinkMode_VALUE);
uno::Reference<beans::XPropertySet> xPropSet(xDoc, uno::UNO_QUERY_THROW);
diff --git a/sc/qa/extras/scsheetlinksobj.cxx b/sc/qa/extras/scsheetlinksobj.cxx
index 39c45477b0d8..e61c71c6a9eb 100644
--- a/sc/qa/extras/scsheetlinksobj.cxx
+++ b/sc/qa/extras/scsheetlinksobj.cxx
@@ -79,7 +79,7 @@ ScSheetLinksObj::ScSheetLinksObj()
: CalcUnoApiTest("/sc/qa/extras/testdocuments")
, XElementAccess(cppu::UnoType<beans::XPropertySet>::get())
, XIndexAccess(1)
- , XNameAccess(m_directories.getURLFromSrc("/sc/qa/extras/testdocuments/ScSheetLinksObj.ods"))
+ , XNameAccess(m_directories.getURLFromSrc(u"/sc/qa/extras/testdocuments/ScSheetLinksObj.ods"))
, XServiceInfo("ScSheetLinksObj", "com.sun.star.sheet.SheetLinks")
{
}
@@ -93,7 +93,7 @@ uno::Reference<uno::XInterface> ScSheetLinksObj::init()
uno::Reference<sheet::XSheetLinkable> xSL(xSheet0, uno::UNO_QUERY_THROW);
OUString aFileURL;
- createFileURL("ScSheetLinksObj.ods", aFileURL);
+ createFileURL(u"ScSheetLinksObj.ods", aFileURL);
xSL->link(aFileURL, "Sheet1", "", "", sheet::SheetLinkMode_VALUE);
uno::Reference<beans::XPropertySet> xPropertySet(xDoc, uno::UNO_QUERY_THROW);
diff --git a/sc/qa/extras/scstylefamiliesobj.cxx b/sc/qa/extras/scstylefamiliesobj.cxx
index 991334d192b7..5a7197736965 100644
--- a/sc/qa/extras/scstylefamiliesobj.cxx
+++ b/sc/qa/extras/scstylefamiliesobj.cxx
@@ -116,7 +116,7 @@ uno::Reference<lang::XComponent> ScStyleFamiliesObj::getSourceComponent()
OUString ScStyleFamiliesObj::getTestURL()
{
OUString aFileURL;
- createFileURL("ScStyleFamiliesObj.ods", aFileURL);
+ createFileURL(u"ScStyleFamiliesObj.ods", aFileURL);
return aFileURL;
}
diff --git a/sc/qa/extras/sctablesheetobj.cxx b/sc/qa/extras/sctablesheetobj.cxx
index 46d323f3618c..d0b12d1d937e 100644
--- a/sc/qa/extras/sctablesheetobj.cxx
+++ b/sc/qa/extras/sctablesheetobj.cxx
@@ -354,7 +354,7 @@ OUString ScTableSheetObj::getFileURL()
void ScTableSheetObj::setUp()
{
CalcUnoApiTest::setUp();
- createFileURL("ScTableSheetObj.ods", maFileURL);
+ createFileURL(u"ScTableSheetObj.ods", maFileURL);
mxComponent = loadFromDesktop(maFileURL, "com.sun.star.sheet.SpreadsheetDocument");
}
diff --git a/sc/qa/unit/bugfix-test.cxx b/sc/qa/unit/bugfix-test.cxx
index be2a00a94e76..874069ade2f5 100644
--- a/sc/qa/unit/bugfix-test.cxx
+++ b/sc/qa/unit/bugfix-test.cxx
@@ -10,6 +10,7 @@
#include <sal/config.h>
#include <cstdlib>
+#include <string_view>
#include <postit.hxx>
#include <validat.hxx>
@@ -86,44 +87,48 @@ private:
uno::Reference<uno::XInterface> m_xCalcComponent;
};
-static void lcl_AssertRectEqualWithTolerance(const OString& sInfo,
+static void lcl_AssertRectEqualWithTolerance(std::string_view sInfo,
const tools::Rectangle& rExpected,
const tools::Rectangle& rActual,
const sal_Int32 nTolerance)
{
// Left
- OString sMsg = sInfo + " Left expected " + OString::number(rExpected.Left()) + " actual "
+ OString sMsg = OString::Concat(sInfo) + " Left expected " + OString::number(rExpected.Left())
+ + " actual "
+ OString::number(rActual.Left()) + " Tolerance " + OString::number(nTolerance);
CPPUNIT_ASSERT_MESSAGE(
sMsg.getStr(), std::abs(rExpected.Left() - rActual.Left()) <= nTolerance);
// Top
- sMsg = sInfo + " Top expected " + OString::number(rExpected.Top()) + " actual "
+ sMsg = OString::Concat(sInfo) + " Top expected " + OString::number(rExpected.Top()) + " actual "
+ OString::number(rActual.Top()) + " Tolerance " + OString::number(nTolerance);
CPPUNIT_ASSERT_MESSAGE(sMsg.getStr(), std::abs(rExpected.Top() - rActual.Top()) <= nTolerance);
// Width
- sMsg = sInfo + " Width expected " + OString::number(rExpected.GetWidth()) + " actual "
+ sMsg = OString::Concat(sInfo) + " Width expected " + OString::number(rExpected.GetWidth())
+ + " actual "
+ OString::number(rActual.GetWidth()) + " Tolerance " + OString::number(nTolerance);
CPPUNIT_ASSERT_MESSAGE(sMsg.getStr(),
std::abs(rExpected.GetWidth() - rActual.GetWidth()) <= nTolerance);
// Height
- sMsg = sInfo + " Height expected " + OString::number(rExpected.GetHeight()) + " actual "
+ sMsg = OString::Concat(sInfo) + " Height expected " + OString::number(rExpected.GetHeight())
+ + " actual "
+ OString::number(rActual.GetHeight()) + " Tolerance " + OString::number(nTolerance);
CPPUNIT_ASSERT_MESSAGE(sMsg.getStr(),
std::abs(rExpected.GetHeight() - rActual.GetHeight()) <= nTolerance);
}
-static void lcl_AssertPointEqualWithTolerance(const OString& sInfo, const Point rExpected,
+static void lcl_AssertPointEqualWithTolerance(std::string_view sInfo, const Point rExpected,
const Point rActual, const sal_Int32 nTolerance)
{
// X
- OString sMsg = sInfo + " X expected " + OString::number(rExpected.X()) + " actual "
+ OString sMsg = OString::Concat(sInfo) + " X expected " + OString::number(rExpected.X())
+ + " actual "
+ OString::number(rActual.X()) + " Tolerance " + OString::number(nTolerance);
CPPUNIT_ASSERT_MESSAGE(sMsg.getStr(), std::abs(rExpected.X() - rActual.X()) <= nTolerance);
// Y
- sMsg = sInfo + " Y expected " + OString::number(rExpected.Y()) + " actual "
+ sMsg = OString::Concat(sInfo) + " Y expected " + OString::number(rExpected.Y()) + " actual "
+ OString::number(rActual.Y()) + " Tolerance " + OString::number(nTolerance);
CPPUNIT_ASSERT_MESSAGE(sMsg.getStr(), std::abs(rExpected.Y() - rActual.Y()) <= nTolerance);
}
@@ -134,7 +139,7 @@ void ScFiltersTest::testTdf137576_Measureline()
// length 37mm. Save and reload had resulted in a line of 0mm length.
// Get document
- ScDocShellRef xDocSh = loadDoc("tdf137576_Measureline.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf137576_Measureline.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load tdf137576_Measureline.ods", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -179,7 +184,7 @@ void ScFiltersTest::testTdf137216_HideCol()
// Error was, that hiding column C did not make the shape invisible.
// Get document
- ScDocShellRef xDocSh = loadDoc("tdf137216_HideCol.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf137216_HideCol.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load tdf137216_HideCol.ods", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -204,7 +209,7 @@ void ScFiltersTest::testTdf137044_CoverHiddenRows()
// in a wrong end cell offset and thus a wrong height of the shape.
// Get document
- ScDocShellRef xDocSh = loadDoc("tdf137044_CoverHiddenRows.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf137044_CoverHiddenRows.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load tdf137044_CoverHiddenRows.ods", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -251,7 +256,7 @@ void ScFiltersTest::testTdf137044_CoverHiddenRows()
void ScFiltersTest::testTdf137020_FlipVertical()
{
// Get document
- ScDocShellRef xDocSh = loadDoc("tdf137020_FlipVertical.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf137020_FlipVertical.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load tdf137020_FlipVertical.ods", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -291,7 +296,7 @@ void ScFiltersTest::testTdf137020_FlipVertical()
void ScFiltersTest::testTdf64229()
{
- ScDocShellRef xDocSh = loadDoc("fdo64229b.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"fdo64229b.", FORMAT_ODS);
xDocSh->DoHardRecalc();
@@ -309,7 +314,7 @@ void ScFiltersTest::testTdf64229()
void ScFiltersTest::testTdf36933()
{
- ScDocShellRef xDocSh = loadDoc("fdo36933test.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"fdo36933test.", FORMAT_ODS);
xDocSh->DoHardRecalc();
@@ -327,7 +332,7 @@ void ScFiltersTest::testTdf36933()
void ScFiltersTest::testTdf43700()
{
- ScDocShellRef xDocSh = loadDoc("fdo43700test.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"fdo43700test.", FORMAT_ODS);
xDocSh->DoHardRecalc();
@@ -345,7 +350,7 @@ void ScFiltersTest::testTdf43700()
void ScFiltersTest::testTdf43534()
{
- ScDocShellRef xDocSh = loadDoc("fdo43534test.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"fdo43534test.", FORMAT_ODS);
xDocSh->DoHardRecalc();
@@ -420,7 +425,7 @@ void ScFiltersTest::testTdf40110()
void ScFiltersTest::testTdf98657()
{
- ScDocShellRef xDocSh = loadDoc("tdf98657.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf98657.", FORMAT_ODS);
ScDocument& rDoc = xDocSh->GetDocument();
xDocSh->DoHardRecalc();
@@ -433,7 +438,7 @@ void ScFiltersTest::testTdf98657()
void ScFiltersTest::testTdf88821()
{
- ScDocShellRef xDocSh = loadDoc("tdf88821.", FORMAT_HTML);
+ ScDocShellRef xDocSh = loadDoc(u"tdf88821.", FORMAT_HTML);
ScDocument& rDoc = xDocSh->GetDocument();
// B2 should be 'Périmètre', not 'Périmètre'
@@ -444,7 +449,7 @@ void ScFiltersTest::testTdf88821()
void ScFiltersTest::testTdf88821_2()
{
- ScDocShellRef xDocSh = loadDoc("tdf88821-2.", FORMAT_HTML);
+ ScDocShellRef xDocSh = loadDoc(u"tdf88821-2.", FORMAT_HTML);
ScDocument& rDoc = xDocSh->GetDocument();
// A2 should be 'ABCabcČŠŽčšž', not 'ABCabcČŠŽÄヘšž'
@@ -455,7 +460,7 @@ void ScFiltersTest::testTdf88821_2()
void ScFiltersTest::testTdf103960()
{
- ScDocShellRef xDocSh = loadDoc("tdf103960.", FORMAT_HTML);
+ ScDocShellRef xDocSh = loadDoc(u"tdf103960.", FORMAT_HTML);
ScDocument& rDoc = xDocSh->GetDocument();
// A1 should be 'Data', not the entire content of the file
@@ -466,7 +471,7 @@ void ScFiltersTest::testTdf103960()
void ScFiltersTest::testRhbz1390776()
{
- ScDocShellRef xDocSh = loadDoc("rhbz1390776.", FORMAT_XLS_XML);
+ ScDocShellRef xDocSh = loadDoc(u"rhbz1390776.", FORMAT_XLS_XML);
ScDocument& rDoc = xDocSh->GetDocument();
ASSERT_FORMULA_EQUAL(rDoc, ScAddress(0, 27, 0), "SUM(A18:A23)", "Wrong range");
@@ -478,7 +483,7 @@ void ScFiltersTest::testTdf104310()
{
// 1. Test x14 extension
{
- ScDocShellRef xDocSh = loadDoc("tdf104310.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"tdf104310.", FORMAT_XLSX);
ScDocument& rDoc = xDocSh->GetDocument();
const ScValidationData* pData = rDoc.GetValidationEntry(1);
@@ -496,7 +501,7 @@ void ScFiltersTest::testTdf104310()
// 2. Test x12ac extension
{
- ScDocShellRef xDocSh = loadDoc("tdf104310-2.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"tdf104310-2.", FORMAT_XLSX);
ScDocument& rDoc = xDocSh->GetDocument();
const ScValidationData* pData = rDoc.GetValidationEntry(1);
@@ -517,7 +522,7 @@ void ScFiltersTest::testTdf104310()
void ScFiltersTest::testTdf31231()
{
// We must open it read-write to allow setting modified flag
- ScDocShellRef xDocSh = loadDoc("tdf31231.", FORMAT_ODS, true);
+ ScDocShellRef xDocSh = loadDoc(u"tdf31231.", FORMAT_ODS, true);
xDocSh->DoHardRecalc();
CPPUNIT_ASSERT_MESSAGE("The spreadsheet must be allowed to set modified state", xDocSh->IsEnableSetModified());
@@ -574,7 +579,7 @@ SdrCaptionObj* checkCaption( ScDocument& rDoc, const ScAddress& rAddress, bool b
void ScFiltersTest::testTdf129789()
{
- ScDocShellRef xDocSh = loadDoc("tdf129789.", FORMAT_ODS, true);
+ ScDocShellRef xDocSh = loadDoc(u"tdf129789.", FORMAT_ODS, true);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
diff --git a/sc/qa/unit/chart2dataprovider.cxx b/sc/qa/unit/chart2dataprovider.cxx
index 2e30b6090745..9435267decd9 100644
--- a/sc/qa/unit/chart2dataprovider.cxx
+++ b/sc/qa/unit/chart2dataprovider.cxx
@@ -82,7 +82,7 @@ static void lcl_createAndCheckDataProvider(ScDocument& rDoc, const OUString& cel
void ScChart2DataProviderTest::testHeaderExpansion()
{
- ScDocShellRef xDocSh = loadDoc("chart2dataprovider.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"chart2dataprovider.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load ch.ods.", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
diff --git a/sc/qa/unit/cond_format_merge.cxx b/sc/qa/unit/cond_format_merge.cxx
index 0c6b78c791a3..56b47ac7c1a4 100644
--- a/sc/qa/unit/cond_format_merge.cxx
+++ b/sc/qa/unit/cond_format_merge.cxx
@@ -42,7 +42,7 @@ ScCondFormatMergeTest::ScCondFormatMergeTest()
void ScCondFormatMergeTest::testCondFormatMerge()
{
OUString aFileURL;
- createFileURL("cond_format_merge.ods", aFileURL);
+ createFileURL(u"cond_format_merge.ods", aFileURL);
uno::Reference<lang::XComponent> mxComponent = loadFromDesktop(aFileURL);
CPPUNIT_ASSERT_MESSAGE("Component not loaded", mxComponent.is());
diff --git a/sc/qa/unit/copy_paste_test.cxx b/sc/qa/unit/copy_paste_test.cxx
index 2a1a1068e7c3..8cc6fd029eeb 100644
--- a/sc/qa/unit/copy_paste_test.cxx
+++ b/sc/qa/unit/copy_paste_test.cxx
@@ -8,6 +8,9 @@
*/
#include <sal/config.h>
+
+#include <string_view>
+
#include <test/bootstrapfixture.hxx>
#include <comphelper/processfactory.hxx>
@@ -72,7 +75,7 @@ public:
private:
- ScDocShellRef loadDocAndSetupModelViewController(const OUString& rFileName, sal_Int32 nFormat, bool bReadWrite);
+ ScDocShellRef loadDocAndSetupModelViewController(std::u16string_view rFileName, sal_Int32 nFormat, bool bReadWrite);
void addToUserList(const OUString& rStr);
uno::Reference<uno::XInterface> m_xCalcComponent;
};
@@ -88,7 +91,7 @@ void ScCopyPasteTest::testCopyPasteXLS()
CPPUNIT_ASSERT( xTargetFrame.is() );
// 1. Open the document
- ScDocShellRef xDocSh = loadDoc("chartx2.", FORMAT_XLS);
+ ScDocShellRef xDocSh = loadDoc(u"chartx2.", FORMAT_XLS);
CPPUNIT_ASSERT_MESSAGE("Failed to load chartx2.xls.", xDocSh.is());
uno::Reference< frame::XModel2 > xModel2 ( xDocSh->GetModel(), UNO_QUERY );
@@ -461,7 +464,7 @@ static ScAddress lcl_getMergeSizeOfCell(const ScDocument& rDoc, SCCOL nCol, SCRO
return ScAddress(rMerge.GetColMerge(), rMerge.GetRowMerge(), nTab);
}
-ScDocShellRef ScCopyPasteTest::loadDocAndSetupModelViewController(const OUString& rFileName, sal_Int32 nFormat, bool bReadWrite)
+ScDocShellRef ScCopyPasteTest::loadDocAndSetupModelViewController(std::u16string_view rFileName, sal_Int32 nFormat, bool bReadWrite)
{
uno::Reference< frame::XDesktop2 > xDesktop = frame::Desktop::create(::comphelper::getProcessComponentContext());
CPPUNIT_ASSERT(xDesktop.is());
@@ -492,7 +495,7 @@ ScDocShellRef ScCopyPasteTest::loadDocAndSetupModelViewController(const OUString
void ScCopyPasteTest::testTdf53431_fillOnAutofilter()
{
- ScDocShellRef xDocSh = loadDocAndSetupModelViewController("tdf53431_autofilterFilldown.", FORMAT_ODS, true);
+ ScDocShellRef xDocSh = loadDocAndSetupModelViewController(u"tdf53431_autofilterFilldown.", FORMAT_ODS, true);
ScDocument& rDoc = xDocSh->GetDocument();
// Get the document controller
@@ -530,7 +533,7 @@ void ScCopyPasteTest::testTdf53431_fillOnAutofilter()
void ScCopyPasteTest::testTdf40993_fillMergedCells()
{
- ScDocShellRef xDocSh = loadDocAndSetupModelViewController("tdf40993_fillMergedCells.", FORMAT_ODS, true);
+ ScDocShellRef xDocSh = loadDocAndSetupModelViewController(u"tdf40993_fillMergedCells.", FORMAT_ODS, true);
ScDocument& rDoc = xDocSh->GetDocument();
// Get the document controller
@@ -617,7 +620,7 @@ static void lcl_clickAndCheckCurrentArea(SCCOL nCol, SCROW nRow, SCCOL nCol2, SC
void ScCopyPasteTest::testTdf43958_clickSelectOnMergedCells()
{
- loadDocAndSetupModelViewController("tdf40993_fillMergedCells.", FORMAT_ODS, true);
+ loadDocAndSetupModelViewController(u"tdf40993_fillMergedCells.", FORMAT_ODS, true);
// select cell (e.g. by clicking on it) and check what is selected [but not marked]:
// if it is the top left cell of a merged area, the selection is enlarged to the area
@@ -638,7 +641,7 @@ void ScCopyPasteTest::testTdf43958_clickSelectOnMergedCells()
void ScCopyPasteTest::testTdf88782_autofillLinearNumbersInMergedCells()
{
- ScDocShellRef xDocSh = loadDocAndSetupModelViewController("tdf88782_AutofillLinearNumbersInMergedCells.", FORMAT_ODS, true);
+ ScDocShellRef xDocSh = loadDocAndSetupModelViewController(u"tdf88782_AutofillLinearNumbersInMergedCells.", FORMAT_ODS, true);
ScDocument& rDoc = xDocSh->GetDocument();
// Get the document controller
@@ -698,7 +701,7 @@ void ScCopyPasteTest::testTdf88782_autofillLinearNumbersInMergedCells()
void ScCopyPasteTest::tdf137621_autofillMergedBool()
{
- ScDocShellRef xDocSh = loadDocAndSetupModelViewController("tdf137621_autofillMergedBool.", FORMAT_ODS, true);
+ ScDocShellRef xDocSh = loadDocAndSetupModelViewController(u"tdf137621_autofillMergedBool.", FORMAT_ODS, true);
ScDocument& rDoc = xDocSh->GetDocument();
// Get the document controller
@@ -730,7 +733,7 @@ void ScCopyPasteTest::tdf137621_autofillMergedBool()
void ScCopyPasteTest::tdf137205_autofillDatesInMergedCells()
{
- ScDocShellRef xDocSh = loadDocAndSetupModelViewController("tdf137205_AutofillDatesInMergedCells.", FORMAT_ODS, true);
+ ScDocShellRef xDocSh = loadDocAndSetupModelViewController(u"tdf137205_AutofillDatesInMergedCells.", FORMAT_ODS, true);
ScDocument& rDoc = xDocSh->GetDocument();
// Get the document controller
@@ -768,7 +771,7 @@ void ScCopyPasteTest::addToUserList(const OUString& rStr)
void ScCopyPasteTest::tdf137653_137654_autofillUserlist()
{
- ScDocShellRef xDocSh = loadDocAndSetupModelViewController("tdf137653_137654_autofillUserlist.", FORMAT_ODS, true);
+ ScDocShellRef xDocSh = loadDocAndSetupModelViewController(u"tdf137653_137654_autofillUserlist.", FORMAT_ODS, true);
ScDocument& rDoc = xDocSh->GetDocument();
// Get the document controller
@@ -825,7 +828,7 @@ void ScCopyPasteTest::tdf137653_137654_autofillUserlist()
void ScCopyPasteTest::tdf113500_autofillMixed()
{
- ScDocShellRef xDocSh = loadDocAndSetupModelViewController("tdf113500_autofillMixed.", FORMAT_ODS, true);
+ ScDocShellRef xDocSh = loadDocAndSetupModelViewController(u"tdf113500_autofillMixed.", FORMAT_ODS, true);
ScDocument& rDoc = xDocSh->GetDocument();
// Get the document controller
@@ -874,7 +877,7 @@ void ScCopyPasteTest::tdf113500_autofillMixed()
void ScCopyPasteTest::tdf137625_autofillMergedUserlist()
{
- ScDocShellRef xDocSh = loadDocAndSetupModelViewController("tdf137625_autofillMergedUserlist.", FORMAT_ODS, true);
+ ScDocShellRef xDocSh = loadDocAndSetupModelViewController(u"tdf137625_autofillMergedUserlist.", FORMAT_ODS, true);
ScDocument& rDoc = xDocSh->GetDocument();
// Get the document controller
@@ -933,7 +936,7 @@ void ScCopyPasteTest::tdf137625_autofillMergedUserlist()
void ScCopyPasteTest::tdf137624_autofillMergedMixed()
{
- ScDocShellRef xDocSh = loadDocAndSetupModelViewController("tdf137624_autofillMergedMixed.", FORMAT_ODS, true);
+ ScDocShellRef xDocSh = loadDocAndSetupModelViewController(u"tdf137624_autofillMergedMixed.", FORMAT_ODS, true);
ScDocument& rDoc = xDocSh->GetDocument();
// Get the document controller
diff --git a/sc/qa/unit/dataproviders_test.cxx b/sc/qa/unit/dataproviders_test.cxx
index 1f83c620c58d..9dfda0efaa6c 100644
--- a/sc/qa/unit/dataproviders_test.cxx
+++ b/sc/qa/unit/dataproviders_test.cxx
@@ -54,7 +54,7 @@ void ScDataProvidersTest::testCSVImport()
CPPUNIT_ASSERT(bInserted);
OUString aFileURL;
- createFileURL("test1.", "csv", aFileURL);
+ createFileURL(u"test1.", "csv", aFileURL);
sc::ExternalDataSource aDataSource(aFileURL, "org.libreoffice.calc.csv", m_pDoc);
aDataSource.setDBData(pDBData->GetName());
@@ -82,7 +82,7 @@ void ScDataProvidersTest::testDataLargerThanDB()
CPPUNIT_ASSERT(bInserted);
OUString aFileURL;
- createFileURL("test1.", "csv", aFileURL);
+ createFileURL(u"test1.", "csv", aFileURL);
sc::ExternalDataSource aDataSource(aFileURL, "org.libreoffice.calc.csv", m_pDoc);
aDataSource.setDBData(pDBData->GetName());
@@ -110,7 +110,7 @@ void ScDataProvidersTest::testHTMLImport()
CPPUNIT_ASSERT(bInserted);
OUString aFileURL;
- createFileURL("test1.", "html", aFileURL);
+ createFileURL(u"test1.", "html", aFileURL);
sc::ExternalDataSource aDataSource(aFileURL, "org.libreoffice.calc.html", m_pDoc);
aDataSource.setID("//table");
aDataSource.setDBData(pDBData->GetName());
@@ -160,7 +160,7 @@ void ScDataProvidersTest::testXMLImport()
aRangeLink.maRowGroups.push_back("/bookstore/book");
aParam.maRangeLinks.push_back(aRangeLink);
- createFileURL("test1.", "xml", aFileURL);
+ createFileURL(u"test1.", "xml", aFileURL);
sc::ExternalDataSource aDataSource(aFileURL, "org.libreoffice.calc.xml", m_pDoc);
aDataSource.setDBData("testDB");
aDataSource.setXMLImportParam(aParam);
diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx
index c52f4f1ddedd..b1e35efa9fc9 100644
--- a/sc/qa/unit/filters-test.cxx
+++ b/sc/qa/unit/filters-test.cxx
@@ -133,28 +133,28 @@ void ScFiltersTest::testCVEs()
{
#ifndef DISABLE_CVE_TESTS
testDir("Quattro Pro 6.0",
- m_directories.getURLFromSrc("/sc/qa/unit/data/qpro/"));
+ m_directories.getURLFromSrc(u"/sc/qa/unit/data/qpro/"));
//warning, the current "sylk filter" in sc (docsh.cxx) automatically
//chains on failure on trying as csv, rtf, etc. so "success" may
//not indicate that it imported as .slk.
testDir("SYLK",
- m_directories.getURLFromSrc("/sc/qa/unit/data/slk/"));
+ m_directories.getURLFromSrc(u"/sc/qa/unit/data/slk/"));
testDir("MS Excel 97",
- m_directories.getURLFromSrc("/sc/qa/unit/data/xls/"));
+ m_directories.getURLFromSrc(u"/sc/qa/unit/data/xls/"));
testDir("Calc Office Open XML",
- m_directories.getURLFromSrc("/sc/qa/unit/data/xlsx/"), OUString(), XLSX_FORMAT_TYPE);
+ m_directories.getURLFromSrc(u"/sc/qa/unit/data/xlsx/"), OUString(), XLSX_FORMAT_TYPE);
testDir("Calc Office Open XML",
- m_directories.getURLFromSrc("/sc/qa/unit/data/xlsm/"), OUString(), XLSX_FORMAT_TYPE);
+ m_directories.getURLFromSrc(u"/sc/qa/unit/data/xlsm/"), OUString(), XLSX_FORMAT_TYPE);
testDir("dBase",
- m_directories.getURLFromSrc("/sc/qa/unit/data/dbf/"));
+ m_directories.getURLFromSrc(u"/sc/qa/unit/data/dbf/"));
testDir("Lotus",
- m_directories.getURLFromSrc("/sc/qa/unit/data/wks/"));
+ m_directories.getURLFromSrc(u"/sc/qa/unit/data/wks/"));
#endif
}
@@ -189,7 +189,7 @@ void testRangeNameImpl(const ScDocument& rDoc)
void ScFiltersTest::testRangeNameODS()
{
- ScDocShellRef xDocSh = loadDoc("named-ranges-global.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"named-ranges-global.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load named-ranges-global.*", xDocSh.is());
@@ -255,7 +255,7 @@ void testContentImpl(ScDocument& rDoc, sal_Int32 nFormat ) //same code for ods,
void ScFiltersTest::testContentODS()
{
- ScDocShellRef xDocSh = loadDoc("universal-content.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"universal-content.", FORMAT_ODS);
xDocSh->DoHardRecalc();
ScDocument& rDoc = xDocSh->GetDocument();
@@ -265,7 +265,7 @@ void ScFiltersTest::testContentODS()
void ScFiltersTest::testContentXLS()
{
- ScDocShellRef xDocSh = loadDoc("universal-content.", FORMAT_XLS);
+ ScDocShellRef xDocSh = loadDoc(u"universal-content.", FORMAT_XLS);
xDocSh->DoHardRecalc();
ScDocument& rDoc = xDocSh->GetDocument();
@@ -275,7 +275,7 @@ void ScFiltersTest::testContentXLS()
void ScFiltersTest::testContentXLSX()
{
- ScDocShellRef xDocSh = loadDoc("universal-content.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"universal-content.", FORMAT_XLSX);
xDocSh->DoHardRecalc();
ScDocument& rDoc = xDocSh->GetDocument();
@@ -285,7 +285,7 @@ void ScFiltersTest::testContentXLSX()
void ScFiltersTest::testContentXLSXStrict()
{
- ScDocShellRef xDocSh = loadDoc("universal-content-strict.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"universal-content-strict.", FORMAT_XLSX);
xDocSh->DoHardRecalc();
ScDocument& rDoc = xDocSh->GetDocument();
@@ -295,7 +295,7 @@ void ScFiltersTest::testContentXLSXStrict()
void ScFiltersTest::testContentLotus123()
{
- ScDocShellRef xDocSh = loadDoc("universal-content.", FORMAT_LOTUS123);
+ ScDocShellRef xDocSh = loadDoc(u"universal-content.", FORMAT_LOTUS123);
xDocSh->DoHardRecalc();
ScDocument& rDoc = xDocSh->GetDocument();
@@ -306,14 +306,14 @@ void ScFiltersTest::testContentLotus123()
void ScFiltersTest::testContentofz9704()
{
OUString aFileName;
- createFileURL("ofz9704.", "123", aFileName);
+ createFileURL(u"ofz9704.", "123", aFileName);
SvFileStream aFileStream(aFileName, StreamMode::READ);
TestImportWKS(aFileStream);
}
void ScFiltersTest::testContentDIF()
{
- ScDocShellRef xDocSh = loadDoc("universal-content.", FORMAT_DIF);
+ ScDocShellRef xDocSh = loadDoc(u"universal-content.", FORMAT_DIF);
CPPUNIT_ASSERT_MESSAGE("Failed to load universal-content.dif", xDocSh.is());
@@ -322,7 +322,7 @@ void ScFiltersTest::testContentDIF()
void ScFiltersTest::testContentXLSB()
{
- ScDocShellRef xDocSh = loadDoc("universal-content.", FORMAT_XLSB);
+ ScDocShellRef xDocSh = loadDoc(u"universal-content.", FORMAT_XLSB);
xDocSh->DoHardRecalc();
ScDocument& rDoc = xDocSh->GetDocument();
@@ -332,7 +332,7 @@ void ScFiltersTest::testContentXLSB()
void ScFiltersTest::testContentXLS_XML()
{
- ScDocShellRef xDocSh = loadDoc("universal-content.", FORMAT_XLS_XML);
+ ScDocShellRef xDocSh = loadDoc(u"universal-content.", FORMAT_XLS_XML);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -342,7 +342,7 @@ void ScFiltersTest::testContentXLS_XML()
void ScFiltersTest::testContentGnumeric()
{
- ScDocShellRef xDocSh = loadDoc("universal-content.", FORMAT_GNUMERIC);
+ ScDocShellRef xDocSh = loadDoc(u"universal-content.", FORMAT_GNUMERIC);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -352,7 +352,7 @@ void ScFiltersTest::testContentGnumeric()
void ScFiltersTest::testSharedFormulaXLS()
{
- ScDocShellRef xDocSh = loadDoc("shared-formula/basic.", FORMAT_XLS);
+ ScDocShellRef xDocSh = loadDoc(u"shared-formula/basic.", FORMAT_XLS);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
xDocSh->DoHardRecalc();
@@ -376,7 +376,7 @@ void ScFiltersTest::testSharedFormulaXLS()
// Excel can easily mess up shared formula ranges, so we need to be able
// to handle these wrong ranges that Excel stores.
- xDocSh = loadDoc("shared-formula/gap.", FORMAT_XLS);
+ xDocSh = loadDoc(u"shared-formula/gap.", FORMAT_XLS);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc2 = xDocSh->GetDocument();
rDoc2.CalcAll();
@@ -409,7 +409,7 @@ void ScFiltersTest::testSharedFormulaXLS()
void ScFiltersTest::testSharedFormulaXLSX()
{
- ScDocShellRef xDocSh = loadDoc("shared-formula/basic.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"shared-formula/basic.", FORMAT_XLSX);
ScDocument& rDoc = xDocSh->GetDocument();
xDocSh->DoHardRecalc();
// Check the results of formula cells in the shared formula range.
@@ -431,7 +431,7 @@ void ScFiltersTest::testSharedFormulaXLSX()
void ScFiltersTest::testSharedFormulaRefUpdateXLSX()
{
- ScDocShellRef xDocSh = loadDoc("shared-formula/refupdate.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"shared-formula/refupdate.", FORMAT_XLSX);
ScDocument& rDoc = xDocSh->GetDocument();
sc::AutoCalcSwitch aACSwitch(rDoc, true); // turn auto calc on.
rDoc.DeleteRow(ScRange(0, 4, 0, rDoc.MaxCol(), 4, 0)); // delete row 5.
@@ -460,7 +460,7 @@ void ScFiltersTest::testSharedFormulaRefUpdateXLSX()
void ScFiltersTest::testSheetNamesXLSX()
{
- ScDocShellRef xDocSh = loadDoc("sheet-names.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"sheet-names.", FORMAT_XLSX);
ScDocument& rDoc = xDocSh->GetDocument();
std::vector<OUString> aTabNames = rDoc.GetAllTableNames();
@@ -478,7 +478,7 @@ void ScFiltersTest::testSheetNamesXLSX()
void ScFiltersTest::testTdf79998()
{
// check: original document has tab name > 31 characters
- ScDocShellRef xDocSh = loadDoc("tdf79998.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf79998.", FORMAT_ODS);
ScDocument& rDoc1 = xDocSh->GetDocument();
const std::vector<OUString> aTabNames1 = rDoc1.GetAllTableNames();
CPPUNIT_ASSERT_EQUAL(OUString("Utilities (FX Kurse, Kreditkarten etc)"), aTabNames1[1]);
@@ -494,7 +494,7 @@ void ScFiltersTest::testTdf79998()
void ScFiltersTest::testCommentSize()
{
- ScDocShellRef xDocSh = loadDoc("comment.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"comment.", FORMAT_ODS);
ScDocument& rDoc = xDocSh->GetDocument();
ScAddress aPos(0,0,0);
@@ -562,7 +562,7 @@ void ScFiltersTest::testLegacyCellAnchoredRotatedShape()
// This example doc contains cell anchored shape that is rotated, the
// rotated shape is in fact clipped by the sheet boundaries (and thus
// is a good edge case test to see if we import it still correctly)
- ScDocShellRef xDocSh = loadDoc("legacycellanchoredrotatedclippedshape.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"legacycellanchoredrotatedclippedshape.", FORMAT_ODS);
ScDocument& rDoc = xDocSh->GetDocument();
// ensure the imported legacy rotated shape is in the expected position
@@ -589,7 +589,7 @@ void ScFiltersTest::testLegacyCellAnchoredRotatedShape()
// rotated shape is in fact clipped by the sheet boundaries, additionally
// the shape is completely hidden because the rows the shape occupies
// are hidden
- ScDocShellRef xDocSh = loadDoc("legacycellanchoredrotatedhiddenshape.", FORMAT_ODS, true);
+ ScDocShellRef xDocSh = loadDoc(u"legacycellanchoredrotatedhiddenshape.", FORMAT_ODS, true);
ScDocument& rDoc = xDocSh->GetDocument();
// ensure the imported legacy rotated shape is in the expected position
tools::Rectangle aRect( 6000, -2000, 8000, 4000 );
@@ -613,7 +613,7 @@ void ScFiltersTest::testLegacyCellAnchoredRotatedShape()
}
{
// This example doc contains cell anchored shape that is rotated
- ScDocShellRef xDocSh = loadDoc("legacycellanchoredrotatedshape.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"legacycellanchoredrotatedshape.", FORMAT_ODS);
ScDocument& rDoc = xDocSh->GetDocument();
// ensure the imported legacy rotated shape is in the expected position
@@ -656,7 +656,7 @@ static void testEnhancedProtectionImpl( const ScDocument& rDoc )
void ScFiltersTest::testEnhancedProtectionXLS()
{
- ScDocShellRef xDocSh = loadDoc("enhanced-protection.", FORMAT_XLS);
+ ScDocShellRef xDocSh = loadDoc(u"enhanced-protection.", FORMAT_XLS);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -667,7 +667,7 @@ void ScFiltersTest::testEnhancedProtectionXLS()
void ScFiltersTest::testEnhancedProtectionXLSX()
{
- ScDocShellRef xDocSh = loadDoc("enhanced-protection.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"enhanced-protection.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -678,7 +678,7 @@ void ScFiltersTest::testEnhancedProtectionXLSX()
void ScFiltersTest::testSortWithSharedFormulasODS()
{
- ScDocShellRef xDocSh = loadDoc("shared-formula/sort-crash.", FORMAT_ODS, true);
+ ScDocShellRef xDocSh = loadDoc(u"shared-formula/sort-crash.", FORMAT_ODS, true);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -730,7 +730,7 @@ void ScFiltersTest::testSortWithSharedFormulasODS()
// Document contains cached external references.
void ScFiltersTest::testSortWithSheetExternalReferencesODS()
{
- ScDocShellRef xDocSh = loadDoc("sort-with-sheet-external-references.", FORMAT_ODS, true);
+ ScDocShellRef xDocSh = loadDoc(u"sort-with-sheet-external-references.", FORMAT_ODS, true);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
sc::AutoCalcSwitch aACSwitch(rDoc, true); // turn auto calc on.
@@ -851,7 +851,7 @@ void ScFiltersTest::testSortWithSheetExternalReferencesODS_Impl( ScDocShellRef c
void ScFiltersTest::testSortWithFormattingXLS()
{
- ScDocShellRef xDocSh = loadDoc("tdf129127.", FORMAT_XLS, true);
+ ScDocShellRef xDocSh = loadDoc(u"tdf129127.", FORMAT_XLS, true);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
diff --git a/sc/qa/unit/functions_addin.cxx b/sc/qa/unit/functions_addin.cxx
index b56eaf8c05d3..ce549a400014 100644
--- a/sc/qa/unit/functions_addin.cxx
+++ b/sc/qa/unit/functions_addin.cxx
@@ -15,7 +15,7 @@ public:
void AddinFunctionsTest::testAddinFormulasFODS()
{
- OUString aDirectoryURL = m_directories.getURLFromSrc("/sc/qa/unit/data/functions/addin/fods/");
+ OUString aDirectoryURL = m_directories.getURLFromSrc(u"/sc/qa/unit/data/functions/addin/fods/");
recursiveScan(test::pass, "OpenDocument Spreadsheet Flat XML", aDirectoryURL,
"com.sun.star.comp.filter.OdfFlatXml,,com.sun.star.comp.Calc.XMLOasisImporter,com.sun.star.comp.Calc.XMLOasisExporter,,,true",
FODS_FORMAT_TYPE, SotClipboardFormatId::NONE, 0, false);
diff --git a/sc/qa/unit/functions_array.cxx b/sc/qa/unit/functions_array.cxx
index 99c09ed17020..00a17de34fd6 100644
--- a/sc/qa/unit/functions_array.cxx
+++ b/sc/qa/unit/functions_array.cxx
@@ -15,7 +15,7 @@ public:
void ArrayFunctionsTest::testArrayFormulasFODS()
{
- OUString aDirectoryURL = m_directories.getURLFromSrc("/sc/qa/unit/data/functions/array/fods/");
+ OUString aDirectoryURL = m_directories.getURLFromSrc(u"/sc/qa/unit/data/functions/array/fods/");
recursiveScan(test::pass, "OpenDocument Spreadsheet Flat XML", aDirectoryURL,
"com.sun.star.comp.filter.OdfFlatXml,,com.sun.star.comp.Calc.XMLOasisImporter,com.sun.star.comp.Calc.XMLOasisExporter,,,true",
FODS_FORMAT_TYPE, SotClipboardFormatId::NONE, 0, false);
diff --git a/sc/qa/unit/functions_database.cxx b/sc/qa/unit/functions_database.cxx
index c1b83c25087d..933d3dabd976 100644
--- a/sc/qa/unit/functions_database.cxx
+++ b/sc/qa/unit/functions_database.cxx
@@ -15,7 +15,7 @@ public:
void DatabaseFunctionsTest::testDatabaseFormulasFODS()
{
- OUString aDirectoryURL = m_directories.getURLFromSrc("/sc/qa/unit/data/functions/database/fods/");
+ OUString aDirectoryURL = m_directories.getURLFromSrc(u"/sc/qa/unit/data/functions/database/fods/");
recursiveScan(test::pass, "OpenDocument Spreadsheet Flat XML", aDirectoryURL,
"com.sun.star.comp.filter.OdfFlatXml,,com.sun.star.comp.Calc.XMLOasisImporter,com.sun.star.comp.Calc.XMLOasisExporter,,,true",
FODS_FORMAT_TYPE, SotClipboardFormatId::NONE, 0, false);
diff --git a/sc/qa/unit/functions_datetime.cxx b/sc/qa/unit/functions_datetime.cxx
index 3e99272c9254..e0c1a304956f 100644
--- a/sc/qa/unit/functions_datetime.cxx
+++ b/sc/qa/unit/functions_datetime.cxx
@@ -15,7 +15,7 @@ public:
void DateTimeFunctionsTest::testDateTimeFormulasFODS()
{
- OUString aDirectoryURL = m_directories.getURLFromSrc("/sc/qa/unit/data/functions/date_time/fods/");
+ OUString aDirectoryURL = m_directories.getURLFromSrc(u"/sc/qa/unit/data/functions/date_time/fods/");
recursiveScan(test::pass, "OpenDocument Spreadsheet Flat XML", aDirectoryURL,
"com.sun.star.comp.filter.OdfFlatXml,,com.sun.star.comp.Calc.XMLOasisImporter,com.sun.star.comp.Calc.XMLOasisExporter,,,true",
FODS_FORMAT_TYPE, SotClipboardFormatId::NONE, 0, false);
diff --git a/sc/qa/unit/functions_financial.cxx b/sc/qa/unit/functions_financial.cxx
index 7d42a46007ee..9188e75e0a05 100644
--- a/sc/qa/unit/functions_financial.cxx
+++ b/sc/qa/unit/functions_financial.cxx
@@ -15,7 +15,7 @@ public:
void FinancialFunctionsTest::testFinancialFormulasFODS()
{
- OUString aDirectoryURL = m_directories.getURLFromSrc("/sc/qa/unit/data/functions/financial/fods/");
+ OUString aDirectoryURL = m_directories.getURLFromSrc(u"/sc/qa/unit/data/functions/financial/fods/");
recursiveScan(test::pass, "OpenDocument Spreadsheet Flat XML", aDirectoryURL,
"com.sun.star.comp.filter.OdfFlatXml,,com.sun.star.comp.Calc.XMLOasisImporter,com.sun.star.comp.Calc.XMLOasisExporter,,,true",
FODS_FORMAT_TYPE, SotClipboardFormatId::NONE, 0, false);
diff --git a/sc/qa/unit/functions_information.cxx b/sc/qa/unit/functions_information.cxx
index f051a11c8051..58aee20bbbea 100644
--- a/sc/qa/unit/functions_information.cxx
+++ b/sc/qa/unit/functions_information.cxx
@@ -15,7 +15,7 @@ public:
void InformationFunctionsTest::testInformationFormulasFODS()
{
- OUString aDirectoryURL = m_directories.getURLFromSrc("/sc/qa/unit/data/functions/information/fods/");
+ OUString aDirectoryURL = m_directories.getURLFromSrc(u"/sc/qa/unit/data/functions/information/fods/");
recursiveScan(test::pass, "OpenDocument Spreadsheet Flat XML", aDirectoryURL,
"com.sun.star.comp.filter.OdfFlatXml,,com.sun.star.comp.Calc.XMLOasisImporter,com.sun.star.comp.Calc.XMLOasisExporter,,,true",
FODS_FORMAT_TYPE, SotClipboardFormatId::NONE, 0, false);
diff --git a/sc/qa/unit/functions_logical.cxx b/sc/qa/unit/functions_logical.cxx
index 917df0a5523a..15a4db6ed1fd 100644
--- a/sc/qa/unit/functions_logical.cxx
+++ b/sc/qa/unit/functions_logical.cxx
@@ -15,7 +15,7 @@ public:
void LogicalFunctionsTest::testLogicalFormulasFODS()
{
- OUString aDirectoryURL = m_directories.getURLFromSrc("/sc/qa/unit/data/functions/logical/fods/");
+ OUString aDirectoryURL = m_directories.getURLFromSrc(u"/sc/qa/unit/data/functions/logical/fods/");
recursiveScan(test::pass, "OpenDocument Spreadsheet Flat XML", aDirectoryURL,
"com.sun.star.comp.filter.OdfFlatXml,,com.sun.star.comp.Calc.XMLOasisImporter,com.sun.star.comp.Calc.XMLOasisExporter,,,true",
FODS_FORMAT_TYPE, SotClipboardFormatId::NONE, 0, false);
diff --git a/sc/qa/unit/functions_mathematical.cxx b/sc/qa/unit/functions_mathematical.cxx
index 6be24fe1b6a7..274a04db523e 100644
--- a/sc/qa/unit/functions_mathematical.cxx
+++ b/sc/qa/unit/functions_mathematical.cxx
@@ -15,7 +15,7 @@ public:
void MathematicalFunctionsTest::testMathematicalFormulasFODS()
{
- OUString aDirectoryURL = m_directories.getURLFromSrc("/sc/qa/unit/data/functions/mathematical/fods/");
+ OUString aDirectoryURL = m_directories.getURLFromSrc(u"/sc/qa/unit/data/functions/mathematical/fods/");
recursiveScan(test::pass, "OpenDocument Spreadsheet Flat XML", aDirectoryURL,
"com.sun.star.comp.filter.OdfFlatXml,,com.sun.star.comp.Calc.XMLOasisImporter,com.sun.star.comp.Calc.XMLOasisExporter,,,true",
FODS_FORMAT_TYPE, SotClipboardFormatId::NONE, 0, false);
diff --git a/sc/qa/unit/functions_spreadsheet.cxx b/sc/qa/unit/functions_spreadsheet.cxx
index cb8d16ecd90b..03c87732b604 100644
--- a/sc/qa/unit/functions_spreadsheet.cxx
+++ b/sc/qa/unit/functions_spreadsheet.cxx
@@ -15,7 +15,7 @@ public:
void SpreadsheetFunctionsTest::testSpreadsheetFormulasFODS()
{
- OUString aDirectoryURL = m_directories.getURLFromSrc("/sc/qa/unit/data/functions/spreadsheet/fods/");
+ OUString aDirectoryURL = m_directories.getURLFromSrc(u"/sc/qa/unit/data/functions/spreadsheet/fods/");
recursiveScan(test::pass, "OpenDocument Spreadsheet Flat XML", aDirectoryURL,
"com.sun.star.comp.filter.OdfFlatXml,,com.sun.star.comp.Calc.XMLOasisImporter,com.sun.star.comp.Calc.XMLOasisExporter,,,true",
FODS_FORMAT_TYPE, SotClipboardFormatId::NONE, 0, false);
diff --git a/sc/qa/unit/functions_statistical.cxx b/sc/qa/unit/functions_statistical.cxx
index 91d970af68c2..4d97d4cc1689 100644
--- a/sc/qa/unit/functions_statistical.cxx
+++ b/sc/qa/unit/functions_statistical.cxx
@@ -15,7 +15,7 @@ public:
void StatisticalFunctionsTest::testStatisticalFormulasFODS()
{
- OUString aDirectoryURL = m_directories.getURLFromSrc("/sc/qa/unit/data/functions/statistical/fods/");
+ OUString aDirectoryURL = m_directories.getURLFromSrc(u"/sc/qa/unit/data/functions/statistical/fods/");
recursiveScan(test::pass, "OpenDocument Spreadsheet Flat XML", aDirectoryURL,
"com.sun.star.comp.filter.OdfFlatXml,,com.sun.star.comp.Calc.XMLOasisImporter,com.sun.star.comp.Calc.XMLOasisExporter,,,true",
FODS_FORMAT_TYPE, SotClipboardFormatId::NONE, 0, false);
diff --git a/sc/qa/unit/functions_test_old.cxx b/sc/qa/unit/functions_test_old.cxx
index f858e8b26c55..e742f6b972fa 100644
--- a/sc/qa/unit/functions_test_old.cxx
+++ b/sc/qa/unit/functions_test_old.cxx
@@ -20,7 +20,7 @@ FunctionsTestOld::FunctionsTestOld():
void FunctionsTestOld::testFormulasFODS()
{
- OUString aDirectoryURL = m_directories.getURLFromSrc("/sc/qa/unit/data/functions/fods/");
+ OUString aDirectoryURL = m_directories.getURLFromSrc(u"/sc/qa/unit/data/functions/fods/");
recursiveScan(test::pass, "OpenDocument Spreadsheet Flat XML", aDirectoryURL,
"com.sun.star.comp.filter.OdfFlatXml,,com.sun.star.comp.Calc.XMLOasisImporter,com.sun.star.comp.Calc.XMLOasisExporter,,,true",
FODS_FORMAT_TYPE, SotClipboardFormatId::NONE, 0, false);
diff --git a/sc/qa/unit/functions_text.cxx b/sc/qa/unit/functions_text.cxx
index a5bae6330763..96225593db05 100644
--- a/sc/qa/unit/functions_text.cxx
+++ b/sc/qa/unit/functions_text.cxx
@@ -15,7 +15,7 @@ public:
void TextFunctionsTest::testTextFormulasFODS()
{
- OUString aDirectoryURL = m_directories.getURLFromSrc("/sc/qa/unit/data/functions/text/fods/");
+ OUString aDirectoryURL = m_directories.getURLFromSrc(u"/sc/qa/unit/data/functions/text/fods/");
recursiveScan(test::pass, "OpenDocument Spreadsheet Flat XML", aDirectoryURL,
"com.sun.star.comp.filter.OdfFlatXml,,com.sun.star.comp.Calc.XMLOasisImporter,com.sun.star.comp.Calc.XMLOasisExporter,,,true",
FODS_FORMAT_TYPE, SotClipboardFormatId::NONE, 0, false);
diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index c481260378c7..5400347324e7 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -613,7 +613,7 @@ ScDocShellRef ScBootstrapFixture::load(
}
ScDocShellRef ScBootstrapFixture::loadDoc(
- const OUString& rFileName, sal_Int32 nFormat, bool bReadWrite )
+ std::u16string_view rFileName, sal_Int32 nFormat, bool bReadWrite )
{
OUString aFileExtension(aFileFormats[nFormat].pName, strlen(aFileFormats[nFormat].pName), RTL_TEXTENCODING_UTF8 );
OUString aFilterName(aFileFormats[nFormat].pFilterName, strlen(aFileFormats[nFormat].pFilterName), RTL_TEXTENCODING_UTF8) ;
@@ -641,7 +641,7 @@ OUString EnsureSeparator(const OUStringBuffer& rFilePath)
}
void ScBootstrapFixture::createFileURL(
- const OUString& aFileBase, const OUString& aFileExtension, OUString& rFilePath)
+ std::u16string_view aFileBase, const OUString& aFileExtension, OUString& rFilePath)
{
// m_aBaseString and aFileBase may contain multiple segments, so use
// GetNewAbsURL instead of insertName for them:
diff --git a/sc/qa/unit/helper/qahelper.hxx b/sc/qa/unit/helper/qahelper.hxx
index ad518d160f18..693ccbe3675f 100644
--- a/sc/qa/unit/helper/qahelper.hxx
+++ b/sc/qa/unit/helper/qahelper.hxx
@@ -23,6 +23,7 @@
#include "scqahelperdllapi.h"
#include <string>
+#include <string_view>
#include <sstream>
#include <sal/types.h>
@@ -177,7 +178,8 @@ protected:
const OUString& rTypeName, SfxFilterFlags nFilterFlags, SotClipboardFormatId nClipboardID,
sal_uIntPtr nFilterVersion = SOFFICE_FILEFORMAT_CURRENT, const OUString* pPassword = nullptr );
- ScDocShellRef loadDoc(const OUString& rFileName, sal_Int32 nFormat, bool bReadWrite = false );
+ ScDocShellRef loadDoc(
+ std::u16string_view rFileName, sal_Int32 nFormat, bool bReadWrite = false );
public:
static const FileFormat* getFileFormats() { return aFileFormats; }
@@ -185,7 +187,7 @@ public:
explicit ScBootstrapFixture( const OUString& rsBaseString );
virtual ~ScBootstrapFixture() override;
- void createFileURL(const OUString& aFileBase, const OUString& aFileExtension, OUString& rFilePath);
+ void createFileURL(std::u16string_view aFileBase, const OUString& aFileExtension, OUString& rFilePath);
void createCSVPath(const OUString& aFileBase, OUString& rCSVPath);
diff --git a/sc/qa/unit/jumbosheets-test.cxx b/sc/qa/unit/jumbosheets-test.cxx
index d635161e16e5..345e84b166df 100644
--- a/sc/qa/unit/jumbosheets-test.cxx
+++ b/sc/qa/unit/jumbosheets-test.cxx
@@ -70,7 +70,7 @@ bool ScFiltersTest::load(const OUString& rFilter, const OUString& rURL, const OU
void ScFiltersTest::testTdf134392()
{
// Without the fix in place, the file would have crashed
- ScDocShellRef xDocSh = loadDoc("tdf134392.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"tdf134392.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx
index f27ed8ad5ab3..3b258768952c 100644
--- a/sc/qa/unit/opencl-test.cxx
+++ b/sc/qa/unit/opencl-test.cxx
@@ -1,6 +1,9 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#include <sal/config.h>
+
+#include <string_view>
+
#include <test/bootstrapfixture.hxx>
#include "helper/qahelper.hxx"
@@ -503,11 +506,11 @@ private:
// Test env variables and methods
ScDocShellRef xDocSh;
ScDocShellRef xDocShRes;
- bool initTestEnv(const OUString& fileName, sal_Int32 nFormat,
+ bool initTestEnv(std::u16string_view fileName, sal_Int32 nFormat,
bool bReadWrite);
};
-bool ScOpenCLTest::initTestEnv(const OUString& fileName, sal_Int32 nFormat,
+bool ScOpenCLTest::initTestEnv(std::u16string_view fileName, sal_Int32 nFormat,
bool bReadWrite)
{
if(!detectOpenCLDevice())
@@ -536,7 +539,7 @@ void ScOpenCLTest::enableOpenCL()
void ScOpenCLTest::testCompilerHorizontal()
{
- if(!initTestEnv("opencl/compiler/horizontal.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/compiler/horizontal.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -559,7 +562,7 @@ void ScOpenCLTest::testCompilerHorizontal()
void ScOpenCLTest::testCompilerNested()
{
- if(!initTestEnv("opencl/compiler/nested.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/compiler/nested.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -576,7 +579,7 @@ void ScOpenCLTest::testCompilerNested()
void ScOpenCLTest::testCompilerString()
{
- if(!initTestEnv("opencl/compiler/string.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/compiler/string.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -597,7 +600,7 @@ void ScOpenCLTest::testCompilerString()
void ScOpenCLTest::testCompilerInEq()
{
- if(!initTestEnv("opencl/compiler/ineq.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/compiler/ineq.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -659,7 +662,7 @@ void ScOpenCLTest::testSharedFormulaXLSGroundWater()
void ScOpenCLTest::testSystematic()
{
- if(!initTestEnv("systematic.", FORMAT_XLS, false))
+ if(!initTestEnv(u"systematic.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
@@ -751,7 +754,7 @@ void ScOpenCLTest::testSystematic()
void ScOpenCLTest::testSharedFormulaXLS()
{
- if(!initTestEnv("sum_ex.", FORMAT_XLS, false))
+ if(!initTestEnv(u"sum_ex.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -840,7 +843,7 @@ void ScOpenCLTest::testSharedFormulaXLS()
void ScOpenCLTest::testMathFormulaCos()
{
- if(!initTestEnv("opencl/math/cos.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/cos.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -856,7 +859,7 @@ void ScOpenCLTest::testMathFormulaCos()
void ScOpenCLTest::testMathFormulaSinh()
{
- if(!initTestEnv("opencl/math/sinh.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/sinh.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -872,7 +875,7 @@ void ScOpenCLTest::testMathFormulaSinh()
void ScOpenCLTest::testMathFormulaPi()
{
- if(!initTestEnv("opencl/math/pi.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/pi.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -888,7 +891,7 @@ void ScOpenCLTest::testMathFormulaPi()
void ScOpenCLTest::testMathFormulaRandom()
{
- if(!initTestEnv("opencl/math/random.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/random.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -904,7 +907,7 @@ void ScOpenCLTest::testMathFormulaRandom()
}
void ScOpenCLTest::testFinacialFormula()
{
- if(!initTestEnv("opencl/financial/general.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/general.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1054,7 +1057,7 @@ void ScOpenCLTest::testFinacialFormula()
void ScOpenCLTest::testStatisticalFormulaCorrel()
{
- if(!initTestEnv("opencl/statistical/Correl.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/statistical/Correl.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1070,7 +1073,7 @@ void ScOpenCLTest::testStatisticalFormulaCorrel()
}
void ScOpenCLTest::testStatisticalFormulaFisher()
{
- if(!initTestEnv("opencl/statistical/Fisher.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/Fisher.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1087,7 +1090,7 @@ void ScOpenCLTest::testStatisticalFormulaFisher()
void ScOpenCLTest::testStatisticalFormulaFisherInv()
{
- if(!initTestEnv("opencl/statistical/FisherInv.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/FisherInv.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1104,7 +1107,7 @@ void ScOpenCLTest::testStatisticalFormulaFisherInv()
void ScOpenCLTest::testStatisticalFormulaGamma()
{
- if(!initTestEnv("opencl/statistical/Gamma.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/Gamma.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1121,7 +1124,7 @@ void ScOpenCLTest::testStatisticalFormulaGamma()
void ScOpenCLTest::testFinacialFvscheduleFormula()
{
- if(!initTestEnv("opencl/financial/Fvschedule.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/Fvschedule.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1137,7 +1140,7 @@ void ScOpenCLTest::testFinacialFvscheduleFormula()
void ScOpenCLTest::testMathFormulaAbs()
{
- if(!initTestEnv("opencl/math/Abs.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/math/Abs.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1154,7 +1157,7 @@ void ScOpenCLTest::testMathFormulaAbs()
void ScOpenCLTest::testFinacialSYDFormula()
{
- if(!initTestEnv("opencl/financial/SYD.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/SYD.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1172,7 +1175,7 @@ void ScOpenCLTest::testFinacialSYDFormula()
#if !defined MACOSX
void ScOpenCLTest::testFinacialIRRFormula()
{
- if(!initTestEnv("opencl/financial/IRR.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/IRR.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1189,7 +1192,7 @@ void ScOpenCLTest::testFinacialIRRFormula()
void ScOpenCLTest::testStatisticalFormulaGammaLn()
{
- if(!initTestEnv("opencl/statistical/GammaLn.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/GammaLn.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1206,7 +1209,7 @@ void ScOpenCLTest::testStatisticalFormulaGammaLn()
void ScOpenCLTest::testStatisticalFormulaGauss()
{
- if(!initTestEnv("opencl/statistical/Gauss.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/Gauss.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1223,7 +1226,7 @@ void ScOpenCLTest::testStatisticalFormulaGauss()
void ScOpenCLTest::testStatisticalFormulaGeoMean()
{
- if(!initTestEnv("opencl/statistical/GeoMean.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/GeoMean.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1240,7 +1243,7 @@ void ScOpenCLTest::testStatisticalFormulaGeoMean()
void ScOpenCLTest::testStatisticalFormulaHarMean()
{
- if(!initTestEnv("opencl/statistical/HarMean.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/HarMean.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1257,7 +1260,7 @@ void ScOpenCLTest::testStatisticalFormulaHarMean()
void ScOpenCLTest::testFinacialSLNFormula()
{
- if(!initTestEnv("opencl/financial/SLN.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/SLN.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1273,7 +1276,7 @@ void ScOpenCLTest::testFinacialSLNFormula()
void ScOpenCLTest::testFinacialMIRRFormula()
{
- if(!initTestEnv("opencl/financial/MIRR.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/MIRR.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1289,7 +1292,7 @@ void ScOpenCLTest::testFinacialMIRRFormula()
void ScOpenCLTest::testFinancialCoupdaybsFormula()
{
- if(!initTestEnv("opencl/financial/Coupdaybs.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/Coupdaybs.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1305,7 +1308,7 @@ void ScOpenCLTest::testFinancialCoupdaybsFormula()
void ScOpenCLTest::testFinacialDollardeFormula()
{
- if(!initTestEnv("opencl/financial/Dollarde.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/Dollarde.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1321,7 +1324,7 @@ void ScOpenCLTest::testFinacialDollardeFormula()
void ScOpenCLTest::testFinancialCoupdaysFormula()
{
- if(!initTestEnv("opencl/financial/Coupdays.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/Coupdays.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1338,7 +1341,7 @@ void ScOpenCLTest::testFinancialCoupdaysFormula()
void ScOpenCLTest::testFinancialCoupdaysncFormula()
{
- if(!initTestEnv("opencl/financial/Coupdaysnc.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/Coupdaysnc.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1353,7 +1356,7 @@ void ScOpenCLTest::testFinancialCoupdaysncFormula()
}
void ScOpenCLTest::testFinacialRateFormula()
{
- if(!initTestEnv("opencl/financial/RATE.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/RATE.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1369,7 +1372,7 @@ void ScOpenCLTest::testFinacialRateFormula()
void ScOpenCLTest::testFinancialAccrintmFormula()
{
- if(!initTestEnv("opencl/financial/Accrintm.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/Accrintm.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1385,7 +1388,7 @@ void ScOpenCLTest::testFinancialAccrintmFormula()
void ScOpenCLTest::testFinancialCoupnumFormula()
{
- if(!initTestEnv("opencl/financial/Coupnum.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/Coupnum.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1401,7 +1404,7 @@ void ScOpenCLTest::testFinancialCoupnumFormula()
void ScOpenCLTest::testStatisticalFormulaNegbinomdist()
{
- if(!initTestEnv("opencl/statistical/Negbinomdist.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/Negbinomdist.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1418,7 +1421,7 @@ void ScOpenCLTest::testStatisticalFormulaNegbinomdist()
void ScOpenCLTest::testMathFormulaSin()
{
- if(!initTestEnv("opencl/math/sin.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/sin.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1434,7 +1437,7 @@ void ScOpenCLTest::testMathFormulaSin()
void ScOpenCLTest::testMathFormulaSumSQ()
{
- if(!initTestEnv("opencl/math/sumsq.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/sumsq.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1450,7 +1453,7 @@ void ScOpenCLTest::testMathFormulaSumSQ()
void ScOpenCLTest::testMathFormulaTan()
{
- if(!initTestEnv("opencl/math/tan.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/tan.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1466,7 +1469,7 @@ void ScOpenCLTest::testMathFormulaTan()
void ScOpenCLTest::testMathFormulaTanH()
{
- if(!initTestEnv("opencl/math/tanh.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/tanh.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1482,7 +1485,7 @@ void ScOpenCLTest::testMathFormulaTanH()
void ScOpenCLTest::testMathFormulaSqrt()
{
- if(!initTestEnv("opencl/math/sqrt.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/sqrt.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1498,7 +1501,7 @@ void ScOpenCLTest::testMathFormulaSqrt()
void ScOpenCLTest::testFinacialPriceFormula()
{
- if(!initTestEnv("opencl/financial/Price.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/Price.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1514,7 +1517,7 @@ void ScOpenCLTest::testFinacialPriceFormula()
void ScOpenCLTest::testFinacialDollarfrFormula()
{
- if(!initTestEnv("opencl/financial/Dollarfr.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/Dollarfr.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1530,7 +1533,7 @@ void ScOpenCLTest::testFinacialDollarfrFormula()
void ScOpenCLTest::testFinacialPriceDiscFormula()
{
- if(!initTestEnv("opencl/financial/PriceDisc.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/PriceDisc.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1546,7 +1549,7 @@ void ScOpenCLTest::testFinacialPriceDiscFormula()
void ScOpenCLTest::testFinacialODDLPRICEFormula()
{
- if(!initTestEnv("opencl/financial/Oddlprice.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/Oddlprice.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1562,7 +1565,7 @@ void ScOpenCLTest::testFinacialODDLPRICEFormula()
void ScOpenCLTest:: testFinacialOddlyieldFormula()
{
- if(!initTestEnv("opencl/financial/Oddlyield.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/Oddlyield.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1578,7 +1581,7 @@ void ScOpenCLTest:: testFinacialOddlyieldFormula()
void ScOpenCLTest::testFinacialDISCFormula()
{
- if(!initTestEnv("opencl/financial/DISC.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/DISC.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1594,7 +1597,7 @@ void ScOpenCLTest::testFinacialDISCFormula()
void ScOpenCLTest:: testFinacialPVFormula()
{
- if(!initTestEnv("opencl/financial/PV.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/PV.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1610,7 +1613,7 @@ void ScOpenCLTest:: testFinacialPVFormula()
void ScOpenCLTest::testFinacialINTRATEFormula()
{
- if(!initTestEnv("opencl/financial/INTRATE.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/INTRATE.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1626,7 +1629,7 @@ void ScOpenCLTest::testFinacialINTRATEFormula()
void ScOpenCLTest::testStatisticalFormulaStandard()
{
- if(!initTestEnv("opencl/statistical/Standard.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/Standard.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1643,7 +1646,7 @@ void ScOpenCLTest::testStatisticalFormulaStandard()
void ScOpenCLTest::testStatisticalFormulaWeibull()
{
- if(!initTestEnv("opencl/statistical/Weibull.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/Weibull.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1661,7 +1664,7 @@ void ScOpenCLTest::testStatisticalFormulaWeibull()
void ScOpenCLTest::testStatisticalFormulaVar()
{
- if(!initTestEnv("opencl/statistical/Var.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/Var.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1678,7 +1681,7 @@ void ScOpenCLTest::testStatisticalFormulaVar()
void ScOpenCLTest::testStatisticalFormulaSkew()
{
- if(!initTestEnv("opencl/statistical/Skew.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/Skew.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1695,7 +1698,7 @@ void ScOpenCLTest::testStatisticalFormulaSkew()
void ScOpenCLTest::testStatisticalFormulaSkewp()
{
- if(!initTestEnv("opencl/statistical/Skewp.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/Skewp.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1712,7 +1715,7 @@ void ScOpenCLTest::testStatisticalFormulaSkewp()
void ScOpenCLTest::testStatisticalFormulaPearson()
{
- if(!initTestEnv("opencl/statistical/Pearson.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/Pearson.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1729,7 +1732,7 @@ void ScOpenCLTest::testStatisticalFormulaPearson()
void ScOpenCLTest::testStatisticalFormulaRsq()
{
- if(!initTestEnv("opencl/statistical/Rsq.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/Rsq.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1746,7 +1749,7 @@ void ScOpenCLTest::testStatisticalFormulaRsq()
void ScOpenCLTest::testMathFormulaTrunc()
{
- if(!initTestEnv("opencl/math/trunc.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/trunc.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1762,7 +1765,7 @@ void ScOpenCLTest::testMathFormulaTrunc()
void ScOpenCLTest::testMathFormulaCosh()
{
- if(!initTestEnv("opencl/math/cosh.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/cosh.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1777,7 +1780,7 @@ void ScOpenCLTest::testMathFormulaCosh()
}
void ScOpenCLTest::testStatisticalFormulaCovar()
{
- if(!initTestEnv("opencl/statistical/Covar.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/Covar.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1794,7 +1797,7 @@ void ScOpenCLTest::testStatisticalFormulaCovar()
void ScOpenCLTest::testStatisticalFormulaKurt()
{
- if(!initTestEnv("opencl/statistical/Kurt.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/Kurt.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1811,7 +1814,7 @@ void ScOpenCLTest::testStatisticalFormulaKurt()
void ScOpenCLTest::testMathFormulaCot()
{
- if(!initTestEnv("opencl/math/cot.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/math/cot.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1827,7 +1830,7 @@ void ScOpenCLTest::testMathFormulaCot()
void ScOpenCLTest::testStatisticalFormulaDevSq()
{
- if(!initTestEnv("opencl/statistical/DevSq.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/DevSq.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1844,7 +1847,7 @@ void ScOpenCLTest::testStatisticalFormulaDevSq()
void ScOpenCLTest::testMathFormulaCsc()
{
- if(!initTestEnv("opencl/math/csc.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/math/csc.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1860,7 +1863,7 @@ void ScOpenCLTest::testMathFormulaCsc()
void ScOpenCLTest::testMathFormulaCoth()
{
- if(!initTestEnv("opencl/math/coth.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/math/coth.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1876,7 +1879,7 @@ void ScOpenCLTest::testMathFormulaCoth()
void ScOpenCLTest::testFinacialXNPVFormula()
{
- if(!initTestEnv("opencl/financial/XNPV.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/XNPV.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1899,7 +1902,7 @@ void ScOpenCLTest::testFinacialXNPVFormula()
void ScOpenCLTest::testStatisticalFormulaIntercept()
{
- if(!initTestEnv("opencl/statistical/Intercept.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/Intercept.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1915,7 +1918,7 @@ void ScOpenCLTest::testStatisticalFormulaIntercept()
void ScOpenCLTest::testFinancialAmordegrcFormula()
{
- if(!initTestEnv("opencl/financial/Amordegrc.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/Amordegrc.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1931,7 +1934,7 @@ void ScOpenCLTest::testFinancialAmordegrcFormula()
void ScOpenCLTest:: testFinancialISPMTFormula()
{
- if(!initTestEnv("opencl/financial/ISPMT.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/ISPMT.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1947,7 +1950,7 @@ void ScOpenCLTest:: testFinancialISPMTFormula()
void ScOpenCLTest::testStatisticalFormulaMedian()
{
- if(!initTestEnv("opencl/statistical/Median.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/Median.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1964,7 +1967,7 @@ void ScOpenCLTest::testStatisticalFormulaMedian()
void ScOpenCLTest::testStatisticalFormulaNormdist()
{
- if(!initTestEnv("opencl/statistical/Normdist.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/Normdist.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1981,7 +1984,7 @@ void ScOpenCLTest::testStatisticalFormulaNormdist()
void ScOpenCLTest::testStatisticalFormulaNormsdist()
{
- if(!initTestEnv("opencl/statistical/Normsdist.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/Normsdist.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -1998,7 +2001,7 @@ void ScOpenCLTest::testStatisticalFormulaNormsdist()
void ScOpenCLTest::testStatisticalFormulaPermut()
{
- if(!initTestEnv("opencl/statistical/Permut.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/Permut.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2015,7 +2018,7 @@ void ScOpenCLTest::testStatisticalFormulaPermut()
void ScOpenCLTest::testStatisticalFormulaPermutation()
{
- if(!initTestEnv("opencl/statistical/Permutation.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/Permutation.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2032,7 +2035,7 @@ void ScOpenCLTest::testStatisticalFormulaPermutation()
void ScOpenCLTest::testStatisticalFormulaPhi()
{
- if(!initTestEnv("opencl/statistical/Phi.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/Phi.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2049,7 +2052,7 @@ void ScOpenCLTest::testStatisticalFormulaPhi()
void ScOpenCLTest::testMathFormulaCscH()
{
- if(!initTestEnv("opencl/math/csch.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/math/csch.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2065,7 +2068,7 @@ void ScOpenCLTest::testMathFormulaCscH()
void ScOpenCLTest::testStatisticalFormulaLogInv()
{
- if(!initTestEnv("opencl/statistical/LogInv.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/LogInv.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2082,7 +2085,7 @@ void ScOpenCLTest::testStatisticalFormulaLogInv()
void ScOpenCLTest::testFinacialNPERFormula()
{
- if(!initTestEnv("opencl/financial/NPER.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/NPER.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2098,7 +2101,7 @@ void ScOpenCLTest::testFinacialNPERFormula()
void ScOpenCLTest::testStatisticalFormulaForecast()
{
- if(!initTestEnv("opencl/statistical/Forecast.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/Forecast.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2115,7 +2118,7 @@ void ScOpenCLTest::testStatisticalFormulaForecast()
void ScOpenCLTest::testFinancialAmorlincFormula()
{
- if(!initTestEnv("opencl/financial/Amorlinc.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/Amorlinc.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2131,7 +2134,7 @@ void ScOpenCLTest::testFinancialAmorlincFormula()
void ScOpenCLTest::testFinancialDDBFormula()
{
- if(!initTestEnv("opencl/financial/ddb.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/ddb.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2146,7 +2149,7 @@ void ScOpenCLTest::testFinancialDDBFormula()
}
void ScOpenCLTest::testFinacialPriceMatFormula()
{
- if(!initTestEnv("opencl/financial/PriceMat.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/PriceMat.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2161,7 +2164,7 @@ void ScOpenCLTest::testFinacialPriceMatFormula()
}
void ScOpenCLTest::testFinacialFormulaReceived()
{
- if(!initTestEnv("opencl/financial/Received.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/Received.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2177,7 +2180,7 @@ void ScOpenCLTest::testFinacialFormulaReceived()
}
void ScOpenCLTest::testFinancialFormulaCumipmt()
{
- if(!initTestEnv("opencl/financial/Cumipmt.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/Cumipmt.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2193,7 +2196,7 @@ void ScOpenCLTest::testFinancialFormulaCumipmt()
}
void ScOpenCLTest::testFinancialFormulaCumprinc()
{
- if(!initTestEnv("opencl/financial/Cumprinc.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/Cumprinc.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2209,7 +2212,7 @@ void ScOpenCLTest::testFinancialFormulaCumprinc()
}
void ScOpenCLTest::testFinacialRRIFormula()
{
- if(!initTestEnv("opencl/financial/RRI.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/RRI.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2224,7 +2227,7 @@ void ScOpenCLTest::testFinacialRRIFormula()
}
void ScOpenCLTest::testFinacialEFFECT_ADDFormula()
{
- if(!initTestEnv("opencl/financial/EFFECT_ADD.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/EFFECT_ADD.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2239,7 +2242,7 @@ void ScOpenCLTest::testFinacialEFFECT_ADDFormula()
}
void ScOpenCLTest::testFinacialNominalFormula()
{
- if(!initTestEnv("opencl/financial/Nominal.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/Nominal.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2256,7 +2259,7 @@ void ScOpenCLTest::testFinacialNominalFormula()
}
void ScOpenCLTest::testFinacialTBILLEQFormula()
{
- if(!initTestEnv("opencl/financial/TBILLEQ.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/TBILLEQ.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2271,7 +2274,7 @@ void ScOpenCLTest::testFinacialTBILLEQFormula()
}
void ScOpenCLTest::testFinacialTBILLPRICEFormula()
{
- if(!initTestEnv("opencl/financial/TBILLPRICE.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/TBILLPRICE.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2286,7 +2289,7 @@ void ScOpenCLTest::testFinacialTBILLPRICEFormula()
}
void ScOpenCLTest::testFinacialTBILLYIELDFormula()
{
- if(!initTestEnv("opencl/financial/TBILLYIELD.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/TBILLYIELD.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2301,7 +2304,7 @@ void ScOpenCLTest::testFinacialTBILLYIELDFormula()
}
void ScOpenCLTest::testFinacialYIELDFormula()
{
- if(!initTestEnv("opencl/financial/YIELD.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/YIELD.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2317,7 +2320,7 @@ void ScOpenCLTest::testFinacialYIELDFormula()
void ScOpenCLTest::testFinacialYIELDDISCFormula()
{
- if(!initTestEnv("opencl/financial/YIELDDISC.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/YIELDDISC.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2333,7 +2336,7 @@ void ScOpenCLTest::testFinacialYIELDDISCFormula()
void ScOpenCLTest::testFinacialYIELDMATFormula()
{
- if(!initTestEnv("opencl/financial/YIELDMAT.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/YIELDMAT.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2348,7 +2351,7 @@ void ScOpenCLTest::testFinacialYIELDMATFormula()
}
void ScOpenCLTest:: testFinacialPMTFormula()
{
- if(!initTestEnv("opencl/financial/PMT.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/PMT.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2364,7 +2367,7 @@ void ScOpenCLTest:: testFinacialPMTFormula()
void ScOpenCLTest:: testFinancialDurationFormula()
{
- if(!initTestEnv("opencl/financial/Duration.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/financial/Duration.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2380,7 +2383,7 @@ void ScOpenCLTest:: testFinancialDurationFormula()
void ScOpenCLTest::testStatisticalFormulaLogNormDist()
{
- if(!initTestEnv("opencl/statistical/LogNormDist.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/statistical/LogNormDist.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2397,7 +2400,7 @@ void ScOpenCLTest::testStatisticalFormulaLogNormDist()
void ScOpenCLTest::testMathFormulaArcCos()
{
- if(!initTestEnv("opencl/math/ArcCos.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/math/ArcCos.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2414,7 +2417,7 @@ void ScOpenCLTest::testMathFormulaArcCos()
void ScOpenCLTest::testMathFormulaPower()
{
- if(!initTestEnv("opencl/math/power.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/math/power.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2430,7 +2433,7 @@ void ScOpenCLTest::testMathFormulaPower()
void ScOpenCLTest:: testFinacialPPMTFormula()
{
- if(!initTestEnv("opencl/financial/PPMT.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/PPMT.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2446,7 +2449,7 @@ void ScOpenCLTest:: testFinacialPPMTFormula()
void ScOpenCLTest:: testFinacialNPVFormula()
{
- if(!initTestEnv("opencl/financial/NPV.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/NPV.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2462,7 +2465,7 @@ void ScOpenCLTest:: testFinacialNPVFormula()
void ScOpenCLTest:: testFinancialDuration_ADDFormula()
{
- if(!initTestEnv("opencl/financial/Duration_ADD.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/Duration_ADD.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2478,7 +2481,7 @@ void ScOpenCLTest:: testFinancialDuration_ADDFormula()
void ScOpenCLTest::testStatisticalFormulaNorminv()
{
- if(!initTestEnv("opencl/statistical/Norminv.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/Norminv.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2495,7 +2498,7 @@ void ScOpenCLTest::testStatisticalFormulaNorminv()
void ScOpenCLTest::testStatisticalFormulaNormsinv()
{
- if(!initTestEnv("opencl/statistical/Normsinv.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/Normsinv.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2512,7 +2515,7 @@ void ScOpenCLTest::testStatisticalFormulaNormsinv()
void ScOpenCLTest::testMathFormulaArcCosHyp()
{
- if(!initTestEnv("opencl/math/ArcCosHyp.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/math/ArcCosHyp.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2529,7 +2532,7 @@ void ScOpenCLTest::testMathFormulaArcCosHyp()
void ScOpenCLTest:: testFinancialMDurationFormula()
{
- if(!initTestEnv("opencl/financial/MDuration.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/MDuration.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2545,7 +2548,7 @@ void ScOpenCLTest:: testFinancialMDurationFormula()
void ScOpenCLTest::testMathFormulaArcCot()
{
- if(!initTestEnv("opencl/math/ArcCot.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/math/ArcCot.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2562,7 +2565,7 @@ void ScOpenCLTest::testMathFormulaArcCot()
void ScOpenCLTest:: testFinancialFVFormula()
{
- if(!initTestEnv("opencl/financial/FV.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/FV.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2578,7 +2581,7 @@ void ScOpenCLTest:: testFinancialFVFormula()
void ScOpenCLTest::testFinancialDBFormula()
{
- if(!initTestEnv("opencl/financial/db.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/db.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2594,7 +2597,7 @@ void ScOpenCLTest::testFinancialDBFormula()
void ScOpenCLTest::testFinancialCouppcdFormula()
{
- if(!initTestEnv("opencl/financial/Couppcd.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/Couppcd.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2610,7 +2613,7 @@ void ScOpenCLTest::testFinancialCouppcdFormula()
void ScOpenCLTest::testMathSumIfsFormula()
{
- if(!initTestEnv("opencl/math/sumifs.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/sumifs.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2644,7 +2647,7 @@ void ScOpenCLTest::testMathSumIfsFormula()
void ScOpenCLTest::testMathFormulaArcCotHyp()
{
- if(!initTestEnv("opencl/math/ArcCotHyp.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/math/ArcCotHyp.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2661,7 +2664,7 @@ void ScOpenCLTest::testMathFormulaArcCotHyp()
void ScOpenCLTest::testMathFormulaArcSin()
{
- if(!initTestEnv("opencl/math/ArcSin.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/math/ArcSin.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2678,7 +2681,7 @@ void ScOpenCLTest::testMathFormulaArcSin()
void ScOpenCLTest:: testFinancialVDBFormula()
{
- if(!initTestEnv("opencl/financial/VDB.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/VDB.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2706,7 +2709,7 @@ void ScOpenCLTest:: testFinancialVDBFormula()
void ScOpenCLTest:: testFinancialIPMTFormula()
{
- if(!initTestEnv("opencl/financial/IPMT.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/IPMT.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2722,7 +2725,7 @@ void ScOpenCLTest:: testFinancialIPMTFormula()
void ScOpenCLTest::testStatisticalFormulaChiSqDist()
{
- if(!initTestEnv("opencl/statistical/CHISQDIST.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/statistical/CHISQDIST.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2745,7 +2748,7 @@ void ScOpenCLTest::testStatisticalFormulaChiSqDist()
void ScOpenCLTest::testStatisticalFormulaConfidence()
{
- if(!initTestEnv("opencl/statistical/Confidence.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/Confidence.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2762,7 +2765,7 @@ void ScOpenCLTest::testStatisticalFormulaConfidence()
void ScOpenCLTest::testStatisticalFormulaFDist()
{
- if(!initTestEnv("opencl/statistical/Fdist.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/Fdist.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2779,7 +2782,7 @@ void ScOpenCLTest::testStatisticalFormulaFDist()
void ScOpenCLTest::testFinancialCoupncdFormula()
{
- if(!initTestEnv("opencl/financial/Coupncd.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/Coupncd.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2795,7 +2798,7 @@ void ScOpenCLTest::testFinancialCoupncdFormula()
void ScOpenCLTest::testFinancialAccrintFormula()
{
- if(!initTestEnv("opencl/financial/Accrint.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/Accrint.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2811,7 +2814,7 @@ void ScOpenCLTest::testFinancialAccrintFormula()
void ScOpenCLTest::testStatisticalFormulaCritBinom()
{
- if(!initTestEnv("opencl/statistical/CritBinom.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/CritBinom.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2828,7 +2831,7 @@ void ScOpenCLTest::testStatisticalFormulaCritBinom()
void ScOpenCLTest::testMathFormulaArcSinHyp()
{
- if(!initTestEnv("opencl/math/ArcSinHyp.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/math/ArcSinHyp.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2845,7 +2848,7 @@ void ScOpenCLTest::testMathFormulaArcSinHyp()
void ScOpenCLTest::testMathFormulaArcTan()
{
- if(!initTestEnv("opencl/math/ArcTan.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/math/ArcTan.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2862,7 +2865,7 @@ void ScOpenCLTest::testMathFormulaArcTan()
void ScOpenCLTest::testMathFormulaArcTanHyp()
{
- if(!initTestEnv("opencl/math/ArcTanHyp.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/math/ArcTanHyp.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2879,7 +2882,7 @@ void ScOpenCLTest::testMathFormulaArcTanHyp()
void ScOpenCLTest:: testFinacialNPER1Formula()
{
- if(!initTestEnv("opencl/financial/NPER1.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/NPER1.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2895,7 +2898,7 @@ void ScOpenCLTest:: testFinacialNPER1Formula()
void ScOpenCLTest::testMathFormulaArcTan2()
{
- if(!initTestEnv("opencl/math/ArcTan2.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/math/ArcTan2.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2912,7 +2915,7 @@ void ScOpenCLTest::testMathFormulaArcTan2()
void ScOpenCLTest::testStatisticalFormulaChiSqInv()
{
- if(!initTestEnv("opencl/statistical/CHISQINV.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/statistical/CHISQINV.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2929,7 +2932,7 @@ void ScOpenCLTest::testStatisticalFormulaChiSqInv()
void ScOpenCLTest::testMathFormulaBitAnd()
{
- if(!initTestEnv("opencl/math/BitAnd.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/math/BitAnd.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2946,7 +2949,7 @@ void ScOpenCLTest::testMathFormulaBitAnd()
void ScOpenCLTest::testStatisticalFormulaPoisson()
{
- if(!initTestEnv("opencl/statistical/Poisson.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/Poisson.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2963,7 +2966,7 @@ void ScOpenCLTest::testStatisticalFormulaPoisson()
void ScOpenCLTest::testStatisticalFormulaExpondist()
{
- if(!initTestEnv("opencl/statistical/Expondist.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/Expondist.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2980,7 +2983,7 @@ void ScOpenCLTest::testStatisticalFormulaExpondist()
void ScOpenCLTest::testMathFormulaBitOr()
{
- if(!initTestEnv("opencl/math/BitOr.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/math/BitOr.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -2997,7 +3000,7 @@ void ScOpenCLTest::testMathFormulaBitOr()
void ScOpenCLTest::testMathFormulaOdd()
{
- if(!initTestEnv("opencl/math/odd.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/odd.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3013,7 +3016,7 @@ void ScOpenCLTest::testMathFormulaOdd()
void ScOpenCLTest::testMathFormulaLN()
{
- if(!initTestEnv("opencl/math/LN.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/LN.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3030,7 +3033,7 @@ void ScOpenCLTest::testMathFormulaLN()
void ScOpenCLTest::testMathFormulaMod()
{
- if(!initTestEnv("opencl/math/mod.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/mod.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3049,7 +3052,7 @@ void ScOpenCLTest::testMathFormulaMod()
void ScOpenCLTest::testMathFormulaRound()
{
- if(!initTestEnv("opencl/math/ROUND.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/ROUND.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3072,7 +3075,7 @@ void ScOpenCLTest::testMathFormulaRound()
void ScOpenCLTest::testStatisticalFormulaGammaDist()
{
- if(!initTestEnv("opencl/statistical/GammaDist.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/GammaDist.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3089,7 +3092,7 @@ void ScOpenCLTest::testStatisticalFormulaGammaDist()
void ScOpenCLTest::testStatisticalFormulaGammaInv()
{
- if(!initTestEnv("opencl/statistical/GammaInv.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/GammaInv.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3109,7 +3112,7 @@ void ScOpenCLTest::testStatisticalFormulaGammaInv()
void ScOpenCLTest::testStatisticalFormulaFInv()
{
- if(!initTestEnv("opencl/statistical/FInv.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/FInv.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3129,7 +3132,7 @@ void ScOpenCLTest::testStatisticalFormulaFInv()
void ScOpenCLTest::testStatisticalFormulaFTest()
{
- if(!initTestEnv("opencl/statistical/FTest.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/FTest.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3146,7 +3149,7 @@ void ScOpenCLTest::testStatisticalFormulaFTest()
void ScOpenCLTest::testStatisticalFormulaB()
{
- if(!initTestEnv("opencl/statistical/B.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/B.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3166,7 +3169,7 @@ void ScOpenCLTest::testStatisticalFormulaB()
void ScOpenCLTest::testStatisticalFormulaBetaDist()
{
- if(!initTestEnv("opencl/statistical/BetaDist.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/statistical/BetaDist.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3186,7 +3189,7 @@ void ScOpenCLTest::testStatisticalFormulaBetaDist()
void ScOpenCLTest::testMathFormulaEven()
{
- if(!initTestEnv("opencl/math/even.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/even.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3202,7 +3205,7 @@ void ScOpenCLTest::testMathFormulaEven()
void ScOpenCLTest::testMathFormulaExp()
{
- if(!initTestEnv("opencl/math/exp.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/math/exp.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3218,7 +3221,7 @@ void ScOpenCLTest::testMathFormulaExp()
void ScOpenCLTest::testStatisticalFormulaChiDist()
{
- if(!initTestEnv("opencl/statistical/ChiDist.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/ChiDist.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3235,7 +3238,7 @@ void ScOpenCLTest::testStatisticalFormulaChiDist()
void ScOpenCLTest::testMathFormulaBitLshift()
{
- if(!initTestEnv("opencl/math/BitLshift.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/math/BitLshift.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3252,7 +3255,7 @@ void ScOpenCLTest::testMathFormulaBitLshift()
void ScOpenCLTest::testMathFormulaBitRshift()
{
- if(!initTestEnv("opencl/math/BitRshift.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/math/BitRshift.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3269,7 +3272,7 @@ void ScOpenCLTest::testMathFormulaBitRshift()
void ScOpenCLTest::testMathFormulaFloor()
{
- if(!initTestEnv("opencl/math/floor.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/math/floor.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3285,7 +3288,7 @@ void ScOpenCLTest::testMathFormulaFloor()
void ScOpenCLTest::testMathFormulaLog()
{
- if(!initTestEnv("opencl/math/log.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/log.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3301,7 +3304,7 @@ void ScOpenCLTest::testMathFormulaLog()
void ScOpenCLTest::testSpreadSheetFormulaVLookup()
{
- if(!initTestEnv("opencl/spreadsheet/VLookup.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/spreadsheet/VLookup.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3324,7 +3327,7 @@ void ScOpenCLTest::testSpreadSheetFormulaVLookup()
void ScOpenCLTest::testStatisticalFormulaChiInv()
{
- if(!initTestEnv("opencl/statistical/ChiInv.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/ChiInv.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3341,7 +3344,7 @@ void ScOpenCLTest::testStatisticalFormulaChiInv()
void ScOpenCLTest::testMathFormulaConvert()
{
- if(!initTestEnv("opencl/math/convert.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/convert.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3357,7 +3360,7 @@ void ScOpenCLTest::testMathFormulaConvert()
void ScOpenCLTest::testMathCountIfsFormula()
{
- if(!initTestEnv("opencl/math/countifs.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/countifs.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3373,7 +3376,7 @@ void ScOpenCLTest::testMathCountIfsFormula()
void ScOpenCLTest::testMathFormulaBitXor()
{
- if(!initTestEnv("opencl/math/BitXor.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/math/BitXor.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3390,7 +3393,7 @@ void ScOpenCLTest::testMathFormulaBitXor()
void ScOpenCLTest::testMathAverageIfsFormula()
{
- if(!initTestEnv("opencl/math/averageifs.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/averageifs.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3407,7 +3410,7 @@ void ScOpenCLTest::testMathAverageIfsFormula()
void ScOpenCLTest::testMathFormulaLog10()
{
- if(!initTestEnv("opencl/math/log10.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/math/log10.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3423,7 +3426,7 @@ void ScOpenCLTest::testMathFormulaLog10()
void ScOpenCLTest::testMathFormulaCombina()
{
- if(!initTestEnv("opencl/math/combina.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/combina.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3439,7 +3442,7 @@ void ScOpenCLTest::testMathFormulaCombina()
void ScOpenCLTest::testMathFormulaCeil()
{
- if(!initTestEnv("opencl/math/Ceil.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/math/Ceil.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3456,7 +3459,7 @@ void ScOpenCLTest::testMathFormulaCeil()
void ScOpenCLTest::testMathFormulaSqrtPi()
{
- if(!initTestEnv("opencl/math/sqrtpi.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/sqrtpi.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3472,7 +3475,7 @@ void ScOpenCLTest::testMathFormulaSqrtPi()
void ScOpenCLTest::testStatisticalFormulaVarP()
{
- if(!initTestEnv("opencl/statistical/VarP.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/VarP.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3489,7 +3492,7 @@ void ScOpenCLTest::testStatisticalFormulaVarP()
void ScOpenCLTest::testStatisticalFormulaStDev()
{
- if(!initTestEnv("opencl/statistical/StDev.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/StDev.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3506,7 +3509,7 @@ void ScOpenCLTest::testStatisticalFormulaStDev()
void ScOpenCLTest::testStatisticalFormulaStDevP()
{
- if(!initTestEnv("opencl/statistical/StDevP.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/StDevP.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3523,7 +3526,7 @@ void ScOpenCLTest::testStatisticalFormulaStDevP()
void ScOpenCLTest::testStatisticalFormulaSlope()
{
- if(!initTestEnv("opencl/statistical/Slope.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/Slope.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3540,7 +3543,7 @@ void ScOpenCLTest::testStatisticalFormulaSlope()
void ScOpenCLTest::testStatisticalFormulaSTEYX()
{
- if(!initTestEnv("opencl/statistical/STEYX.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/STEYX.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3557,7 +3560,7 @@ void ScOpenCLTest::testStatisticalFormulaSTEYX()
void ScOpenCLTest::testStatisticalFormulaZTest()
{
- if(!initTestEnv("opencl/statistical/ZTest.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/ZTest.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3574,7 +3577,7 @@ void ScOpenCLTest::testStatisticalFormulaZTest()
void ScOpenCLTest::testStatisticalFormulaTTest()
{
- if(!initTestEnv("opencl/statistical/TTest.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/TTest.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3591,7 +3594,7 @@ void ScOpenCLTest::testStatisticalFormulaTTest()
void ScOpenCLTest::testStatisticalFormulaTDist()
{
- if(!initTestEnv("opencl/statistical/TDist.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/TDist.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3608,7 +3611,7 @@ void ScOpenCLTest::testStatisticalFormulaTDist()
void ScOpenCLTest::testStatisticalFormulaTInv()
{
- if(!initTestEnv("opencl/statistical/TInv.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/TInv.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3625,7 +3628,7 @@ void ScOpenCLTest::testStatisticalFormulaTInv()
void ScOpenCLTest::testStatisticalFormulaBinomDist()
{
- if(!initTestEnv("opencl/statistical/BinomDist.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/BinomDist.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3642,7 +3645,7 @@ void ScOpenCLTest::testStatisticalFormulaBinomDist()
void ScOpenCLTest::testMathFormulaProduct()
{
- if(!initTestEnv("opencl/math/product.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/product.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3677,7 +3680,7 @@ void ScOpenCLTest::testMathFormulaKombin()
void ScOpenCLTest:: testArrayFormulaSumX2MY2()
{
- if(!initTestEnv("opencl/array/SUMX2MY2.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/array/SUMX2MY2.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3699,7 +3702,7 @@ void ScOpenCLTest:: testArrayFormulaSumX2MY2()
void ScOpenCLTest::testStatisticalFormulaHypGeomDist()
{
- if(!initTestEnv("opencl/statistical/HypGeomDist.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/HypGeomDist.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3716,7 +3719,7 @@ void ScOpenCLTest::testStatisticalFormulaHypGeomDist()
void ScOpenCLTest:: testArrayFormulaSumX2PY2()
{
- if(!initTestEnv("opencl/array/SUMX2PY2.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/array/SUMX2PY2.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3738,7 +3741,7 @@ void ScOpenCLTest:: testArrayFormulaSumX2PY2()
void ScOpenCLTest::testStatisticalFormulaBetainv()
{
- if(!initTestEnv("opencl/statistical/Betainv.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/Betainv.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3755,7 +3758,7 @@ void ScOpenCLTest::testStatisticalFormulaBetainv()
void ScOpenCLTest::testStatisticalFormulaMina()
{
- if(!initTestEnv("opencl/statistical/Mina.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/Mina.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3771,7 +3774,7 @@ void ScOpenCLTest::testStatisticalFormulaMina()
void ScOpenCLTest:: testArrayFormulaSumXMY2()
{
- if(!initTestEnv("opencl/array/SUMXMY2.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/array/SUMXMY2.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3793,7 +3796,7 @@ void ScOpenCLTest:: testArrayFormulaSumXMY2()
void ScOpenCLTest::testStatisticalFormulaCountA()
{
- if(!initTestEnv("opencl/statistical/counta.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/counta.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3809,7 +3812,7 @@ void ScOpenCLTest::testStatisticalFormulaCountA()
void ScOpenCLTest::testStatisticalFormulaMaxa()
{
- if(!initTestEnv("opencl/statistical/Maxa.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/Maxa.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3825,7 +3828,7 @@ void ScOpenCLTest::testStatisticalFormulaMaxa()
void ScOpenCLTest::testMathFormulaSumProduct()
{
- if(!initTestEnv("opencl/math/sumproduct_mixSliding.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/sumproduct_mixSliding.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3855,7 +3858,7 @@ void ScOpenCLTest::testMathFormulaSumProduct()
void ScOpenCLTest::testMathFormulaAverageIf()
{
- if(!initTestEnv("opencl/math/averageif.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/averageif.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3871,7 +3874,7 @@ void ScOpenCLTest::testMathFormulaAverageIf()
void ScOpenCLTest::testStatisticalFormulaAverageA()
{
- if(!initTestEnv("opencl/statistical/AverageA.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/AverageA.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3887,7 +3890,7 @@ void ScOpenCLTest::testStatisticalFormulaAverageA()
void ScOpenCLTest:: testLogicalFormulaAnd()
{
- if(!initTestEnv("opencl/logical/and.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/logical/and.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3909,7 +3912,7 @@ void ScOpenCLTest:: testLogicalFormulaAnd()
void ScOpenCLTest::testStatisticalFormulaVarA()
{
- if(!initTestEnv("opencl/statistical/VarA.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/VarA.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3926,7 +3929,7 @@ void ScOpenCLTest::testStatisticalFormulaVarA()
void ScOpenCLTest::testStatisticalFormulaVarPA()
{
- if(!initTestEnv("opencl/statistical/VarPA.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/VarPA.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3942,7 +3945,7 @@ void ScOpenCLTest::testStatisticalFormulaVarPA()
void ScOpenCLTest::testStatisticalFormulaStDevA()
{
- if(!initTestEnv("opencl/statistical/StDevA.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/StDevA.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3959,7 +3962,7 @@ void ScOpenCLTest::testStatisticalFormulaStDevA()
void ScOpenCLTest::testStatisticalFormulaStDevPA()
{
- if(!initTestEnv("opencl/statistical/StDevPA.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/StDevPA.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3976,7 +3979,7 @@ void ScOpenCLTest::testStatisticalFormulaStDevPA()
void ScOpenCLTest:: testFinancialMDurationFormula1()
{
- if(!initTestEnv("opencl/financial/MDuration1.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/financial/MDuration1.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -3992,7 +3995,7 @@ void ScOpenCLTest:: testFinancialMDurationFormula1()
void ScOpenCLTest::testMathFormulaSumProduct2()
{
- if(!initTestEnv("opencl/math/sumproductTest.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/sumproductTest.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4009,7 +4012,7 @@ void ScOpenCLTest::testMathFormulaSumProduct2()
void ScOpenCLTest:: testStatisticalParallelCountBug()
{
- if(!initTestEnv("opencl/statistical/parallel_count_bug_243.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/statistical/parallel_count_bug_243.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4025,7 +4028,7 @@ void ScOpenCLTest:: testStatisticalParallelCountBug()
void ScOpenCLTest:: testLogicalFormulaOr()
{
- if(!initTestEnv("opencl/logical/or.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/logical/or.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4041,7 +4044,7 @@ void ScOpenCLTest:: testLogicalFormulaOr()
void ScOpenCLTest:: testLogicalFormulaNot()
{
- if(!initTestEnv("opencl/logical/not.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/logical/not.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4057,7 +4060,7 @@ void ScOpenCLTest:: testLogicalFormulaNot()
void ScOpenCLTest:: testLogicalFormulaXor()
{
- if(!initTestEnv("opencl/logical/xor.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/logical/xor.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4073,7 +4076,7 @@ void ScOpenCLTest:: testLogicalFormulaXor()
void ScOpenCLTest::testDatabaseFormulaDcount()
{
- if(!initTestEnv("opencl/database/dcount.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/database/dcount.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4090,7 +4093,7 @@ void ScOpenCLTest::testDatabaseFormulaDcount()
void ScOpenCLTest::testDatabaseFormulaDcountA()
{
- if(!initTestEnv("opencl/database/dcountA.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/database/dcountA.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4107,7 +4110,7 @@ void ScOpenCLTest::testDatabaseFormulaDcountA()
void ScOpenCLTest::testDatabaseFormulaDmax()
{
- if(!initTestEnv("opencl/database/dmax.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/database/dmax.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4124,7 +4127,7 @@ void ScOpenCLTest::testDatabaseFormulaDmax()
void ScOpenCLTest::testDatabaseFormulaDmin()
{
- if(!initTestEnv("opencl/database/dmin.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/database/dmin.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4141,7 +4144,7 @@ void ScOpenCLTest::testDatabaseFormulaDmin()
void ScOpenCLTest::testDatabaseFormulaDproduct()
{
- if(!initTestEnv("opencl/database/dproduct.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/database/dproduct.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4158,7 +4161,7 @@ void ScOpenCLTest::testDatabaseFormulaDproduct()
void ScOpenCLTest::testDatabaseFormulaDaverage()
{
- if(!initTestEnv("opencl/database/daverage.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/database/daverage.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4176,7 +4179,7 @@ void ScOpenCLTest::testDatabaseFormulaDaverage()
void ScOpenCLTest::testDatabaseFormulaDstdev()
{
- if(!initTestEnv("opencl/database/dstdev.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/database/dstdev.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4194,7 +4197,7 @@ void ScOpenCLTest::testDatabaseFormulaDstdev()
void ScOpenCLTest::testDatabaseFormulaDstdevp()
{
- if(!initTestEnv("opencl/database/dstdevp.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/database/dstdevp.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4212,7 +4215,7 @@ void ScOpenCLTest::testDatabaseFormulaDstdevp()
void ScOpenCLTest::testDatabaseFormulaDsum()
{
- if(!initTestEnv("opencl/database/dsum.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/database/dsum.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4230,7 +4233,7 @@ void ScOpenCLTest::testDatabaseFormulaDsum()
void ScOpenCLTest::testDatabaseFormulaDvar()
{
- if(!initTestEnv("opencl/database/dvar.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/database/dvar.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4248,7 +4251,7 @@ void ScOpenCLTest::testDatabaseFormulaDvar()
void ScOpenCLTest::testDatabaseFormulaDvarp()
{
- if(!initTestEnv("opencl/database/dvarp.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/database/dvarp.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4265,7 +4268,7 @@ void ScOpenCLTest::testDatabaseFormulaDvarp()
void ScOpenCLTest::testMathFormulaRoundUp()
{
- if(!initTestEnv("opencl/math/roundup.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/roundup.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4282,7 +4285,7 @@ void ScOpenCLTest::testMathFormulaRoundUp()
void ScOpenCLTest::testMathFormulaRoundDown()
{
- if(!initTestEnv("opencl/math/rounddown.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/rounddown.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4299,7 +4302,7 @@ void ScOpenCLTest::testMathFormulaRoundDown()
void ScOpenCLTest::testMathFormulaInt()
{
- if(!initTestEnv("opencl/math/int.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/int.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4316,7 +4319,7 @@ void ScOpenCLTest::testMathFormulaInt()
void ScOpenCLTest::testMathFormulaRadians()
{
- if(!initTestEnv("opencl/math/radians.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/radians.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4333,7 +4336,7 @@ void ScOpenCLTest::testMathFormulaRadians()
void ScOpenCLTest::testMathFormulaDegrees()
{
- if(!initTestEnv("opencl/math/degrees.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/degrees.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4349,7 +4352,7 @@ void ScOpenCLTest::testMathFormulaDegrees()
void ScOpenCLTest::testMathFormulaIsEven()
{
- if(!initTestEnv("opencl/math/iseven.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/iseven.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4366,7 +4369,7 @@ void ScOpenCLTest::testMathFormulaIsEven()
void ScOpenCLTest::testMathFormulaCountIf()
{
- if(!initTestEnv("opencl/math/countif.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/countif.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4382,7 +4385,7 @@ void ScOpenCLTest::testMathFormulaCountIf()
void ScOpenCLTest::testMathFormulaIsOdd()
{
- if(!initTestEnv("opencl/math/isodd.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/isodd.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4399,7 +4402,7 @@ void ScOpenCLTest::testMathFormulaIsOdd()
void ScOpenCLTest::testMathFormulaFact()
{
- if(!initTestEnv("opencl/math/fact.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/fact.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4415,7 +4418,7 @@ void ScOpenCLTest::testMathFormulaFact()
void ScOpenCLTest::testMathFormulaSEC()
{
- if(!initTestEnv("opencl/math/sec.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/math/sec.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4431,7 +4434,7 @@ void ScOpenCLTest::testMathFormulaSEC()
void ScOpenCLTest::testMathFormulaSECH()
{
- if(!initTestEnv("opencl/math/sech.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/math/sech.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4447,7 +4450,7 @@ void ScOpenCLTest::testMathFormulaSECH()
void ScOpenCLTest::testMathFormulaMROUND()
{
- if(!initTestEnv("opencl/math/MROUND.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/MROUND.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4463,7 +4466,7 @@ void ScOpenCLTest::testMathFormulaMROUND()
void ScOpenCLTest::testMathFormulaQuotient()
{
- if(!initTestEnv("opencl/math/Quotient.", FORMAT_ODS, false))
+ if(!initTestEnv(u"opencl/math/Quotient.", FORMAT_ODS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4480,7 +4483,7 @@ void ScOpenCLTest::testMathFormulaQuotient()
void ScOpenCLTest::testMathFormulaSeriesSum()
{
- if(!initTestEnv("opencl/math/seriessum.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/seriessum.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4496,7 +4499,7 @@ void ScOpenCLTest::testMathFormulaSeriesSum()
void ScOpenCLTest::testMathFormulaSumIf()
{
- if(!initTestEnv("opencl/math/sumif.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/sumif.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4512,7 +4515,7 @@ void ScOpenCLTest::testMathFormulaSumIf()
void ScOpenCLTest::testAddInFormulaBesseLJ()
{
- if(!initTestEnv("opencl/addin/besselj.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/addin/besselj.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4529,7 +4532,7 @@ void ScOpenCLTest::testAddInFormulaBesseLJ()
void ScOpenCLTest::testStatisticalFormulaAvedev()
{
- if(!initTestEnv("opencl/statistical/Avedev.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/Avedev.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4546,7 +4549,7 @@ void ScOpenCLTest::testStatisticalFormulaAvedev()
void ScOpenCLTest::testNegSub()
{
- if(!initTestEnv("opencl/math/NegSub.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/NegSub.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4563,7 +4566,7 @@ void ScOpenCLTest::testNegSub()
void ScOpenCLTest::testMathFormulaAverageIf_Mix()
{
- if(!initTestEnv("opencl/math/averageif_mix.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/math/averageif_mix.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4579,7 +4582,7 @@ void ScOpenCLTest::testMathFormulaAverageIf_Mix()
void ScOpenCLTest::testStatisticalFormulaKurt1()
{
- if(!initTestEnv("opencl/statistical/Kurt1.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/Kurt1.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4596,7 +4599,7 @@ void ScOpenCLTest::testStatisticalFormulaKurt1()
void ScOpenCLTest::testStatisticalFormulaHarMean1()
{
- if(!initTestEnv("opencl/statistical/HarMean1.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/HarMean1.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4613,7 +4616,7 @@ void ScOpenCLTest::testStatisticalFormulaHarMean1()
void ScOpenCLTest::testStatisticalFormulaVarA1()
{
- if(!initTestEnv("opencl/statistical/VarA1.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/VarA1.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4630,7 +4633,7 @@ void ScOpenCLTest::testStatisticalFormulaVarA1()
void ScOpenCLTest::testStatisticalFormulaVarPA1()
{
- if(!initTestEnv("opencl/statistical/VarPA1.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/VarPA1.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4647,7 +4650,7 @@ void ScOpenCLTest::testStatisticalFormulaVarPA1()
void ScOpenCLTest::testStatisticalFormulaStDevA1()
{
- if(!initTestEnv("opencl/statistical/StDevA1.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/StDevA1.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
@@ -4664,7 +4667,7 @@ void ScOpenCLTest::testStatisticalFormulaStDevA1()
void ScOpenCLTest::testStatisticalFormulaStDevPA1()
{
- if(!initTestEnv("opencl/statistical/StDevPA1.", FORMAT_XLS, false))
+ if(!initTestEnv(u"opencl/statistical/StDevPA1.", FORMAT_XLS, false))
return;
ScDocument& rDoc = xDocSh->GetDocument();
ScDocument& rDocRes = xDocShRes->GetDocument();
diff --git a/sc/qa/unit/pivottable_filters_test.cxx b/sc/qa/unit/pivottable_filters_test.cxx
index 6322c9a809d4..ecd7681aacae 100644
--- a/sc/qa/unit/pivottable_filters_test.cxx
+++ b/sc/qa/unit/pivottable_filters_test.cxx
@@ -234,7 +234,7 @@ bool hasDimension(const std::vector<const ScDPSaveDimension*>& rDims, const OUSt
void ScPivotTableFiltersTest::testPivotTableBasicODS()
{
- ScDocShellRef xDocSh = loadDoc("pivot-table-basic.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"pivot-table-basic.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load pivot-table-basic.ods", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -292,7 +292,7 @@ void ScPivotTableFiltersTest::testPivotTableBasicODS()
void ScPivotTableFiltersTest::testPivotTableNamedRangeSourceODS()
{
- ScDocShellRef xDocSh = loadDoc("pivot-table-named-range-source.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"pivot-table-named-range-source.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load pivot-table-named-range-source.ods", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -346,7 +346,7 @@ bool checkVisiblePageFieldMember(const ScDPSaveDimension::MemberList& rMembers,
void ScPivotTableFiltersTest::testPivotTableSharedCacheGroupODS()
{
- ScDocShellRef xDocSh = loadDoc("pivot-table-shared-cache-with-group.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"pivot-table-shared-cache-with-group.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -484,7 +484,7 @@ void ScPivotTableFiltersTest::testPivotTableSharedCacheGroupODS()
void ScPivotTableFiltersTest::testGetPivotDataXLS()
{
- ScDocShellRef xDocSh = loadDoc("pivot-getpivotdata.", FORMAT_XLS);
+ ScDocShellRef xDocSh = loadDoc(u"pivot-getpivotdata.", FORMAT_XLS);
CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
rDoc.CalcAll();
@@ -501,7 +501,7 @@ void ScPivotTableFiltersTest::testGetPivotDataXLS()
void ScPivotTableFiltersTest::testPivotTableSharedGroupXLSX()
{
- ScDocShellRef xDocSh = loadDoc("pivot-table/shared-group-field.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"pivot-table/shared-group-field.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -575,7 +575,7 @@ void ScPivotTableFiltersTest::testPivotTableSharedDateGroupXLSX()
CPPUNIT_ASSERT_MESSAGE("Pivot cache is expected for A1:J25 on the first sheet.", pCache);
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(10), pCache->GetFieldCount());
};
- ScDocShellRef xDocSh1 = loadDoc("pivot-table/shared-dategroup.", FORMAT_XLSX);
+ ScDocShellRef xDocSh1 = loadDoc(u"pivot-table/shared-dategroup.", FORMAT_XLSX);
testThis(xDocSh1);
// Now test round-trip of group fields
ScDocShellRef xDocSh2 = saveAndReload(xDocSh1.get(), FORMAT_XLSX);
@@ -627,7 +627,7 @@ void ScPivotTableFiltersTest::testPivotTableSharedNestedDateGroupXLSX()
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), pCache->GetGroupFieldCount());
};
- ScDocShellRef xDocSh1 = loadDoc("pivot-table/shared-nested-dategroup.", FORMAT_XLSX);
+ ScDocShellRef xDocSh1 = loadDoc(u"pivot-table/shared-nested-dategroup.", FORMAT_XLSX);
testThis(xDocSh1);
// Now test round-trip of group fields
ScDocShellRef xDocSh2 = saveAndReload(xDocSh1.get(), FORMAT_XLSX);
@@ -638,7 +638,7 @@ void ScPivotTableFiltersTest::testPivotTableSharedNestedDateGroupXLSX()
void ScPivotTableFiltersTest::testPivotTableSharedNumGroupXLSX()
{
- ScDocShellRef xDocSh = loadDoc("pivot-table/shared-numgroup.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"pivot-table/shared-numgroup.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -676,7 +676,7 @@ void ScPivotTableFiltersTest::testPivotTableSharedNumGroupXLSX()
void ScPivotTableFiltersTest::testPivotTableNoColumnsLayout()
{
// tdf#113268 - Pivot table: Missing popup button after opening a pivot table from ODS
- ScDocShellRef xDocSh = loadDoc("pivottable_no_columns_layout.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"pivottable_no_columns_layout.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -705,7 +705,7 @@ void ScPivotTableFiltersTest::testPivotTableNoColumnsLayout()
void ScPivotTableFiltersTest::testTdf112501()
{
- ScDocShellRef xDocSh = loadDoc("tdf112501.", FORMAT_XLS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf112501.", FORMAT_XLS);
CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -775,7 +775,7 @@ void ScPivotTableFiltersTest::testPivotTableExportXLSX()
{
// tdf#89139: pivot table definition needs to list items, including hidden
- ScDocShellRef xShell = loadDoc("tdf89139_pivot_table.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"tdf89139_pivot_table.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell.is());
std::shared_ptr<utl::TempFile> pXPathFile
@@ -795,7 +795,7 @@ void ScPivotTableFiltersTest::testPivotTableExportXLSX()
void ScPivotTableFiltersTest::testPivotTableExportXLSXSingleDataField()
{
- ScDocShellRef xShell = loadDoc("tdf123421_1datafield.", FORMAT_ODS);
+ ScDocShellRef xShell = loadDoc(u"tdf123421_1datafield.", FORMAT_ODS);
CPPUNIT_ASSERT(xShell.is());
std::shared_ptr<utl::TempFile> pXPathFile
@@ -819,7 +819,7 @@ void ScPivotTableFiltersTest::testPivotTableExportXLSXSingleDataField()
void ScPivotTableFiltersTest::testPivotTableExportXLSXMultipleDataFields()
{
- ScDocShellRef xShell = loadDoc("tdf123421_2datafields.", FORMAT_ODS);
+ ScDocShellRef xShell = loadDoc(u"tdf123421_2datafields.", FORMAT_ODS);
CPPUNIT_ASSERT(xShell.is());
std::shared_ptr<utl::TempFile> pXPathFile
@@ -854,7 +854,7 @@ void ScPivotTableFiltersTest::testPivotCacheExportXLSX()
// This test case ensures, that such values are properly set according to documentation:
// https://technet.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.shareditems.aspx
- ScDocShellRef xShell = loadDoc("pivot-table/with-strings-integers-and-dates.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"pivot-table/with-strings-integers-and-dates.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell.is());
std::shared_ptr<utl::TempFile> pXPathFile
@@ -1217,7 +1217,7 @@ void ScPivotTableFiltersTest::testPivotTableXLSX()
} aTest;
- ScDocShellRef xDocSh = loadDoc("pivot-table/many-fields-in-cache.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"pivot-table/many-fields-in-cache.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument* pDoc = &xDocSh->GetDocument();
@@ -1341,7 +1341,7 @@ void ScPivotTableFiltersTest::testPivotTableTwoDataFieldsXLSX()
} aTest;
- ScDocShellRef xDocSh = loadDoc("pivot-table/two-data-fields.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"pivot-table/two-data-fields.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument* pDoc = &xDocSh->GetDocument();
@@ -1363,7 +1363,7 @@ void ScPivotTableFiltersTest::testPivotTableTwoDataFieldsXLSX()
void ScPivotTableFiltersTest::testPivotTableMedianODS()
{
- ScDocShellRef xDocSh = loadDoc("pivot-table-median.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"pivot-table-median.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load test document.", xDocSh.is());
// Export the document and import again for a check
@@ -1401,7 +1401,7 @@ void ScPivotTableFiltersTest::testPivotTableMedianODS()
void ScPivotTableFiltersTest::testPivotTableRowHeaderXLS()
{
- ScDocShellRef xDocSh = loadDoc("pivot_row_header.", FORMAT_XLS);
+ ScDocShellRef xDocSh = loadDoc(u"pivot_row_header.", FORMAT_XLS);
CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -1471,7 +1471,7 @@ void ScPivotTableFiltersTest::testPivotTableRowHeaderXLS()
void ScPivotTableFiltersTest::testPivotTableDoubleFieldFilter()
{
- ScDocShellRef xDocSh = loadDoc("pivottable_double_field_filter.", FORMAT_XLS);
+ ScDocShellRef xDocSh = loadDoc(u"pivottable_double_field_filter.", FORMAT_XLS);
CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
ScDPCollection* pDPs = rDoc.GetDPCollection();
@@ -1564,7 +1564,7 @@ void ScPivotTableFiltersTest::testPivotTableDoubleFieldFilter()
void ScPivotTableFiltersTest::testPivotTableStringFieldFilter()
{
- ScDocShellRef xDocSh = loadDoc("pivottable_string_field_filter.", FORMAT_XLS);
+ ScDocShellRef xDocSh = loadDoc(u"pivottable_string_field_filter.", FORMAT_XLS);
CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
ScDPCollection* pDPs = rDoc.GetDPCollection();
@@ -1598,7 +1598,7 @@ void ScPivotTableFiltersTest::testPivotTableStringFieldFilter()
void ScPivotTableFiltersTest::testPivotTableDateFieldFilter()
{
- ScDocShellRef xDocSh = loadDoc("pivottable_date_field_filter.", FORMAT_XLS);
+ ScDocShellRef xDocSh = loadDoc(u"pivottable_date_field_filter.", FORMAT_XLS);
CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
ScDPCollection* pDPs = rDoc.GetDPCollection();
@@ -1680,7 +1680,7 @@ void ScPivotTableFiltersTest::testPivotTableDateFieldFilter()
void ScPivotTableFiltersTest::testPivotTableBoolFieldFilter()
{
- ScDocShellRef xDocSh = loadDoc("pivottable_bool_field_filter.", FORMAT_XLS);
+ ScDocShellRef xDocSh = loadDoc(u"pivottable_bool_field_filter.", FORMAT_XLS);
CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
ScDPCollection* pDPs = rDoc.GetDPCollection();
@@ -1714,7 +1714,7 @@ void ScPivotTableFiltersTest::testPivotTableBoolFieldFilter()
void ScPivotTableFiltersTest::testPivotTableRowColPageFieldFilter()
{
- ScDocShellRef xDocSh = loadDoc("pivottable_rowcolpage_field_filter.", FORMAT_XLS);
+ ScDocShellRef xDocSh = loadDoc(u"pivottable_rowcolpage_field_filter.", FORMAT_XLS);
CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
ScDPCollection* pDPs = rDoc.GetDPCollection();
@@ -1812,7 +1812,7 @@ void ScPivotTableFiltersTest::testPivotTableRowColPageFieldFilter()
void ScPivotTableFiltersTest::testPivotTableEmptyItem()
{
- ScDocShellRef xDocSh = loadDoc("pivottable_empty_item.", FORMAT_XLS);
+ ScDocShellRef xDocSh = loadDoc(u"pivottable_empty_item.", FORMAT_XLS);
CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
ScDPCollection* pDPs = rDoc.GetDPCollection();
@@ -1849,7 +1849,7 @@ void ScPivotTableFiltersTest::testPivotTableEmptyItem()
void ScPivotTableFiltersTest::testPivotTablePageFieldFilter()
{
- ScDocShellRef xDocSh = loadDoc("pivottable_page_field_filter.", FORMAT_XLS);
+ ScDocShellRef xDocSh = loadDoc(u"pivottable_page_field_filter.", FORMAT_XLS);
CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
ScDPCollection* pDPs = rDoc.GetDPCollection();
@@ -1944,7 +1944,7 @@ void ScPivotTableFiltersTest::testPivotTableFirstHeaderRowXLSX()
{
// tdf#112733: We have different tables here, but have the same value as firstHeaderRow
// The documentation is not clear about what firstHeaderRow actually means, but MS Excel works on this way
- ScDocShellRef xShell = loadDoc("pivot_table_first_header_row.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"pivot_table_first_header_row.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell.is());
std::shared_ptr<utl::TempFile> pXPathFile
@@ -1967,7 +1967,7 @@ void ScPivotTableFiltersTest::testPivotTableFirstHeaderRowXLSX()
void ScPivotTableFiltersTest::testPivotTableDoubleFieldFilterXLSX()
{
- ScDocShellRef xDocSh = loadDoc("pivottable_double_field_filter.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"pivottable_double_field_filter.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
ScDPCollection* pDPs = rDoc.GetDPCollection();
@@ -2060,7 +2060,7 @@ void ScPivotTableFiltersTest::testPivotTableDoubleFieldFilterXLSX()
void ScPivotTableFiltersTest::testPivotTableStringFieldFilterXLSX()
{
- ScDocShellRef xDocSh = loadDoc("pivottable_string_field_filter.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"pivottable_string_field_filter.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
ScDPCollection* pDPs = rDoc.GetDPCollection();
@@ -2094,7 +2094,7 @@ void ScPivotTableFiltersTest::testPivotTableStringFieldFilterXLSX()
void ScPivotTableFiltersTest::testPivotTableDateFieldFilterXLSX()
{
- ScDocShellRef xDocSh = loadDoc("pivottable_date_field_filter.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"pivottable_date_field_filter.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
ScDPCollection* pDPs = rDoc.GetDPCollection();
@@ -2164,7 +2164,7 @@ void ScPivotTableFiltersTest::testPivotTableDateFieldFilterXLSX()
void ScPivotTableFiltersTest::testPivotTableBoolFieldFilterXLSX()
{
- ScDocShellRef xDocSh = loadDoc("pivottable_bool_field_filter.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"pivottable_bool_field_filter.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
ScDPCollection* pDPs = rDoc.GetDPCollection();
@@ -2198,7 +2198,7 @@ void ScPivotTableFiltersTest::testPivotTableBoolFieldFilterXLSX()
void ScPivotTableFiltersTest::testPivotTableRowColPageFieldFilterXLSX()
{
- ScDocShellRef xDocSh = loadDoc("pivottable_rowcolpage_field_filter.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"pivottable_rowcolpage_field_filter.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
ScDPCollection* pDPs = rDoc.GetDPCollection();
@@ -2297,7 +2297,7 @@ void ScPivotTableFiltersTest::testPivotTableRowColPageFieldFilterXLSX()
void ScPivotTableFiltersTest::testPivotTableErrorItemFilterXLSX()
{
- ScDocShellRef xDocSh = loadDoc("pivottable_error_item_filter.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"pivottable_error_item_filter.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
ScDPCollection* pDPs = rDoc.GetDPCollection();
@@ -2327,7 +2327,7 @@ void ScPivotTableFiltersTest::testPivotTableErrorItemFilterXLSX()
void ScPivotTableFiltersTest::testPivotTableOutlineModeXLSX()
{
- ScDocShellRef xShell = loadDoc("pivottable_outline_mode.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"pivottable_outline_mode.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell.is());
std::shared_ptr<utl::TempFile> pXPathFile
@@ -2348,7 +2348,7 @@ void ScPivotTableFiltersTest::testPivotTableOutlineModeXLSX()
void ScPivotTableFiltersTest::testPivotTableDuplicatedMemberFilterXLSX()
{
- ScDocShellRef xShell = loadDoc("pivottable_duplicated_member_filter.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"pivottable_duplicated_member_filter.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell.is());
std::shared_ptr<utl::TempFile> pXPathFile
@@ -2368,7 +2368,7 @@ void ScPivotTableFiltersTest::testPivotTableDuplicatedMemberFilterXLSX()
void ScPivotTableFiltersTest::testPivotTableTabularModeXLSX()
{
- ScDocShellRef xShell = loadDoc("pivottable_tabular_mode.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"pivottable_tabular_mode.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell.is());
std::shared_ptr<utl::TempFile> pXPathFile
@@ -2390,7 +2390,7 @@ void ScPivotTableFiltersTest::testPivotTableTabularModeXLSX()
void ScPivotTableFiltersTest::testPivotTableDuplicateFields()
{
- ScDocShellRef xShell = loadDoc("caseinsensitive-duplicate-fields.", FORMAT_ODS);
+ ScDocShellRef xShell = loadDoc(u"caseinsensitive-duplicate-fields.", FORMAT_ODS);
CPPUNIT_ASSERT(xShell.is());
std::shared_ptr<utl::TempFile> pXPathFile
@@ -2416,7 +2416,7 @@ void ScPivotTableFiltersTest::testPivotTableDuplicateFields()
void ScPivotTableFiltersTest::testTdf112106()
{
- ScDocShellRef xDocSh = loadDoc("tdf112106.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"tdf112106.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
ScDPCollection* pDPs = rDoc.GetDPCollection();
@@ -2447,7 +2447,7 @@ void ScPivotTableFiltersTest::testTdf123923()
{
// tdf#123923: Excel fails when it finds "Err:504" instead of "#REF!" in pivot table cache
- ScDocShellRef xShell = loadDoc("pivot-table-err-in-cache.", FORMAT_ODS);
+ ScDocShellRef xShell = loadDoc(u"pivot-table-err-in-cache.", FORMAT_ODS);
CPPUNIT_ASSERT(xShell.is());
std::shared_ptr<utl::TempFile> pXPathFile
@@ -2464,7 +2464,7 @@ void ScPivotTableFiltersTest::testTdf123939()
{
// tdf#123939: Excel warns on containsMixedTypes="1" if sharedItems has only strings and errors
- ScDocShellRef xShell = loadDoc("pivot-table-str-and-err-in-data.", FORMAT_ODS);
+ ScDocShellRef xShell = loadDoc(u"pivot-table-str-and-err-in-data.", FORMAT_ODS);
CPPUNIT_ASSERT(xShell.is());
std::shared_ptr<utl::TempFile> pXPathFile
@@ -2489,7 +2489,7 @@ void ScPivotTableFiltersTest::testTdf123939()
void ScPivotTableFiltersTest::testTdf124651()
{
- ScDocShellRef xDocSh = loadDoc("tdf124651_simplePivotTable.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf124651_simplePivotTable.", FORMAT_ODS);
CPPUNIT_ASSERT(xDocSh.is());
xmlDocUniquePtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory,
@@ -2503,7 +2503,7 @@ void ScPivotTableFiltersTest::testTdf124651()
void ScPivotTableFiltersTest::testTdf124736()
{
- ScDocShellRef xDocSh = loadDoc("pivot-table/shared-dategroup.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"pivot-table/shared-dategroup.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
std::shared_ptr<utl::TempFile> pXPathFile
@@ -2557,7 +2557,7 @@ void ScPivotTableFiltersTest::testTdf124736()
void ScPivotTableFiltersTest::tesTtdf124772NumFmt()
{
- ScDocShellRef xDocSh = loadDoc("pivot-table-num-fmt.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"pivot-table-num-fmt.", FORMAT_ODS);
CPPUNIT_ASSERT(xDocSh.is());
std::shared_ptr<utl::TempFile> pXPathFile
@@ -2584,7 +2584,7 @@ void ScPivotTableFiltersTest::testTdf124810()
{
{
// First, test that we roundtrip existing pivot table style information from XLSX.
- ScDocShellRef xDocSh = loadDoc("pivot_dark1.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"pivot_dark1.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
xmlDocUniquePtr pTable = XPathHelper::parseExport2(
@@ -2606,7 +2606,7 @@ void ScPivotTableFiltersTest::testTdf124810()
// Now check that we export default style information when there's no such information in
// original document. Just use some ODS as source. This might be changed when we start
// exporting better pivot table style information.
- ScDocShellRef xDocSh = loadDoc("tdf124651_simplePivotTable.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf124651_simplePivotTable.", FORMAT_ODS);
CPPUNIT_ASSERT(xDocSh.is());
xmlDocUniquePtr pTable = XPathHelper::parseExport2(
@@ -2627,7 +2627,7 @@ void ScPivotTableFiltersTest::testTdf124810()
void ScPivotTableFiltersTest::testTdf124883()
{
- ScDocShellRef xDocSh = loadDoc("pivot-table/two-data-fields.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"pivot-table/two-data-fields.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
xmlDocUniquePtr pTable = XPathHelper::parseExport2(
@@ -2644,7 +2644,7 @@ void ScPivotTableFiltersTest::testTdf124883()
void ScPivotTableFiltersTest::testTdf125046()
{
- ScDocShellRef xDocSh = loadDoc("pivottable_long_text.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"pivottable_long_text.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
xmlDocUniquePtr pDoc = XPathHelper::parseExport2(
@@ -2656,7 +2656,7 @@ void ScPivotTableFiltersTest::testTdf125046()
void ScPivotTableFiltersTest::testTdf125055()
{
- ScDocShellRef xDocSh = loadDoc("pivottable_1s_difference.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"pivottable_1s_difference.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
xmlDocUniquePtr pDoc = XPathHelper::parseExport2(
@@ -2692,7 +2692,7 @@ void ScPivotTableFiltersTest::testTdf125055()
void ScPivotTableFiltersTest::testTdf125086()
{
- ScDocShellRef xDocSh = loadDoc("pivottable_fieldInRowsAndData.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"pivottable_fieldInRowsAndData.", FORMAT_ODS);
CPPUNIT_ASSERT(xDocSh.is());
xmlDocUniquePtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory,
diff --git a/sc/qa/unit/screenshots/screenshots.cxx b/sc/qa/unit/screenshots/screenshots.cxx
index 8cd66991674f..488b14e82c86 100644
--- a/sc/qa/unit/screenshots/screenshots.cxx
+++ b/sc/qa/unit/screenshots/screenshots.cxx
@@ -265,7 +265,7 @@ void ScScreenshotTest::testOpeningModalDialogs()
initialize();
/// process input file containing the UXMLDescriptions of the dialogs to dump
- processDialogBatchFile("sc/qa/unit/screenshots/data/screenshots.txt");
+ processDialogBatchFile(u"sc/qa/unit/screenshots/data/screenshots.txt");
mxComponent->dispose();
mxComponent.clear();
diff --git a/sc/qa/unit/scshapetest.cxx b/sc/qa/unit/scshapetest.cxx
index d07f4f337977..d9fa04683ea6 100644
--- a/sc/qa/unit/scshapetest.cxx
+++ b/sc/qa/unit/scshapetest.cxx
@@ -9,6 +9,8 @@
#include <sal/config.h>
+#include <string_view>
+
#include <test/calc_unoapi_test.hxx>
#include <comphelper/propertyvalue.hxx>
@@ -91,44 +93,48 @@ void ScShapeTest::saveAndReload(css::uno::Reference<css::lang::XComponent>& xCom
xComponent = loadFromDesktop(aTempFile.GetURL(), "com.sun.star.sheet.SpreadsheetDocument");
}
-static void lcl_AssertRectEqualWithTolerance(const OString& sInfo,
+static void lcl_AssertRectEqualWithTolerance(std::string_view sInfo,
const tools::Rectangle& rExpected,
const tools::Rectangle& rActual,
const sal_Int32 nTolerance)
{
// Left
- OString sMsg = sInfo + " Left expected " + OString::number(rExpected.Left()) + " actual "
- + OString::number(rActual.Left()) + " Tolerance " + OString::number(nTolerance);
+ OString sMsg = OString::Concat(sInfo) + " Left expected " + OString::number(rExpected.Left())
+ + " actual " + OString::number(rActual.Left()) + " Tolerance "
+ + OString::number(nTolerance);
CPPUNIT_ASSERT_MESSAGE(sMsg.getStr(),
std::abs(rExpected.Left() - rActual.Left()) <= nTolerance);
// Top
- sMsg = sInfo + " Top expected " + OString::number(rExpected.Top()) + " actual "
+ sMsg = OString::Concat(sInfo) + " Top expected " + OString::number(rExpected.Top()) + " actual "
+ OString::number(rActual.Top()) + " Tolerance " + OString::number(nTolerance);
CPPUNIT_ASSERT_MESSAGE(sMsg.getStr(), std::abs(rExpected.Top() - rActual.Top()) <= nTolerance);
// Width
- sMsg = sInfo + " Width expected " + OString::number(rExpected.GetWidth()) + " actual "
- + OString::number(rActual.GetWidth()) + " Tolerance " + OString::number(nTolerance);
+ sMsg = OString::Concat(sInfo) + " Width expected " + OString::number(rExpected.GetWidth())
+ + " actual " + OString::number(rActual.GetWidth()) + " Tolerance "
+ + OString::number(nTolerance);
CPPUNIT_ASSERT_MESSAGE(sMsg.getStr(),
std::abs(rExpected.GetWidth() - rActual.GetWidth()) <= nTolerance);
// Height
- sMsg = sInfo + " Height expected " + OString::number(rExpected.GetHeight()) + " actual "
- + OString::number(rActual.GetHeight()) + " Tolerance " + OString::number(nTolerance);
+ sMsg = OString::Concat(sInfo) + " Height expected " + OString::number(rExpected.GetHeight())
+ + " actual " + OString::number(rActual.GetHeight()) + " Tolerance "
+ + OString::number(nTolerance);
CPPUNIT_ASSERT_MESSAGE(sMsg.getStr(),
std::abs(rExpected.GetHeight() - rActual.GetHeight()) <= nTolerance);
}
-static void lcl_AssertPointEqualWithTolerance(const OString& sInfo, const Point rExpected,
+static void lcl_AssertPointEqualWithTolerance(std::string_view sInfo, const Point rExpected,
const Point rActual, const sal_Int32 nTolerance)
{
// X
- OString sMsg = sInfo + " X expected " + OString::number(rExpected.X()) + " actual "
- + OString::number(rActual.X()) + " Tolerance " + OString::number(nTolerance);
+ OString sMsg = OString::Concat(sInfo) + " X expected " + OString::number(rExpected.X())
+ + " actual " + OString::number(rActual.X()) + " Tolerance "
+ + OString::number(nTolerance);
CPPUNIT_ASSERT_MESSAGE(sMsg.getStr(), std::abs(rExpected.X() - rActual.X()) <= nTolerance);
// Y
- sMsg = sInfo + " Y expected " + OString::number(rExpected.Y()) + " actual "
+ sMsg = OString::Concat(sInfo) + " Y expected " + OString::number(rExpected.Y()) + " actual "
+ OString::number(rActual.Y()) + " Tolerance " + OString::number(nTolerance);
CPPUNIT_ASSERT_MESSAGE(sMsg.getStr(), std::abs(rExpected.Y() - rActual.Y()) <= nTolerance);
}
@@ -325,7 +331,7 @@ void ScShapeTest::testTdf137576_LogicRectInDefaultMeasureline()
// Load an empty document.
OUString aFileURL;
- createFileURL("ManualColWidthRowHeight.ods", aFileURL);
+ createFileURL(u"ManualColWidthRowHeight.ods", aFileURL);
uno::Reference<css::lang::XComponent> xComponent = loadFromDesktop(aFileURL);
CPPUNIT_ASSERT(xComponent.is());
@@ -398,7 +404,7 @@ void ScShapeTest::testTdf137576_LogicRectInNewMeasureline()
// Load an empty document
OUString aFileURL;
- createFileURL("ManualColWidthRowHeight.ods", aFileURL);
+ createFileURL(u"ManualColWidthRowHeight.ods", aFileURL);
uno::Reference<css::lang::XComponent> xComponent = loadFromDesktop(aFileURL);
CPPUNIT_ASSERT(xComponent.is());
@@ -439,7 +445,7 @@ void ScShapeTest::testMeasurelineHideColSave()
// D11 and end in cell I5. Error was, that after hiding col A and saving, start and end point
// position were lost.
OUString aFileURL;
- createFileURL("measurelineHideColSave.ods", aFileURL);
+ createFileURL(u"measurelineHideColSave.ods", aFileURL);
uno::Reference<css::lang::XComponent> xComponent = loadFromDesktop(aFileURL);
CPPUNIT_ASSERT(xComponent.is());
@@ -506,7 +512,7 @@ void ScShapeTest::testHideColsShow()
// to column E
OUString aFileURL;
- createFileURL("hideColsShow.ods", aFileURL);
+ createFileURL(u"hideColsShow.ods", aFileURL);
uno::Reference<css::lang::XComponent> xComponent = loadFromDesktop(aFileURL);
CPPUNIT_ASSERT(xComponent.is());
@@ -561,7 +567,7 @@ void ScShapeTest::testTdf138138_MoveCellWithRotatedShape()
// The document contains a 90deg rotated, cell-anchored rectangle in column D. Insert 2 columns
// after column B, save and reload. The shape was not correctly moved to column F.
OUString aFileURL;
- createFileURL("tdf138138_MoveCellWithRotatedShape.ods", aFileURL);
+ createFileURL(u"tdf138138_MoveCellWithRotatedShape.ods", aFileURL);
uno::Reference<css::lang::XComponent> xComponent = loadFromDesktop(aFileURL);
CPPUNIT_ASSERT(xComponent.is());
@@ -630,7 +636,7 @@ void ScShapeTest::testLoadVerticalFlip()
// The document has a cell anchored custom shape with vertical flip. Error was, that the
// flip was lost on loading.
OUString aFileURL;
- createFileURL("loadVerticalFlip.ods", aFileURL);
+ createFileURL(u"loadVerticalFlip.ods", aFileURL);
uno::Reference<css::lang::XComponent> xComponent = loadFromDesktop(aFileURL);
CPPUNIT_ASSERT(xComponent.is());
@@ -659,7 +665,7 @@ void ScShapeTest::testTdf117948_CollapseBeforeShape()
// group, save and reload. The original error was, that the line was on wrong position after reload.
// After the fix for 'resize with cell', the custom shape had wrong position and size too.
OUString aFileURL;
- createFileURL("tdf117948_CollapseBeforeShape.ods", aFileURL);
+ createFileURL(u"tdf117948_CollapseBeforeShape.ods", aFileURL);
uno::Reference<css::lang::XComponent> xComponent = loadFromDesktop(aFileURL);
CPPUNIT_ASSERT(xComponent.is());
@@ -736,7 +742,7 @@ void ScShapeTest::testTdf137355_UndoHideRows()
// Error was, that hiding rows 3 to 6 and undo that action "lost" the shape.
// Actually it was not lost but hidden.
OUString aFileURL;
- createFileURL("tdf137355_UndoHideRows.ods", aFileURL);
+ createFileURL(u"tdf137355_UndoHideRows.ods", aFileURL);
uno::Reference<css::lang::XComponent> xComponent = loadFromDesktop(aFileURL);
CPPUNIT_ASSERT(xComponent.is());
@@ -791,7 +797,7 @@ void ScShapeTest::testTdf115655_HideDetail()
// Error was, that after collapsing the group, save and reload, and expanding the group, the image
// was "lost". Actually is was resized to zero height.
OUString aFileURL;
- createFileURL("tdf115655_HideDetail.ods", aFileURL);
+ createFileURL(u"tdf115655_HideDetail.ods", aFileURL);
uno::Reference<css::lang::XComponent> xComponent = loadFromDesktop(aFileURL);
CPPUNIT_ASSERT(xComponent.is());
@@ -862,7 +868,7 @@ void ScShapeTest::testFitToCellSize()
// FitToCellSize should resize and position the shape so,
// that it fits into its anchor cell. That did not happened.
OUString aFileURL;
- createFileURL("tdf119191_FitToCellSize.ods", aFileURL);
+ createFileURL(u"tdf119191_FitToCellSize.ods", aFileURL);
uno::Reference<css::lang::XComponent> xComponent = loadFromDesktop(aFileURL);
CPPUNIT_ASSERT(xComponent.is());
@@ -912,7 +918,7 @@ void ScShapeTest::testCustomShapeCellAnchoredRotatedShape()
// and sheared. Error was, that the shape lost position and size on
// loading.
OUString aFileURL;
- createFileURL("tdf119191_transformedShape.ods", aFileURL);
+ createFileURL(u"tdf119191_transformedShape.ods", aFileURL);
uno::Reference<css::lang::XComponent> xComponent = loadFromDesktop(aFileURL);
CPPUNIT_ASSERT(xComponent.is());
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 2e9dc8d55259..f93f24b2688a 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -7,8 +7,11 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include <officecfg/Office/Common.hxx>
#include <sal/config.h>
+
+#include <string_view>
+
+#include <officecfg/Office/Common.hxx>
#include <config_features.h>
#include <sfx2/sfxmodelfactory.hxx>
@@ -201,7 +204,7 @@ public:
void testTdf129985();
void testTdf73063();
- xmlDocUniquePtr testTdf95640(const OUString& rFileName, sal_Int32 nSourceFormat,
+ xmlDocUniquePtr testTdf95640(std::u16string_view rFileName, sal_Int32 nSourceFormat,
sal_Int32 nDestFormat);
void testTdf95640_ods_to_xlsx();
void testTdf95640_ods_to_xlsx_with_standard_list();
@@ -552,7 +555,7 @@ void ScExportTest::testExtCondFormatXLSX()
void ScExportTest::testTdf90104()
{
- ScDocShellRef xShell = loadDoc("tdf90104.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"tdf90104.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX);
@@ -575,7 +578,7 @@ void ScExportTest::testTdf111876()
{
// Document with relative path hyperlink
- ScDocShellRef xShell = loadDoc("tdf111876.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"tdf111876.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX);
@@ -615,7 +618,7 @@ void ScExportTest::testPasswordExportODS()
void ScExportTest::testTdf134332()
{
- ScDocShellRef xShell = loadDoc("tdf134332.", FORMAT_ODS);
+ ScDocShellRef xShell = loadDoc(u"tdf134332.", FORMAT_ODS);
CPPUNIT_ASSERT(xShell.is());
ScDocument& rDoc = xShell->GetDocument();
@@ -638,7 +641,7 @@ void ScExportTest::testTdf134332()
void ScExportTest::testConditionalFormatExportODS()
{
- ScDocShellRef xShell = loadDoc("new_cond_format_test_export.", FORMAT_ODS);
+ ScDocShellRef xShell = loadDoc(u"new_cond_format_test_export.", FORMAT_ODS);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_ODS);
@@ -653,7 +656,7 @@ void ScExportTest::testConditionalFormatExportODS()
void ScExportTest::testCondFormatExportCellIs()
{
- ScDocShellRef xShell = loadDoc("condFormat_cellis.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"condFormat_cellis.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
@@ -689,7 +692,7 @@ void ScExportTest::testCondFormatExportCellIs()
void ScExportTest::testConditionalFormatExportXLSX()
{
- ScDocShellRef xShell = loadDoc("new_cond_format_test_export.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"new_cond_format_test_export.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX);
@@ -711,7 +714,7 @@ void ScExportTest::testConditionalFormatExportXLSX()
void ScExportTest::testTdf99856_dataValidationTest()
{
- ScDocShellRef xShell = loadDoc("tdf99856_dataValidationTest.", FORMAT_ODS);
+ ScDocShellRef xShell = loadDoc(u"tdf99856_dataValidationTest.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load doc", xShell.is());
ScDocShellRef xDocSh = saveAndReload( xShell.get(), FORMAT_XLSX);
@@ -734,7 +737,7 @@ void ScExportTest::testProtectionKeyODS_UTF16LErtlSHA1()
{
OUString const password("1012345678901234567890123456789012345678901234567890");
- ScDocShellRef xShell = loadDoc("protection-key1.", FORMAT_FODS);
+ ScDocShellRef xShell = loadDoc(u"protection-key1.", FORMAT_FODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load doc", xShell.is());
ScDocument& rDoc = xShell->GetDocument();
@@ -757,7 +760,7 @@ void ScExportTest::testProtectionKeyODS_UTF8SHA1()
{
OUString const password("1012345678901234567890123456789012345678901234567890");
- ScDocShellRef xShell = loadDoc("protection-key2.", FORMAT_FODS);
+ ScDocShellRef xShell = loadDoc(u"protection-key2.", FORMAT_FODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load doc", xShell.is());
ScDocument& rDoc = xShell->GetDocument();
@@ -780,7 +783,7 @@ void ScExportTest::testProtectionKeyODS_UTF8SHA256ODF12()
{
OUString const password("1012345678901234567890123456789012345678901234567890");
- ScDocShellRef xShell = loadDoc("protection-key3.", FORMAT_FODS);
+ ScDocShellRef xShell = loadDoc(u"protection-key3.", FORMAT_FODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load doc", xShell.is());
ScDocument& rDoc = xShell->GetDocument();
@@ -803,7 +806,7 @@ void ScExportTest::testProtectionKeyODS_UTF8SHA256W3C()
{
OUString const password("1012345678901234567890123456789012345678901234567890");
- ScDocShellRef xShell = loadDoc("protection-key4.", FORMAT_FODS);
+ ScDocShellRef xShell = loadDoc(u"protection-key4.", FORMAT_FODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load doc", xShell.is());
ScDocument& rDoc = xShell->GetDocument();
@@ -826,7 +829,7 @@ void ScExportTest::testProtectionKeyODS_XL_SHA1()
{
OUString const password("1012345678901234567890123456789012345678901234567890");
- ScDocShellRef xShell = loadDoc("protection-key5.", FORMAT_FODS);
+ ScDocShellRef xShell = loadDoc(u"protection-key5.", FORMAT_FODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load doc", xShell.is());
ScDocument& rDoc = xShell->GetDocument();
@@ -847,7 +850,7 @@ void ScExportTest::testProtectionKeyODS_XL_SHA1()
void ScExportTest::testColorScaleExportODS()
{
- ScDocShellRef xShell = loadDoc("colorscale.", FORMAT_ODS);
+ ScDocShellRef xShell = loadDoc(u"colorscale.", FORMAT_ODS);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(xShell.get(), FORMAT_ODS);
@@ -863,7 +866,7 @@ void ScExportTest::testColorScaleExportODS()
void ScExportTest::testColorScaleExportXLSX()
{
- ScDocShellRef xShell = loadDoc("colorscale.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"colorscale.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(xShell.get(), FORMAT_XLSX);
@@ -879,7 +882,7 @@ void ScExportTest::testColorScaleExportXLSX()
void ScExportTest::testDataBarExportODS()
{
- ScDocShellRef xShell = loadDoc("databar.", FORMAT_ODS);
+ ScDocShellRef xShell = loadDoc(u"databar.", FORMAT_ODS);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(xShell.get(), FORMAT_ODS);
@@ -894,7 +897,7 @@ void ScExportTest::testDataBarExportODS()
void ScExportTest::testFormatExportODS()
{
- ScDocShellRef xShell = loadDoc("formats.", FORMAT_ODS);
+ ScDocShellRef xShell = loadDoc(u"formats.", FORMAT_ODS);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(xShell.get(), FORMAT_ODS);
@@ -910,7 +913,7 @@ void ScExportTest::testFormatExportODS()
void ScExportTest::testCommentExportXLSX()
{
//tdf#104729 FILESAVE OpenOffice do not save author of the comment during export to .xlsx
- ScDocShellRef xShell = loadDoc("comment.", FORMAT_ODS);
+ ScDocShellRef xShell = loadDoc(u"comment.", FORMAT_ODS);
CPPUNIT_ASSERT(xShell.is());
std::shared_ptr<utl::TempFile> pXPathFile
@@ -948,7 +951,7 @@ void ScExportTest::testCommentExportXLSX()
void ScExportTest::testCommentExportXLSX_2_XLSX()
{
//tdf#117287 FILESAVE XLSX: Comments always disappear after opening the exported XLSX file with Excel
- ScDocShellRef xShell = loadDoc("tdf117287_comment.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"tdf117287_comment.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell.is());
@@ -983,7 +986,7 @@ void ScExportTest::testCommentExportXLSX_2_XLSX()
void ScExportTest::testCustomColumnWidthExportXLSX()
{
//tdf#100946 FILESAVE Excel on macOS ignored column widths in XLSX last saved by LO
- ScDocShellRef xShell = loadDoc("custom_column_width.", FORMAT_ODS);
+ ScDocShellRef xShell = loadDoc(u"custom_column_width.", FORMAT_ODS);
CPPUNIT_ASSERT(xShell.is());
std::shared_ptr<utl::TempFile> pXPathFile = ScBootstrapFixture::exportTo(&(*xShell), FORMAT_XLSX);
@@ -1058,7 +1061,7 @@ void ScExportTest::testCustomColumnWidthExportXLSX()
void ScExportTest::testXfDefaultValuesXLSX()
{
//tdf#70565 FORMATTING: User Defined Custom Formatting is not applied during importing XLSX documents
- ScDocShellRef xShell = loadDoc("xf_default_values.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"xf_default_values.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell.is());
std::shared_ptr<utl::TempFile> pXPathFile = ScBootstrapFixture::exportTo(&(*xShell), FORMAT_XLSX);
@@ -1130,7 +1133,7 @@ static auto verifySpreadsheet13(char const*const pTestName, ScDocShellRef& pShel
void ScExportTest::testODF13()
{
// import
- ScDocShellRef pShell = loadDoc("spreadsheet13e.", FORMAT_ODS);
+ ScDocShellRef pShell = loadDoc(u"spreadsheet13e.", FORMAT_ODS);
// check model
verifySpreadsheet13("import", pShell);
@@ -1212,7 +1215,7 @@ void ScExportTest::testColumnWidthResaveXLSX()
{
// tdf#91475 FILESAVE: Column width is not preserved in XLSX / after round trip.
// Test if after resave .xlsx file, columns width is identical with previous one
- ScDocShellRef xShell = loadDoc("different-column-width-excel2010.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"different-column-width-excel2010.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell.is());
std::shared_ptr<utl::TempFile> pXPathFile = ScBootstrapFixture::exportTo(&(*xShell), FORMAT_XLSX);
@@ -1251,7 +1254,7 @@ void ScExportTest::testColumnWidthExportFromODStoXLSX()
// Test if after export .ods to .xlsx format, displayed columns width
// is identical with previous (.ods) one
- ScDocShellRef xShell = loadDoc("different-column-width.", FORMAT_ODS);
+ ScDocShellRef xShell = loadDoc(u"different-column-width.", FORMAT_ODS);
CPPUNIT_ASSERT( xShell.is() );
@@ -1314,7 +1317,7 @@ void ScExportTest::testOutlineExportXLSX()
{
//tdf#100347 FILESAVE FILEOPEN after exporting to .xlsx format grouping are lost
//tdf#51524 FILESAVE .xlsx and.xls looses width information for hidden/collapsed grouped columns
- ScDocShellRef xShell = loadDoc("outline.", FORMAT_ODS);
+ ScDocShellRef xShell = loadDoc(u"outline.", FORMAT_ODS);
CPPUNIT_ASSERT(xShell.is());
std::shared_ptr<utl::TempFile> pXPathFile = ScBootstrapFixture::exportTo(&(*xShell), FORMAT_XLSX);
@@ -1461,7 +1464,7 @@ void ScExportTest::testOutlineExportXLSX()
void ScExportTest::testAllRowsHiddenXLSX()
{
- ScDocShellRef xOrigDocSh = loadDoc("tdf105840_allRowsHidden.", FORMAT_XLSX);
+ ScDocShellRef xOrigDocSh = loadDoc(u"tdf105840_allRowsHidden.", FORMAT_XLSX);
CPPUNIT_ASSERT(xOrigDocSh.is());
std::shared_ptr<utl::TempFile> pXPathFile = ScBootstrapFixture::exportTo(&(*xOrigDocSh), FORMAT_XLSX);
@@ -1476,7 +1479,7 @@ void ScExportTest::testAllRowsHiddenXLSX()
void ScExportTest::testHiddenEmptyRowsXLSX()
{
//tdf#98106 FILESAVE: Hidden and empty rows became visible when export to .XLSX
- ScDocShellRef xShell = loadDoc("hidden-empty-rows.", FORMAT_ODS);
+ ScDocShellRef xShell = loadDoc(u"hidden-empty-rows.", FORMAT_ODS);
CPPUNIT_ASSERT(xShell.is());
std::shared_ptr<utl::TempFile> pXPathFile = ScBootstrapFixture::exportTo(&(*xShell), FORMAT_XLSX);
@@ -1495,7 +1498,7 @@ void ScExportTest::testHiddenEmptyRowsXLSX()
void ScExportTest::testLandscapeOrientationXLSX()
{
//tdf#48767 - Landscape page orientation is not loaded from .xlsx format with MS Excel, after export with Libre Office
- ScDocShellRef xShell = loadDoc("hidden-empty-rows.", FORMAT_ODS);
+ ScDocShellRef xShell = loadDoc(u"hidden-empty-rows.", FORMAT_ODS);
CPPUNIT_ASSERT(xShell.is());
std::shared_ptr<utl::TempFile> pXPathFile = ScBootstrapFixture::exportTo(&(*xShell), FORMAT_XLSX);
@@ -1511,7 +1514,7 @@ void ScExportTest::testLandscapeOrientationXLSX()
void ScExportTest::testDataBarExportXLSX()
{
- ScDocShellRef xShell = loadDoc("databar.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"databar.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(xShell.get(), FORMAT_XLSX);
@@ -1653,7 +1656,7 @@ void setEscapement( ScFieldEditEngine& rEE, sal_Int32 nPara, sal_Int32 nStart, s
void ScExportTest::testNamedRangeBugfdo62729()
{
- ScDocShellRef xShell = loadDoc("fdo62729.", FORMAT_ODS);
+ ScDocShellRef xShell = loadDoc(u"fdo62729.", FORMAT_ODS);
CPPUNIT_ASSERT(xShell.is());
ScDocument& rDoc = xShell->GetDocument();
@@ -1678,7 +1681,7 @@ void ScExportTest::testNamedRangeBugfdo62729()
void ScExportTest::testBuiltinRangesXLSX()
{
- ScDocShellRef xShell = loadDoc("built-in_ranges.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"built-in_ranges.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(xShell.get(), FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
@@ -2023,7 +2026,7 @@ void ScExportTest::testRichTextExportODS()
// Start with an empty document, put one edit text cell, and make sure it
// survives the save and reload.
- ScDocShellRef xOrigDocSh = loadDoc("empty.", FORMAT_ODS, true);
+ ScDocShellRef xOrigDocSh = loadDoc(u"empty.", FORMAT_ODS, true);
const EditTextObject* pEditText;
{
ScDocument& rDoc = xOrigDocSh->GetDocument();
@@ -2157,7 +2160,7 @@ void ScExportTest::testRichTextExportODS()
void ScExportTest::testRichTextCellFormatXLSX()
{
- ScDocShellRef xDocSh = loadDoc("cellformat.", FORMAT_XLS);
+ ScDocShellRef xDocSh = loadDoc(u"cellformat.", FORMAT_XLS);
CPPUNIT_ASSERT(xDocSh.is());
std::shared_ptr<utl::TempFile> pXPathFile = ScBootstrapFixture::exportTo(&(*xDocSh), FORMAT_XLSX);
@@ -2190,7 +2193,7 @@ void ScExportTest::testRichTextCellFormatXLSX()
void ScExportTest::testFormulaRefSheetNameODS()
{
- ScDocShellRef xDocSh = loadDoc("formula-quote-in-sheet-name.", FORMAT_ODS, true);
+ ScDocShellRef xDocSh = loadDoc(u"formula-quote-in-sheet-name.", FORMAT_ODS, true);
{
ScDocument& rDoc = xDocSh->GetDocument();
@@ -2214,7 +2217,7 @@ void ScExportTest::testFormulaRefSheetNameODS()
void ScExportTest::testCellValuesExportODS()
{
// Start with an empty document
- ScDocShellRef xOrigDocSh = loadDoc("empty.", FORMAT_ODS);
+ ScDocShellRef xOrigDocSh = loadDoc(u"empty.", FORMAT_ODS);
{
ScDocument& rDoc = xOrigDocSh->GetDocument();
CPPUNIT_ASSERT_MESSAGE("This document should at least have one sheet.", rDoc.GetTableCount() > 0);
@@ -2284,7 +2287,7 @@ void ScExportTest::testCellValuesExportODS()
void ScExportTest::testCellNoteExportODS()
{
- ScDocShellRef xOrigDocSh = loadDoc("single-note.", FORMAT_ODS);
+ ScDocShellRef xOrigDocSh = loadDoc(u"single-note.", FORMAT_ODS);
ScAddress aPos(0,0,0); // Start with A1.
{
ScDocument& rDoc = xOrigDocSh->GetDocument();
@@ -2314,7 +2317,7 @@ void ScExportTest::testCellNoteExportODS()
void ScExportTest::testCellNoteExportXLS()
{
// Start with an empty document.s
- ScDocShellRef xOrigDocSh = loadDoc("notes-on-3-sheets.", FORMAT_ODS);
+ ScDocShellRef xOrigDocSh = loadDoc(u"notes-on-3-sheets.", FORMAT_ODS);
{
ScDocument& rDoc = xOrigDocSh->GetDocument();
CPPUNIT_ASSERT_EQUAL_MESSAGE("This document should have 3 sheets.", SCTAB(3), rDoc.GetTableCount());
@@ -2385,7 +2388,7 @@ void checkMatrixRange(ScDocument& rDoc, const ScRange& rRange)
void ScExportTest::testInlineArrayXLS()
{
- ScDocShellRef xShell = loadDoc("inline-array.", FORMAT_XLS);
+ ScDocShellRef xShell = loadDoc(u"inline-array.", FORMAT_XLS);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(xShell.get(), FORMAT_XLS);
@@ -2408,7 +2411,7 @@ void ScExportTest::testInlineArrayXLS()
void ScExportTest::testEmbeddedChartODS()
{
- ScDocShellRef xShell = loadDoc("embedded-chart.", FORMAT_XLS);
+ ScDocShellRef xShell = loadDoc(u"embedded-chart.", FORMAT_XLS);
CPPUNIT_ASSERT(xShell.is());
std::shared_ptr<utl::TempFile> pTempFile(
@@ -2426,7 +2429,7 @@ void ScExportTest::testEmbeddedChartODS()
void ScExportTest::testEmbeddedChartXLS()
{
- ScDocShellRef xShell = loadDoc("embedded-chart.", FORMAT_XLS);
+ ScDocShellRef xShell = loadDoc(u"embedded-chart.", FORMAT_XLS);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(xShell.get(), FORMAT_XLS);
@@ -2453,7 +2456,7 @@ void ScExportTest::testEmbeddedChartXLS()
void ScExportTest::testCellAnchoredGroupXLS()
{
- ScDocShellRef xDocSh_in = loadDoc("cell-anchored-group.", FORMAT_XLS);
+ ScDocShellRef xDocSh_in = loadDoc(u"cell-anchored-group.", FORMAT_XLS);
CPPUNIT_ASSERT_MESSAGE("Failed to load cell-anchored-group.xls", xDocSh_in.is());
ScDocShellRef xDocSh = saveAndReload(&(*xDocSh_in), FORMAT_ODS);
@@ -2480,7 +2483,7 @@ void ScExportTest::testCellAnchoredGroupXLS()
void ScExportTest::testFormulaReferenceXLS()
{
- ScDocShellRef xShell = loadDoc("formula-reference.", FORMAT_XLS);
+ ScDocShellRef xShell = loadDoc(u"formula-reference.", FORMAT_XLS);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(xShell.get(), FORMAT_XLS);
@@ -2503,7 +2506,7 @@ void ScExportTest::testFormulaReferenceXLS()
void ScExportTest::testSheetProtectionXLSX()
{
- ScDocShellRef xShell = loadDoc("ProtecteSheet1234Pass.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"ProtecteSheet1234Pass.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(xShell.get(), FORMAT_XLSX);
@@ -2527,7 +2530,7 @@ void ScExportTest::testSheetProtectionXLSX()
void ScExportTest::testSheetProtectionXLSB()
{
- ScDocShellRef xShell = loadDoc("tdf108017_calcProtection.", FORMAT_XLSB);
+ ScDocShellRef xShell = loadDoc(u"tdf108017_calcProtection.", FORMAT_XLSB);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(xShell.get(), FORMAT_XLSX);
@@ -2585,7 +2588,7 @@ void ScExportTest::testExcelCellBorders( sal_uLong nFormatType )
{ 25, SvxBorderLineStyle::DOUBLE_THIN, -1 }, // double (don't check width)
};
- ScDocShellRef xDocSh = loadDoc("cell-borders.", nFormatType);
+ ScDocShellRef xDocSh = loadDoc(u"cell-borders.", nFormatType);
CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.is());
{
ScDocument& rDoc = xDocSh->GetDocument();
@@ -2675,7 +2678,7 @@ void ScExportTest::testBordersExchangeXLSX()
/* 9,00 */ {{Solid , Solid , 50, 50}, {FineDash, FineDash, 35, 35}, {Dashed , Dashed , 35, 35}, {FineDash, FineDash, 35, 35}, {DashDot , DashDot , 35, 35}, {DashDoDo, DashDoDo, 35, 35}, {DoubThin, DoubThin, 35, 35}}
};
- ScDocShellRef xShell = loadDoc("test_borders_export.", FORMAT_ODS); // load the ods with our Borders
+ ScDocShellRef xShell = loadDoc(u"test_borders_export.", FORMAT_ODS); // load the ods with our Borders
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX); // save the ods to xlsx and load xlsx
@@ -2916,7 +2919,7 @@ void ScExportTest::testTrackChangesSimpleXLSX()
// First, test the xls variant.
- ScDocShellRef xDocSh = loadDoc("track-changes/simple-cell-changes.", FORMAT_XLS);
+ ScDocShellRef xDocSh = loadDoc(u"track-changes/simple-cell-changes.", FORMAT_XLS);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument* pDoc = &xDocSh->GetDocument();
bool bGood = aTest.check(*pDoc);
@@ -2944,7 +2947,7 @@ void ScExportTest::testTrackChangesSimpleXLSX()
// Now, test the xlsx variant the same way.
- xDocSh = loadDoc("track-changes/simple-cell-changes.", FORMAT_XLSX);
+ xDocSh = loadDoc(u"track-changes/simple-cell-changes.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
pDoc = &xDocSh->GetDocument();
aTest.check(*pDoc);
@@ -3011,7 +3014,7 @@ void ScExportTest::testSheetTabColorsXLSX()
} aTest;
- ScDocShellRef xDocSh = loadDoc("sheet-tab-color.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"sheet-tab-color.", FORMAT_XLSX);
{
CPPUNIT_ASSERT_MESSAGE("Failed to load file.", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3098,7 +3101,7 @@ void ScExportTest::testSharedFormulaExportXLS()
} aTest;
- ScDocShellRef xDocSh = loadDoc("shared-formula/3d-reference.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"shared-formula/3d-reference.", FORMAT_ODS);
{
CPPUNIT_ASSERT_MESSAGE("Failed to load file.", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3189,7 +3192,7 @@ void ScExportTest::testSharedFormulaExportXLSX()
} aTest;
- ScDocShellRef xDocSh = loadDoc("shared-formula/3d-reference.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"shared-formula/3d-reference.", FORMAT_XLSX);
{
CPPUNIT_ASSERT_MESSAGE("Failed to load file.", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3259,7 +3262,7 @@ void ScExportTest::testSharedFormulaStringResultExportXLSX()
} aTest;
- ScDocShellRef xDocSh = loadDoc("shared-formula/text-results.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"shared-formula/text-results.", FORMAT_XLSX);
{
CPPUNIT_ASSERT_MESSAGE("Failed to load file.", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3287,7 +3290,7 @@ void ScExportTest::testSharedFormulaStringResultExportXLSX()
void ScExportTest::testFunctionsExcel2010( sal_uLong nFormatType )
{
- ScDocShellRef xShell = loadDoc("functions-excel-2010.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"functions-excel-2010.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load the document.", xShell.is());
ScDocShellRef xDocSh = saveAndReload(xShell.get(), nFormatType);
@@ -3311,7 +3314,7 @@ void ScExportTest::testFunctionsExcel2010XLS()
void ScExportTest::testCeilingFloor( sal_uLong nFormatType )
{
- ScDocShellRef xShell = loadDoc("ceiling-floor.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"ceiling-floor.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load the document.", xShell.is());
ScDocShellRef xDocSh = saveAndReload(xShell.get(), nFormatType);
@@ -3331,7 +3334,7 @@ void ScExportTest::testCeilingFloorXLSX()
void ScExportTest::testCeilingFloorODSToXLSX()
{
// tdf#100011 - Cannot open sheet containing FLOOR/CEILING functions by MS Excel, after export to .xlsx
- ScDocShellRef xShell = loadDoc("ceiling-floor.", FORMAT_ODS);
+ ScDocShellRef xShell = loadDoc(u"ceiling-floor.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load the document.", xShell.is());
std::shared_ptr<utl::TempFile> pXPathFile = ScBootstrapFixture::exportTo(&(*xShell), FORMAT_XLSX);
@@ -3357,7 +3360,7 @@ void ScExportTest::testCeilingFloorODS()
void ScExportTest::testCustomXml()
{
// Load document and export it to a temporary file
- ScDocShellRef xShell = loadDoc("customxml.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"customxml.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load the document.", xShell.is());
std::shared_ptr<utl::TempFile> pXPathFile = ScBootstrapFixture::exportTo(&(*xShell), FORMAT_XLSX);
@@ -3389,7 +3392,7 @@ static sal_Unicode lcl_getWindowsDrive(const OUString& aURL)
void ScExportTest::testRelativePathsODS()
{
- ScDocShellRef xDocSh = loadDoc("fdo79305.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"fdo79305.", FORMAT_ODS);
CPPUNIT_ASSERT(xDocSh.is());
std::shared_ptr<utl::TempFile> pTempFile = exportTo(xDocSh.get(), FORMAT_ODS);
@@ -3430,7 +3433,7 @@ void testSheetProtection_Impl(const ScDocument& rDoc)
void ScExportTest::testSheetProtectionODS()
{
- ScDocShellRef xDocSh = loadDoc("sheet-protection.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"sheet-protection.", FORMAT_ODS);
CPPUNIT_ASSERT(xDocSh.is());
{
@@ -3469,7 +3472,7 @@ void ScExportTest::testSwappedOutImageExport()
for( size_t nFilter = 0; nFilter < SAL_N_ELEMENTS(aFilterNames); ++nFilter )
{
// Check whether the export code swaps in the image which was swapped out before.
- ScDocShellRef xDocSh = loadDoc("document_with_two_images.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"document_with_two_images.", FORMAT_ODS);
const OString sFailedMessage = OStringLiteral("Failed on filter: ") + aFilterNames[nFilter];
CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), xDocSh.is());
@@ -3543,7 +3546,7 @@ void ScExportTest::tearDown()
void ScExportTest::testSupBookVirtualPathXLS()
{
- ScDocShellRef xShell = loadDoc("external-ref.", FORMAT_XLS);
+ ScDocShellRef xShell = loadDoc(u"external-ref.", FORMAT_XLS);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(xShell.get(), FORMAT_XLS);
@@ -3585,7 +3588,7 @@ void ScExportTest::testLinkedGraphicRT()
for( size_t nFilter = 0; nFilter < SAL_N_ELEMENTS(aFilterNames); ++nFilter )
{
// Load the original file with one image
- ScDocShellRef xDocSh = loadDoc("document_with_linked_graphic.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"document_with_linked_graphic.", FORMAT_ODS);
const OString sFailedMessage = OStringLiteral("Failed on filter: ") + aFilterNames[nFilter];
// Export the document and import again for a check
@@ -3626,7 +3629,7 @@ void ScExportTest::testImageWithSpecialID()
for( size_t nFilter = 0; nFilter < SAL_N_ELEMENTS(aFilterNames); ++nFilter )
{
- ScDocShellRef xDocSh = loadDoc("images_with_special_IDs.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"images_with_special_IDs.", FORMAT_ODS);
const OString sFailedMessage = OStringLiteral("Failed on filter: ") + aFilterNames[nFilter];
CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), xDocSh.is());
@@ -3678,7 +3681,7 @@ void ScExportTest::testImageWithSpecialID()
void ScExportTest::testAbsNamedRangeHTML()
{
- ScDocShellRef xDocSh = loadDoc("numberformat.", FORMAT_HTML);
+ ScDocShellRef xDocSh = loadDoc(u"numberformat.", FORMAT_HTML);
xDocSh->DoHardRecalc();
ScDocShellRef xDocSh2 = saveAndReload(xDocSh.get(), FORMAT_ODS);
xDocSh->DoClose();
@@ -3695,7 +3698,7 @@ void ScExportTest::testAbsNamedRangeHTML()
void ScExportTest::testSheetLocalRangeNameXLS()
{
- ScDocShellRef xDocSh = loadDoc("named-ranges-local.", FORMAT_XLS);
+ ScDocShellRef xDocSh = loadDoc(u"named-ranges-local.", FORMAT_XLS);
xDocSh->DoHardRecalc();
ScDocShellRef xDocSh2 = saveAndReload(xDocSh.get(), FORMAT_XLS);
xDocSh->DoClose();
@@ -3719,7 +3722,7 @@ void ScExportTest::testSheetLocalRangeNameXLS()
void ScExportTest::testRelativeNamedExpressionsXLS()
{
- ScDocShellRef xDocSh = loadDoc("tdf113991_relativeNamedRanges.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf113991_relativeNamedRanges.", FORMAT_ODS);
xDocSh->DoHardRecalc();
ScDocShellRef xDocSh2 = saveAndReload(xDocSh.get(), FORMAT_XLS);
xDocSh->DoClose();
@@ -3747,7 +3750,7 @@ void ScExportTest::testRelativeNamedExpressionsXLS()
void ScExportTest::testSheetTextBoxHyperlinkXLSX()
{
- ScDocShellRef xShell = loadDoc("textbox-hyperlink.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"textbox-hyperlink.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX);
@@ -3763,7 +3766,7 @@ void ScExportTest::testSheetTextBoxHyperlinkXLSX()
void ScExportTest::testFontSizeXLSX()
{
- ScDocShellRef xDocSh = loadDoc("fontSize.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"fontSize.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
xmlDocUniquePtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/drawings/drawing1.xml", FORMAT_XLSX);
@@ -3778,7 +3781,7 @@ void ScExportTest::testFontSizeXLSX()
void ScExportTest::testSheetCharacterKerningSpaceXLSX()
{
- ScDocShellRef xShell = loadDoc("textbox-CharKerningSpace.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"textbox-CharKerningSpace.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX);
@@ -3798,7 +3801,7 @@ void ScExportTest::testSheetCharacterKerningSpaceXLSX()
void ScExportTest::testSheetCondensedCharacterSpaceXLSX()
{
- ScDocShellRef xShell = loadDoc("textbox-CondensedCharacterSpace.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"textbox-CondensedCharacterSpace.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX);
@@ -3818,7 +3821,7 @@ void ScExportTest::testSheetCondensedCharacterSpaceXLSX()
void ScExportTest::testTextUnderlineColorXLSX()
{
- ScDocShellRef xDocSh = loadDoc("underlineColor.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"underlineColor.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
xmlDocUniquePtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/drawings/drawing1.xml", FORMAT_XLSX);
@@ -3842,7 +3845,7 @@ void ScExportTest::testTextUnderlineColorXLSX()
void ScExportTest::testSheetRunParagraphPropertyXLSX()
{
- ScDocShellRef xShell = loadDoc("TextColor.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"TextColor.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX);
@@ -3859,7 +3862,7 @@ void ScExportTest::testSheetRunParagraphPropertyXLSX()
void ScExportTest::testPreserveTextWhitespaceXLSX()
{
- ScDocShellRef xShell = loadDoc("preserve-whitespace.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"preserve-whitespace.", FORMAT_XLSX);
ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
@@ -3871,7 +3874,7 @@ void ScExportTest::testPreserveTextWhitespaceXLSX()
void ScExportTest::testPreserveTextWhitespace2XLSX()
{
- ScDocShellRef xShell = loadDoc("preserve_space.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"preserve_space.", FORMAT_XLSX);
ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
@@ -3885,7 +3888,7 @@ void ScExportTest::testPreserveTextWhitespace2XLSX()
void ScExportTest::testHiddenShapeXLS()
{
- ScDocShellRef xDocSh = loadDoc("hiddenShape.", FORMAT_XLS);
+ ScDocShellRef xDocSh = loadDoc(u"hiddenShape.", FORMAT_XLS);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3902,7 +3905,7 @@ void ScExportTest::testHiddenShapeXLS()
void ScExportTest::testHiddenShapeXLSX()
{
- ScDocShellRef xDocSh = loadDoc("hiddenShape.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"hiddenShape.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3923,7 +3926,7 @@ void ScExportTest::testHiddenShapeXLSX()
void ScExportTest::testShapeAutofitXLSX()
{
- ScDocShellRef xDocSh = loadDoc("testShapeAutofit.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"testShapeAutofit.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
xmlDocUniquePtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/drawings/drawing1.xml", FORMAT_XLSX);
@@ -3939,7 +3942,7 @@ void ScExportTest::testShapeAutofitXLSX()
void ScExportTest::testHyperlinkXLSX()
{
- ScDocShellRef xDocSh = loadDoc("hyperlink.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"hyperlink.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
xmlDocUniquePtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/drawings/_rels/drawing1.xml.rels", FORMAT_XLSX);
@@ -3951,7 +3954,7 @@ void ScExportTest::testHyperlinkXLSX()
void ScExportTest::testMoveCellAnchoredShapesODS()
{
- ScDocShellRef xDocSh = loadDoc("move-cell-anchored-shapes.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"move-cell-anchored-shapes.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load move-cell-anchored-shapes.ods", xDocSh.is());
// There are two cell-anchored objects on the first sheet.
@@ -4114,7 +4117,7 @@ void ScExportTest::testMoveCellAnchoredShapesODS()
void ScExportTest::testMatrixMultiplicationXLSX()
{
- ScDocShellRef xShell = loadDoc("matrix-multiplication.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"matrix-multiplication.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX);
@@ -4140,7 +4143,7 @@ void ScExportTest::testMatrixMultiplicationXLSX()
void ScExportTest::testRefStringXLSX()
{
- ScDocShellRef xDocSh = loadDoc("ref_string.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"ref_string.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
//make sure ref syntax gets saved for MSO-produced docs
@@ -4157,7 +4160,7 @@ void ScExportTest::testRefStringXLSX()
void ScExportTest::testRefStringConfigXLSX()
{
// this doc is configured with CalcA1 ref syntax
- ScDocShellRef xDocSh = loadDoc("empty.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"empty.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
xDocSh = saveAndReload( &(*xDocSh), FORMAT_XLSX);
@@ -4171,7 +4174,7 @@ void ScExportTest::testRefStringConfigXLSX()
xDocSh->DoClose();
// this doc has no entry for ref syntax
- xDocSh = loadDoc("empty-noconf.", FORMAT_XLSX);
+ xDocSh = loadDoc(u"empty-noconf.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to open 2nd doc", xDocSh.is());
ScDocument& rDoc2 = xDocSh->GetDocument();
@@ -4228,7 +4231,7 @@ void ScExportTest::testRefStringUnspecified()
void ScExportTest::testHeaderImageODS()
{
// Graphic as header background was lost on export.
- ScDocShellRef xShell = loadDoc("header-image.", FORMAT_ODS);
+ ScDocShellRef xShell = loadDoc(u"header-image.", FORMAT_ODS);
ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_ODS);
uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(xDocSh->GetModel(), uno::UNO_QUERY);
uno::Reference<container::XNameAccess> xStyleFamilies = xStyleFamiliesSupplier->getStyleFamilies();
@@ -4243,7 +4246,7 @@ void ScExportTest::testHeaderImageODS()
void ScExportTest::testTextDirectionXLSX()
{
- ScDocShellRef xDocSh = loadDoc("writingMode.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"writingMode.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
xmlDocUniquePtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/styles.xml", FORMAT_XLSX);
@@ -4258,7 +4261,7 @@ void ScExportTest::testTextDirectionXLSX()
void ScExportTest::testTdf66668()
{
// Would hang on exporting without the fix in place
- ScDocShellRef xDocSh = loadDoc("tdf66668.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"tdf66668.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
xmlDocUniquePtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/styles.xml", FORMAT_XLSX);
@@ -4268,7 +4271,7 @@ void ScExportTest::testTdf66668()
void ScExportTest::testTdf130108()
{
- ScDocShellRef xDocSh = loadDoc("tdf130108.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf130108.", FORMAT_ODS);
CPPUNIT_ASSERT(xDocSh.is());
xmlDocUniquePtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/styles.xml", FORMAT_XLSX);
@@ -4285,7 +4288,7 @@ void ScExportTest::testTdf130108()
void ScExportTest::testTdf76949()
{
- ScDocShellRef xDocSh = loadDoc("tdf76949.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf76949.", FORMAT_ODS);
CPPUNIT_ASSERT(xDocSh.is());
xmlDocUniquePtr pSheet = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/worksheets/sheet1.xml", FORMAT_XLSX);
@@ -4298,7 +4301,7 @@ void ScExportTest::testTdf76949()
void ScExportTest::testTdf55417()
{
- ScDocShellRef xDocSh = loadDoc("tdf55417.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"tdf55417.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
xmlDocUniquePtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/styles.xml", FORMAT_XLSX);
@@ -4311,7 +4314,7 @@ void ScExportTest::testTdf55417()
void ScExportTest::testTdf129985()
{
- ScDocShellRef xDocSh = loadDoc("tdf129985.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"tdf129985.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
xmlDocUniquePtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/styles.xml", FORMAT_XLSX);
@@ -4324,7 +4327,7 @@ void ScExportTest::testTdf129985()
void ScExportTest::testTdf73063()
{
- ScDocShellRef xDocSh = loadDoc("tdf73063.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"tdf73063.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
xmlDocUniquePtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/styles.xml", FORMAT_XLSX);
@@ -4335,7 +4338,7 @@ void ScExportTest::testTdf73063()
xDocSh->DoClose();
}
-xmlDocUniquePtr ScExportTest::testTdf95640(const OUString& rFileName, sal_Int32 nSourceFormat,
+xmlDocUniquePtr ScExportTest::testTdf95640(std::u16string_view rFileName, sal_Int32 nSourceFormat,
sal_Int32 nDestFormat)
{
ScDocShellRef xShell = loadDoc(rFileName, nSourceFormat);
@@ -4350,7 +4353,7 @@ xmlDocUniquePtr ScExportTest::testTdf95640(const OUString& rFileName, sal_Int32
void ScExportTest::testTdf95640_ods_to_xlsx()
{
// Roundtripping sort options with user defined list to XLSX
- xmlDocUniquePtr pDoc = testTdf95640("tdf95640.", FORMAT_ODS, FORMAT_XLSX);
+ xmlDocUniquePtr pDoc = testTdf95640(u"tdf95640.", FORMAT_ODS, FORMAT_XLSX);
assertXPath(pDoc, "//x:worksheet/x:autoFilter", "ref", "A1:B4");
@@ -4363,7 +4366,7 @@ void ScExportTest::testTdf95640_ods_to_xlsx()
void ScExportTest::testTdf95640_ods_to_xlsx_with_standard_list()
{
// Roundtripping sort options with user defined list to XLSX
- xmlDocUniquePtr pDoc = testTdf95640("tdf95640_standard_list.", FORMAT_ODS, FORMAT_XLSX);
+ xmlDocUniquePtr pDoc = testTdf95640(u"tdf95640_standard_list.", FORMAT_ODS, FORMAT_XLSX);
assertXPath(pDoc, "//x:worksheet/x:autoFilter", "ref", "A1:B4");
@@ -4379,7 +4382,7 @@ void ScExportTest::testTdf95640_xlsx_to_xlsx()
// that compared to ODS source documents above, here we _actually_
// can use custom lists (beyond the global user defines), like
// low, medium, high
- xmlDocUniquePtr pDoc = testTdf95640("tdf95640.", FORMAT_XLSX, FORMAT_XLSX);
+ xmlDocUniquePtr pDoc = testTdf95640(u"tdf95640.", FORMAT_XLSX, FORMAT_XLSX);
assertXPath(pDoc, "//x:worksheet/x:autoFilter", "ref", "A1:B4");
@@ -4391,7 +4394,7 @@ void ScExportTest::testTdf95640_xlsx_to_xlsx()
void ScExportTest::testTdf88657ODS()
{
- ScDocShellRef xDocSh = loadDoc("tdf88657.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf88657.", FORMAT_ODS);
CPPUNIT_ASSERT(xDocSh.is());
xmlDocUniquePtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "styles.xml", FORMAT_ODS);
@@ -4404,7 +4407,7 @@ void ScExportTest::testTdf88657ODS()
void ScExportTest::testConditionalFormatRangeListXLSX()
{
- ScDocShellRef xDocSh = loadDoc("conditionalformat_rangelist.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"conditionalformat_rangelist.", FORMAT_ODS);
CPPUNIT_ASSERT(xDocSh.is());
xmlDocUniquePtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/worksheets/sheet1.xml", FORMAT_XLSX);
@@ -4417,7 +4420,7 @@ void ScExportTest::testConditionalFormatRangeListXLSX()
void ScExportTest::testConditionalFormatContainsTextXLSX()
{
- ScDocShellRef xDocSh = loadDoc("conditionalformat_containstext.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"conditionalformat_containstext.", FORMAT_ODS);
CPPUNIT_ASSERT(xDocSh.is());
xmlDocUniquePtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/worksheets/sheet1.xml", FORMAT_XLSX);
@@ -4430,7 +4433,7 @@ void ScExportTest::testConditionalFormatContainsTextXLSX()
void ScExportTest::testConditionalFormatPriorityCheckXLSX()
{
- ScDocShellRef xDocSh = loadDoc("conditional_fmt_checkpriority.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"conditional_fmt_checkpriority.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
xmlDocUniquePtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/worksheets/sheet1.xml", FORMAT_XLSX);
@@ -4476,7 +4479,7 @@ void ScExportTest::testConditionalFormatPriorityCheckXLSX()
void ScExportTest::testConditionalFormatOriginXLSX()
{
- ScDocShellRef xDocSh = loadDoc("conditional_fmt_origin.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"conditional_fmt_origin.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
xmlDocUniquePtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/worksheets/sheet1.xml", FORMAT_XLSX);
@@ -4491,7 +4494,7 @@ void ScExportTest::testConditionalFormatOriginXLSX()
void ScExportTest::testTdf41722()
{
- ScDocShellRef xDocSh = loadDoc("tdf41722.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"tdf41722.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
xmlDocUniquePtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/worksheets/sheet1.xml", FORMAT_XLSX);
@@ -4506,7 +4509,7 @@ void ScExportTest::testTdf41722()
void ScExportTest::testTdf113621()
{
- ScDocShellRef xDocSh = loadDoc("tdf113621.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"tdf113621.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
xmlDocUniquePtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/worksheets/sheet1.xml", FORMAT_XLSX);
@@ -4519,7 +4522,7 @@ void ScExportTest::testTdf113621()
void ScExportTest::testEscapeCharInNumberFormatXLSX()
{
- ScDocShellRef xDocSh = loadDoc("tdf81939.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"tdf81939.", FORMAT_XLSX);
CPPUNIT_ASSERT( xDocSh.is() );
xDocSh = saveAndReload( &(*xDocSh), FORMAT_XLSX);
CPPUNIT_ASSERT( xDocSh.is() );
@@ -4546,7 +4549,7 @@ void ScExportTest::testEscapeCharInNumberFormatXLSX()
void ScExportTest::testNatNumInNumberFormatXLSX()
{
- ScDocShellRef xDocSh = loadDoc("tdf79398_NatNum5.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf79398_NatNum5.", FORMAT_ODS);
CPPUNIT_ASSERT( xDocSh.is() );
xDocSh = saveAndReload( &(*xDocSh), FORMAT_XLSX); // Convert [NatNum5] to [DBNum2] in Chinese
CPPUNIT_ASSERT( xDocSh.is() );
@@ -4561,7 +4564,7 @@ void ScExportTest::testNatNumInNumberFormatXLSX()
void ScExportTest::testExponentWithoutSignFormatXLSX()
{
- ScDocShellRef xDocSh = loadDoc("tdf102370_ExponentWithoutSign.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf102370_ExponentWithoutSign.", FORMAT_ODS);
CPPUNIT_ASSERT( xDocSh.is() );
xDocSh = saveAndReload( &(*xDocSh), FORMAT_XLSX);
CPPUNIT_ASSERT( xDocSh.is() );
@@ -4582,7 +4585,7 @@ void ScExportTest::testExponentWithoutSignFormatXLSX()
void ScExportTest::testExtendedLCIDXLSX()
{
- ScDocShellRef xDocSh = loadDoc("tdf36038_ExtendedLCID.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf36038_ExtendedLCID.", FORMAT_ODS);
CPPUNIT_ASSERT( xDocSh.is() );
xDocSh = saveAndReload( &(*xDocSh), FORMAT_XLSX);
CPPUNIT_ASSERT( xDocSh.is() );
@@ -4623,7 +4626,7 @@ void ScExportTest::testExtendedLCIDXLSX()
void ScExportTest::testHiddenRepeatedRowsODS()
{
- ScDocShellRef xDocSh = loadDoc("empty.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"empty.", FORMAT_ODS);
CPPUNIT_ASSERT( xDocSh.is() );
{
@@ -4644,7 +4647,7 @@ void ScExportTest::testHiddenRepeatedRowsODS()
void ScExportTest::testHyperlinkTargetFrameODS()
{
- ScDocShellRef xDocSh = loadDoc("hyperlink_frame.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"hyperlink_frame.", FORMAT_ODS);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -4669,7 +4672,7 @@ void ScExportTest::testHyperlinkTargetFrameODS()
void ScExportTest::testOpenDocumentAsReadOnly()
{
- ScDocShellRef xDocSh = loadDoc("open-as-read-only.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"open-as-read-only.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh->IsSecurityOptOpenReadOnly());
ScDocShellRef xDocSh2 = saveAndReload(xDocSh.get(), FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh2->IsSecurityOptOpenReadOnly());
@@ -4679,7 +4682,7 @@ void ScExportTest::testOpenDocumentAsReadOnly()
void ScExportTest::testKeepSettingsOfBlankRows()
{
- ScDocShellRef xDocSh = loadDoc("tdf41425.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"tdf41425.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
std::shared_ptr<utl::TempFile> pXPathFile = ScBootstrapFixture::exportTo(&(*xDocSh), FORMAT_XLSX);
@@ -4694,7 +4697,7 @@ void ScExportTest::testKeepSettingsOfBlankRows()
void ScExportTest::testTdf133595()
{
- ScDocShellRef xDocSh = loadDoc("tdf133595.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"tdf133595.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
std::shared_ptr<utl::TempFile> pXPathFile = ScBootstrapFixture::exportTo(&(*xDocSh), FORMAT_XLSX);
@@ -4709,7 +4712,7 @@ void ScExportTest::testTdf133595()
void ScExportTest::testTdf134769()
{
- ScDocShellRef xDocSh = loadDoc("tdf134769.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"tdf134769.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
std::shared_ptr<utl::TempFile> pXPathFile = ScBootstrapFixture::exportTo(&(*xDocSh), FORMAT_XLSX);
@@ -4728,7 +4731,7 @@ void ScExportTest::testTdf134769()
void ScExportTest::testTdf106181()
{
- ScDocShellRef xDocSh = loadDoc("tdf106181.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf106181.", FORMAT_ODS);
CPPUNIT_ASSERT(xDocSh.is());
std::shared_ptr<utl::TempFile> pXPathFile = ScBootstrapFixture::exportTo(&(*xDocSh), FORMAT_XLSX);
@@ -4750,7 +4753,7 @@ void ScExportTest::testTdf106181()
void ScExportTest::testTdf105272()
{
- ScDocShellRef xDocSh = loadDoc("tdf105272.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"tdf105272.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
xDocSh = saveAndReload(xDocSh.get(), FORMAT_XLSX);
ScDocument& rDoc = xDocSh->GetDocument();
@@ -4765,7 +4768,7 @@ void ScExportTest::testTdf105272()
void ScExportTest::testTdf118990()
{
- ScDocShellRef xDocSh = loadDoc("tdf118990.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"tdf118990.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
xDocSh = saveAndReload(xDocSh.get(), FORMAT_XLSX);
ScDocument& rDoc = xDocSh->GetDocument();
@@ -4788,7 +4791,7 @@ void ScExportTest::testTdf118990()
void ScExportTest::testTdf121612()
{
- ScDocShellRef xDocSh = loadDoc("tdf121612.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf121612.", FORMAT_ODS);
CPPUNIT_ASSERT(xDocSh.is());
xDocSh = saveAndReload(xDocSh.get(), FORMAT_XLSX);
@@ -4807,7 +4810,7 @@ void ScExportTest::testTdf121612()
void ScExportTest::testTdf112936()
{
- ScDocShellRef xDocSh = loadDoc("tdf112936.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"tdf112936.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
xmlDocUniquePtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/pivotCache/pivotCacheDefinition1.xml", FORMAT_XLSX);
@@ -4837,7 +4840,7 @@ void ScExportTest::testXltxExport()
void ScExportTest::testPivotCacheAfterExportXLSX()
{
- ScDocShellRef xDocSh = loadDoc("numgroup_example.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"numgroup_example.", FORMAT_ODS);
CPPUNIT_ASSERT(xDocSh.is());
// export only
@@ -4866,7 +4869,7 @@ void ScExportTest::testPivotCacheAfterExportXLSX()
void ScExportTest::testTdf114969XLSX()
{
- ScDocShellRef xDocSh = loadDoc("sheet_name_with_dots.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"sheet_name_with_dots.", FORMAT_ODS);
CPPUNIT_ASSERT(xDocSh.is());
xmlDocUniquePtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/worksheets/sheet1.xml", FORMAT_XLSX);
@@ -4879,7 +4882,7 @@ void ScExportTest::testTdf114969XLSX()
void ScExportTest::testTdf115192XLSX()
{
- ScDocShellRef xDocSh = loadDoc("test_115192.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"test_115192.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
xmlDocUniquePtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/drawings/_rels/drawing1.xml.rels", FORMAT_XLSX);
@@ -4893,7 +4896,7 @@ void ScExportTest::testTdf115192XLSX()
void ScExportTest::testTdf91634XLSX()
{
- ScDocShellRef xDocSh = loadDoc("image_hyperlink.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"image_hyperlink.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
std::shared_ptr<utl::TempFile> pXPathFile = ScBootstrapFixture::exportTo(&(*xDocSh), FORMAT_XLSX);
@@ -4911,7 +4914,7 @@ void ScExportTest::testTdf91634XLSX()
void ScExportTest::testValidationCopyPaste()
{
- ScDocShellRef xDocSh = loadDoc("validation-copypaste.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"validation-copypaste.", FORMAT_ODS);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rSrcDoc = xDocSh->GetDocument();
@@ -4947,7 +4950,7 @@ void ScExportTest::testValidationCopyPaste()
void ScExportTest::testTdf115159()
{
- ScDocShellRef xShell = loadDoc("tdf115159.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"tdf115159.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(xShell.get(), FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
@@ -4974,7 +4977,7 @@ void ScExportTest::testTdf112567()
aOptions.Commit();
});
- ScDocShellRef xShell = loadDoc("tdf112567.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"tdf112567.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(xShell.get(), FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
@@ -5001,7 +5004,7 @@ void ScExportTest::testTdf112567b()
aOptions.Commit();
});
- ScDocShellRef xShell = loadDoc("tdf112567.", FORMAT_ODS);
+ ScDocShellRef xShell = loadDoc(u"tdf112567.", FORMAT_ODS);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(xShell.get(), FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
@@ -5021,7 +5024,7 @@ void ScExportTest::testTdf112567b()
void ScExportTest::testTdf123645XLSX()
{
- ScDocShellRef xDocSh = loadDoc("chart_hyperlink.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"chart_hyperlink.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
std::shared_ptr<utl::TempFile> pXPathFile = ScBootstrapFixture::exportTo(&(*xDocSh), FORMAT_XLSX);
@@ -5045,7 +5048,7 @@ void ScExportTest::testTdf123645XLSX()
void ScExportTest::testTdf125173XLSX()
{
- ScDocShellRef xDocSh = loadDoc("text_box_hyperlink.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"text_box_hyperlink.", FORMAT_ODS);
CPPUNIT_ASSERT(xDocSh.is());
std::shared_ptr<utl::TempFile> pXPathFile = ScBootstrapFixture::exportTo(&(*xDocSh), FORMAT_XLSX);
@@ -5063,7 +5066,7 @@ void ScExportTest::testTdf125173XLSX()
void ScExportTest::testTdf79972XLSX()
{
- ScDocShellRef xDocSh = loadDoc("tdf79972.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"tdf79972.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
std::shared_ptr<utl::TempFile> pXPathFile = ScBootstrapFixture::exportTo(&(*xDocSh), FORMAT_XLSX);
@@ -5081,7 +5084,7 @@ void ScExportTest::testTdf79972XLSX()
void ScExportTest::testTdf126024XLSX()
{
- ScDocShellRef xDocSh = loadDoc("hyperlink_formula.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"hyperlink_formula.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
std::shared_ptr<utl::TempFile> pXPathFile = ScBootstrapFixture::exportTo(&(*xDocSh), FORMAT_XLSX);
@@ -5099,7 +5102,7 @@ void ScExportTest::testTdf126024XLSX()
void ScExportTest::testTdf126177XLSX()
{
- ScDocShellRef xDocSh = loadDoc("hyperlink_export.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"hyperlink_export.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
std::shared_ptr<utl::TempFile> pXPathFile = ScBootstrapFixture::exportTo(&(*xDocSh), FORMAT_XLSX);
@@ -5119,7 +5122,7 @@ void ScExportTest::testTdf126177XLSX()
void ScExportTest::testCommentTextVAlignment()
{
// Testing comment text alignments.
- ScDocShellRef xShell = loadDoc("CommentTextVAlign.", FORMAT_ODS);
+ ScDocShellRef xShell = loadDoc(u"CommentTextVAlign.", FORMAT_ODS);
CPPUNIT_ASSERT(xShell.is());
std::shared_ptr<utl::TempFile> pXPathFile
@@ -5137,7 +5140,7 @@ void ScExportTest::testCommentTextVAlignment()
void ScExportTest::testCommentTextHAlignment()
{
// Testing comment text alignments.
- ScDocShellRef xShell = loadDoc("CommentTextHAlign.", FORMAT_ODS);
+ ScDocShellRef xShell = loadDoc(u"CommentTextHAlign.", FORMAT_ODS);
CPPUNIT_ASSERT(xShell.is());
std::shared_ptr<utl::TempFile> pXPathFile
@@ -5160,7 +5163,7 @@ void ScExportTest::testRotatedImageODS()
= css::sheet::GlobalSheetSettings::create(comphelper::getProcessComponentContext());
xGlobalSheetSettings->setMetric(static_cast<sal_Int16>(FieldUnit::MM));
- ScDocShellRef xDocSh = loadDoc("tdf103092_RotatedImage.", FORMAT_ODS, true);
+ ScDocShellRef xDocSh = loadDoc(u"tdf103092_RotatedImage.", FORMAT_ODS, true);
CPPUNIT_ASSERT(xDocSh.is());
std::shared_ptr<utl::TempFile> pTemp = saveAs(xDocSh.get(), FORMAT_ODS);
@@ -5186,7 +5189,7 @@ void ScExportTest::testRotatedImageODS()
void ScExportTest::testTdf128976()
{
- ScDocShellRef xShell = loadDoc("tdf128976.", FORMAT_XLS);
+ ScDocShellRef xShell = loadDoc(u"tdf128976.", FORMAT_XLS);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(xShell.get(), FORMAT_XLS);
@@ -5247,7 +5250,7 @@ void ScExportTest::testTdf120502()
void ScExportTest::testTdf131372()
{
- ScDocShellRef xShell = loadDoc("tdf131372.", FORMAT_ODS);
+ ScDocShellRef xShell = loadDoc(u"tdf131372.", FORMAT_ODS);
CPPUNIT_ASSERT(xShell);
auto pXPathFile = ScBootstrapFixture::exportTo(&(*xShell), FORMAT_XLSX);
@@ -5263,7 +5266,7 @@ void ScExportTest::testTdf131372()
}
void ScExportTest::testTdf81470()
{
- ScDocShellRef xShell = loadDoc("tdf81470.", FORMAT_XLS);
+ ScDocShellRef xShell = loadDoc(u"tdf81470.", FORMAT_XLS);
CPPUNIT_ASSERT(xShell);
//without the fix in place, it would have crashed at export time
@@ -5285,7 +5288,7 @@ void ScExportTest::testTdf81470()
void ScExportTest::testTdf122331()
{
- ScDocShellRef xShell = loadDoc("tdf122331.", FORMAT_ODS);
+ ScDocShellRef xShell = loadDoc(u"tdf122331.", FORMAT_ODS);
CPPUNIT_ASSERT(xShell);
auto pXPathFile = ScBootstrapFixture::exportTo(&(*xShell), FORMAT_XLSX);
@@ -5303,7 +5306,7 @@ void ScExportTest::testTdf122331()
void ScExportTest::testTdf83779()
{
// Roundtripping TRUE/FALSE constants (not functions) must convert them to functions
- ScDocShellRef xShell = loadDoc("tdf83779.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"tdf83779.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell);
auto pXPathFile = ScBootstrapFixture::exportTo(&(*xShell), FORMAT_XLSX);
@@ -5324,7 +5327,7 @@ void ScExportTest::testTdf121716_ExportEvenHeaderFooterXLSX()
// If there are separate odd/even header, but only 1 footer for all pages (this is possible only in LibreOffice)
// then the footer will be duplicated to have the same footer separately for even/odd pages
- ScDocShellRef xShell = loadDoc("tdf121716_EvenHeaderFooter.", FORMAT_ODS);
+ ScDocShellRef xShell = loadDoc(u"tdf121716_EvenHeaderFooter.", FORMAT_ODS);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX);
@@ -5355,7 +5358,7 @@ void ScExportTest::testTdf121716_ExportEvenHeaderFooterXLSX()
void ScExportTest::testTdf134459_HeaderFooterColorXLSX()
{
// Colors in header and footer should be exported, and imported properly
- ScDocShellRef xShell = loadDoc("tdf134459_HeaderFooterColor.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"tdf134459_HeaderFooterColor.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX);
@@ -5373,7 +5376,7 @@ void ScExportTest::testTdf134459_HeaderFooterColorXLSX()
void ScExportTest::testTdf134817_HeaderFooterTextWith2SectionXLSX()
{
// Header/footer text with multiple selection should be exported, and imported properly
- ScDocShellRef xShell = loadDoc("tdf134817_HeaderFooterTextWith2Section.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"tdf134817_HeaderFooterTextWith2Section.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX);
@@ -5391,7 +5394,7 @@ void ScExportTest::testTdf134817_HeaderFooterTextWith2SectionXLSX()
void ScExportTest::testTdf121718_UseFirstPageNumberXLSX()
{
// If "First page number" is not checked then useFirstPageNumb, and firstPageNumber should not be exported.
- ScDocShellRef xShell = loadDoc("tdf121718_UseFirstPageNumber.", FORMAT_ODS);
+ ScDocShellRef xShell = loadDoc(u"tdf121718_UseFirstPageNumber.", FORMAT_ODS);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX);
@@ -5415,7 +5418,7 @@ void ScExportTest::testTdf121718_UseFirstPageNumberXLSX()
void ScExportTest::testHeaderFontStyleXLSX()
{
- ScDocShellRef xShell = loadDoc("tdf134826.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"tdf134826.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell.is());
ScDocument& rDoc = xShell->GetDocument();
@@ -5450,7 +5453,7 @@ void ScExportTest::testTdf135828_Shape_Rect()
// tdf#135828 Check that the width and the height of rectangle of the shape is correct.
// tdf#123613 Check the positioning, and allow massive rounding errors because of the back and
// forth conversion between emu and hmm.
- ScDocShellRef xShell = loadDoc("tdf135828_Shape_Rect.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"tdf135828_Shape_Rect.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX);
@@ -5474,7 +5477,7 @@ void ScExportTest::testTdf135828_Shape_Rect()
void ScExportTest::testTdf123353()
{
- ScDocShellRef xShell = loadDoc("tdf123353.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"tdf123353.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX);
@@ -5493,7 +5496,7 @@ void ScExportTest::testTdf123353()
void ScExportTest::testTdf133688_precedents()
{
// tdf#133688 Check that we do not export detective shapes.
- ScDocShellRef xShell = loadDoc("tdf133688_dont_save_precedents_to_xlsx.", FORMAT_ODS);
+ ScDocShellRef xShell = loadDoc(u"tdf133688_dont_save_precedents_to_xlsx.", FORMAT_ODS);
CPPUNIT_ASSERT(xShell.is());
std::shared_ptr<utl::TempFile> pXPathFile
@@ -5510,7 +5513,7 @@ void ScExportTest::testTdf91251_missingOverflowRoundtrip()
{
// tdf#91251 check whether textBox overflow property (horzOverflow and vertOverflow) is
// getting preserved after roundtrip
- ScDocShellRef xShell = loadDoc("tdf91251_missingOverflowRoundtrip.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"tdf91251_missingOverflowRoundtrip.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX);
@@ -5531,7 +5534,7 @@ void ScExportTest::testTdf137000_handle_upright()
// TextPreRotateAngle to 0.
// (Upright is an xml attribute of xdr:txBody/a:bodyPr. It is set when
// in a textbox menu we choose: do not rotate this element.)
- ScDocShellRef xShell = loadDoc("tdf137000_export_upright.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"tdf137000_export_upright.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell.is());
std::shared_ptr<utl::TempFile> pXPathFile
@@ -5546,7 +5549,7 @@ void ScExportTest::testTdf137000_handle_upright()
void ScExportTest::testTdf126305_DataValidatyErrorAlert()
{
- ScDocShellRef xShell = loadDoc("tdf126305.", FORMAT_ODS);
+ ScDocShellRef xShell = loadDoc(u"tdf126305.", FORMAT_ODS);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX);
@@ -5565,7 +5568,7 @@ void ScExportTest::testTdf126305_DataValidatyErrorAlert()
void ScExportTest::testTdf76047_externalLink()
{
- ScDocShellRef pShell = loadDoc("tdf76047_externalLink.", FORMAT_XLSX);
+ ScDocShellRef pShell = loadDoc(u"tdf76047_externalLink.", FORMAT_XLSX);
CPPUNIT_ASSERT(pShell.is());
// load data from external links. (tdf76047_externalLinkSource.ods)
@@ -5590,7 +5593,7 @@ void ScExportTest::testTdf76047_externalLink()
void ScExportTest::testTdf87973_externalLinkSkipUnuseds()
{
- ScDocShellRef pShell = loadDoc("tdf87973_externalLinkSkipUnuseds.", FORMAT_ODS);
+ ScDocShellRef pShell = loadDoc(u"tdf87973_externalLinkSkipUnuseds.", FORMAT_ODS);
CPPUNIT_ASSERT(pShell.is());
// try to load data from external link: tdf132105_external.ods
@@ -5630,7 +5633,7 @@ void ScExportTest::testTdf87973_externalLinkSkipUnuseds()
void ScExportTest::testTdf138741_externalLinkSkipUnusedsCrash()
{
- ScDocShellRef xShell = loadDoc("tdf138741_externalLinkSkipUnusedsCrash.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"tdf138741_externalLinkSkipUnusedsCrash.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell);
//without the fix in place, it would have crashed at export time
@@ -5641,7 +5644,7 @@ void ScExportTest::testTdf138741_externalLinkSkipUnusedsCrash()
void ScExportTest::testTdf138824_linkToParentDirectory()
{
- ScDocShellRef xShell = loadDoc("childDir/tdf138824_linkToParentDirectory.", FORMAT_ODS);
+ ScDocShellRef xShell = loadDoc(u"childDir/tdf138824_linkToParentDirectory.", FORMAT_ODS);
CPPUNIT_ASSERT(xShell.is());
ScDocument& rDoc = xShell->GetDocument();
@@ -5681,7 +5684,7 @@ void ScExportTest::testTdf138824_linkToParentDirectory()
void ScExportTest::testTdf129969()
{
- ScDocShellRef xShell = loadDoc("external_hyperlink.", FORMAT_ODS);
+ ScDocShellRef xShell = loadDoc(u"external_hyperlink.", FORMAT_ODS);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX);
@@ -5698,7 +5701,7 @@ void ScExportTest::testTdf129969()
void ScExportTest::testTdf84874()
{
- ScDocShellRef xShell = loadDoc("tdf84874.", FORMAT_ODS);
+ ScDocShellRef xShell = loadDoc(u"tdf84874.", FORMAT_ODS);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(xShell.get(), FORMAT_XLSX);
@@ -5729,7 +5732,7 @@ void ScExportTest::testTdf84874()
void ScExportTest::testTdf136721_paper_size()
{
- ScDocShellRef xShell = loadDoc("tdf136721_letter_sized_paper.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"tdf136721_letter_sized_paper.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell.is());
std::shared_ptr<utl::TempFile> pXPathFile = ScBootstrapFixture::exportTo(&(*xShell), FORMAT_XLSX);
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index b2b6247a7b3c..8dafc913389c 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -7,8 +7,11 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include <memory>
#include <sal/config.h>
+
+#include <memory>
+#include <string_view>
+
#include <unotest/filters-test.hxx>
#include <test/bootstrapfixture.hxx>
#include <osl/file.hxx>
@@ -479,7 +482,7 @@ public:
CPPUNIT_TEST_SUITE_END();
private:
- void testPassword_Impl(const OUString& rFileNameBase);
+ void testPassword_Impl(std::u16string_view rFileNameBase);
uno::Reference<uno::XInterface> m_xCalcComponent;
};
@@ -534,7 +537,7 @@ void testRangeNameImpl(const ScDocument& rDoc)
void ScFiltersTest::testExtCondFormatXLSX()
{
- ScDocShellRef xDocSh = loadDoc("tdf122102.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"tdf122102.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load tdf122102.xlsx", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -570,7 +573,7 @@ void ScFiltersTest::testExtCondFormatXLSX()
void ScFiltersTest::testUpdateCircleInMergedCellODS()
{
- ScDocShellRef xDocSh = loadDoc("updateCircleInMergedCell.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"updateCircleInMergedCell.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load updateCircleInMergedCell.ods", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -600,7 +603,7 @@ void ScFiltersTest::testUpdateCircleInMergedCellODS()
void ScFiltersTest::testDeleteCircleInMergedCellODS()
{
- ScDocShellRef xDocSh = loadDoc("deleteCircleInMergedCell.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"deleteCircleInMergedCell.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load deleteCircleInMergedCell.ods", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -634,7 +637,7 @@ void ScFiltersTest::testDeleteCircleInMergedCellODS()
void ScFiltersTest::testBasicCellContentODS()
{
- ScDocShellRef xDocSh = loadDoc("basic-cell-content.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"basic-cell-content.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load basic-cell-content.ods", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -657,7 +660,7 @@ void ScFiltersTest::testBasicCellContentODS()
void ScFiltersTest::testBooleanFormatXLSX()
{
- ScDocShellRef xDocSh = loadDoc("check-boolean.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"check-boolean.", FORMAT_XLSX);
ScDocument& rDoc = xDocSh->GetDocument();
SvNumberFormatter* pNumFormatter = rDoc.GetFormatTable();
// Saved as >"TRUE";"TRUE";"FALSE"< but reading converted back to >BOOLEAN<
@@ -679,7 +682,7 @@ void ScFiltersTest::testBooleanFormatXLSX()
void ScFiltersTest::testRangeNameXLS()
{
- ScDocShellRef xDocSh = loadDoc("named-ranges-global.", FORMAT_XLS);
+ ScDocShellRef xDocSh = loadDoc(u"named-ranges-global.", FORMAT_XLS);
xDocSh->DoHardRecalc();
ScDocument& rDoc = xDocSh->GetDocument();
@@ -695,7 +698,7 @@ void ScFiltersTest::testRangeNameXLS()
void ScFiltersTest::testRangeNameLocalXLS()
{
- ScDocShellRef xDocSh = loadDoc("named-ranges-local.", FORMAT_XLS);
+ ScDocShellRef xDocSh = loadDoc(u"named-ranges-local.", FORMAT_XLS);
xDocSh->DoHardRecalc();
ScDocument& rDoc = xDocSh->GetDocument();
@@ -716,7 +719,7 @@ void ScFiltersTest::testRangeNameLocalXLS()
void ScFiltersTest::testRangeNameXLSX()
{
- ScDocShellRef xDocSh = loadDoc("named-ranges-global.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"named-ranges-global.", FORMAT_XLSX);
xDocSh->DoHardRecalc();
ScDocument& rDoc = xDocSh->GetDocument();
@@ -727,7 +730,7 @@ void ScFiltersTest::testRangeNameXLSX()
void ScFiltersTest::testHyperlinksXLSX()
{
- ScDocShellRef xDocSh = loadDoc("hyperlinks.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"hyperlinks.", FORMAT_XLSX);
ScDocument& rDoc = xDocSh->GetDocument();
CPPUNIT_ASSERT_EQUAL(OUString("10:ABC10"), rDoc.GetString(ScAddress(0,1,0)));
@@ -739,7 +742,7 @@ void ScFiltersTest::testHyperlinksXLSX()
void ScFiltersTest::testHardRecalcODS()
{
- ScDocShellRef xDocSh = loadDoc("hard-recalc.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"hard-recalc.", FORMAT_ODS);
xDocSh->DoHardRecalc();
CPPUNIT_ASSERT_MESSAGE("Failed to load hard-recalc.*", xDocSh.is());
@@ -756,7 +759,7 @@ void ScFiltersTest::testHardRecalcODS()
void ScFiltersTest::testFunctionsODS()
{
- ScDocShellRef xDocSh = loadDoc("functions.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"functions.", FORMAT_ODS);
xDocSh->DoHardRecalc();
CPPUNIT_ASSERT_MESSAGE("Failed to load functions.*", xDocSh.is());
@@ -787,7 +790,7 @@ void ScFiltersTest::testFunctionsODS()
xDocSh->DoClose();
- xDocSh = loadDoc("database-functions.", FORMAT_ODS);
+ xDocSh = loadDoc(u"database-functions.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load functions.*", xDocSh.is());
xDocSh->DoHardRecalc();
ScDocument& rDoc2 = xDocSh->GetDocument();
@@ -797,7 +800,7 @@ void ScFiltersTest::testFunctionsODS()
xDocSh->DoClose();
- xDocSh = loadDoc("date-time-functions.", FORMAT_ODS);
+ xDocSh = loadDoc(u"date-time-functions.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load functions.*", xDocSh.is());
xDocSh->DoHardRecalc();
ScDocument& rDoc3 = xDocSh->GetDocument();
@@ -816,7 +819,7 @@ void ScFiltersTest::testFunctionsODS()
void ScFiltersTest::testFunctionsExcel2010()
{
- ScDocShellRef xDocSh = loadDoc("functions-excel-2010.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"functions-excel-2010.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load the document.", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
rDoc.CalcAll(); // perform hard re-calculation.
@@ -828,7 +831,7 @@ void ScFiltersTest::testFunctionsExcel2010()
void ScFiltersTest::testCeilingFloorXLSX()
{
- ScDocShellRef xDocSh = loadDoc("ceiling-floor.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"ceiling-floor.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load the document.", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
rDoc.CalcAll(); // perform hard re-calculation.
@@ -841,7 +844,7 @@ void ScFiltersTest::testCeilingFloorXLSX()
void ScFiltersTest::testCachedFormulaResultsODS()
{
{
- ScDocShellRef xDocSh = loadDoc("functions.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"functions.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load functions.*", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -867,7 +870,7 @@ void ScFiltersTest::testCachedFormulaResultsODS()
}
{
- ScDocShellRef xDocSh = loadDoc("cachedValue.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"cachedValue.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load cachedValue.*", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -911,7 +914,7 @@ void ScFiltersTest::testCachedFormulaResultsODS()
void ScFiltersTest::testCachedMatrixFormulaResultsODS()
{
- ScDocShellRef xDocSh = loadDoc("matrix.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"matrix.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load matrix.*", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -945,7 +948,7 @@ void ScFiltersTest::testCachedMatrixFormulaResultsODS()
void ScFiltersTest::testFormulaDepAcrossSheetsODS()
{
- ScDocShellRef xDocSh = loadDoc("formula-across-sheets.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"formula-across-sheets.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load the file.", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -969,7 +972,7 @@ void ScFiltersTest::testFormulaDepAcrossSheetsODS()
void ScFiltersTest::testFormulaDepDeleteContentsODS()
{
- ScDocShellRef xDocSh = loadDoc("formula-delete-contents.", FORMAT_ODS, true);
+ ScDocShellRef xDocSh = loadDoc(u"formula-delete-contents.", FORMAT_ODS, true);
CPPUNIT_ASSERT_MESSAGE("Failed to load the file.", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -1042,7 +1045,7 @@ void testDBRanges_Impl(ScDocument& rDoc, sal_Int32 nFormat)
void ScFiltersTest::testDatabaseRangesODS()
{
- ScDocShellRef xDocSh = loadDoc("database.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"database.", FORMAT_ODS);
xDocSh->DoHardRecalc();
ScDocument& rDoc = xDocSh->GetDocument();
@@ -1053,7 +1056,7 @@ void ScFiltersTest::testDatabaseRangesODS()
void ScFiltersTest::testDatabaseRangesXLS()
{
- ScDocShellRef xDocSh = loadDoc("database.", FORMAT_XLS);
+ ScDocShellRef xDocSh = loadDoc(u"database.", FORMAT_XLS);
xDocSh->DoHardRecalc();
ScDocument& rDoc = xDocSh->GetDocument();
@@ -1064,7 +1067,7 @@ void ScFiltersTest::testDatabaseRangesXLS()
void ScFiltersTest::testDatabaseRangesXLSX()
{
- ScDocShellRef xDocSh = loadDoc("database.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"database.", FORMAT_XLSX);
xDocSh->DoHardRecalc();
ScDocument& rDoc = xDocSh->GetDocument();
@@ -1075,7 +1078,7 @@ void ScFiltersTest::testDatabaseRangesXLSX()
void ScFiltersTest::testFormatsODS()
{
- ScDocShellRef xDocSh = loadDoc("formats.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"formats.", FORMAT_ODS);
xDocSh->DoHardRecalc();
ScDocument& rDoc = xDocSh->GetDocument();
@@ -1108,7 +1111,7 @@ void ScFiltersTest::testFormatsODS()
void ScFiltersTest::testMatrixODS()
{
- ScDocShellRef xDocSh = loadDoc("matrix.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"matrix.", FORMAT_ODS);
xDocSh->DoHardRecalc();
ScDocument& rDoc = xDocSh->GetDocument();
@@ -1122,7 +1125,7 @@ void ScFiltersTest::testMatrixODS()
void ScFiltersTest::testMatrixXLS()
{
- ScDocShellRef xDocSh = loadDoc("matrix.", FORMAT_XLS);
+ ScDocShellRef xDocSh = loadDoc(u"matrix.", FORMAT_XLS);
xDocSh->DoHardRecalc();
CPPUNIT_ASSERT_MESSAGE("Failed to load matrix.*", xDocSh.is());
@@ -1138,7 +1141,7 @@ void ScFiltersTest::testMatrixXLS()
void ScFiltersTest::testDoubleThinBorder()
{
// double-thin borders created with size less than 1.15 where invisible (and subsequently lost) on round-trips.
- ScDocShellRef xDocSh = loadDoc("tdf88827_borderDoubleThin.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf88827_borderDoubleThin.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load tdf88827_borderDoubleThin.*", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -1157,7 +1160,7 @@ void ScFiltersTest::testDoubleThinBorder()
void ScFiltersTest::testBorderODS()
{
- ScDocShellRef xDocSh = loadDoc("border.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"border.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load border.*", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -1255,7 +1258,7 @@ void ScFiltersTest::testBordersOoo33()
borders.emplace_back(4, 9, 80, 80, 80, 80, 80, 0, 0, 80, 0, 0, 80, 0, 0, 80, 0, 0, 0, 0, 0, 0);
borders.emplace_back(4, 11, 100, 100, 100, 100, 100, 0, 0, 100, 0, 0, 100, 0, 0, 100, 0, 0, 0, 0, 0, 0);
- ScDocShellRef xDocSh = loadDoc("borders_ooo33.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"borders_ooo33.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load borders_ooo33.*", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -1308,7 +1311,7 @@ void ScFiltersTest::testBordersOoo33()
void ScFiltersTest::testBugFixesODS()
{
- ScDocShellRef xDocSh = loadDoc("bug-fixes.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"bug-fixes.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load bugFixes.ods", xDocSh.is());
xDocSh->DoHardRecalc();
@@ -1344,7 +1347,7 @@ void ScFiltersTest::testBugFixesODS()
void ScFiltersTest::testBugFixesXLS()
{
- ScDocShellRef xDocSh = loadDoc("bug-fixes.", FORMAT_XLS);
+ ScDocShellRef xDocSh = loadDoc(u"bug-fixes.", FORMAT_XLS);
CPPUNIT_ASSERT_MESSAGE("Failed to load bugFixes.xls", xDocSh.is());
xDocSh->DoHardRecalc();
@@ -1353,7 +1356,7 @@ void ScFiltersTest::testBugFixesXLS()
void ScFiltersTest::testBugFixesXLSX()
{
- ScDocShellRef xDocSh = loadDoc("bug-fixes.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"bug-fixes.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load bugFixes.xls", xDocSh.is());
xDocSh->DoHardRecalc();
@@ -1381,7 +1384,7 @@ void checkMergedCells( ScDocument& rDoc, const ScAddress& rStartAddress,
void ScFiltersTest::testMergedCellsODS()
{
- ScDocShellRef xDocSh = loadDoc("merged.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"merged.", FORMAT_ODS);
ScDocument& rDoc = xDocSh->GetDocument();
//check sheet1 content
@@ -1407,7 +1410,7 @@ void ScFiltersTest::testMergedCellsODS()
void ScFiltersTest::testRepeatedColumnsODS()
{
- ScDocShellRef xDocSh = loadDoc("repeatedColumns.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"repeatedColumns.", FORMAT_ODS);
ScDocument& rDoc = xDocSh->GetDocument();
//text
@@ -1529,7 +1532,7 @@ void checkCellValidity( const ScAddress& rValBaseAddr, const ScRange& rRange, co
void ScFiltersTest::testDataValidityODS()
{
- ScDocShellRef xDocSh = loadDoc("dataValidity.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"dataValidity.", FORMAT_ODS);
ScDocument& rDoc = xDocSh->GetDocument();
ScAddress aValBaseAddr1( 2,6,0 ); //sheet1
@@ -1590,7 +1593,7 @@ void ScFiltersTest::testDataValidityODS()
void ScFiltersTest::testDataValidityXLSX()
{
- ScDocShellRef xDocSh = loadDoc("dataValidity.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"dataValidity.", FORMAT_XLSX);
ScDocument& rDoc = xDocSh->GetDocument();
ScAddress aValBaseAddr1( 2,6,0 ); //sheet1
@@ -1612,7 +1615,7 @@ void ScFiltersTest::testDataValidityXLSX()
void ScFiltersTest::testDataTableMortgageXLS()
{
- ScDocShellRef xDocSh = loadDoc("data-table/mortgage.", FORMAT_XLS);
+ ScDocShellRef xDocSh = loadDoc(u"data-table/mortgage.", FORMAT_XLS);
CPPUNIT_ASSERT_MESSAGE("Failed to load the document.", xDocSh.is());
ScFormulaOptions aOptions;
@@ -1645,7 +1648,7 @@ void ScFiltersTest::testDataTableMortgageXLS()
void ScFiltersTest::testDataTableOneVarXLSX()
{
- ScDocShellRef xDocSh = loadDoc("data-table/one-variable.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"data-table/one-variable.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load the document.", xDocSh.is());
ScFormulaOptions aOptions;
@@ -1688,7 +1691,7 @@ void ScFiltersTest::testDataTableOneVarXLSX()
void ScFiltersTest::testDataTableMultiTableXLSX()
{
- ScDocShellRef xDocSh = loadDoc("data-table/multi-table.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"data-table/multi-table.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load the document.", xDocSh.is());
ScFormulaOptions aOptions;
@@ -1723,7 +1726,7 @@ void ScFiltersTest::testBrokenQuotesCSV()
OUString aFileExtension(getFileFormats()[FORMAT_CSV].pName, strlen(getFileFormats()[FORMAT_CSV].pName), RTL_TEXTENCODING_UTF8 );
OUString aFilterName(getFileFormats()[FORMAT_CSV].pFilterName, strlen(getFileFormats()[FORMAT_CSV].pFilterName), RTL_TEXTENCODING_UTF8) ;
OUString aFileName;
- createFileURL("fdo48621_broken_quotes.", aFileExtension, aFileName);
+ createFileURL(u"fdo48621_broken_quotes.", aFileExtension, aFileName);
OUString aFilterType(getFileFormats()[FORMAT_CSV].pTypeName, strlen(getFileFormats()[FORMAT_CSV].pTypeName), RTL_TEXTENCODING_UTF8);
std::cout << getFileFormats()[FORMAT_CSV].pName << " Test" << std::endl;
@@ -1770,7 +1773,7 @@ void ScFiltersTest::testCellValueXLSX()
void ScFiltersTest::testRowIndex1BasedXLSX()
{
- ScDocShellRef xDocSh = loadDoc("row-index-1-based.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"row-index-1-based.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -1800,7 +1803,7 @@ void ScFiltersTest::testRowIndex1BasedXLSX()
xDocSh->DoClose();
}
-void ScFiltersTest::testPassword_Impl(const OUString& aFileNameBase)
+void ScFiltersTest::testPassword_Impl(std::u16string_view aFileNameBase)
{
OUString aFileExtension(getFileFormats()[0].pName, strlen(getFileFormats()[0].pName), RTL_TEXTENCODING_UTF8 );
OUString aFilterName(getFileFormats()[0].pFilterName, strlen(getFileFormats()[0].pFilterName), RTL_TEXTENCODING_UTF8) ;
@@ -1835,25 +1838,25 @@ void ScFiltersTest::testPassword_Impl(const OUString& aFileNameBase)
void ScFiltersTest::testPasswordNew()
{
//tests opening a file with new password algorithm
- testPassword_Impl("password.");
+ testPassword_Impl(u"password.");
}
void ScFiltersTest::testPasswordOld()
{
//tests opening a file with old password algorithm
- testPassword_Impl("passwordOld.");
+ testPassword_Impl(u"passwordOld.");
}
void ScFiltersTest::testPasswordWrongSHA()
{
//tests opening a file wrongly using the new password algorithm
//in a sxc with the key algorithm missing
- testPassword_Impl("passwordWrongSHA.");
+ testPassword_Impl(u"passwordWrongSHA.");
}
void ScFiltersTest::testControlImport()
{
- ScDocShellRef xDocSh = loadDoc("singlecontrol.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"singlecontrol.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load singlecontrol.xlsx", xDocSh.is());
uno::Reference< frame::XModel > xModel = xDocSh->GetModel();
@@ -1868,7 +1871,7 @@ void ScFiltersTest::testControlImport()
void ScFiltersTest::testActiveXOptionButtonGroup()
{
- ScDocShellRef xDocSh = loadDoc("tdf111980_radioButtons.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"tdf111980_radioButtons.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load tdf111980_radioButtons.xlsx", xDocSh.is());
uno::Reference< frame::XModel > xModel = xDocSh->GetModel();
uno::Reference< sheet::XSpreadsheetDocument > xDoc(xModel, UNO_QUERY_THROW);
@@ -1943,7 +1946,7 @@ void ScFiltersTest::testActiveXOptionButtonGroup()
void ScFiltersTest::testChartImportODS()
{
- ScDocShellRef xDocSh = loadDoc("chart-import-basic.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"chart-import-basic.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load chart-import-basic.ods.", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -1978,7 +1981,7 @@ void ScFiltersTest::testChartImportODS()
#if HAVE_MORE_FONTS
void ScFiltersTest::testChartImportXLS()
{
- ScDocShellRef xDocSh = loadDoc("chartx.", FORMAT_XLS);
+ ScDocShellRef xDocSh = loadDoc(u"chartx.", FORMAT_XLS);
CPPUNIT_ASSERT_MESSAGE("Failed to load chartx.xls.", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -1996,7 +1999,7 @@ void ScFiltersTest::testChartImportXLS()
void ScFiltersTest::testNumberFormatHTML()
{
- ScDocShellRef xDocSh = loadDoc("numberformat.", FORMAT_HTML);
+ ScDocShellRef xDocSh = loadDoc(u"numberformat.", FORMAT_HTML);
CPPUNIT_ASSERT_MESSAGE("Failed to load numberformat.html", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -2023,7 +2026,7 @@ void ScFiltersTest::testNumberFormatHTML()
void ScFiltersTest::testNumberFormatCSV()
{
- ScDocShellRef xDocSh = loadDoc("numberformat.", FORMAT_CSV);
+ ScDocShellRef xDocSh = loadDoc(u"numberformat.", FORMAT_CSV);
CPPUNIT_ASSERT_MESSAGE("Failed to load numberformat.csv", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -2050,7 +2053,7 @@ void ScFiltersTest::testNumberFormatCSV()
void ScFiltersTest::testCellAnchoredShapesODS()
{
- ScDocShellRef xDocSh = loadDoc("cell-anchored-shapes.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"cell-anchored-shapes.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load cell-anchored-shapes.ods", xDocSh.is());
// There are two cell-anchored objects on the first sheet.
@@ -2078,7 +2081,7 @@ void ScFiltersTest::testCellAnchoredShapesODS()
void ScFiltersTest::testCellAnchoredHiddenShapesXLSX()
{
- ScDocShellRef xDocSh = loadDoc("cell-anchored-hidden-shapes.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"cell-anchored-hidden-shapes.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load cell-anchored-shapes.xlsx", xDocSh.is());
// There are two cell-anchored objects on the first sheet.
@@ -2101,7 +2104,7 @@ void ScFiltersTest::testCellAnchoredHiddenShapesXLSX()
void ScFiltersTest::testRowHeightODS()
{
- ScDocShellRef xDocSh = loadDoc("row-height-import.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"row-height-import.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load row-height-import.ods", xDocSh.is());
SCTAB nTab = 0;
@@ -2144,7 +2147,7 @@ void ScFiltersTest::testRowHeightODS()
void ScFiltersTest::testRichTextContentODS()
{
- ScDocShellRef xDocSh = loadDoc("rich-text-cells.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"rich-text-cells.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load rich-text-cells.ods", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -2371,7 +2374,7 @@ void ScFiltersTest::testRichTextContentODS()
void ScFiltersTest::testDataBarODS()
{
- ScDocShellRef xDocSh = loadDoc("databar.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"databar.", FORMAT_ODS);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -2382,7 +2385,7 @@ void ScFiltersTest::testDataBarODS()
void ScFiltersTest::testDataBarXLSX()
{
- ScDocShellRef xDocSh = loadDoc("databar.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"databar.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -2393,7 +2396,7 @@ void ScFiltersTest::testDataBarXLSX()
void ScFiltersTest::testColorScaleODS()
{
- ScDocShellRef xDocSh = loadDoc("colorscale.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"colorscale.", FORMAT_ODS);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -2405,7 +2408,7 @@ void ScFiltersTest::testColorScaleODS()
void ScFiltersTest::testColorScaleXLSX()
{
- ScDocShellRef xDocSh = loadDoc("colorscale.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"colorscale.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -2417,7 +2420,7 @@ void ScFiltersTest::testColorScaleXLSX()
void ScFiltersTest::testNewCondFormatODS()
{
- ScDocShellRef xDocSh = ScBootstrapFixture::loadDoc("new_cond_format_test.", FORMAT_ODS);
+ ScDocShellRef xDocSh = ScBootstrapFixture::loadDoc(u"new_cond_format_test.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load new_cond_format_test.ods", xDocSh.is());
@@ -2432,7 +2435,7 @@ void ScFiltersTest::testNewCondFormatODS()
void ScFiltersTest::testNewCondFormatXLSX()
{
- ScDocShellRef xDocSh = ScBootstrapFixture::loadDoc("new_cond_format_test.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = ScBootstrapFixture::loadDoc(u"new_cond_format_test.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load new_cond_format_test.xlsx", xDocSh.is());
@@ -2447,7 +2450,7 @@ void ScFiltersTest::testNewCondFormatXLSX()
void ScFiltersTest::testCondFormatImportCellIs()
{
- ScDocShellRef xDocSh = ScBootstrapFixture::loadDoc("condFormat_cellis.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = ScBootstrapFixture::loadDoc(u"condFormat_cellis.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load condFormat_cellis.xlsx", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -2481,7 +2484,7 @@ void ScFiltersTest::testCondFormatImportCellIs()
void ScFiltersTest::testCondFormatThemeColorXLSX()
{
- ScDocShellRef xDocSh = ScBootstrapFixture::loadDoc("condformat_theme_color.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = ScBootstrapFixture::loadDoc(u"condformat_theme_color.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load condformat_theme_color.xlsx", xDocSh.is());
@@ -2519,7 +2522,7 @@ void ScFiltersTest::testCondFormatThemeColorXLSX()
void ScFiltersTest::testCondFormatThemeColor2XLSX()
{
- ScDocShellRef xDocSh = ScBootstrapFixture::loadDoc("cond_format_theme_color2.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = ScBootstrapFixture::loadDoc(u"cond_format_theme_color2.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load cond_format_theme_color2.xlsx", xDocSh.is());
@@ -2558,7 +2561,7 @@ void checkDatabarPositiveColor(const ScConditionalFormat* pFormat, const Color&
void ScFiltersTest::testCondFormatThemeColor3XLSX()
{
- ScDocShellRef xDocSh = ScBootstrapFixture::loadDoc("cond_format_theme_color3.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = ScBootstrapFixture::loadDoc(u"cond_format_theme_color3.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load document", xDocSh.is());
@@ -2632,7 +2635,7 @@ void testCustomIconSetsXLSX_Impl(const ScDocument& rDoc, SCCOL nCol, SCROW nRow,
void ScFiltersTest::testComplexIconSetsXLSX()
{
- ScDocShellRef xDocSh = ScBootstrapFixture::loadDoc("complex_icon_set.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = ScBootstrapFixture::loadDoc(u"complex_icon_set.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load complex_icon_set.xlsx", xDocSh.is());
@@ -2658,7 +2661,7 @@ void ScFiltersTest::testComplexIconSetsXLSX()
void ScFiltersTest::testCondFormatParentXLSX()
{
- ScDocShellRef xDocSh = ScBootstrapFixture::loadDoc("cond_parent.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = ScBootstrapFixture::loadDoc(u"cond_parent.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load cond_parent.xlsx", xDocSh.is());
@@ -2674,7 +2677,7 @@ void ScFiltersTest::testCondFormatParentXLSX()
void ScFiltersTest::testColorScaleNumWithRefXLSX()
{
- ScDocShellRef xDocSh = ScBootstrapFixture::loadDoc("colorscale_num_with_ref.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = ScBootstrapFixture::loadDoc(u"colorscale_num_with_ref.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load colorscale_num_with_ref.xlsx", xDocSh.is());
@@ -2706,7 +2709,7 @@ void ScFiltersTest::testColorScaleNumWithRefXLSX()
void ScFiltersTest::testOrcusODSStyleInterface()
{
ScDocument aDoc;
- OUString aFullUrl = m_directories.getURLFromSrc("sc/qa/unit/data/xml/styles.xml");
+ OUString aFullUrl = m_directories.getURLFromSrc(u"sc/qa/unit/data/xml/styles.xml");
/* This loop below trims file:// from the start because orcus doesn't accept such a URL */
OUString aValidPath;
@@ -2920,7 +2923,7 @@ void ScFiltersTest::testOrcusODSStyleInterface()
void ScFiltersTest::testLiteralInFormulaXLS()
{
- ScDocShellRef xDocSh = loadDoc("shared-string/literal-in-formula.", FORMAT_XLS);
+ ScDocShellRef xDocSh = loadDoc(u"shared-string/literal-in-formula.", FORMAT_XLS);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -2933,7 +2936,7 @@ void ScFiltersTest::testLiteralInFormulaXLS()
void ScFiltersTest::testFormulaDependency()
{
- ScDocShellRef xDocSh = ScBootstrapFixture::loadDoc("dependencyTree.", FORMAT_ODS);
+ ScDocShellRef xDocSh = ScBootstrapFixture::loadDoc(u"dependencyTree.", FORMAT_ODS);
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3000,7 +3003,7 @@ void ScFiltersTest::testOptimalHeightReset()
if (!IsDefaultDPI())
return;
- ScDocShellRef xDocSh = loadDoc("multilineoptimal.", FORMAT_ODS, true);
+ ScDocShellRef xDocSh = loadDoc(u"multilineoptimal.", FORMAT_ODS, true);
SCTAB nTab = 0;
SCROW nRow = 0;
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3035,7 +3038,7 @@ void ScFiltersTest::testOptimalHeightReset()
void ScFiltersTest::testCustomNumFormatHybridCellODS()
{
- ScDocShellRef xDocSh = loadDoc("custom-numfmt-hybrid-cell.", FORMAT_ODS, false);
+ ScDocShellRef xDocSh = loadDoc(u"custom-numfmt-hybrid-cell.", FORMAT_ODS, false);
ScDocument& rDoc = xDocSh->GetDocument();
rDoc.SetAutoCalc(true);
@@ -3066,7 +3069,7 @@ void ScFiltersTest::testCustomNumFormatHybridCellODS()
void ScFiltersTest::testTdf121040()
{
- ScDocShellRef xDocSh = loadDoc("tdf121040.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf121040.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load tdf121040.ods", xDocSh.is());
const SCTAB nTab = 0;
@@ -3084,7 +3087,7 @@ void ScFiltersTest::testTdf121040()
void ScFiltersTest::testTdf118624()
{
- ScDocShellRef xDocSh = loadDoc("tdf118624.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf118624.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3097,7 +3100,7 @@ void ScFiltersTest::testTdf118624()
void ScFiltersTest::testTdf124454()
{
- ScDocShellRef xDocSh = loadDoc("tdf124454.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf124454.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3113,7 +3116,7 @@ void ScFiltersTest::testTdf124454()
void ScFiltersTest::testPrintRangeODS()
{
- ScDocShellRef xDocSh = loadDoc("print-range.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"print-range.", FORMAT_ODS);
ScDocument& rDoc = xDocSh->GetDocument();
const ScRange* pRange = rDoc.GetRepeatRowRange(0);
CPPUNIT_ASSERT(pRange);
@@ -3128,7 +3131,7 @@ void ScFiltersTest::testPrintRangeODS()
void ScFiltersTest::testOutlineODS()
{
- ScDocShellRef xDocSh = loadDoc("outline.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"outline.", FORMAT_ODS);
ScDocument& rDoc = xDocSh->GetDocument();
const ScOutlineTable* pTable = rDoc.GetOutlineTable(0);
@@ -3183,7 +3186,7 @@ void ScFiltersTest::testOutlineODS()
void ScFiltersTest::testColumnStyleXLSX()
{
- ScDocShellRef xDocSh = loadDoc("column-style.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"column-style.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3204,7 +3207,7 @@ void ScFiltersTest::testColumnStyleXLSX()
void ScFiltersTest::testColumnStyleAutoFilterXLSX()
{
- ScDocShellRef xDocSh = loadDoc("column-style-autofilter.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"column-style-autofilter.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3219,7 +3222,7 @@ void ScFiltersTest::testColumnStyleAutoFilterXLSX()
void ScFiltersTest::testSharedFormulaHorizontalXLS()
{
- ScDocShellRef xDocSh = loadDoc("shared-formula/horizontal.", FORMAT_XLS);
+ ScDocShellRef xDocSh = loadDoc(u"shared-formula/horizontal.", FORMAT_XLS);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3259,7 +3262,7 @@ void ScFiltersTest::testSharedFormulaHorizontalXLS()
void ScFiltersTest::testSharedFormulaWrappedRefsXLS()
{
- ScDocShellRef xDocSh = loadDoc("shared-formula/wrapped-refs.", FORMAT_XLS);
+ ScDocShellRef xDocSh = loadDoc(u"shared-formula/wrapped-refs.", FORMAT_XLS);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
rDoc.CalcAll();
@@ -3287,7 +3290,7 @@ void ScFiltersTest::testSharedFormulaWrappedRefsXLS()
void ScFiltersTest::testSharedFormulaBIFF5()
{
- ScDocShellRef xDocSh = loadDoc("shared-formula/biff5.", FORMAT_XLS);
+ ScDocShellRef xDocSh = loadDoc(u"shared-formula/biff5.", FORMAT_XLS);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
rDoc.CalcAll();
@@ -3303,7 +3306,7 @@ void ScFiltersTest::testSharedFormulaBIFF5()
void ScFiltersTest::testSharedFormulaXLSB()
{
- ScDocShellRef xDocSh = loadDoc("shared_formula.", FORMAT_XLSB);
+ ScDocShellRef xDocSh = loadDoc(u"shared_formula.", FORMAT_XLSB);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
rDoc.CalcAll();
@@ -3326,7 +3329,7 @@ void ScFiltersTest::testSharedFormulaXLS()
{
{
// fdo#80091
- ScDocShellRef xDocSh = loadDoc("shared-formula/relative-refs1.", FORMAT_XLS);
+ ScDocShellRef xDocSh = loadDoc(u"shared-formula/relative-refs1.", FORMAT_XLS);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
rDoc.CalcAll();
@@ -3347,7 +3350,7 @@ void ScFiltersTest::testSharedFormulaXLS()
{
// fdo#84556 and some related tests
- ScDocShellRef xDocSh = loadDoc("shared-formula/relative-refs2.", FORMAT_XLS);
+ ScDocShellRef xDocSh = loadDoc(u"shared-formula/relative-refs2.", FORMAT_XLS);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
rDoc.CalcAll();
@@ -3415,7 +3418,7 @@ void ScFiltersTest::testSharedFormulaXLS()
void ScFiltersTest::testSharedFormulaColumnLabelsODS()
{
- ScDocShellRef xDocSh = loadDoc("shared-formula/column-labels.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"shared-formula/column-labels.", FORMAT_ODS);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3444,7 +3447,7 @@ void ScFiltersTest::testSharedFormulaColumnLabelsODS()
void ScFiltersTest::testSharedFormulaColumnRowLabelsODS()
{
- ScDocShellRef xDocSh = loadDoc("shared-formula/column-row-labels.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"shared-formula/column-row-labels.", FORMAT_ODS);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3483,7 +3486,7 @@ void ScFiltersTest::testSharedFormulaColumnRowLabelsODS()
void ScFiltersTest::testExternalRefCacheXLSX()
{
- ScDocShellRef xDocSh = loadDoc("external-refs.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"external-refs.", FORMAT_XLSX);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3498,7 +3501,7 @@ void ScFiltersTest::testExternalRefCacheXLSX()
void ScFiltersTest::testExternalRefCacheODS()
{
- ScDocShellRef xDocSh = loadDoc("external-ref-cache.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"external-ref-cache.", FORMAT_ODS);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3517,7 +3520,7 @@ void ScFiltersTest::testExternalRefCacheODS()
void ScFiltersTest::testHybridSharedStringODS()
{
- ScDocShellRef xDocSh = loadDoc("hybrid-shared-string.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"hybrid-shared-string.", FORMAT_ODS);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3530,7 +3533,7 @@ void ScFiltersTest::testHybridSharedStringODS()
void ScFiltersTest::testCopyMergedNumberFormats()
{
- ScDocShellRef xDocSh = loadDoc("copy-merged-number-formats.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"copy-merged-number-formats.", FORMAT_ODS);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3553,7 +3556,7 @@ void ScFiltersTest::testCopyMergedNumberFormats()
void ScFiltersTest::testVBAUserFunctionXLSM()
{
- ScDocShellRef xDocSh = loadDoc("vba-user-function.", FORMAT_XLSM);
+ ScDocShellRef xDocSh = loadDoc(u"vba-user-function.", FORMAT_XLSM);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3581,7 +3584,7 @@ void ScFiltersTest::testEmbeddedImageXLS()
// The document has one embedded image on the first sheet. Make sure it's
// imported properly.
- ScDocShellRef xDocSh = loadDoc("file-with-png-image.", FORMAT_XLS);
+ ScDocShellRef xDocSh = loadDoc(u"file-with-png-image.", FORMAT_XLS);
CPPUNIT_ASSERT(xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3602,7 +3605,7 @@ void ScFiltersTest::testEmbeddedImageXLS()
void ScFiltersTest::testErrorOnExternalReferences()
{
- ScDocShellRef xDocSh = loadDoc("blank.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"blank.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to open empty doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3621,7 +3624,7 @@ void ScFiltersTest::testErrorOnExternalReferences()
void ScFiltersTest::testTdf44076()
{
- ScDocShellRef xDocSh = loadDoc("blank.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"blank.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to open empty doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3635,7 +3638,7 @@ void ScFiltersTest::testTdf44076()
void ScFiltersTest::testEditEngStrikeThroughXLSX()
{
- ScDocShellRef xDocSh = loadDoc("strike-through.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"strike-through.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3668,7 +3671,7 @@ void ScFiltersTest::testEditEngStrikeThroughXLSX()
void ScFiltersTest::testRefStringXLSX()
{
- ScDocShellRef xDocSh = loadDoc("ref_string.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"ref_string.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3684,7 +3687,7 @@ void ScFiltersTest::testRefStringXLSX()
void ScFiltersTest::testTdf130132()
{
- ScDocShellRef xDocSh = loadDoc("tdf130132.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf130132.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3701,7 +3704,7 @@ void ScFiltersTest::testTdf130132()
void ScFiltersTest::testTdf133327()
{
- ScDocShellRef xDocSh = loadDoc("tdf133327.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf133327.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3720,7 +3723,7 @@ void ScFiltersTest::testTdf133327()
void ScFiltersTest::testColumnStyle2XLSX()
{
- ScDocShellRef xDocSh = loadDoc("column_style.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"column_style.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3758,7 +3761,7 @@ void ScFiltersTest::testColumnStyle2XLSX()
void ScFiltersTest::testTdf110440XLSX()
{
- ScDocShellRef xDocSh = loadDoc("tdf110440.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"tdf110440.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
uno::Reference<frame::XModel> xModel = xDocSh->GetModel();
@@ -3778,7 +3781,7 @@ void ScFiltersTest::testTdf110440XLSX()
void ScFiltersTest::testTdf132278()
{
// Would crash without the fix on loading
- ScDocShellRef xDocSh = loadDoc("tdf132278.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf132278.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3790,7 +3793,7 @@ void ScFiltersTest::testTdf132278()
void ScFiltersTest::testTdf130959()
{
// Would crash without the fix on loading
- ScDocShellRef xDocSh = loadDoc("tdf130959.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"tdf130959.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3802,7 +3805,7 @@ void ScFiltersTest::testTdf130959()
void ScFiltersTest::testTdf129410()
{
// Would crash without the fix on loading
- ScDocShellRef xDocSh = loadDoc("tdf129410.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf129410.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3814,7 +3817,7 @@ void ScFiltersTest::testTdf129410()
void ScFiltersTest::testTdf138507()
{
// Would fail to load without the fix
- ScDocShellRef xDocSh = loadDoc("tdf138507.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf138507.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3825,7 +3828,7 @@ void ScFiltersTest::testTdf138507()
void ScFiltersTest::testTdf131380()
{
- ScDocShellRef xDocSh = loadDoc("tdf131380.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"tdf131380.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
// Would crash without the fix on recalculating
@@ -3837,7 +3840,7 @@ void ScFiltersTest::testTdf131380()
void ScFiltersTest::testTdf129681()
{
- ScDocShellRef xDocSh = loadDoc("tdf129681.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf129681.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3866,7 +3869,7 @@ void ScFiltersTest::testTdf129681()
void ScFiltersTest::testTdf111974XLSM()
{
// Would crash without the fix on loading
- ScDocShellRef xDocSh = loadDoc("tdf111974.", FORMAT_XLSM);
+ ScDocShellRef xDocSh = loadDoc(u"tdf111974.", FORMAT_XLSM);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3877,7 +3880,7 @@ void ScFiltersTest::testTdf111974XLSM()
void ScFiltersTest::testBnc762542()
{
- ScDocShellRef xDocSh = loadDoc("bnc762542.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"bnc762542.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3903,7 +3906,7 @@ void ScFiltersTest::testBnc762542()
void ScFiltersTest::testHiddenSheetsXLSX()
{
- ScDocShellRef xDocSh = loadDoc("hidden_sheets.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"hidden_sheets.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3916,7 +3919,7 @@ void ScFiltersTest::testHiddenSheetsXLSX()
void ScFiltersTest::testAutofilterXLSX()
{
- ScDocShellRef xDocSh = loadDoc("autofilter.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"autofilter.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3947,7 +3950,7 @@ void checkValidationFormula(const ScAddress& rPos, const ScDocument& rDoc, const
void ScFiltersTest::testRelFormulaValidationXLS()
{
- ScDocShellRef xDocSh = loadDoc("validation.", FORMAT_XLS);
+ ScDocShellRef xDocSh = loadDoc(u"validation.", FORMAT_XLS);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3960,7 +3963,7 @@ void ScFiltersTest::testRelFormulaValidationXLS()
void ScFiltersTest::testTdf136364()
{
- ScDocShellRef xDocSh = loadDoc("tdf136364.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"tdf136364.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3984,7 +3987,7 @@ void ScFiltersTest::testTdf136364()
void ScFiltersTest::testTdf103734()
{
- ScDocShellRef xDocSh = loadDoc("tdf103734.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf103734.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -3996,7 +3999,7 @@ void ScFiltersTest::testTdf103734()
void ScFiltersTest::testTdf98844()
{
- ScDocShellRef xDocSh = loadDoc("tdf98844.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf98844.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -4015,7 +4018,7 @@ void ScFiltersTest::testTdf98844()
void ScFiltersTest::testTdf100458()
{
- ScDocShellRef xDocSh = loadDoc("tdf100458_lost_zero_value.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf100458_lost_zero_value.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
CPPUNIT_ASSERT(rDoc.HasValueData(0, 0, 0));
@@ -4026,7 +4029,7 @@ void ScFiltersTest::testTdf100458()
void ScFiltersTest::testTdf118561()
{
- ScDocShellRef xDocSh = loadDoc("tdf118561.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf118561.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -4045,7 +4048,7 @@ void ScFiltersTest::testTdf118561()
void ScFiltersTest::testTdf125099()
{
- ScDocShellRef xDocSh = loadDoc("tdf125099.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf125099.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -4066,7 +4069,7 @@ void ScFiltersTest::testTdf125099()
void ScFiltersTest::testTdf134455()
{
- ScDocShellRef xDocSh = loadDoc("tdf134455.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"tdf134455.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -4084,7 +4087,7 @@ void ScFiltersTest::testTdf134455()
void ScFiltersTest::testTdf119533()
{
- ScDocShellRef xDocSh = loadDoc("tdf119533.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf119533.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -4103,7 +4106,7 @@ void ScFiltersTest::testTdf119533()
void ScFiltersTest::testTdf127982()
{
- ScDocShellRef xDocSh = loadDoc("tdf127982.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf127982.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -4126,7 +4129,7 @@ void ScFiltersTest::testTdf127982()
void ScFiltersTest::testTdf109409()
{
- ScDocShellRef xDocSh = loadDoc("tdf109409.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf109409.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -4155,7 +4158,7 @@ void ScFiltersTest::testTdf109409()
void ScFiltersTest::testTdf132105()
{
- ScDocShellRef xDocSh = loadDoc("tdf132105.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf132105.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -4183,7 +4186,7 @@ void ScFiltersTest::testTdf132105()
void ScFiltersTest::testTdf131424()
{
- ScDocShellRef xDocSh = loadDoc("tdf131424.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"tdf131424.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -4198,7 +4201,7 @@ void ScFiltersTest::testTdf131424()
void ScFiltersTest::testTdf100709XLSX()
{
- ScDocShellRef xDocSh = ScBootstrapFixture::loadDoc("tdf100709.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = ScBootstrapFixture::loadDoc(u"tdf100709.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load tdf100709.xlsx", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -4210,7 +4213,7 @@ void ScFiltersTest::testTdf100709XLSX()
void ScFiltersTest::testTdf97598XLSX()
{
- ScDocShellRef xDocSh = loadDoc("tdf97598_scenarios.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"tdf97598_scenarios.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load tdf97598_scenarios.xlsx", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -4222,7 +4225,7 @@ void ScFiltersTest::testTdf97598XLSX()
void ScFiltersTest::testTdf83672XLSX()
{
- ScDocShellRef xDocSh = loadDoc("tdf83672.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"tdf83672.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load tdf83672.xlsx", xDocSh.is());
uno::Reference< drawing::XDrawPagesSupplier > xDoc(
xDocSh->GetModel(), uno::UNO_QUERY_THROW );
@@ -4257,7 +4260,7 @@ void ScFiltersTest::testUnicodeFileNameGnumeric()
void ScFiltersTest::testMergedCellsXLSXML()
{
- ScDocShellRef xDocSh = loadDoc("merged-cells.", FORMAT_XLS_XML);
+ ScDocShellRef xDocSh = loadDoc(u"merged-cells.", FORMAT_XLS_XML);
CPPUNIT_ASSERT_MESSAGE("Failed to load merged-cells.xml", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -4291,7 +4294,7 @@ void ScFiltersTest::testMergedCellsXLSXML()
void ScFiltersTest::testBackgroundColorStandardXLSXML()
{
- ScDocShellRef xDocSh = loadDoc("background-color-standard.", FORMAT_XLS_XML);
+ ScDocShellRef xDocSh = loadDoc(u"background-color-standard.", FORMAT_XLS_XML);
CPPUNIT_ASSERT_MESSAGE("Failed to load background-color-standard.xml", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -4338,7 +4341,7 @@ void ScFiltersTest::testBackgroundColorStandardXLSXML()
void ScFiltersTest::testTdf131536()
{
- ScDocShellRef xDocSh = loadDoc("tdf131536.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"tdf131536.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load the document", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -4355,7 +4358,7 @@ void ScFiltersTest::testTdf131536()
void ScFiltersTest::testTdf130583()
{
- ScDocShellRef xDocSh = loadDoc("tdf130583.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf130583.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load the document", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -4375,7 +4378,7 @@ void ScFiltersTest::testTdf130583()
void ScFiltersTest::testTdf85617()
{
- ScDocShellRef xDocSh = loadDoc("tdf85617.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"tdf85617.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load the document", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -4386,7 +4389,7 @@ void ScFiltersTest::testTdf85617()
void ScFiltersTest::testTdf134234()
{
- ScDocShellRef xDocSh = loadDoc("tdf134234.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf134234.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load the document", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -4402,7 +4405,7 @@ void ScFiltersTest::testNamedExpressionsXLSXML()
{
// global named expressions
- ScDocShellRef xDocSh = loadDoc("named-exp-global.", FORMAT_XLS_XML);
+ ScDocShellRef xDocSh = loadDoc(u"named-exp-global.", FORMAT_XLS_XML);
CPPUNIT_ASSERT_MESSAGE("Failed to load named-exp-global.xml", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -4427,7 +4430,7 @@ void ScFiltersTest::testNamedExpressionsXLSXML()
{
// sheet-local named expressions
- ScDocShellRef xDocSh = loadDoc("named-exp-local.", FORMAT_XLS_XML);
+ ScDocShellRef xDocSh = loadDoc(u"named-exp-local.", FORMAT_XLS_XML);
CPPUNIT_ASSERT_MESSAGE("Failed to load named-exp-local.xml", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -4456,7 +4459,7 @@ void ScFiltersTest::testNamedExpressionsXLSXML()
void ScFiltersTest::testEmptyRowsXLSXML()
{
- ScDocShellRef xDocSh = loadDoc("empty-rows.", FORMAT_XLS_XML);
+ ScDocShellRef xDocSh = loadDoc(u"empty-rows.", FORMAT_XLS_XML);
CPPUNIT_ASSERT_MESSAGE("Failed to load empty-rows.xml", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -4489,7 +4492,7 @@ void ScFiltersTest::testEmptyRowsXLSXML()
void ScFiltersTest::testBorderDirectionsXLSXML()
{
- ScDocShellRef xDocSh = loadDoc("border-directions.", FORMAT_XLS_XML);
+ ScDocShellRef xDocSh = loadDoc(u"border-directions.", FORMAT_XLS_XML);
CPPUNIT_ASSERT_MESSAGE("Failed to load border-directions.xml", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -4579,7 +4582,7 @@ void ScFiltersTest::testBorderDirectionsXLSXML()
void ScFiltersTest::testBorderColorsXLSXML()
{
- ScDocShellRef xDocSh = loadDoc("border-colors.", FORMAT_XLS_XML);
+ ScDocShellRef xDocSh = loadDoc(u"border-colors.", FORMAT_XLS_XML);
CPPUNIT_ASSERT_MESSAGE("Failed to load border-colors.xml", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -4636,7 +4639,7 @@ void ScFiltersTest::testBorderColorsXLSXML()
void ScFiltersTest::testHiddenRowsColumnsXLSXML()
{
- ScDocShellRef xDocSh = loadDoc("hidden-rows-columns.", FORMAT_XLS_XML);
+ ScDocShellRef xDocSh = loadDoc(u"hidden-rows-columns.", FORMAT_XLS_XML);
CPPUNIT_ASSERT_MESSAGE("Failed to load hidden-rows-columns.xml", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -4688,7 +4691,7 @@ void ScFiltersTest::testHiddenRowsColumnsXLSXML()
void ScFiltersTest::testColumnWidthRowHeightXLSXML()
{
- ScDocShellRef xDocSh = loadDoc("column-width-row-height.", FORMAT_XLS_XML);
+ ScDocShellRef xDocSh = loadDoc(u"column-width-row-height.", FORMAT_XLS_XML);
CPPUNIT_ASSERT_MESSAGE("Failed to load column-width-row-height.xml", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -4746,7 +4749,7 @@ void ScFiltersTest::testColumnWidthRowHeightXLSXML()
void ScFiltersTest::testCharacterSetXLSXML()
{
- ScDocShellRef xDocSh = loadDoc("character-set.", FORMAT_XLS_XML);
+ ScDocShellRef xDocSh = loadDoc(u"character-set.", FORMAT_XLS_XML);
CPPUNIT_ASSERT_MESSAGE("Failed to load column-width-row-height.xml", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -4777,7 +4780,7 @@ void ScFiltersTest::testCharacterSetXLSXML()
void ScFiltersTest::testCondFormatXLSB()
{
- ScDocShellRef xDocSh = loadDoc("cond_format.", FORMAT_XLSB);
+ ScDocShellRef xDocSh = loadDoc(u"cond_format.", FORMAT_XLSB);
ScDocument& rDoc = xDocSh->GetDocument();
ScConditionalFormatList* pList = rDoc.GetCondFormList(0);
@@ -4793,7 +4796,7 @@ void ScFiltersTest::testCondFormatXLSB()
void ScFiltersTest::testPageScalingXLSX()
{
- ScDocShellRef xDocSh = loadDoc("page_scale.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"page_scale.", FORMAT_XLSX);
ScDocument& rDoc = xDocSh->GetDocument();
OUString aStyleName = rDoc.GetPageStyle(0);
@@ -4810,7 +4813,7 @@ void ScFiltersTest::testPageScalingXLSX()
void ScFiltersTest::testActiveXCheckboxXLSX()
{
- ScDocShellRef xDocSh = loadDoc("activex_checkbox.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"activex_checkbox.", FORMAT_XLSX);
uno::Reference< frame::XModel > xModel = xDocSh->GetModel();
uno::Reference< sheet::XSpreadsheetDocument > xDoc(xModel, UNO_QUERY_THROW);
uno::Reference< container::XIndexAccess > xIA(xDoc->getSheets(), UNO_QUERY_THROW);
@@ -4847,7 +4850,7 @@ void ScFiltersTest::testActiveXCheckboxXLSX()
void ScFiltersTest::testtdf120301_xmlSpaceParsingXLSX()
{
- ScDocShellRef xDocSh = loadDoc("tdf120301_xmlSpaceParsing.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"tdf120301_xmlSpaceParsing.", FORMAT_XLSX);
uno::Reference< frame::XModel > xModel = xDocSh->GetModel();
uno::Reference< sheet::XSpreadsheetDocument > xDoc(xModel, UNO_QUERY_THROW);
uno::Reference< container::XIndexAccess > xIA(xDoc->getSheets(), UNO_QUERY_THROW);
@@ -4885,7 +4888,7 @@ struct PaintListener : public SfxListener
void ScFiltersTest::testCondFormatFormulaListenerXLSX()
{
- ScDocShellRef xDocSh = loadDoc("cond_format_formula_listener.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"cond_format_formula_listener.", FORMAT_XLSX);
PaintListener aListener;
aListener.StartListening(*xDocSh);
ScDocument& rDoc = xDocSh->GetDocument();
@@ -4915,7 +4918,7 @@ void ScFiltersTest::testTdf137091()
aOptions.Commit();
});
- ScDocShellRef xDocSh = loadDoc("tdf137091.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"tdf137091.", FORMAT_XLSX);
ScDocument& rDoc = xDocSh->GetDocument();
// Without the fix in place, this test would have failed with
@@ -4927,7 +4930,7 @@ void ScFiltersTest::testTdf137091()
void ScFiltersTest::testTdf62268()
{
- ScDocShellRef xDocSh = loadDoc("tdf62268.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf62268.", FORMAT_ODS);
ScDocument& rDoc = xDocSh->GetDocument();
int nHeight;
@@ -4942,7 +4945,7 @@ void ScFiltersTest::testTdf62268()
void ScFiltersTest::testTdf137453()
{
- ScDocShellRef xDocSh = loadDoc("tdf137453.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf137453.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -4957,7 +4960,7 @@ void ScFiltersTest::testTdf137453()
void ScFiltersTest::testTdf35636()
{
- ScDocShellRef xDocSh = loadDoc("tdf35636.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"tdf35636.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -4971,7 +4974,7 @@ void ScFiltersTest::testTdf35636()
void ScFiltersTest::testVBAMacroFunctionODS()
{
- ScDocShellRef xDocSh = loadDoc("vba_macro_functions.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"vba_macro_functions.", FORMAT_ODS);
ScDocument& rDoc = xDocSh->GetDocument();
OUString aFunction;
@@ -4984,7 +4987,7 @@ void ScFiltersTest::testVBAMacroFunctionODS()
void ScFiltersTest::testAutoheight2Rows()
{
- ScDocShellRef xDocSh = loadDoc("autoheight2rows.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"autoheight2rows.", FORMAT_ODS);
ScDocument& rDoc = xDocSh->GetDocument();
SCTAB nTab = 0;
@@ -5006,7 +5009,7 @@ void ScFiltersTest::testAutoheight2Rows()
void ScFiltersTest::testXLSDefColWidth()
{
// XLS has only 256 columns; but on import, we need to set default width to all above that limit
- ScDocShellRef xDocSh = loadDoc("chartx.", FORMAT_XLS); // just some XLS with narrow columns
+ ScDocShellRef xDocSh = loadDoc(u"chartx.", FORMAT_XLS); // just some XLS with narrow columns
ScDocument& rDoc = xDocSh->GetDocument();
int nWidth = rDoc.GetColWidth(MAXCOL, 0, false);
@@ -5018,7 +5021,7 @@ void ScFiltersTest::testXLSDefColWidth()
void ScFiltersTest::testPreviewMissingObjLink()
{
- ScDocShellRef xDocSh = loadDoc("keep-preview-missing-obj-link.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"keep-preview-missing-obj-link.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load keep-preview-missing-obj-link.ods.", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -5039,7 +5042,7 @@ void ScFiltersTest::testShapeRotationImport()
return;
// tdf#83593 Incorrectly calculated bounding rectangles caused shapes to appear as if there
// were extra or missing rotations. Hence, we check the sizes of these rectangles.
- ScDocShellRef xDocSh = loadDoc("testShapeRotationImport.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"testShapeRotationImport.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load testShapeRotationImport.xlsx", xDocSh.is());
uno::Reference< drawing::XDrawPagesSupplier > xDoc(xDocSh->GetModel(), uno::UNO_QUERY_THROW);
uno::Reference< drawing::XDrawPage > xPage(xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW);
@@ -5084,7 +5087,7 @@ void ScFiltersTest::testShapeRotationImport()
void ScFiltersTest::testShapeDisplacementOnRotationImport()
{
// tdf#135918 shape is displaced on rotation if it is placed next to the sheets upper/left edges
- ScDocShellRef xDocSh = loadDoc("testShapeDisplacementOnRotationImport.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"testShapeDisplacementOnRotationImport.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load testShapeDisplacementOnRotationImport.xlsx", xDocSh.is());
uno::Reference<drawing::XDrawPagesSupplier> xDoc(xDocSh->GetModel(), uno::UNO_QUERY_THROW);
@@ -5101,7 +5104,7 @@ void ScFiltersTest::testShapeDisplacementOnRotationImport()
void ScFiltersTest::testTextBoxBodyUpright()
{
// tdf#106197 We should import the "upright" attribute of txBody.
- ScDocShellRef xDocSh = loadDoc("tdf106197_import_upright.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"tdf106197_import_upright.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load testTextBoxBodyUpright.xlsx", xDocSh.is());
uno::Reference<drawing::XDrawPagesSupplier> xDoc(xDocSh->GetModel(), uno::UNO_QUERY_THROW);
@@ -5143,7 +5146,7 @@ void ScFiltersTest::testTextBoxBodyUpright()
void ScFiltersTest::testTextLengthDataValidityXLSX()
{
- ScDocShellRef xDocSh = loadDoc("textLengthDataValidity.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"textLengthDataValidity.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load textLengthDataValidity.xlsx", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -5181,7 +5184,7 @@ void ScFiltersTest::testTextLengthDataValidityXLSX()
void ScFiltersTest::testDeleteCircles()
{
- ScDocShellRef xDocSh = loadDoc("testDeleteCircles.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"testDeleteCircles.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load testDeleteCircles.xlsx", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -5220,7 +5223,7 @@ void ScFiltersTest::testDeleteCircles()
void ScFiltersTest::testDrawCircleInMergeCells()
{
- ScDocShellRef xDocSh = loadDoc("testDrawCircleInMergeCells.", FORMAT_XLSX);
+ ScDocShellRef xDocSh = loadDoc(u"testDrawCircleInMergeCells.", FORMAT_XLSX);
CPPUNIT_ASSERT_MESSAGE("Failed to load testDrawCircleInMergeCells.ods", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
@@ -5287,7 +5290,7 @@ void ScFiltersTest::testDrawCircleInMergeCells()
void ScFiltersTest::testDeleteCirclesInRowAndCol()
{
- ScDocShellRef xDocSh = loadDoc("deleteCirclesInRowAndCol.", FORMAT_ODS);
+ ScDocShellRef xDocSh = loadDoc(u"deleteCirclesInRowAndCol.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to load deleteCirclesInRowAndCol.ods", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
diff --git a/sc/source/core/data/dpdimsave.cxx b/sc/source/core/data/dpdimsave.cxx
index e90a015a7899..fa9b2ded7d78 100644
--- a/sc/source/core/data/dpdimsave.cxx
+++ b/sc/source/core/data/dpdimsave.cxx
@@ -151,7 +151,7 @@ void ScDPSaveGroupDimension::AddGroupItem( const ScDPSaveGroupItem& rItem )
aGroups.push_back( rItem );
}
-OUString ScDPSaveGroupDimension::CreateGroupName(const OUString& rPrefix)
+OUString ScDPSaveGroupDimension::CreateGroupName(std::u16string_view rPrefix)
{
// create a name for a new group, using "Group1", "Group2" etc. (translated prefix in rPrefix)
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index 2716a2d79fc5..fe54b7c1086c 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -57,6 +57,8 @@
#include <com/sun/star/sheet/XLevelsSupplier.hpp>
#include <com/sun/star/sheet/XMembersAccess.hpp>
#include <com/sun/star/sheet/XMembersSupplier.hpp>
+
+#include <string_view>
#include <vector>
using namespace com::sun::star;
@@ -1480,7 +1482,7 @@ bool ScDPOutput::GetDataResultPositionData(vector<sheet::DataPilotFieldFilter>&
namespace {
-OUString lcl_GetDataFieldName( const OUString& rSourceName, sal_Int16 eFunc )
+OUString lcl_GetDataFieldName( std::u16string_view rSourceName, sal_Int16 eFunc )
{
const char* pStrId = nullptr;
switch ( eFunc )
diff --git a/sc/source/core/data/global2.cxx b/sc/source/core/data/global2.cxx
index 0f10debc2aa1..87c13da7a616 100644
--- a/sc/source/core/data/global2.cxx
+++ b/sc/source/core/data/global2.cxx
@@ -318,10 +318,10 @@ OUString ScGlobal::GetAbsDocName( const OUString& rFileName,
return aAbsName;
}
-OUString ScGlobal::GetDocTabName( const OUString& rFileName,
- const OUString& rTabName )
+OUString ScGlobal::GetDocTabName( std::u16string_view rFileName,
+ std::u16string_view rTabName )
{
- OUString aDocTab = "'" + rFileName;
+ OUString aDocTab = OUString::Concat("'") + rFileName;
sal_Int32 nPos = 1;
while( (nPos = aDocTab.indexOf( '\'', nPos )) != -1 )
{ // escape Quotes
diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx
index df68a6ffe8da..210e2674e9ec 100644
--- a/sc/source/core/tool/addincol.cxx
+++ b/sc/source/core/tool/addincol.cxx
@@ -941,7 +941,7 @@ static const ScAddInArgDesc* lcl_FindArgDesc( const ScUnoAddInFuncData& rFuncDat
}
void ScUnoAddInCollection::UpdateFromAddIn( const uno::Reference<uno::XInterface>& xInterface,
- const OUString& rServiceName )
+ std::u16string_view rServiceName )
{
uno::Reference<lang::XLocalizable> xLoc( xInterface, uno::UNO_QUERY );
if ( xLoc.is() ) // optional in new add-ins
@@ -980,7 +980,7 @@ void ScUnoAddInCollection::UpdateFromAddIn( const uno::Reference<uno::XInterface
OUString aFuncU = xFunc->getName();
// stored function name: (service name).(function)
- OUString aFuncName = rServiceName + "." + aFuncU;
+ OUString aFuncName = OUString::Concat(rServiceName) + "." + aFuncU;
// internal names are skipped because no FuncData exists
ScUnoAddInFuncData* pOldData = const_cast<ScUnoAddInFuncData*>( GetFuncData( aFuncName ) );
diff --git a/sc/source/core/tool/calcconfig.cxx b/sc/source/core/tool/calcconfig.cxx
index 4a8fb73b7dd9..2b0ff8c2e19e 100644
--- a/sc/source/core/tool/calcconfig.cxx
+++ b/sc/source/core/tool/calcconfig.cxx
@@ -202,7 +202,7 @@ OUString ScOpCodeSetToSymbolicString(const ScCalcConfig::OpCodeSet& rOpCodes)
return result.toString();
}
-ScCalcConfig::OpCodeSet ScStringToOpCodeSet(const OUString& rOpCodes)
+ScCalcConfig::OpCodeSet ScStringToOpCodeSet(std::u16string_view rOpCodes)
{
ScCalcConfig::OpCodeSet result = std::make_shared<o3tl::sorted_vector< OpCode >>();
formula::FormulaCompiler aCompiler;
@@ -212,7 +212,7 @@ ScCalcConfig::OpCodeSet ScStringToOpCodeSet(const OUString& rOpCodes)
sal_Int32 fromIndex(0);
sal_Int32 semicolon;
- OUString s(rOpCodes + ";");
+ OUString s(OUString::Concat(rOpCodes) + ";");
while ((semicolon = s.indexOf(';', fromIndex)) >= 0)
{
diff --git a/sc/source/core/tool/chartlis.cxx b/sc/source/core/tool/chartlis.cxx
index 25696eefb9b4..c0ade58db760 100644
--- a/sc/source/core/tool/chartlis.cxx
+++ b/sc/source/core/tool/chartlis.cxx
@@ -416,7 +416,7 @@ bool ScChartListenerCollection::hasListeners() const
return !m_Listeners.empty();
}
-OUString ScChartListenerCollection::getUniqueName(const OUString& rPrefix) const
+OUString ScChartListenerCollection::getUniqueName(std::u16string_view rPrefix) const
{
for (sal_Int32 nNum = 1; nNum < 10000; ++nNum) // arbitrary limit to prevent infinite loop.
{
diff --git a/sc/source/core/tool/unitconv.cxx b/sc/source/core/tool/unitconv.cxx
index 41d3d4f82586..4a8bc7839be9 100644
--- a/sc/source/core/tool/unitconv.cxx
+++ b/sc/source/core/tool/unitconv.cxx
@@ -30,12 +30,12 @@ const sal_Unicode cDelim = 0x01; // delimiter between From and To
// ScUnitConverterData
ScUnitConverterData::ScUnitConverterData(
- const OUString& rFromUnit, const OUString& rToUnit, double fValue ) :
+ std::u16string_view rFromUnit, std::u16string_view rToUnit, double fValue ) :
maIndexString(BuildIndexString(rFromUnit, rToUnit)),
mfValue(fValue) {}
OUString ScUnitConverterData::BuildIndexString(
- const OUString& rFromUnit, const OUString& rToUnit )
+ std::u16string_view rFromUnit, std::u16string_view rToUnit )
{
return rFromUnit + OUStringChar(cDelim) + rToUnit;
}
@@ -101,7 +101,7 @@ ScUnitConverter::ScUnitConverter()
ScUnitConverter::~ScUnitConverter() {}
bool ScUnitConverter::GetValue(
- double& fValue, const OUString& rFromUnit, const OUString& rToUnit ) const
+ double& fValue, std::u16string_view rFromUnit, std::u16string_view rToUnit ) const
{
OUString aIndex = ScUnitConverterData::BuildIndexString(rFromUnit, rToUnit);
MapType::const_iterator it = maData.find(aIndex);
diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx
index cb28f003c064..e1f26807b556 100644
--- a/sc/source/filter/excel/excimp8.cxx
+++ b/sc/source/filter/excel/excimp8.cxx
@@ -354,7 +354,7 @@ void ImportExcel8::ReadBasic()
oox::StorageRef vbaStg = root.openSubStorage( "_VBA_PROJECT_CUR", false );
if ( vbaStg )
{
- oox::ole::VbaProject aVbaPrj( aCtx, pShell->GetModel(), "Calc" );
+ oox::ole::VbaProject aVbaPrj( aCtx, pShell->GetModel(), u"Calc" );
// collect names of embedded form controls, as specified in the VBA project
uno::Reference< container::XNameContainer > xOleNameOverrideSink( new OleNameOverrideContainer );
aVbaPrj.setOleOverridesSink( xOleNameOverrideSink );
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index 028ad89241d6..f505968d6373 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -22,6 +22,8 @@
#include <vector>
#include <algorithm>
+#include <string_view>
+
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/sheet/XAreaLinks.hpp>
#include <com/sun/star/sheet/XAreaLink.hpp>
@@ -990,7 +992,7 @@ bool RequiresFixedFormula(ScConditionMode eMode)
return false;
}
-OString GetFixedFormula(ScConditionMode eMode, const ScAddress& rAddress, const OString& rText)
+OString GetFixedFormula(ScConditionMode eMode, const ScAddress& rAddress, std::string_view rText)
{
OStringBuffer aBuffer;
XclXmlUtils::ToOString(aBuffer, rAddress);
@@ -1006,9 +1008,9 @@ OString GetFixedFormula(ScConditionMode eMode, const ScAddress& rAddress, const
case ScConditionMode::EndsWith:
return OString("RIGHT(" + aPos +",LEN(\"" + rText + "\"))=\"" + rText + "\"");
case ScConditionMode::ContainsText:
- return OString("NOT(ISERROR(SEARCH(\"" + rText + "\"," + aPos + ")))");
+ return OString(OString::Concat("NOT(ISERROR(SEARCH(\"") + rText + "\"," + aPos + ")))");
case ScConditionMode::NotContainsText:
- return OString("ISERROR(SEARCH(\"" + rText + "\"," + aPos + "))");
+ return OString(OString::Concat("ISERROR(SEARCH(\"") + rText + "\"," + aPos + "))");
default:
break;
}
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
index 05c4b673d0fe..279e9c7eaee0 100644
--- a/sc/source/filter/excel/xehelper.cxx
+++ b/sc/source/filter/excel/xehelper.cxx
@@ -980,7 +980,7 @@ OUString XclExpUrlHelper::EncodeUrl( const XclExpRoot& rRoot, const OUString& rA
return lclEncodeDosUrl(rRoot.GetBiff(), aDosUrl, aDosBase, pTableName);
}
-OUString XclExpUrlHelper::EncodeDde( const OUString& rApplic, const OUString& rTopic )
+OUString XclExpUrlHelper::EncodeDde( std::u16string_view rApplic, std::u16string_view rTopic )
{
return rApplic + OUStringChar(EXC_DDE_DELIM) + rTopic;
}
diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx
index 2b42606f30ea..d9d61f37ab62 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -264,7 +264,7 @@ public:
/** Creates an EXTERNSHEET record containing a special code (i.e. own document or sheet). */
explicit XclExpExternSheet( const XclExpRoot& rRoot, sal_Unicode cCode );
/** Creates an EXTERNSHEET record referring to an internal sheet. */
- explicit XclExpExternSheet( const XclExpRoot& rRoot, const OUString& rTabName );
+ explicit XclExpExternSheet( const XclExpRoot& rRoot, std::u16string_view rTabName );
/** Finds or inserts an EXTERNNAME record for add-ins.
@return The 1-based EXTERNNAME record index; or 0, if the record list is full. */
@@ -1461,7 +1461,7 @@ XclExpExternSheet::XclExpExternSheet( const XclExpRoot& rRoot, sal_Unicode cCode
Init( OUStringChar(cCode) );
}
-XclExpExternSheet::XclExpExternSheet( const XclExpRoot& rRoot, const OUString& rTabName ) :
+XclExpExternSheet::XclExpExternSheet( const XclExpRoot& rRoot, std::u16string_view rTabName ) :
XclExpExternSheetBase( rRoot, EXC_ID_EXTERNSHEET )
{
// reference to own sheet: \03<sheetname>
diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx
index 17027dd11756..ccac6ecc49e1 100644
--- a/sc/source/filter/ftools/ftools.cxx
+++ b/sc/source/filter/ftools/ftools.cxx
@@ -309,7 +309,7 @@ OUString ScfTools::GetNameFromHTMLIndex( sal_uInt32 nIndex )
return aName;
}
-OUString ScfTools::GetNameFromHTMLName( const OUString& rTabName )
+OUString ScfTools::GetNameFromHTMLName( std::u16string_view rTabName )
{
return GetHTMLNamePrefix() + rTabName;
}
diff --git a/sc/source/filter/inc/ftools.hxx b/sc/source/filter/inc/ftools.hxx
index dc216a502cb2..b8768c8c49ee 100644
--- a/sc/source/filter/inc/ftools.hxx
+++ b/sc/source/filter/inc/ftools.hxx
@@ -23,6 +23,8 @@
#include <algorithm>
#include <vector>
#include <limits>
+#include <string_view>
+
#include <tools/ref.hxx>
#include <filter.hxx>
@@ -228,7 +230,7 @@ public:
/** Returns the built-in range name for an HTML table, specified by table index. */
static OUString GetNameFromHTMLIndex( sal_uInt32 nIndex );
/** Returns the built-in range name for an HTML table, specified by table name. */
- static OUString GetNameFromHTMLName( const OUString& rTabName );
+ static OUString GetNameFromHTMLName( std::u16string_view rTabName );
/** Returns true, if rSource is the built-in range name for an HTML document. */
static bool IsHTMLDocName( const OUString& rSource );
diff --git a/sc/source/filter/inc/xehelper.hxx b/sc/source/filter/inc/xehelper.hxx
index 7369b9925643..af561cbf09d7 100644
--- a/sc/source/filter/inc/xehelper.hxx
+++ b/sc/source/filter/inc/xehelper.hxx
@@ -21,6 +21,8 @@
#define INCLUDED_SC_SOURCE_FILTER_INC_XEHELPER_HXX
#include <memory>
+#include <string_view>
+
#include "ftools.hxx"
#include <rangelst.hxx>
#include "xladdress.hxx"
@@ -410,7 +412,7 @@ public:
@param pTableName Optional pointer to a table name to be encoded in this URL. */
static OUString EncodeUrl( const XclExpRoot& rRoot, const OUString& rAbsUrl, const OUString* pTableName = nullptr );
/** Encodes and returns the passed DDE link to an Excel like DDE link. */
- static OUString EncodeDde( const OUString& rApplic, const OUString& rTopic );
+ static OUString EncodeDde( std::u16string_view rApplic, std::u16string_view rTopic );
};
class ScMatrix;
diff --git a/sc/source/filter/oox/excelfilter.cxx b/sc/source/filter/oox/excelfilter.cxx
index 4c59a0e9393b..1989dfdb56db 100644
--- a/sc/source/filter/oox/excelfilter.cxx
+++ b/sc/source/filter/oox/excelfilter.cxx
@@ -84,7 +84,7 @@ bool ExcelFilter::importDocument()
this variable (nonpro only). */
//OOX_DUMP_FILE( ::oox::dump::xlsb::Dumper );
- OUString aWorkbookPath = getFragmentPathFromFirstTypeFromOfficeDoc( "officeDocument" );
+ OUString aWorkbookPath = getFragmentPathFromFirstTypeFromOfficeDoc( u"officeDocument" );
if( aWorkbookPath.isEmpty() )
return false;
diff --git a/sc/source/filter/oox/excelvbaproject.cxx b/sc/source/filter/oox/excelvbaproject.cxx
index c3e48ba474c1..f143c57c7c01 100644
--- a/sc/source/filter/oox/excelvbaproject.cxx
+++ b/sc/source/filter/oox/excelvbaproject.cxx
@@ -39,7 +39,7 @@ using namespace ::com::sun::star::sheet;
using namespace ::com::sun::star::uno;
ExcelVbaProject::ExcelVbaProject( const Reference< XComponentContext >& rxContext, const Reference< XSpreadsheetDocument >& rxDocument ) :
- ::oox::ole::VbaProject( rxContext, Reference< XModel >( rxDocument, UNO_QUERY ), "Calc" ),
+ ::oox::ole::VbaProject( rxContext, Reference< XModel >( rxDocument, UNO_QUERY ), u"Calc" ),
mxDocument( rxDocument )
{
}
diff --git a/sc/source/filter/oox/workbookfragment.cxx b/sc/source/filter/oox/workbookfragment.cxx
index ac92e96d6e41..3cccee89e6aa 100644
--- a/sc/source/filter/oox/workbookfragment.cxx
+++ b/sc/source/filter/oox/workbookfragment.cxx
@@ -347,26 +347,26 @@ void WorkbookFragment::finalizeImport()
ISegmentProgressBarRef xGlobalSegment = getProgressBar().createSegment( PROGRESS_LENGTH_GLOBALS );
// read the theme substream
- OUString aThemeFragmentPath = getFragmentPathFromFirstTypeFromOfficeDoc( "theme" );
+ OUString aThemeFragmentPath = getFragmentPathFromFirstTypeFromOfficeDoc( u"theme" );
if( !aThemeFragmentPath.isEmpty() )
importOoxFragment( new ThemeFragmentHandler( getFilter(), aThemeFragmentPath, getTheme() ) );
xGlobalSegment->setPosition( 0.25 );
// read the styles substream (requires finalized theme buffer)
- OUString aStylesFragmentPath = getFragmentPathFromFirstTypeFromOfficeDoc( "styles" );
+ OUString aStylesFragmentPath = getFragmentPathFromFirstTypeFromOfficeDoc( u"styles" );
if( !aStylesFragmentPath.isEmpty() )
importOoxFragment( new StylesFragment( *this, aStylesFragmentPath ) );
xGlobalSegment->setPosition( 0.5 );
// read the shared string table substream (requires finalized styles buffer)
- OUString aSstFragmentPath = getFragmentPathFromFirstTypeFromOfficeDoc( "sharedStrings" );
+ OUString aSstFragmentPath = getFragmentPathFromFirstTypeFromOfficeDoc( u"sharedStrings" );
if( !aSstFragmentPath.isEmpty() )
if (!importOoxFragment( new SharedStringsFragment( *this, aSstFragmentPath ) ))
importOoxFragment(new SharedStringsFragment(*this, aSstFragmentPath.replaceFirst("sharedStrings","SharedStrings")));
xGlobalSegment->setPosition( 0.75 );
// read the connections substream
- OUString aConnFragmentPath = getFragmentPathFromFirstTypeFromOfficeDoc( "connections" );
+ OUString aConnFragmentPath = getFragmentPathFromFirstTypeFromOfficeDoc( u"connections" );
if( !aConnFragmentPath.isEmpty() )
importOoxFragment( new ConnectionsFragment( *this, aConnFragmentPath ) );
xGlobalSegment->setPosition( 1.0 );
diff --git a/sc/source/filter/oox/worksheetfragment.cxx b/sc/source/filter/oox/worksheetfragment.cxx
index 09f34d702b60..20e802d96224 100644
--- a/sc/source/filter/oox/worksheetfragment.cxx
+++ b/sc/source/filter/oox/worksheetfragment.cxx
@@ -339,12 +339,12 @@ WorksheetFragment::WorksheetFragment( const WorksheetHelper& rHelper, const OUSt
WorksheetFragmentBase( rHelper, rFragmentPath )
{
// import data tables related to this worksheet
- RelationsRef xTableRels = getRelations().getRelationsFromTypeFromOfficeDoc( "table" );
+ RelationsRef xTableRels = getRelations().getRelationsFromTypeFromOfficeDoc( u"table" );
for( const auto& rEntry : *xTableRels )
importOoxFragment( new TableFragment( *this, getFragmentPathFromRelation( rEntry.second ) ) );
// import comments related to this worksheet
- OUString aCommentsFragmentPath = getFragmentPathFromFirstTypeFromOfficeDoc( "comments" );
+ OUString aCommentsFragmentPath = getFragmentPathFromFirstTypeFromOfficeDoc( u"comments" );
if( !aCommentsFragmentPath.isEmpty() )
importOoxFragment( new CommentsFragment( *this, aCommentsFragmentPath ) );
}
@@ -618,12 +618,12 @@ void WorksheetFragment::initializeImport()
initializeWorksheetImport();
// import query table fragments related to this worksheet
- RelationsRef xQueryRels = getRelations().getRelationsFromTypeFromOfficeDoc( "queryTable" );
+ RelationsRef xQueryRels = getRelations().getRelationsFromTypeFromOfficeDoc( u"queryTable" );
for( const auto& rEntry : *xQueryRels )
importOoxFragment( new QueryTableFragment( *this, getFragmentPathFromRelation( rEntry.second ) ) );
// import pivot table fragments related to this worksheet
- RelationsRef xPivotRels = getRelations().getRelationsFromTypeFromOfficeDoc( "pivotTable" );
+ RelationsRef xPivotRels = getRelations().getRelationsFromTypeFromOfficeDoc( u"pivotTable" );
for( const auto& rEntry : *xPivotRels )
importOoxFragment( new PivotTableFragment( *this, getFragmentPathFromRelation( rEntry.second ) ) );
}
diff --git a/sc/source/filter/xml/XMLTableShapeResizer.cxx b/sc/source/filter/xml/XMLTableShapeResizer.cxx
index 3a0f466aa590..d500703041bc 100644
--- a/sc/source/filter/xml/XMLTableShapeResizer.cxx
+++ b/sc/source/filter/xml/XMLTableShapeResizer.cxx
@@ -84,7 +84,7 @@ void ScMyOLEFixer::CreateChartListener(ScDocument& rDoc,
if (pRefTokens->empty())
return;
- OUString sName = !rName.isEmpty() ? rName : pCollection->getUniqueName("OLEFixer ");
+ OUString sName = !rName.isEmpty() ? rName : pCollection->getUniqueName(u"OLEFixer ");
ScChartListener* pCL(new ScChartListener(sName, rDoc, std::move(pRefTokens)));
//for loading binary files e.g.
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 52ce7046b980..14db809907b5 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -19,6 +19,7 @@
#include <memory>
#include <algorithm>
+#include <string_view>
#include <editeng/eeitem.hxx>
@@ -2176,9 +2177,9 @@ void ScPosWnd::SetPos( const OUString& rPosStr )
namespace {
-OUString createLocalRangeName(const OUString& rName, const OUString& rTableName)
+OUString createLocalRangeName(std::u16string_view rName, std::u16string_view rTableName)
{
- return rName + " (" + rTableName + ")";
+ return OUString::Concat(rName) + " (" + rTableName + ")";
}
}
diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx b/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx
index 141458507a94..95d36776a5d7 100644
--- a/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx
@@ -10,6 +10,8 @@
*/
#include <memory>
+#include <string_view>
+
#include <PivotLayoutTreeListData.hxx>
#include <PivotLayoutDialog.hxx>
@@ -49,7 +51,7 @@ OUString lclGetFunctionMaskName(const PivotFunc nFunctionMask)
return OUString();
}
-OUString lclCreateDataItemName(const PivotFunc nFunctionMask, const OUString& rName, const sal_uInt8 nDuplicationCount)
+OUString lclCreateDataItemName(const PivotFunc nFunctionMask, std::u16string_view rName, const sal_uInt8 nDuplicationCount)
{
OUString aBuffer = lclGetFunctionMaskName(nFunctionMask) + " - " + rName;
if(nDuplicationCount > 0)
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 9800f873b8ae..055db3ac7a11 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -2091,7 +2091,7 @@ void ScDocShell::GetState( SfxItemSet &rSet )
if (GetViewBindings())
{
bool bVisible = sfx2::SfxNotebookBar::StateMethod(*GetViewBindings(),
- "modules/scalc/ui/");
+ u"modules/scalc/ui/");
rSet.Put( SfxBoolItem( SID_NOTEBOOKBAR, bVisible ) );
}
}
diff --git a/sc/source/ui/inc/hfedtdlg.hxx b/sc/source/ui/inc/hfedtdlg.hxx
index d1448e8fa836..89afed846746 100644
--- a/sc/source/ui/inc/hfedtdlg.hxx
+++ b/sc/source/ui/inc/hfedtdlg.hxx
@@ -20,6 +20,10 @@
#ifndef INCLUDED_SC_SOURCE_UI_INC_HFEDTDLG_HXX
#define INCLUDED_SC_SOURCE_UI_INC_HFEDTDLG_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include <sfx2/tabdlg.hxx>
#include <editeng/svxenum.hxx>
@@ -28,7 +32,7 @@ class ScHFEditDlg : public SfxTabDialogController
SvxNumType eNumType;
protected:
ScHFEditDlg(weld::Window* pParent,
- const SfxItemSet& rCoreSet, const OUString& rPageStyle,
+ const SfxItemSet& rCoreSet, std::u16string_view rPageStyle,
const OUString& rUIXMLDescription, const OString& rID);
public:
virtual void PageCreated(const OString& rId, SfxTabPage& rPage) override;
@@ -38,70 +42,70 @@ class ScHFEditHeaderDlg : public ScHFEditDlg
{
public:
ScHFEditHeaderDlg(weld::Window* pParent,
- const SfxItemSet& rCoreSet, const OUString& rPageStyle);
+ const SfxItemSet& rCoreSet, std::u16string_view rPageStyle);
};
class ScHFEditFooterDlg : public ScHFEditDlg
{
public:
ScHFEditFooterDlg(weld::Window* pParent,
- const SfxItemSet& rCoreSet, const OUString& rPageStyle);
+ const SfxItemSet& rCoreSet, std::u16string_view rPageStyle);
};
class ScHFEditLeftHeaderDlg : public ScHFEditDlg
{
public:
ScHFEditLeftHeaderDlg(weld::Window* pParent,
- const SfxItemSet& rCoreSet, const OUString& rPageStyle);
+ const SfxItemSet& rCoreSet, std::u16string_view rPageStyle);
};
class ScHFEditRightHeaderDlg : public ScHFEditDlg
{
public:
ScHFEditRightHeaderDlg(weld::Window* pParent,
- const SfxItemSet& rCoreSet, const OUString& rPageStyle);
+ const SfxItemSet& rCoreSet, std::u16string_view rPageStyle);
};
class ScHFEditLeftFooterDlg : public ScHFEditDlg
{
public:
ScHFEditLeftFooterDlg(weld::Window* pParent,
- const SfxItemSet& rCoreSet, const OUString& rPageStyle);
+ const SfxItemSet& rCoreSet, std::u16string_view rPageStyle);
};
class ScHFEditRightFooterDlg : public ScHFEditDlg
{
public:
ScHFEditRightFooterDlg(weld::Window* pParent,
- const SfxItemSet& rCoreSet, const OUString& rPageStyle);
+ const SfxItemSet& rCoreSet, std::u16string_view rPageStyle);
};
class ScHFEditSharedHeaderDlg : public ScHFEditDlg
{
public:
ScHFEditSharedHeaderDlg(weld::Window* pParent,
- const SfxItemSet& rCoreSet, const OUString& rPageStyle);
+ const SfxItemSet& rCoreSet, std::u16string_view rPageStyle);
};
class ScHFEditSharedFooterDlg : public ScHFEditDlg
{
public:
ScHFEditSharedFooterDlg(weld::Window* pParent,
- const SfxItemSet& rCoreSet, const OUString& rPageStyle);
+ const SfxItemSet& rCoreSet, std::u16string_view rPageStyle);
};
class ScHFEditAllDlg : public ScHFEditDlg
{
public:
ScHFEditAllDlg(weld::Window* pParent,
- const SfxItemSet& rCoreSet, const OUString& rPageStyle);
+ const SfxItemSet& rCoreSet, std::u16string_view rPageStyle);
};
class ScHFEditActiveDlg : public ScHFEditDlg
{
public:
ScHFEditActiveDlg(weld::Window* pParent,
- const SfxItemSet& rCoreSet, const OUString& rPageStyle);
+ const SfxItemSet& rCoreSet, std::u16string_view rPageStyle);
};
#endif // INCLUDED_SC_SOURCE_UI_INC_HFEDTDLG_HXX
diff --git a/sc/source/ui/inc/optsolver.hxx b/sc/source/ui/inc/optsolver.hxx
index 60dad2ca0820..e76bbcb465f8 100644
--- a/sc/source/ui/inc/optsolver.hxx
+++ b/sc/source/ui/inc/optsolver.hxx
@@ -25,6 +25,7 @@
#include "docsh.hxx"
#include <com/sun/star/uno/Sequence.hxx>
+#include <string_view>
#include <vector>
namespace com::sun::star {
@@ -239,7 +240,7 @@ class ScSolverSuccessDialog : public weld::GenericDialogController
DECL_LINK(ClickHdl, weld::Button&, void);
public:
- ScSolverSuccessDialog(weld::Window* pParent, const OUString& rSolution);
+ ScSolverSuccessDialog(weld::Window* pParent, std::u16string_view rSolution);
virtual ~ScSolverSuccessDialog() override;
};
diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx
index 8fc81893e26c..c25cdd5c7dce 100644
--- a/sc/source/ui/miscdlgs/optsolver.cxx
+++ b/sc/source/ui/miscdlgs/optsolver.cxx
@@ -78,7 +78,7 @@ ScSolverNoSolutionDialog::~ScSolverNoSolutionDialog()
{
}
-ScSolverSuccessDialog::ScSolverSuccessDialog(weld::Window* pParent, const OUString& rSolution)
+ScSolverSuccessDialog::ScSolverSuccessDialog(weld::Window* pParent, std::u16string_view rSolution)
: GenericDialogController(pParent, "modules/scalc/ui/solversuccessdialog.ui", "SolverSuccessDialog")
, m_xFtResult(m_xBuilder->weld_label("result"))
, m_xBtnOk(m_xBuilder->weld_button("ok"))
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index b42fae2d64e6..0ad984f3a25a 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -772,9 +772,9 @@ void ScContentTree::GetTableNames()
namespace {
-OUString createLocalRangeName(const OUString& rName, const OUString& rTableName)
+OUString createLocalRangeName(std::u16string_view rName, std::u16string_view rTableName)
{
- return rName + " (" + rTableName + ")";
+ return OUString::Concat(rName) + " (" + rTableName + ")";
}
}
diff --git a/sc/source/ui/pagedlg/hfedtdlg.cxx b/sc/source/ui/pagedlg/hfedtdlg.cxx
index 14fd69866149..3bda901ed0fc 100644
--- a/sc/source/ui/pagedlg/hfedtdlg.cxx
+++ b/sc/source/ui/pagedlg/hfedtdlg.cxx
@@ -31,7 +31,7 @@
ScHFEditDlg::ScHFEditDlg(weld::Window* pParent,
const SfxItemSet& rCoreSet,
- const OUString& rPageStyle,
+ std::u16string_view rPageStyle,
const OUString& rUIXMLDescription,
const OString& rID)
: SfxTabDialogController(pParent, rUIXMLDescription, rID, &rCoreSet)
@@ -47,7 +47,7 @@ ScHFEditDlg::ScHFEditDlg(weld::Window* pParent,
ScHFEditHeaderDlg::ScHFEditHeaderDlg(
weld::Window* pParent,
const SfxItemSet& rCoreSet,
- const OUString& rPageStyle)
+ std::u16string_view rPageStyle)
: ScHFEditDlg( pParent, rCoreSet, rPageStyle,
"modules/scalc/ui/headerdialog.ui", "HeaderDialog")
{
@@ -58,7 +58,7 @@ ScHFEditHeaderDlg::ScHFEditHeaderDlg(
ScHFEditFooterDlg::ScHFEditFooterDlg(
weld::Window* pParent,
const SfxItemSet& rCoreSet,
- const OUString& rPageStyle)
+ std::u16string_view rPageStyle)
: ScHFEditDlg( pParent, rCoreSet, rPageStyle,
"modules/scalc/ui/footerdialog.ui", "FooterDialog" )
{
@@ -69,7 +69,7 @@ ScHFEditFooterDlg::ScHFEditFooterDlg(
ScHFEditLeftHeaderDlg::ScHFEditLeftHeaderDlg(
weld::Window* pParent,
const SfxItemSet& rCoreSet,
- const OUString& rPageStyle)
+ std::u16string_view rPageStyle)
: ScHFEditDlg( pParent, rCoreSet, rPageStyle,
"modules/scalc/ui/leftheaderdialog.ui", "LeftHeaderDialog" )
{
@@ -79,7 +79,7 @@ ScHFEditLeftHeaderDlg::ScHFEditLeftHeaderDlg(
ScHFEditRightHeaderDlg::ScHFEditRightHeaderDlg(
weld::Window* pParent,
const SfxItemSet& rCoreSet,
- const OUString& rPageStyle)
+ std::u16string_view rPageStyle)
: ScHFEditDlg( pParent, rCoreSet, rPageStyle,
"modules/scalc/ui/rightheaderdialog.ui", "RightHeaderDialog" )
{
@@ -89,7 +89,7 @@ ScHFEditRightHeaderDlg::ScHFEditRightHeaderDlg(
ScHFEditLeftFooterDlg::ScHFEditLeftFooterDlg(
weld::Window* pParent,
const SfxItemSet& rCoreSet,
- const OUString& rPageStyle)
+ std::u16string_view rPageStyle)
: ScHFEditDlg( pParent, rCoreSet, rPageStyle,
"modules/scalc/ui/leftfooterdialog.ui", "LeftFooterDialog" )
{
@@ -99,7 +99,7 @@ ScHFEditLeftFooterDlg::ScHFEditLeftFooterDlg(
ScHFEditRightFooterDlg::ScHFEditRightFooterDlg(
weld::Window* pParent,
const SfxItemSet& rCoreSet,
- const OUString& rPageStyle)
+ std::u16string_view rPageStyle)
: ScHFEditDlg( pParent, rCoreSet, rPageStyle,
"modules/scalc/ui/rightfooterdialog.ui", "RightFooterDialog" )
{
@@ -109,7 +109,7 @@ ScHFEditRightFooterDlg::ScHFEditRightFooterDlg(
ScHFEditSharedHeaderDlg::ScHFEditSharedHeaderDlg(
weld::Window* pParent,
const SfxItemSet& rCoreSet,
- const OUString& rPageStyle)
+ std::u16string_view rPageStyle)
: ScHFEditDlg( pParent, rCoreSet, rPageStyle,
"modules/scalc/ui/sharedheaderdialog.ui", "SharedHeaderDialog" )
{
@@ -121,7 +121,7 @@ ScHFEditSharedHeaderDlg::ScHFEditSharedHeaderDlg(
ScHFEditSharedFooterDlg::ScHFEditSharedFooterDlg(
weld::Window* pParent,
const SfxItemSet& rCoreSet,
- const OUString& rPageStyle)
+ std::u16string_view rPageStyle)
: ScHFEditDlg( pParent, rCoreSet, rPageStyle,
"modules/scalc/ui/sharedfooterdialog.ui", "SharedFooterDialog" )
{
@@ -133,7 +133,7 @@ ScHFEditSharedFooterDlg::ScHFEditSharedFooterDlg(
ScHFEditAllDlg::ScHFEditAllDlg(
weld::Window* pParent,
const SfxItemSet& rCoreSet,
- const OUString& rPageStyle)
+ std::u16string_view rPageStyle)
: ScHFEditDlg( pParent, rCoreSet, rPageStyle,
"modules/scalc/ui/allheaderfooterdialog.ui", "AllHeaderFooterDialog" )
{
@@ -146,7 +146,7 @@ ScHFEditAllDlg::ScHFEditAllDlg(
ScHFEditActiveDlg::ScHFEditActiveDlg(
weld::Window* pParent,
const SfxItemSet& rCoreSet,
- const OUString& rPageStyle)
+ std::u16string_view rPageStyle)
: ScHFEditDlg( pParent, rCoreSet, rPageStyle,
"modules/scalc/ui/headerfooterdialog.ui", "HeaderFooterDialog" )
{
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 91f9666f1f6c..5ab47983f385 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -3241,7 +3241,7 @@ void SAL_CALL ScCellRangesBase::addChartDataChangeEventListener( const uno::Refe
ScDocument& rDoc = pDocShell->GetDocument();
ScRangeListRef aRangesRef( new ScRangeList(aRanges) );
ScChartListenerCollection* pColl = rDoc.GetChartListenerCollection();
- OUString aName = pColl->getUniqueName("__Uno");
+ OUString aName = pColl->getUniqueName(u"__Uno");
if (aName.isEmpty())
// failed to create unique name.
return;
diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx
index b4c45d5360d4..fedc5af6ba66 100644
--- a/sc/source/ui/unoobj/linkuno.cxx
+++ b/sc/source/ui/unoobj/linkuno.cxx
@@ -40,6 +40,7 @@
#include <scmatrix.hxx>
#include <documentlinkmgr.hxx>
+#include <string_view>
#include <vector>
using namespace com::sun::star;
@@ -1028,10 +1029,10 @@ void ScDDELinkObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
// XNamed
-static OUString lcl_BuildDDEName( const OUString& rAppl, const OUString& rTopic, const OUString& rItem )
+static OUString lcl_BuildDDEName( std::u16string_view rAppl, std::u16string_view rTopic, std::u16string_view rItem )
{
// Appl|Topic!Item (like Excel)
- OUString aRet = rAppl + "|" + rTopic + "!" + rItem;
+ OUString aRet = OUString::Concat(rAppl) + "|" + rTopic + "!" + rItem;
return aRet;
}
diff --git a/sc/source/ui/vba/vbachartobjects.cxx b/sc/source/ui/vba/vbachartobjects.cxx
index 4f38a59a3e69..74c6ce0e1678 100644
--- a/sc/source/ui/vba/vbachartobjects.cxx
+++ b/sc/source/ui/vba/vbachartobjects.cxx
@@ -27,6 +27,8 @@
#include "vbachartobject.hxx"
#include <docsh.hxx>
#include <cellsuno.hxx>
+
+#include <string_view>
#include <vector>
#include <basic/sberrors.hxx>
#include <comphelper/sequence.hxx>
@@ -140,7 +142,7 @@ ScVbaChartObjects::Add( double _nX, double _nY, double _nWidth, double _nHeight
aRectangle.Width = Millimeter::getInHundredthsOfOneMillimeter(_nWidth);
aRectangle.Height = Millimeter::getInHundredthsOfOneMillimeter(_nHeight);
// Note the space at the end of the stem ("Chart "). In ChartSheets only "Chart" is the stem
- OUString sPersistChartName = ContainerUtilities::getUniqueName( getChartObjectNames(), "Chart " , OUString(), 1);
+ OUString sPersistChartName = ContainerUtilities::getUniqueName( getChartObjectNames(), "Chart " , std::u16string_view(), 1);
xTableCharts->addNewByName(sPersistChartName, aRectangle, aCellRangeAddress, true, false );
uno::Reference< excel::XChartObject > xChartObject( getItemByStringIndex( sPersistChartName ), uno::UNO_QUERY_THROW );
xChartObject->getChart()->setChartType(excel::XlChartType::xlColumnClustered);
diff --git a/sc/source/ui/vba/vbaformatconditions.cxx b/sc/source/ui/vba/vbaformatconditions.cxx
index a4970f58aac7..e5d98656ad7a 100644
--- a/sc/source/ui/vba/vbaformatconditions.cxx
+++ b/sc/source/ui/vba/vbaformatconditions.cxx
@@ -238,7 +238,7 @@ ScVbaFormatConditions::getStyleName()
if ( !pStyles )
DebugHelper::basicexception(ERRCODE_BASIC_METHOD_FAILED, {} );
uno::Sequence< OUString > sCellStyleNames = pStyles->getStyleNames();
- return ContainerUtilities::getUniqueName(sCellStyleNames, "Excel_CondFormat", "_");
+ return ContainerUtilities::getUniqueName(sCellStyleNames, "Excel_CondFormat", u"_");
}
void
diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx
index f856ff0087bd..8fb72057298e 100644
--- a/sc/source/ui/vba/vbaworksheet.cxx
+++ b/sc/source/ui/vba/vbaworksheet.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include "vbaworksheet.hxx"
#include "vbanames.hxx"
@@ -80,17 +84,17 @@
using namespace com::sun::star;
using namespace ooo::vba;
-static void getNewSpreadsheetName (OUString &aNewName, const OUString& aOldName, const uno::Reference <sheet::XSpreadsheetDocument>& xSpreadDoc )
+static void getNewSpreadsheetName (OUString &aNewName, std::u16string_view aOldName, const uno::Reference <sheet::XSpreadsheetDocument>& xSpreadDoc )
{
if (!xSpreadDoc.is())
throw lang::IllegalArgumentException( "getNewSpreadsheetName() xSpreadDoc is null", uno::Reference< uno::XInterface >(), 1 );
static const char aUnderScore[] = "_";
int currentNum =2;
- aNewName = aOldName + aUnderScore + OUString::number(currentNum) ;
+ aNewName = OUString::Concat(aOldName) + aUnderScore + OUString::number(currentNum) ;
SCTAB nTab = 0;
while ( ScVbaWorksheets::nameExists(xSpreadDoc,aNewName, nTab ) )
{
- aNewName = aOldName + aUnderScore + OUString::number(++currentNum);
+ aNewName = OUString::Concat(aOldName) + aUnderScore + OUString::number(++currentNum);
}
}
diff --git a/sc/source/ui/view/colrowba.cxx b/sc/source/ui/view/colrowba.cxx
index f8d711edc3d8..4851d861e888 100644
--- a/sc/source/ui/view/colrowba.cxx
+++ b/sc/source/ui/view/colrowba.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <unotools/localedatawrapper.hxx>
#include <vcl/fieldvalues.hxx>
@@ -31,7 +35,7 @@
#include <tabview.hxx>
#include <columnspanset.hxx>
-static OUString lcl_MetricString( tools::Long nTwips, const OUString& rText )
+static OUString lcl_MetricString( tools::Long nTwips, std::u16string_view rText )
{
if ( nTwips <= 0 )
return ScResId(STR_TIP_HIDE);
@@ -41,7 +45,7 @@ static OUString lcl_MetricString( tools::Long nTwips, const OUString& rText )
sal_Int64 nUserVal = vcl::ConvertValue( nTwips*100, 1, 2, FieldUnit::TWIP, eUserMet );
- OUString aStr = rText + " "
+ OUString aStr = OUString::Concat(rText) + " "
+ ScGlobal::getLocaleDataPtr()->getNum( nUserVal, 2 )
+ " " + SdrFormatter::GetUnitStr(eUserMet);
return aStr;
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index f237722439fb..8bb263b71530 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -64,6 +64,7 @@
#include <comphelper/lok.hxx>
#include <memory>
+#include <string_view>
#include <unordered_set>
#include <unordered_map>
#include <vector>
@@ -609,7 +610,7 @@ void ScDBFunc::Consolidate( const ScConsolidateParam& rParam )
// pivot
-static OUString lcl_MakePivotTabName( const OUString& rPrefix, SCTAB nNumber )
+static OUString lcl_MakePivotTabName( std::u16string_view rPrefix, SCTAB nNumber )
{
OUString aName = rPrefix + OUString::number( nNumber );
return aName;
diff --git a/sccomp/qa/unit/SwarmSolverTest.cxx b/sccomp/qa/unit/SwarmSolverTest.cxx
index 7b424cabbd56..b7d3becc475c 100644
--- a/sccomp/qa/unit/SwarmSolverTest.cxx
+++ b/sccomp/qa/unit/SwarmSolverTest.cxx
@@ -57,7 +57,7 @@ void SwarmSolverTest::testUnconstrained()
CPPUNIT_ASSERT(!mxComponent.is());
OUString aFileURL;
- createFileURL("Simple.ods", aFileURL);
+ createFileURL(u"Simple.ods", aFileURL);
mxComponent = loadFromDesktop(aFileURL);
CPPUNIT_ASSERT_MESSAGE("Component not loaded", mxComponent.is());
@@ -107,7 +107,7 @@ void SwarmSolverTest::testVariableBounded()
CPPUNIT_ASSERT(!mxComponent.is());
OUString aFileURL;
- createFileURL("Simple.ods", aFileURL);
+ createFileURL(u"Simple.ods", aFileURL);
mxComponent = loadFromDesktop(aFileURL);
CPPUNIT_ASSERT_MESSAGE("Component not loaded", mxComponent.is());
@@ -159,7 +159,7 @@ void SwarmSolverTest::testVariableConstrained()
CPPUNIT_ASSERT(!mxComponent.is());
OUString aFileURL;
- createFileURL("Simple.ods", aFileURL);
+ createFileURL(u"Simple.ods", aFileURL);
mxComponent = loadFromDesktop(aFileURL);
CPPUNIT_ASSERT_MESSAGE("Component not loaded", mxComponent.is());
@@ -215,7 +215,7 @@ void SwarmSolverTest::testTwoVariables()
CPPUNIT_ASSERT(!mxComponent.is());
OUString aFileURL;
- createFileURL("TwoVariables.ods", aFileURL);
+ createFileURL(u"TwoVariables.ods", aFileURL);
mxComponent = loadFromDesktop(aFileURL);
CPPUNIT_ASSERT_MESSAGE("Component not loaded", mxComponent.is());
@@ -278,7 +278,7 @@ void SwarmSolverTest::testMultipleVariables()
CPPUNIT_ASSERT(!mxComponent.is());
OUString aFileURL;
- createFileURL("MultiVariable.ods", aFileURL);
+ createFileURL(u"MultiVariable.ods", aFileURL);
mxComponent = loadFromDesktop(aFileURL);
CPPUNIT_ASSERT_MESSAGE("Component not loaded", mxComponent.is());
diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx
index e18a1492ea4b..ba88b47b6005 100644
--- a/sd/inc/drawdoc.hxx
+++ b/sd/inc/drawdoc.hxx
@@ -28,6 +28,7 @@
#include <vector>
#include <memory>
+#include <string_view>
#include "sddllapi.h"
#include "pres.hxx"
@@ -267,7 +268,7 @@ public:
SAL_DLLPRIVATE virtual SdrPage* RemoveMasterPage(sal_uInt16 nPgNum) override;
SAL_DLLPRIVATE void RemoveUnnecessaryMasterPages( SdPage* pMaster=nullptr, bool bOnlyDuplicatePages=false, bool bUndo=true );
- void SetMasterPage(sal_uInt16 nSdPageNum, const OUString& rLayoutName,
+ void SetMasterPage(sal_uInt16 nSdPageNum, std::u16string_view rLayoutName,
SdDrawDocument* pSourceDoc, bool bMaster, bool bCheckMasters);
SdDrawDocument* OpenBookmarkDoc(const OUString& rBookmarkFile);
@@ -594,7 +595,8 @@ public:
*/
SdStyleSheetPool* GetSdStyleSheetPool() const;
- SAL_DLLPRIVATE void UpdatePageRelativeURLs(const OUString& rOldName, const OUString& rNewName);
+ SAL_DLLPRIVATE void UpdatePageRelativeURLs(
+ const OUString& rOldName, std::u16string_view rNewName);
SAL_DLLPRIVATE static void SetCalcFieldValueHdl( ::Outliner* pOutliner);
diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx
index a70fbf61be8a..56398c331cfd 100644
--- a/sd/inc/sdpage.hxx
+++ b/sd/inc/sdpage.hxx
@@ -25,6 +25,7 @@
#include <com/sun/star/office/XAnnotation.hpp>
#include <memory>
+#include <string_view>
#include <vector>
#include <editeng/flditem.hxx>
#include <svx/svdobj.hxx>
@@ -268,7 +269,7 @@ public:
const OUString& GetName() const;
OUString const & GetRealName() const { return FmFormPage::GetName(); };
- void SetPresentationLayout(const OUString& rLayoutName,
+ void SetPresentationLayout(std::u16string_view rLayoutName,
bool bReplaceStyleSheets = true,
bool bSetMasterPage = true,
bool bReverseOrder = false);
diff --git a/sd/inc/stlpool.hxx b/sd/inc/stlpool.hxx
index 3f60309813a2..6512ff74d9cc 100644
--- a/sd/inc/stlpool.hxx
+++ b/sd/inc/stlpool.hxx
@@ -27,6 +27,7 @@
#include <cppuhelper/implbase.hxx>
#include <vcl/font.hxx>
#include <map>
+#include <string_view>
#include <vector>
#include "stlfamily.hxx"
@@ -55,10 +56,10 @@ public:
void SetActualStyleSheet(SfxStyleSheetBase* pActStyleSheet) { mpActualStyleSheet = pActStyleSheet; }
SfxStyleSheetBase* GetActualStyleSheet() { return mpActualStyleSheet; }
- SfxStyleSheetBase* GetTitleSheet(const OUString& rLayoutName);
+ SfxStyleSheetBase* GetTitleSheet(std::u16string_view rLayoutName);
// Caller has to delete the list
- void CreateOutlineSheetList(const OUString& rLayoutName, std::vector<SfxStyleSheetBase*> &rOutlineStyles);
+ void CreateOutlineSheetList(std::u16string_view rLayoutName, std::vector<SfxStyleSheetBase*> &rOutlineStyles);
/** creates all layout style sheets for the given layout name if they
don't exist yet.
@@ -68,15 +69,15 @@ public:
had to be created. This is used to assert errors in documents
when styles are missing.
*/
- SD_DLLPUBLIC void CreateLayoutStyleSheets(const OUString& rLayoutName, bool bCheck = false );
- static void CreateLayoutSheetNames(const OUString& rLayoutName, std::vector<OUString> &aNameList);
- void CreateLayoutSheetList(const OUString& rLayoutName, SdStyleSheetVector& rLayoutSheets);
- void CopyLayoutSheets(const OUString& rLayoutName, SdStyleSheetPool& rSourcePool, StyleSheetCopyResultVector& rCreatedSheets);
+ SD_DLLPUBLIC void CreateLayoutStyleSheets(std::u16string_view rLayoutName, bool bCheck = false );
+ static void CreateLayoutSheetNames(std::u16string_view rLayoutName, std::vector<OUString> &aNameList);
+ void CreateLayoutSheetList(std::u16string_view rLayoutName, SdStyleSheetVector& rLayoutSheets);
+ void CopyLayoutSheets(std::u16string_view rLayoutName, SdStyleSheetPool& rSourcePool, StyleSheetCopyResultVector& rCreatedSheets);
void CopyGraphicSheets(SdStyleSheetPool& rSourcePool);
void CopyCellSheets(SdStyleSheetPool& rSourcePool);
void CopyTableStyles(SdStyleSheetPool const & rSourcePool);
void CopyCellSheets(SdStyleSheetPool& rSourcePool, StyleSheetCopyResultVector& rCreatedSheets);
- void RenameAndCopyGraphicSheets(SdStyleSheetPool& rSourcePool, StyleSheetCopyResultVector& rCreatedSheets, OUString const &rRenameSuffix);
+ void RenameAndCopyGraphicSheets(SdStyleSheetPool& rSourcePool, StyleSheetCopyResultVector& rCreatedSheets, std::u16string_view rRenameSuffix);
void CreatePseudosIfNecessary();
void UpdateStdNames();
@@ -119,7 +120,7 @@ public:
private:
void CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily eFamily );
void CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily eFamily, StyleSheetCopyResultVector& rCreatedSheets );
- void CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily eFamily, StyleSheetCopyResultVector& rCreatedSheets, const OUString &rRenameSuffix );
+ void CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily eFamily, StyleSheetCopyResultVector& rCreatedSheets, std::u16string_view rRenameSuffix );
virtual SfxStyleSheetBase* Create(const OUString& rName, SfxStyleFamily eFamily, SfxStyleSearchBits nMask) override;
diff --git a/sd/qa/unit/HtmlExportTest.cxx b/sd/qa/unit/HtmlExportTest.cxx
index 551433c13843..dc7a2d73b381 100644
--- a/sd/qa/unit/HtmlExportTest.cxx
+++ b/sd/qa/unit/HtmlExportTest.cxx
@@ -31,7 +31,7 @@ public:
void testHTMLExport()
{
sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("/sd/qa/unit/data/HtmlExportTestDocument.odp"), ODP);
+ m_directories.getURLFromSrc(u"/sd/qa/unit/data/HtmlExportTestDocument.odp"), ODP);
htmlDocUniquePtr htmlDoc = exportAndParseHtml(xDocShRef);
assertXPath(htmlDoc, "/html", 1);
diff --git a/sd/qa/unit/SVGExportTests.cxx b/sd/qa/unit/SVGExportTests.cxx
index 35adb1ea0684..5e0d7757ae4c 100644
--- a/sd/qa/unit/SVGExportTests.cxx
+++ b/sd/qa/unit/SVGExportTests.cxx
@@ -7,6 +7,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <test/bootstrapfixture.hxx>
#include <sal/macros.h>
@@ -35,7 +39,7 @@ protected:
xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("svg"), BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"));
}
- void load(const OUString& pDir, const char* pName)
+ void load(std::u16string_view pDir, const char* pName)
{
return loadURL(m_directories.getURLFromSrc(pDir) + OUString::createFromAscii(pName), pName);
}
@@ -82,7 +86,7 @@ public:
void executeExport(const char* pName)
{
- load( "/sd/qa/unit/data/odp/", pName );
+ load( u"/sd/qa/unit/data/odp/", pName );
save();
}
diff --git a/sd/qa/unit/SdrPdfImportTest.cxx b/sd/qa/unit/SdrPdfImportTest.cxx
index f5e24fd19ede..afbb02594e21 100644
--- a/sd/qa/unit/SdrPdfImportTest.cxx
+++ b/sd/qa/unit/SdrPdfImportTest.cxx
@@ -84,7 +84,7 @@ CPPUNIT_TEST_FIXTURE(SdrPdfImportTest, testImportSimpleText)
unsetenv("LO_IMPORT_USE_PDFIUM");
});
- mxComponent = loadFromDesktop(m_directories.getURLFromSrc("sd/qa/unit/data/SimplePDF.pdf"));
+ mxComponent = loadFromDesktop(m_directories.getURLFromSrc(u"sd/qa/unit/data/SimplePDF.pdf"));
auto pImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
sd::ViewShell* pViewShell = pImpressDocument->GetDocShell()->GetViewShell();
CPPUNIT_ASSERT(pViewShell);
@@ -170,7 +170,7 @@ CPPUNIT_TEST_FIXTURE(SdrPdfImportTest, testAnnotationsImportExport)
auto pPdfiumLibrary = vcl::pdf::PDFiumLibrary::get();
mxComponent
- = loadFromDesktop(m_directories.getURLFromSrc("sd/qa/unit/data/PdfWithAnnotation.pdf"));
+ = loadFromDesktop(m_directories.getURLFromSrc(u"sd/qa/unit/data/PdfWithAnnotation.pdf"));
auto pImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
sd::ViewShell* pViewShell = pImpressDocument->GetDocShell()->GetViewShell();
CPPUNIT_ASSERT(pViewShell);
diff --git a/sd/qa/unit/activex-controls-tests.cxx b/sd/qa/unit/activex-controls-tests.cxx
index 4903d25b04e2..8d595a8b1451 100644
--- a/sd/qa/unit/activex-controls-tests.cxx
+++ b/sd/qa/unit/activex-controls-tests.cxx
@@ -63,7 +63,7 @@ public:
void SdActiveXControlsTest::testBackgroundColor()
{
// Check whether all system colors are imported correctly
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/control_background_color.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/control_background_color.pptx"), PPTX);
const std::vector<sal_Int32> vBackgroundColors =
{
@@ -111,7 +111,7 @@ void SdActiveXControlsTest::testBackgroundColor()
void SdActiveXControlsTest::testLabelProperties()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/activex_label.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/activex_label.pptx"), PPTX);
// First control has default properties
uno::Reference< drawing::XControlShape > xControlShape(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY_THROW);
@@ -191,7 +191,7 @@ void SdActiveXControlsTest::testLabelProperties()
void SdActiveXControlsTest::testTextBoxProperties()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/activex_textbox.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/activex_textbox.pptx"), PPTX);
// First control has default properties
uno::Reference< drawing::XControlShape > xControlShape(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY_THROW);
@@ -328,7 +328,7 @@ void SdActiveXControlsTest::testTextBoxProperties()
void SdActiveXControlsTest::testSpinButtonProperties()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/activex_spinbutton.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/activex_spinbutton.pptx"), PPTX);
// First control has default properties
uno::Reference< drawing::XControlShape > xControlShape(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY_THROW);
@@ -420,7 +420,7 @@ void SdActiveXControlsTest::testSpinButtonProperties()
void SdActiveXControlsTest::testCommandButtonProperties()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/activex_commandbutton.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/activex_commandbutton.pptx"), PPTX);
// First control has default properties
uno::Reference< drawing::XControlShape > xControlShape(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY_THROW);
@@ -491,7 +491,7 @@ void SdActiveXControlsTest::testCommandButtonProperties()
void SdActiveXControlsTest::testScrollBarProperties()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/activex_scrollbar.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/activex_scrollbar.pptx"), PPTX);
// First control has default properties
uno::Reference< drawing::XControlShape > xControlShape(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY_THROW);
@@ -599,7 +599,7 @@ void SdActiveXControlsTest::testScrollBarProperties()
void SdActiveXControlsTest::testCheckBoxProperties()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/activex_checkbox.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/activex_checkbox.pptx"), PPTX);
// First control has default properties
uno::Reference< drawing::XControlShape > xControlShape(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY_THROW);
@@ -692,7 +692,7 @@ void SdActiveXControlsTest::testCheckBoxProperties()
void SdActiveXControlsTest::testOptionButtonProperties()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/activex_optionbutton.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/activex_optionbutton.pptx"), PPTX);
// First control has default properties
uno::Reference< drawing::XControlShape > xControlShape(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY_THROW);
@@ -775,7 +775,7 @@ void SdActiveXControlsTest::testOptionButtonProperties()
void SdActiveXControlsTest::testComboBoxProperties()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/activex_combobox.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/activex_combobox.pptx"), PPTX);
// First control has default properties
uno::Reference< drawing::XControlShape > xControlShape(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY_THROW);
@@ -889,7 +889,7 @@ void SdActiveXControlsTest::testComboBoxProperties()
void SdActiveXControlsTest::testListBoxProperties()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/activex_listbox.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/activex_listbox.pptx"), PPTX);
// First control has default properties
uno::Reference< drawing::XControlShape > xControlShape(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY_THROW);
@@ -977,7 +977,7 @@ void SdActiveXControlsTest::testListBoxProperties()
void SdActiveXControlsTest::testToggleButtonProperties()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/activex_togglebutton.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/activex_togglebutton.pptx"), PPTX);
// First control has default properties
uno::Reference< drawing::XControlShape > xControlShape(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY_THROW);
@@ -1061,7 +1061,7 @@ void SdActiveXControlsTest::testToggleButtonProperties()
void SdActiveXControlsTest::testPictureProperties()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/activex_picture.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/activex_picture.pptx"), PPTX);
// Different controls has different image positioning
@@ -1131,7 +1131,7 @@ void SdActiveXControlsTest::testPictureProperties()
void SdActiveXControlsTest::testFontProperties()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/activex_fontproperties.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/activex_fontproperties.pptx"), PPTX);
// Different controls has different font properties
diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx
index 27f2c65c78d5..f796823fc426 100644
--- a/sd/qa/unit/dialogs-test.cxx
+++ b/sd/qa/unit/dialogs-test.cxx
@@ -591,7 +591,7 @@ void SdDialogsTest::openAnyDialog()
/// to dump
if (true)
{
- processDialogBatchFile("sd/qa/unit/data/dialogs-test.txt");
+ processDialogBatchFile(u"sd/qa/unit/data/dialogs-test.txt");
}
/// example how to dump all known dialogs
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx
index ca100c003967..ba04f02911be 100644
--- a/sd/qa/unit/export-tests-ooxml1.cxx
+++ b/sd/qa/unit/export-tests-ooxml1.cxx
@@ -209,7 +209,7 @@ void checkFontAttributes( const SdrTextObj* pObj, ItemValue nVal)
void SdOOXMLExportTest1::testTdf127237()
{
- sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf127237.pptx"), PPTX );
+ sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf127237.pptx"), PPTX );
xDocShRef = saveAndReload(xDocShRef.get(), ODP);
const SdrPage* pPage = GetPage(1, xDocShRef);
@@ -229,7 +229,7 @@ void SdOOXMLExportTest1::testTdf127237()
void SdOOXMLExportTest1::testBnc887230()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/bnc887230.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/bnc887230.pptx"), PPTX);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
const SdrPage *pPage = GetPage( 1, xDocShRef );
@@ -245,7 +245,7 @@ void SdOOXMLExportTest1::testBnc887230()
void SdOOXMLExportTest1::testBnc870233_1()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/bnc870233_1.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/bnc870233_1.pptx"), PPTX);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
const SdrPage *pPage = GetPage( 1, xDocShRef );
@@ -271,7 +271,7 @@ void SdOOXMLExportTest1::testBnc870233_1()
void SdOOXMLExportTest1::testBnc870233_2()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/bnc870233_2.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/bnc870233_2.pptx"), PPTX);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
const SdrPage *pPage = GetPage( 1, xDocShRef );
@@ -308,7 +308,7 @@ void SdOOXMLExportTest1::testBnc870233_2()
void SdOOXMLExportTest1::testN828390_4()
{
bool bPassed = false;
- ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/n828390_4.odp"), ODP );
+ ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/n828390_4.odp"), ODP );
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
@@ -343,7 +343,7 @@ void SdOOXMLExportTest1::testN828390_4()
void SdOOXMLExportTest1::testN828390_5()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/n828390_5.odp"), ODP );
+ ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/n828390_5.odp"), ODP );
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
@@ -362,7 +362,7 @@ void SdOOXMLExportTest1::testN828390_5()
void SdOOXMLExportTest1::testFdo71961()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/fdo71961.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/fdo71961.odp"), ODP);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
const SdrPage *pPage = GetPage( 1, xDocShRef );
@@ -390,7 +390,7 @@ void SdOOXMLExportTest1::testFdo71961()
void SdOOXMLExportTest1::testN828390()
{
bool bPassed = false;
- ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/n828390.pptx"), PPTX );
+ ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/n828390.pptx"), PPTX );
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
@@ -416,7 +416,7 @@ void SdOOXMLExportTest1::testN828390()
void SdOOXMLExportTest1::testBnc880763()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/bnc880763.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/bnc880763.pptx"), PPTX);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
const SdrPage *pPage = GetPage( 1, xDocShRef );
@@ -439,7 +439,7 @@ void SdOOXMLExportTest1::testBnc880763()
void SdOOXMLExportTest1::testBnc862510_5()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/bnc862510_5.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/bnc862510_5.pptx"), PPTX);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
const SdrPage *pPage = GetPage( 1, xDocShRef );
@@ -462,7 +462,7 @@ void SdOOXMLExportTest1::testBnc862510_5()
// not written into the file.
void SdOOXMLExportTest1::testBnc822347_EmptyBullet()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/bnc822347_EmptyBullet.odp"), ODP);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/bnc822347_EmptyBullet.odp"), ODP);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX);
SdDrawDocument* pDoc = xDocShRef->GetDoc();
@@ -491,7 +491,7 @@ void SdOOXMLExportTest1::testBnc822347_EmptyBullet()
//Bullets not having any text following them are not getting exported to pptx correctly.
void SdOOXMLExportTest1::testFdo90607()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/fdo90607.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/fdo90607.pptx"), PPTX);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
const SdrPage *pPage = GetPage( 1, xDocShRef );
@@ -505,7 +505,7 @@ void SdOOXMLExportTest1::testFdo90607()
void SdOOXMLExportTest1::testFdo83751()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/fdo83751.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/fdo83751.pptx"), PPTX);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
SdDrawDocument *pDoc = xDocShRef->GetDoc();
@@ -522,7 +522,7 @@ void SdOOXMLExportTest1::testFdo83751()
void SdOOXMLExportTest1::testFdo79731()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/fdo79731.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/fdo79731.odp"), ODP);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
SdDrawDocument *pDoc = xDocShRef->GetDoc();
CPPUNIT_ASSERT(pDoc);
@@ -536,7 +536,7 @@ void SdOOXMLExportTest1::testTableCellFillProperties()
batch->commit();
// Load the original file
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/Table_with_Cell_Fill.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/Table_with_Cell_Fill.odp"), ODP);
// Export the document and import again for a check
uno::Reference< lang::XComponent > xComponent = xDocShRef->GetModel();
@@ -580,7 +580,7 @@ void SdOOXMLExportTest1::testTableCellFillProperties()
void SdOOXMLExportTest1::testBulletStartNumber()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/n90255.pptx"), PPTX );
+ ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/n90255.pptx"), PPTX );
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
const SdrPage *pPage = GetPage( 1, xDocShRef );
@@ -595,7 +595,7 @@ void SdOOXMLExportTest1::testBulletStartNumber()
void SdOOXMLExportTest1::testLineStyle()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/lineStyle.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/lineStyle.pptx"), PPTX);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
const SdrPage *pPage = GetPage( 1, xDocShRef );
@@ -611,7 +611,7 @@ void SdOOXMLExportTest1::testLineStyle()
void SdOOXMLExportTest1::testRightToLeftParaghraph()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/rightToLeftParagraph.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/rightToLeftParagraph.pptx"), PPTX);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 0, 0, xDocShRef ) );
@@ -629,7 +629,7 @@ void SdOOXMLExportTest1::testRightToLeftParaghraph()
void SdOOXMLExportTest1::testTextboxWithHyperlink()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/hyperlinktest.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/hyperlinktest.pptx"), PPTX);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 0, 0, xDocShRef ) );
@@ -655,7 +655,7 @@ void SdOOXMLExportTest1::testTextboxWithHyperlink()
void SdOOXMLExportTest1::testTdf136911()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/ppt/tdf136911.ppt"), PPT);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/ppt/tdf136911.ppt"), PPT);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 0, 0, xDocShRef ) );
@@ -681,7 +681,7 @@ void SdOOXMLExportTest1::testTdf136911()
void SdOOXMLExportTest1::testBulletColor()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/bulletColor.pptx"), PPTX );
+ ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/bulletColor.pptx"), PPTX );
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
@@ -700,7 +700,7 @@ void SdOOXMLExportTest1::testBulletColor()
void SdOOXMLExportTest1::testBulletCharAndFont()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/odp/bulletCharAndFont.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/bulletCharAndFont.odp"), ODP);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 0, 0, xDocShRef ) );
@@ -727,7 +727,7 @@ void SdOOXMLExportTest1::testBulletCharAndFont()
void SdOOXMLExportTest1::testBulletMarginAndIndentation()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/bulletMarginAndIndent.pptx"), PPTX );
+ ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/bulletMarginAndIndent.pptx"), PPTX );
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
const SdrPage *pPage = GetPage( 1, xDocShRef );
@@ -747,7 +747,7 @@ void SdOOXMLExportTest1::testBulletMarginAndIndentation()
void SdOOXMLExportTest1::testParaMarginAndindentation()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/paraMarginAndIndentation.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/paraMarginAndIndentation.pptx"), PPTX);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 0, 0, xDocShRef ) );
@@ -769,7 +769,7 @@ void SdOOXMLExportTest1::testParaMarginAndindentation()
void SdOOXMLExportTest1::testCellLeftAndRightMargin()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/n90223.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/n90223.pptx"), PPTX);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
sal_Int32 nLeftMargin, nRightMargin;
@@ -800,7 +800,7 @@ void SdOOXMLExportTest1::testCellLeftAndRightMargin()
void SdOOXMLExportTest1::testMergedCells()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/cellspan.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/cellspan.odp"), ODP);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
const SdrPage *pPage = GetPage( 1, xDocShRef );
@@ -817,7 +817,7 @@ void SdOOXMLExportTest1::testMergedCells()
void SdOOXMLExportTest1::testTableCellBorder()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/n90190.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/n90190.pptx"), PPTX);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
const SdrPage *pPage = GetPage( 1, xDocShRef );
@@ -863,7 +863,7 @@ void SdOOXMLExportTest1::testTableCellBorder()
void SdOOXMLExportTest1::testTdf111884()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf111884.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf111884.pptx"), PPTX);
xDocShRef = saveAndReload(xDocShRef.get(), PPTX);
const SdrPage *pPage = GetPage(1, xDocShRef);
@@ -879,7 +879,7 @@ void SdOOXMLExportTest1::testTdf111884()
void SdOOXMLExportTest1::testTdf112633()
{
// Load document and export it to a temporary file
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf112633.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf112633.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -906,7 +906,7 @@ void SdOOXMLExportTest1::testTdf112633()
void SdOOXMLExportTest1::testTdf128952()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf128952.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf128952.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -921,7 +921,7 @@ void SdOOXMLExportTest1::testTdf128952()
void SdOOXMLExportTest1::testTdf127090()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf127090.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf127090.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -934,7 +934,7 @@ void SdOOXMLExportTest1::testTdf127090()
void SdOOXMLExportTest1::testCustomXml()
{
// Load document and export it to a temporary file
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/customxml.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/customxml.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -956,7 +956,7 @@ void SdOOXMLExportTest1::testTdf94238()
{
// Load document and export it to a temporary file.
::sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf94238.pptx"), PPTX);
+ = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf94238.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
uno::Reference<drawing::XDrawPagesSupplier> xDoc(xDocShRef->GetDoc()->getUnoModel(),
@@ -994,7 +994,7 @@ void SdOOXMLExportTest1::testPictureTransparency()
{
// Load document and export it to a temporary file.
::sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/image_transparency.odp"), ODP);
+ = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/image_transparency.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
uno::Reference<drawing::XDrawPagesSupplier> xDoc(xDocShRef->GetDoc()->getUnoModel(),
@@ -1017,7 +1017,7 @@ void SdOOXMLExportTest1::testPictureTransparency()
void SdOOXMLExportTest1::testTdf125554()
{
::sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf125554.pptx"), PPTX);
+ = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf125554.pptx"), PPTX);
xDocShRef = saveAndReload(xDocShRef.get(), PPTX);
uno::Reference<beans::XPropertySet> xShape = getShapeFromPage(0, 0, xDocShRef);
@@ -1035,7 +1035,7 @@ void SdOOXMLExportTest1::testRoundtripOwnLineStyles()
{
// Load odp document and read the LineDash values.
::sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/LineStylesOwn.odp"), ODP);
+ = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/LineStylesOwn.odp"), ODP);
uno::Reference<drawing::XDrawPagesSupplier> xDocodp(xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY);
CPPUNIT_ASSERT(xDocodp.is());
uno::Reference<drawing::XDrawPage> xPageodp(xDocodp->getDrawPages()->getByIndex(0), uno::UNO_QUERY);
@@ -1077,7 +1077,7 @@ void SdOOXMLExportTest1::testRoundtripPrstDash()
{
// load and save document, compare prstDash values in saved document with original.
::sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/presetDashDot.pptx"), PPTX);
+ = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/presetDashDot.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -1127,7 +1127,7 @@ void SdOOXMLExportTest1::testDashOnHairline()
{
// load and save document, make sure the custDash has 11 child elements.
::sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/tdf127267DashOnHairline.odp"), ODP);
+ = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/tdf127267DashOnHairline.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -1139,7 +1139,7 @@ void SdOOXMLExportTest1::testDashOnHairline()
void SdOOXMLExportTest1::testCustomshapeBitmapfillSrcrect()
{
::sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("sd/qa/unit/data/pptx/customshape-bitmapfill-srcrect.pptx"),
+ m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/customshape-bitmapfill-srcrect.pptx"),
PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -1162,7 +1162,7 @@ void SdOOXMLExportTest1::testCustomshapeBitmapfillSrcrect()
void SdOOXMLExportTest1::testTdf100348FontworkBitmapFill()
{
::sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/tdf100348_FontworkBitmapFill.odp"), ODP);
+ = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/tdf100348_FontworkBitmapFill.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -1178,7 +1178,7 @@ void SdOOXMLExportTest1::testTdf100348FontworkBitmapFill()
void SdOOXMLExportTest1::testTdf100348FontworkGradientGlow()
{
::sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/tdf100348_FontworkGradientGlow.odp"), ODP);
+ = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/tdf100348_FontworkGradientGlow.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -1195,7 +1195,7 @@ void SdOOXMLExportTest1::testTdf100348FontworkGradientGlow()
void SdOOXMLExportTest1::testTdf128345FullTransparentGradient()
{
::sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/tdf128345_FullTransparentGradient.odp"), ODP);
+ = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/tdf128345_FullTransparentGradient.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -1208,7 +1208,7 @@ void SdOOXMLExportTest1::testTdf128345FullTransparentGradient()
void SdOOXMLExportTest1::testTdf128345GradientLinear()
{
::sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/tdf128345_GradientLinear.odp"), ODP);
+ = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/tdf128345_GradientLinear.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -1229,7 +1229,7 @@ void SdOOXMLExportTest1::testTdf128345GradientLinear()
void SdOOXMLExportTest1::testTdf128345GradientRadial()
{
::sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/tdf128345_GradientRadial.odp"), ODP);
+ = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/tdf128345_GradientRadial.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -1250,7 +1250,7 @@ void SdOOXMLExportTest1::testTdf128345GradientAxial()
// Without the patch, symmetric linear gradient with full transparence outside and
// full opak in the middle were imported as full transparent.
::sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/tdf128345_GradientAxial.odp"), ODP);
+ = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/tdf128345_GradientAxial.odp"), ODP);
xDocShRef = saveAndReload(xDocShRef.get(), PPTX);
uno::Reference<beans::XPropertySet> xShapePropSet(getShapeFromPage(0, 0, xDocShRef));
@@ -1266,7 +1266,7 @@ void SdOOXMLExportTest1::testTdf128345GradientAxial()
void SdOOXMLExportTest1::testTdf134969TransparencyOnColorGradient()
{
::sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/tdf134969_TransparencyOnColorGradient.odp"), ODP);
+ = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/tdf134969_TransparencyOnColorGradient.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index 569a0559901d..b38678f62a61 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -366,7 +366,7 @@ public:
void SdOOXMLExportTest2::testTdf93883()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf93883.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf93883.odp"), ODP);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 0, 0, xDocShRef ) );
uno::Reference<text::XTextRange> const xParagraph( getParagraphFromShape( 0, xShape ) );
@@ -377,7 +377,7 @@ void SdOOXMLExportTest2::testTdf93883()
void SdOOXMLExportTest2::testBnc822341()
{
// Check import / export of embedded text document
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/bnc822341.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/bnc822341.odp"), ODP);
utl::TempFile tempFile1;
xDocShRef = saveAndReload( xDocShRef.get(), PPTX, &tempFile1 );
@@ -447,7 +447,7 @@ void SdOOXMLExportTest2::testBnc822341()
void SdOOXMLExportTest2::testMathObject()
{
// Check import / export of math object
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/math.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/math.odp"), ODP);
utl::TempFile tempFile1;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile1);
@@ -494,7 +494,7 @@ void SdOOXMLExportTest2::testMathObject()
void SdOOXMLExportTest2::testMathObjectPPT2010()
{
// Check import / export of math object
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/Math.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/Math.pptx"), PPTX);
utl::TempFile tempFile1;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile1);
@@ -521,7 +521,7 @@ void SdOOXMLExportTest2::testMathObjectPPT2010()
void SdOOXMLExportTest2::testTdf119015()
{
::sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf119015.pptx"), PPTX);
+ = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf119015.pptx"), PPTX);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
const SdrPage* pPage = GetPage(1, xDocShRef);
@@ -544,7 +544,7 @@ void SdOOXMLExportTest2::testTdf119015()
void SdOOXMLExportTest2::testTdf123090()
{
::sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf123090.pptx"), PPTX);
+ = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf123090.pptx"), PPTX);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
const SdrPage* pPage = GetPage(1, xDocShRef);
@@ -571,7 +571,7 @@ void SdOOXMLExportTest2::testTdf123090()
void SdOOXMLExportTest2::testTdf126324()
{
sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf126324.pptx"), PPTX);
+ = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf126324.pptx"), PPTX);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
uno::Reference<drawing::XDrawPagesSupplier> xDoc(xDocShRef->GetDoc()->getUnoModel(),
uno::UNO_QUERY);
@@ -590,7 +590,7 @@ void SdOOXMLExportTest2::testTdf119187()
{
std::vector< sd::DrawDocShellRef > xDocShRef;
// load document
- xDocShRef.push_back(loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf119187.pptx"), PPTX));
+ xDocShRef.push_back(loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf119187.pptx"), PPTX));
// load resaved document
xDocShRef.push_back(saveAndReload( xDocShRef.at(0).get(), PPTX ));
@@ -613,7 +613,7 @@ void SdOOXMLExportTest2::testTdf119187()
void SdOOXMLExportTest2::testTdf80224()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf80224.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf80224.odp"), ODP);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 0, 0, xDocShRef ) );
@@ -630,7 +630,7 @@ void SdOOXMLExportTest2::testTdf91378()
{
//Check For Import and Export Both
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf91378.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf91378.pptx"), PPTX);
for( sal_uInt32 i=0;i<2;i++)
{
SdDrawDocument *pDoc = xDocShRef->GetDoc();
@@ -689,7 +689,7 @@ static bool checkTransitionOnPage(uno::Reference<drawing::XDrawPagesSupplier> co
void SdOOXMLExportTest2::testExportTransitionsPPTX()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/AllTransitions.odp"), ODP);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/AllTransitions.odp"), ODP);
xDocShRef = saveAndReload(xDocShRef.get(), PPTX);
uno::Reference<drawing::XDrawPagesSupplier> xDoc(xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW);
@@ -738,7 +738,7 @@ void SdOOXMLExportTest2::testExportTransitionsPPTX()
void SdOOXMLExportTest2::testPresetShapesExport()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/preset-shapes-export.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/preset-shapes-export.odp"), ODP);
const char *sShapeTypeAndValues[] =
{
"wedgeEllipseCallout",
@@ -822,7 +822,7 @@ void SdOOXMLExportTest2::testTdf92527()
// We draw a diamond in an empty document. A newly created diamond shape does not have
// CustomShapeGeometry - Path - Segments property, and previously DrawingML exporter
// did not export custom shapes which did not have CustomShapeGeometry - Path - Segments property.
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/empty.fodp"), FODG );
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/empty.fodp"), FODG );
uno::Reference<css::lang::XMultiServiceFactory> xFactory(xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY);
uno::Reference<drawing::XShape> xShape1(xFactory->createInstance("com.sun.star.drawing.CustomShape"), uno::UNO_QUERY);
uno::Reference<drawing::XDrawPagesSupplier> xDoc1(xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW);
@@ -899,7 +899,7 @@ void matchNumberFormat( int nPage, uno::Reference< text::XTextField > const & xF
void SdOOXMLExportTest2::testDatetimeFieldNumberFormat()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/numfmt.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/numfmt.odp"), ODP);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
@@ -913,7 +913,7 @@ void SdOOXMLExportTest2::testDatetimeFieldNumberFormat()
void SdOOXMLExportTest2::testDatetimeFieldNumberFormatPPTX()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/numfmt.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/numfmt.pptx"), PPTX);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
@@ -927,7 +927,7 @@ void SdOOXMLExportTest2::testDatetimeFieldNumberFormatPPTX()
void SdOOXMLExportTest2::testSlideNumberField()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/slidenum_field.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/slidenum_field.odp"), ODP);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
@@ -939,7 +939,7 @@ void SdOOXMLExportTest2::testSlideNumberField()
void SdOOXMLExportTest2::testSlideNumberFieldPPTX()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/slidenum_field.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/slidenum_field.pptx"), PPTX);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
@@ -951,7 +951,7 @@ void SdOOXMLExportTest2::testSlideNumberFieldPPTX()
void SdOOXMLExportTest2::testSlideCountField()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/slidecount_field.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/slidecount_field.odp"), ODP);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
@@ -963,7 +963,7 @@ void SdOOXMLExportTest2::testSlideCountField()
void SdOOXMLExportTest2::testSlideNameField()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/slidename_field.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/slidename_field.odp"), ODP);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
@@ -975,7 +975,7 @@ void SdOOXMLExportTest2::testSlideNameField()
void SdOOXMLExportTest2::testExtFileField()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/extfile_field.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/extfile_field.odp"), ODP);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
@@ -1008,7 +1008,7 @@ void SdOOXMLExportTest2::testExtFileField()
void SdOOXMLExportTest2::testAuthorField()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/author_field.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/author_field.odp"), ODP);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
@@ -1020,7 +1020,7 @@ void SdOOXMLExportTest2::testAuthorField()
void SdOOXMLExportTest2::testTdf99224()
{
- sd::DrawDocShellRef xShell = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf99224.odp"), ODP);
+ sd::DrawDocShellRef xShell = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf99224.odp"), ODP);
xShell = saveAndReload(xShell.get(), PPTX);
uno::Reference<drawing::XDrawPage> xPage = getPage(0, xShell);
// This was 0: the image with text was lost on export.
@@ -1030,7 +1030,7 @@ void SdOOXMLExportTest2::testTdf99224()
void SdOOXMLExportTest2::testTdf92076()
{
- sd::DrawDocShellRef xShell = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf92076.odp"), ODP);
+ sd::DrawDocShellRef xShell = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf92076.odp"), ODP);
xShell = saveAndReload(xShell.get(), PPTX);
uno::Reference<drawing::XDrawPage> xPage = getPage(0, xShell);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), xPage->getCount());
@@ -1039,7 +1039,7 @@ void SdOOXMLExportTest2::testTdf92076()
void SdOOXMLExportTest2::testTdf59046()
{
- sd::DrawDocShellRef xShell = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf59046.odp"), ODP);
+ sd::DrawDocShellRef xShell = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf59046.odp"), ODP);
utl::TempFile tempFile;
xShell = saveAndReload(xShell.get(), PPTX, &tempFile);
xShell->DoClose();
@@ -1049,7 +1049,7 @@ void SdOOXMLExportTest2::testTdf59046()
void SdOOXMLExportTest2::testTdf133502()
{
- sd::DrawDocShellRef xShell = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf133502.odp"), ODP);
+ sd::DrawDocShellRef xShell = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf133502.odp"), ODP);
utl::TempFile tempFile;
xShell = saveAndReload(xShell.get(), PPTX, &tempFile);
xShell->DoClose();
@@ -1065,7 +1065,7 @@ void SdOOXMLExportTest2::testTdf133502()
void SdOOXMLExportTest2::testTdf105739()
{
// Gradient was lost during saving to ODP
- sd::DrawDocShellRef xShell = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf105739.pptx"), PPTX);
+ sd::DrawDocShellRef xShell = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf105739.pptx"), PPTX);
utl::TempFile tempFile;
xShell = saveAndReload(xShell.get(), ODP, &tempFile);
uno::Reference<drawing::XDrawPage> xPage = getPage(0, xShell);
@@ -1095,7 +1095,7 @@ void SdOOXMLExportTest2::testTdf105739()
void SdOOXMLExportTest2::testPageBitmapWithTransparency()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/page_transparent_bitmap.pptx"), PPTX );
+ ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/page_transparent_bitmap.pptx"), PPTX );
xDocShRef = saveAndReload( xDocShRef.get(), ODP );
uno::Reference< drawing::XDrawPagesSupplier > xDoc(
@@ -1120,7 +1120,7 @@ void SdOOXMLExportTest2::testPageBitmapWithTransparency()
void SdOOXMLExportTest2::testPptmContentType()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptm/macro.pptm"), PPTM);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptm/macro.pptm"), PPTM);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTM, &tempFile);
@@ -1136,7 +1136,7 @@ void SdOOXMLExportTest2::testPptmContentType()
void SdOOXMLExportTest2::testTdf111798()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf111798.odp"), ODP);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf111798.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -1193,7 +1193,7 @@ void SdOOXMLExportTest2::testTdf111798()
void SdOOXMLExportTest2::testPptmVBAStream()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptm/macro.pptm"), PPTM);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptm/macro.pptm"), PPTM);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTM, &tempFile);
@@ -1206,7 +1206,7 @@ void SdOOXMLExportTest2::testPptmVBAStream()
void SdOOXMLExportTest2::testTdf111863()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf111863.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf111863.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -1219,7 +1219,7 @@ void SdOOXMLExportTest2::testTdf111863()
void SdOOXMLExportTest2::testTdf111518()
{
- sd::DrawDocShellRef xShell = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf111518.pptx"), PPTX);
+ sd::DrawDocShellRef xShell = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf111518.pptx"), PPTX);
utl::TempFile tempFile;
tempFile.EnableKillingFile(false);
xShell = saveAndReload(xShell.get(), PPTX, &tempFile);
@@ -1235,7 +1235,7 @@ void SdOOXMLExportTest2::testTdf111518()
void SdOOXMLExportTest2::testTdf100387()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf100387.odp"), ODP);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf100387.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -1264,7 +1264,7 @@ void SdOOXMLExportTest2::testTdf100387()
// tdf#126746 Add support for Line Caps import and export
void SdOOXMLExportTest2::testClosingShapesAndLineCaps()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/closed-shapes.odp"), ODP);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/closed-shapes.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -1299,7 +1299,7 @@ void SdOOXMLExportTest2::testClosingShapesAndLineCaps()
void SdOOXMLExportTest2::testRotateFlip()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/rotate_flip.odp"), ODP);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/rotate_flip.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -1345,7 +1345,7 @@ void SdOOXMLExportTest2::testRotateFlip()
void SdOOXMLExportTest2::testTdf106867()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf106867.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf106867.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -1375,7 +1375,7 @@ void SdOOXMLExportTest2::testTdf106867()
void SdOOXMLExportTest2::testTdf112280()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf112280.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf112280.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -1388,7 +1388,7 @@ void SdOOXMLExportTest2::testTdf112280()
void SdOOXMLExportTest2::testTdf112088()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf112088.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf112088.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -1400,7 +1400,7 @@ void SdOOXMLExportTest2::testTdf112088()
void SdOOXMLExportTest2::testTdf112333()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf112333.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf112333.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -1429,7 +1429,7 @@ void SdOOXMLExportTest2::testTdf112333()
void SdOOXMLExportTest2::testTdf112552()
{
// Background fill was not displayed, but it was because of the wrong geometry
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf112552.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf112552.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -1444,7 +1444,7 @@ void SdOOXMLExportTest2::testTdf112552()
void SdOOXMLExportTest2::testTdf112557()
{
// Subtitle shape should be skipped by export.
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf112557.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf112557.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -1455,7 +1455,7 @@ void SdOOXMLExportTest2::testTdf112557()
void SdOOXMLExportTest2::testTdf128049()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf128049.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf128049.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -1469,7 +1469,7 @@ void SdOOXMLExportTest2::testTdf128049()
void SdOOXMLExportTest2::testTdf106026()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf106026.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf106026.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -1494,7 +1494,7 @@ void SdOOXMLExportTest2::testTdf106026()
void SdOOXMLExportTest2::testTdf112334()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf112334.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf112334.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -1507,7 +1507,7 @@ void SdOOXMLExportTest2::testTdf112334()
void SdOOXMLExportTest2::testTdf112089()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf112089.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf112089.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -1521,7 +1521,7 @@ void SdOOXMLExportTest2::testTdf112089()
void SdOOXMLExportTest2::testTdf112086()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf112086.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf112086.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -1544,7 +1544,7 @@ void SdOOXMLExportTest2::testTdf112086()
void SdOOXMLExportTest2::testTdf112647()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf112647.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf112647.odp"), ODP);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 0, 0, xDocShRef ) );
uno::Reference<text::XTextRange> xParagraph( getParagraphFromShape( 0, xShape ) );
@@ -1559,7 +1559,7 @@ void SdOOXMLExportTest2::testTdf112647()
void SdOOXMLExportTest2::testGroupRotation()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/group_rotation.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/group_rotation.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -1572,7 +1572,7 @@ void SdOOXMLExportTest2::testGroupRotation()
void SdOOXMLExportTest2::testTdf104788()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf104788.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf104788.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -1589,7 +1589,7 @@ void SdOOXMLExportTest2::testTdf104788()
void SdOOXMLExportTest2::testSmartartRotation2()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart-rotation2.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/smartart-rotation2.pptx"), PPTX);
// clear SmartArt data to check how group shapes with double-rotated children are exported, not smartart
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0, xDocShRef));
@@ -1612,7 +1612,7 @@ void SdOOXMLExportTest2::testSmartartRotation2()
void SdOOXMLExportTest2::testTdf91999_rotateShape()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf91999_rotateShape.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf91999_rotateShape.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -1628,7 +1628,7 @@ void SdOOXMLExportTest2::testTdf91999_rotateShape()
void SdOOXMLExportTest2::testTdf114845_rotateShape()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf114845_rotateShape.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf114845_rotateShape.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -1644,7 +1644,7 @@ void SdOOXMLExportTest2::testTdf114845_rotateShape()
void SdOOXMLExportTest2::testGroupsPosition()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/group.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/group.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -1658,7 +1658,7 @@ void SdOOXMLExportTest2::testGroupsPosition()
void SdOOXMLExportTest2::testGroupsRotatedPosition()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/group-rot.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/group-rot.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -1670,7 +1670,7 @@ void SdOOXMLExportTest2::testGroupsRotatedPosition()
void SdOOXMLExportTest2::testAccentColor()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/accent-color.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/accent-color.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -1687,7 +1687,7 @@ void SdOOXMLExportTest2::testAccentColor()
void SdOOXMLExportTest2::testThemeColors()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf84205.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf84205.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -1699,7 +1699,7 @@ void SdOOXMLExportTest2::testThemeColors()
void SdOOXMLExportTest2::testTdf114848()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf114848.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf114848.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -1712,7 +1712,7 @@ void SdOOXMLExportTest2::testTdf114848()
void SdOOXMLExportTest2::testTdf68759()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/tdf68759.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/tdf68759.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -1732,7 +1732,7 @@ void SdOOXMLExportTest2::testTdf68759()
void SdOOXMLExportTest2::testTdf127901()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/tdf127901.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/tdf127901.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -1751,7 +1751,7 @@ void SdOOXMLExportTest2::testTdf127901()
void SdOOXMLExportTest2::testTdf48735()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/tdf48735.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/tdf48735.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -1765,7 +1765,7 @@ void SdOOXMLExportTest2::testTdf48735()
void SdOOXMLExportTest2::testTdf90626()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/tdf90626.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/tdf90626.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -1779,7 +1779,7 @@ void SdOOXMLExportTest2::testTdf90626()
void SdOOXMLExportTest2::testTdf107608()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf107608.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf107608.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -1804,7 +1804,7 @@ void SdOOXMLExportTest2::testTdf107608()
void SdOOXMLExportTest2::testTdf111786()
{
// Export line transparency with the color
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf111786.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf111786.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -1824,7 +1824,7 @@ void SdOOXMLExportTest2::testTdf111786()
void SdOOXMLExportTest2::testFontScale()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/font-scale.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/font-scale.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
@@ -1839,7 +1839,7 @@ void SdOOXMLExportTest2::testFontScale()
void SdOOXMLExportTest2::testShapeAutofitPPTX()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/testShapeAutofit.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/testShapeAutofit.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
@@ -1853,7 +1853,7 @@ void SdOOXMLExportTest2::testShapeAutofitPPTX()
void SdOOXMLExportTest2::testLegacyShapeAutofitPPTX()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/testLegacyShapeAutofit.odp"), ODP);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/testLegacyShapeAutofit.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
@@ -1869,7 +1869,7 @@ void SdOOXMLExportTest2::testLegacyShapeAutofitPPTX()
void SdOOXMLExportTest2::testTdf115394()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf115394.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf115394.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
double fTransitionDuration;
@@ -1903,7 +1903,7 @@ void SdOOXMLExportTest2::testTdf115394()
void SdOOXMLExportTest2::testTdf115394Zero()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf115394-zero.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf115394-zero.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
double fTransitionDuration;
@@ -1917,7 +1917,7 @@ void SdOOXMLExportTest2::testTdf115394Zero()
void SdOOXMLExportTest2::testTdf115005()
{
- sd::DrawDocShellRef xDocShRefOriginal = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/tdf115005.odp"), ODP);
+ sd::DrawDocShellRef xDocShRefOriginal = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/tdf115005.odp"), ODP);
utl::TempFile tempFile;
sd::DrawDocShellRef xDocShRefResaved = saveAndReload(xDocShRefOriginal.get(), ODP, &tempFile);
@@ -1937,7 +1937,7 @@ void SdOOXMLExportTest2::testTdf115005()
int SdOOXMLExportTest2::testTdf115005_FallBack_Images(bool bAddReplacementImages)
{
- sd::DrawDocShellRef xDocShRefOriginal = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/tdf115005_no_fallback_images.odp"), ODP);
+ sd::DrawDocShellRef xDocShRefOriginal = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/tdf115005_no_fallback_images.odp"), ODP);
// check if fallback images were not created if AddReplacementImages=true/false
// set AddReplacementImages
@@ -1986,7 +1986,7 @@ void SdOOXMLExportTest2::testTdf115005_FallBack_Images_Off()
void SdOOXMLExportTest2::testTdf118806()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/tdf118806.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/tdf118806.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -1998,7 +1998,7 @@ void SdOOXMLExportTest2::testTdf118806()
void SdOOXMLExportTest2::testTdf130058()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf130058.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf130058.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -2030,7 +2030,7 @@ void SdOOXMLExportTest2::testTdf130058()
void SdOOXMLExportTest2::testTdf111789()
{
// Shadow properties were not exported for text shapes.
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf111789.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf111789.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -2073,7 +2073,7 @@ void SdOOXMLExportTest2::testTdf111789()
void SdOOXMLExportTest2::testTdf104792()
{
::sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf104792-smart-art-animation.pptx"), PPTX);
+ m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf104792-smart-art-animation.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -2085,7 +2085,7 @@ void SdOOXMLExportTest2::testTdf104792()
void SdOOXMLExportTest2::testTdf90627()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/tdf90627.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/tdf90627.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -2098,7 +2098,7 @@ void SdOOXMLExportTest2::testTdf90627()
void SdOOXMLExportTest2::testTdf104786()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf104786.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf104786.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -2111,7 +2111,7 @@ void SdOOXMLExportTest2::testTdf104786()
void SdOOXMLExportTest2::testTdf118783()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/tdf118783.odp"), ODP);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/tdf118783.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -2124,7 +2124,7 @@ void SdOOXMLExportTest2::testTdf118783()
void SdOOXMLExportTest2::testTdf104789()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf104789.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf104789.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -2137,7 +2137,7 @@ void SdOOXMLExportTest2::testTdf104789()
void SdOOXMLExportTest2::testOpenDocumentAsReadOnly()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/open-as-read-only.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/open-as-read-only.pptx"), PPTX);
CPPUNIT_ASSERT(xDocShRef->IsSecurityOptOpenReadOnly());
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -2147,7 +2147,7 @@ void SdOOXMLExportTest2::testOpenDocumentAsReadOnly()
void SdOOXMLExportTest2::testTdf118835()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/tdf118835.odp"), ODP);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/tdf118835.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -2175,7 +2175,7 @@ void SdOOXMLExportTest2::testTdf118835()
void SdOOXMLExportTest2::testTdf118768()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/tdf118768-brake.odp"), ODP);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/tdf118768-brake.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -2194,7 +2194,7 @@ void SdOOXMLExportTest2::testTdf118768()
void SdOOXMLExportTest2::testTdf118836()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/tdf118836.odp"), ODP);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/tdf118836.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -2264,7 +2264,7 @@ static bool getScaleXValue(const uno::Reference<beans::XPropertySet>& xSet)
void SdOOXMLExportTest2::testTdf116350TextEffects()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc( "sd/qa/unit/data/pptx/tdf116350-texteffects.pptx" ), PPTX );
+ ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc( u"sd/qa/unit/data/pptx/tdf116350-texteffects.pptx" ), PPTX );
// Default angle for ArchUp
uno::Reference<beans::XPropertySet> xShape0( getShapeFromPage( 0, 0, xDocShRef ) );
@@ -2304,7 +2304,7 @@ void SdOOXMLExportTest2::testTdf116350TextEffects()
void SdOOXMLExportTest2::testTdf128096()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/tdf128096.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/tdf128096.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef->DoClose();
@@ -2318,7 +2318,7 @@ void SdOOXMLExportTest2::testTdf128096()
}
void SdOOXMLExportTest2::testTdf120573()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc( "sd/qa/unit/data/pptx/tdf120573.pptx" ), PPTX );
+ ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc( u"sd/qa/unit/data/pptx/tdf120573.pptx" ), PPTX );
utl::TempFile tempFile;
xDocShRef = saveAndReload( xDocShRef.get(), PPTX, &tempFile );
@@ -2341,7 +2341,7 @@ void SdOOXMLExportTest2::testTdf120573()
void SdOOXMLExportTest2::testTdf118825()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/tdf118825-motionpath.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/tdf118825-motionpath.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
@@ -2356,7 +2356,7 @@ void SdOOXMLExportTest2::testTdf118825()
void SdOOXMLExportTest2::testTdf119118()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc( "sd/qa/unit/data/pptx/tdf119118.pptx" ), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc( u"sd/qa/unit/data/pptx/tdf119118.pptx" ), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
@@ -2367,7 +2367,7 @@ void SdOOXMLExportTest2::testTdf119118()
void SdOOXMLExportTest2::testTdf99213()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc( "sd/qa/unit/data/odp/tdf99213-target-missing.odp" ), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc( u"sd/qa/unit/data/odp/tdf99213-target-missing.odp" ), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
@@ -2403,7 +2403,7 @@ void SdOOXMLExportTest2::testTdf44223()
{
utl::TempFile tempFile;
::sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf44223.pptx"), PPTX);
+ = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf44223.pptx"), PPTX);
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
std::unique_ptr<SvStream> const pStream1(parseExportStream(tempFile, "ppt/media/audio1.wav"));
@@ -2444,7 +2444,8 @@ void SdOOXMLExportTest2::testTdf44223()
void SdOOXMLExportTest2::testSmartArtPreserve()
{
::sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart-preserve.pptx"), PPTX);
+ = loadURL(
+ m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/smartart-preserve.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -2489,7 +2490,7 @@ void SdOOXMLExportTest2::testSmartArtPreserve()
void SdOOXMLExportTest2::testTdf125346()
{
// There are two themes in the test document, make sure we use the right theme
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf125346.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf125346.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -2511,7 +2512,7 @@ void SdOOXMLExportTest2::testTdf125346_2()
{
// There are two themes in the test document, make sure we use the right theme
// Test more slides with different themes
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf125346_2.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf125346_2.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -2561,7 +2562,7 @@ void SdOOXMLExportTest2::testTdf125360()
{
// Check whether the changed fill transparency is exported correctly.
// Color is defined by shape style
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf125360.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf125360.pptx"), PPTX);
uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 0, 0, xDocShRef ) );
@@ -2583,7 +2584,7 @@ void SdOOXMLExportTest2::testTdf125360_1()
{
// Check whether the changed fill transparency is exported correctly.
// Color is defined by color scheme
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf125360_1.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf125360_1.pptx"), PPTX);
uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 0, 0, xDocShRef ) );
@@ -2605,7 +2606,7 @@ void SdOOXMLExportTest2::testTdf125360_2()
{
// Check whether the changed fill transparency is exported correctly.
// Color is defined by color scheme with a transparency
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf125360_2.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf125360_2.pptx"), PPTX);
uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 0, 0, xDocShRef ) );
@@ -2629,7 +2630,7 @@ void SdOOXMLExportTest2::testTdf125360_2()
void SdOOXMLExportTest2::testTdf125551()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf125551.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf125551.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -2644,7 +2645,7 @@ void SdOOXMLExportTest2::testTdf125551()
void SdOOXMLExportTest2::testTdf136830()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf136830.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf136830.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -2667,7 +2668,7 @@ void SdOOXMLExportTest2::testTdf136830()
void SdOOXMLExportTest2::testTdf100348_convert_Fontwork2TextWarp()
{
::sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf100348_Fontwork2TextWarp.odp"), ODP);
+ m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf100348_Fontwork2TextWarp.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -2722,7 +2723,7 @@ void SdOOXMLExportTest2::testTdf100348_convert_Fontwork2TextWarp()
void SdOOXMLExportTest2::testTdf1225573_FontWorkScaleX()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf125573_FontWorkScaleX.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf125573_FontWorkScaleX.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -2751,7 +2752,7 @@ void SdOOXMLExportTest2::testTdf1225573_FontWorkScaleX()
void SdOOXMLExportTest2::testTdf126234()
{
- sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf126234.pptx"), PPTX );
+ sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf126234.pptx"), PPTX );
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -2770,7 +2771,7 @@ void SdOOXMLExportTest2::testTdf126234()
void SdOOXMLExportTest2::testTdf126741()
{
- sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf126741.pptx"), PPTX );
+ sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf126741.pptx"), PPTX );
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -2803,7 +2804,7 @@ void SdOOXMLExportTest2::testTdf99497_keepAppearanceOfCircleKind()
// slide 1 ARC -> arc, slide 2 CUT -> chord, slide 3 SECTION -> pie
// Adjustment values need to exist and their values need to correspond to the
// original angles. Shape 'arc' needs to be unfilled.
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf99497_CircleKind.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf99497_CircleKind.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -2837,7 +2838,7 @@ void SdOOXMLExportTest2::testTdf99497_keepAppearanceOfCircleKind()
void SdOOXMLExportTest2::testTdf127372()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf127372.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf127372.odp"), ODP);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 0, 0, xDocShRef ) );
awt::Gradient aTransparenceGradient;
@@ -2848,7 +2849,7 @@ void SdOOXMLExportTest2::testTdf127372()
void SdOOXMLExportTest2::testTdf127379()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf127379.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf127379.odp"), ODP);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
uno::Reference< drawing::XDrawPagesSupplier > xDoc(
xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW );
@@ -2874,7 +2875,7 @@ void SdOOXMLExportTest2::testTdf127379()
void SdOOXMLExportTest2::testTdf98603()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf98603.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf98603.pptx"), PPTX);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0, xDocShRef));
uno::Reference<text::XTextRange> const xParagraph(getParagraphFromShape(0, xShape));
@@ -2888,7 +2889,7 @@ void SdOOXMLExportTest2::testTdf98603()
void SdOOXMLExportTest2::testTdf128213()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf128213.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf128213.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload( xDocShRef.get(), PPTX, &tempFile );
@@ -2898,7 +2899,7 @@ void SdOOXMLExportTest2::testTdf128213()
void SdOOXMLExportTest2::testTdf79082()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf79082.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf79082.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload( xDocShRef.get(), PPTX, &tempFile );
@@ -2954,7 +2955,7 @@ void SdOOXMLExportTest2::testTdf79082()
void SdOOXMLExportTest2::testTdf129372()
{
//Without the fix in place, it would crash at import time
- ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf129372.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf129372.pptx"), PPTX);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
const SdrPage *pPage = GetPage( 1, xDocShRef.get() );
@@ -2965,7 +2966,7 @@ void SdOOXMLExportTest2::testTdf129372()
void SdOOXMLExportTest2::testShapeGlowEffect()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("sd/qa/unit/data/pptx/shape-glow-effect.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/shape-glow-effect.pptx"), PPTX);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0, xDocShRef));
sal_Int32 nRadius = -1;
@@ -2981,14 +2982,14 @@ void SdOOXMLExportTest2::testShapeGlowEffect()
void SdOOXMLExportTest2::testTdf119087()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf119087.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf119087.pptx"), PPTX);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
// This would fail both on export validation, and reloading the saved pptx file.
}
void SdOOXMLExportTest2::testTdf131554()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf131554.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf131554.pptx"), PPTX);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
uno::Reference<drawing::XShape> xShape(getShapeFromPage(1, 0, xDocShRef), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(5622), xShape->getPosition().X);
@@ -2997,7 +2998,7 @@ void SdOOXMLExportTest2::testTdf131554()
void SdOOXMLExportTest2::testTdf132282()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf132282.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf132282.pptx"), PPTX);
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
uno::Reference<drawing::XShape> xShape(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
// Without the fix in place, the position would be 0,0, height = 1 and width = 1
@@ -3009,7 +3010,7 @@ void SdOOXMLExportTest2::testTdf132282()
void SdOOXMLExportTest2::testTdf132201EffectOrder()
{
- auto xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/effectOrder.pptx"),
+ auto xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/effectOrder.pptx"),
PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -3029,7 +3030,7 @@ void SdOOXMLExportTest2::testTdf132201EffectOrder()
void SdOOXMLExportTest2::testShapeSoftEdgeEffect()
{
auto xDocShRef
- = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/shape-soft-edges.pptx"), PPTX);
+ = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/shape-soft-edges.pptx"), PPTX);
xDocShRef = saveAndReload(xDocShRef.get(), PPTX);
auto xShapeProps(getShapeFromPage(0, 0, xDocShRef));
sal_Int32 nRadius = -1;
@@ -3040,7 +3041,7 @@ void SdOOXMLExportTest2::testShapeSoftEdgeEffect()
void SdOOXMLExportTest2::testShapeShadowBlurEffect()
{
auto xDocShRef
- = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/shape-blur-effect.pptx"), PPTX);
+ = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/shape-blur-effect.pptx"), PPTX);
xDocShRef = saveAndReload(xDocShRef.get(), PPTX);
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0, xDocShRef));
bool bHasShadow = false;
@@ -3054,7 +3055,7 @@ void SdOOXMLExportTest2::testShapeShadowBlurEffect()
void SdOOXMLExportTest2::testTdf119223()
{
auto xDocShRef
- = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/tdf119223.odp"), ODP);
+ = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/tdf119223.odp"), ODP);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index 39700d4ab7cf..56227498f2e5 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -186,7 +186,7 @@ void SdExportTest::testBackgroundImage()
// Check if Slide background image is imported from PPTX and exported to PPTX, PPT and ODP correctly
OUString bgImageName;
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/n821567.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/n821567.pptx"), PPTX);
// Check that imported background image from PPTX exists
{
@@ -279,7 +279,7 @@ void checkFontAttributes( const SdrTextObj* pObj, ItemValue nVal)
void SdExportTest::testTransparentBackground()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/transparent_background.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/transparent_background.odp"), ODP);
xDocShRef = saveAndReload( xDocShRef.get(), ODP );
const SdrPage *pPage = GetPage( 1, xDocShRef );
@@ -295,7 +295,7 @@ void SdExportTest::testTransparentBackground()
void SdExportTest::testMediaEmbedding()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/media_embedding.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/media_embedding.odp"), ODP);
const SdrPage *pPage = GetPage( 1, xDocShRef );
@@ -310,7 +310,7 @@ void SdExportTest::testMediaEmbedding()
void SdExportTest::testFdo84043()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/fdo84043.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/fdo84043.odp"), ODP);
xDocShRef = saveAndReload( xDocShRef.get(), ODP );
// the bug was duplicate attributes, causing crash in a build with asserts
@@ -323,7 +323,7 @@ void SdExportTest::testFdo84043()
void SdExportTest::testTdf97630()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/fit-to-size.fodp"), FODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/fit-to-size.fodp"), FODP);
{
uno::Reference<drawing::XDrawPagesSupplier> xDPS(xDocShRef->GetModel(), uno::UNO_QUERY);
@@ -414,7 +414,7 @@ void SdExportTest::testSwappedOutImageExport()
for( size_t nExportFormat = 0; nExportFormat < SAL_N_ELEMENTS(vFormats); ++nExportFormat )
{
// Load the original file with one image
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/document_with_two_images.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/document_with_two_images.odp"), ODP);
const OString sFailedMessage = OStringLiteral("Failed on filter: ") + aFileFormats[vFormats[nExportFormat]].pFilterName;
// Export the document and import again for a check
@@ -472,7 +472,7 @@ void SdExportTest::testSwappedOutImageExport()
void SdExportTest::testOOoXMLAnimations()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/sxi/ooo41061-1.sxi"), SXI);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/sxi/ooo41061-1.sxi"), SXI);
uno::Reference<lang::XComponent> xComponent = xDocShRef->GetModel();
uno::Reference<frame::XStorable> xStorable(xComponent, uno::UNO_QUERY);
@@ -494,7 +494,7 @@ void SdExportTest::testOOoXMLAnimations()
void SdExportTest::testBnc480256()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/bnc480256.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/bnc480256.pptx"), PPTX);
// In the document, there are two tables with table background properties.
// Make sure colors are set properly for individual cells.
@@ -548,7 +548,7 @@ void SdExportTest::testBnc480256()
void SdExportTest::testUnknownAttributes()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/unknown-attribute.fodp"), FODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/unknown-attribute.fodp"), FODP);
uno::Reference<lang::XComponent> xComponent = xDocShRef->GetModel();
uno::Reference<frame::XStorable> xStorable(xComponent, uno::UNO_QUERY);
@@ -570,7 +570,7 @@ void SdExportTest::testUnknownAttributes()
void SdExportTest::testTdf80020()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf80020.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf80020.odp"), ODP);
{
uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(xDocShRef->GetModel(), uno::UNO_QUERY);
uno::Reference<container::XNameAccess> xStyleFamilies = xStyleFamiliesSupplier->getStyleFamilies();
@@ -600,7 +600,7 @@ void SdExportTest::testLinkedGraphicRT()
for( size_t nExportFormat = 0; nExportFormat < SAL_N_ELEMENTS(vFormats); ++nExportFormat )
{
// Load the original file with one image
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/document_with_linked_graphic.odp"), ODP);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/document_with_linked_graphic.odp"), ODP);
// Export the document and import again for a check
uno::Reference< lang::XComponent > xComponent = xDocShRef->GetModel();
@@ -656,7 +656,7 @@ void SdExportTest::testLinkedGraphicRT()
void SdExportTest::testTdf79082()
{
sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/ppt/tdf79082.ppt"), PPT);
+ = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/ppt/tdf79082.ppt"), PPT);
utl::TempFile tempFile;
tempFile.EnableKillingFile();
xDocShRef = saveAndReload(xDocShRef.get(), ODP, &tempFile);
@@ -711,7 +711,7 @@ void SdExportTest::testImageWithSpecialID()
for( size_t nExportFormat = 0; nExportFormat < SAL_N_ELEMENTS(vFormats); ++nExportFormat )
{
// Load the original file
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/images_with_special_IDs.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/images_with_special_IDs.odp"), ODP);
const OString sFailedMessage = OStringLiteral("Failed on filter: ") + aFileFormats[vFormats[nExportFormat]].pFilterName;
// Export the document and import again for a check
@@ -769,7 +769,7 @@ void SdExportTest::testImageWithSpecialID()
void SdExportTest::testTdf62176()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/Tdf62176.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/Tdf62176.odp"), ODP);
uno::Reference<drawing::XDrawPage> xPage( getPage( 0, xDocShRef ) );
//there should be only *one* shape
@@ -815,7 +815,7 @@ void SdExportTest::testTdf62176()
void SdExportTest::testEmbeddedPdf()
{
#if HAVE_FEATURE_PDFIUM
- sd::DrawDocShellRef xShell = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/embedded-pdf.odp"), ODP);
+ sd::DrawDocShellRef xShell = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/embedded-pdf.odp"), ODP);
xShell = saveAndReload( xShell.get(), ODP );
uno::Reference<drawing::XDrawPage> xPage = getPage(0, xShell);
uno::Reference<beans::XPropertySet> xShape(xPage->getByIndex(0), uno::UNO_QUERY);
@@ -828,7 +828,7 @@ void SdExportTest::testEmbeddedPdf()
void SdExportTest::testEmbeddedText()
{
- sd::DrawDocShellRef xShell = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/objectwithtext.fodg"), FODG);
+ sd::DrawDocShellRef xShell = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/objectwithtext.fodg"), FODG);
xShell = saveAndReload( xShell.get(), ODG );
uno::Reference<drawing::XDrawPage> xPage = getPage(0, xShell);
@@ -859,7 +859,7 @@ void SdExportTest::testEmbeddedText()
void SdExportTest::testTransparenText()
{
sd::DrawDocShellRef xShell
- = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/transparent-text.fodg"), FODG);
+ = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/transparent-text.fodg"), FODG);
xShell = saveAndReload(xShell.get(), ODG);
uno::Reference<drawing::XDrawPage> xPage = getPage(0, xShell);
@@ -879,7 +879,7 @@ void SdExportTest::testTransparenText()
void SdExportTest::testDefaultSubscripts()
{
sd::DrawDocShellRef xShell
- = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/tdf80194_defaultSubscripts.fodg"), FODG);
+ = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/tdf80194_defaultSubscripts.fodg"), FODG);
xShell = saveAndReload(xShell.get(), ODG);
uno::Reference<drawing::XDrawPage> xPage = getPage(0, xShell);
@@ -894,7 +894,7 @@ void SdExportTest::testDefaultSubscripts()
void SdExportTest::testTdf98477()
{
utl::TempFile tempFile;
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf98477grow.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf98477grow.pptx"), PPTX);
xDocShRef = saveAndReload(xDocShRef.get(), ODP, &tempFile);
@@ -905,7 +905,7 @@ void SdExportTest::testTdf98477()
void SdExportTest::testAuthorField()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/author_fixed.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/author_fixed.odp"), ODP);
xDocShRef = saveAndReload( xDocShRef.get(), ODP );
@@ -923,7 +923,7 @@ void SdExportTest::testAuthorField()
void SdExportTest::testTdf50499()
{
utl::TempFile tempFile;
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf50499.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf50499.pptx"), PPTX);
xDocShRef = saveAndReload(xDocShRef.get(), ODP, &tempFile);
@@ -937,7 +937,7 @@ void SdExportTest::testTdf50499()
void SdExportTest::testTdf100926()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf100926_ODP.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf100926_ODP.pptx"), PPTX);
xDocShRef = saveAndReload(xDocShRef.get(), ODP);
@@ -966,7 +966,7 @@ void SdExportTest::testTdf100926()
void SdExportTest::testPageWithTransparentBackground()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/odp/page_transparent_background.odp"), ODP );
+ ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/page_transparent_background.odp"), ODP );
xDocShRef = saveAndReload( xDocShRef.get(), ODP );
uno::Reference< drawing::XDrawPagesSupplier > xDoc(
@@ -991,7 +991,7 @@ void SdExportTest::testPageWithTransparentBackground()
void SdExportTest::testTextRotation()
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/shape-text-rotate.pptx"), PPTX);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/shape-text-rotate.pptx"), PPTX);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), ODP, &tempFile);
@@ -1013,7 +1013,7 @@ void SdExportTest::testTextRotation()
void SdExportTest::testTdf115394PPT()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/ppt/tdf115394.ppt"), PPT);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/ppt/tdf115394.ppt"), PPT);
// Export the document and import again for a check
uno::Reference< lang::XComponent > xComponent = xDocShRef->GetModel();
@@ -1052,7 +1052,7 @@ void SdExportTest::testBulletsAsImage()
{
for (sal_Int32 nExportFormat : {ODP, PPTX, PPT})
{
- ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/BulletsAsImage.odp"), ODP);
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/BulletsAsImage.odp"), ODP);
const OString sFailedMessageBase = OStringLiteral("Failed on filter '") + aFileFormats[nExportFormat].pFilterName + "': ";
uno::Reference< lang::XComponent > xComponent = xDocShRef->GetModel();
@@ -1141,7 +1141,7 @@ void SdExportTest::testBulletsAsImage()
void SdExportTest::testTdf113822()
{
utl::TempFile tempFile;
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf113822underline.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf113822underline.pptx"), PPTX);
// Was unable to export iterate container (tdf#99213).
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -1164,7 +1164,7 @@ void SdExportTest::testTdf113822()
void SdExportTest::testTdf113818()
{
utl::TempFile tempFile;
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf113818-swivel.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf113818-swivel.pptx"), PPTX);
xDocShRef = saveAndReload(xDocShRef.get(), PPT);
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
xDocShRef = saveAndReload(xDocShRef.get(), ODP, &tempFile);
@@ -1178,7 +1178,7 @@ void SdExportTest::testTdf113818()
void SdExportTest::testTdf119629()
{
utl::TempFile tempFile;
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/ppt/tdf119629.ppt"), PPT);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/ppt/tdf119629.ppt"), PPT);
xDocShRef = saveAndReload(xDocShRef.get(), PPT);
xDocShRef = saveAndReload(xDocShRef.get(), ODP, &tempFile);
@@ -1199,7 +1199,7 @@ void SdExportTest::testTdf119629()
void SdExportTest::testTdf123557()
{
utl::TempFile tempFile;
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/trigger.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/trigger.pptx"), PPTX);
xDocShRef = saveAndReload(xDocShRef.get(), PPTX);
xDocShRef = saveAndReload(xDocShRef.get(), ODP, &tempFile);
xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "content.xml");
@@ -1219,7 +1219,7 @@ void SdExportTest::testTdf123557()
void SdExportTest::testTdf126761()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/ppt/tdf126761.ppt"), PPT);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/ppt/tdf126761.ppt"), PPT);
xDocShRef = saveAndReload( xDocShRef.get(), ODP );
uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 0, 0, xDocShRef ) );
@@ -1240,7 +1240,7 @@ void SdExportTest::testTdf126761()
void SdExportTest::testGlow()
{
- auto xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odg/glow.odg"), ODG);
+ auto xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odg/glow.odg"), ODG);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), ODG, &tempFile);
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0, xDocShRef));
@@ -1281,7 +1281,8 @@ void SdExportTest::testGlow()
void SdExportTest::testSoftEdges()
{
- auto xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odg/softedges.odg"), ODG);
+ auto xDocShRef
+ = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odg/softedges.odg"), ODG);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), ODG, &tempFile);
auto xShapeProps(getShapeFromPage(0, 0, xDocShRef));
@@ -1308,7 +1309,7 @@ void SdExportTest::testSoftEdges()
void SdExportTest::testShadowBlur()
{
- auto xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odg/shadow-blur.odg"), ODG);
+ auto xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odg/shadow-blur.odg"), ODG);
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), ODG, &tempFile);
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0, xDocShRef));
@@ -1332,7 +1333,7 @@ void SdExportTest::testShadowBlur()
void SdExportTest::testRhbz1870501()
{
//Without the fix in place, it would crash at export time
- ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/odg/rhbz1870501.odg"), ODG);
+ ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/odg/rhbz1870501.odg"), ODG);
xDocShRef = saveAndReload( xDocShRef.get(), ODG );
}
diff --git a/sd/qa/unit/filters-test.cxx b/sd/qa/unit/filters-test.cxx
index 707f8c85110e..33bbe48e56f9 100644
--- a/sd/qa/unit/filters-test.cxx
+++ b/sd/qa/unit/filters-test.cxx
@@ -69,23 +69,23 @@ void SdFiltersTest::testCVEs()
{
#ifndef DISABLE_CVE_TESTS
testDir("MS PowerPoint 97",
- m_directories.getURLFromSrc("/sd/qa/unit/data/ppt/"),
+ m_directories.getURLFromSrc(u"/sd/qa/unit/data/ppt/"),
"sdfilt");
testDir("Impress Office Open XML",
- m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/"),
+ m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/"),
"", (SfxFilterFlags::IMPORT | SfxFilterFlags::ALIEN | SfxFilterFlags::STARONEFILTER));
testDir("impress8",
- m_directories.getURLFromSrc("/sd/qa/unit/data/odp/"),
+ m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/"),
"sdfilt");
testDir("draw8",
- m_directories.getURLFromSrc("/sd/qa/unit/data/odg/"),
+ m_directories.getURLFromSrc(u"/sd/qa/unit/data/odg/"),
"sdfilt");
testDir("CGM - Computer Graphics Metafile",
- m_directories.getURLFromSrc("/sd/qa/unit/data/cgm/"),
+ m_directories.getURLFromSrc(u"/sd/qa/unit/data/cgm/"),
"icg");
#endif
}
diff --git a/sd/qa/unit/import-tests-smartart.cxx b/sd/qa/unit/import-tests-smartart.cxx
index 369e51ae83f3..d63c21f7f5bb 100644
--- a/sd/qa/unit/import-tests-smartart.cxx
+++ b/sd/qa/unit/import-tests-smartart.cxx
@@ -173,7 +173,7 @@ public:
void SdImportTestSmartArt::testBase()
{
sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart1.pptx"), PPTX);
+ = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/smartart1.pptx"), PPTX);
uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef),
uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL(sal_Int32(6), xShapeGroup->getCount());
@@ -221,8 +221,8 @@ void SdImportTestSmartArt::testBase()
void SdImportTestSmartArt::testChildren()
{
- sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart-children.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(
+ m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/smartart-children.pptx"), PPTX);
uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef),
uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xShapeGroup->getCount());
@@ -261,7 +261,7 @@ void SdImportTestSmartArt::testChildren()
void SdImportTestSmartArt::testText()
{
sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart-text.pptx"), PPTX);
+ = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/smartart-text.pptx"), PPTX);
uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef),
uno::UNO_QUERY_THROW);
uno::Reference<drawing::XShapes> xShapeGroup2(xShapeGroup->getByIndex(1), uno::UNO_QUERY_THROW);
@@ -278,7 +278,7 @@ void SdImportTestSmartArt::testText()
void SdImportTestSmartArt::testCnt()
{
sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart-cnt.pptx"), PPTX);
+ = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/smartart-cnt.pptx"), PPTX);
uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef),
uno::UNO_QUERY_THROW);
sal_Int32 nCount = xShapeGroup->getCount();
@@ -297,7 +297,7 @@ void SdImportTestSmartArt::testCnt()
void SdImportTestSmartArt::testDir()
{
sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart-dir.pptx"), PPTX);
+ = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/smartart-dir.pptx"), PPTX);
uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef),
uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xShapeGroup->getCount());
@@ -311,8 +311,8 @@ void SdImportTestSmartArt::testDir()
void SdImportTestSmartArt::testMaxDepth()
{
- sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart-maxdepth.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(
+ m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/smartart-maxdepth.pptx"), PPTX);
uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef),
uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xShapeGroup->getCount());
@@ -332,8 +332,8 @@ void SdImportTestSmartArt::testMaxDepth()
void SdImportTestSmartArt::testRotation()
{
- sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart-rotation.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(
+ m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/smartart-rotation.pptx"), PPTX);
uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef),
uno::UNO_QUERY_THROW);
@@ -354,7 +354,7 @@ void SdImportTestSmartArt::testRotation()
void SdImportTestSmartArt::testTextAutoRotation()
{
sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart-autoTxRot.pptx"), PPTX);
+ m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/smartart-autoTxRot.pptx"), PPTX);
auto testText = [&](int pageNo, sal_Int32 txtNo, const OUString& expTx, sal_Int32 expShRot,
sal_Int32 expTxRot) {
@@ -454,7 +454,7 @@ void SdImportTestSmartArt::testPyramid()
void SdImportTestSmartArt::testChevron()
{
sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart-chevron.pptx"), PPTX);
+ = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/smartart-chevron.pptx"), PPTX);
uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef),
uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xShapeGroup->getCount());
@@ -481,7 +481,7 @@ void SdImportTestSmartArt::testChevron()
void SdImportTestSmartArt::testCycle()
{
sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-cycle.pptx"), PPTX);
+ = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/smartart-cycle.pptx"), PPTX);
uno::Reference<drawing::XShapes> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
CPPUNIT_ASSERT(xGroup.is());
@@ -539,7 +539,7 @@ void SdImportTestSmartArt::testMultidirectional()
// similar document as cycle, but arrows are pointing in both directions
sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-multidirectional.pptx"), PPTX);
+ m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/smartart-multidirectional.pptx"), PPTX);
uno::Reference<drawing::XShapes> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
CPPUNIT_ASSERT(xGroup.is());
@@ -578,7 +578,7 @@ void SdImportTestSmartArt::testSegmentedCycle()
void SdImportTestSmartArt::testBaseRtoL()
{
sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart-rightoleftblockdiagram.pptx"),
+ m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/smartart-rightoleftblockdiagram.pptx"),
PPTX);
uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef),
uno::UNO_QUERY_THROW);
@@ -628,7 +628,8 @@ void SdImportTestSmartArt::testBaseRtoL()
void SdImportTestSmartArt::testVerticalBoxList()
{
sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-vertical-box-list.pptx"), PPTX);
+ m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/smartart-vertical-box-list.pptx"),
+ PPTX);
uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef),
uno::UNO_QUERY_THROW);
// Without the accompanying fix in place, this test would have failed with
@@ -664,7 +665,7 @@ void SdImportTestSmartArt::testVerticalBoxList()
void SdImportTestSmartArt::testVerticalBracketList()
{
sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/vertical-bracket-list.pptx"), PPTX);
+ m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/vertical-bracket-list.pptx"), PPTX);
uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef),
uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), xShapeGroup->getCount());
@@ -681,7 +682,7 @@ void SdImportTestSmartArt::testVerticalBracketList()
void SdImportTestSmartArt::testTableList()
{
sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/table-list.pptx"), PPTX);
+ = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/table-list.pptx"), PPTX);
uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
CPPUNIT_ASSERT(xShapeGroup.is());
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(4), xShapeGroup->getCount());
@@ -713,7 +714,7 @@ void SdImportTestSmartArt::testTableList()
void SdImportTestSmartArt::testAccentProcess()
{
sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-accent-process.pptx"), PPTX);
+ m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/smartart-accent-process.pptx"), PPTX);
uno::Reference<drawing::XShapes> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
CPPUNIT_ASSERT(xGroup.is());
// 3 children: first pair, connector, second pair.
@@ -803,9 +804,10 @@ void SdImportTestSmartArt::testAccentProcess()
void SdImportTestSmartArt::testContinuousBlockProcess()
{
- sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-continuous-block-process.pptx"),
- PPTX);
+ sd::DrawDocShellRef xDocShRef
+ = loadURL(m_directories.getURLFromSrc(
+ u"/sd/qa/unit/data/pptx/smartart-continuous-block-process.pptx"),
+ PPTX);
uno::Reference<drawing::XShapes> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
CPPUNIT_ASSERT(xGroup.is());
// 3 children: diagram background, background arrow, foreground.
@@ -834,7 +836,7 @@ void SdImportTestSmartArt::testOrgChart()
{
// Simple org chart with 1 manager and 1 employee only.
sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-org-chart.pptx"), PPTX);
+ m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/smartart-org-chart.pptx"), PPTX);
uno::Reference<drawing::XShape> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
CPPUNIT_ASSERT(xGroup.is());
@@ -959,7 +961,7 @@ void SdImportTestSmartArt::testOrgChart()
void SdImportTestSmartArt::testCycleMatrix()
{
sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-cycle-matrix.pptx"), PPTX);
+ m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/smartart-cycle-matrix.pptx"), PPTX);
uno::Reference<drawing::XShape> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
CPPUNIT_ASSERT(xGroup.is());
@@ -1050,7 +1052,7 @@ void SdImportTestSmartArt::testCycleMatrix()
void SdImportTestSmartArt::testPictureStrip()
{
sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-picture-strip.pptx"), PPTX);
+ m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/smartart-picture-strip.pptx"), PPTX);
uno::Reference<drawing::XShape> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
CPPUNIT_ASSERT(xGroup.is());
@@ -1131,7 +1133,7 @@ void SdImportTestSmartArt::testPictureStrip()
void SdImportTestSmartArt::testInteropGrabBag()
{
sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-interopgrabbag.pptx"), PPTX);
+ m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/smartart-interopgrabbag.pptx"), PPTX);
uno::Reference<drawing::XShape> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
CPPUNIT_ASSERT(xGroup.is());
@@ -1151,7 +1153,7 @@ void SdImportTestSmartArt::testInteropGrabBag()
void SdImportTestSmartArt::testBackground()
{
sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-background.pptx"), PPTX);
+ m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/smartart-background.pptx"), PPTX);
uno::Reference<drawing::XShapes> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
CPPUNIT_ASSERT(xGroup.is());
@@ -1189,7 +1191,7 @@ void SdImportTestSmartArt::testBackgroundDrawingmlFallback()
sd::DrawDocShellRef xDocShRef
= loadURL(m_directories.getURLFromSrc(
- "/sd/qa/unit/data/pptx/smartart-background-drawingml-fallback.pptx"),
+ u"/sd/qa/unit/data/pptx/smartart-background-drawingml-fallback.pptx"),
PPTX);
uno::Reference<drawing::XShapes> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
CPPUNIT_ASSERT(xGroup.is());
@@ -1225,7 +1227,7 @@ void SdImportTestSmartArt::testBackgroundDrawingmlFallback()
void SdImportTestSmartArt::testCenterCycle()
{
sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-center-cycle.pptx"), PPTX);
+ m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/smartart-center-cycle.pptx"), PPTX);
uno::Reference<drawing::XShapes> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
CPPUNIT_ASSERT(xGroup.is());
@@ -1253,7 +1255,7 @@ void SdImportTestSmartArt::testCenterCycle()
void SdImportTestSmartArt::testFontSize()
{
sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-font-size.pptx"), PPTX);
+ m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/smartart-font-size.pptx"), PPTX);
uno::Reference<drawing::XShapes> xGroup1(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xShape1(xGroup1->getByIndex(1), uno::UNO_QUERY);
@@ -1283,7 +1285,7 @@ void SdImportTestSmartArt::testFontSize()
void SdImportTestSmartArt::testVerticalBlockList()
{
sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-vertical-block-list.pptx"),
+ m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/smartart-vertical-block-list.pptx"),
PPTX);
uno::Reference<drawing::XShapes> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
CPPUNIT_ASSERT(xGroup.is());
@@ -1329,7 +1331,7 @@ void SdImportTestSmartArt::testVerticalBlockList()
void SdImportTestSmartArt::testMissingBulletAndIndent()
{
sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-missing-bullet.pptx"), PPTX);
+ m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/smartart-missing-bullet.pptx"), PPTX);
uno::Reference<drawing::XShapes> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
uno::Reference<drawing::XShapes> xGroup1(xGroup->getByIndex(2), uno::UNO_QUERY);
uno::Reference<drawing::XShapes> xGroup2(xGroup1->getByIndex(0), uno::UNO_QUERY);
@@ -1362,7 +1364,7 @@ void SdImportTestSmartArt::testMissingBulletAndIndent()
void SdImportTestSmartArt::testBulletList()
{
sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-bullet-list.pptx"), PPTX);
+ m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/smartart-bullet-list.pptx"), PPTX);
uno::Reference<drawing::XShapes> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
CPPUNIT_ASSERT(xGroup.is());
@@ -1390,7 +1392,7 @@ void SdImportTestSmartArt::testBulletList()
void SdImportTestSmartArt::testRecursion()
{
sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-recursion.pptx"), PPTX);
+ m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/smartart-recursion.pptx"), PPTX);
uno::Reference<drawing::XShapes> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
uno::Reference<drawing::XShapes> xGroup1(xGroup->getByIndex(1), uno::UNO_QUERY);
@@ -1438,7 +1440,7 @@ void SdImportTestSmartArt::testDataFollow()
// they should be layouted differently - one horizontally and one vertically
sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-data-follow.pptx"), PPTX);
+ m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/smartart-data-follow.pptx"), PPTX);
uno::Reference<drawing::XShapes> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
@@ -1478,7 +1480,7 @@ void SdImportTestSmartArt::testDataFollow()
void SdImportTestSmartArt::testOrgChart2()
{
sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-org-chart2.pptx"), PPTX);
+ m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/smartart-org-chart2.pptx"), PPTX);
uno::Reference<drawing::XShape> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
uno::Reference<drawing::XShape> xShapeC1 = findChildShapeByText(xGroup, "C1");
@@ -1520,7 +1522,7 @@ void SdImportTestSmartArt::testOrgChart2()
void SdImportTestSmartArt::testTdf131553()
{
sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf131553.pptx"), PPTX);
+ = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf131553.pptx"), PPTX);
uno::Reference<drawing::XShape> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
const SdrPage* pPage = GetPage(1, xDocShRef);
@@ -1536,7 +1538,7 @@ void SdImportTestSmartArt::testTdf131553()
void SdImportTestSmartArt::testFillColorList()
{
sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/fill-color-list.pptx"), PPTX);
+ = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/fill-color-list.pptx"), PPTX);
uno::Reference<drawing::XShape> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
uno::Reference<drawing::XShape> xShape = getChildShape(getChildShape(xGroup, 1), 0);
uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY_THROW);
@@ -1571,7 +1573,7 @@ void SdImportTestSmartArt::testFillColorList()
void SdImportTestSmartArt::testTdf134221()
{
sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-tdf134221.pptx"), PPTX);
+ m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/smartart-tdf134221.pptx"), PPTX);
xDocShRef = saveAndReload(xDocShRef.get(), PPTX);
uno::Reference<drawing::XShape> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
uno::Reference<drawing::XShape> xShapeB = findChildShapeByText(xGroup, "B");
@@ -1587,7 +1589,7 @@ void SdImportTestSmartArt::testTdf134221()
void SdImportTestSmartArt::testLinearRule()
{
sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-linear-rule.pptx"), PPTX);
+ m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/smartart-linear-rule.pptx"), PPTX);
uno::Reference<drawing::XShape> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
// Last child, then first child inside that.
@@ -1625,7 +1627,7 @@ void SdImportTestSmartArt::testLinearRule()
void SdImportTestSmartArt::testLinearRuleVert()
{
sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-linear-rule-vert.pptx"), PPTX);
+ m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/smartart-linear-rule-vert.pptx"), PPTX);
uno::Reference<drawing::XShape> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
// Get the P1 shape.
@@ -1646,7 +1648,7 @@ void SdImportTestSmartArt::testLinearRuleVert()
void SdImportTestSmartArt::testAutofitSync()
{
sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-autofit-sync.pptx"), PPTX);
+ m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/smartart-autofit-sync.pptx"), PPTX);
uno::Reference<drawing::XShape> xDiagram(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
uno::Reference<drawing::XShape> xMiddle = getChildShape(xDiagram, 2);
@@ -1687,7 +1689,7 @@ void SdImportTestSmartArt::testSnakeRows()
// Load a smartart which contains a snake algorithm.
// The expected layout of the 6 children is a 3x2 grid.
sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-snake-rows.pptx"), PPTX);
+ m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/smartart-snake-rows.pptx"), PPTX);
uno::Reference<drawing::XShapes> xDiagram(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
// Collect position of the background and the real child shapes. First row and background has
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index bf8681502682..eefda64a9cd9 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -411,18 +411,18 @@ void SdImportTest::testDocumentLayout()
{
int const nUpdateMe = -1; // index of test we want to update; supposedly only when the test is created
- sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc( "/sd/qa/unit/data/" ) + OUString::createFromAscii( aFilesToCompare[i].pInput ), aFilesToCompare[i].nFormat );
+ sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc( u"/sd/qa/unit/data/" ) + OUString::createFromAscii( aFilesToCompare[i].pInput ), aFilesToCompare[i].nFormat );
if( aFilesToCompare[i].nExportType >= 0 )
xDocShRef = saveAndReload( xDocShRef.get(), aFilesToCompare[i].nExportType );
compareWithShapesDump( xDocShRef,
- OUString(m_directories.getPathFromSrc( "/sd/qa/unit/data/" ) + OUString::createFromAscii( aFilesToCompare[i].pDump )),
+ OUString(m_directories.getPathFromSrc( u"/sd/qa/unit/data/" ) + OUString::createFromAscii( aFilesToCompare[i].pDump )),
i == nUpdateMe );
}
}
void SdImportTest::testSmoketest()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/smoketest.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/smoketest.pptx"), PPTX);
SdDrawDocument *pDoc = xDocShRef->GetDoc();
CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
@@ -441,7 +441,7 @@ void SdImportTest::testSmoketest()
void SdImportTest::testN759180()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/n759180.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/n759180.pptx"), PPTX);
const SdrPage *pPage = GetPage( 1, xDocShRef );
@@ -470,7 +470,7 @@ void SdImportTest::testN759180()
void SdImportTest::testN862510_1()
{
- sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/n862510_1.pptx"), PPTX );
+ sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/n862510_1.pptx"), PPTX );
const SdrPage *pPage = GetPage( 1, xDocShRef );
{
@@ -492,7 +492,7 @@ void SdImportTest::testN862510_1()
void SdImportTest::testN862510_2()
{
- sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/n862510_2.pptx"), PPTX );
+ sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/n862510_2.pptx"), PPTX );
const SdrPage *pPage = GetPage( 1, xDocShRef );
{
@@ -509,7 +509,7 @@ void SdImportTest::testN862510_2()
void SdImportTest::testN862510_4()
{
- sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/n862510_4.pptx"), PPTX );
+ sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/n862510_4.pptx"), PPTX );
const SdrPage *pPage = GetPage( 1, xDocShRef );
{
@@ -531,7 +531,7 @@ void SdImportTest::testN862510_4()
void SdImportTest::testN828390_2()
{
- sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/n828390_2.pptx"), PPTX );
+ sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/n828390_2.pptx"), PPTX );
const SdrPage *pPage = GetPage( 1, xDocShRef );
SdrObject *pObj = pPage->GetObj(0);
@@ -546,7 +546,7 @@ void SdImportTest::testN828390_2()
void SdImportTest::testN828390_3()
{
- sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/n828390_3.pptx"), PPTX );
+ sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/n828390_3.pptx"), PPTX );
const SdrPage *pPage = GetPage( 1, xDocShRef );
SdrObject *pObj = pPage->GetObj(0);
@@ -567,7 +567,7 @@ void SdImportTest::testN828390_3()
void SdImportTest::testMasterPageStyleParent()
{
- sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/odp/masterpage_style_parent.odp"), ODP );
+ sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/masterpage_style_parent.odp"), ODP );
SdDrawDocument *pDoc = xDocShRef->GetDoc();
CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
@@ -603,7 +603,7 @@ void SdImportTest::testMasterPageStyleParent()
void SdImportTest::testGradientAngle()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odg/gradient-angle.fodg"), FODG);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odg/gradient-angle.fodg"), FODG);
uno::Reference<lang::XMultiServiceFactory> const xDoc(
xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY);
@@ -661,7 +661,7 @@ void SdImportTest::testGradientAngle()
void SdImportTest::testN778859()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/n778859.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/n778859.pptx"), PPTX);
const SdrPage *pPage = GetPage( 1, xDocShRef );
{
@@ -677,7 +677,7 @@ void SdImportTest::testN778859()
void SdImportTest::testFdo68594()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/ppt/fdo68594.ppt"), PPT);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/ppt/fdo68594.ppt"), PPT);
const SdrPage *pPage = &(GetPage( 1, xDocShRef )->TRG_GetMasterPage());
SdrObject *pObj = pPage->GetObj(1);
@@ -693,7 +693,7 @@ void SdImportTest::testFdo68594()
void SdImportTest::testPlaceholderPriority()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/ppt/placeholder-priority.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/ppt/placeholder-priority.pptx"), PPTX);
const SdrPage* pPage = GetPage( 1, xDocShRef );
CPPUNIT_ASSERT_EQUAL_MESSAGE("Missing placeholder", sal_uInt32(2), sal_uInt32(pPage->GetObjCount()));
@@ -712,7 +712,7 @@ void SdImportTest::testPlaceholderPriority()
void SdImportTest::testPptCrop()
{
sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/ppt/crop.ppt"), PPT);
+ = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/ppt/crop.ppt"), PPT);
uno::Reference<beans::XPropertySet> xPropertySet(
getShapeFromPage(/*nShape=*/1, /*nPage=*/0, xDocShRef));
@@ -729,7 +729,7 @@ void SdImportTest::testPptCrop()
void SdImportTest::testFdo72998()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/cshapes.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/cshapes.pptx"), PPTX);
const SdrPage *pPage = GetPage( 1, xDocShRef );
{
@@ -749,7 +749,7 @@ void SdImportTest::testFdo72998()
void SdImportTest::testFdo77027()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/fdo77027.odp"), ODP);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/fdo77027.odp"), ODP);
const SdrPage *pPage = GetPage( 1, xDocShRef );
{
@@ -770,7 +770,7 @@ void SdImportTest::testFdo77027()
void SdImportTest::testTdf97808()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/tdf97808.fodp"), FODP);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/tdf97808.fodp"), FODP);
uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(
xDocShRef->GetModel(), uno::UNO_QUERY);
@@ -799,7 +799,7 @@ void SdImportTest::testTdf97808()
}
void SdImportTest::testFillStyleNone()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/tdf123841.odg"), ODG);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/tdf123841.odg"), ODG);
const SdrPage* pPage = GetPage(1, xDocShRef);
const SdrObject* pObj = pPage->GetObj(0);
@@ -813,7 +813,7 @@ void SdImportTest::testFillStyleNone()
void SdImportTest::testFdo64512()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/fdo64512.odp"), ODP);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/fdo64512.odp"), ODP);
uno::Reference< drawing::XDrawPagesSupplier > xDoc(
xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW );
@@ -858,7 +858,7 @@ void SdImportTest::testFdo71075()
{
double values[] = { 12.0, 13.0, 14.0 };
css::uno::Any aAny;
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/fdo71075.odp"), ODP);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/fdo71075.odp"), ODP);
uno::Reference< beans::XPropertySet > xPropSet( getShapeFromPage( 0, 0, xDocShRef ) );
aAny = xPropSet->getPropertyValue( "Model" );
@@ -893,7 +893,7 @@ void SdImportTest::testFdo71075()
void SdImportTest::testStrictOOXML()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/strict_ooxml.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/strict_ooxml.pptx"), PPTX);
SdDrawDocument *pDoc = xDocShRef->GetDoc();
CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
@@ -904,7 +904,7 @@ void SdImportTest::testStrictOOXML()
void SdImportTest::testBnc870237()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/bnc870237.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/bnc870237.pptx"), PPTX);
const SdrPage *pPage = GetPage( 1, xDocShRef );
// Simulate a:ext inside dsp:txXfrm with changing the lower distance
@@ -921,7 +921,7 @@ void SdImportTest::testBnc870237()
void SdImportTest::testCreationDate()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/fdo71434.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/fdo71434.pptx"), PPTX);
uno::Reference<document::XDocumentPropertiesSupplier> xDocumentPropertiesSupplier(xDocShRef->GetModel(), uno::UNO_QUERY);
uno::Reference<document::XDocumentProperties> xDocumentProperties = xDocumentPropertiesSupplier->getDocumentProperties();
util::DateTime aDate = xDocumentProperties->getCreationDate();
@@ -934,7 +934,7 @@ void SdImportTest::testCreationDate()
void SdImportTest::testMultiColTexts()
{
- sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/multicol.pptx"), PPTX );
+ sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/multicol.pptx"), PPTX );
const SdrPage *pPage = GetPage( 1, xDocShRef );
sdr::table::SdrTableObj *pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(0));
@@ -962,7 +962,7 @@ void SdImportTest::testMultiColTexts()
void SdImportTest::testPredefinedTableStyle()
{
// 073A0DAA-6AF3-43AB-8588-CEC1D06C72B9 (Medium Style 2)
- sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/predefined-table-style.pptx"), PPTX );
+ sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/predefined-table-style.pptx"), PPTX );
const SdrPage *pPage = GetPage( 1, xDocShRef );
sdr::table::SdrTableObj *pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(0));
@@ -989,7 +989,7 @@ void SdImportTest::testPredefinedTableStyle()
void SdImportTest::testBnc887225()
{
- sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/bnc887225.pptx"), PPTX );
+ sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/bnc887225.pptx"), PPTX );
// In the document, lastRow and lastCol table properties are used.
// Make sure styles are set properly for individual cells.
@@ -1036,7 +1036,7 @@ void SdImportTest::testBnc584721_1()
{
// Title text shape on the master page contained wrong text.
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/bnc584721_1_2.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/bnc584721_1_2.pptx"), PPTX);
const SdrPage *pPage = &(GetPage( 1, xDocShRef )->TRG_GetMasterPage());
SdrObject *pObj = pPage->GetObj(0);
@@ -1051,7 +1051,7 @@ void SdImportTest::testBnc584721_2()
{
// Import created an extra/unneeded outliner shape on the master slide next to the imported title shape.
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/bnc584721_1_2.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/bnc584721_1_2.pptx"), PPTX);
const SdrPage *pPage = &(GetPage( 1, xDocShRef )->TRG_GetMasterPage());
CPPUNIT_ASSERT_EQUAL(size_t(1), pPage->GetObjCount());
@@ -1061,7 +1061,7 @@ void SdImportTest::testBnc584721_2()
void SdImportTest::testBnc591147()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/bnc591147.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/bnc591147.pptx"), PPTX);
// In the document, there are two slides with media files.
uno::Reference< drawing::XDrawPagesSupplier > xDoc(
@@ -1099,7 +1099,7 @@ void SdImportTest::testBnc584721_4()
{
// Black text was imported as white because of wrong caching mechanism
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/bnc584721_4.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/bnc584721_4.pptx"), PPTX);
uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 1, 1, xDocShRef ) );
// Get first paragraph of the text
@@ -1121,7 +1121,7 @@ void SdImportTest::testBnc904423()
{
// Here the problem was that different fill properties were applied in wrong order on the shape
// Right order: 1) master slide fill style, 2) theme, 3) direct formatting
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/bnc904423.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/bnc904423.pptx"), PPTX);
const SdrPage *pPage = GetPage( 1, xDocShRef );
// First shape's background color is defined on master slide
@@ -1170,7 +1170,7 @@ void SdImportTest::testShapeLineStyle()
{
// Here the problem was that different line properties were applied in wrong order on the shape
// Right order: 1) master slide line style, 2) theme, 3) direct formatting
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/ShapeLineProperties.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/ShapeLineProperties.pptx"), PPTX);
const SdrPage *pPage = GetPage( 1, xDocShRef );
// First shape's line style is defined on master slide
@@ -1232,7 +1232,7 @@ void SdImportTest::testShapeLineStyle()
void SdImportTest::testTableBorderLineStyle()
{
- sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tableBorderLineStyle.pptx"), PPTX );
+ sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tableBorderLineStyle.pptx"), PPTX );
// TODO: If you are working on improvement of table border line style
// support, then expect this unit test to fail.
@@ -1278,7 +1278,7 @@ void SdImportTest::testTableBorderLineStyle()
void SdImportTest::testBnc862510_6()
{
// Black text was imported instead of gray
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/bnc862510_6.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/bnc862510_6.pptx"), PPTX);
uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 0, 0, xDocShRef ) );
// Get first paragraph of the text
@@ -1299,7 +1299,7 @@ void SdImportTest::testBnc862510_6()
void SdImportTest::testBnc862510_7()
{
// Title shape's text was aligned to left instead of center.
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/bnc862510_7.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/bnc862510_7.pptx"), PPTX);
uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 0, 0, xDocShRef ) );
// Get first paragraph
@@ -1336,7 +1336,7 @@ void SdImportTest::testBnc862510_7()
void SdImportTest::testPDFImportShared()
{
comphelper::LibreOfficeKit::setActive();
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pdf/multipage.pdf"), PDF);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pdf/multipage.pdf"), PDF);
SdDrawDocument *pDoc = xDocShRef->GetDoc();
CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
@@ -1437,7 +1437,7 @@ void SdImportTest::testPDFImportSkipImages()
void SdImportTest::testBulletSuffix()
{
- sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/n83889.pptx"), PPTX );
+ sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/n83889.pptx"), PPTX );
// check suffix of the char bullet
const SdrPage *pPage = GetPage( 1, xDocShRef );
@@ -1453,7 +1453,7 @@ void SdImportTest::testBulletSuffix()
void SdImportTest::testBnc910045()
{
// Problem with table style which defines cell color with fill style
- sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/bnc910045.pptx"), PPTX );
+ sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/bnc910045.pptx"), PPTX );
const SdrPage *pPage = GetPage( 1, xDocShRef );
sdr::table::SdrTableObj *pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(0));
@@ -1471,7 +1471,7 @@ void SdImportTest::testBnc910045()
void SdImportTest::testRowHeight()
{
- sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/n80340.pptx"), PPTX );
+ sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/n80340.pptx"), PPTX );
const SdrPage *pPage = GetPage( 1, xDocShRef );
sdr::table::SdrTableObj *pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(0));
@@ -1486,7 +1486,7 @@ void SdImportTest::testRowHeight()
xDocShRef->DoClose();
- sd::DrawDocShellRef xDocShRef2 = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tablescale.pptx"), PPTX );
+ sd::DrawDocShellRef xDocShRef2 = loadURL( m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tablescale.pptx"), PPTX );
const SdrPage *pPage2 = GetPage( 1, xDocShRef2 );
sdr::table::SdrTableObj *pTableObj2 = dynamic_cast<sdr::table::SdrTableObj*>(pPage2->GetObj(0));
@@ -1508,7 +1508,7 @@ void SdImportTest::testRowHeight()
void SdImportTest::testTdf93830()
{
// Text shape offset was ignored
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf93830.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf93830.pptx"), PPTX);
uno::Reference< drawing::XDrawPage > xPage( getPage( 0, xDocShRef ) );
// Get the first text box from group shape
@@ -1525,7 +1525,7 @@ void SdImportTest::testTdf93830()
void SdImportTest::testTdf127129()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf127129.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf127129.pptx"), PPTX);
uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 0, 0, xDocShRef ) );
uno::Reference< text::XTextRange > xParagraph( getParagraphFromShape( 0, xShape ) );
uno::Reference< text::XTextRange > xRun( getRunFromParagraph( 0, xParagraph ) );
@@ -1545,7 +1545,7 @@ void SdImportTest::testTdf127129()
void SdImportTest::testTdf93097()
{
// Throwing metadata import aborted the filter, check that metadata is now imported.
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf93097.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf93097.pptx"), PPTX);
uno::Reference<document::XDocumentPropertiesSupplier> xDocumentPropertiesSupplier(xDocShRef->GetModel(), uno::UNO_QUERY);
uno::Reference<document::XDocumentProperties> xDocumentProperties = xDocumentPropertiesSupplier->getDocumentProperties();
CPPUNIT_ASSERT_EQUAL(OUString("ss"), xDocumentProperties->getTitle());
@@ -1554,7 +1554,7 @@ void SdImportTest::testTdf93097()
void SdImportTest::testTdf62255()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf62255.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf62255.pptx"), PPTX);
const SdrPage *pPage = GetPage( 1, xDocShRef );
sdr::table::SdrTableObj *pTableObj;
@@ -1580,7 +1580,7 @@ void SdImportTest::testTdf62255()
void SdImportTest::testTdf113163()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf113163.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf113163.pptx"), PPTX);
uno::Reference < uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
uno::Reference< drawing::XGraphicExportFilter > xGraphicExporter = drawing::GraphicExportFilter::create(xContext);
@@ -1631,7 +1631,7 @@ void SdImportTest::testTdf113163()
void SdImportTest::testTdf93124()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/ppt/tdf93124.ppt"), PPT);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/ppt/tdf93124.ppt"), PPT);
uno::Reference < uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
uno::Reference< drawing::XGraphicExportFilter > xGraphicExporter = drawing::GraphicExportFilter::create(xContext);
@@ -1746,7 +1746,7 @@ void SdImportTest::testTdf99729()
void SdImportTest::testTdf89927()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf89927.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf89927.pptx"), PPTX);
uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 0, 0, xDocShRef ) );
uno::Reference< text::XTextRange > xParagraph( getParagraphFromShape( 0, xShape ) );
uno::Reference< text::XTextRange > xRun( getRunFromParagraph( 0, xParagraph ) );
@@ -1761,7 +1761,7 @@ void SdImportTest::testTdf89927()
void SdImportTest::testTdf93868()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf93868.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf93868.pptx"), PPTX);
const SdrPage *pPage = &(GetPage( 1, xDocShRef )->TRG_GetMasterPage());
CPPUNIT_ASSERT_EQUAL(size_t(5), pPage->GetObjCount());
@@ -1773,7 +1773,7 @@ void SdImportTest::testTdf93868()
void SdImportTest::testTdf95932()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf95932.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf95932.pptx"), PPTX);
const SdrPage *pPage = GetPage( 1, xDocShRef );
SdrObject *const pObj = pPage->GetObj(2);
@@ -1791,7 +1791,7 @@ void SdImportTest::testTdf95932()
void SdImportTest::testTdf99030()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf99030.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf99030.pptx"), PPTX);
uno::Reference< drawing::XMasterPagesSupplier > xDoc(
xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW );
@@ -1814,7 +1814,7 @@ void SdImportTest::testTdf99030()
void SdImportTest::testTdf49561()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/ppt/tdf49561.ppt"), PPT);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/ppt/tdf49561.ppt"), PPT);
uno::Reference< drawing::XMasterPagesSupplier > xDoc(
xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW );
@@ -1840,7 +1840,7 @@ void SdImportTest::testTdf49561()
void SdImportTest::testTdf103473()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf103473.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf103473.pptx"), PPTX);
const SdrPage *pPage = GetPage(1, xDocShRef);
SdrTextObj *const pObj = dynamic_cast<SdrTextObj *const>(pPage->GetObj(0));
@@ -1856,7 +1856,7 @@ void SdImportTest::testTdf103473()
void SdImportTest::testAoo124143()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odg/ooo124143-1.odg"), ODG);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odg/ooo124143-1.odg"), ODG);
uno::Reference<beans::XPropertySet> const xImage(getShapeFromPage(0, 0, xDocShRef));
uno::Reference<drawing::XGluePointsSupplier> const xGPS(xImage, uno::UNO_QUERY);
@@ -1900,7 +1900,7 @@ void SdImportTest::testAoo124143()
void SdImportTest::testTdf103567()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf103567.odp"), ODP);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf103567.odp"), ODP);
for (int i = 0; i < 4; ++i)
{
uno::Reference<beans::XPropertySet> const xShape(getShapeFromPage(i, 0, xDocShRef));
@@ -1943,7 +1943,7 @@ void SdImportTest::testTdf103567()
void SdImportTest::testTdf103792()
{
// Title text shape on the actual slide contained no text neither a placeholder text.
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf103792.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf103792.pptx"), PPTX);
const SdrPage *pPage = GetPage(1, xDocShRef);
CPPUNIT_ASSERT_MESSAGE("No page found", pPage != nullptr);
@@ -1961,7 +1961,7 @@ void SdImportTest::testTdf103792()
void SdImportTest::testTdf103876()
{
// Title text shape's placeholder text did not inherit the corresponding text properties
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf103876.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf103876.pptx"), PPTX);
uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 0, 0, xDocShRef ) );
// Check paragraph alignment
@@ -1979,7 +1979,7 @@ void SdImportTest::testTdf103876()
void SdImportTest::testTdf79007()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf79007.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf79007.pptx"), PPTX);
uno::Reference<beans::XPropertySet> xShape1(getShapeFromPage(0, 0, xDocShRef));
CPPUNIT_ASSERT_MESSAGE("Not a shape", xShape1.is());
@@ -2034,7 +2034,7 @@ void SdImportTest::testTdf79007()
void SdImportTest::testTdf129686()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf129686.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf129686.pptx"), PPTX);
uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 0, 0, xDocShRef ) );
// Get first paragraph of the text
@@ -2055,7 +2055,7 @@ void SdImportTest::testTdf129686()
void SdImportTest::testTdf104015()
{
// Shape fill, line and effect properties were not inherited from master slide shape
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf104015.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf104015.pptx"), PPTX);
const SdrPage *pPage = GetPage( 1, xDocShRef );
CPPUNIT_ASSERT_MESSAGE("No page found", pPage != nullptr);
@@ -2093,7 +2093,7 @@ void SdImportTest::testTdf104015()
void SdImportTest::testTdf104201()
{
// Group shape properties did not overwrite the child shapes' fill
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf104201.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf104201.pptx"), PPTX);
const SdrPage *pPage = GetPage(1, xDocShRef);
CPPUNIT_ASSERT_MESSAGE("No page found", pPage != nullptr);
@@ -2126,7 +2126,7 @@ void SdImportTest::testTdf104201()
void SdImportTest::testTdf103477()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf103477.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf103477.pptx"), PPTX);
const SdrPage *pPage = GetPage( 1, xDocShRef );
@@ -2143,7 +2143,7 @@ void SdImportTest::testTdf103477()
void SdImportTest::testTdf105150()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf105150.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf105150.pptx"), PPTX);
const SdrPage* pPage = GetPage(1, xDocShRef);
const SdrObject* pObj = pPage->GetObj(1);
auto& rFillStyleItem = dynamic_cast<const XFillStyleItem&>(pObj->GetMergedItem(XATTR_FILLSTYLE));
@@ -2156,7 +2156,7 @@ void SdImportTest::testTdf105150()
void SdImportTest::testTdf123684()
{
sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf123684.pptx"), PPTX);
+ = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf123684.pptx"), PPTX);
const SdrPage* pPage = GetPage(1, xDocShRef);
const SdrObject* pObj = pPage->GetObj(0);
auto& rFillStyleItem
@@ -2169,7 +2169,7 @@ void SdImportTest::testTdf123684()
void SdImportTest::testTdf105150PPT()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/ppt/tdf105150.ppt"), PPT);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/ppt/tdf105150.ppt"), PPT);
const SdrPage* pPage = GetPage(1, xDocShRef);
const SdrObject* pObj = pPage->GetObj(1);
// This was drawing::FillStyle_NONE, the shape's mso_fillBackground was
@@ -2182,7 +2182,7 @@ void SdImportTest::testTdf105150PPT()
void SdImportTest::testTdf104445()
{
// Extra bullets were added to the first shape
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf104445.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf104445.pptx"), PPTX);
// First shape should not have bullet
{
@@ -2287,7 +2287,7 @@ bool SdImportTest::checkPattern(sd::DrawDocShellRef const & rDocRef, int nShapeN
*/
void SdImportTest::testPatternImport()
{
- sd::DrawDocShellRef xDocRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/ppt/FillPatterns.ppt"), PPT);
+ sd::DrawDocShellRef xDocRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/ppt/FillPatterns.ppt"), PPT);
std::vector<sal_uInt8> aExpectedPattern1 = {
1,0,0,0,0,0,0,0,
@@ -2564,7 +2564,7 @@ void SdImportTest::testPatternImport()
void SdImportTest::testTdf100926()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf100926.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf100926.pptx"), PPTX);
const SdrPage* pPage = GetPage(1, xDocShRef);
CPPUNIT_ASSERT(pPage != nullptr);
@@ -2590,7 +2590,7 @@ void SdImportTest::testTdf100926()
void SdImportTest::testTdf89064()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf89064.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf89064.pptx"), PPTX);
uno::Reference< presentation::XPresentationPage > xPage (getPage(0, xDocShRef), uno::UNO_QUERY_THROW);
uno::Reference< drawing::XDrawPage > xNotesPage (xPage->getNotesPage(), uno::UNO_SET_THROW);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), xNotesPage->getCount());
@@ -2602,7 +2602,7 @@ void SdImportTest::testTdf108925()
{
// Test document contains bulleting with too small bullet size (1%) which breaks the lower constraint
// So it should be converted to the lowest allowed value (25%).
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/tdf108925.odp"), ODP);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/tdf108925.odp"), ODP);
const SdrPage *pPage = GetPage(1, xDocShRef);
SdrTextObj *pTxtObj = dynamic_cast<SdrTextObj *>(pPage->GetObj(0));
CPPUNIT_ASSERT_MESSAGE("No text object", pTxtObj != nullptr);
@@ -2617,7 +2617,7 @@ void SdImportTest::testTdf108925()
void SdImportTest::testTdf109067()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf109067.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf109067.pptx"), PPTX);
uno::Reference< beans::XPropertySet > xShape(getShapeFromPage(0, 0, xDocShRef), uno::UNO_SET_THROW);
awt::Gradient gradient;
CPPUNIT_ASSERT(xShape->getPropertyValue("FillGradient") >>= gradient);
@@ -2628,7 +2628,7 @@ void SdImportTest::testTdf109067()
void SdImportTest::testTdf109187()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf109187.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf109187.pptx"), PPTX);
uno::Reference< beans::XPropertySet > xArrow1(getShapeFromPage(0, 0, xDocShRef), uno::UNO_SET_THROW);
awt::Gradient aGradient1;
CPPUNIT_ASSERT(xArrow1->getPropertyValue("FillGradient") >>= aGradient1);
@@ -2643,7 +2643,7 @@ void SdImportTest::testTdf109187()
void SdImportTest::testTdf108926()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf108926.ppt"), PPT);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf108926.ppt"), PPT);
uno::Reference< presentation::XPresentationPage > xPage (getPage(0, xDocShRef), uno::UNO_QUERY_THROW);
uno::Reference< drawing::XDrawPage > xNotesPage (xPage->getNotesPage(), uno::UNO_SET_THROW);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), xNotesPage->getCount());
@@ -2660,7 +2660,7 @@ void SdImportTest::testTdf108926()
void SdImportTest::testTdf100065()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf100065.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf100065.pptx"), PPTX);
uno::Reference< container::XIndexAccess > xGroupShape1(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY_THROW);
uno::Reference< beans::XPropertySet > xShape1(xGroupShape1->getByIndex(1), uno::UNO_QUERY_THROW);
@@ -2679,7 +2679,7 @@ void SdImportTest::testTdf100065()
void SdImportTest::testTdf90626()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf90626.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf90626.pptx"), PPTX);
const SdrPage *pPage = GetPage(1, xDocShRef);
SdrTextObj *pTxtObj = dynamic_cast<SdrTextObj *>(pPage->GetObj(1));
CPPUNIT_ASSERT_MESSAGE("No text object", pTxtObj != nullptr);
@@ -2696,7 +2696,7 @@ void SdImportTest::testTdf90626()
void SdImportTest::testTdf138148()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf138148.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf138148.pptx"), PPTX);
const SdrPage *pPage = GetPage(1, xDocShRef);
SdrTextObj *pTxtObj = dynamic_cast<SdrTextObj *>(pPage->GetObj(0));
CPPUNIT_ASSERT_MESSAGE("No text object", pTxtObj != nullptr);
@@ -2720,7 +2720,7 @@ void SdImportTest::testTdf114488()
{
// This doc has two images - one WMF and the other PNG (fallback image).
// When loading this doc, the WMF image should be preferred over the PNG image.
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odg/tdf114488.fodg"), FODG);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odg/tdf114488.fodg"), FODG);
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0, xDocShRef), uno::UNO_SET_THROW);
uno::Reference<graphic::XGraphic> xGraphic;
xShape->getPropertyValue("Graphic") >>= xGraphic;
@@ -2733,7 +2733,7 @@ void SdImportTest::testTdf114488()
void SdImportTest::testTdf134174()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf134174.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf134174.pptx"), PPTX);
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0, xDocShRef), uno::UNO_SET_THROW);
CPPUNIT_ASSERT(xShape.is());
@@ -2750,7 +2750,7 @@ void SdImportTest::testTdf134174()
void SdImportTest::testTdf114913()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf114913.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf114913.pptx"), PPTX);
SdrTextObj *pTxtObj = dynamic_cast<SdrTextObj *>(GetPage(1, xDocShRef)->GetObj(1));
CPPUNIT_ASSERT_MESSAGE("No text object", pTxtObj != nullptr);
const SvxNumBulletItem *pItem = pTxtObj->GetOutlinerParaObject()->GetTextObject().GetParaAttribs(0).GetItem(EE_PARA_NUMBULLET);
@@ -2763,7 +2763,7 @@ void SdImportTest::testTdf114913()
void SdImportTest::testTdf114821()
{
css::uno::Any aAny;
- sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc( "/sd/qa/unit/data/pptx/tdf114821.pptx" ), PPTX );
+ sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc( u"/sd/qa/unit/data/pptx/tdf114821.pptx" ), PPTX );
uno::Reference< beans::XPropertySet > xPropSet( getShapeFromPage( 0, 0, xDocShRef ) );
aAny = xPropSet->getPropertyValue( "Model" );
@@ -2809,7 +2809,7 @@ void SdImportTest::testTdf114821()
void SdImportTest::testTdf115394()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf115394.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf115394.pptx"), PPTX);
double fTransitionDuration;
// Slow in MS formats
@@ -2841,7 +2841,7 @@ void SdImportTest::testTdf115394()
void SdImportTest::testTdf115394PPT()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/ppt/tdf115394.ppt"), PPT);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/ppt/tdf115394.ppt"), PPT);
double fTransitionDuration;
// Fast
@@ -2865,7 +2865,7 @@ void SdImportTest::testTdf115394PPT()
void SdImportTest::testTdf51340()
{
// Line spacing was not inherited from upper levels (slide layout, master slide)
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf51340.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf51340.pptx"), PPTX);
uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 1, 0, xDocShRef ) );
// First paragraph has a 90% line spacing set on master slide
@@ -2904,7 +2904,7 @@ void SdImportTest::testTdf116899()
{
// This is a PPT created in Impress and roundtripped in PP, the key times become [1, -1] in PP,
// a time of -1 (-1000) in PPT means key times have to be distributed evenly between 0 and 1
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/ppt/tdf116899.ppt"), PPT);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/ppt/tdf116899.ppt"), PPT);
uno::Reference< drawing::XDrawPagesSupplier > xDoc(
xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW );
@@ -2927,7 +2927,7 @@ void SdImportTest::testTdf116899()
void SdImportTest::testTdf77747()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/ppt/tdf77747.ppt"), PPT);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/ppt/tdf77747.ppt"), PPT);
CPPUNIT_ASSERT(xDocShRef.is());
SdrTextObj *pTxtObj = dynamic_cast<SdrTextObj *>(GetPage(1, xDocShRef)->GetObj(0));
CPPUNIT_ASSERT_MESSAGE("No text object", pTxtObj != nullptr);
@@ -2942,7 +2942,7 @@ void SdImportTest::testTdf77747()
void SdImportTest::testTdf116266()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf116266.odp"), ODP);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf116266.odp"), ODP);
SdDrawDocument *pDoc = xDocShRef->GetDoc();
sfx2::LinkManager* rLinkManager = pDoc->GetLinkManager();
// The document contains one SVG stored as a link.
@@ -2955,7 +2955,7 @@ void SdImportTest::testTdf120028()
{
// Check that the table shape has 4 columns.
::sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf120028.pptx"), PPTX);
+ = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf120028.pptx"), PPTX);
uno::Reference<drawing::XDrawPagesSupplier> xDoc(xDocShRef->GetDoc()->getUnoModel(),
uno::UNO_QUERY);
CPPUNIT_ASSERT(xDoc.is());
@@ -2991,7 +2991,7 @@ void SdImportTest::testTdf120028b()
{
// Check that the table shape has 4 columns.
::sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf120028b.pptx"), PPTX);
+ = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf120028b.pptx"), PPTX);
uno::Reference<drawing::XDrawPagesSupplier> xDoc(xDocShRef->GetDoc()->getUnoModel(),
uno::UNO_QUERY);
CPPUNIT_ASSERT(xDoc.is());
@@ -3027,7 +3027,7 @@ void SdImportTest::testTdf120028b()
void SdImportTest::testDescriptionImport()
{
sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/altdescription.pptx"), PPTX);
+ = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/altdescription.pptx"), PPTX);
uno::Reference<beans::XPropertySet> xPropertySet(
getShapeFromPage(/*nShape=*/2, /*nPage=*/0, xDocShRef));
@@ -3068,7 +3068,7 @@ void SdImportTest::testTdf83247()
void SdImportTest::testTdf47365()
{
sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/loopNoPause.pptx"), PPTX);
+ = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/loopNoPause.pptx"), PPTX);
uno::Reference<presentation::XPresentationSupplier> xPresentationSupplier(
xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW);
uno::Reference<beans::XPropertySet> xPresentationProps(xPresentationSupplier->getPresentation(),
@@ -3090,7 +3090,7 @@ void SdImportTest::testTdf122899()
// Error was, that the path coordinates of a mso_sptArc shape were read as sal_Int16
// although they are unsigned 16 bit. This leads to wrong positions of start and end
// point and results to a huge shape width in the test document.
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/ppt/tdf122899_Arc_90_to_91_clockwise.ppt"), PPT);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/ppt/tdf122899_Arc_90_to_91_clockwise.ppt"), PPT);
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(
xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_MESSAGE("Could not get XDrawPagesSupplier", xDrawPagesSupplier.is());
@@ -3112,7 +3112,7 @@ void SdImportTest::testTdf122899()
void SdImportTest::testOOXTheme()
{
sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/ooxtheme.pptx"), PPTX);
+ = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/ooxtheme.pptx"), PPTX);
uno::Reference<beans::XPropertySet> xPropSet(xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW);
uno::Sequence<beans::PropertyValue> aGrabBag;
@@ -3137,7 +3137,7 @@ void SdImportTest::testOOXTheme()
void SdImportTest::testCropToShape()
{
sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/crop-to-shape.pptx"), PPTX);
+ = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/crop-to-shape.pptx"), PPTX);
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(
xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_MESSAGE("Could not get XDrawPagesSupplier", xDrawPagesSupplier.is());
@@ -3159,7 +3159,7 @@ void SdImportTest::testCropToShape()
void SdImportTest::testTdf127964()
{
sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf127964.pptx"), PPTX);
+ = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf127964.pptx"), PPTX);
const SdrPage* pPage = GetPage(1, xDocShRef);
const SdrObject* pObj = pPage->GetObj(0);
auto& rFillStyleItem
@@ -3180,7 +3180,7 @@ void SdImportTest::testTdf127964()
void SdImportTest::testTdf106638()
{
sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf106638.pptx"), PPTX);
+ = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf106638.pptx"), PPTX);
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0, xDocShRef));
uno::Reference<text::XTextRange> const xPara(getParagraphFromShape(1, xShape));
uno::Reference<text::XText> xText= xPara->getText();
@@ -3201,7 +3201,7 @@ void SdImportTest::testTdf106638()
void SdImportTest::testTdf128684()
{
sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf128684.pptx"), PPTX);
+ = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf128684.pptx"), PPTX);
uno::Reference<drawing::XDrawPagesSupplier> xDoc(xDocShRef->GetDoc()->getUnoModel(),
uno::UNO_QUERY);
CPPUNIT_ASSERT(xDoc.is());
@@ -3227,7 +3227,7 @@ void SdImportTest::testTdf128684()
void SdImportTest::testTdf113198()
{
sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf113198.pptx"), PPTX);
+ = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf113198.pptx"), PPTX);
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0, xDocShRef));
sal_Int16 nParaAdjust = -1;
@@ -3238,7 +3238,7 @@ void SdImportTest::testTdf113198()
void SdImportTest::testTdf49856()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/ppt/tdf49856.ppt"), PPT);
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/ppt/tdf49856.ppt"), PPT);
const SdrPage *pPage = GetPage(1, xDocShRef);
SdrTextObj *pTxtObj = dynamic_cast<SdrTextObj *>(pPage->GetObj(1));
CPPUNIT_ASSERT_MESSAGE("No text object", pTxtObj != nullptr);
@@ -3255,7 +3255,8 @@ void SdImportTest::testTdf49856()
void SdImportTest::testShapeGlowEffectPPTXImpoer()
{
sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/shape-glow-effect.pptx"), PPTX);
+ = loadURL(
+ m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/shape-glow-effect.pptx"), PPTX);
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0, xDocShRef));
sal_Int32 nRadius = -1;
@@ -3272,7 +3273,7 @@ void SdImportTest::testShapeGlowEffectPPTXImpoer()
void SdImportTest::testShapeBlurPPTXImport()
{
sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/shape-blur-effect.pptx"), PPTX);
+ = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/shape-blur-effect.pptx"), PPTX);
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0, xDocShRef));
bool bHasShadow = false;
diff --git a/sd/qa/unit/layout-tests.cxx b/sd/qa/unit/layout-tests.cxx
index 5fe1a5a4b6de..7498f24227ac 100644
--- a/sd/qa/unit/layout-tests.cxx
+++ b/sd/qa/unit/layout-tests.cxx
@@ -27,7 +27,7 @@ public:
void SdLayoutTest::testTdf104722()
{
sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf104722.pptx"), PPTX);
+ = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf104722.pptx"), PPTX);
std::shared_ptr<GDIMetaFile> xMetaFile = xDocShRef->GetPreviewMetaFile();
MetafileXmlDump dumper;
@@ -48,7 +48,7 @@ void SdLayoutTest::testTdf104722()
void SdLayoutTest::testTdf136949()
{
sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf136949.odp"), ODP);
+ = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf136949.odp"), ODP);
std::shared_ptr<GDIMetaFile> xMetaFile = xDocShRef->GetPreviewMetaFile();
MetafileXmlDump dumper;
@@ -68,7 +68,7 @@ void SdLayoutTest::testTdf136949()
void SdLayoutTest::testTdf128212()
{
sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf128212.pptx"), PPTX);
+ = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf128212.pptx"), PPTX);
std::shared_ptr<GDIMetaFile> xMetaFile = xDocShRef->GetPreviewMetaFile();
MetafileXmlDump dumper;
diff --git a/sd/qa/unit/misc-tests.cxx b/sd/qa/unit/misc-tests.cxx
index 52c3b55513be..078c9b19a19b 100644
--- a/sd/qa/unit/misc-tests.cxx
+++ b/sd/qa/unit/misc-tests.cxx
@@ -200,7 +200,7 @@ void SdMiscTest::testTdf96206()
{
// Copying/pasting slide referring to a non-default master with a text duplicated the master
- sd::DrawDocShellRef xDocSh = Load(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf96206.odp"), ODP);
+ sd::DrawDocShellRef xDocSh = Load(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf96206.odp"), ODP);
sd::ViewShell *pViewShell = xDocSh->GetViewShell();
auto pSSVS = sd::slidesorter::SlideSorterViewShell::GetSlideSorter(pViewShell->GetViewShellBase());
auto& rSSController = pSSVS->GetSlideSorter().GetController();
@@ -217,7 +217,7 @@ void SdMiscTest::testTdf96206()
void SdMiscTest::testTdf96708()
{
- sd::DrawDocShellRef xDocSh = Load(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf96708.odp"), ODP);
+ sd::DrawDocShellRef xDocSh = Load(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf96708.odp"), ODP);
sd::ViewShell *pViewShell = xDocSh->GetViewShell();
auto pSSVS = sd::slidesorter::SlideSorterViewShell::GetSlideSorter(pViewShell->GetViewShellBase());
auto& rSSController = pSSVS->GetSlideSorter().GetController();
@@ -242,7 +242,7 @@ void SdMiscTest::testTdf96708()
void SdMiscTest::testTdf99396()
{
// Load the document and select the table.
- sd::DrawDocShellRef xDocSh = Load(m_directories.getURLFromSrc("/sd/qa/unit/data/tdf99396.odp"), ODP);
+ sd::DrawDocShellRef xDocSh = Load(m_directories.getURLFromSrc(u"/sd/qa/unit/data/tdf99396.odp"), ODP);
sd::ViewShell *pViewShell = xDocSh->GetViewShell();
SdPage* pPage = pViewShell->GetActualPage();
SdrObject* pObject = pPage->GetObj(0);
@@ -266,7 +266,7 @@ void SdMiscTest::testTdf99396()
void SdMiscTest::testTdf99396TextEdit()
{
// Load the document and select the table.
- sd::DrawDocShellRef xDocSh = Load(m_directories.getURLFromSrc("/sd/qa/unit/data/tdf99396.odp"), ODP);
+ sd::DrawDocShellRef xDocSh = Load(m_directories.getURLFromSrc(u"/sd/qa/unit/data/tdf99396.odp"), ODP);
sd::ViewShell* pViewShell = xDocSh->GetViewShell();
SdPage* pPage = pViewShell->GetActualPage();
auto pTableObject = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(0));
@@ -458,7 +458,7 @@ void SdMiscTest::testTdf120527()
uno::Reference<container::XNameContainer> xBitmaps(
xFactory->createInstance("com.sun.star.drawing.BitmapTable"), uno::UNO_QUERY);
CPPUNIT_ASSERT(xBitmaps.is());
- OUString aGraphicURL = m_directories.getURLFromSrc("/sd/qa/unit/data/tdf120527.jpg");
+ OUString aGraphicURL = m_directories.getURLFromSrc(u"/sd/qa/unit/data/tdf120527.jpg");
xBitmaps->insertByName("test", uno::makeAny(aGraphicURL));
// Create a graphic.
@@ -505,7 +505,7 @@ void SdMiscTest::testTdf101242_ODF_add_settings()
// only in the ODF attributes draw:display and draw:protected. The resaved document
// should still have the ODF attributes and in addition the config items in settings.xml.
// "Load" is needed for to handle layers, simple "loadURL" does not work.
- sd::DrawDocShellRef xDocShRef = Load(m_directories.getURLFromSrc("/sd/qa/unit/data/tdf101242_ODF.odg"), ODG);
+ sd::DrawDocShellRef xDocShRef = Load(m_directories.getURLFromSrc(u"/sd/qa/unit/data/tdf101242_ODF.odg"), ODG);
CPPUNIT_ASSERT_MESSAGE("Failed to load file.", xDocShRef.is());
// Saving including items in settings.xml
@@ -555,7 +555,7 @@ void SdMiscTest::testTdf101242_ODF_no_settings()
// Loads a document, which has the visible/printable/locked information for layers
// only in the ODF attributes draw:display and draw:protected. The resave document
// should have only the ODF attributes and no config items in settings.xml.
- sd::DrawDocShellRef xDocShRef = Load(m_directories.getURLFromSrc("/sd/qa/unit/data/tdf101242_ODF.odg"), ODG);
+ sd::DrawDocShellRef xDocShRef = Load(m_directories.getURLFromSrc(u"/sd/qa/unit/data/tdf101242_ODF.odg"), ODG);
CPPUNIT_ASSERT_MESSAGE("Failed to load file.", xDocShRef.is());
// Saving without items in settings.xml
@@ -597,7 +597,7 @@ void SdMiscTest::testTdf101242_settings_keep()
// only in the config items in settings.xml. That is the case for all old documents.
// The resaved document should have the ODF attributes draw:display and draw:protected
// and should still have these config items in settings.xml.
- sd::DrawDocShellRef xDocShRef = Load(m_directories.getURLFromSrc("/sd/qa/unit/data/tdf101242_settings.odg"), ODG);
+ sd::DrawDocShellRef xDocShRef = Load(m_directories.getURLFromSrc(u"/sd/qa/unit/data/tdf101242_settings.odg"), ODG);
CPPUNIT_ASSERT_MESSAGE("Failed to load file.", xDocShRef.is());
// Saving including items in settings.xml
@@ -648,7 +648,7 @@ void SdMiscTest::testTdf101242_settings_remove()
// only in the config items in settings.xml. That is the case for all old documents.
// The resaved document should have only the ODF attributes draw:display and draw:protected
// and should have no config items in settings.xml.
- sd::DrawDocShellRef xDocShRef = Load(m_directories.getURLFromSrc("/sd/qa/unit/data/tdf101242_settings.odg"), ODG);
+ sd::DrawDocShellRef xDocShRef = Load(m_directories.getURLFromSrc(u"/sd/qa/unit/data/tdf101242_settings.odg"), ODG);
CPPUNIT_ASSERT_MESSAGE("Failed to load file.", xDocShRef.is());
// Saving without config items in settings.xml
@@ -693,7 +693,7 @@ void SdMiscTest::testTdf119392()
officecfg::Office::Common::Misc::WriteLayerStateAsConfigItem::set(true, batch);
batch->commit();
- sd::DrawDocShellRef xDocShRef = Load(m_directories.getURLFromSrc("sd/qa/unit/data/tdf119392_InsertLayer.odg"), ODG);
+ sd::DrawDocShellRef xDocShRef = Load(m_directories.getURLFromSrc(u"sd/qa/unit/data/tdf119392_InsertLayer.odg"), ODG);
CPPUNIT_ASSERT_MESSAGE("Failed to load file.", xDocShRef.is());
// Insert layer "-P-", not visible, printable, not locked
SdrView* pView = xDocShRef -> GetViewShell()->GetView();
@@ -738,7 +738,7 @@ void SdMiscTest::testTdf67248()
// The document tdf67248.odg has been created with a German UI. It has a user layer named "Background".
// On opening the user layer must still exists. The error was, that it was merged into the standard
// layer "background".
- sd::DrawDocShellRef xDocShRef = Load(m_directories.getURLFromSrc("sd/qa/unit/data/tdf67248.odg"), ODG);
+ sd::DrawDocShellRef xDocShRef = Load(m_directories.getURLFromSrc(u"sd/qa/unit/data/tdf67248.odg"), ODG);
CPPUNIT_ASSERT_MESSAGE("Failed to load file.", xDocShRef.is());
SdrLayerAdmin& rLayerAdmin = xDocShRef->GetDoc()->GetLayerAdmin();
CPPUNIT_ASSERT_EQUAL( sal_uInt16(6), rLayerAdmin.GetLayerCount());
@@ -748,7 +748,7 @@ void SdMiscTest::testTdf67248()
void SdMiscTest::testTdf119956()
{
- sd::DrawDocShellRef xDocShRef = Load(m_directories.getURLFromSrc("sd/qa/unit/data/tdf119956.odg"), ODG);
+ sd::DrawDocShellRef xDocShRef = Load(m_directories.getURLFromSrc(u"sd/qa/unit/data/tdf119956.odg"), ODG);
CPPUNIT_ASSERT_MESSAGE("Failed to load file.", xDocShRef.is());
sd::GraphicViewShell* pGraphicViewShell = static_cast<sd::GraphicViewShell*>(xDocShRef -> GetViewShell());
CPPUNIT_ASSERT(pGraphicViewShell);
@@ -787,7 +787,7 @@ void SdMiscTest::testTdf119956()
void SdMiscTest::testTdf98839_ShearVFlipH()
{
// Loads a document with a sheared shape and mirrors it
- sd::DrawDocShellRef xDocShRef = Load(m_directories.getURLFromSrc("sd/qa/unit/data/tdf98839_ShearVFlipH.odg"), ODG);
+ sd::DrawDocShellRef xDocShRef = Load(m_directories.getURLFromSrc(u"sd/qa/unit/data/tdf98839_ShearVFlipH.odg"), ODG);
sd::GraphicViewShell* pViewShell = static_cast<sd::GraphicViewShell*>(xDocShRef->GetViewShell());
SdPage* pPage = pViewShell->GetActualPage();
SdrObjCustomShape* pShape = static_cast<SdrObjCustomShape*>(pPage->GetObj(0));
@@ -811,7 +811,7 @@ void SdMiscTest::testTdf98839_ShearVFlipH()
void SdMiscTest::testTdf130988()
{
- sd::DrawDocShellRef xDocShRef = Load(m_directories.getURLFromSrc("sd/qa/unit/data/tdf130988_3D_create_lathe.odg"), ODG);
+ sd::DrawDocShellRef xDocShRef = Load(m_directories.getURLFromSrc(u"sd/qa/unit/data/tdf130988_3D_create_lathe.odg"), ODG);
//emulate command .uno:ConvertInto3DLathe
sd::ViewShell* pViewShell = xDocShRef->GetViewShell();
@@ -832,7 +832,7 @@ void SdMiscTest::testTdf130988()
void SdMiscTest::testTdf131033()
{
- sd::DrawDocShellRef xDocShRef = Load(m_directories.getURLFromSrc("sd/qa/unit/data/tdf131033_3D_SceneSizeIn2d.odg"), ODG);
+ sd::DrawDocShellRef xDocShRef = Load(m_directories.getURLFromSrc(u"sd/qa/unit/data/tdf131033_3D_SceneSizeIn2d.odg"), ODG);
// The document contains a polygon, so that emulate command .uno:ConvertInto3DLathe
// by direct call of ConvertMarkedObjTo3D works.
@@ -857,7 +857,7 @@ void SdMiscTest::testTdf129898LayerDrawnInSlideshow()
{
// Versions LO 6.2 to 6.4 have produced files, where the layer DrawnInSlideshow has
// got visible=false and printable=false attributes. Those files should be repaired now.
- sd::DrawDocShellRef xDocShRef = Load(m_directories.getURLFromSrc("sd/qa/unit/data/tdf129898_faulty_DrawnInSlideshow.odp"), ODP);
+ sd::DrawDocShellRef xDocShRef = Load(m_directories.getURLFromSrc(u"sd/qa/unit/data/tdf129898_faulty_DrawnInSlideshow.odp"), ODP);
CPPUNIT_ASSERT_MESSAGE("Failed to load file.", xDocShRef.is());
// Verify model
diff --git a/sd/qa/unit/sdmodeltestbase.hxx b/sd/qa/unit/sdmodeltestbase.hxx
index f2dd51b58b20..4b715d029bbd 100644
--- a/sd/qa/unit/sdmodeltestbase.hxx
+++ b/sd/qa/unit/sdmodeltestbase.hxx
@@ -341,7 +341,7 @@ protected:
OUStringToOString(aString, RTL_TEXTENCODING_UTF8).getStr(),
static_cast<int>(aString.getLength()),
OUStringToOString(
- m_directories.getPathFromSrc("/sd/qa/unit/data/tolerance.xml"),
+ m_directories.getPathFromSrc(u"/sd/qa/unit/data/tolerance.xml"),
RTL_TEXTENCODING_UTF8).getStr());
}
}
diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx
index 2b4dc6c10c51..56165d350009 100644
--- a/sd/qa/unit/uiimpress.cxx
+++ b/sd/qa/unit/uiimpress.cxx
@@ -85,7 +85,7 @@ void SdUiImpressTest::checkCurrentPageNumber(sal_uInt16 nNum)
CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf111522)
{
// Load the document and create two new windows.
- mxComponent = loadFromDesktop(m_directories.getURLFromSrc("sd/qa/unit/data/tdf111522.odp"));
+ mxComponent = loadFromDesktop(m_directories.getURLFromSrc(u"sd/qa/unit/data/tdf111522.odp"));
auto pImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
sd::ViewShell* pViewShell = pImpressDocument->GetDocShell()->GetViewShell();
pViewShell->GetViewFrame()->GetDispatcher()->Execute(SID_NEWWINDOW, SfxCallMode::SYNCHRON);
@@ -148,7 +148,7 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf111522)
CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf126197)
{
// Load the document and create two new windows.
- mxComponent = loadFromDesktop(m_directories.getURLFromSrc("sd/qa/unit/data/tdf126197.odp"));
+ mxComponent = loadFromDesktop(m_directories.getURLFromSrc(u"sd/qa/unit/data/tdf126197.odp"));
auto pImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
sd::ViewShell* pViewShell = pImpressDocument->GetDocShell()->GetViewShell();
pViewShell->GetViewFrame()->GetDispatcher()->Execute(SID_NEWWINDOW, SfxCallMode::SYNCHRON);
@@ -183,7 +183,7 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf128651)
// extrusion on/off, shadow on/off, changes on line or fill attributes.
// All these actions do not change the snap rectangle.
mxComponent = loadFromDesktop(
- m_directories.getURLFromSrc("sd/qa/unit/data/tdf128651_CustomShapeUndo.odp"));
+ m_directories.getURLFromSrc(u"sd/qa/unit/data/tdf128651_CustomShapeUndo.odp"));
auto pXImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
SdPage* pActualPage = pViewShell->GetActualPage();
@@ -292,7 +292,7 @@ void dispatchCommand(const uno::Reference<lang::XComponent>& xComponent, const O
CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testPageFillColor)
{
// Load the document and create two new windows.
- mxComponent = loadFromDesktop(m_directories.getURLFromSrc("sd/qa/unit/data/tdf126197.odp"));
+ mxComponent = loadFromDesktop(m_directories.getURLFromSrc(u"sd/qa/unit/data/tdf126197.odp"));
auto pImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
sd::ViewShell* pViewShell = pImpressDocument->GetDocShell()->GetViewShell();
@@ -318,7 +318,7 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testPageFillColor)
CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testPageFillGradient)
{
// Load the document and create two new windows.
- mxComponent = loadFromDesktop(m_directories.getURLFromSrc("sd/qa/unit/data/tdf126197.odp"));
+ mxComponent = loadFromDesktop(m_directories.getURLFromSrc(u"sd/qa/unit/data/tdf126197.odp"));
auto pImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
sd::ViewShell* pViewShell = pImpressDocument->GetDocShell()->GetViewShell();
@@ -350,7 +350,7 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf134053)
{
// Error was, that dashes and dots were longer than in MS Office.
mxComponent = loadFromDesktop(
- m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf134053_dashdot.pptx"));
+ m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf134053_dashdot.pptx"));
auto pXImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
SdPage* pActualPage = pViewShell->GetActualPage();
@@ -392,7 +392,7 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf134053)
CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testSpellOnlineParameter)
{
- mxComponent = loadFromDesktop(m_directories.getURLFromSrc("sd/qa/unit/data/empty.fodp"));
+ mxComponent = loadFromDesktop(m_directories.getURLFromSrc(u"sd/qa/unit/data/empty.fodp"));
auto pImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
bool bSet = pImpressDocument->GetDoc()->GetOnlineSpell();
diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx
index 566909a4240a..1603e9b8d9e8 100644
--- a/sd/source/core/drawdoc2.cxx
+++ b/sd/source/core/drawdoc2.cxx
@@ -264,9 +264,9 @@ void SdDrawDocument::UpdatePageObjectsInNotes(sal_uInt16 nStartPos)
}
}
-void SdDrawDocument::UpdatePageRelativeURLs(const OUString& rOldName, const OUString& rNewName)
+void SdDrawDocument::UpdatePageRelativeURLs(const OUString& rOldName, std::u16string_view rNewName)
{
- if (rNewName.isEmpty())
+ if (rNewName.empty())
return;
SfxItemPool& rPool(GetPool());
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index a09abf0ecf57..e48117625dfe 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -1367,7 +1367,7 @@ static OUString createNewMasterPageLayoutName(const SdDrawDocument& rDoc)
}
void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
- const OUString& rLayoutName,
+ std::u16string_view rLayoutName,
SdDrawDocument* pSourceDoc,
bool bMaster,
bool bCheckMasters)
@@ -1408,7 +1408,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
bool bLayoutReloaded = false; // Was ex. layout reloaded?
// LayoutName, Page and Notes page
- if (rLayoutName.isEmpty())
+ if (rLayoutName.empty())
{
// No LayoutName: take first MasterPage
pMaster = pSourceDoc->GetMasterSdPage(0, PageKind::Standard);
@@ -1416,7 +1416,8 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
}
else
{
- OUString aSearchFor = rLayoutName + SD_LT_SEPARATOR STR_LAYOUT_OUTLINE;
+ OUString aSearchFor
+ = OUString::Concat(rLayoutName) + SD_LT_SEPARATOR STR_LAYOUT_OUTLINE;
for (sal_uInt16 nMP = 0; nMP < pSourceDoc->GetMasterPageCount(); ++nMP)
{
diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx
index 142b40a6bb25..6680bdde7fc6 100644
--- a/sd/source/core/sdpage2.cxx
+++ b/sd/source/core/sdpage2.cxx
@@ -72,7 +72,7 @@ using namespace ::com::sun::star::office;
|*
\************************************************************************/
-void SdPage::SetPresentationLayout(const OUString& rLayoutName,
+void SdPage::SetPresentationLayout(std::u16string_view rLayoutName,
bool bReplaceStyleSheets,
bool bSetMasterPage,
bool bReverseOrder)
@@ -81,7 +81,7 @@ void SdPage::SetPresentationLayout(const OUString& rLayoutName,
|* Name of the layout of the page
\********************************************************************/
OUString aOldLayoutName(maLayoutName); // memorize
- maLayoutName = rLayoutName + SD_LT_SEPARATOR STR_LAYOUT_OUTLINE;
+ maLayoutName = OUString::Concat(rLayoutName) + SD_LT_SEPARATOR STR_LAYOUT_OUTLINE;
/*********************************************************************
|* search and replace master page if necessary
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index eab931cf0971..f1ff79ac566d 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -134,9 +134,9 @@ SfxStyleSheetBase* SdStyleSheetPool::Create(const OUString& rName, SfxStyleFamil
return new SdStyleSheet(rName, *this, eFamily, _nMask);
}
-SfxStyleSheetBase* SdStyleSheetPool::GetTitleSheet(const OUString& rLayoutName)
+SfxStyleSheetBase* SdStyleSheetPool::GetTitleSheet(std::u16string_view rLayoutName)
{
- OUString aName = rLayoutName + SD_LT_SEPARATOR STR_LAYOUT_TITLE;
+ OUString aName = OUString::Concat(rLayoutName) + SD_LT_SEPARATOR STR_LAYOUT_TITLE;
SfxStyleSheetBase* pResult = Find(aName, SfxStyleFamily::Page);
return pResult;
}
@@ -148,9 +148,9 @@ SfxStyleSheetBase* SdStyleSheetPool::GetTitleSheet(const OUString& rLayoutName)
|*
\************************************************************************/
-void SdStyleSheetPool::CreateOutlineSheetList (const OUString& rLayoutName, std::vector<SfxStyleSheetBase*> &rOutlineStyles)
+void SdStyleSheetPool::CreateOutlineSheetList (std::u16string_view rLayoutName, std::vector<SfxStyleSheetBase*> &rOutlineStyles)
{
- OUString aName = rLayoutName + SD_LT_SEPARATOR STR_LAYOUT_OUTLINE;
+ OUString aName = OUString::Concat(rLayoutName) + SD_LT_SEPARATOR STR_LAYOUT_OUTLINE;
for (sal_Int32 nSheet = 1; nSheet < 10; nSheet++)
{
@@ -168,7 +168,7 @@ void SdStyleSheetPool::CreateOutlineSheetList (const OUString& rLayoutName, std:
|*
\************************************************************************/
-void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool bCheck /*= sal_False*/ )
+void SdStyleSheetPool::CreateLayoutStyleSheets(std::u16string_view rLayoutName, bool bCheck /*= sal_False*/ )
{
const SfxStyleSearchBits nUsedMask = SfxStyleSearchBits::All & ~SfxStyleSearchBits::UserDefined;
@@ -176,7 +176,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
SfxStyleSheetBase* pSheet = nullptr;
- OUString aPrefix(rLayoutName + SD_LT_SEPARATOR);
+ OUString aPrefix(OUString::Concat(rLayoutName) + SD_LT_SEPARATOR);
vcl::Font aLatinFont, aCJKFont, aCTLFont;
@@ -578,7 +578,7 @@ void SdStyleSheetPool::CopyCellSheets(SdStyleSheetPool& rSourcePool, StyleSheetC
CopySheets( rSourcePool, SfxStyleFamily::Frame, rCreatedSheets );
}
-void SdStyleSheetPool::RenameAndCopyGraphicSheets(SdStyleSheetPool& rSourcePool, StyleSheetCopyResultVector& rCreatedSheets, OUString const &rRenameSuffix)
+void SdStyleSheetPool::RenameAndCopyGraphicSheets(SdStyleSheetPool& rSourcePool, StyleSheetCopyResultVector& rCreatedSheets, std::u16string_view rRenameSuffix)
{
CopySheets( rSourcePool, SfxStyleFamily::Para, rCreatedSheets, rRenameSuffix );
}
@@ -591,7 +591,7 @@ void SdStyleSheetPool::CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily
void SdStyleSheetPool::CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily eFamily, StyleSheetCopyResultVector& rCreatedSheets)
{
- CopySheets(rSourcePool, eFamily, rCreatedSheets, "");
+ CopySheets(rSourcePool, eFamily, rCreatedSheets, u"");
}
namespace
@@ -611,7 +611,7 @@ struct HasFamilyPredicate : svl::StyleSheetPredicate
}
-void SdStyleSheetPool::CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily eFamily, StyleSheetCopyResultVector& rCreatedSheets, const OUString& rRenameSuffix)
+void SdStyleSheetPool::CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily eFamily, StyleSheetCopyResultVector& rCreatedSheets, std::u16string_view rRenameSuffix)
{
std::vector< std::pair< rtl::Reference< SfxStyleSheetBase >, OUString > > aNewStyles;
std::vector< std::pair< OUString, OUString > > aRenamedList;
@@ -636,7 +636,7 @@ void SdStyleSheetPool::CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily
// if we have a rename suffix, try to find a new name
pExistingSheet =
GetStyleSheetByPositionInIndex(aSheetsWithName.front());
- if (!rRenameSuffix.isEmpty() &&
+ if (!rRenameSuffix.empty() &&
!pExistingSheet->GetItemSet().Equals(pSheet->GetItemSet(), false))
{
// we have found a sheet with the same name, but different contents. Try to find a new name.
@@ -689,7 +689,7 @@ void SdStyleSheetPool::CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily
// set parents on newly added stylesheets
for( auto& rStyle : aNewStyles )
{
- if( !rRenameSuffix.isEmpty() )
+ if( !rRenameSuffix.empty() )
{
SfxStyleSheet *pParent = lcl_findStyle(rCreatedSheets, lcl_findRenamedStyleName(aRenamedList, rStyle.second));
if( pParent )
@@ -716,7 +716,7 @@ void SdStyleSheetPool::CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily
|*
\************************************************************************/
-void SdStyleSheetPool::CopyLayoutSheets(const OUString& rLayoutName, SdStyleSheetPool& rSourcePool, StyleSheetCopyResultVector& rCreatedSheets)
+void SdStyleSheetPool::CopyLayoutSheets(std::u16string_view rLayoutName, SdStyleSheetPool& rSourcePool, StyleSheetCopyResultVector& rCreatedSheets)
{
SfxStyleSheetBase* pSheet = nullptr;
@@ -776,9 +776,9 @@ void SdStyleSheetPool::CopyLayoutSheets(const OUString& rLayoutName, SdStyleShee
|*
\************************************************************************/
-void SdStyleSheetPool::CreateLayoutSheetNames(const OUString& rLayoutName, std::vector<OUString> &aNameList)
+void SdStyleSheetPool::CreateLayoutSheetNames(std::u16string_view rLayoutName, std::vector<OUString> &aNameList)
{
- OUString aPrefix(rLayoutName + SD_LT_SEPARATOR);
+ OUString aPrefix(OUString::Concat(rLayoutName) + SD_LT_SEPARATOR);
for (sal_Int32 nLevel = 1; nLevel < 10; nLevel++)
aNameList.emplace_back(aPrefix + STR_LAYOUT_OUTLINE " " + OUString::number( nLevel ) );
@@ -797,9 +797,9 @@ void SdStyleSheetPool::CreateLayoutSheetNames(const OUString& rLayoutName, std::
|*
\************************************************************************/
-void SdStyleSheetPool::CreateLayoutSheetList(const OUString& rLayoutName, SdStyleSheetVector& rLayoutSheets )
+void SdStyleSheetPool::CreateLayoutSheetList(std::u16string_view rLayoutName, SdStyleSheetVector& rLayoutSheets )
{
- OUString aLayoutNameWithSep(rLayoutName + SD_LT_SEPARATOR);
+ OUString aLayoutNameWithSep(OUString::Concat(rLayoutName) + SD_LT_SEPARATOR);
SfxStyleSheetIterator aIter(this, SfxStyleFamily::Page);
SfxStyleSheetBase* pSheet = aIter.First();
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index c734bf10f0f5..ce4e103edc91 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -454,7 +454,7 @@ bool PowerPointExport::exportDocument()
::oox::ole::VbaProject* PowerPointExport::implCreateVbaProject() const
{
- return new ::oox::ole::VbaProject(getComponentContext(), getModel(), "Impress");
+ return new ::oox::ole::VbaProject(getComponentContext(), getModel(), u"Impress");
}
void PowerPointExport::ImplWriteBackground(const FSHelperPtr& pFS, const Reference< XPropertySet >& rXPropSet)
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 85a37b6b7d1d..88f2cd68220c 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -2752,7 +2752,7 @@ OUString HtmlExport::ColorToHTMLString( Color aColor )
OUString HtmlExport::CreateHTMLCircleArea( sal_uLong nRadius,
sal_uLong nCenterX,
sal_uLong nCenterY,
- const OUString& rHRef )
+ std::u16string_view rHRef )
{
OUString aStr(
"<area shape=\"circle\" alt=\"\" coords=\"" +
@@ -2801,7 +2801,7 @@ OUString HtmlExport::CreateHTMLPolygonArea( const ::basegfx::B2DPolyPolygon& rPo
// create area for a rectangle; we expect pixel coordinates
OUString HtmlExport::CreateHTMLRectArea( const ::tools::Rectangle& rRect,
- const OUString& rHRef )
+ std::u16string_view rHRef )
{
OUString aStr(
"<area shape=\"rect\" alt=\"\" coords=\"" +
@@ -2836,7 +2836,7 @@ OUString HtmlExport::CreatePageURL( sal_uInt16 nPgNum )
return maHTMLFiles[nPgNum];
}
-bool HtmlExport::CopyScript( const OUString& rPath, const OUString& rSource, const OUString& rDest, bool bUnix /* = false */ )
+bool HtmlExport::CopyScript( std::u16string_view rPath, const OUString& rSource, const OUString& rDest, bool bUnix /* = false */ )
{
INetURLObject aURL( SvtPathOptions().GetConfigPath() );
OUStringBuffer aScriptBuf;
@@ -3026,7 +3026,7 @@ bool HtmlExport::CopyFile( const OUString& rSourceFile, const OUString& rDestFil
}
}
-bool HtmlExport::checkFileExists( Reference< css::ucb::XSimpleFileAccess3 > const & xFileAccess, OUString const & aFileName )
+bool HtmlExport::checkFileExists( Reference< css::ucb::XSimpleFileAccess3 > const & xFileAccess, std::u16string_view aFileName )
{
try
{
diff --git a/sd/source/filter/html/htmlex.hxx b/sd/source/filter/html/htmlex.hxx
index 2c07ab2358b8..4a7602e93863 100644
--- a/sd/source/filter/html/htmlex.hxx
+++ b/sd/source/filter/html/htmlex.hxx
@@ -163,7 +163,7 @@ class HtmlExport final
bool CreateImageNumberFile();
bool checkForExistingFiles();
- bool checkFileExists( css::uno::Reference< css::ucb::XSimpleFileAccess3 > const & xFileAccess, OUString const & aFileName );
+ bool checkFileExists( css::uno::Reference< css::ucb::XSimpleFileAccess3 > const & xFileAccess, std::u16string_view aFileName );
OUString const & getDocumentTitle();
bool SavePresentation();
@@ -182,16 +182,16 @@ class HtmlExport final
OUString CreateTextForNotesPage( SdrOutliner* pOutliner, SdPage* pPage, const Color& rBackgroundColor );
static OUString CreateHTMLCircleArea( sal_uLong nRadius, sal_uLong nCenterX,
- sal_uLong nCenterY, const OUString& rHRef );
+ sal_uLong nCenterY, std::u16string_view rHRef );
static OUString CreateHTMLPolygonArea( const ::basegfx::B2DPolyPolygon& rPolyPoly, Size aShift, double fFactor, const OUString& rHRef );
static OUString CreateHTMLRectArea( const ::tools::Rectangle& rRect,
- const OUString& rHRef );
+ std::u16string_view rHRef );
OUString CreatePageURL( sal_uInt16 nPgNum );
OUString InsertSound( const OUString& rSoundFile );
bool CopyFile( const OUString& rSourceFile, const OUString& rDestFile );
- bool CopyScript( const OUString& rPath, const OUString& rSource, const OUString& rDest, bool bUnix = false );
+ bool CopyScript( std::u16string_view rPath, const OUString& rSource, const OUString& rDest, bool bUnix = false );
void InitProgress( sal_uInt16 nProgrCount );
void ResetProgress();
diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx
index 6a9f2fd29aaf..2d283e3ae41b 100644
--- a/sd/source/filter/html/pubdlg.cxx
+++ b/sd/source/filter/html/pubdlg.cxx
@@ -152,7 +152,7 @@ SdPublishingDesign::SdPublishingDesign()
, m_bUseAttribs(true)
, m_bUseColor(true)
{
- FilterConfigItem aFilterConfigItem("Office.Common/Filter/Graphic/Export/JPG");
+ FilterConfigItem aFilterConfigItem(u"Office.Common/Filter/Graphic/Export/JPG");
sal_Int32 nCompression = aFilterConfigItem.ReadInt32( KEY_QUALITY, 75 );
m_aCompression = OUString::number(nCompression) + "%";
diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx
index dfe5bc3f46d3..5b343b64288a 100644
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -316,12 +316,12 @@ void DrawDocShell::GetState(SfxItemSet &rSet)
if(bImpress)
{
bVisible = sfx2::SfxNotebookBar::StateMethod(mpViewShell->GetFrame()->GetBindings(),
- "modules/simpress/ui/");
+ u"modules/simpress/ui/");
}
else
{
bVisible = sfx2::SfxNotebookBar::StateMethod(mpViewShell->GetFrame()->GetBindings(),
- "modules/sdraw/ui/");
+ u"modules/sdraw/ui/");
}
rSet.Put( SfxBoolItem( SID_NOTEBOOKBAR, bVisible ) );
}
diff --git a/sd/source/ui/sidebar/DocumentHelper.cxx b/sd/source/ui/sidebar/DocumentHelper.cxx
index 08fab9f247d3..c3a848712f51 100644
--- a/sd/source/ui/sidebar/DocumentHelper.cxx
+++ b/sd/source/ui/sidebar/DocumentHelper.cxx
@@ -390,7 +390,7 @@ SdPage* DocumentHelper::AddMasterPage (
*/
void DocumentHelper::AssignMasterPageToPage (
SdPage const * pMasterPage,
- const OUString& rsBaseLayoutName,
+ std::u16string_view rsBaseLayoutName,
SdPage* pPage)
{
// Leave early when the parameters are invalid.
diff --git a/sd/source/ui/sidebar/DocumentHelper.hxx b/sd/source/ui/sidebar/DocumentHelper.hxx
index 5f34f66718b2..b1488795a403 100644
--- a/sd/source/ui/sidebar/DocumentHelper.hxx
+++ b/sd/source/ui/sidebar/DocumentHelper.hxx
@@ -22,6 +22,7 @@
#include <rtl/ustring.hxx>
#include <memory>
+#include <string_view>
#include <vector>
class SdDrawDocument;
@@ -97,7 +98,7 @@ private:
*/
static void AssignMasterPageToPage (
SdPage const * pMasterPage,
- const OUString& rsBaseLayoutName,
+ std::u16string_view rsBaseLayoutName,
SdPage* pPage);
};
diff --git a/sd/source/ui/unoidl/sddetect.cxx b/sd/source/ui/unoidl/sddetect.cxx
index fb66f4fabc59..4856e4e1dea3 100644
--- a/sd/source/ui/unoidl/sddetect.cxx
+++ b/sd/source/ui/unoidl/sddetect.cxx
@@ -117,7 +117,7 @@ OUString SAL_CALL SdFilterDetect::detect( Sequence< beans::PropertyValue >& lDes
nBase = 1;
else if ( aTypeName == "pcd_Photo_CD_Base16" )
nBase = 0;
- FilterConfigItem aFilterConfigItem( "Office.Common/Filter/Graphic/Import/PCD" );
+ FilterConfigItem aFilterConfigItem( u"Office.Common/Filter/Graphic/Import/PCD" );
aFilterConfigItem.WriteInt32( "Resolution" , nBase );
}
diff --git a/sd/source/ui/view/ToolBarManager.cxx b/sd/source/ui/view/ToolBarManager.cxx
index 7f1986c35030..eb91e49ab928 100644
--- a/sd/source/ui/view/ToolBarManager.cxx
+++ b/sd/source/ui/view/ToolBarManager.cxx
@@ -319,7 +319,7 @@ private:
ImplSVEvent * mnPendingSetValidCall;
ToolBarRules maToolBarRules;
- static OUString GetToolBarResourceName (const OUString& rsBaseName);
+ static OUString GetToolBarResourceName (std::u16string_view rsBaseName);
bool CheckPlugInMode (std::u16string_view rsName) const;
DECL_LINK(UpdateCallback, void *, void);
@@ -859,9 +859,9 @@ IMPL_LINK_NOARG(ToolBarManager::Implementation, SetValidCallback, void*, void)
}
OUString ToolBarManager::Implementation::GetToolBarResourceName (
- const OUString& rsBaseName)
+ std::u16string_view rsBaseName)
{
- return "private:resource/toolbar/" + rsBaseName;
+ return OUString::Concat("private:resource/toolbar/") + rsBaseName;
}
bool ToolBarManager::Implementation::CheckPlugInMode (std::u16string_view rsName) const
diff --git a/sdext/source/pdfimport/test/tests.cxx b/sdext/source/pdfimport/test/tests.cxx
index 58f3d332b4e0..dd118cc3aea9 100644
--- a/sdext/source/pdfimport/test/tests.cxx
+++ b/sdext/source/pdfimport/test/tests.cxx
@@ -454,7 +454,7 @@ namespace
auto pSink = std::make_shared<TestSink>();
CPPUNIT_ASSERT(
pdfi::xpdf_ImportFromFile(
- m_directories.getURLFromSrc("/sdext/source/pdfimport/test/testinput.pdf"),
+ m_directories.getURLFromSrc(u"/sdext/source/pdfimport/test/testinput.pdf"),
pSink,
uno::Reference< task::XInteractionHandler >(),
OUString(),
@@ -473,7 +473,7 @@ namespace
CPPUNIT_ASSERT_EQUAL( osl::File::E_None, osl::File::createTempFile( nullptr, nullptr, &tempFileURL ) );
osl::File::remove( tempFileURL ); // FIXME the below apparently fails silently if the file already exists
CPPUNIT_ASSERT_MESSAGE("Exporting to ODF",
- xAdaptor->odfConvert( m_directories.getURLFromSrc("/sdext/source/pdfimport/test/testinput.pdf"),
+ xAdaptor->odfConvert( m_directories.getURLFromSrc(u"/sdext/source/pdfimport/test/testinput.pdf"),
new OutputWrap(tempFileURL),
nullptr ));
osl::File::remove( tempFileURL );
@@ -490,7 +490,7 @@ namespace
CPPUNIT_ASSERT_EQUAL( osl::File::E_None, osl::File::createTempFile( nullptr, nullptr, &tempFileURL ) );
osl::File::remove( tempFileURL ); // FIXME the below apparently fails silently if the file already exists
CPPUNIT_ASSERT_MESSAGE("Exporting to ODF",
- xAdaptor->odfConvert( m_directories.getURLFromSrc("/sdext/source/pdfimport/test/testinput.pdf"),
+ xAdaptor->odfConvert( m_directories.getURLFromSrc(u"/sdext/source/pdfimport/test/testinput.pdf"),
new OutputWrap(tempFileURL),
nullptr ));
osl::File::remove( tempFileURL );
@@ -505,7 +505,7 @@ namespace
OString aOutput;
CPPUNIT_ASSERT_MESSAGE("Exporting to ODF",
- xAdaptor->odfConvert(m_directories.getURLFromSrc("/sdext/source/pdfimport/test/testTdf96993.pdf"),
+ xAdaptor->odfConvert(m_directories.getURLFromSrc(u"/sdext/source/pdfimport/test/testTdf96993.pdf"),
new OutputWrapString(aOutput),
nullptr));
// This ensures that the imported image arrives properly flipped
@@ -521,7 +521,7 @@ namespace
OString aOutput;
CPPUNIT_ASSERT_MESSAGE("Exporting to ODF",
- xAdaptor->odfConvert(m_directories.getURLFromSrc("/sdext/source/pdfimport/test/testTdf96993.pdf"),
+ xAdaptor->odfConvert(m_directories.getURLFromSrc(u"/sdext/source/pdfimport/test/testTdf96993.pdf"),
new OutputWrapString(aOutput),
nullptr));
// This ensures that the imported image arrives properly flipped
@@ -538,7 +538,7 @@ namespace
OString aOutput;
CPPUNIT_ASSERT_MESSAGE("Exporting to ODF",
- xAdaptor->odfConvert(m_directories.getURLFromSrc("/sdext/source/pdfimport/test/testTdf105536.pdf"),
+ xAdaptor->odfConvert(m_directories.getURLFromSrc(u"/sdext/source/pdfimport/test/testTdf105536.pdf"),
new OutputWrapString(aOutput),
nullptr));
// This ensures that the imported image arrives properly flipped
diff --git a/sdext/source/presenter/PresenterScreen.cxx b/sdext/source/presenter/PresenterScreen.cxx
index a06bf17c5a00..30f1864e8aed 100644
--- a/sdext/source/presenter/PresenterScreen.cxx
+++ b/sdext/source/presenter/PresenterScreen.cxx
@@ -633,7 +633,7 @@ void PresenterScreen::SetupConfiguration (
void PresenterScreen::ProcessLayout (
PresenterConfigurationAccess& rConfiguration,
- const OUString& rsLayoutName,
+ std::u16string_view rsLayoutName,
const Reference<XComponentContext>& rxContext,
const Reference<XResourceId>& rxAnchorId)
{
@@ -641,7 +641,7 @@ void PresenterScreen::ProcessLayout (
{
Reference<container::XHierarchicalNameAccess> xLayoutNode (
rConfiguration.GetConfigurationNode(
- "Presenter/Layouts/"+rsLayoutName),
+ OUString::Concat("Presenter/Layouts/")+rsLayoutName),
UNO_QUERY_THROW);
// Read the parent layout first, if one is referenced.
diff --git a/sdext/source/presenter/PresenterScreen.hxx b/sdext/source/presenter/PresenterScreen.hxx
index ca4ca7fe57e7..e696c0dc646e 100644
--- a/sdext/source/presenter/PresenterScreen.hxx
+++ b/sdext/source/presenter/PresenterScreen.hxx
@@ -33,6 +33,7 @@
#include <rtl/ref.hxx>
#include <map>
+#include <string_view>
namespace sdext::presenter {
@@ -172,7 +173,7 @@ private:
*/
void ProcessLayout (
PresenterConfigurationAccess& rConfiguration,
- const OUString& rsLayoutName,
+ std::u16string_view rsLayoutName,
const css::uno::Reference<css::uno::XComponentContext>& rxContext,
const css::uno::Reference<css::drawing::framework::XResourceId>& rxAnchorId);
diff --git a/sfx2/inc/guisaveas.hxx b/sfx2/inc/guisaveas.hxx
index a62c5fc3822e..c19f78e3fdf1 100644
--- a/sfx2/inc/guisaveas.hxx
+++ b/sfx2/inc/guisaveas.hxx
@@ -20,6 +20,10 @@
#ifndef INCLUDED_SFX2_INC_GUISAVEAS_HXX
#define INCLUDED_SFX2_INC_GUISAVEAS_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
@@ -53,7 +57,7 @@ public:
bool GUIStoreModel(
const css::uno::Reference< css::frame::XModel >& xModel,
- const OUString& aSlotName,
+ std::u16string_view aSlotName,
css::uno::Sequence< css::beans::PropertyValue >& aArgsSequence,
bool bPreselectPassword,
SignatureState nDocumentSignatureState );
diff --git a/sfx2/qa/cppunit/test_misc.cxx b/sfx2/qa/cppunit/test_misc.cxx
index 99c5aa40a696..f6039b0e68d8 100644
--- a/sfx2/qa/cppunit/test_misc.cxx
+++ b/sfx2/qa/cppunit/test_misc.cxx
@@ -74,7 +74,7 @@ CPPUNIT_TEST_FIXTURE(MiscTest, testODFCustomMetadata)
uno::Reference<document::XDocumentProperties> const xProps(
::com::sun::star::document::DocumentProperties::create(m_xContext));
- OUString const url(m_directories.getURLFromSrc("/sfx2/qa/complex/sfx2/testdocuments/CUSTOM.odt"));
+ OUString const url(m_directories.getURLFromSrc(u"/sfx2/qa/complex/sfx2/testdocuments/CUSTOM.odt"));
xProps->loadFromMedium(url, uno::Sequence<beans::PropertyValue>());
CPPUNIT_ASSERT_EQUAL(OUString(""), xProps->getAuthor());
uno::Sequence<beans::PropertyValue> mimeArgs({
@@ -101,7 +101,7 @@ CPPUNIT_TEST_FIXTURE(MiscTest, testODFCustomMetadata)
CPPUNIT_TEST_FIXTURE(MiscTest, testNoThumbnail)
{
// Load a document.
- const OUString aURL(m_directories.getURLFromSrc("/sfx2/qa/cppunit/misc/hello.odt"));
+ const OUString aURL(m_directories.getURLFromSrc(u"/sfx2/qa/cppunit/misc/hello.odt"));
uno::Reference<lang::XComponent> xComponent
= loadFromDesktop(aURL, "com.sun.star.text.TextDocument");
CPPUNIT_ASSERT(xComponent.is());
@@ -152,8 +152,8 @@ CPPUNIT_TEST_FIXTURE(MiscTest, testNoThumbnail)
CPPUNIT_TEST_FIXTURE(MiscTest, testHardLinks)
{
#ifndef _WIN32
- OUString aSourceDir = m_directories.getURLFromSrc("/sfx2/qa/cppunit/misc/");
- OUString aTargetDir = m_directories.getURLFromWorkdir("/CppunitTest/sfx2_misc.test.user/");
+ OUString aSourceDir = m_directories.getURLFromSrc(u"/sfx2/qa/cppunit/misc/");
+ OUString aTargetDir = m_directories.getURLFromWorkdir(u"/CppunitTest/sfx2_misc.test.user/");
const OUString aURL(aTargetDir + "hello.odt");
osl::File::copy(aSourceDir + "hello.odt", aURL);
OUString aTargetPath;
diff --git a/sfx2/qa/unit/sfx2-dialogs-test.cxx b/sfx2/qa/unit/sfx2-dialogs-test.cxx
index 5b73388198ca..6e23237bc39b 100644
--- a/sfx2/qa/unit/sfx2-dialogs-test.cxx
+++ b/sfx2/qa/unit/sfx2-dialogs-test.cxx
@@ -48,7 +48,7 @@ VclPtr<VclAbstractDialog> Sfx2DialogsTest::createDialogByID(sal_uInt32 /*nID*/)
void Sfx2DialogsTest::openAnyDialog()
{
/// process input file containing the UXMLDescriptions of the dialogs to dump
- processDialogBatchFile("sfx2/qa/unit/data/sfx2-dialogs-test.txt");
+ processDialogBatchFile(u"sfx2/qa/unit/data/sfx2-dialogs-test.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(Sfx2DialogsTest);
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index befb7510f82a..49043fb076c7 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -187,7 +187,7 @@ bool LinkManager::InsertLink( SvBaseLink * pLink,
void LinkManager::InsertDDELink( SvBaseLink * pLink,
const OUString& rServer,
const OUString& rTopic,
- const OUString& rItem )
+ std::u16string_view rItem )
{
if( !isClientType( pLink->GetObjType() ) )
return;
@@ -375,7 +375,7 @@ void LinkManager::RemoveServer( SvLinkSource* pObj )
}
void MakeLnkName( OUString& rName, const OUString* pType, const OUString& rFile,
- const OUString& rLink, const OUString* pFilter )
+ std::u16string_view rLink, const OUString* pFilter )
{
if( pType )
{
diff --git a/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx
index 6e7789122a3b..cc1299c01b1c 100644
--- a/sfx2/source/doc/graphhelp.cxx
+++ b/sfx2/source/doc/graphhelp.cxx
@@ -198,16 +198,16 @@ bool GraphicHelper::getThumbnailFormatFromGDI_Impl(GDIMetaFile const * pMetaFile
}
// static
-bool GraphicHelper::getThumbnailReplacement_Impl(const OUString& rResID, const uno::Reference< io::XStream >& xStream )
+bool GraphicHelper::getThumbnailReplacement_Impl(std::u16string_view rResID, const uno::Reference< io::XStream >& xStream )
{
bool bResult = false;
- if (!rResID.isEmpty() && xStream.is())
+ if (!rResID.empty() && xStream.is())
{
uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
try
{
uno::Reference< graphic::XGraphicProvider > xGraphProvider(graphic::GraphicProvider::create(xContext));
- const OUString aURL{"private:graphicrepository/" + rResID};
+ const OUString aURL{OUString::Concat("private:graphicrepository/") + rResID};
uno::Sequence< beans::PropertyValue > aMediaProps( 1 );
aMediaProps[0].Name = "URL";
diff --git a/sfx2/source/doc/graphhelp.hxx b/sfx2/source/doc/graphhelp.hxx
index 3f6f66d3e447..bfaf3e223d90 100644
--- a/sfx2/source/doc/graphhelp.hxx
+++ b/sfx2/source/doc/graphhelp.hxx
@@ -20,6 +20,10 @@
#ifndef INCLUDED_SFX2_SOURCE_DOC_GRAPHHELP_HXX
#define INCLUDED_SFX2_SOURCE_DOC_GRAPHHELP_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/io/XStream.hpp>
#include <rtl/ustring.hxx>
@@ -56,7 +60,7 @@ public:
static OUString getThumbnailReplacementIDByFactoryName_Impl(const OUString& aFactoryShortName);
static bool getThumbnailReplacement_Impl(
- const OUString& rResID,
+ std::u16string_view rResID,
const css::uno::Reference< css::io::XStream >& xStream );
};
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index ad94a17e4231..18a3bd42b907 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -76,6 +76,7 @@
#include <alienwarn.hxx>
#include <memory>
+#include <string_view>
#include <officecfg/Office/Common.hxx>
@@ -147,28 +148,28 @@ sal_uInt16 getSlotIDFromMode( sal_Int16 nStoreMode )
}
-sal_Int16 getStoreModeFromSlotName( const OUString& aSlotName )
+sal_Int16 getStoreModeFromSlotName( std::u16string_view aSlotName )
{
sal_Int16 nResult = 0;
- if ( aSlotName == "ExportTo" )
+ if ( aSlotName == u"ExportTo" )
nResult = EXPORT_REQUESTED;
- else if ( aSlotName == "ExportToPDF" )
+ else if ( aSlotName == u"ExportToPDF" )
nResult = EXPORT_REQUESTED | PDFEXPORT_REQUESTED;
- else if ( aSlotName == "ExportDirectToPDF" )
+ else if ( aSlotName == u"ExportDirectToPDF" )
nResult = EXPORT_REQUESTED | PDFEXPORT_REQUESTED | PDFDIRECTEXPORT_REQUESTED;
- else if ( aSlotName == "ExportToEPUB" )
+ else if ( aSlotName == u"ExportToEPUB" )
nResult = EXPORT_REQUESTED | EPUBEXPORT_REQUESTED;
- else if ( aSlotName == "ExportDirectToEPUB" )
+ else if ( aSlotName == u"ExportDirectToEPUB" )
nResult = EXPORT_REQUESTED | EPUBEXPORT_REQUESTED | EPUBDIRECTEXPORT_REQUESTED;
- else if ( aSlotName == "Save" )
+ else if ( aSlotName == u"Save" )
nResult = SAVE_REQUESTED;
- else if ( aSlotName == "SaveAs" )
+ else if ( aSlotName == u"SaveAs" )
nResult = SAVEAS_REQUESTED;
- else if ( aSlotName == "SaveAsRemote" )
+ else if ( aSlotName == u"SaveAsRemote" )
nResult = SAVEASREMOTE_REQUESTED;
else
throw task::ErrorCodeIOException(
- ("getStoreModeFromSlotName(\"" + aSlotName
+ (OUString::Concat("getStoreModeFromSlotName(\"") + aSlotName
+ "): ERRCODE_IO_INVALIDPARAMETER"),
uno::Reference< uno::XInterface >(), sal_uInt32(ERRCODE_IO_INVALIDPARAMETER) );
@@ -1293,7 +1294,7 @@ namespace
void LaunchPDFViewer(const INetURLObject& rURL)
{
// Launch PDF viewer
- FilterConfigItem aItem( "Office.Common/Filter/PDF/Export/" );
+ FilterConfigItem aItem( u"Office.Common/Filter/PDF/Export/" );
bool aViewPDF = aItem.ReadBool( "ViewPDFAfterExport", false );
if ( aViewPDF )
@@ -1305,7 +1306,7 @@ namespace
}
bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& xModel,
- const OUString& aSlotName,
+ std::u16string_view aSlotName,
uno::Sequence< beans::PropertyValue >& aArgsSequence,
bool bPreselectPassword,
SignatureState nDocumentSignatureState )
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index d59d334bd55b..81fcb4027535 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -1841,7 +1841,7 @@ bool SfxObjectShell_Impl::hasTrustedScriptingSignature( bool bAllowUIToAddAuthor
return bResult;
}
-bool SfxObjectShell::IsContinueImportOnFilterExceptions(const OUString& aErrMessage)
+bool SfxObjectShell::IsContinueImportOnFilterExceptions(std::u16string_view aErrMessage)
{
if (mbContinueImportOnFilterExceptions == undefined)
{
@@ -1849,7 +1849,7 @@ bool SfxObjectShell::IsContinueImportOnFilterExceptions(const OUString& aErrMess
{
// Ask the user to try to continue or abort loading
OUString aMessage = SfxResId(STR_QMSG_ERROR_OPENING_FILE);
- if (!aErrMessage.isEmpty())
+ if (!aErrMessage.empty())
aMessage += SfxResId(STR_QMSG_ERROR_OPENING_FILE_DETAILS) + aErrMessage;
aMessage += SfxResId(STR_QMSG_ERROR_OPENING_FILE_CONTINUE);
std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(nullptr,
diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx
index f2690c9e04b7..115db13c872f 100644
--- a/sfx2/source/notebookbar/SfxNotebookBar.cxx
+++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx
@@ -314,7 +314,7 @@ void SfxNotebookBar::ExecMethod(SfxBindings& rBindings, const OUString& rUIName)
rBindings.Update();
}
-bool SfxNotebookBar::StateMethod(SfxBindings& rBindings, const OUString& rUIFile,
+bool SfxNotebookBar::StateMethod(SfxBindings& rBindings, std::u16string_view rUIFile,
bool bReloadNotebookbar)
{
SfxFrame& rFrame = rBindings.GetDispatcher_Impl()->GetFrame()->GetFrame();
@@ -324,7 +324,7 @@ bool SfxNotebookBar::StateMethod(SfxBindings& rBindings, const OUString& rUIFile
bool SfxNotebookBar::StateMethod(SystemWindow* pSysWindow,
const Reference<css::frame::XFrame>& xFrame,
- const OUString& rUIFile, bool bReloadNotebookbar)
+ std::u16string_view rUIFile, bool bReloadNotebookbar)
{
if (!pSysWindow)
{
@@ -553,7 +553,7 @@ void SfxNotebookBar::ToggleMenubar()
}
}
-void SfxNotebookBar::ReloadNotebookBar(const OUString& sUIPath)
+void SfxNotebookBar::ReloadNotebookBar(std::u16string_view sUIPath)
{
if (SfxNotebookBar::IsActive())
{
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx
index fbba1febc5c1..5b4ba3fdf3dd 100644
--- a/sfx2/source/view/ipclient.cxx
+++ b/sfx2/source/view/ipclient.cxx
@@ -901,7 +901,7 @@ ErrCode SfxInPlaceClient::DoVerb( tools::Long nVerb )
aDispatchArgs[0].Value <<= true;
aHelper.GUIStoreModel( xEmbModel,
- "SaveAs",
+ u"SaveAs",
aDispatchArgs,
false,
SignatureState::NOSIGNATURES );
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index 44af64e02016..42e0d60b3382 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -7,6 +7,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <sfx2/lokhelper.hxx>
#include <com/sun/star/frame/Desktop.hpp>
@@ -331,7 +335,7 @@ static OString lcl_generateJSON(const SfxViewShell* pView, const boost::property
return OString(aString.c_str(), aString.size()).trim();
}
-static inline OString lcl_generateJSON(const SfxViewShell* pView, const OString& rKey,
+static inline OString lcl_generateJSON(const SfxViewShell* pView, std::string_view rKey,
const OString& rPayload)
{
assert(pView != nullptr && "pView must be valid");
@@ -341,7 +345,7 @@ static inline OString lcl_generateJSON(const SfxViewShell* pView, const OString&
}
void SfxLokHelper::notifyOtherView(const SfxViewShell* pThisView, SfxViewShell const* pOtherView,
- int nType, const OString& rKey, const OString& rPayload)
+ int nType, std::string_view rKey, const OString& rPayload)
{
assert(pThisView != nullptr && "pThisView must be valid");
if (DisableCallbacks::disabled())
@@ -361,7 +365,7 @@ void SfxLokHelper::notifyOtherView(const SfxViewShell* pThisView, SfxViewShell c
pOtherView->libreOfficeKitViewCallback(nType, lcl_generateJSON(pThisView, rTree).getStr());
}
-void SfxLokHelper::notifyOtherViews(const SfxViewShell* pThisView, int nType, const OString& rKey,
+void SfxLokHelper::notifyOtherViews(const SfxViewShell* pThisView, int nType, std::string_view rKey,
const OString& rPayload)
{
assert(pThisView != nullptr && "pThisView must be valid");
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 70894ffc5439..fd073fb253e1 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -830,7 +830,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
UpdateDocument_Impl();
if (vcl::CommandInfoProvider::GetModuleIdentifier(GetFrame().GetFrameInterface()) == "com.sun.star.text.TextDocument")
- sfx2::SfxNotebookBar::ReloadNotebookBar("modules/swriter/ui/");
+ sfx2::SfxNotebookBar::ReloadNotebookBar(u"modules/swriter/ui/");
try
{
@@ -1424,7 +1424,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
}
if (vcl::CommandInfoProvider::GetModuleIdentifier(GetFrame().GetFrameInterface()) == "com.sun.star.text.TextDocument")
- sfx2::SfxNotebookBar::ReloadNotebookBar("modules/swriter/ui/");
+ sfx2::SfxNotebookBar::ReloadNotebookBar(u"modules/swriter/ui/");
if (SfxClassificationHelper::IsClassified(m_xObjSh->getDocProperties()))
{
diff --git a/smoketest/smoketest.cxx b/smoketest/smoketest.cxx
index b463218ae9fb..a60f58167f66 100644
--- a/smoketest/smoketest.cxx
+++ b/smoketest/smoketest.cxx
@@ -139,7 +139,7 @@ void Test::test() {
OUString doc;
CPPUNIT_ASSERT(
test::getTestArgument(
- "smoketest.doc", &doc));
+ u"smoketest.doc", &doc));
css::uno::Sequence< css::beans::PropertyValue > args(2);
args[0].Name = "MacroExecutionMode";
args[0].Handle = -1;
diff --git a/sot/qa/cppunit/test_sot.cxx b/sot/qa/cppunit/test_sot.cxx
index 101013a8fb2c..592a7a1cf0f5 100644
--- a/sot/qa/cppunit/test_sot.cxx
+++ b/sot/qa/cppunit/test_sot.cxx
@@ -135,12 +135,13 @@ namespace
void SotTest::test()
{
testDir(OUString(),
- m_directories.getURLFromSrc("/sot/qa/cppunit/data/"));
+ m_directories.getURLFromSrc(u"/sot/qa/cppunit/data/"));
}
void SotTest::testSize()
{
- OUString aURL(m_directories.getURLFromSrc("/sot/qa/cppunit/data/pass/fdo84229-1.compound"));
+ OUString aURL(
+ m_directories.getURLFromSrc(u"/sot/qa/cppunit/data/pass/fdo84229-1.compound"));
SvFileStream aStream(aURL, StreamMode::READ);
tools::SvRef<SotStorage> xObjStor = new SotStorage(aStream);
CPPUNIT_ASSERT_MESSAGE("sot storage failed to open",
diff --git a/starmath/qa/extras/mmlimport-test.cxx b/starmath/qa/extras/mmlimport-test.cxx
index bc52fceb3d29..542722e8c75b 100644
--- a/starmath/qa/extras/mmlimport-test.cxx
+++ b/starmath/qa/extras/mmlimport-test.cxx
@@ -94,7 +94,7 @@ void Test::tearDown()
void Test::testColor()
{
- loadURL(m_directories.getURLFromSrc("starmath/qa/extras/data/color.mml"));
+ loadURL(m_directories.getURLFromSrc(u"starmath/qa/extras/data/color.mml"));
CPPUNIT_ASSERT_EQUAL(OUString("{ color black b"
" color white w"
" color red r"
@@ -120,40 +120,40 @@ void Test::testColor()
void Test::testSimple()
{
- loadURL(m_directories.getURLFromSrc("starmath/qa/extras/data/simple.mml"));
+ loadURL(m_directories.getURLFromSrc(u"starmath/qa/extras/data/simple.mml"));
CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", OUString("left ( { a + b } right ) ^ 2"),
mxDocShell->GetText());
}
void Test::testNsPrefixMath()
{
- loadURL(m_directories.getURLFromSrc("starmath/qa/extras/data/ns-prefix-math.mml"));
+ loadURL(m_directories.getURLFromSrc(u"starmath/qa/extras/data/ns-prefix-math.mml"));
CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", OUString("left ( { a + b } right ) ^ 2"),
mxDocShell->GetText());
}
void Test::testMaction()
{
- loadURL(m_directories.getURLFromSrc("starmath/qa/extras/data/maction.mml"));
+ loadURL(m_directories.getURLFromSrc(u"starmath/qa/extras/data/maction.mml"));
CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", OUString("matrix{ 1 ## 2 ## 3 }"),
mxDocShell->GetText());
}
void Test::testMspace()
{
- loadURL(m_directories.getURLFromSrc("starmath/qa/extras/data/mspace.mml"));
+ loadURL(m_directories.getURLFromSrc(u"starmath/qa/extras/data/mspace.mml"));
CPPUNIT_ASSERT_EQUAL(OUString("{ a b ~ c ~~``` d }"), mxDocShell->GetText());
}
void Test::testtdf99556()
{
- loadURL(m_directories.getURLFromSrc("starmath/qa/extras/data/tdf99556-1.mml"));
+ loadURL(m_directories.getURLFromSrc(u"starmath/qa/extras/data/tdf99556-1.mml"));
CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", OUString("sqrt { }"), mxDocShell->GetText());
}
void Test::testTdf103430()
{
- loadURL(m_directories.getURLFromSrc("starmath/qa/extras/data/tdf103430.mml"));
+ loadURL(m_directories.getURLFromSrc(u"starmath/qa/extras/data/tdf103430.mml"));
CPPUNIT_ASSERT_EQUAL(OUString("frac { { nitalic d ^ 2 nitalic color blue y } } { { color dvip "
"apricot nitalic d font sans bold italic color red x } }"),
mxDocShell->GetText());
@@ -161,7 +161,7 @@ void Test::testTdf103430()
void Test::testTdf103500()
{
- loadURL(m_directories.getURLFromSrc("starmath/qa/extras/data/tdf103500.mml"));
+ loadURL(m_directories.getURLFromSrc(u"starmath/qa/extras/data/tdf103500.mml"));
CPPUNIT_ASSERT_EQUAL(OUString("{ { int csup b csub a { frac { 1 } { x } ` nitalic d x } } = { "
"intd csup b csub a { frac { 1 } { y } ` nitalic d y } } }"),
mxDocShell->GetText());
diff --git a/starmath/qa/unit/starmath-dialogs-test.cxx b/starmath/qa/unit/starmath-dialogs-test.cxx
index e0e45c606cbb..11bcb1dd940c 100644
--- a/starmath/qa/unit/starmath-dialogs-test.cxx
+++ b/starmath/qa/unit/starmath-dialogs-test.cxx
@@ -51,7 +51,7 @@ VclPtr<VclAbstractDialog> StarmathDialogsTest::createDialogByID(sal_uInt32 /*nID
void StarmathDialogsTest::openAnyDialog()
{
/// process input file containing the UXMLDescriptions of the dialogs to dump
- processDialogBatchFile("starmath/qa/unit/data/starmath-dialogs-test.txt");
+ processDialogBatchFile(u"starmath/qa/unit/data/starmath-dialogs-test.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(StarmathDialogsTest);
diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx
index a7d7d51f71af..e5438e383440 100644
--- a/starmath/source/cfgitem.cxx
+++ b/starmath/source/cfgitem.cxx
@@ -367,7 +367,7 @@ void SmMathConfig::SetFormatModified( bool bVal )
void SmMathConfig::ReadSymbol( SmSym &rSymbol,
const OUString &rSymbolName,
- const OUString &rBaseNode ) const
+ std::u16string_view rBaseNode ) const
{
Sequence< OUString > aNames = lcl_GetSymbolPropertyNames();
sal_Int32 nProps = aNames.getLength();
@@ -480,7 +480,7 @@ void SmMathConfig::GetSymbols( std::vector< SmSym > &rSymbols ) const
rSymbols.resize( nNodes );
for (auto& rSymbol : rSymbols)
{
- ReadSymbol( rSymbol, *pNode++, SYMBOL_LIST );
+ ReadSymbol( rSymbol, *pNode++, u"" SYMBOL_LIST );
}
}
@@ -564,7 +564,7 @@ void SmMathConfig::LoadFontFormatList()
for (const OUString& rNode : aNodes)
{
SmFontFormat aFntFmt;
- ReadFontFormat( aFntFmt, rNode, FONT_FORMAT_LIST );
+ ReadFontFormat( aFntFmt, rNode, u"" FONT_FORMAT_LIST );
if (!pFontFormatList->GetFontFormat( rNode ))
pFontFormatList->AddFontFormat( rNode, aFntFmt );
}
@@ -573,7 +573,7 @@ void SmMathConfig::LoadFontFormatList()
void SmMathConfig::ReadFontFormat( SmFontFormat &rFontFormat,
- const OUString &rSymbolName, const OUString &rBaseNode ) const
+ std::u16string_view rSymbolName, std::u16string_view rBaseNode ) const
{
Sequence< OUString > aNames = lcl_GetFontPropertyNames();
sal_Int32 nProps = aNames.getLength();
diff --git a/starmath/source/cfgitem.hxx b/starmath/source/cfgitem.hxx
index fe11ce08f409..47aaf6309d33 100644
--- a/starmath/source/cfgitem.hxx
+++ b/starmath/source/cfgitem.hxx
@@ -22,6 +22,7 @@
#include <utility.hxx>
+#include <string_view>
#include <vector>
#include <rtl/ustring.hxx>
@@ -111,10 +112,10 @@ class SmMathConfig final : public utl::ConfigItem, public SfxBroadcaster
void ReadSymbol( SmSym &rSymbol,
const OUString &rSymbolName,
- const OUString &rBaseNode ) const;
+ std::u16string_view rBaseNode ) const;
void ReadFontFormat( SmFontFormat &rFontFormat,
- const OUString &rSymbolName,
- const OUString &rBaseNode ) const;
+ std::u16string_view rSymbolName,
+ std::u16string_view rBaseNode ) const;
void SetOtherIfNotEqual( bool &rbItem, bool bNewVal );
diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx
index 972b4f9d9b0f..24471b8ad4e5 100644
--- a/stoc/source/implementationregistration/implreg.cxx
+++ b/stoc/source/implementationregistration/implreg.cxx
@@ -18,6 +18,7 @@
*/
#include <string.h>
+#include <string_view>
#include <vector>
#include <cppuhelper/exc_hlp.hxx>
@@ -210,7 +211,7 @@ void prepareLink( const Reference < XSimpleRegistry > & xDest,
OUString searchImplForLink(
const Reference < XRegistryKey > & xRootKey,
- const OUString& linkName,
+ std::u16string_view linkName,
std::u16string_view implName )
// throw ( InvalidRegistryException, RuntimeException )
{
@@ -246,7 +247,7 @@ OUString searchImplForLink(
// static searchLinkTargetForImpl
OUString searchLinkTargetForImpl(const Reference < XRegistryKey >& xRootKey,
- const OUString& linkName,
+ std::u16string_view linkName,
const OUString& implName)
{
Reference < XRegistryKey > xKey = xRootKey->openKey( slash_IMPLEMENTATIONS );
diff --git a/stoc/source/security/file_policy.cxx b/stoc/source/security/file_policy.cxx
index 7b70602f982c..b3789fe04e36 100644
--- a/stoc/source/security/file_policy.cxx
+++ b/stoc/source/security/file_policy.cxx
@@ -35,6 +35,7 @@
#include <com/sun/star/connection/SocketPermission.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
+#include <string_view>
#include <unordered_map>
#define IMPL_NAME "com.sun.star.security.comp.stoc.FilePolicy"
@@ -157,7 +158,7 @@ public:
PolicyReader( OUString const & file, AccessControl & ac );
~PolicyReader();
- void error( OUString const & msg );
+ void error( std::u16string_view msg );
OUString getToken();
OUString assureToken();
@@ -180,7 +181,7 @@ OUString PolicyReader::assureQuotedToken()
{
OUString token( getQuotedToken() );
if (token.isEmpty())
- error( "unexpected end of file!" );
+ error( u"unexpected end of file!" );
return token;
}
@@ -190,7 +191,7 @@ OUString PolicyReader::getQuotedToken()
OUStringBuffer buf( 32 );
sal_Unicode c = get();
if ('\"' != c)
- error( "expected quoting >\"< character!" );
+ error( u"expected quoting >\"< character!" );
c = get();
while ('\0' != c && '\"' != c)
{
@@ -204,7 +205,7 @@ OUString PolicyReader::assureToken()
{
OUString token( getToken() );
if ( token.isEmpty())
- error( "unexpected end of file!" );
+ error( u"unexpected end of file!" );
return token;
}
@@ -266,7 +267,7 @@ void PolicyReader::skipWhiteSpace()
}
else
{
- error( "expected C/C++ like comment!" );
+ error( u"expected C/C++ like comment!" );
}
}
else if ('#' == c) // script like comment
@@ -303,13 +304,13 @@ sal_Unicode PolicyReader::get()
sal_Bool eof;
oslFileError rc = ::osl_isEndOfFile( m_file, &eof );
if (osl_File_E_None != rc)
- error( "checking eof failed!" );
+ error( u"checking eof failed!" );
if (eof)
return '\0';
rc = ::osl_readLine( m_file, reinterpret_cast< sal_Sequence ** >( &m_line ) );
if (osl_File_E_None != rc)
- error( "read line failed!" );
+ error( u"read line failed!" );
++m_linepos;
if (! m_line.getLength()) // empty line read
{
@@ -321,7 +322,7 @@ sal_Unicode PolicyReader::get()
return (m_line.getConstArray()[ m_pos++ ]);
}
-void PolicyReader::error( OUString const & msg )
+void PolicyReader::error( std::u16string_view msg )
{
throw RuntimeException(
"error processing file \"" + m_fileName +
@@ -388,7 +389,7 @@ void FilePolicy::refresh()
while (!token.isEmpty())
{
if ( token != s_grant )
- reader.error( "expected >grant< token!" );
+ reader.error( u"expected >grant< token!" );
OUString userId;
token = reader.assureToken();
if ( token == s_user ) // next token is user-id
@@ -397,13 +398,13 @@ void FilePolicy::refresh()
token = reader.assureToken();
}
if ( token != s_openBrace )
- reader.error( "expected opening brace >{<!" );
+ reader.error( u"expected opening brace >{<!" );
token = reader.assureToken();
// permissions list
while ( token != s_closingBrace )
{
if ( token != s_permission )
- reader.error( "expected >permission< or closing brace >}<!" );
+ reader.error( u"expected >permission< or closing brace >}<!" );
token = reader.assureToken(); // permission type
Any perm;
@@ -432,7 +433,7 @@ void FilePolicy::refresh()
}
else
{
- reader.error( "expected permission type!" );
+ reader.error( u"expected permission type!" );
}
reader.assureToken( ';' );
diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx
index 3ed0e7c802a7..09814d5d08eb 100644
--- a/stoc/source/servicemanager/servicemanager.cxx
+++ b/stoc/source/servicemanager/servicemanager.cxx
@@ -51,6 +51,7 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <iterator>
+#include <string_view>
#include <unordered_map>
#include <unordered_set>
@@ -1175,9 +1176,9 @@ private:
Reference<XRegistryKey > getRootKey();
Reference<XInterface > loadWithImplementationName(
const OUString & rImplName, Reference< XComponentContext > const & xContext );
- Sequence<OUString> getFromServiceName(const OUString& serviceName) const;
+ Sequence<OUString> getFromServiceName(std::u16string_view serviceName) const;
Reference<XInterface > loadWithServiceName(
- const OUString & rImplName, Reference< XComponentContext > const & xContext );
+ std::u16string_view rImplName, Reference< XComponentContext > const & xContext );
void fillAllNamesFromRegistry( HashSet_OWString & );
bool m_searchedRegistry;
@@ -1287,9 +1288,9 @@ Reference<XInterface > ORegistryServiceManager::loadWithImplementationName(
* Return all implementation out of the registry.
*/
Sequence<OUString> ORegistryServiceManager::getFromServiceName(
- const OUString& serviceName ) const
+ std::u16string_view serviceName ) const
{
- OUString buf = "/SERVICES/" + serviceName;
+ OUString buf = OUString::Concat("/SERVICES/") + serviceName;
return retrieveAsciiValueList( m_xRegistry, buf );
}
@@ -1297,7 +1298,7 @@ Sequence<OUString> ORegistryServiceManager::getFromServiceName(
* Create a service provider from the registry
*/
Reference<XInterface > ORegistryServiceManager::loadWithServiceName(
- const OUString& serviceName, Reference< XComponentContext > const & xContext )
+ std::u16string_view serviceName, Reference< XComponentContext > const & xContext )
{
const Sequence<OUString> implEntries = getFromServiceName( serviceName );
for (const auto& rEntry : implEntries)
diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx
index 51d13d35fdec..e0895588a17f 100644
--- a/svgio/qa/cppunit/SvgImportTest.cxx
+++ b/svgio/qa/cppunit/SvgImportTest.cxx
@@ -22,6 +22,7 @@
#include <drawinglayer/tools/primitive2dxmldump.hxx>
#include <memory>
+#include <string_view>
namespace
{
@@ -69,7 +70,7 @@ class Test : public test::BootstrapFixture, public XmlTestTools
void testTdf94765();
void testBehaviourWhenWidthAndHeightIsOrIsNotSet();
- Primitive2DSequence parseSvg(const OUString& aSource);
+ Primitive2DSequence parseSvg(std::u16string_view aSource);
public:
CPPUNIT_TEST_SUITE(Test);
@@ -106,7 +107,7 @@ public:
CPPUNIT_TEST_SUITE_END();
};
-Primitive2DSequence Test::parseSvg(const OUString& aSource)
+Primitive2DSequence Test::parseSvg(std::u16string_view aSource)
{
const Reference<XSvgParser> xSvgParser = SvgTools::create(m_xContext);
@@ -157,19 +158,19 @@ bool arePrimitive2DSequencesEqual(const Primitive2DSequence& rA, const Primitive
// however the end result should be the same.
void Test::testStyles()
{
- Primitive2DSequence aSequenceRect = parseSvg("/svgio/qa/cppunit/data/Rect.svg");
+ Primitive2DSequence aSequenceRect = parseSvg(u"/svgio/qa/cppunit/data/Rect.svg");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequenceRect.getLength()));
checkRectPrimitive(aSequenceRect);
- Primitive2DSequence aSequenceRectWithStyle = parseSvg("/svgio/qa/cppunit/data/RectWithStyles.svg");
+ Primitive2DSequence aSequenceRectWithStyle = parseSvg(u"/svgio/qa/cppunit/data/RectWithStyles.svg");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequenceRectWithStyle.getLength()));
checkRectPrimitive(aSequenceRectWithStyle);
- Primitive2DSequence aSequenceRectWithParentStyle = parseSvg("/svgio/qa/cppunit/data/RectWithParentStyles.svg");
+ Primitive2DSequence aSequenceRectWithParentStyle = parseSvg(u"/svgio/qa/cppunit/data/RectWithParentStyles.svg");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequenceRectWithParentStyle.getLength()));
checkRectPrimitive(aSequenceRectWithParentStyle);
- Primitive2DSequence aSequenceRectWithStylesByGroup = parseSvg("/svgio/qa/cppunit/data/RectWithStylesByGroup.svg");
+ Primitive2DSequence aSequenceRectWithStylesByGroup = parseSvg(u"/svgio/qa/cppunit/data/RectWithStylesByGroup.svg");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequenceRectWithStylesByGroup.getLength()));
checkRectPrimitive(aSequenceRectWithStylesByGroup);
@@ -180,7 +181,7 @@ void Test::testStyles()
void Test::testTdf87309()
{
- Primitive2DSequence aSequenceTdf87309 = parseSvg("/svgio/qa/cppunit/data/tdf87309.svg");
+ Primitive2DSequence aSequenceTdf87309 = parseSvg(u"/svgio/qa/cppunit/data/tdf87309.svg");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequenceTdf87309.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
@@ -199,7 +200,7 @@ void Test::testTdf87309()
void Test::testFontsizeKeywords()
{
- Primitive2DSequence aSequenceFontsizeKeywords = parseSvg("/svgio/qa/cppunit/data/FontsizeKeywords.svg");
+ Primitive2DSequence aSequenceFontsizeKeywords = parseSvg(u"/svgio/qa/cppunit/data/FontsizeKeywords.svg");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequenceFontsizeKeywords.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
@@ -262,7 +263,7 @@ void Test::testFontsizeKeywords()
void Test::testFontsizePercentage()
{
//Check when font-size uses percentage and defined globally
- Primitive2DSequence aSequenceFontsizePercentage = parseSvg("/svgio/qa/cppunit/data/FontsizePercentage.svg");
+ Primitive2DSequence aSequenceFontsizePercentage = parseSvg(u"/svgio/qa/cppunit/data/FontsizePercentage.svg");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequenceFontsizePercentage.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
@@ -279,7 +280,7 @@ void Test::testFontsizePercentage()
void Test::testFontsizeRelative()
{
//Check when font-size uses relative units (em,ex) and it's based on its parent's font-size
- Primitive2DSequence aSequenceFontsizeRelative = parseSvg("/svgio/qa/cppunit/data/FontsizeRelative.svg");
+ Primitive2DSequence aSequenceFontsizeRelative = parseSvg(u"/svgio/qa/cppunit/data/FontsizeRelative.svg");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequenceFontsizeRelative.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
@@ -301,7 +302,7 @@ void Test::testFontsizeRelative()
void Test::testTdf45771()
{
//Check text fontsize when using relative units
- Primitive2DSequence aSequenceTdf45771 = parseSvg("/svgio/qa/cppunit/data/tdf45771.svg");
+ Primitive2DSequence aSequenceTdf45771 = parseSvg(u"/svgio/qa/cppunit/data/tdf45771.svg");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequenceTdf45771.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
@@ -318,7 +319,7 @@ void Test::testTdf45771()
void Test::testTdf97941()
{
//Check tspan fontsize when using relative units
- Primitive2DSequence aSequenceTdf97941 = parseSvg("/svgio/qa/cppunit/data/tdf97941.svg");
+ Primitive2DSequence aSequenceTdf97941 = parseSvg(u"/svgio/qa/cppunit/data/tdf97941.svg");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequenceTdf97941.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
@@ -334,7 +335,7 @@ void Test::testTdf97941()
void Test::testTdf104339()
{
- Primitive2DSequence aSequenceTdf104339 = parseSvg("/svgio/qa/cppunit/data/tdf104339.svg");
+ Primitive2DSequence aSequenceTdf104339 = parseSvg(u"/svgio/qa/cppunit/data/tdf104339.svg");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequenceTdf104339.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
@@ -346,7 +347,7 @@ void Test::testTdf104339()
void Test::testTdf85770()
{
- Primitive2DSequence aSequenceTdf85770 = parseSvg("/svgio/qa/cppunit/data/tdf85770.svg");
+ Primitive2DSequence aSequenceTdf85770 = parseSvg(u"/svgio/qa/cppunit/data/tdf85770.svg");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequenceTdf85770.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
@@ -372,7 +373,7 @@ void Test::testTdf85770()
void Test::testTdf79163()
{
//Check Opacity
- Primitive2DSequence aSequenceTdf79163 = parseSvg("/svgio/qa/cppunit/data/tdf79163.svg");
+ Primitive2DSequence aSequenceTdf79163 = parseSvg(u"/svgio/qa/cppunit/data/tdf79163.svg");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequenceTdf79163.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
@@ -385,7 +386,7 @@ void Test::testTdf79163()
void Test::testTdf97542_1()
{
- Primitive2DSequence aSequenceTdf97542_1 = parseSvg("/svgio/qa/cppunit/data/tdf97542_1.svg");
+ Primitive2DSequence aSequenceTdf97542_1 = parseSvg(u"/svgio/qa/cppunit/data/tdf97542_1.svg");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequenceTdf97542_1.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
@@ -401,7 +402,7 @@ void Test::testTdf97542_1()
void Test::testTdf97542_2()
{
- Primitive2DSequence aSequenceTdf97542_2 = parseSvg("/svgio/qa/cppunit/data/tdf97542_2.svg");
+ Primitive2DSequence aSequenceTdf97542_2 = parseSvg(u"/svgio/qa/cppunit/data/tdf97542_2.svg");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequenceTdf97542_2.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
@@ -417,7 +418,7 @@ void Test::testTdf97542_2()
void Test::testTdf97543()
{
// check visibility="inherit"
- Primitive2DSequence aSequenceTdf97543 = parseSvg("/svgio/qa/cppunit/data/tdf97543.svg");
+ Primitive2DSequence aSequenceTdf97543 = parseSvg(u"/svgio/qa/cppunit/data/tdf97543.svg");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequenceTdf97543.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
@@ -436,7 +437,7 @@ void Test::testTdf97543()
void Test::testRGBColor()
{
- Primitive2DSequence aSequenceRGBColor = parseSvg("/svgio/qa/cppunit/data/RGBColor.svg");
+ Primitive2DSequence aSequenceRGBColor = parseSvg(u"/svgio/qa/cppunit/data/RGBColor.svg");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequenceRGBColor.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
@@ -455,7 +456,7 @@ void Test::testRGBColor()
void Test::testRGBAColor()
{
- Primitive2DSequence aSequenceRGBAColor = parseSvg("/svgio/qa/cppunit/data/RGBAColor.svg");
+ Primitive2DSequence aSequenceRGBAColor = parseSvg(u"/svgio/qa/cppunit/data/RGBAColor.svg");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequenceRGBAColor.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
@@ -468,7 +469,7 @@ void Test::testRGBAColor()
void Test::testNoneColor()
{
- Primitive2DSequence aSequenceRGBAColor = parseSvg("/svgio/qa/cppunit/data/noneColor.svg");
+ Primitive2DSequence aSequenceRGBAColor = parseSvg(u"/svgio/qa/cppunit/data/noneColor.svg");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequenceRGBAColor.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
@@ -485,7 +486,7 @@ void Test::testNoneColor()
void Test::testTdf97936()
{
// check that both rectangles are rendered in the viewBox
- Primitive2DSequence aSequenceTdf97936 = parseSvg("/svgio/qa/cppunit/data/tdf97936.svg");
+ Primitive2DSequence aSequenceTdf97936 = parseSvg(u"/svgio/qa/cppunit/data/tdf97936.svg");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequenceTdf97936.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
@@ -513,7 +514,7 @@ void Test::testClipPathAndParentStyle()
{
//Check that fill color, stroke color and stroke-width are inherited from use element
//when the element is within a clipPath element
- Primitive2DSequence aSequenceClipPathAndParentStyle = parseSvg("/svgio/qa/cppunit/data/ClipPathAndParentStyle.svg");
+ Primitive2DSequence aSequenceClipPathAndParentStyle = parseSvg(u"/svgio/qa/cppunit/data/ClipPathAndParentStyle.svg");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequenceClipPathAndParentStyle.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
@@ -531,7 +532,7 @@ void Test::testClipPathAndStyle()
{
//Check that fill color, stroke color and stroke-width are inherited from use element
//when the element is within a clipPath element
- Primitive2DSequence aSequenceClipPathAndStyle = parseSvg("/svgio/qa/cppunit/data/ClipPathAndStyle.svg");
+ Primitive2DSequence aSequenceClipPathAndStyle = parseSvg(u"/svgio/qa/cppunit/data/ClipPathAndStyle.svg");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequenceClipPathAndStyle.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
@@ -548,7 +549,7 @@ void Test::testClipPathAndStyle()
void Test::testi125329()
{
//Check style inherit from * css element
- Primitive2DSequence aSequencei125329 = parseSvg("/svgio/qa/cppunit/data/i125329.svg");
+ Primitive2DSequence aSequencei125329 = parseSvg(u"/svgio/qa/cppunit/data/i125329.svg");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequencei125329.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
@@ -571,7 +572,7 @@ void Test::testMaskingPath07b()
{
//For the time being, check that masking-path-07-b.svg can be imported and it doesn't hang on loading
//it used to hang after d5649ae7b76278cb3155f951d6327157c7c92b65
- Primitive2DSequence aSequenceMaskingPath07b = parseSvg("/svgio/qa/cppunit/data/masking-path-07-b.svg");
+ Primitive2DSequence aSequenceMaskingPath07b = parseSvg(u"/svgio/qa/cppunit/data/masking-path-07-b.svg");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequenceMaskingPath07b.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
@@ -583,7 +584,7 @@ void Test::testMaskingPath07b()
void Test::test123926()
{
- Primitive2DSequence aSequence123926 = parseSvg("/svgio/qa/cppunit/data/tdf123926.svg");
+ Primitive2DSequence aSequence123926 = parseSvg(u"/svgio/qa/cppunit/data/tdf123926.svg");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequence123926.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
@@ -597,7 +598,7 @@ void Test::test123926()
void Test::test47446()
{
//Check that marker's fill attribute is black is not set
- Primitive2DSequence aSequence47446 = parseSvg("/svgio/qa/cppunit/data/47446.svg");
+ Primitive2DSequence aSequence47446 = parseSvg(u"/svgio/qa/cppunit/data/47446.svg");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequence47446.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
@@ -612,7 +613,7 @@ void Test::test47446()
void Test::test47446b()
{
//Check that marker's fill attribute is inherit from def
- Primitive2DSequence aSequence47446b = parseSvg("/svgio/qa/cppunit/data/47446b.svg");
+ Primitive2DSequence aSequence47446b = parseSvg(u"/svgio/qa/cppunit/data/47446b.svg");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequence47446b.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
@@ -627,7 +628,7 @@ void Test::test47446b()
void Test::testMaskText()
{
//Check that mask is applied on text
- Primitive2DSequence aSequenceMaskText = parseSvg("/svgio/qa/cppunit/data/maskText.svg");
+ Primitive2DSequence aSequenceMaskText = parseSvg(u"/svgio/qa/cppunit/data/maskText.svg");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequenceMaskText.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
@@ -645,7 +646,7 @@ void Test::testMaskText()
void Test::testTdf99994()
{
//Check text fontsize when using relative units
- Primitive2DSequence aSequenceTdf99994 = parseSvg("/svgio/qa/cppunit/data/tdf99994.svg");
+ Primitive2DSequence aSequenceTdf99994 = parseSvg(u"/svgio/qa/cppunit/data/tdf99994.svg");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequenceTdf99994.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
@@ -662,7 +663,7 @@ void Test::testTdf99994()
void Test::testTdf99115()
{
//Check that styles are resolved correctly where there is a * css selector
- Primitive2DSequence aSequenceTdf99115 = parseSvg("/svgio/qa/cppunit/data/tdf99115.svg");
+ Primitive2DSequence aSequenceTdf99115 = parseSvg(u"/svgio/qa/cppunit/data/tdf99115.svg");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequenceTdf99115.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
@@ -711,7 +712,7 @@ void Test::testTdf101237()
{
//Check that fill color, stroke color and stroke-width are inherited from use element
//when the element is within a clipPath element
- Primitive2DSequence aSequenceTdf101237 = parseSvg("/svgio/qa/cppunit/data/tdf101237.svg");
+ Primitive2DSequence aSequenceTdf101237 = parseSvg(u"/svgio/qa/cppunit/data/tdf101237.svg");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequenceTdf101237.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
@@ -726,7 +727,7 @@ void Test::testTdf101237()
void Test::testTdf94765()
{
- Primitive2DSequence aSequenceTdf94765 = parseSvg("/svgio/qa/cppunit/data/tdf94765.svg");
+ Primitive2DSequence aSequenceTdf94765 = parseSvg(u"/svgio/qa/cppunit/data/tdf94765.svg");
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequenceTdf94765.getLength()));
drawinglayer::Primitive2dXmlDump dumper;
@@ -754,7 +755,7 @@ void Test::testBehaviourWhenWidthAndHeightIsOrIsNotSet()
// the container.
{
- const Primitive2DSequence aSequence = parseSvg("svgio/qa/cppunit/data/Drawing_WithWidthHeight.svg");
+ const Primitive2DSequence aSequence = parseSvg(u"svgio/qa/cppunit/data/Drawing_WithWidthHeight.svg");
CPPUNIT_ASSERT(aSequence.hasElements());
geometry::RealRectangle2D aRealRect;
@@ -778,7 +779,7 @@ void Test::testBehaviourWhenWidthAndHeightIsOrIsNotSet()
}
{
- const Primitive2DSequence aSequence = parseSvg("svgio/qa/cppunit/data/Drawing_NoWidthHeight.svg");
+ const Primitive2DSequence aSequence = parseSvg(u"svgio/qa/cppunit/data/Drawing_NoWidthHeight.svg");
CPPUNIT_ASSERT(aSequence.hasElements());
diff --git a/svl/qa/unit/lockfiles/test_lockfiles.cxx b/svl/qa/unit/lockfiles/test_lockfiles.cxx
index edaa8c38a10a..78e17f2ca5d1 100644
--- a/svl/qa/unit/lockfiles/test_lockfiles.cxx
+++ b/svl/qa/unit/lockfiles/test_lockfiles.cxx
@@ -9,6 +9,8 @@
#include <sal/config.h>
+#include <string_view>
+
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/plugin/TestPlugIn.h>
#include <test/bootstrapfixture.hxx>
@@ -29,7 +31,7 @@ namespace
{
class LockfileTest : public test::BootstrapFixture
{
- OUString generateTestURL(const OUString& sFileName) const;
+ OUString generateTestURL(std::u16string_view sFileName) const;
public:
void testLOLockFileURL();
@@ -94,15 +96,15 @@ OUString GetLockFileName(const svt::GenDocumentLockFile& rLockFile)
return aDocURL.GetLastName();
}
-OUString LockfileTest::generateTestURL(const OUString& sFileName) const
+OUString LockfileTest::generateTestURL(std::u16string_view sFileName) const
{
- return m_directories.getURLFromWorkdir("/CppunitTest/svl_lockfiles.test.user/") + sFileName;
+ return m_directories.getURLFromWorkdir(u"/CppunitTest/svl_lockfiles.test.user/") + sFileName;
}
void LockfileTest::testLOLockFileURL()
{
// Test the generated file name for LibreOffice lock files
- OUString aTestODT = generateTestURL("testLOLockFileURL.odt");
+ OUString aTestODT = generateTestURL(u"testLOLockFileURL.odt");
svt::DocumentLockFile aLockFile(aTestODT);
CPPUNIT_ASSERT_EQUAL(OUString(".~lock.testLOLockFileURL.odt%23"), GetLockFileName(aLockFile));
@@ -111,7 +113,7 @@ void LockfileTest::testLOLockFileURL()
void LockfileTest::testLOLockFileContent()
{
// Test the lockfile generated for the specified ODT document
- OUString aTestODT = generateTestURL("testLOLockFileContent.odt");
+ OUString aTestODT = generateTestURL(u"testLOLockFileContent.odt");
// Set user name
SvtUserOptions aUserOpt;
@@ -162,7 +164,7 @@ void LockfileTest::testLOLockFileContent()
void LockfileTest::testLOLockFileRT()
{
// Test the lockfile generated for the specified ODT document
- OUString aTestODT = generateTestURL("testLOLockFileRT.odt");
+ OUString aTestODT = generateTestURL(u"testLOLockFileRT.odt");
// Set user name
SvtUserOptions aUserOpt;
@@ -192,7 +194,7 @@ void LockfileTest::testLOLockFileRT()
void LockfileTest::testLOLockFileUnicodeUsername()
{
// Test the lockfile generated for the specified ODT document
- OUString aTestODT = generateTestURL("testLOLockFileUnicodeUsername.odt");
+ OUString aTestODT = generateTestURL(u"testLOLockFileUnicodeUsername.odt");
// Set user name
SvtUserOptions aUserOpt;
@@ -218,7 +220,7 @@ void LockfileTest::testLOLockFileUnicodeUsername()
void LockfileTest::testLOLockFileOverwrite()
{
- OUString aTestODT = generateTestURL("testLOLockFileOverwrite.odt");
+ OUString aTestODT = generateTestURL(u"testLOLockFileOverwrite.odt");
// Set user name
SvtUserOptions aUserOpt;
@@ -259,56 +261,56 @@ void LockfileTest::testWordLockFileURL()
// Word specific file format
{
- OUString aTestFile = generateTestURL("testWordLockFileURL.docx");
+ OUString aTestFile = generateTestURL(u"testWordLockFileURL.docx");
svt::MSODocumentLockFile aLockFile(aTestFile);
CPPUNIT_ASSERT_EQUAL(OUString("~$stWordLockFileURL.docx"), GetLockFileName(aLockFile));
}
// Eight character file name (cuts two characters)
{
- OUString aTestFile = generateTestURL("12345678.docx");
+ OUString aTestFile = generateTestURL(u"12345678.docx");
svt::MSODocumentLockFile aLockFile(aTestFile);
CPPUNIT_ASSERT_EQUAL(OUString("~$345678.docx"), GetLockFileName(aLockFile));
}
// Seven character file name (cuts one character)
{
- OUString aTestFile = generateTestURL("1234567.docx");
+ OUString aTestFile = generateTestURL(u"1234567.docx");
svt::MSODocumentLockFile aLockFile(aTestFile);
CPPUNIT_ASSERT_EQUAL(OUString("~$234567.docx"), GetLockFileName(aLockFile));
}
// Six character file name (cuts no character)
{
- OUString aTestFile = generateTestURL("123456.docx");
+ OUString aTestFile = generateTestURL(u"123456.docx");
svt::MSODocumentLockFile aLockFile(aTestFile);
CPPUNIT_ASSERT_EQUAL(OUString("~$123456.docx"), GetLockFileName(aLockFile));
}
// One character file name
{
- OUString aTestFile = generateTestURL("1.docx");
+ OUString aTestFile = generateTestURL(u"1.docx");
svt::MSODocumentLockFile aLockFile(aTestFile);
CPPUNIT_ASSERT_EQUAL(OUString("~$1.docx"), GetLockFileName(aLockFile));
}
// Test for ODT format
{
- OUString aTestFile = generateTestURL("12345678.odt");
+ OUString aTestFile = generateTestURL(u"12345678.odt");
svt::MSODocumentLockFile aLockFile(aTestFile);
CPPUNIT_ASSERT_EQUAL(OUString("~$345678.odt"), GetLockFileName(aLockFile));
}
// Test for DOC format
{
- OUString aTestFile = generateTestURL("12345678.doc");
+ OUString aTestFile = generateTestURL(u"12345678.doc");
svt::MSODocumentLockFile aLockFile(aTestFile);
CPPUNIT_ASSERT_EQUAL(OUString("~$345678.doc"), GetLockFileName(aLockFile));
}
// Test for RTF format
{
- OUString aTestFile = generateTestURL("12345678.rtf");
+ OUString aTestFile = generateTestURL(u"12345678.rtf");
svt::MSODocumentLockFile aLockFile(aTestFile);
CPPUNIT_ASSERT_EQUAL(OUString("~$345678.rtf"), GetLockFileName(aLockFile));
}
@@ -318,28 +320,28 @@ void LockfileTest::testExcelLockFileURL()
{
// Test the generated file name for Excel lock files
{
- OUString aTestFile = generateTestURL("testExcelLockFileURL.xlsx");
+ OUString aTestFile = generateTestURL(u"testExcelLockFileURL.xlsx");
svt::MSODocumentLockFile aLockFile(aTestFile);
CPPUNIT_ASSERT_EQUAL(OUString("~$testExcelLockFileURL.xlsx"), GetLockFileName(aLockFile));
}
// Eight character file name
{
- OUString aTestFile = generateTestURL("12345678.xlsx");
+ OUString aTestFile = generateTestURL(u"12345678.xlsx");
svt::MSODocumentLockFile aLockFile(aTestFile);
CPPUNIT_ASSERT_EQUAL(OUString("~$12345678.xlsx"), GetLockFileName(aLockFile));
}
// One character file name
{
- OUString aTestFile = generateTestURL("1.xlsx");
+ OUString aTestFile = generateTestURL(u"1.xlsx");
svt::MSODocumentLockFile aLockFile(aTestFile);
CPPUNIT_ASSERT_EQUAL(OUString("~$1.xlsx"), GetLockFileName(aLockFile));
}
// Test for ODS format
{
- OUString aTestFile = generateTestURL("12345678.ods");
+ OUString aTestFile = generateTestURL(u"12345678.ods");
svt::MSODocumentLockFile aLockFile(aTestFile);
CPPUNIT_ASSERT_EQUAL(OUString("~$12345678.ods"), GetLockFileName(aLockFile));
}
@@ -349,7 +351,7 @@ void LockfileTest::testPowerPointLockFileURL()
{
// Test the generated file name for PowerPoint lock files
{
- OUString aTestFile = generateTestURL("testPowerPointLockFileURL.pptx");
+ OUString aTestFile = generateTestURL(u"testPowerPointLockFileURL.pptx");
svt::MSODocumentLockFile aLockFile(aTestFile);
CPPUNIT_ASSERT_EQUAL(OUString("~$testPowerPointLockFileURL.pptx"),
GetLockFileName(aLockFile));
@@ -357,28 +359,28 @@ void LockfileTest::testPowerPointLockFileURL()
// Eight character file name
{
- OUString aTestFile = generateTestURL("12345678.pptx");
+ OUString aTestFile = generateTestURL(u"12345678.pptx");
svt::MSODocumentLockFile aLockFile(aTestFile);
CPPUNIT_ASSERT_EQUAL(OUString("~$12345678.pptx"), GetLockFileName(aLockFile));
}
// One character file name
{
- OUString aTestFile = generateTestURL("1.pptx");
+ OUString aTestFile = generateTestURL(u"1.pptx");
svt::MSODocumentLockFile aLockFile(aTestFile);
CPPUNIT_ASSERT_EQUAL(OUString("~$1.pptx"), GetLockFileName(aLockFile));
}
// Test for PPT format
{
- OUString aTestFile = generateTestURL("12345678.ppt");
+ OUString aTestFile = generateTestURL(u"12345678.ppt");
svt::MSODocumentLockFile aLockFile(aTestFile);
CPPUNIT_ASSERT_EQUAL(OUString("~$12345678.ppt"), GetLockFileName(aLockFile));
}
// Test for ODP format
{
- OUString aTestFile = generateTestURL("/12345678.odp");
+ OUString aTestFile = generateTestURL(u"/12345678.odp");
svt::MSODocumentLockFile aLockFile(aTestFile);
CPPUNIT_ASSERT_EQUAL(OUString("~$12345678.odp"), GetLockFileName(aLockFile));
}
@@ -387,7 +389,7 @@ void LockfileTest::testPowerPointLockFileURL()
void LockfileTest::testWordLockFileContent()
{
// Test the lockfile generated for the specified DOCX document
- OUString aTestFile = generateTestURL("testWordLockFileContent.docx");
+ OUString aTestFile = generateTestURL(u"testWordLockFileContent.docx");
// Set user name
SvtUserOptions aUserOpt;
@@ -441,7 +443,7 @@ void LockfileTest::testWordLockFileContent()
void LockfileTest::testExcelLockFileContent()
{
// Test the lockfile generated for the specified XLSX document
- OUString aTestFile = generateTestURL("testExcelLockFileContent.xlsx");
+ OUString aTestFile = generateTestURL(u"testExcelLockFileContent.xlsx");
// Set user name
SvtUserOptions aUserOpt;
@@ -500,7 +502,7 @@ void LockfileTest::testExcelLockFileContent()
void LockfileTest::testPowerPointLockFileContent()
{
// Test the lockfile generated for the specified PPTX document
- OUString aTestFile = generateTestURL("testPowerPointLockFileContent.pptx");
+ OUString aTestFile = generateTestURL(u"testPowerPointLockFileContent.pptx");
// Set user name
SvtUserOptions aUserOpt;
@@ -560,7 +562,7 @@ void LockfileTest::testPowerPointLockFileContent()
void LockfileTest::testWordLockFileRT()
{
- OUString aTestODT = generateTestURL("testWordLockFileRT.docx");
+ OUString aTestODT = generateTestURL(u"testWordLockFileRT.docx");
// Set user name
SvtUserOptions aUserOpt;
@@ -581,7 +583,7 @@ void LockfileTest::testWordLockFileRT()
void LockfileTest::testExcelLockFileRT()
{
- OUString aTestODT = generateTestURL("testExcelLockFileRT.xlsx");
+ OUString aTestODT = generateTestURL(u"testExcelLockFileRT.xlsx");
// Set user name
SvtUserOptions aUserOpt;
@@ -602,7 +604,7 @@ void LockfileTest::testExcelLockFileRT()
void LockfileTest::testPowerPointLockFileRT()
{
- OUString aTestODT = generateTestURL("testPowerPointLockFileRT.pptx");
+ OUString aTestODT = generateTestURL(u"testPowerPointLockFileRT.pptx");
// Set user name
SvtUserOptions aUserOpt;
@@ -623,7 +625,7 @@ void LockfileTest::testPowerPointLockFileRT()
void LockfileTest::testMSOLockFileLongUserName()
{
- OUString aTestODT = generateTestURL("testMSOLockFileLongUserName.docx");
+ OUString aTestODT = generateTestURL(u"testMSOLockFileLongUserName.docx");
// Set user name
SvtUserOptions aUserOpt;
@@ -649,7 +651,7 @@ void LockfileTest::testMSOLockFileLongUserName()
void LockfileTest::testMSOLockFileUnicodeUsername()
{
// Test the lockfile generated for the specified ODT document
- OUString aTestODT = generateTestURL("testMSOLockFileUnicodeUsername.docx");
+ OUString aTestODT = generateTestURL(u"testMSOLockFileUnicodeUsername.docx");
// Set user name
SvtUserOptions aUserOpt;
@@ -675,7 +677,7 @@ void LockfileTest::testMSOLockFileUnicodeUsername()
void LockfileTest::testMSOLockFileOverwrite()
{
- OUString aTestODT = generateTestURL("testMSOLockFileOverwrite.docx");
+ OUString aTestODT = generateTestURL(u"testMSOLockFileOverwrite.docx");
// Set user name
SvtUserOptions aUserOpt;
diff --git a/svl/source/misc/documentlockfile.cxx b/svl/source/misc/documentlockfile.cxx
index 935a568310fc..096b1e4e8544 100644
--- a/svl/source/misc/documentlockfile.cxx
+++ b/svl/source/misc/documentlockfile.cxx
@@ -164,7 +164,7 @@ void GenDocumentLockFile::RemoveFileDirectly()
DocumentLockFile::DocumentLockFile( const OUString& aOrigURL )
- : GenDocumentLockFile(GenerateOwnLockFileURL(aOrigURL, ".~lock."))
+ : GenDocumentLockFile(GenerateOwnLockFileURL(aOrigURL, u".~lock."))
{
}
diff --git a/svl/source/misc/lockfilecommon.cxx b/svl/source/misc/lockfilecommon.cxx
index 405e3a229042..ed1054d8c03d 100644
--- a/svl/source/misc/lockfilecommon.cxx
+++ b/svl/source/misc/lockfilecommon.cxx
@@ -69,7 +69,8 @@ void LockFileCommon::SetURL(const OUString& aURL)
}
-OUString LockFileCommon::GenerateOwnLockFileURL(const OUString& aOrigURL, const OUString& aPrefix)
+OUString LockFileCommon::GenerateOwnLockFileURL(
+ const OUString& aOrigURL, std::u16string_view aPrefix)
{
INetURLObject aURL = ResolveLinks(INetURLObject(aOrigURL));
aURL.setName(aPrefix + aURL.GetLastName() + "%23" /*'#'*/);
diff --git a/svl/source/misc/sharecontrolfile.cxx b/svl/source/misc/sharecontrolfile.cxx
index cda98d014759..0ddc3efddd25 100644
--- a/svl/source/misc/sharecontrolfile.cxx
+++ b/svl/source/misc/sharecontrolfile.cxx
@@ -45,7 +45,7 @@ namespace svt {
ShareControlFile::ShareControlFile( const OUString& aOrigURL )
- : LockFileCommon(GenerateOwnLockFileURL(aOrigURL, ".~sharing."))
+ : LockFileCommon(GenerateOwnLockFileURL(aOrigURL, u".~sharing."))
{
if ( !m_xStream.is() && !GetURL().isEmpty() )
{
diff --git a/svtools/qa/unit/svtools-dialogs-test.cxx b/svtools/qa/unit/svtools-dialogs-test.cxx
index 85537fc42572..974cf5347cbd 100644
--- a/svtools/qa/unit/svtools-dialogs-test.cxx
+++ b/svtools/qa/unit/svtools-dialogs-test.cxx
@@ -51,7 +51,7 @@ VclPtr<VclAbstractDialog> SvtoolsDialogsTest::createDialogByID(sal_uInt32 /*nID*
void SvtoolsDialogsTest::openAnyDialog()
{
/// process input file containing the UXMLDescriptions of the dialogs to dump
- processDialogBatchFile("svtools/qa/unit/data/svtools-dialogs-test.txt");
+ processDialogBatchFile(u"svtools/qa/unit/data/svtools-dialogs-test.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(SvtoolsDialogsTest);
diff --git a/svtools/qa/unit/testHtmlReader.cxx b/svtools/qa/unit/testHtmlReader.cxx
index 4e5638cc59b7..146458a200eb 100644
--- a/svtools/qa/unit/testHtmlReader.cxx
+++ b/svtools/qa/unit/testHtmlReader.cxx
@@ -70,7 +70,7 @@ CPPUNIT_TEST_FIXTURE(Test, testLineBreak)
aStream.Seek(0);
tools::SvRef<TestHTMLParser> xParser = new TestHTMLParser(aStream);
- xParser->SetNamespace("reqif-xhtml");
+ xParser->SetNamespace(u"reqif-xhtml");
xParser->CallParser();
// This was 2, <br></br> was interpreted as 2 line breaks in XHTML mode.
diff --git a/svtools/source/config/extcolorcfg.cxx b/svtools/source/config/extcolorcfg.cxx
index 707047f8b535..397d83b1cf94 100644
--- a/svtools/source/config/extcolorcfg.cxx
+++ b/svtools/source/config/extcolorcfg.cxx
@@ -20,6 +20,7 @@
#include <sal/config.h>
#include <map>
+#include <string_view>
#include <svtools/extcolorcfg.hxx>
#include <com/sun/star/uno/Any.hxx>
@@ -85,7 +86,7 @@ public:
void CommitCurrentSchemeName();
//changes the name of the current scheme but doesn't load it!
void SetCurrentSchemeName(const OUString& rSchemeName) {m_sLoadedScheme = rSchemeName;}
- bool ExistsScheme(const OUString& _sSchemeName);
+ bool ExistsScheme(std::u16string_view _sSchemeName);
virtual void Notify( const uno::Sequence<OUString>& aPropertyNames) override;
sal_Int32 GetComponentCount() const;
@@ -290,7 +291,7 @@ void ExtendedColorConfig_Impl::Load(const OUString& rScheme)
if ( sScheme != "default" )
{
- if ( ExistsScheme("default") )
+ if ( ExistsScheme(u"default") )
{
aComponentNames = GetPropertyNames("ExtendedColorScheme/ColorSchemes/default");
FillComponentColors(aComponentNames,aDisplayNameMap);
@@ -426,12 +427,12 @@ void ExtendedColorConfig_Impl::CommitCurrentSchemeName()
PutProperties(aCurrent, aCurrentVal);
}
-bool ExtendedColorConfig_Impl::ExistsScheme(const OUString& _sSchemeName)
+bool ExtendedColorConfig_Impl::ExistsScheme(std::u16string_view _sSchemeName)
{
OUString sBase("ExtendedColorScheme/ColorSchemes");
uno::Sequence < OUString > aComponentNames = GetPropertyNames(sBase);
- sBase += "/" + _sSchemeName;
+ sBase += OUString::Concat("/") + _sSchemeName;
return comphelper::findValue(aComponentNames, sBase) != -1;
}
diff --git a/svtools/source/dialogs/prnsetup.cxx b/svtools/source/dialogs/prnsetup.cxx
index 6b95d7fb1bb7..054a7b0f077d 100644
--- a/svtools/source/dialogs/prnsetup.cxx
+++ b/svtools/source/dialogs/prnsetup.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <svtools/prnsetup.hxx>
#include <svtools/strings.hrc>
#include <svtools/svtresid.hxx>
@@ -121,7 +125,7 @@ void ImplPrnDlgUpdateQueueInfo( const weld::ComboBox* pBox, QueueInfo& rInfo )
}
-static OUString ImplPrnDlgAddString(const OUString& rStr, const OUString& rAddStr)
+static OUString ImplPrnDlgAddString(const OUString& rStr, std::u16string_view rAddStr)
{
OUString aStr(rStr);
if (!aStr.isEmpty())
diff --git a/svtools/source/misc/langtab.cxx b/svtools/source/misc/langtab.cxx
index c8479d92445b..7bd30f365158 100644
--- a/svtools/source/misc/langtab.cxx
+++ b/svtools/source/misc/langtab.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/i18n/DirectionProperty.hpp>
#include <com/sun/star/uno/Sequence.hxx>
@@ -152,7 +156,7 @@ OUString ApplyLreOrRleEmbedding( const OUString &rText )
return aRes;
}
-static OUString lcl_getDescription( const OUString& rBcp47 )
+static OUString lcl_getDescription( std::u16string_view rBcp47 )
{
// Place in curly brackets, so all on-the-fly tags are grouped together at
// the top of a listbox (but behind the "[None]" entry), and not sprinkled
@@ -161,7 +165,7 @@ static OUString lcl_getDescription( const OUString& rBcp47 )
/* TODO: pulling descriptive names (language, script, country, subtags)
* from liblangtag or ISO databases might be nice, but those are English
* only. Maybe ICU, that has translations for language and country. */
- return "{" + rBcp47 + "}";
+ return OUString::Concat("{") + rBcp47 + "}";
}
SvtLanguageTableImpl::SvtLanguageTableImpl()
diff --git a/svtools/source/svhtml/HtmlWriter.cxx b/svtools/source/svhtml/HtmlWriter.cxx
index ce398757b0d2..dd2f40c6d16f 100644
--- a/svtools/source/svhtml/HtmlWriter.cxx
+++ b/svtools/source/svhtml/HtmlWriter.cxx
@@ -11,16 +11,16 @@
#include <svtools/HtmlWriter.hxx>
#include <tools/stream.hxx>
-HtmlWriter::HtmlWriter(SvStream& rStream, const OString& rNamespace) :
+HtmlWriter::HtmlWriter(SvStream& rStream, std::string_view rNamespace) :
mrStream(rStream),
mbElementOpen(false),
mbCharactersWritten(false),
mbPrettyPrint(true)
{
- if (!rNamespace.isEmpty())
+ if (!rNamespace.empty())
{
// Convert namespace alias to a prefix.
- maNamespace = rNamespace + ":";
+ maNamespace = OString::Concat(rNamespace) + ":";
}
}
diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx
index 76791dc5abcd..be66cc8b6ac8 100644
--- a/svtools/source/svhtml/parhtml.cxx
+++ b/svtools/source/svhtml/parhtml.cxx
@@ -238,10 +238,10 @@ HTMLParser::~HTMLParser()
{
}
-void HTMLParser::SetNamespace(const OUString& rNamespace)
+void HTMLParser::SetNamespace(std::u16string_view rNamespace)
{
// Convert namespace alias to a prefix.
- maNamespace = rNamespace + ":";
+ maNamespace = OUString::Concat(rNamespace) + ":";
}
namespace
diff --git a/svx/qa/unit/customshapes.cxx b/svx/qa/unit/customshapes.cxx
index e3a5e0ac92a3..fe4e22f0a909 100644
--- a/svx/qa/unit/customshapes.cxx
+++ b/svx/qa/unit/customshapes.cxx
@@ -90,29 +90,32 @@ sal_uInt8 CustomshapesTest::countShapes()
return xDrawPage->getCount();
}
-void lcl_AssertRectEqualWithTolerance(const OString& sInfo, const tools::Rectangle& rExpected,
+void lcl_AssertRectEqualWithTolerance(std::string_view sInfo, const tools::Rectangle& rExpected,
const tools::Rectangle& rActual, const sal_Int32 nTolerance)
{
// Left
- OString sMsg = sInfo + " Left expected " + OString::number(rExpected.Left()) + " actual "
- + OString::number(rActual.Left()) + " Tolerance " + OString::number(nTolerance);
+ OString sMsg = OString::Concat(sInfo) + " Left expected " + OString::number(rExpected.Left())
+ + " actual " + OString::number(rActual.Left()) + " Tolerance "
+ + OString::number(nTolerance);
CPPUNIT_ASSERT_MESSAGE(sMsg.getStr(),
std::abs(rExpected.Left() - rActual.Left()) <= nTolerance);
// Top
- sMsg = sInfo + " Top expected " + OString::number(rExpected.Top()) + " actual "
+ sMsg = OString::Concat(sInfo) + " Top expected " + OString::number(rExpected.Top()) + " actual "
+ OString::number(rActual.Top()) + " Tolerance " + OString::number(nTolerance);
CPPUNIT_ASSERT_MESSAGE(sMsg.getStr(), std::abs(rExpected.Top() - rActual.Top()) <= nTolerance);
// Width
- sMsg = sInfo + " Width expected " + OString::number(rExpected.GetWidth()) + " actual "
- + OString::number(rActual.GetWidth()) + " Tolerance " + OString::number(nTolerance);
+ sMsg = OString::Concat(sInfo) + " Width expected " + OString::number(rExpected.GetWidth())
+ + " actual " + OString::number(rActual.GetWidth()) + " Tolerance "
+ + OString::number(nTolerance);
CPPUNIT_ASSERT_MESSAGE(sMsg.getStr(),
std::abs(rExpected.GetWidth() - rActual.GetWidth()) <= nTolerance);
// Height
- sMsg = sInfo + " Height expected " + OString::number(rExpected.GetHeight()) + " actual "
- + OString::number(rActual.GetHeight()) + " Tolerance " + OString::number(nTolerance);
+ sMsg = OString::Concat(sInfo) + " Height expected " + OString::number(rExpected.GetHeight())
+ + " actual " + OString::number(rActual.GetHeight()) + " Tolerance "
+ + OString::number(nTolerance);
CPPUNIT_ASSERT_MESSAGE(sMsg.getStr(),
std::abs(rExpected.GetHeight() - rActual.GetHeight()) <= nTolerance);
}
diff --git a/svx/qa/unit/gallery/test_gallery.cxx b/svx/qa/unit/gallery/test_gallery.cxx
index 96bcc16fdc07..641101e11a50 100644
--- a/svx/qa/unit/gallery/test_gallery.cxx
+++ b/svx/qa/unit/gallery/test_gallery.cxx
@@ -316,7 +316,7 @@ void GalleryObjTest::TestInsertGalleryObject()
for (sal_uInt32 i = 0; i < static_cast<sal_uInt32>(imageList.size()); i++)
{
OUString imageNameFromList(imageList[i]);
- OUString aURL(m_directories.getURLFromSrc("/svx/qa/unit/gallery/data/")
+ OUString aURL(m_directories.getURLFromSrc(u"/svx/qa/unit/gallery/data/")
+ imageNameFromList);
CPPUNIT_ASSERT_MESSAGE("Could not insert object into theme",
pGalleryTheme->InsertURL(INetURLObject(aURL)));
@@ -361,7 +361,7 @@ void GalleryObjTest::TestRemoveGalleryObject()
for (sal_uInt32 i = 0; i < static_cast<sal_uInt32>(imageList.size()); i++)
{
OUString imageNameFromList(imageList[i]);
- OUString aURL(m_directories.getURLFromSrc("/svx/qa/unit/gallery/data/")
+ OUString aURL(m_directories.getURLFromSrc(u"/svx/qa/unit/gallery/data/")
+ imageNameFromList);
CPPUNIT_ASSERT_MESSAGE("Could not insert object into theme",
pGalleryTheme->InsertURL(INetURLObject(aURL)));
@@ -416,7 +416,7 @@ void GalleryObjTest::TestChangePositionGalleryObject()
for (sal_uInt32 i = 0; i < (sizeof(imageList) / sizeof(imageList[0])); i++)
{
OUString imageNameFromList(imageList[i]);
- OUString aURL(m_directories.getURLFromSrc("/svx/qa/unit/gallery/data/")
+ OUString aURL(m_directories.getURLFromSrc(u"/svx/qa/unit/gallery/data/")
+ imageNameFromList);
CPPUNIT_ASSERT_MESSAGE("Could not insert object into theme",
pGalleryTheme->InsertURL(INetURLObject(aURL)));
diff --git a/svx/qa/unit/sdr.cxx b/svx/qa/unit/sdr.cxx
index b087e1144ba8..49f4baa7182c 100644
--- a/svx/qa/unit/sdr.cxx
+++ b/svx/qa/unit/sdr.cxx
@@ -57,7 +57,7 @@ CPPUNIT_TEST_FIXTURE(SdrTest, testShadowScaleOrigin)
{
// Load a document containing a custom shape.
test::Directories aDirectories;
- OUString aURL = aDirectories.getURLFromSrc("svx/qa/unit/data/shadow-scale-origin.pptx");
+ OUString aURL = aDirectories.getURLFromSrc(u"svx/qa/unit/data/shadow-scale-origin.pptx");
getComponent() = loadFromDesktop(aURL);
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
diff --git a/svx/qa/unit/svx-dialogs-test.cxx b/svx/qa/unit/svx-dialogs-test.cxx
index 0a182e7fb026..32c632c991cf 100644
--- a/svx/qa/unit/svx-dialogs-test.cxx
+++ b/svx/qa/unit/svx-dialogs-test.cxx
@@ -48,7 +48,7 @@ VclPtr<VclAbstractDialog> SvxDialogsTest::createDialogByID(sal_uInt32 /*nID*/) {
void SvxDialogsTest::openAnyDialog()
{
/// process input file containing the UXMLDescriptions of the dialogs to dump
- processDialogBatchFile("svx/qa/unit/data/svx-dialogs-test.txt");
+ processDialogBatchFile(u"svx/qa/unit/data/svx-dialogs-test.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(SvxDialogsTest);
diff --git a/svx/qa/unit/xoutdev.cxx b/svx/qa/unit/xoutdev.cxx
index 0b5148b393d5..f422b5141705 100644
--- a/svx/qa/unit/xoutdev.cxx
+++ b/svx/qa/unit/xoutdev.cxx
@@ -39,7 +39,7 @@ CPPUNIT_TEST_FIXTURE(XOutdevTest, testPdfGraphicExport)
// Import the graphic.
Graphic aGraphic;
test::Directories aDirectories;
- OUString aURL = aDirectories.getURLFromSrc("svx/qa/unit/data/graphic.pdf");
+ OUString aURL = aDirectories.getURLFromSrc(u"svx/qa/unit/data/graphic.pdf");
SvFileStream aStream(aURL, StreamMode::READ);
CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE,
GraphicFilter::GetGraphicFilter().ImportGraphic(aGraphic, aURL, aStream));
diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx
index aec343857f75..34e3f228cbb4 100644
--- a/svx/source/form/fmview.cxx
+++ b/svx/source/form/fmview.cxx
@@ -555,7 +555,7 @@ void FmFormView::createControlLabelPair( OutputDevice const * _pOutDev, sal_Int3
FmXFormView::createControlLabelPair(
*_pOutDev, _nXOffsetMM, _nYOffsetMM,
_rxField, _rxNumberFormats,
- _nControlObjectID, "", _nInventor, _nLabelObjectID,
+ _nControlObjectID, u"", _nInventor, _nLabelObjectID,
_rModel,
_rpLabel, _rpControl
);
diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx
index 148eba130028..f197548cad70 100644
--- a/svx/source/form/fmvwimp.cxx
+++ b/svx/source/form/fmvwimp.cxx
@@ -1471,7 +1471,7 @@ SdrObjectUniquePtr FmXFormView::implCreateXFormsControl( const svx::OXFormsDescr
bool FmXFormView::createControlLabelPair( OutputDevice const & _rOutDev, sal_Int32 _nXOffsetMM, sal_Int32 _nYOffsetMM,
const Reference< XPropertySet >& _rxField, const Reference< XNumberFormats >& _rxNumberFormats,
- SdrObjKind _nControlObjectID, const OUString& _rFieldPostfix,
+ SdrObjKind _nControlObjectID, std::u16string_view _rFieldPostfix,
std::unique_ptr<SdrUnoObj, SdrObjectFreeOp>& _rpLabel,
std::unique_ptr<SdrUnoObj, SdrObjectFreeOp>& _rpControl,
const Reference< XDataSource >& _rxDataSource, const OUString& _rDataSourceName,
@@ -1517,7 +1517,7 @@ bool FmXFormView::createControlLabelPair( OutputDevice const & _rOutDev, sal_Int
bool FmXFormView::createControlLabelPair( OutputDevice const & _rOutDev, sal_Int32 _nXOffsetMM, sal_Int32 _nYOffsetMM,
const Reference< XPropertySet >& _rxField,
const Reference< XNumberFormats >& _rxNumberFormats, SdrObjKind _nControlObjectID,
- const OUString& _rFieldPostfix, SdrInventor _nInventor, SdrObjKind _nLabelObjectID,
+ std::u16string_view _rFieldPostfix, SdrInventor _nInventor, SdrObjKind _nLabelObjectID,
SdrModel& _rModel,
std::unique_ptr<SdrUnoObj, SdrObjectFreeOp>& _rpLabel, std::unique_ptr<SdrUnoObj, SdrObjectFreeOp>& _rpControl)
{
diff --git a/svx/source/inc/fmvwimp.hxx b/svx/source/inc/fmvwimp.hxx
index 3a1f254d51e5..36f1dcda1883 100644
--- a/svx/source/inc/fmvwimp.hxx
+++ b/svx/source/inc/fmvwimp.hxx
@@ -24,6 +24,7 @@
#include <map>
#include <memory>
#include <set>
+#include <string_view>
#include <svx/svdmark.hxx>
#include <svx/svdobj.hxx>
@@ -249,7 +250,7 @@ private:
const css::uno::Reference< css::beans::XPropertySet >& _rxField,
const css::uno::Reference< css::util::XNumberFormats >& _rxNumberFormats,
SdrObjKind _nControlObjectID,
- const OUString& _rFieldPostfix,
+ std::u16string_view _rFieldPostfix,
SdrInventor _nInventor,
SdrObjKind _nLabelObjectID,
@@ -268,7 +269,7 @@ private:
const css::uno::Reference< css::beans::XPropertySet >& _rxField,
const css::uno::Reference< css::util::XNumberFormats >& _rxNumberFormats,
SdrObjKind _nControlObjectID,
- const OUString& _rFieldPostfix,
+ std::u16string_view _rFieldPostfix,
std::unique_ptr<SdrUnoObj, SdrObjectFreeOp>& _rpLabel,
std::unique_ptr<SdrUnoObj, SdrObjectFreeOp>& _rpControl,
const css::uno::Reference< css::sdbc::XDataSource >& _rxDataSource,
diff --git a/svx/source/smarttags/SmartTagMgr.cxx b/svx/source/smarttags/SmartTagMgr.cxx
index 8d82643c82aa..4733a466663d 100644
--- a/svx/source/smarttags/SmartTagMgr.cxx
+++ b/svx/source/smarttags/SmartTagMgr.cxx
@@ -61,7 +61,7 @@ SmartTagMgr::~SmartTagMgr()
{
}
-void SmartTagMgr::Init( const OUString& rConfigurationGroupName )
+void SmartTagMgr::Init( std::u16string_view rConfigurationGroupName )
{
PrepareConfiguration( rConfigurationGroupName );
ReadConfiguration( true, true );
@@ -372,9 +372,10 @@ void SmartTagMgr::LoadLibraries()
}
-void SmartTagMgr::PrepareConfiguration( const OUString& rConfigurationGroupName )
+void SmartTagMgr::PrepareConfiguration( std::u16string_view rConfigurationGroupName )
{
- Any aAny = makeAny( "/org.openoffice.Office.Common/SmartTags/" + rConfigurationGroupName );
+ Any aAny = makeAny(
+ OUString::Concat("/org.openoffice.Office.Common/SmartTags/") + rConfigurationGroupName );
beans::PropertyValue aPathArgument;
aPathArgument.Name = "nodepath";
aPathArgument.Value = aAny;
diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx
index 42c7a6c59c8d..47e30a1049ac 100644
--- a/svx/source/svdraw/svdomedia.cxx
+++ b/svx/source/svdraw/svdomedia.cxx
@@ -268,7 +268,7 @@ void SdrMediaObj::SetInputStream(uno::Reference<io::XInputStream> const& xStream
::avmedia::CreateMediaTempFile(
xStream,
tempFileURL,
- ""));
+ u""));
if (bSuccess)
{
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 7adb1981a738..cefa978ff29b 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -48,6 +48,7 @@
#include <algorithm>
#include <memory>
+#include <string_view>
#include <utility>
using namespace com::sun::star;
@@ -608,11 +609,11 @@ OUString SAL_CALL SvXMLGraphicHelper::saveGraphicByName(css::uno::Reference<css:
OUString SAL_CALL SvXMLGraphicHelper::saveGraphic(css::uno::Reference<css::graphic::XGraphic> const & rxGraphic)
{
OUString aOutMimeType;
- return implSaveGraphic(rxGraphic, aOutMimeType, OUString());
+ return implSaveGraphic(rxGraphic, aOutMimeType, std::u16string_view());
}
OUString SvXMLGraphicHelper::implSaveGraphic(css::uno::Reference<css::graphic::XGraphic> const & rxGraphic,
- OUString & rOutSavedMimeType, OUString const & rRequestName)
+ OUString & rOutSavedMimeType, std::u16string_view rRequestName)
{
Graphic aGraphic(rxGraphic);
@@ -697,7 +698,7 @@ OUString SvXMLGraphicHelper::implSaveGraphic(css::uno::Reference<css::graphic::X
}
OUString rPictureStreamName;
- if (!rRequestName.isEmpty())
+ if (!rRequestName.empty())
{
rPictureStreamName = rRequestName + aExtension;
}
diff --git a/sw/inc/docstyle.hxx b/sw/inc/docstyle.hxx
index 8e79ee930a30..30f176bf0633 100644
--- a/sw/inc/docstyle.hxx
+++ b/sw/inc/docstyle.hxx
@@ -28,6 +28,7 @@
#include <unordered_map>
#include <memory>
+#include <string_view>
#include <vector>
class SwDoc;
@@ -152,12 +153,12 @@ class SwStyleSheetIterator : public SfxStyleSheetIterator, public SfxListener
void rehash();
public:
SwPoolFormatList() {}
- void Append( char cChar, const OUString& rStr );
+ void Append( char cChar, std::u16string_view rStr );
void clear() { maImpl.clear(); maUnique.clear(); }
size_t size() { return maImpl.size(); }
bool empty() { return maImpl.empty(); }
- sal_uInt32 FindName(SfxStyleFamily eFam, const OUString &rName);
- void RemoveName(SfxStyleFamily eFam, const OUString &rName);
+ sal_uInt32 FindName(SfxStyleFamily eFam, std::u16string_view rName);
+ void RemoveName(SfxStyleFamily eFam, std::u16string_view rName);
const OUString &operator[](sal_uInt32 nIdx) { return maImpl[ nIdx ]; }
};
diff --git a/sw/inc/unocrsrhelper.hxx b/sw/inc/unocrsrhelper.hxx
index eb0dbdb0d540..28984e6950e3 100644
--- a/sw/inc/unocrsrhelper.hxx
+++ b/sw/inc/unocrsrhelper.hxx
@@ -24,6 +24,7 @@
#include "pam.hxx"
#include <map>
+#include <string_view>
class SfxItemSet;
class SfxItemPropertySet;
@@ -176,7 +177,7 @@ namespace SwUnoCursorHelper
css::uno::Any GetPropertyValue(
SwPaM& rPaM,
const SfxItemPropertySet & rPropSet,
- const OUString & rPropertyName);
+ std::u16string_view rPropertyName);
/// @throws css::beans::UnknownPropertyException
/// @throws css::uno::RuntimeException
css::uno::Sequence< css::beans::PropertyState > GetPropertyStates(
@@ -197,14 +198,14 @@ namespace SwUnoCursorHelper
void SetPropertyToDefault(
SwPaM & rPaM,
const SfxItemPropertySet & rPropSet,
- const OUString & rPropertyName);
+ std::u16string_view rPropertyName);
/// @throws css::beans::UnknownPropertyException
/// @throws css::lang::WrappedTargetException
/// @throws css::uno::RuntimeException
css::uno::Any GetPropertyDefault(
SwPaM const & rPaM,
const SfxItemPropertySet & rPropSet,
- const OUString & rPropertyName);
+ std::u16string_view rPropertyName);
bool SetPageDesc(
const css::uno::Any& rValue,
diff --git a/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx b/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
index 2d3f411d88f0..bc3446f30514 100644
--- a/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
+++ b/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
@@ -17,7 +17,7 @@ class AccessibilityCheckTest : public SwModelTestBase
public:
SwDoc* createDoc(const char* pName = nullptr)
{
- load("/sw/qa/core/accessibilitycheck/data/", pName);
+ load(u"/sw/qa/core/accessibilitycheck/data/", pName);
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
CPPUNIT_ASSERT(pTextDoc);
return pTextDoc->GetDocShell()->GetDoc();
diff --git a/sw/qa/core/filters-test.cxx b/sw/qa/core/filters-test.cxx
index 5db4e52fcb9e..c39f4e48edf5 100644
--- a/sw/qa/core/filters-test.cxx
+++ b/sw/qa/core/filters-test.cxx
@@ -129,50 +129,50 @@ bool SwFiltersTest::filter(const OUString &rFilter, const OUString &rURL,
void SwFiltersTest::testCVEs()
{
testDir("StarOffice XML (Writer)",
- m_directories.getURLFromSrc("/sw/qa/core/data/xml/"),
+ m_directories.getURLFromSrc(u"/sw/qa/core/data/xml/"),
FILTER_XML,
SfxFilterFlags::IMPORT | SfxFilterFlags::OWN | SfxFilterFlags::DEFAULT,
isstorage, SOFFICE_FILEFORMAT_CURRENT);
testDir("writer8",
- m_directories.getURLFromSrc("/sw/qa/core/data/odt/"),
+ m_directories.getURLFromSrc(u"/sw/qa/core/data/odt/"),
FILTER_XML,
SfxFilterFlags::IMPORT | SfxFilterFlags::OWN | SfxFilterFlags::DEFAULT,
isstorage, SOFFICE_FILEFORMAT_CURRENT);
testDir("MS Word 97",
- m_directories.getURLFromSrc("/sw/qa/core/data/ww8/"),
+ m_directories.getURLFromSrc(u"/sw/qa/core/data/ww8/"),
FILTER_WW8);
testDir("MS WinWord 5",
- m_directories.getURLFromSrc("/sw/qa/core/data/ww5/"),
+ m_directories.getURLFromSrc(u"/sw/qa/core/data/ww5/"),
sWW5);
testDir("Text (encoded)",
- m_directories.getURLFromSrc("/sw/qa/core/data/txt/"),
+ m_directories.getURLFromSrc(u"/sw/qa/core/data/txt/"),
FILTER_TEXT_DLG);
testDir("MS Word 2007 XML",
- m_directories.getURLFromSrc("/sw/qa/core/data/ooxml/"),
+ m_directories.getURLFromSrc(u"/sw/qa/core/data/ooxml/"),
OUString(),
SfxFilterFlags::STARONEFILTER);
testDir("Rich Text Format",
- m_directories.getURLFromSrc("/sw/qa/core/data/rtf/"),
+ m_directories.getURLFromSrc(u"/sw/qa/core/data/rtf/"),
OUString(),
SfxFilterFlags::STARONEFILTER);
testDir("HTML",
- m_directories.getURLFromSrc("/sw/qa/core/data/html/"),
+ m_directories.getURLFromSrc(u"/sw/qa/core/data/html/"),
sHTML);
testDir("T602Document",
- m_directories.getURLFromSrc("/sw/qa/core/data/602/"),
+ m_directories.getURLFromSrc(u"/sw/qa/core/data/602/"),
OUString(),
SfxFilterFlags::STARONEFILTER);
testDir("Rich Text Format",
- m_directories.getURLFromSrc("/sw/qa/core/exportdata/rtf/"),
+ m_directories.getURLFromSrc(u"/sw/qa/core/exportdata/rtf/"),
OUString(),
SfxFilterFlags::STARONEFILTER,
SotClipboardFormatId::NONE,
@@ -180,7 +180,7 @@ void SwFiltersTest::testCVEs()
/*bExport=*/true);
testDir("HTML",
- m_directories.getURLFromSrc("/sw/qa/core/exportdata/html/"),
+ m_directories.getURLFromSrc(u"/sw/qa/core/exportdata/html/"),
sHTML,
SfxFilterFlags::NONE,
SotClipboardFormatId::NONE,
@@ -188,7 +188,7 @@ void SwFiltersTest::testCVEs()
/*bExport=*/true);
testDir("MS Word 2007 XML",
- m_directories.getURLFromSrc("/sw/qa/core/exportdata/ooxml/"),
+ m_directories.getURLFromSrc(u"/sw/qa/core/exportdata/ooxml/"),
OUString(),
SfxFilterFlags::STARONEFILTER,
SotClipboardFormatId::NONE,
diff --git a/sw/qa/core/filters-test2.cxx b/sw/qa/core/filters-test2.cxx
index 20d8eed4a644..22fd9cfe525a 100644
--- a/sw/qa/core/filters-test2.cxx
+++ b/sw/qa/core/filters-test2.cxx
@@ -122,7 +122,7 @@ bool SwFiltersTest2::filter(const OUString& rFilter, const OUString& rURL,
void SwFiltersTest2::testCVEs()
{
- testDir("MS WinWord 6.0", m_directories.getURLFromSrc("/sw/qa/core/data/ww6/"), sWW6);
+ testDir("MS WinWord 6.0", m_directories.getURLFromSrc(u"/sw/qa/core/data/ww6/"), sWW6);
}
void SwFiltersTest2::setUp()
diff --git a/sw/qa/core/macros-test.cxx b/sw/qa/core/macros-test.cxx
index f85d56342207..cb2616333486 100644
--- a/sw/qa/core/macros-test.cxx
+++ b/sw/qa/core/macros-test.cxx
@@ -8,6 +8,9 @@
*/
#include <sal/config.h>
+
+#include <string_view>
+
#include <unotest/macros_test.hxx>
#include <test/bootstrapfixture.hxx>
@@ -61,7 +64,7 @@ class SwMacrosTest : public test::BootstrapFixture, public unotest::MacrosTest
public:
SwMacrosTest();
- void createFileURL(const OUString& aFileBase, const OUString& aFileExtension, OUString& rFilePath);
+ void createFileURL(std::u16string_view aFileBase, std::u16string_view aFileExtension, OUString& rFilePath);
virtual void setUp() override;
virtual void tearDown() override;
@@ -91,7 +94,7 @@ private:
OUString m_aBaseString;
};
-void SwMacrosTest::createFileURL(const OUString& aFileBase, const OUString& aFileExtension, OUString& rFilePath)
+void SwMacrosTest::createFileURL(std::u16string_view aFileBase, std::u16string_view aFileExtension, OUString& rFilePath)
{
rFilePath = m_directories.getSrcRootURL() + m_aBaseString + "/" + aFileExtension + "/"
+ aFileBase + aFileExtension;
@@ -108,7 +111,7 @@ void SwMacrosTest::testVba()
for ( size_t i=0; i<SAL_N_ELEMENTS( testInfo ); ++i )
{
OUString aFileName;
- createFileURL(testInfo[i].sFileBaseName, "doc", aFileName);
+ createFileURL(testInfo[i].sFileBaseName, u"doc", aFileName);
uno::Reference< css::lang::XComponent > xComponent = loadFromDesktop(aFileName, "com.sun.star.text.TextDocument");
OUString sMsg = "Failed to load " + aFileName;
CPPUNIT_ASSERT_MESSAGE( OUStringToOString( sMsg, RTL_TEXTENCODING_UTF8 ).getStr(), xComponent.is() );
@@ -203,7 +206,7 @@ void SwMacrosTest::testBookmarkDeleteTdf90816()
void SwMacrosTest::testControlShapeGrouping()
{
OUString aFileName;
- createFileURL("testControlShapeGrouping.", "odt", aFileName);
+ createFileURL(u"testControlShapeGrouping.", u"odt", aFileName);
Reference< css::lang::XComponent > xComponent(
loadFromDesktop(aFileName, "com.sun.star.text.TextDocument"));
CPPUNIT_ASSERT(xComponent.is());
@@ -343,7 +346,7 @@ void SwMacrosTest::testFdo55289()
void SwMacrosTest::testFdo68983()
{
OUString aFileName;
- createFileURL("fdo68983.", "odt", aFileName);
+ createFileURL(u"fdo68983.", u"odt", aFileName);
Reference< css::lang::XComponent > xComponent =
loadFromDesktop(aFileName, "com.sun.star.text.TextDocument");
diff --git a/sw/qa/extras/globalfilter/globalfilter.cxx b/sw/qa/extras/globalfilter/globalfilter.cxx
index 732c0438da5b..8915ed808232 100644
--- a/sw/qa/extras/globalfilter/globalfilter.cxx
+++ b/sw/qa/extras/globalfilter/globalfilter.cxx
@@ -106,7 +106,7 @@ void Test::testEmbeddedGraphicRoundtrip()
if (mxComponent.is())
mxComponent->dispose();
- mxComponent = loadFromDesktop(m_directories.getURLFromSrc("/sw/qa/extras/globalfilter/data/document_with_two_images.odt"), "com.sun.star.text.TextDocument");
+ mxComponent = loadFromDesktop(m_directories.getURLFromSrc(u"/sw/qa/extras/globalfilter/data/document_with_two_images.odt"), "com.sun.star.text.TextDocument");
// Export the document and import again for a check
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
@@ -172,7 +172,7 @@ void Test::testLinkedGraphicRT()
{
if (mxComponent.is())
mxComponent->dispose();
- mxComponent = loadFromDesktop(m_directories.getURLFromSrc("/sw/qa/extras/globalfilter/data/document_with_linked_graphic.odt"), "com.sun.star.text.TextDocument");
+ mxComponent = loadFromDesktop(m_directories.getURLFromSrc(u"/sw/qa/extras/globalfilter/data/document_with_linked_graphic.odt"), "com.sun.star.text.TextDocument");
const OString sFailedMessage = OStringLiteral("Failed on filter: ") + rFilterName.toUtf8();
@@ -240,7 +240,7 @@ void Test::testImageWithSpecialID()
{
if (mxComponent.is())
mxComponent->dispose();
- mxComponent = loadFromDesktop(m_directories.getURLFromSrc("/sw/qa/extras/globalfilter/data/images_with_special_IDs.odt"), "com.sun.star.text.TextDocument");
+ mxComponent = loadFromDesktop(m_directories.getURLFromSrc(u"/sw/qa/extras/globalfilter/data/images_with_special_IDs.odt"), "com.sun.star.text.TextDocument");
// Export the document and import again for a check
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
@@ -335,7 +335,7 @@ void Test::testGraphicShape()
{
if (mxComponent.is())
mxComponent->dispose();
- mxComponent = loadFromDesktop(m_directories.getURLFromSrc("/sw/qa/extras/globalfilter/data/graphic_shape.odt"), "com.sun.star.text.TextDocument");
+ mxComponent = loadFromDesktop(m_directories.getURLFromSrc(u"/sw/qa/extras/globalfilter/data/graphic_shape.odt"), "com.sun.star.text.TextDocument");
// Export the document and import again for a check
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
@@ -443,7 +443,7 @@ void Test::testMultipleIdenticalGraphics()
if (mxComponent.is())
mxComponent->dispose();
- mxComponent = loadFromDesktop(m_directories.getURLFromSrc("/sw/qa/extras/globalfilter/data/multiple_identical_graphics.odt"), "com.sun.star.text.TextDocument");
+ mxComponent = loadFromDesktop(m_directories.getURLFromSrc(u"/sw/qa/extras/globalfilter/data/multiple_identical_graphics.odt"), "com.sun.star.text.TextDocument");
// Export the document and import again for a check
utl::MediaDescriptor aMediaDescriptor;
@@ -494,7 +494,7 @@ void Test::testCharHighlightBody()
{
if (mxComponent.is())
mxComponent->dispose();
- mxComponent = loadFromDesktop(m_directories.getURLFromSrc("/sw/qa/extras/globalfilter/data/char_highlight.docx"),
+ mxComponent = loadFromDesktop(m_directories.getURLFromSrc(u"/sw/qa/extras/globalfilter/data/char_highlight.docx"),
"com.sun.star.text.TextDocument");
const OString sFailedMessage = OStringLiteral("Failed on filter: ") + rFilterName.toUtf8();
@@ -590,7 +590,7 @@ void Test::testCharStyleHighlight()
{
if (mxComponent.is())
mxComponent->dispose();
- mxComponent = loadFromDesktop(m_directories.getURLFromSrc("/sw/qa/extras/globalfilter/data/tdf138345_charstyle_highlight.odt"),
+ mxComponent = loadFromDesktop(m_directories.getURLFromSrc(u"/sw/qa/extras/globalfilter/data/tdf138345_charstyle_highlight.odt"),
"com.sun.star.text.TextDocument");
const OString sFailedMessage = OStringLiteral("Failed on filter: ") + rFilterName.toUtf8();
@@ -634,7 +634,7 @@ void Test::testCharHighlight()
void Test::testCharHighlightODF()
{
- mxComponent = loadFromDesktop(m_directories.getURLFromSrc("/sw/qa/extras/globalfilter/data/char_background_editing.docx"),
+ mxComponent = loadFromDesktop(m_directories.getURLFromSrc(u"/sw/qa/extras/globalfilter/data/char_background_editing.docx"),
"com.sun.star.text.TextDocument");
// don't check import, testMSCharBackgroundEditing already does that
@@ -727,7 +727,7 @@ void Test::testMSCharBackgroundEditing()
if (mxComponent.is())
mxComponent->dispose();
- mxComponent = loadFromDesktop(m_directories.getURLFromSrc("/sw/qa/extras/globalfilter/data/char_background_editing.docx"),
+ mxComponent = loadFromDesktop(m_directories.getURLFromSrc(u"/sw/qa/extras/globalfilter/data/char_background_editing.docx"),
"com.sun.star.text.TextDocument");
const OString sFailedMessage = OStringLiteral("Failed on filter: ") + rFilterName.toUtf8();
@@ -839,7 +839,7 @@ void Test::testCharBackgroundToHighlighting()
{
if (mxComponent.is())
mxComponent->dispose();
- mxComponent = loadFromDesktop(m_directories.getURLFromSrc("/sw/qa/extras/globalfilter/data/char_background.odt"),
+ mxComponent = loadFromDesktop(m_directories.getURLFromSrc(u"/sw/qa/extras/globalfilter/data/char_background.odt"),
"com.sun.star.text.TextDocument");
OString sFailedMessage = OStringLiteral("Failed on filter: ") + rFilterName.toUtf8();
@@ -1053,7 +1053,7 @@ void Test::testNestedFieldmark()
}
mxComponent = loadFromDesktop(m_directories.getURLFromSrc(
- "/sw/qa/extras/globalfilter/data/" + rFilterName.second),
+ OUString("/sw/qa/extras/globalfilter/data/" + rFilterName.second)),
"com.sun.star.text.TextDocument");
verifyNestedFieldmark(rFilterName.first + ", load", mxComponent);
@@ -1109,7 +1109,7 @@ void Test::testODF13()
{
// import
mxComponent = loadFromDesktop(m_directories.getURLFromSrc(
- "/sw/qa/extras/globalfilter/data/text13e.odt"),
+ u"/sw/qa/extras/globalfilter/data/text13e.odt"),
"com.sun.star.text.TextDocument");
// check model
@@ -1295,7 +1295,7 @@ void Test::testBulletAsImage()
if (mxComponent.is())
mxComponent->dispose();
- mxComponent = loadFromDesktop(m_directories.getURLFromSrc("/sw/qa/extras/globalfilter/data/BulletAsImage.odt"), "com.sun.star.text.TextDocument");
+ mxComponent = loadFromDesktop(m_directories.getURLFromSrc(u"/sw/qa/extras/globalfilter/data/BulletAsImage.odt"), "com.sun.star.text.TextDocument");
// Check if import was successful
{
@@ -1431,7 +1431,7 @@ void Test::testTextFormField()
{
if (mxComponent.is())
mxComponent->dispose();
- mxComponent = loadFromDesktop(m_directories.getURLFromSrc("/sw/qa/extras/globalfilter/data/text_form_field.odt"), "com.sun.star.text.TextDocument");
+ mxComponent = loadFromDesktop(m_directories.getURLFromSrc(u"/sw/qa/extras/globalfilter/data/text_form_field.odt"), "com.sun.star.text.TextDocument");
const OString sFailedMessage = OStringLiteral("Failed on filter: ") + rFilterName.toUtf8();
@@ -1486,7 +1486,7 @@ void Test::testCheckBoxFormField()
{
if (mxComponent.is())
mxComponent->dispose();
- mxComponent = loadFromDesktop(m_directories.getURLFromSrc("/sw/qa/extras/globalfilter/data/checkbox_form_field.odt"), "com.sun.star.text.TextDocument");
+ mxComponent = loadFromDesktop(m_directories.getURLFromSrc(u"/sw/qa/extras/globalfilter/data/checkbox_form_field.odt"), "com.sun.star.text.TextDocument");
const OString sFailedMessage = OStringLiteral("Failed on filter: ") + rFilterName.toUtf8();
@@ -1549,7 +1549,7 @@ void Test::testDropDownFormField()
{
if (mxComponent.is())
mxComponent->dispose();
- mxComponent = loadFromDesktop(m_directories.getURLFromSrc("/sw/qa/extras/globalfilter/data/dropdown_form_field.odt"), "com.sun.star.text.TextDocument");
+ mxComponent = loadFromDesktop(m_directories.getURLFromSrc(u"/sw/qa/extras/globalfilter/data/dropdown_form_field.odt"), "com.sun.star.text.TextDocument");
const OString sFailedMessage = OStringLiteral("Failed on filter: ") + rFilterName.toUtf8();
@@ -1634,7 +1634,7 @@ void Test::testDateFormField()
{
if (mxComponent.is())
mxComponent->dispose();
- mxComponent = loadFromDesktop(m_directories.getURLFromSrc("/sw/qa/extras/globalfilter/data/date_form_field.odt"), "com.sun.star.text.TextDocument");
+ mxComponent = loadFromDesktop(m_directories.getURLFromSrc(u"/sw/qa/extras/globalfilter/data/date_form_field.odt"), "com.sun.star.text.TextDocument");
const OString sFailedMessage = OStringLiteral("Failed on filter: ") + rFilterName.toUtf8();
@@ -1750,7 +1750,7 @@ void Test::testDateFormFieldCharacterFormatting()
{
if (mxComponent.is())
mxComponent->dispose();
- mxComponent = loadFromDesktop(m_directories.getURLFromSrc("/sw/qa/extras/globalfilter/data/date_form_field_char_formatting.odt"), "com.sun.star.text.TextDocument");
+ mxComponent = loadFromDesktop(m_directories.getURLFromSrc(u"/sw/qa/extras/globalfilter/data/date_form_field_char_formatting.odt"), "com.sun.star.text.TextDocument");
const OString sFailedMessage = OStringLiteral("Failed on filter: ") + rFilterName.toUtf8();
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index 20e45e7a23b5..be654093e229 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -8,6 +8,7 @@
*/
#include <memory>
+#include <string_view>
#include <swmodeltestbase.hxx>
@@ -95,12 +96,12 @@ protected:
protected:
/// Copy&paste helper.
- bool paste(const OUString& rFilename, const uno::Reference<text::XTextRange>& xTextRange)
+ bool paste(std::u16string_view rFilename, const uno::Reference<text::XTextRange>& xTextRange)
{
uno::Reference<document::XFilter> xFilter(m_xSFactory->createInstance("com.sun.star.comp.Writer.WriterFilter"), uno::UNO_QUERY_THROW);
uno::Reference<document::XImporter> xImporter(xFilter, uno::UNO_QUERY_THROW);
xImporter->setTargetDocument(mxComponent);
- std::unique_ptr<SvStream> pStream = utl::UcbStreamHelper::CreateStream(m_directories.getURLFromSrc("/sw/qa/extras/ooxmlexport/data/") + rFilename, StreamMode::READ);
+ std::unique_ptr<SvStream> pStream = utl::UcbStreamHelper::CreateStream(m_directories.getURLFromSrc(u"/sw/qa/extras/ooxmlexport/data/") + rFilename, StreamMode::READ);
uno::Reference<io::XStream> xStream(new utl::OStreamWrapper(std::move(pStream)));
uno::Sequence<beans::PropertyValue> aDescriptor(comphelper::InitPropertySequence(
{
@@ -1096,7 +1097,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf94374)
uno::Reference<text::XTextRange> xText = xTextDocument->getText();
uno::Reference<text::XTextRange> xEnd = xText->getEnd();
// This failed: it wasn't possible to insert a DOCX document into an existing Writer one.
- CPPUNIT_ASSERT(paste("tdf94374.docx", xEnd));
+ CPPUNIT_ASSERT(paste(u"tdf94374.docx", xEnd));
}
DECLARE_OOXMLEXPORT_TEST(testTdf83300, "tdf83300.docx")
diff --git a/sw/qa/extras/rtfexport/rtfexport2.cxx b/sw/qa/extras/rtfexport/rtfexport2.cxx
index bde4a109d687..62154c0eaaca 100644
--- a/sw/qa/extras/rtfexport/rtfexport2.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport2.cxx
@@ -599,7 +599,7 @@ CPPUNIT_TEST_FIXTURE(Test, testCopyPastePageStyle)
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextRange> xText = xTextDocument->getText();
uno::Reference<text::XTextRange> xEnd = xText->getEnd();
- paste("rtfexport/data/copypaste-pagestyle-paste.rtf", xEnd);
+ paste(u"rtfexport/data/copypaste-pagestyle-paste.rtf", xEnd);
uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName("Standard"),
uno::UNO_QUERY);
@@ -614,7 +614,7 @@ CPPUNIT_TEST_FIXTURE(Test, testCopyPasteFootnote)
uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xFootnotes = xFootnotesSupplier->getFootnotes();
uno::Reference<text::XTextRange> xTextRange(xFootnotes->getByIndex(0), uno::UNO_QUERY);
- paste("rtfexport/data/copypaste-footnote-paste.rtf", xTextRange);
+ paste(u"rtfexport/data/copypaste-footnote-paste.rtf", xTextRange);
CPPUNIT_ASSERT_EQUAL(OUString("bbb"), xTextRange->getString());
}
@@ -626,7 +626,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo63428)
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextRange> xText = xTextDocument->getText();
uno::Reference<text::XTextRange> xEnd = xText->getEnd();
- paste("rtfexport/data/fdo63428.rtf", xEnd);
+ paste(u"rtfexport/data/fdo63428.rtf", xEnd);
// Additionally, commented range was imported as a normal comment.
CPPUNIT_ASSERT_EQUAL(OUString("Annotation"),
@@ -651,7 +651,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo69384Inserted)
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextRange> xText = xTextDocument->getText();
uno::Reference<text::XTextRange> xEnd = xText->getEnd();
- paste("rtfexport/data/fdo69384-paste.rtf", xEnd);
+ paste(u"rtfexport/data/fdo69384-paste.rtf", xEnd);
// During insert of the RTF document we do not change pre-existing styles
// vs testFdo69384 where it is
@@ -667,7 +667,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo61193)
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextRange> xText = xTextDocument->getText();
uno::Reference<text::XTextRange> xEnd = xText->getEnd();
- paste("rtfexport/data/fdo61193.rtf", xEnd);
+ paste(u"rtfexport/data/fdo61193.rtf", xEnd);
}
CPPUNIT_TEST_FIXTURE(Test, testTdf108123)
@@ -678,7 +678,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf108123)
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextRange> xText = xTextDocument->getText();
uno::Reference<text::XTextRange> xEnd = xText->getEnd();
- paste("rtfexport/data/tdf108123.rtf", xEnd);
+ paste(u"rtfexport/data/tdf108123.rtf", xEnd);
}
DECLARE_RTFEXPORT_TEST(testShptxtPard, "shptxt-pard.rtf")
diff --git a/sw/qa/extras/rtfexport/rtfexport5.cxx b/sw/qa/extras/rtfexport/rtfexport5.cxx
index fea953889795..d356ed1c0938 100644
--- a/sw/qa/extras/rtfexport/rtfexport5.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport5.cxx
@@ -127,7 +127,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo62044)
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextRange> xText = xTextDocument->getText();
uno::Reference<text::XTextRange> xEnd = xText->getEnd();
- paste("rtfexport/data/fdo62044-paste.rtf", xEnd);
+ paste(u"rtfexport/data/fdo62044-paste.rtf", xEnd);
uno::Reference<beans::XPropertySet> xPropertySet(
getStyles("ParagraphStyles")->getByName("Heading 1"), uno::UNO_QUERY);
@@ -812,7 +812,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf90260Nopar)
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextRange> xText = xTextDocument->getText();
uno::Reference<text::XTextRange> xEnd = xText->getEnd();
- paste("rtfexport/data/tdf90260-nopar.rtf", xEnd);
+ paste(u"rtfexport/data/tdf90260-nopar.rtf", xEnd);
CPPUNIT_ASSERT_EQUAL(1, getParagraphs());
}
@@ -958,7 +958,7 @@ CPPUNIT_TEST_FIXTURE(Test, testClassificatonPasteLevels)
// Classified source and classified destination, but internal only has a
// higher level than confidential: nothing should happen.
OUString aOld = xText->getString();
- paste("rtfexport/data/classification-yes.rtf", xEnd);
+ paste(u"rtfexport/data/classification-yes.rtf", xEnd);
CPPUNIT_ASSERT_EQUAL(aOld, xText->getString());
}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 399ca38e0ab2..4749fa3acf6f 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -823,7 +823,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo68291)
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextRange> xText = xTextDocument->getText();
uno::Reference<text::XTextRange> xEnd = xText->getEnd();
- paste("rtfimport/data/fdo68291-paste.rtf", xEnd);
+ paste(u"rtfimport/data/fdo68291-paste.rtf", xEnd);
// This was "Standard", causing an unwanted page break on next paste.
CPPUNIT_ASSERT_EQUAL(uno::Any(),
@@ -1208,7 +1208,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf90260Par)
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextRange> xText = xTextDocument->getText();
uno::Reference<text::XTextRange> xEnd = xText->getEnd();
- paste("rtfimport/data/tdf90260-par.rtf", xEnd);
+ paste(u"rtfimport/data/tdf90260-par.rtf", xEnd);
CPPUNIT_ASSERT_EQUAL(2, getParagraphs());
}
@@ -1319,12 +1319,12 @@ CPPUNIT_TEST_FIXTURE(Test, testClassificatonPaste)
uno::Reference<text::XTextRange> xEnd = xText->getEnd();
// Not classified source, not classified destination: OK.
- paste("rtfimport/data/classification-no.rtf", xEnd);
+ paste(u"rtfimport/data/classification-no.rtf", xEnd);
CPPUNIT_ASSERT_EQUAL(OUString("classification-no"), getParagraph(2)->getString());
// Classified source, not classified destination: nothing should happen.
OUString aOld = xText->getString();
- paste("rtfimport/data/classification-yes.rtf", xEnd);
+ paste(u"rtfimport/data/classification-yes.rtf", xEnd);
CPPUNIT_ASSERT_EQUAL(aOld, xText->getString());
}
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 6bce5bff36c3..c5aeeae93efb 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -8,6 +8,8 @@
*/
#include <memory>
+#include <string_view>
+
#include <com/sun/star/awt/FontWeight.hpp>
#include <com/sun/star/drawing/GraphicExportFilter.hpp>
#include <com/sun/star/drawing/FillStyle.hpp>
@@ -631,7 +633,8 @@ public:
private:
SwDoc* createDoc(const char* pName = nullptr);
- std::unique_ptr<SwTextBlocks> readDOCXAutotext(const OUString& sFileName, bool bEmpty = false);
+ std::unique_ptr<SwTextBlocks> readDOCXAutotext(
+ std::u16string_view sFileName, bool bEmpty = false);
};
SwDoc* SwUiWriterTest::createDoc(const char* pName)
@@ -646,7 +649,7 @@ SwDoc* SwUiWriterTest::createDoc(const char* pName)
return pTextDoc->GetDocShell()->GetDoc();
}
-std::unique_ptr<SwTextBlocks> SwUiWriterTest::readDOCXAutotext(const OUString& sFileName, bool bEmpty)
+std::unique_ptr<SwTextBlocks> SwUiWriterTest::readDOCXAutotext(std::u16string_view sFileName, bool bEmpty)
{
utl::TempFile tmp;
tmp.EnableKillingFile();
@@ -1078,14 +1081,14 @@ void SwUiWriterTest::testExportRTF()
void SwUiWriterTest::testDOCXAutoTextEmpty()
{
// file contains normal content but no AutoText
- std::unique_ptr<SwTextBlocks> pGlossary = readDOCXAutotext("autotext-empty.dotx", true);
+ std::unique_ptr<SwTextBlocks> pGlossary = readDOCXAutotext(u"autotext-empty.dotx", true);
CPPUNIT_ASSERT(pGlossary != nullptr);
}
void SwUiWriterTest::testDOCXAutoTextMultiple()
{
// file contains three AutoText entries
- std::unique_ptr<SwTextBlocks> pGlossary = readDOCXAutotext("autotext-multiple.dotx");
+ std::unique_ptr<SwTextBlocks> pGlossary = readDOCXAutotext(u"autotext-multiple.dotx");
// check entries count
CPPUNIT_ASSERT_EQUAL(sal_uInt16(3), pGlossary->GetCount());
@@ -1126,7 +1129,7 @@ void SwUiWriterTest::testDOTMAutoText()
{
// this is dotm file difference is that in the dotm
// there are no empty paragraphs at the end of each entry
- std::unique_ptr<SwTextBlocks> pGlossary = readDOCXAutotext("autotext-dotm.dotm");
+ std::unique_ptr<SwTextBlocks> pGlossary = readDOCXAutotext(u"autotext-dotm.dotm");
SwDoc* pDoc = pGlossary->GetDoc();
CPPUNIT_ASSERT(pDoc != nullptr);
@@ -1142,7 +1145,7 @@ void SwUiWriterTest::testDOCXAutoTextGallery()
{
// this file contains one AutoText entry and other
// entries which are not AutoText (have different "gallery" value)
- std::unique_ptr<SwTextBlocks> pGlossary = readDOCXAutotext("autotext-gallery.dotx");
+ std::unique_ptr<SwTextBlocks> pGlossary = readDOCXAutotext(u"autotext-gallery.dotx");
SwDoc* pDoc = pGlossary->GetDoc();
CPPUNIT_ASSERT(pDoc != nullptr);
@@ -1780,7 +1783,7 @@ void SwUiWriterTest::testChineseConversionSimplifiedToTraditional()
void SwUiWriterTest::testFdo85554()
{
// Load the document, it contains one shape with a textbox.
- load("/sw/qa/extras/uiwriter/data/", "fdo85554.odt");
+ load(u"/sw/qa/extras/uiwriter/data/", "fdo85554.odt");
// Add a second shape to the document.
uno::Reference<css::lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
@@ -4435,7 +4438,7 @@ void SwUiWriterTest::testEmbeddedDataSource()
// Load: should have a component and a data source, too.
// Path with "#" must not cause issues
- load(DATA_DIRECTORY + OUStringLiteral(u"hash%23path/"), "embedded-data-source.odt");
+ load(OUString(DATA_DIRECTORY + OUStringLiteral(u"hash%23path/")), "embedded-data-source.odt");
CPPUNIT_ASSERT(mxComponent.is());
CPPUNIT_ASSERT(xDatabaseContext->hasByName("calc-data-source"));
@@ -7368,7 +7371,7 @@ void SwUiWriterTest::testTdf117225()
{
// Test that saving a document with an embedded object does not leak
// tempfiles in the directory of the target file.
- OUString aTargetDirectory = m_directories.getURLFromWorkdir("/CppunitTest/sw_uiwriter.test.user/");
+ OUString aTargetDirectory = m_directories.getURLFromWorkdir(u"/CppunitTest/sw_uiwriter.test.user/");
OUString aTargetFile = aTargetDirectory + "tdf117225.odt";
OUString aSourceFile = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf117225.odt";
osl::File::copy(aSourceFile, aTargetFile);
diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx b/sw/qa/extras/uiwriter/uiwriter2.cxx
index 5dc5aab4eb80..91a429a7b151 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -3396,7 +3396,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf128603)
// only care that it doesn't assert/crash
CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testOfz18563)
{
- OUString sURL(m_directories.getURLFromSrc("/sw/qa/extras/uiwriter/data2/ofz18563.docx"));
+ OUString sURL(m_directories.getURLFromSrc(u"/sw/qa/extras/uiwriter/data2/ofz18563.docx"));
SvFileStream aFileStream(sURL, StreamMode::READ);
TestImportDOCX(aFileStream);
}
diff --git a/sw/qa/inc/swmodeltestbase.hxx b/sw/qa/inc/swmodeltestbase.hxx
index faaad80c6a7c..ceb2bbe125d0 100644
--- a/sw/qa/inc/swmodeltestbase.hxx
+++ b/sw/qa/inc/swmodeltestbase.hxx
@@ -11,6 +11,8 @@
#define INCLUDED_SW_QA_INC_SWMODELTESTBASE_HXX
#include <memory>
+#include <string_view>
+
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/drawing/XShape.hpp>
@@ -145,7 +147,7 @@ protected:
virtual OUString getTestName() { return OUString(); }
/// Copy&paste helper.
- void paste(const OUString& aFilename, css::uno::Reference<css::text::XTextRange> const& xTextRange);
+ void paste(std::u16string_view aFilename, css::uno::Reference<css::text::XTextRange> const& xTextRange);
public:
void setFilterOptions(const OUString &rFilterOptions)
@@ -340,7 +342,7 @@ protected:
void header();
- void load(const OUString& pDir, const char* pName, const char* pPassword = nullptr)
+ void load(std::u16string_view pDir, const char* pName, const char* pPassword = nullptr)
{
return loadURL(m_directories.getURLFromSrc(pDir) + OUString::createFromAscii(pName), pName, pPassword);
}
@@ -393,7 +395,8 @@ protected:
* SwDoc* pDoc = createSwDoc();
* SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "test.fodt");
*/
- SwDoc* createSwDoc(const OUString& rDataDirectory = OUString(), const char* pName = nullptr);
+ SwDoc* createSwDoc(
+ std::u16string_view rDataDirectory = std::u16string_view(), const char* pName = nullptr);
};
/**
diff --git a/sw/qa/unit/sw-dialogs-test.cxx b/sw/qa/unit/sw-dialogs-test.cxx
index 70584b601803..48652ca1db74 100644
--- a/sw/qa/unit/sw-dialogs-test.cxx
+++ b/sw/qa/unit/sw-dialogs-test.cxx
@@ -93,7 +93,7 @@ VclPtr<VclAbstractDialog> SwDialogsTest::createDialogByID(sal_uInt32 /*nID*/)
void SwDialogsTest::openAnyDialog()
{
/// process input file containing the UXMLDescriptions of the dialogs to dump
- processDialogBatchFile("sw/qa/unit/data/sw-dialogs-test.txt");
+ processDialogBatchFile(u"sw/qa/unit/data/sw-dialogs-test.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(SwDialogsTest);
diff --git a/sw/qa/unit/sw-dialogs-test_2.cxx b/sw/qa/unit/sw-dialogs-test_2.cxx
index a925a8e9c615..42e8d4b786da 100644
--- a/sw/qa/unit/sw-dialogs-test_2.cxx
+++ b/sw/qa/unit/sw-dialogs-test_2.cxx
@@ -84,7 +84,7 @@ VclPtr<VclAbstractDialog> SwDialogsTest2::createDialogByID(sal_uInt32 /*nID*/)
void SwDialogsTest2::openAnyDialog()
{
/// process input file containing the UXMLDescriptions of the dialogs to dump
- processDialogBatchFile("sw/qa/unit/data/sw-dialogs-test_2.txt");
+ processDialogBatchFile(u"sw/qa/unit/data/sw-dialogs-test_2.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(SwDialogsTest2);
diff --git a/sw/qa/unit/swmodeltestbase.cxx b/sw/qa/unit/swmodeltestbase.cxx
index b69ade4d1b8e..3a1c6b89e9d6 100644
--- a/sw/qa/unit/swmodeltestbase.cxx
+++ b/sw/qa/unit/swmodeltestbase.cxx
@@ -34,7 +34,7 @@
using namespace css;
-void SwModelTestBase::paste(const OUString& aFilename,
+void SwModelTestBase::paste(std::u16string_view aFilename,
uno::Reference<text::XTextRange> const& xTextRange)
{
uno::Reference<document::XFilter> xFilter(
@@ -44,7 +44,7 @@ void SwModelTestBase::paste(const OUString& aFilename,
uno::Sequence<beans::PropertyValue> aDescriptor(3);
aDescriptor[0].Name = "InputStream";
std::unique_ptr<SvStream> pStream = utl::UcbStreamHelper::CreateStream(
- m_directories.getURLFromSrc("/sw/qa/extras/") + aFilename, StreamMode::STD_READ);
+ m_directories.getURLFromSrc(u"/sw/qa/extras/") + aFilename, StreamMode::STD_READ);
CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, pStream->GetError());
uno::Reference<io::XStream> xStream(new utl::OStreamWrapper(std::move(pStream)));
aDescriptor[0].Value <<= xStream;
@@ -825,9 +825,9 @@ void SwModelTestBase::registerNamespaces(xmlXPathContextPtr& pXmlXpathCtx)
BAD_CAST("http://www.w3.org/1999/xhtml"));
}
-SwDoc* SwModelTestBase::createSwDoc(const OUString& rDataDirectory, const char* pName)
+SwDoc* SwModelTestBase::createSwDoc(std::u16string_view rDataDirectory, const char* pName)
{
- if (rDataDirectory.isEmpty() || !pName)
+ if (rDataDirectory.empty() || !pName)
loadURL("private:factory/swriter", nullptr);
else
load(rDataDirectory, pName);
diff --git a/sw/source/core/bastyp/SwSmartTagMgr.cxx b/sw/source/core/bastyp/SwSmartTagMgr.cxx
index e99c11a02f93..cbe194fc005c 100644
--- a/sw/source/core/bastyp/SwSmartTagMgr.cxx
+++ b/sw/source/core/bastyp/SwSmartTagMgr.cxx
@@ -33,7 +33,7 @@ SwSmartTagMgr& SwSmartTagMgr::Get()
if (!spTheSwSmartTagMgr)
{
spTheSwSmartTagMgr = new SwSmartTagMgr(SwDocShell::Factory().GetModuleName());
- spTheSwSmartTagMgr->Init("Writer");
+ spTheSwSmartTagMgr->Init(u"Writer");
}
return *spTheSwSmartTagMgr;
}
diff --git a/sw/source/core/crsr/annotationmark.cxx b/sw/source/core/crsr/annotationmark.cxx
index 62895ab852c9..ce7c03675e14 100644
--- a/sw/source/core/crsr/annotationmark.cxx
+++ b/sw/source/core/crsr/annotationmark.cxx
@@ -40,7 +40,7 @@ namespace sw::mark
{
if ( rName.getLength() == 0 )
{
- SetName( MarkBase::GenerateNewName("__Annotation__") );
+ SetName( MarkBase::GenerateNewName(u"__Annotation__") );
}
}
diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index 9df25b47bcfd..18cdae33edfd 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -314,7 +314,7 @@ namespace sw::mark
MarkBase::~MarkBase()
{ }
- OUString MarkBase::GenerateNewName(const OUString& rPrefix)
+ OUString MarkBase::GenerateNewName(std::u16string_view rPrefix)
{
static bool bHack = (getenv("LIBO_ONEWAY_STABLE_ODF_EXPORT") != nullptr);
@@ -354,15 +354,15 @@ namespace sw::mark
}
NavigatorReminder::NavigatorReminder(const SwPaM& rPaM)
- : MarkBase(rPaM, MarkBase::GenerateNewName("__NavigatorReminder__"))
+ : MarkBase(rPaM, MarkBase::GenerateNewName(u"__NavigatorReminder__"))
{ }
UnoMark::UnoMark(const SwPaM& aPaM)
- : MarkBase(aPaM, MarkBase::GenerateNewName("__UnoMark__"))
+ : MarkBase(aPaM, MarkBase::GenerateNewName(u"__UnoMark__"))
{ }
DdeBookmark::DdeBookmark(const SwPaM& aPaM)
- : MarkBase(aPaM, MarkBase::GenerateNewName("__DdeLink__"))
+ : MarkBase(aPaM, MarkBase::GenerateNewName(u"__DdeLink__"))
{ }
void DdeBookmark::SetRefObject(SwServerObject* pObj)
@@ -485,7 +485,7 @@ namespace sw::mark
}
Fieldmark::Fieldmark(const SwPaM& rPaM)
- : MarkBase(rPaM, MarkBase::GenerateNewName("__Fieldmark__"))
+ : MarkBase(rPaM, MarkBase::GenerateNewName(u"__Fieldmark__"))
{
if(!IsExpanded())
SetOtherMarkPos(GetMarkPos());
diff --git a/sw/source/core/crsr/crossrefbookmark.cxx b/sw/source/core/crsr/crossrefbookmark.cxx
index a2f046f2fa84..5090f2024d0a 100644
--- a/sw/source/core/crsr/crossrefbookmark.cxx
+++ b/sw/source/core/crsr/crossrefbookmark.cxx
@@ -35,7 +35,7 @@ namespace sw::mark
CrossRefBookmark::CrossRefBookmark(const SwPaM& rPaM,
const vcl::KeyCode& rCode,
const OUString& rName,
- const OUString& rPrefix)
+ std::u16string_view rPrefix)
: Bookmark(
// ensure that m_pPos2 is null by only passing start to super
SwPaM(*rPaM.Start()), rCode, rName)
@@ -70,7 +70,7 @@ namespace sw::mark
CrossRefHeadingBookmark::CrossRefHeadingBookmark(const SwPaM& rPaM,
const vcl::KeyCode& rCode,
const OUString& rName)
- : CrossRefBookmark(rPaM, rCode, rName, IDocumentMarkAccess::GetCrossRefHeadingBookmarkNamePrefix()+"_Toc")
+ : CrossRefBookmark(rPaM, rCode, rName, OUString(IDocumentMarkAccess::GetCrossRefHeadingBookmarkNamePrefix()+"_Toc"))
{ }
bool CrossRefHeadingBookmark::IsLegalName(const OUString& rName)
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 757e95334011..575980cac40c 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -20,6 +20,7 @@
#include <sal/config.h>
#include <mutex>
+#include <string_view>
#include <config_features.h>
@@ -932,7 +933,7 @@ SfxObjectShell* SwDoc::CreateCopy( bool bCallInitNew, bool bEmpty ) const
}
// save bulk letters as single documents
-static OUString lcl_FindUniqueName(SwWrtShell* pTargetShell, const OUString& rStartingPageDesc, sal_uLong nDocNo )
+static OUString lcl_FindUniqueName(SwWrtShell* pTargetShell, std::u16string_view rStartingPageDesc, sal_uLong nDocNo )
{
do
{
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index f6b1291bee99..de9f04bc59b4 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -357,7 +357,7 @@ struct SignatureDescr
SignatureDescr lcl_getSignatureDescr(const uno::Reference<frame::XModel>& xModel,
const uno::Reference<css::text::XTextContent>& xParagraph,
- const OUString& sFieldId)
+ std::u16string_view sFieldId)
{
SignatureDescr aDescr;
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index 017a226c82a8..b7ab6e94e44a 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <hintids.hxx>
#include <tools/helpers.hxx>
#include <tools/urlobj.hxx>
@@ -168,7 +172,7 @@ bool SwGrfNode::ReRead(
nNewType = sfx2::SvBaseLinkObjectType::ClientDde;
else
{
- sfx2::MakeLnkName( sCmd, nullptr, sURLLink, OUString(), &rFltName );
+ sfx2::MakeLnkName( sCmd, nullptr, sURLLink, std::u16string_view(), &rFltName );
nNewType = sfx2::SvBaseLinkObjectType::ClientGraphic;
}
diff --git a/sw/source/core/inc/bookmrk.hxx b/sw/source/core/inc/bookmrk.hxx
index a73cc31c9874..63e05befe41b 100644
--- a/sw/source/core/inc/bookmrk.hxx
+++ b/sw/source/core/inc/bookmrk.hxx
@@ -24,6 +24,8 @@
#include <sfx2/Metadatable.hxx>
#include <vcl/keycod.hxx>
#include <memory>
+#include <string_view>
+
#include <rtl/ustring.hxx>
#include <osl/diagnose.h>
#include <tools/ref.hxx>
@@ -111,7 +113,7 @@ namespace sw::mark {
std::unique_ptr<SwPosition> m_pPos1;
std::unique_ptr<SwPosition> m_pPos2;
OUString m_aName;
- static OUString GenerateNewName(const OUString& rPrefix);
+ static OUString GenerateNewName(std::u16string_view rPrefix);
css::uno::WeakReference< css::text::XTextContent> m_wXBookmark;
};
diff --git a/sw/source/core/inc/crossrefbookmark.hxx b/sw/source/core/inc/crossrefbookmark.hxx
index e3976329ed4c..fa364a9b8742 100644
--- a/sw/source/core/inc/crossrefbookmark.hxx
+++ b/sw/source/core/inc/crossrefbookmark.hxx
@@ -20,6 +20,10 @@
#ifndef INCLUDED_SW_SOURCE_CORE_INC_CROSSREFBOOKMARK_HXX
#define INCLUDED_SW_SOURCE_CORE_INC_CROSSREFBOOKMARK_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include "bookmrk.hxx"
#include <rtl/ustring.hxx>
#include <vcl/keycod.hxx>
@@ -32,7 +36,7 @@ namespace sw::mark {
CrossRefBookmark(const SwPaM& rPaM,
const vcl::KeyCode& rCode,
const OUString& rName,
- const OUString& rPrefix);
+ std::u16string_view rPrefix);
// getters
virtual SwPosition& GetOtherMarkPos() const override;
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 963ab8e3910f..8688490ffe38 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -738,7 +738,7 @@ void SwNumberPortion::Paint( const SwTextPaintInfo &rInf ) const
}
SwBulletPortion::SwBulletPortion( const sal_UCS4 cBullet,
- const OUString& rBulletFollowedBy,
+ std::u16string_view rBulletFollowedBy,
std::unique_ptr<SwFont> pFont,
const bool bLft,
const bool bCntr,
diff --git a/sw/source/core/text/porfld.hxx b/sw/source/core/text/porfld.hxx
index c7382d601d14..d9e18f1d772a 100644
--- a/sw/source/core/text/porfld.hxx
+++ b/sw/source/core/text/porfld.hxx
@@ -19,6 +19,10 @@
#pragma once
+#include <sal/config.h>
+
+#include <string_view>
+
#include <swtypes.hxx>
#include <swfont.hxx>
#include "porexp.hxx"
@@ -148,7 +152,7 @@ class SwBulletPortion : public SwNumberPortion
{
public:
SwBulletPortion( const sal_UCS4 cCh,
- const OUString& rBulletFollowedBy,
+ std::u16string_view rBulletFollowedBy,
std::unique_ptr<SwFont> pFnt,
const bool bLeft,
const bool bCenter,
diff --git a/sw/source/core/text/porhyph.hxx b/sw/source/core/text/porhyph.hxx
index 57f685abe2dc..4227336918d3 100644
--- a/sw/source/core/text/porhyph.hxx
+++ b/sw/source/core/text/porhyph.hxx
@@ -19,6 +19,10 @@
#ifndef INCLUDED_SW_SOURCE_CORE_TEXT_PORHYPH_HXX
#define INCLUDED_SW_SOURCE_CORE_TEXT_PORHYPH_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include "porexp.hxx"
class SwHyphPortion : public SwExpandPortion
@@ -39,8 +43,8 @@ class SwHyphStrPortion : public SwHyphPortion
{
OUString aExpand;
public:
- explicit SwHyphStrPortion(const OUString &rStr)
- : aExpand(rStr + "-")
+ explicit SwHyphStrPortion(std::u16string_view rStr)
+ : aExpand(OUString::Concat(rStr) + "-")
{
SetWhichPor( PortionType::HyphenStr );
}
@@ -75,7 +79,7 @@ public:
class SwSoftHyphStrPortion : public SwHyphStrPortion
{
public:
- explicit SwSoftHyphStrPortion( const OUString &rStr );
+ explicit SwSoftHyphStrPortion( std::u16string_view rStr );
virtual void Paint( const SwTextPaintInfo &rInf ) const override;
};
diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx
index d0b411fa2a14..b88d34df4610 100644
--- a/sw/source/core/text/txthyph.cxx
+++ b/sw/source/core/text/txthyph.cxx
@@ -562,7 +562,7 @@ void SwSoftHyphStrPortion::Paint( const SwTextPaintInfo &rInf ) const
SwHyphStrPortion::Paint( rInf );
}
-SwSoftHyphStrPortion::SwSoftHyphStrPortion( const OUString &rStr )
+SwSoftHyphStrPortion::SwSoftHyphStrPortion( std::u16string_view rStr )
: SwHyphStrPortion( rStr )
{
SetLen(TextFrameIndex(1));
diff --git a/sw/source/core/undo/unbkmk.cxx b/sw/source/core/undo/unbkmk.cxx
index 5372899623f3..932ad9522ce4 100644
--- a/sw/source/core/undo/unbkmk.cxx
+++ b/sw/source/core/undo/unbkmk.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <UndoBookmark.hxx>
#include <strings.hrc>
@@ -111,7 +115,7 @@ SwUndoRenameBookmark::~SwUndoRenameBookmark()
{
}
-static OUString lcl_QuoteName(const OUString& rName)
+static OUString lcl_QuoteName(std::u16string_view rName)
{
static const OUString sStart = SwResId(STR_START_QUOTE);
static const OUString sEnd = SwResId(STR_END_QUOTE);
diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx
index 8004c18ee579..927235b7e239 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -18,6 +18,7 @@
*/
#include <algorithm>
+#include <string_view>
#include <com/sun/star/chart/ChartDataRowSource.hpp>
#include <com/sun/star/chart2/data/LabelOrigin.hpp>
@@ -249,21 +250,21 @@ static OUString GetCellRangeName( SwFrameFormat &rTableFormat, SwUnoCursor &rTab
return aRes;
}
-static OUString GetRangeRepFromTableAndCells( const OUString &rTableName,
- const OUString &rStartCell, const OUString &rEndCell,
+static OUString GetRangeRepFromTableAndCells( std::u16string_view rTableName,
+ std::u16string_view rStartCell, std::u16string_view rEndCell,
bool bForceEndCellName )
{
- OSL_ENSURE( !rTableName.isEmpty(), "table name missing" );
- OSL_ENSURE( !rStartCell.isEmpty(), "cell name missing" );
- OUString aRes = rTableName + "." + rStartCell;
+ OSL_ENSURE( !rTableName.empty(), "table name missing" );
+ OSL_ENSURE( !rStartCell.empty(), "cell name missing" );
+ OUString aRes = OUString::Concat(rTableName) + "." + rStartCell;
- if (!rEndCell.isEmpty())
+ if (!rEndCell.empty())
{
- aRes += ":" + rEndCell;
+ aRes += OUString::Concat(":") + rEndCell;
}
else if (bForceEndCellName)
{
- aRes += ":" + rStartCell;
+ aRes += OUString::Concat(":") + rStartCell;
}
return aRes;
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index b8f64541ab58..bf0f89ac0bbe 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -1723,7 +1723,7 @@ SwXTextCursor::setString(const OUString& aString)
uno::Any SwUnoCursorHelper::GetPropertyValue(
SwPaM& rPaM, const SfxItemPropertySet& rPropSet,
- const OUString& rPropertyName)
+ std::u16string_view rPropertyName)
{
uno::Any aAny;
SfxItemPropertySimpleEntry const*const pEntry =
@@ -1732,7 +1732,7 @@ uno::Any SwUnoCursorHelper::GetPropertyValue(
if (!pEntry)
{
throw beans::UnknownPropertyException(
- "Unknown property: " + rPropertyName,
+ OUString::Concat("Unknown property: ") + rPropertyName,
static_cast<cppu::OWeakObject *>(nullptr));
}
@@ -2004,7 +2004,7 @@ lcl_SelectParaAndReset( SwPaM &rPaM, SwDoc & rDoc,
void SwUnoCursorHelper::SetPropertyToDefault(
SwPaM& rPaM, const SfxItemPropertySet& rPropSet,
- const OUString& rPropertyName)
+ std::u16string_view rPropertyName)
{
SwDoc& rDoc = rPaM.GetDoc();
SfxItemPropertySimpleEntry const*const pEntry =
@@ -2012,14 +2012,14 @@ void SwUnoCursorHelper::SetPropertyToDefault(
if (!pEntry)
{
throw beans::UnknownPropertyException(
- "Unknown property: " + rPropertyName,
+ OUString::Concat("Unknown property: ") + rPropertyName,
static_cast<cppu::OWeakObject *>(nullptr));
}
if (pEntry->nFlags & beans::PropertyAttribute::READONLY)
{
throw uno::RuntimeException(
- "setPropertyToDefault: property is read-only: "
+ OUString::Concat("setPropertyToDefault: property is read-only: ")
+ rPropertyName, nullptr);
}
@@ -2043,14 +2043,15 @@ void SwUnoCursorHelper::SetPropertyToDefault(
uno::Any SwUnoCursorHelper::GetPropertyDefault(
SwPaM const & rPaM, const SfxItemPropertySet& rPropSet,
- const OUString& rPropertyName)
+ std::u16string_view rPropertyName)
{
SfxItemPropertySimpleEntry const*const pEntry =
rPropSet.getPropertyMap().getByName(rPropertyName);
if (!pEntry)
{
throw beans::UnknownPropertyException(
- "Unknown property: " + rPropertyName, static_cast<cppu::OWeakObject *>(nullptr));
+ OUString::Concat("Unknown property: ") + rPropertyName,
+ static_cast<cppu::OWeakObject *>(nullptr));
}
uno::Any aRet;
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index c404d77d58b1..2560ef45bb8d 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -1454,11 +1454,11 @@ bool SwCSS1Parser::MayBePositioned( const SvxCSS1PropertyInfo& rPropInfo,
SVX_CSS1_LTYPE_PERCENTAGE == rPropInfo.m_eWidthType );
}
-void SwCSS1Parser::AddClassName( OUString& rFormatName, const OUString& rClass )
+void SwCSS1Parser::AddClassName( OUString& rFormatName, std::u16string_view rClass )
{
- OSL_ENSURE( !rClass.isEmpty(), "Style class without length?" );
+ OSL_ENSURE( !rClass.empty(), "Style class without length?" );
- rFormatName += "." + rClass;
+ rFormatName += OUString::Concat(".") + rClass;
}
void SwCSS1Parser::FillDropCap( SwFormatDrop& rDrop,
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index 18c5def4ccf6..bb51694df012 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <hintids.hxx>
#include <comphelper/documentinfo.hxx>
#include <comphelper/string.hxx>
@@ -818,7 +822,7 @@ static bool lcl_html_setEvents(
return true;
}
-static void lcl_html_getEvents( const OUString& rOption, const OUString& rValue,
+static void lcl_html_getEvents( const OUString& rOption, std::u16string_view rValue,
std::vector<OUString>& rUnoMacroTable,
std::vector<OUString>& rUnoMacroParamTable )
{
diff --git a/sw/source/filter/html/swcss1.hxx b/sw/source/filter/html/swcss1.hxx
index b9f127c1ec04..9d930f6bfcd7 100644
--- a/sw/source/filter/html/swcss1.hxx
+++ b/sw/source/filter/html/swcss1.hxx
@@ -20,6 +20,10 @@
#ifndef INCLUDED_SW_SOURCE_FILTER_HTML_SWCSS1_HXX
#define INCLUDED_SW_SOURCE_FILTER_HTML_SWCSS1_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include <svtools/htmltokn.h>
#include <tools/solar.h>
@@ -128,7 +132,7 @@ public:
bool SetFormatBreak( SfxItemSet& rItemSet,
const SvxCSS1PropertyInfo& rPropInfo );
- static void AddClassName( OUString& rFormatName, const OUString& rClass );
+ static void AddClassName( OUString& rFormatName, std::u16string_view rClass );
static bool MayBePositioned( const SvxCSS1PropertyInfo& rPropInfo,
bool bAutoWidth=false );
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index 7d95066ef5b4..741448d96f7f 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -1219,10 +1219,10 @@ void SwHTMLWriter::OutPointFieldmarks( const SwPosition& rPos )
// TODO : Handle other single-point fieldmark types here (if any).
}
-void SwHTMLWriter::OutImplicitMark( const OUString& rMark,
+void SwHTMLWriter::OutImplicitMark( std::u16string_view rMark,
const char *pMarkType )
{
- if( !rMark.isEmpty() && !m_aImplicitMarks.empty() )
+ if( !rMark.empty() && !m_aImplicitMarks.empty() )
{
OUString sMark(rMark + OUStringChar(cMarkSeparator) + OUString::createFromAscii(pMarkType));
if( 0 != m_aImplicitMarks.erase( sMark ) )
diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx
index 26312473f7be..cef3eb788167 100644
--- a/sw/source/filter/html/wrthtml.hxx
+++ b/sw/source/filter/html/wrthtml.hxx
@@ -419,7 +419,7 @@ public:
void OutAnchor( const OUString& rName );
void OutBookmarks();
void OutPointFieldmarks( const SwPosition& rPos );
- void OutImplicitMark( const OUString& rMark, const char *pMarkType );
+ void OutImplicitMark( std::u16string_view rMark, const char *pMarkType );
OUString convertHyperlinkHRefValue(const OUString& rURL);
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 6f76dcbaebaa..1134900df65e 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -7010,7 +7010,7 @@ void DocxAttributeOutput::FontPitchType( FontPitch ePitch ) const
m_pSerializer->singleElementNS(XML_w, XML_pitch, FSNS(XML_w, XML_val), pPitch);
}
-void DocxAttributeOutput::EmbedFont( const OUString& name, FontFamily family, FontPitch pitch )
+void DocxAttributeOutput::EmbedFont( std::u16string_view name, FontFamily family, FontPitch pitch )
{
if( !m_rExport.m_rDoc.getIDocumentSettingAccess().get( DocumentSettingId::EMBED_FONTS ))
return; // no font embedding with this document
@@ -7025,7 +7025,7 @@ static char toHexChar( int value )
return value >= 10 ? value + 'A' - 10 : value + '0';
}
-void DocxAttributeOutput::EmbedFontStyle( const OUString& name, int tag, FontFamily family, FontItalic italic,
+void DocxAttributeOutput::EmbedFontStyle( std::u16string_view name, int tag, FontFamily family, FontItalic italic,
FontWeight weight, FontPitch pitch )
{
// Embed font if at least viewing is allowed (in which case the opening app must check
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx
index ed9fe43c5dbf..20781b13ceb3 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -325,7 +325,7 @@ public:
void FontPitchType( FontPitch ePitch ) const;
/// Write out the font into the document, if it's an embedded font.
- void EmbedFont( const OUString& name, FontFamily family, FontPitch pitch );
+ void EmbedFont( std::u16string_view name, FontFamily family, FontPitch pitch );
/// Definition of a numbering instance.
virtual void NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule ) override;
@@ -435,7 +435,7 @@ private:
void WriteFFData( const FieldInfos& rInfos );
void WritePendingPlaceholder();
- void EmbedFontStyle( const OUString& name, int tag, FontFamily family, FontItalic italic, FontWeight weight,
+ void EmbedFontStyle( std::u16string_view name, int tag, FontFamily family, FontItalic italic, FontWeight weight,
FontPitch pitch );
/**
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index ebff8c9db442..fdee9d097f31 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -1062,8 +1062,8 @@ public:
virtual void OutputField( const SwField* pField, ww::eField eFieldType,
const OUString& rFieldCmd, FieldFlags nMode = FieldFlags::All ) override;
- void StartCommentOutput( const OUString& rName );
- void EndCommentOutput( const OUString& rName );
+ void StartCommentOutput( std::u16string_view rName );
+ void EndCommentOutput( std::u16string_view rName );
void OutGrf(const ww8::Frame &rFrame);
bool TestOleNeedsGraphic(const SwAttrSet& rSet, tools::SvRef<SotStorage> const& xOleStg,
const tools::SvRef<SotStorage>& xObjStg, OUString const& rStorageName,
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 1cd22f2ee910..e05882cd09ad 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -1893,15 +1893,15 @@ void WW8Export::OutputField( const SwField* pField, ww::eField eFieldType,
InsertSpecialChar( *this, 0x15, nullptr, bIncludeEmptyPicLocation );
}
-void WW8Export::StartCommentOutput(const OUString& rName)
+void WW8Export::StartCommentOutput(std::u16string_view rName)
{
const OUString sStr{ FieldString(ww::eQUOTE) + "[" + rName + "] " };
OutputField(nullptr, ww::eQUOTE, sStr, FieldFlags::Start | FieldFlags::CmdStart);
}
-void WW8Export::EndCommentOutput(const OUString& rName)
+void WW8Export::EndCommentOutput(std::u16string_view rName)
{
- const OUString sStr{ " [" + rName + "] " };
+ const OUString sStr{ OUString::Concat(" [") + rName + "] " };
OutputField(nullptr, ww::eQUOTE, sStr, FieldFlags::CmdEnd | FieldFlags::End |
FieldFlags::Close);
}
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index c141c857f37c..d76614290239 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -159,9 +159,9 @@ static Color WW8TransCol(SVBT32 nWC)
return Color(nWC[0], nWC[1], nWC[2]);
}
-void wwFrameNamer::SetUniqueGraphName(SwFrameFormat *pFrameFormat, const OUString &rFixed)
+void wwFrameNamer::SetUniqueGraphName(SwFrameFormat *pFrameFormat, std::u16string_view rFixed)
{
- if (mbIsDisabled || rFixed.isEmpty())
+ if (mbIsDisabled || rFixed.empty())
return;
pFrameFormat->SetName(msSeed+OUString::number(++mnImportedGraphicsCount) + ": " + rFixed);
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index b3d4fba36294..c8e52560564c 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -382,7 +382,7 @@ bool BasicProjImportHelper::import( const uno::Reference< io::XInputStream >& rx
oox::StorageRef vbaStg = root.openSubStorage( "Macros" , false );
if ( vbaStg )
{
- oox::ole::VbaProject aVbaPrj( mxCtx, mrDocShell.GetModel(), "Writer" );
+ oox::ole::VbaProject aVbaPrj( mxCtx, mrDocShell.GetModel(), u"Writer" );
bRet = aVbaPrj.importVbaProject( *vbaStg );
}
}
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 7629d2e5a63d..57b53e05589c 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -942,7 +942,7 @@ private:
wwFrameNamer& operator=(wwFrameNamer const&) = delete;
public:
- void SetUniqueGraphName(SwFrameFormat *pFrameFormat, const OUString &rFixedPart);
+ void SetUniqueGraphName(SwFrameFormat *pFrameFormat, std::u16string_view rFixedPart);
wwFrameNamer(bool bIsDisabled, const OUString &rSeed)
: msSeed(rSeed), mnImportedGraphicsCount(0), mbIsDisabled(bIsDisabled)
{
diff --git a/sw/source/filter/xml/xmlexp.hxx b/sw/source/filter/xml/xmlexp.hxx
index 22e6a42368a7..42c5034c3f1c 100644
--- a/sw/source/filter/xml/xmlexp.hxx
+++ b/sw/source/filter/xml/xmlexp.hxx
@@ -23,6 +23,8 @@
#include <xmloff/xmlexp.hxx>
#include "xmlitmap.hxx"
#include <xmloff/xmltoken.hxx>
+
+#include <string_view>
#include <vector>
class SwDoc;
@@ -66,7 +68,7 @@ class SwXMLExport : public SvXMLExport
void ExportTableLinesAutoStyles( const SwTableLines& rLines,
sal_uInt32 nAbsWidth,
sal_uInt32 nBaseWidth,
- const OUString& rNamePrefix,
+ std::u16string_view rNamePrefix,
SwXMLTableColumnsSortByWidth_Impl& rExpCols,
SwXMLTableFrameFormatsSort_Impl& rExpRows,
SwXMLTableFrameFormatsSort_Impl& rExpCells,
diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx
index 605845088fa1..a681fc4cf38d 100644
--- a/sw/source/filter/xml/xmltble.cxx
+++ b/sw/source/filter/xml/xmltble.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <com/sun/star/text/XTextTable.hpp>
#include <com/sun/star/text/XTextSection.hpp>
@@ -181,13 +185,13 @@ class SwXMLTableFrameFormatsSort_Impl
private:
SwXMLFrameFormats_Impl aFormatList;
public:
- bool AddRow( SwFrameFormat& rFrameFormat, const OUString& rNamePrefix, sal_uInt32 nLine );
- bool AddCell( SwFrameFormat& rFrameFormat, const OUString& rNamePrefix,
+ bool AddRow( SwFrameFormat& rFrameFormat, std::u16string_view rNamePrefix, sal_uInt32 nLine );
+ bool AddCell( SwFrameFormat& rFrameFormat, std::u16string_view rNamePrefix,
sal_uInt32 nCol, sal_uInt32 nRow, bool bTop );
};
bool SwXMLTableFrameFormatsSort_Impl::AddRow( SwFrameFormat& rFrameFormat,
- const OUString& rNamePrefix,
+ std::u16string_view rNamePrefix,
sal_uInt32 nLine )
{
const SwFormatFrameSize *pFrameSize = nullptr;
@@ -280,7 +284,7 @@ bool SwXMLTableFrameFormatsSort_Impl::AddRow( SwFrameFormat& rFrameFormat,
if( bInsert )
{
- rFrameFormat.SetName( rNamePrefix + "." + OUString::number(nLine+1) );
+ rFrameFormat.SetName( OUString::Concat(rNamePrefix) + "." + OUString::number(nLine+1) );
if ( i != aFormatList.end() ) ++i;
aFormatList.insert( i, &rFrameFormat );
}
@@ -288,22 +292,22 @@ bool SwXMLTableFrameFormatsSort_Impl::AddRow( SwFrameFormat& rFrameFormat,
return bInsert;
}
-static OUString lcl_xmltble_appendBoxPrefix(const OUString& rNamePrefix,
+static OUString lcl_xmltble_appendBoxPrefix(std::u16string_view rNamePrefix,
sal_uInt32 nCol, sal_uInt32 nRow, bool bTop )
{
if( bTop )
{
OUString sTmp;
sw_GetTableBoxColStr( static_cast<sal_uInt16>(nCol), sTmp );
- return rNamePrefix + "." + sTmp + OUString::number(nRow + 1);
+ return OUString::Concat(rNamePrefix) + "." + sTmp + OUString::number(nRow + 1);
}
- return rNamePrefix
+ return OUString::Concat(rNamePrefix)
+ "." + OUString::number(nCol + 1)
+ "." + OUString::number(nRow + 1);
}
bool SwXMLTableFrameFormatsSort_Impl::AddCell( SwFrameFormat& rFrameFormat,
- const OUString& rNamePrefix,
+ std::u16string_view rNamePrefix,
sal_uInt32 nCol, sal_uInt32 nRow, bool bTop )
{
const SwFormatVertOrient *pVertOrient = nullptr;
@@ -557,7 +561,7 @@ void SwXMLExport::ExportTableColumnStyle( const SwXMLTableColumn_Impl& rCol )
void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines,
sal_uInt32 nAbsWidth, sal_uInt32 nBaseWidth,
- const OUString& rNamePrefix,
+ std::u16string_view rNamePrefix,
SwXMLTableColumnsSortByWidth_Impl& rExpCols,
SwXMLTableFrameFormatsSort_Impl& rExpRows,
SwXMLTableFrameFormatsSort_Impl& rExpCells,
@@ -620,11 +624,12 @@ void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines,
{
OUString sTmp;
sw_GetTableBoxColStr( nColumn, sTmp );
- pColumn->SetStyleName( rNamePrefix + "." + sTmp );
+ pColumn->SetStyleName( OUString::Concat(rNamePrefix) + "." + sTmp );
}
else
{
- pColumn->SetStyleName( rNamePrefix + "." + OUString::number(nColumn + 1U) );
+ pColumn->SetStyleName(
+ OUString::Concat(rNamePrefix) + "." + OUString::number(nColumn + 1U) );
}
ExportTableColumnStyle( *pColumn );
rExpCols.insert( pColumn );
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index d0a42a4bfbb3..15a77cdabb82 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -76,6 +76,8 @@
#include <o3tl/any.hxx>
#include <memory>
+#include <string_view>
+
#include <swuiexp.hxx>
using namespace ::dbtools;
@@ -1420,34 +1422,34 @@ void SwInsertDBColAutoPilot::SetTabSet()
rSh.MoveTable( GotoCurrTable, fnTableStart );
}
-static Sequence<OUString> lcl_createSourceNames(const OUString& rNodeName)
+static Sequence<OUString> lcl_createSourceNames(std::u16string_view rNodeName)
{
Sequence<OUString> aSourceNames(11);
OUString* pNames = aSourceNames.getArray();
- pNames[0] = rNodeName + "/DataSource";
- pNames[1] = rNodeName + "/Command";
- pNames[2] = rNodeName + "/CommandType";
- pNames[3] = rNodeName + "/ColumnsToText";
- pNames[4] = rNodeName + "/ColumnsToTable";
- pNames[5] = rNodeName + "/ParaStyle";
- pNames[6] = rNodeName + "/TableAutoFormat";
- pNames[7] = rNodeName + "/IsTable";
- pNames[8] = rNodeName + "/IsField";
- pNames[9] = rNodeName + "/IsHeadlineOn";
- pNames[10] = rNodeName + "/IsEmptyHeadline";
+ pNames[0] = OUString::Concat(rNodeName) + "/DataSource";
+ pNames[1] = OUString::Concat(rNodeName) + "/Command";
+ pNames[2] = OUString::Concat(rNodeName) + "/CommandType";
+ pNames[3] = OUString::Concat(rNodeName) + "/ColumnsToText";
+ pNames[4] = OUString::Concat(rNodeName) + "/ColumnsToTable";
+ pNames[5] = OUString::Concat(rNodeName) + "/ParaStyle";
+ pNames[6] = OUString::Concat(rNodeName) + "/TableAutoFormat";
+ pNames[7] = OUString::Concat(rNodeName) + "/IsTable";
+ pNames[8] = OUString::Concat(rNodeName) + "/IsField";
+ pNames[9] = OUString::Concat(rNodeName) + "/IsHeadlineOn";
+ pNames[10] = OUString::Concat(rNodeName) + "/IsEmptyHeadline";
return aSourceNames;
}
-static Sequence<OUString> lcl_CreateSubNames(const OUString& rSubNodeName)
+static Sequence<OUString> lcl_CreateSubNames(std::u16string_view rSubNodeName)
{
Sequence<OUString> aSubSourceNames(6);
OUString* pNames = aSubSourceNames.getArray();
- pNames[0] = rSubNodeName + "/ColumnName";
- pNames[1] = rSubNodeName + "/ColumnIndex";
- pNames[2] = rSubNodeName + "/IsNumberFormat";
- pNames[3] = rSubNodeName + "/IsNumberFormatFromDataBase";
- pNames[4] = rSubNodeName + "/NumberFormat";
- pNames[5] = rSubNodeName + "/NumberFormatLocale";
+ pNames[0] = OUString::Concat(rSubNodeName) + "/ColumnName";
+ pNames[1] = OUString::Concat(rSubNodeName) + "/ColumnIndex";
+ pNames[2] = OUString::Concat(rSubNodeName) + "/IsNumberFormat";
+ pNames[3] = OUString::Concat(rSubNodeName) + "/IsNumberFormatFromDataBase";
+ pNames[4] = OUString::Concat(rSubNodeName) + "/NumberFormat";
+ pNames[5] = OUString::Concat(rSubNodeName) + "/NumberFormatLocale";
return aSubSourceNames;
}
@@ -1614,7 +1616,7 @@ void SwInsertDBColAutoPilot::Load()
for(const OUString& rSubName : aSubNames)
{
Sequence <OUString> aSubNodeNames =
- lcl_CreateSubNames(sSubNodeName + rSubName);
+ lcl_CreateSubNames(OUString(sSubNodeName + rSubName));
Sequence< Any> aSubProps = GetProperties(aSubNodeNames);
const Any* pSubProps = aSubProps.getConstArray();
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 14215accd178..357be32aa182 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -58,6 +58,7 @@
#include <svx/dialogs.hrc>
#include <svx/flagsdef.hxx>
#include <memory>
+#include <string_view>
using namespace ::com::sun::star;
@@ -171,8 +172,8 @@ public:
OUString GetFile() const;
OUString GetSubRegion() const;
void SetFile(OUString const& rFile);
- void SetFilter(OUString const& rFilter);
- void SetSubRegion(OUString const& rSubRegion);
+ void SetFilter(std::u16string_view rFilter);
+ void SetSubRegion(std::u16string_view rSubRegion);
bool IsContent() const { return m_bContent; }
void SetContent(bool const bValue) { m_bContent = bValue; }
@@ -235,7 +236,7 @@ void SectRepr::SetFile( const OUString& rFile )
}
}
-void SectRepr::SetFilter( const OUString& rFilter )
+void SectRepr::SetFilter( std::u16string_view rFilter )
{
OUString sNewFile;
const OUString sOldFileName( m_SectionData.GetLinkFileName() );
@@ -257,7 +258,7 @@ void SectRepr::SetFilter( const OUString& rFilter )
}
}
-void SectRepr::SetSubRegion(const OUString& rSubRegion)
+void SectRepr::SetSubRegion(std::u16string_view rSubRegion)
{
OUString sNewFile;
sal_Int32 n(0);
@@ -265,13 +266,13 @@ void SectRepr::SetSubRegion(const OUString& rSubRegion)
const OUString sOldFileName( sLinkFileName.getToken( 0, sfx2::cTokenSeparator, n ) );
const OUString sFilter( sLinkFileName.getToken( 0, sfx2::cTokenSeparator, n ) );
- if( !rSubRegion.isEmpty() || !sOldFileName.isEmpty() )
+ if( !rSubRegion.empty() || !sOldFileName.isEmpty() )
sNewFile = sOldFileName + OUStringChar(sfx2::cTokenSeparator) +
sFilter + OUStringChar(sfx2::cTokenSeparator) + rSubRegion;
m_SectionData.SetLinkFileName( sNewFile );
- if( !rSubRegion.isEmpty() || !sOldFileName.isEmpty() )
+ if( !rSubRegion.empty() || !sOldFileName.isEmpty() )
{
m_SectionData.SetType( SectionType::FileLink );
}
@@ -942,7 +943,7 @@ IMPL_LINK(SwEditRegionDlg, UseFileHdl, weld::ToggleButton&, rButton, void)
else
{
pSectRepr->SetFile(OUString());
- pSectRepr->SetSubRegion(OUString());
+ pSectRepr->SetSubRegion(std::u16string_view());
pSectRepr->GetSectionData().SetLinkFilePassword(OUString());
}
return false;
diff --git a/sw/source/ui/dochdl/selglos.cxx b/sw/source/ui/dochdl/selglos.cxx
index 46acd407f057..1d2b93f239a6 100644
--- a/sw/source/ui/dochdl/selglos.cxx
+++ b/sw/source/ui/dochdl/selglos.cxx
@@ -19,7 +19,7 @@
#include <selglos.hxx>
-SwSelGlossaryDlg::SwSelGlossaryDlg(weld::Window * pParent, const OUString &rShortName)
+SwSelGlossaryDlg::SwSelGlossaryDlg(weld::Window * pParent, std::u16string_view rShortName)
: GenericDialogController(pParent, "modules/swriter/ui/insertautotextdialog.ui", "InsertAutoTextDialog")
, m_xFrame(m_xBuilder->weld_frame("frame"))
, m_xGlosBox(m_xBuilder->weld_tree_view("treeview"))
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index 7a9620b876cf..16b3a66d8460 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -1108,7 +1108,7 @@ void SwDocShell::GetState(SfxItemSet& rSet)
{
SfxViewShell* pViewShell = GetView()? GetView(): SfxViewShell::Current();
bool bVisible = sfx2::SfxNotebookBar::StateMethod(pViewShell->GetViewFrame()->GetBindings(),
- "modules/swriter/ui/");
+ u"modules/swriter/ui/");
rSet.Put( SfxBoolItem( SID_NOTEBOOKBAR, bVisible ) );
}
break;
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index c720c3775c8c..d824ac393cbd 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -368,7 +368,7 @@ static const SwBoxAutoFormat* lcl_FindCellStyle(SwDoc& rDoc, std::u16string_view
}
sal_uInt32 SwStyleSheetIterator::SwPoolFormatList::FindName(SfxStyleFamily eFam,
- const OUString &rName)
+ std::u16string_view rName)
{
if(!maImpl.empty())
{
@@ -423,7 +423,7 @@ void SwStyleSheetIterator::SwPoolFormatList::rehash()
}
void SwStyleSheetIterator::SwPoolFormatList::RemoveName(SfxStyleFamily eFam,
- const OUString &rName)
+ std::u16string_view rName)
{
sal_uInt32 nTmpPos = FindName( eFam, rName );
if( nTmpPos < maImpl.size() )
@@ -435,7 +435,7 @@ void SwStyleSheetIterator::SwPoolFormatList::RemoveName(SfxStyleFamily eFam,
}
// Add Strings to the list of templates
-void SwStyleSheetIterator::SwPoolFormatList::Append( char cChar, const OUString& rStr )
+void SwStyleSheetIterator::SwPoolFormatList::Append( char cChar, std::u16string_view rStr )
{
const OUString aStr = OUStringChar(cChar) + rStr;
diff --git a/sw/source/uibase/inc/inputwin.hxx b/sw/source/uibase/inc/inputwin.hxx
index ab18e2118cc3..5536f9634c6d 100644
--- a/sw/source/uibase/inc/inputwin.hxx
+++ b/sw/source/uibase/inc/inputwin.hxx
@@ -19,6 +19,10 @@
#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_INPUTWIN_HXX
#define INCLUDED_SW_SOURCE_UIBASE_INC_INPUTWIN_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include <vcl/InterimItemWindow.hxx>
#include <vcl/menu.hxx>
#include <vcl/toolbox.hxx>
@@ -49,7 +53,7 @@ public:
SetSizePixel(m_xWidget->get_preferred_size());
}
- void UpdateRange(const OUString& rSel, const OUString& rTableName);
+ void UpdateRange(std::u16string_view rSel, const OUString& rTableName);
virtual void dispose() override
{
diff --git a/sw/source/uibase/inc/selglos.hxx b/sw/source/uibase/inc/selglos.hxx
index 0109051a5f68..fd5de379631a 100644
--- a/sw/source/uibase/inc/selglos.hxx
+++ b/sw/source/uibase/inc/selglos.hxx
@@ -19,6 +19,10 @@
#pragma once
+#include <sal/config.h>
+
+#include <string_view>
+
#include <vcl/weld.hxx>
class SwSelGlossaryDlg final : public weld::GenericDialogController
@@ -28,12 +32,12 @@ class SwSelGlossaryDlg final : public weld::GenericDialogController
DECL_LINK(DoubleClickHdl, weld::TreeView&, bool);
public:
- SwSelGlossaryDlg(weld::Window * pParent, const OUString &rShortName);
+ SwSelGlossaryDlg(weld::Window * pParent, std::u16string_view rShortName);
virtual ~SwSelGlossaryDlg() override;
- void InsertGlos(const OUString &rRegion, const OUString &rGlosName)
+ void InsertGlos(std::u16string_view rRegion, std::u16string_view rGlosName)
{
- const OUString aTmp = rRegion + ":" + rGlosName;
+ const OUString aTmp = OUString::Concat(rRegion) + ":" + rGlosName;
m_xGlosBox->append_text(aTmp);
}
sal_Int32 GetSelectedIdx() const
diff --git a/sw/source/uibase/misc/glosdoc.cxx b/sw/source/uibase/misc/glosdoc.cxx
index f4e58d08ffcd..181f8c7247e1 100644
--- a/sw/source/uibase/misc/glosdoc.cxx
+++ b/sw/source/uibase/misc/glosdoc.cxx
@@ -18,6 +18,7 @@
*/
#include <algorithm>
+#include <string_view>
#include <com/sun/star/container/XNamed.hpp>
#include <comphelper/servicehelper.hxx>
@@ -47,9 +48,9 @@ using namespace ::com::sun::star::uno;
namespace
{
-OUString lcl_FullPathName(const OUString& sPath, const OUString& sName)
+OUString lcl_FullPathName(std::u16string_view sPath, std::u16string_view sName)
{
- return sPath + "/" + sName + SwGlossaries::GetExtension();
+ return OUString::Concat(sPath) + "/" + sName + SwGlossaries::GetExtension();
}
OUString lcl_CheckFileName( const OUString& rNewFilePath,
diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx
index c5dfa9dc1366..fb1b082d6747 100644
--- a/sw/source/uibase/ribbar/inputwin.cxx
+++ b/sw/source/uibase/ribbar/inputwin.cxx
@@ -501,10 +501,10 @@ IMPL_LINK_NOARG(InputEdit, ActivateHdl, weld::Entry&, bool)
return true;
}
-void InputEdit::UpdateRange(const OUString& rBoxes,
+void InputEdit::UpdateRange(std::u16string_view rBoxes,
const OUString& rName )
{
- if( rBoxes.isEmpty() )
+ if( rBoxes.empty() )
{
GrabFocus();
return;
diff --git a/test/source/bootstrapfixture.cxx b/test/source/bootstrapfixture.cxx
index c04729376b1e..5116ac32115a 100644
--- a/test/source/bootstrapfixture.cxx
+++ b/test/source/bootstrapfixture.cxx
@@ -174,13 +174,13 @@ void test::BootstrapFixture::validate(const OUString& rPath, test::ValidationFor
// invoke without -e so that we know when something new is written
// in loext namespace that isn't yet in the custom schema
aValidator += " -M "
- + m_directories.getPathFromSrc("/schema/libreoffice/OpenDocument-manifest-schema-v1.3+libreoffice.rng")
+ + m_directories.getPathFromSrc(u"/schema/libreoffice/OpenDocument-manifest-schema-v1.3+libreoffice.rng")
+ " -D "
- + m_directories.getPathFromSrc("/schema/libreoffice/OpenDocument-dsig-schema-v1.3+libreoffice.rng")
+ + m_directories.getPathFromSrc(u"/schema/libreoffice/OpenDocument-dsig-schema-v1.3+libreoffice.rng")
+ " -O "
- + m_directories.getPathFromSrc("/schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng")
+ + m_directories.getPathFromSrc(u"/schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng")
+ " -m "
- + m_directories.getPathFromSrc("/schema/mathml2/mathml2.xsd");
+ + m_directories.getPathFromSrc(u"/schema/mathml2/mathml2.xsd");
}
utl::TempFile aOutput;
diff --git a/test/source/helper/form.cxx b/test/source/helper/form.cxx
index 77e6b163524c..c610070a1372 100644
--- a/test/source/helper/form.cxx
+++ b/test/source/helper/form.cxx
@@ -29,11 +29,11 @@ uno::Reference<drawing::XControlShape>
const sal_Int32 nX, const sal_Int32 nY,
const sal_Int32 nHeight, const sal_Int32 nWidth)
{
- return createControlShape(r_xComponent, "CommandButton", nX, nY, nHeight, nWidth);
+ return createControlShape(r_xComponent, u"CommandButton", nX, nY, nHeight, nWidth);
}
uno::Reference<drawing::XControlShape> OOO_DLLPUBLIC_TEST createControlShape(
- const uno::Reference<lang::XComponent>& r_xComponent, const OUString& r_aKind,
+ const uno::Reference<lang::XComponent>& r_xComponent, std::u16string_view r_aKind,
const sal_Int32 nX, const sal_Int32 nY, const sal_Int32 nHeight, const sal_Int32 nWidth)
{
uno::Reference<lang::XMultiServiceFactory> xMSF(r_xComponent, uno::UNO_QUERY_THROW);
@@ -42,10 +42,11 @@ uno::Reference<drawing::XControlShape> OOO_DLLPUBLIC_TEST createControlShape(
xMSF->createInstance("com.sun.star.drawing.ControlShape"), uno::UNO_QUERY_THROW);
uno::Reference<uno::XInterface> aComponent(
- xMSF->createInstance("com.sun.star.form.component." + r_aKind), uno::UNO_SET_THROW);
+ xMSF->createInstance(OUString::Concat("com.sun.star.form.component.") + r_aKind),
+ uno::UNO_SET_THROW);
uno::Reference<beans::XPropertySet> xPropertySet(aComponent, uno::UNO_QUERY_THROW);
- xPropertySet->setPropertyValue("DefaultControl",
- uno::makeAny("com.sun.star.form.control." + r_aKind));
+ xPropertySet->setPropertyValue(
+ "DefaultControl", uno::makeAny(OUString::Concat("com.sun.star.form.control.") + r_aKind));
uno::Reference<awt::XControlModel> xControlModel(aComponent, uno::UNO_QUERY_THROW);
xControlShape->setSize(awt::Size(nHeight, nWidth));
diff --git a/test/source/helper/shape.cxx b/test/source/helper/shape.cxx
index 4fafcc0c7e48..0fbc3bc6d3a3 100644
--- a/test/source/helper/shape.cxx
+++ b/test/source/helper/shape.cxx
@@ -26,7 +26,7 @@ uno::Reference<drawing::XShape>
const sal_Int32 nX, const sal_Int32 nY, const sal_Int32 nWidth,
const sal_Int32 nHeight)
{
- return createShape(r_xComponent, "Ellipse", nX, nY, nWidth, nHeight);
+ return createShape(r_xComponent, u"Ellipse", nX, nY, nWidth, nHeight);
}
uno::Reference<drawing::XShape>
@@ -34,7 +34,7 @@ uno::Reference<drawing::XShape>
const sal_Int32 nX, const sal_Int32 nY, const sal_Int32 nWidth,
const sal_Int32 nHeight)
{
- return createShape(r_xComponent, "Line", nX, nY, nWidth, nHeight);
+ return createShape(r_xComponent, u"Line", nX, nY, nWidth, nHeight);
}
uno::Reference<drawing::XShape>
@@ -42,17 +42,17 @@ uno::Reference<drawing::XShape>
const sal_Int32 nX, const sal_Int32 nY,
const sal_Int32 nWidth, const sal_Int32 nHeight)
{
- return createShape(r_xComponent, "Rectangle", nX, nY, nWidth, nHeight);
+ return createShape(r_xComponent, u"Rectangle", nX, nY, nWidth, nHeight);
}
-uno::Reference<drawing::XShape>
- OOO_DLLPUBLIC_TEST createShape(const uno::Reference<lang::XComponent>& r_xComponent,
- const OUString& r_aKind, const sal_Int32 nX, const sal_Int32 nY,
- const sal_Int32 nWidth, const sal_Int32 nHeight)
+uno::Reference<drawing::XShape> OOO_DLLPUBLIC_TEST
+createShape(const uno::Reference<lang::XComponent>& r_xComponent, std::u16string_view r_aKind,
+ const sal_Int32 nX, const sal_Int32 nY, const sal_Int32 nWidth, const sal_Int32 nHeight)
{
uno::Reference<lang::XMultiServiceFactory> xMSF(r_xComponent, uno::UNO_QUERY_THROW);
uno::Reference<drawing::XShape> xShape(
- xMSF->createInstance("com.sun.star.drawing." + r_aKind + "Shape"), uno::UNO_QUERY_THROW);
+ xMSF->createInstance(OUString::Concat("com.sun.star.drawing.") + r_aKind + "Shape"),
+ uno::UNO_QUERY_THROW);
try
{
diff --git a/test/source/screenshot_test.cxx b/test/source/screenshot_test.cxx
index a99b01d37c2f..a79d53a0d87a 100644
--- a/test/source/screenshot_test.cxx
+++ b/test/source/screenshot_test.cxx
@@ -242,7 +242,7 @@ void ScreenshotTest::processAllKnownDialogs()
}
}
-void ScreenshotTest::processDialogBatchFile(const OUString& rFile)
+void ScreenshotTest::processDialogBatchFile(std::u16string_view rFile)
{
test::Directories aDirectories;
const OUString aURL(aDirectories.getURLFromSrc(rFile));
diff --git a/test/source/unoapi_test.cxx b/test/source/unoapi_test.cxx
index 6147609f3f42..50d0ff562fc9 100644
--- a/test/source/unoapi_test.cxx
+++ b/test/source/unoapi_test.cxx
@@ -30,7 +30,7 @@ void UnoApiTest::setUp()
CPPUNIT_ASSERT_MESSAGE("no desktop!", mxDesktop.is());
}
-void UnoApiTest::createFileURL(const OUString& aFileBase, OUString& rFilePath)
+void UnoApiTest::createFileURL(std::u16string_view aFileBase, OUString& rFilePath)
{
rFilePath = m_directories.getSrcRootURL() + m_aBaseString + "/" + aFileBase;
}
diff --git a/test/source/view/xcontrolaccess.cxx b/test/source/view/xcontrolaccess.cxx
index 1e7583f2b137..43a98c9c868c 100644
--- a/test/source/view/xcontrolaccess.cxx
+++ b/test/source/view/xcontrolaccess.cxx
@@ -39,7 +39,7 @@ void XControlAccess::testGetControl()
uno::Reference<drawing::XShapes> xShapes(xDP, uno::UNO_QUERY_THROW);
uno::Reference<drawing::XShape> xShape(
- helper::form::createControlShape(xComponent, "CommandButton", 10000, 50000, 100, 100),
+ helper::form::createControlShape(xComponent, u"CommandButton", 10000, 50000, 100, 100),
uno::UNO_QUERY_THROW);
xShapes->add(xShape);
diff --git a/test/source/xmltesttools.cxx b/test/source/xmltesttools.cxx
index c1d03cd41fe7..16226a2e8845 100644
--- a/test/source/xmltesttools.cxx
+++ b/test/source/xmltesttools.cxx
@@ -251,7 +251,7 @@ void XmlTestTools::assertXPathNoAttribute(const xmlDocUniquePtr& pXmlDoc, const
xmlXPathFreeObject(pXmlObj);
}
-int XmlTestTools::getXPathPosition(const xmlDocUniquePtr& pXmlDoc, const OString& rXPath, const OString& rChildName)
+int XmlTestTools::getXPathPosition(const xmlDocUniquePtr& pXmlDoc, const OString& rXPath, std::string_view rChildName)
{
xmlXPathObjectPtr pXmlObj = getXPathNode(pXmlDoc, rXPath);
xmlNodeSetPtr pXmlNodes = pXmlObj->nodesetval;
diff --git a/tools/qa/cppunit/test_config.cxx b/tools/qa/cppunit/test_config.cxx
index c24a30848ec4..9c9a40899876 100644
--- a/tools/qa/cppunit/test_config.cxx
+++ b/tools/qa/cppunit/test_config.cxx
@@ -24,7 +24,7 @@ public:
virtual void setUp() override
{
- maOriginalConfigFile = m_directories.getURLFromSrc("/tools/qa/data/");
+ maOriginalConfigFile = m_directories.getURLFromSrc(u"/tools/qa/data/");
maOriginalConfigFile += "testconfig.ini";
auto const e = osl::FileBase::getTempDirURL(maConfigFile);
diff --git a/tools/qa/cppunit/test_xmlwalker.cxx b/tools/qa/cppunit/test_xmlwalker.cxx
index e06886deddd8..9f442c73c347 100644
--- a/tools/qa/cppunit/test_xmlwalker.cxx
+++ b/tools/qa/cppunit/test_xmlwalker.cxx
@@ -25,7 +25,7 @@ public:
{
}
- virtual void setUp() override { maBasePath = m_directories.getURLFromSrc("/tools/qa/data/"); }
+ virtual void setUp() override { maBasePath = m_directories.getURLFromSrc(u"/tools/qa/data/"); }
void testReadXML();
diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx
index f49dd87a4939..ddf575cd9d5f 100644
--- a/ucb/source/core/ucb.cxx
+++ b/ucb/source/core/ucb.cxx
@@ -23,6 +23,11 @@
**************************************************************************
*************************************************************************/
+
+#include <sal/config.h>
+
+#include <string_view>
+
#include <osl/diagnose.h>
#include <sal/log.hxx>
#include <rtl/ustrbuf.hxx>
@@ -168,7 +173,7 @@ void makeAndAppendXMLName(
}
bool createContentProviderData(
- const OUString & rProvider,
+ std::u16string_view rProvider,
const uno::Reference< container::XHierarchicalNameAccess >& rxHierNameAccess,
ContentProviderData & rInfo)
{
@@ -178,7 +183,7 @@ bool createContentProviderData(
try
{
if ( !( rxHierNameAccess->getByHierarchicalName(
- rProvider + "/ServiceName" ) >>= aValue ) )
+ OUString::Concat(rProvider) + "/ServiceName" ) >>= aValue ) )
{
OSL_FAIL( "UniversalContentBroker::getContentProviderData - "
"Error getting item value!" );
@@ -194,7 +199,7 @@ bool createContentProviderData(
// Obtain URL Template.
if ( !( rxHierNameAccess->getByHierarchicalName(
- rProvider + "/URLTemplate" ) >>= aValue ) )
+ OUString::Concat(rProvider) + "/URLTemplate" ) >>= aValue ) )
{
OSL_FAIL( "UniversalContentBroker::getContentProviderData - "
"Error getting item value!" );
@@ -205,7 +210,7 @@ bool createContentProviderData(
// Obtain Arguments.
if ( !( rxHierNameAccess->getByHierarchicalName(
- rProvider + "/Arguments" ) >>= aValue ) )
+ OUString::Concat(rProvider) + "/Arguments" ) >>= aValue ) )
{
OSL_FAIL( "UniversalContentBroker::getContentProviderData - "
"Error getting item value!" );
diff --git a/ucb/source/ucp/file/filglob.cxx b/ucb/source/ucp/file/filglob.cxx
index 2ff92af3acb8..97e979a93edf 100644
--- a/ucb/source/ucp/file/filglob.cxx
+++ b/ucb/source/ucp/file/filglob.cxx
@@ -172,13 +172,13 @@ namespace fileaccess {
OUString newName(
- const OUString& aNewPrefix,
+ std::u16string_view aNewPrefix,
const OUString& aOldPrefix,
std::u16string_view old_Name )
{
sal_Int32 srcL = aOldPrefix.getLength();
- return aNewPrefix + old_Name.substr( srcL );
+ return OUString::Concat(aNewPrefix) + old_Name.substr( srcL );
}
diff --git a/ucb/source/ucp/file/filglob.hxx b/ucb/source/ucp/file/filglob.hxx
index ce3a32fea9f5..9c7db03debf7 100644
--- a/ucb/source/ucp/file/filglob.hxx
+++ b/ucb/source/ucp/file/filglob.hxx
@@ -46,7 +46,7 @@ namespace fileaccess {
// Changes the prefix in name
- extern OUString newName( const OUString& aNewPrefix,
+ extern OUString newName( std::u16string_view aNewPrefix,
const OUString& aOldPrefix,
std::u16string_view old_Name );
diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx
index 7a7204978fda..6b6cb88d4e48 100644
--- a/ucb/source/ucp/package/pkgcontent.cxx
+++ b/ucb/source/ucp/package/pkgcontent.cxx
@@ -219,9 +219,9 @@ Content* Content::create(
// static
OUString Content::getContentType(
- const OUString& aScheme, bool bFolder )
+ std::u16string_view aScheme, bool bFolder )
{
- return ( "application/"
+ return ( OUString::Concat("application/")
+ aScheme
+ ( bFolder
? OUStringLiteral(u"-folder")
diff --git a/ucb/source/ucp/package/pkgcontent.hxx b/ucb/source/ucp/package/pkgcontent.hxx
index c17973775642..5bbd483ff175 100644
--- a/ucb/source/ucp/package/pkgcontent.hxx
+++ b/ucb/source/ucp/package/pkgcontent.hxx
@@ -20,6 +20,9 @@
#ifndef INCLUDED_UCB_SOURCE_UCP_PACKAGE_PKGCONTENT_HXX
#define INCLUDED_UCB_SOURCE_UCP_PACKAGE_PKGCONTENT_HXX
+#include <sal/config.h>
+
+#include <string_view>
#include <vector>
#include <rtl/ref.hxx>
@@ -266,7 +269,7 @@ public:
getIterator();
static OUString
- getContentType( const OUString& aScheme, bool bFolder );
+ getContentType( std::u16string_view aScheme, bool bFolder );
};
}
diff --git a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
index 3bbcee31dbf7..a2460ff28dd1 100644
--- a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
+++ b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
@@ -26,6 +26,7 @@
#include "skeletoncpp.hxx"
#include <iostream>
+#include <string_view>
using namespace ::codemaker::cpp;
@@ -856,11 +857,11 @@ static void generateMethodBodies(std::ostream& o,
ProgramOptions const & options,
rtl::Reference< TypeManager > const & manager,
std::set< OUString > const & interfaces,
- OString const & classname,
+ std::string_view classname,
OString const & comphelpernamespace,
OUString const & propertyhelper)
{
- OString name = classname + "::";
+ OString name = OString::Concat(classname) + "::";
codemaker::GeneratedTypeSet generated;
for (const auto& rIface : interfaces) {
if ( rIface == "com.sun.star.lang.XServiceInfo" ) {
@@ -879,16 +880,16 @@ static void generateQueryInterface(std::ostream& o,
const std::set< OUString >& interfaces,
OString const & parentname,
OString const & classname,
- OUString const & propertyhelper)
+ std::u16string_view propertyhelper)
{
- if (propertyhelper.isEmpty())
+ if (propertyhelper.empty())
return;
o << "css::uno::Any " << classname
<< "::queryInterface(css::uno::Type const & type) throw ("
"css::uno::RuntimeException)\n{\n ";
- if (!propertyhelper.isEmpty())
+ if (!propertyhelper.empty())
o << "return ";
else
o << "css::uno::Any a(";
@@ -905,12 +906,12 @@ static void generateQueryInterface(std::ostream& o,
o << ">";
}
- if (!propertyhelper.isEmpty()) {
+ if (!propertyhelper.empty()) {
o << "::queryInterface(type);\n";
} else {
o << "::queryInterface(type));\n";
o << " return a.hasValue() ? a\n : (";
- if (propertyhelper == "_") {
+ if (propertyhelper == u"_") {
o << "::cppu::OPropertySetHelper::queryInterface(type));\n";
} else {
o << "::cppu::PropertySetMixin<\n ";
diff --git a/unodevtools/source/skeletonmaker/cpptypemaker.cxx b/unodevtools/source/skeletonmaker/cpptypemaker.cxx
index b7b4f4a7c0ec..59407c2c6b47 100644
--- a/unodevtools/source/skeletonmaker/cpptypemaker.cxx
+++ b/unodevtools/source/skeletonmaker/cpptypemaker.cxx
@@ -27,6 +27,7 @@
#include "skeletoncpp.hxx"
#include <algorithm>
+#include <string_view>
using namespace ::codemaker::cpp;
@@ -123,7 +124,7 @@ static void printType(
void printType(
std::ostream & o, ProgramOptions const & options,
- rtl::Reference< TypeManager > const & manager, OUString const & name,
+ rtl::Reference< TypeManager > const & manager, std::u16string_view name,
short referenceType, bool defaultvalue)
{
OUString nucleus;
@@ -141,7 +142,7 @@ static bool printConstructorParameters(
std::ostream & o, ProgramOptions const & options,
rtl::Reference< TypeManager > const & manager,
codemaker::UnoType::Sort sort,
- rtl::Reference< unoidl::Entity > const & entity, OUString const & name,
+ rtl::Reference< unoidl::Entity > const & entity, std::u16string_view name,
std::vector< OUString > const & arguments)
{
bool previous = false;
@@ -250,7 +251,7 @@ static bool printConstructorParameters(
}
default:
throw CannotDumpException(
- "unexpected entity \"" + name
+ OUString::Concat("unexpected entity \"") + name
+ "\" in call to skeletonmaker::cpp::printConstructorParameters");
}
return previous;
diff --git a/unodevtools/source/skeletonmaker/javatypemaker.cxx b/unodevtools/source/skeletonmaker/javatypemaker.cxx
index a82a1fd1b610..e724eb498838 100644
--- a/unodevtools/source/skeletonmaker/javatypemaker.cxx
+++ b/unodevtools/source/skeletonmaker/javatypemaker.cxx
@@ -112,7 +112,7 @@ static void printType(
void printType(
std::ostream & o, ProgramOptions const & options,
- rtl::Reference< TypeManager > const & manager, OUString const & name,
+ rtl::Reference< TypeManager > const & manager, std::u16string_view name,
bool referenceType, bool defaultvalue)
{
OUString nucleus;
@@ -129,7 +129,7 @@ static bool printConstructorParameters(
std::ostream & o, ProgramOptions const & options,
rtl::Reference< TypeManager > const & manager,
codemaker::UnoType::Sort sort,
- rtl::Reference< unoidl::Entity > const & entity, OUString const & name,
+ rtl::Reference< unoidl::Entity > const & entity, std::u16string_view name,
std::vector< OUString > const & arguments)
{
bool previous = false;
@@ -238,7 +238,7 @@ static bool printConstructorParameters(
}
default:
throw CannotDumpException(
- "unexpected entity \"" + name
+ OUString::Concat("unexpected entity \"") + name
+ "\" in call to skeletonmaker::cpp::printConstructorParameters");
}
return previous;
diff --git a/unodevtools/source/skeletonmaker/skeletoncommon.cxx b/unodevtools/source/skeletonmaker/skeletoncommon.cxx
index 21a174b69e1a..e2ecdb35a824 100644
--- a/unodevtools/source/skeletonmaker/skeletoncommon.cxx
+++ b/unodevtools/source/skeletonmaker/skeletoncommon.cxx
@@ -30,6 +30,7 @@
#include <algorithm>
#include <cassert>
#include <iostream>
+#include <string_view>
using namespace ::codemaker::cpp;
@@ -402,7 +403,7 @@ checkAdditionalPropertyFlags(
// types are allowed add-in types, for more info see the com.sun.star.sheet.AddIn
// service description
static bool checkAddinType(rtl::Reference< TypeManager > const & manager,
- OUString const & type, bool & bLastAny,
+ std::u16string_view type, bool & bLastAny,
bool & bHasXPropertySet, bool bIsReturn)
{
assert(manager.is());
@@ -431,11 +432,11 @@ static bool checkAddinType(rtl::Reference< TypeManager > const & manager,
}
if ( sort == codemaker::UnoType::Sort::Interface )
{
- if ( bIsReturn && type == "com.sun.star.sheet.XVolatileResult" )
+ if ( bIsReturn && type == u"com.sun.star.sheet.XVolatileResult" )
return true;
- if ( !bIsReturn && type == "com.sun.star.table.XCellRange" )
+ if ( !bIsReturn && type == u"com.sun.star.table.XCellRange" )
return true;
- if ( !bIsReturn && type == "com.sun.star.beans.XPropertySet" )
+ if ( !bIsReturn && type == u"com.sun.star.beans.XPropertySet" )
{
if ( bHasXPropertySet ) {
return false;
@@ -449,7 +450,7 @@ static bool checkAddinType(rtl::Reference< TypeManager > const & manager,
}
static void checkAddInTypes(
- rtl::Reference< TypeManager > const & manager, OUString const & name,
+ rtl::Reference< TypeManager > const & manager, std::u16string_view name,
rtl::Reference< unoidl::InterfaceTypeEntity > const & entity)
{
assert(entity.is());
@@ -461,7 +462,7 @@ static void checkAddInTypes(
manager, rMethod.returnType, bLastAny, bHasXPropertySet, true) )
{
throw CannotDumpException(
- "the return type of the calc add-in function '" + name
+ OUString::Concat("the return type of the calc add-in function '") + name
+ ":" + rMethod.name
+ "' is invalid. Please check your IDL definition.");
}
diff --git a/unodevtools/source/skeletonmaker/skeletoncpp.hxx b/unodevtools/source/skeletonmaker/skeletoncpp.hxx
index 569280c5daa3..9599c97d8246 100644
--- a/unodevtools/source/skeletonmaker/skeletoncpp.hxx
+++ b/unodevtools/source/skeletonmaker/skeletoncpp.hxx
@@ -20,6 +20,7 @@
#define INCLUDED_UNODEVTOOLS_SOURCE_SKELETONMAKER_SKELETONCPP_HXX
#include <fstream>
+#include <string_view>
#include <codemaker/generatedtypeset.hxx>
#include "skeletoncommon.hxx"
@@ -35,7 +36,7 @@ namespace skeletonmaker::cpp {
// 16 = default member initialization in a constructor
void printType(
std::ostream & o, ProgramOptions const & options,
- rtl::Reference< TypeManager > const & manager, OUString const & name,
+ rtl::Reference< TypeManager > const & manager, std::u16string_view name,
short referenceType, bool defaultvalue = false);
void printMethods(std::ostream & o,
diff --git a/unodevtools/source/skeletonmaker/skeletonjava.hxx b/unodevtools/source/skeletonmaker/skeletonjava.hxx
index bc31b5dced70..be389487f399 100644
--- a/unodevtools/source/skeletonmaker/skeletonjava.hxx
+++ b/unodevtools/source/skeletonmaker/skeletonjava.hxx
@@ -20,6 +20,7 @@
#define INCLUDED_UNODEVTOOLS_SOURCE_SKELETONMAKER_SKELETONJAVA_HXX
#include <fstream>
+#include <string_view>
#include <codemaker/generatedtypeset.hxx>
#include "skeletoncommon.hxx"
@@ -28,7 +29,7 @@ namespace skeletonmaker::java {
void printType(
std::ostream & o, ProgramOptions const & options,
- rtl::Reference< TypeManager > const & manager, OUString const & name,
+ rtl::Reference< TypeManager > const & manager, std::u16string_view name,
bool referenceType, bool defaultvalue = false);
void printMethods(std::ostream & o,
diff --git a/unoidl/source/unoidl-check.cxx b/unoidl/source/unoidl-check.cxx
index 6066994f1049..a3cade0b0334 100644
--- a/unoidl/source/unoidl-check.cxx
+++ b/unoidl/source/unoidl-check.cxx
@@ -13,6 +13,7 @@
#include <cassert>
#include <cstdlib>
#include <iostream>
+#include <string_view>
#include <vector>
#include <osl/file.hxx>
@@ -159,7 +160,7 @@ private:
};
void checkMap(
- rtl::Reference<unoidl::Provider> const & providerB, OUString const & prefix,
+ rtl::Reference<unoidl::Provider> const & providerB, std::u16string_view prefix,
rtl::Reference<unoidl::MapCursor> const & cursor, bool ignoreUnpublished)
{
assert(providerB.is());
@@ -173,7 +174,7 @@ void checkMap(
OUString name(prefix + id);
if (entA->getSort() == unoidl::Entity::SORT_MODULE) {
checkMap(
- providerB, name + ".",
+ providerB, OUString(name + "."),
(static_cast<unoidl::ModuleEntity *>(entA.get())
->createCursor()),
ignoreUnpublished);
@@ -898,7 +899,7 @@ bool valid(OUString const & identifier) {
}
void checkIds(
- rtl::Reference<unoidl::Provider> const & providerA, OUString const & prefix,
+ rtl::Reference<unoidl::Provider> const & providerA, std::u16string_view prefix,
rtl::Reference<unoidl::MapCursor> const & cursor)
{
assert(cursor.is());
@@ -919,7 +920,7 @@ void checkIds(
switch (entB->getSort()) {
case unoidl::Entity::SORT_MODULE:
checkIds(
- providerA, name + ".",
+ providerA, OUString(name + "."),
(static_cast<unoidl::ModuleEntity *>(entB.get())
->createCursor()));
break;
@@ -1148,8 +1149,8 @@ SAL_IMPLEMENT_MAIN() {
if (side == 0 || !(prov[0].is() && prov[1].is())) {
badUsage();
}
- checkMap(prov[1], "", prov[0]->createRootCursor(), ignoreUnpublished);
- checkIds(prov[0], "", prov[1]->createRootCursor());
+ checkMap(prov[1], u"", prov[0]->createRootCursor(), ignoreUnpublished);
+ checkIds(prov[0], u"", prov[1]->createRootCursor());
return EXIT_SUCCESS;
} catch (unoidl::FileFormatException & e1) {
std::cerr
diff --git a/unoidl/source/unoidl-read.cxx b/unoidl/source/unoidl-read.cxx
index 2b733c0f6f31..443cade3ea07 100644
--- a/unoidl/source/unoidl-read.cxx
+++ b/unoidl/source/unoidl-read.cxx
@@ -14,6 +14,7 @@
#include <iostream>
#include <map>
#include <set>
+#include <string_view>
#include <utility>
#include <vector>
@@ -214,7 +215,7 @@ void insertTypeDependency(
void scanMap(
rtl::Reference<unoidl::Manager> const & manager,
rtl::Reference<unoidl::MapCursor> const & cursor, bool published,
- OUString const & prefix, std::map<OUString, Entity> & entities)
+ std::u16string_view prefix, std::map<OUString, Entity> & entities)
{
assert(cursor.is());
for (;;) {
@@ -228,7 +229,7 @@ void scanMap(
scanMap(
manager,
static_cast<unoidl::ModuleEntity *>(ent.get())->createCursor(),
- published, name + ".", entities);
+ published, OUString(name + "."), entities);
} else {
std::map<OUString, Entity>::iterator i(
entities.insert(
@@ -1040,7 +1041,7 @@ SAL_IMPLEMENT_MAIN() {
}
}
std::map<OUString, Entity> ents;
- scanMap(mgr, prov->createRootCursor(), published, "", ents);
+ scanMap(mgr, prov->createRootCursor(), published, u"", ents);
std::vector<OUString> sorted(sort(ents));
std::vector<OUString> mods;
for (const auto & i: sorted) {
diff --git a/unotest/source/cpp/directories.cxx b/unotest/source/cpp/directories.cxx
index 54f106b212d6..93bcd4daed6d 100644
--- a/unotest/source/cpp/directories.cxx
+++ b/unotest/source/cpp/directories.cxx
@@ -43,22 +43,22 @@ test::Directories::Directories()
m_aWorkdirRootURL = getFileURLFromSystemPath(m_aWorkdirRootPath);
}
-OUString test::Directories::getURLFromSrc(const OUString& rPath) const
+OUString test::Directories::getURLFromSrc(std::u16string_view rPath) const
{
return m_aSrcRootURL + rPath;
}
-OUString test::Directories::getPathFromSrc(const OUString& rPath) const
+OUString test::Directories::getPathFromSrc(std::u16string_view rPath) const
{
return m_aSrcRootPath + rPath;
}
-OUString test::Directories::getURLFromWorkdir(const OUString& rPath) const
+OUString test::Directories::getURLFromWorkdir(std::u16string_view rPath) const
{
return m_aWorkdirRootURL + rPath;
}
-OUString test::Directories::getPathFromWorkdir(const OUString& rPath) const
+OUString test::Directories::getPathFromWorkdir(std::u16string_view rPath) const
{
return m_aWorkdirRootPath + rPath;
}
diff --git a/unotest/source/cpp/filters-test.cxx b/unotest/source/cpp/filters-test.cxx
index be5ee711b9be..a642c2176678 100644
--- a/unotest/source/cpp/filters-test.cxx
+++ b/unotest/source/cpp/filters-test.cxx
@@ -149,18 +149,18 @@ void FiltersTest::recursiveScan(filterStatus nExpected,
}
void FiltersTest::testDir(const OUString &rFilter,
- const OUString &rURL, const OUString &rUserData,
+ std::u16string_view rURL, const OUString &rUserData,
SfxFilterFlags nFilterFlags, SotClipboardFormatId nClipboardID,
unsigned int nFilterVersion, bool bExport)
{
recursiveScan(test::pass, rFilter,
- rURL + "pass",
+ OUString::Concat(rURL) + "pass",
rUserData, nFilterFlags, nClipboardID, nFilterVersion, bExport);
recursiveScan(test::fail, rFilter,
- rURL + "fail",
+ OUString::Concat(rURL) + "fail",
rUserData, nFilterFlags, nClipboardID, nFilterVersion, bExport);
recursiveScan(test::indeterminate, rFilter,
- rURL + "indeterminate",
+ OUString::Concat(rURL) + "indeterminate",
rUserData, nFilterFlags, nClipboardID, nFilterVersion, bExport);
}
diff --git a/unotest/source/cpp/getargument.cxx b/unotest/source/cpp/getargument.cxx
index cb1df427758e..5c40a0a324b4 100644
--- a/unotest/source/cpp/getargument.cxx
+++ b/unotest/source/cpp/getargument.cxx
@@ -27,10 +27,10 @@
namespace test::detail
{
-bool getArgument(OUString const& name, OUString* value)
+bool getArgument(std::u16string_view name, OUString* value)
{
OSL_ASSERT(value != nullptr);
- return rtl::Bootstrap::get("arg-" + name, *value);
+ return rtl::Bootstrap::get(OUString::Concat("arg-") + name, *value);
}
}
diff --git a/unotest/source/cpp/getargument.hxx b/unotest/source/cpp/getargument.hxx
index 97f2b89f32d1..e72eb59438a0 100644
--- a/unotest/source/cpp/getargument.hxx
+++ b/unotest/source/cpp/getargument.hxx
@@ -22,6 +22,8 @@
#include <sal/config.h>
+#include <string_view>
+
#include <rtl/ustring.hxx>
namespace test {
@@ -31,7 +33,7 @@ namespace detail {
// Obtain the value of an argument tunneled in via an "arg-<name>" bootstrap
// variable:
bool getArgument(
- OUString const & name, OUString * value);
+ std::u16string_view name, OUString * value);
}
diff --git a/unotest/source/cpp/gettestargument.cxx b/unotest/source/cpp/gettestargument.cxx
index 1c69cc9c6196..915ea5690e82 100644
--- a/unotest/source/cpp/gettestargument.cxx
+++ b/unotest/source/cpp/gettestargument.cxx
@@ -26,9 +26,9 @@
namespace test
{
-bool getTestArgument(OUString const& name, OUString* value)
+bool getTestArgument(std::u16string_view name, OUString* value)
{
- return detail::getArgument("testarg." + name, value);
+ return detail::getArgument(OUString(OUString::Concat("testarg.") + name), value);
}
}
diff --git a/unotest/source/cpp/macros_test.cxx b/unotest/source/cpp/macros_test.cxx
index a6d690e0d2c1..35788df70d2b 100644
--- a/unotest/source/cpp/macros_test.cxx
+++ b/unotest/source/cpp/macros_test.cxx
@@ -87,8 +87,9 @@ void MacrosTest::dispatchCommand(const uno::Reference<lang::XComponent>& xCompon
void MacrosTest::setUpNssGpg(const test::Directories& rDirectories, const OUString& rTestName)
{
- OUString aSourceDir = rDirectories.getURLFromSrc("/test/signing-keys/");
- OUString aTargetDir = rDirectories.getURLFromWorkdir("CppunitTest/" + rTestName + ".test.user");
+ OUString aSourceDir = rDirectories.getURLFromSrc(u"/test/signing-keys/");
+ OUString aTargetDir
+ = rDirectories.getURLFromWorkdir(OUString("CppunitTest/" + rTestName + ".test.user"));
// Set up cert8.db in workdir/CppunitTest/
osl::File::copy(aSourceDir + "cert8.db", aTargetDir + "/cert8.db");
diff --git a/unotest/source/cpp/officeconnection.cxx b/unotest/source/cpp/officeconnection.cxx
index fbd63f385abe..55525736f346 100644
--- a/unotest/source/cpp/officeconnection.cxx
+++ b/unotest/source/cpp/officeconnection.cxx
@@ -49,7 +49,7 @@ void OfficeConnection::setUp() {
OUString argSoffice;
CPPUNIT_ASSERT(
detail::getArgument(
- "soffice",
+ u"soffice",
&argSoffice));
if (argSoffice.match("path:")) {
desc = "pipe,name=" + osl::test::uniquePipeName("oootest");
@@ -62,7 +62,7 @@ void OfficeConnection::setUp() {
OUString acceptArg("--accept=" + desc + ";urp");
OUString argUser;
CPPUNIT_ASSERT(
- detail::getArgument("user", &argUser));
+ detail::getArgument(u"user", &argUser));
OUString userArg("-env:UserInstallation=" + toAbsoluteFileUrl(argUser));
OUString jreArg(
"-env:UNO_JAVA_JFW_ENV_JREHOME=true");
@@ -72,7 +72,7 @@ void OfficeConnection::setUp() {
jreArg.pData };
rtl_uString ** envs = nullptr;
OUString argEnv;
- if (detail::getArgument("env", &argEnv))
+ if (detail::getArgument(u"env", &argEnv))
{
envs = &argEnv.pData;
}
diff --git a/unotools/source/config/bootstrap.cxx b/unotools/source/config/bootstrap.cxx
index eccf92f696ad..2188e26aec26 100644
--- a/unotools/source/config/bootstrap.cxx
+++ b/unotools/source/config/bootstrap.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <config_folders.h>
#include <unotools/bootstrap.hxx>
@@ -45,7 +49,7 @@
#define BOOTSTRAP_DEFAULT_BASEINSTALL "$SYSBINDIR/.."
-#define BOOTSTRAP_DIRNAME_USERDIR "user"
+#define BOOTSTRAP_DIRNAME_USERDIR u"user"
typedef char const * AsciiString;
@@ -303,13 +307,13 @@ static PathStatus checkStatusAndNormalizeURL(OUString & _sURL)
static PathStatus getDerivedPath(
OUString& _rURL,
OUString const& _aBaseURL, PathStatus _aBaseStatus,
- OUString const& _sRelativeURL,
+ std::u16string_view _sRelativeURL,
rtl::Bootstrap const & _rData, OUString const& _sBootstrapParameter
)
{
OUString sDerivedURL;
OSL_PRECOND(!_rData.getFrom(_sBootstrapParameter,sDerivedURL),"Setting for derived path is already defined");
- OSL_PRECOND(!_sRelativeURL.isEmpty() && _sRelativeURL[0] != cURLSeparator,"Invalid Relative URL");
+ OSL_PRECOND(!_sRelativeURL.empty() && _sRelativeURL[0] != cURLSeparator,"Invalid Relative URL");
PathStatus aStatus = _aBaseStatus;
@@ -349,7 +353,7 @@ static PathStatus getDerivedPath(
static PathStatus getDerivedPath(
OUString& _rURL,
Bootstrap::Impl::PathData const& _aBaseData,
- OUString const& _sRelativeURL,
+ std::u16string_view _sRelativeURL,
rtl::Bootstrap const & _rData, OUString const& _sBootstrapParameter
)
{
diff --git a/unotools/source/config/dynamicmenuoptions.cxx b/unotools/source/config/dynamicmenuoptions.cxx
index b0d74c931deb..e89f23406ac4 100644
--- a/unotools/source/config/dynamicmenuoptions.cxx
+++ b/unotools/source/config/dynamicmenuoptions.cxx
@@ -204,7 +204,7 @@ class SvtDynamicMenuOptions_Impl : public ConfigItem
static void impl_SortAndExpandPropertyNames( const Sequence< OUString >& lSource ,
Sequence< OUString >& lDestination ,
- const OUString& sSetNode );
+ std::u16string_view sSetNode );
// private member
@@ -414,8 +414,8 @@ Sequence< OUString > SvtDynamicMenuOptions_Impl::impl_GetPropertyNames( sal_uInt
// Sort and expand all three list to result list ...
Sequence< OUString > lProperties;
- impl_SortAndExpandPropertyNames( lNewItems , lProperties, SETNODE_NEWMENU );
- impl_SortAndExpandPropertyNames( lWizardItems , lProperties, SETNODE_WIZARDMENU );
+ impl_SortAndExpandPropertyNames( lNewItems , lProperties, u"" SETNODE_NEWMENU );
+ impl_SortAndExpandPropertyNames( lWizardItems , lProperties, u"" SETNODE_WIZARDMENU );
// Return result.
return lProperties;
@@ -458,7 +458,7 @@ class SelectByPrefix
void SvtDynamicMenuOptions_Impl::impl_SortAndExpandPropertyNames( const Sequence< OUString >& lSource ,
Sequence< OUString >& lDestination ,
- const OUString& sSetNode )
+ std::u16string_view sSetNode )
{
vector< OUString > lTemp;
sal_Int32 nSourceCount = lSource.getLength();
@@ -478,7 +478,7 @@ void SvtDynamicMenuOptions_Impl::impl_SortAndExpandPropertyNames( const Sequence
// 4 supported sub properties.
for( const auto& rItem : lTemp )
{
- OUString sFixPath(sSetNode + PATHDELIMITER + rItem + PATHDELIMITER);
+ OUString sFixPath(OUString::Concat(sSetNode) + PATHDELIMITER + rItem + PATHDELIMITER);
lDestination[nDestinationStep++] = sFixPath + PROPERTYNAME_URL;
lDestination[nDestinationStep++] = sFixPath + PROPERTYNAME_TITLE;
lDestination[nDestinationStep++] = sFixPath + PROPERTYNAME_IMAGEIDENTIFIER;
diff --git a/unotools/source/config/moduleoptions.cxx b/unotools/source/config/moduleoptions.cxx
index 317f5261c76d..1468501220ec 100644
--- a/unotools/source/config/moduleoptions.cxx
+++ b/unotools/source/config/moduleoptions.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <unotools/moduleoptions.hxx>
#include <comphelper/sequenceashashmap.hxx>
#include <unotools/configitem.hxx>
@@ -116,7 +120,7 @@ struct FactoryInfo
// returns list of properties, which has changed only!
// We use given value of sNodeBase to build full qualified paths ...
// Last sign of it must be "/". because we use it directly, without any additional things!
- css::uno::Sequence< css::beans::PropertyValue > getChangedProperties( const OUString& sNodeBase )
+ css::uno::Sequence< css::beans::PropertyValue > getChangedProperties( std::u16string_view sNodeBase )
{
// a) reserve memory for max. count of changed properties
// b) add names and values of changed ones only and count it
@@ -126,7 +130,8 @@ struct FactoryInfo
if( bChangedTemplateFile )
{
- lProperties[nRealyChanged].Name = sNodeBase + PROPERTYNAME_TEMPLATEFILE;
+ lProperties[nRealyChanged].Name
+ = OUString::Concat(sNodeBase) + PROPERTYNAME_TEMPLATEFILE;
if ( !sTemplateFile.isEmpty() )
{
@@ -143,7 +148,8 @@ struct FactoryInfo
}
if( bChangedDefaultFilter )
{
- lProperties[nRealyChanged].Name = sNodeBase + PROPERTYNAME_DEFAULTFILTER;
+ lProperties[nRealyChanged].Name
+ = OUString::Concat(sNodeBase) + PROPERTYNAME_DEFAULTFILTER;
lProperties[nRealyChanged].Value <<= sDefaultFilter;
++nRealyChanged;
}
diff --git a/unotools/source/config/optionsdlg.cxx b/unotools/source/config/optionsdlg.cxx
index f5f453f160e7..52897278be7c 100644
--- a/unotools/source/config/optionsdlg.cxx
+++ b/unotools/source/config/optionsdlg.cxx
@@ -25,6 +25,7 @@
#include "itemholder1.hxx"
+#include <string_view>
#include <unordered_map>
using namespace utl;
@@ -48,7 +49,7 @@ private:
OptionNodeList m_aOptionNodeList;
enum NodeType{ NT_Group, NT_Page, NT_Option };
- void ReadNode( const OUString& _rNode, NodeType _eType );
+ void ReadNode( std::u16string_view _rNode, NodeType _eType );
bool IsHidden( const OUString& _rPath ) const;
virtual void ImplCommit() override;
@@ -60,12 +61,12 @@ public:
static ::osl::Mutex & getInitMutex();
- bool IsGroupHidden ( const OUString& _rGroup ) const;
- bool IsPageHidden ( const OUString& _rPage,
- const OUString& _rGroup ) const;
- bool IsOptionHidden ( const OUString& _rOption,
- const OUString& _rPage,
- const OUString& _rGroup ) const;
+ bool IsGroupHidden ( std::u16string_view _rGroup ) const;
+ bool IsPageHidden ( std::u16string_view _rPage,
+ std::u16string_view _rGroup ) const;
+ bool IsOptionHidden ( std::u16string_view _rOption,
+ std::u16string_view _rPage,
+ std::u16string_view _rGroup ) const;
};
namespace
@@ -102,7 +103,7 @@ void SvtOptionsDlgOptions_Impl::Notify( const Sequence< OUString >& )
// nothing to notify
}
-void SvtOptionsDlgOptions_Impl::ReadNode( const OUString& _rNode, NodeType _eType )
+void SvtOptionsDlgOptions_Impl::ReadNode( std::u16string_view _rNode, NodeType _eType )
{
OUString sNode( _rNode + g_sPathDelimiter );
OUString sSet;
@@ -152,17 +153,17 @@ void SvtOptionsDlgOptions_Impl::ReadNode( const OUString& _rNode, NodeType _eTyp
}
}
-static OUString getGroupPath( const OUString& _rGroup )
+static OUString getGroupPath( std::u16string_view _rGroup )
{
- return OUString( ROOT_NODE "/" + _rGroup + "/" );
+ return OUString( OUString::Concat(ROOT_NODE "/") + _rGroup + "/" );
}
-static OUString getPagePath( const OUString& _rPage )
+static OUString getPagePath( std::u16string_view _rPage )
{
- return OUString( PAGES_NODE "/" + _rPage + "/" );
+ return OUString( OUString::Concat(PAGES_NODE "/") + _rPage + "/" );
}
-static OUString getOptionPath( const OUString& _rOption )
+static OUString getOptionPath( std::u16string_view _rOption )
{
- return OUString( OPTIONS_NODE "/" + _rOption + "/" );
+ return OUString( OUString::Concat(OPTIONS_NODE "/") + _rOption + "/" );
}
bool SvtOptionsDlgOptions_Impl::IsHidden( const OUString& _rPath ) const
@@ -174,18 +175,18 @@ bool SvtOptionsDlgOptions_Impl::IsHidden( const OUString& _rPath ) const
return bRet;
}
-bool SvtOptionsDlgOptions_Impl::IsGroupHidden( const OUString& _rGroup ) const
+bool SvtOptionsDlgOptions_Impl::IsGroupHidden( std::u16string_view _rGroup ) const
{
return IsHidden( getGroupPath( _rGroup ) );
}
-bool SvtOptionsDlgOptions_Impl::IsPageHidden( const OUString& _rPage, const OUString& _rGroup ) const
+bool SvtOptionsDlgOptions_Impl::IsPageHidden( std::u16string_view _rPage, std::u16string_view _rGroup ) const
{
return IsHidden( getGroupPath( _rGroup ) + getPagePath( _rPage ) );
}
bool SvtOptionsDlgOptions_Impl::IsOptionHidden(
- const OUString& _rOption, const OUString& _rPage, const OUString& _rGroup ) const
+ std::u16string_view _rOption, std::u16string_view _rPage, std::u16string_view _rGroup ) const
{
return IsHidden( getGroupPath( _rGroup ) + getPagePath( _rPage ) + getOptionPath( _rOption ) );
}
@@ -217,18 +218,19 @@ SvtOptionsDialogOptions::~SvtOptionsDialogOptions()
}
}
-bool SvtOptionsDialogOptions::IsGroupHidden( const OUString& _rGroup ) const
+bool SvtOptionsDialogOptions::IsGroupHidden( std::u16string_view _rGroup ) const
{
return m_pImp->IsGroupHidden( _rGroup );
}
-bool SvtOptionsDialogOptions::IsPageHidden( const OUString& _rPage, const OUString& _rGroup ) const
+bool SvtOptionsDialogOptions::IsPageHidden(
+ std::u16string_view _rPage, std::u16string_view _rGroup ) const
{
return m_pImp->IsPageHidden( _rPage, _rGroup );
}
bool SvtOptionsDialogOptions::IsOptionHidden(
- const OUString& _rOption, const OUString& _rPage, const OUString& _rGroup ) const
+ std::u16string_view _rOption, std::u16string_view _rPage, std::u16string_view _rGroup ) const
{
return m_pImp->IsOptionHidden( _rOption, _rPage, _rGroup );
}
diff --git a/uui/qa/unit/uui-dialogs-test.cxx b/uui/qa/unit/uui-dialogs-test.cxx
index 8aeeee6f6d16..4ca732951c83 100644
--- a/uui/qa/unit/uui-dialogs-test.cxx
+++ b/uui/qa/unit/uui-dialogs-test.cxx
@@ -48,7 +48,7 @@ VclPtr<VclAbstractDialog> UuiDialogsTest::createDialogByID(sal_uInt32 /*nID*/) {
void UuiDialogsTest::openAnyDialog()
{
/// process input file containing the UXMLDescriptions of the dialogs to dump
- processDialogBatchFile("uui/qa/unit/data/uui-dialogs-test.txt");
+ processDialogBatchFile(u"uui/qa/unit/data/uui-dialogs-test.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(UuiDialogsTest);
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx
index 7ae94d465bfa..8b0c206058a4 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx
@@ -499,13 +499,13 @@ OUString getAnyAsString( const uno::Any& pvargItem )
OUString
-ContainerUtilities::getUniqueName( const uno::Sequence< OUString >& _slist, const OUString& _sElementName, const OUString& _sSuffixSeparator)
+ContainerUtilities::getUniqueName( const uno::Sequence< OUString >& _slist, const OUString& _sElementName, std::u16string_view _sSuffixSeparator)
{
return getUniqueName(_slist, _sElementName, _sSuffixSeparator, sal_Int32(2));
}
OUString
-ContainerUtilities::getUniqueName( const uno::Sequence< OUString >& _slist, const OUString& _sElementName, const OUString& _sSuffixSeparator, sal_Int32 _nStartSuffix)
+ContainerUtilities::getUniqueName( const uno::Sequence< OUString >& _slist, const OUString& _sElementName, std::u16string_view _sSuffixSeparator, sal_Int32 _nStartSuffix)
{
if ( !_slist.hasElements() )
return _sElementName;
diff --git a/vbahelper/source/vbahelper/vbashapes.cxx b/vbahelper/source/vbahelper/vbashapes.cxx
index 6177a23b595b..118082fa9667 100644
--- a/vbahelper/source/vbahelper/vbashapes.cxx
+++ b/vbahelper/source/vbahelper/vbashapes.cxx
@@ -223,7 +223,7 @@ ScVbaShapes::AddRectangle(sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWid
uno::Reference< drawing::XShape > xShape( createShape( "com.sun.star.drawing.RectangleShape" ), uno::UNO_SET_THROW );
m_xShapes->add( xShape );
- OUString sName(createName( "Rectangle" ));
+ OUString sName(createName( u"Rectangle" ));
setDefaultShapeProperties( xShape );
setShape_NameProperty( xShape, sName );
@@ -266,7 +266,7 @@ ScVbaShapes::AddEllipse(sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth
setShape_AnchorTypeAndRangeProperty(xShape, _aRange);
*/
- OUString name(createName( "Oval" ));
+ OUString name(createName( u"Oval" ));
setDefaultShapeProperties(xShape);
setShape_NameProperty(xShape, name);
@@ -301,7 +301,7 @@ ScVbaShapes::AddLine( sal_Int32 StartX, sal_Int32 StartY, sal_Int32 endX, sal_In
awt::Point aMovePositionIfRange( 0, 0 );
- OUString name(createName( "Line" ));
+ OUString name(createName( u"Line" ));
setDefaultShapeProperties(xShape);
setShape_NameProperty(xShape, name);
@@ -357,7 +357,7 @@ ScVbaShapes::AddTextboxInWriter( sal_Int32 _nLeft, sal_Int32 _nTop, sal_Int32 _n
setDefaultShapeProperties(xShape);
- OUString sName(createName( "Text Box" ));
+ OUString sName(createName( u"Text Box" ));
setShape_NameProperty( xShape, sName );
awt::Size size;
@@ -411,7 +411,7 @@ ScVbaShapes::setShape_NameProperty( const uno::Reference< css::drawing::XShape >
}
OUString
-ScVbaShapes::createName( const OUString& sName )
+ScVbaShapes::createName( std::u16string_view sName )
{
sal_Int32 nActNumber = 1 + m_nNewShapeCount;
m_nNewShapeCount++;
diff --git a/vcl/inc/unx/printerjob.hxx b/vcl/inc/unx/printerjob.hxx
index 33f92abc7be8..c39bb1e3d2d2 100644
--- a/vcl/inc/unx/printerjob.hxx
+++ b/vcl/inc/unx/printerjob.hxx
@@ -23,6 +23,7 @@
#include <jobdata.hxx>
#include <osl/file.hxx>
+#include <string_view>
#include <vector>
namespace psp {
@@ -68,8 +69,8 @@ private:
bool m_bQuickJob;
private:
- std::unique_ptr<osl::File> CreateSpoolFile (const OUString& rName,
- const OUString& rExtension);
+ std::unique_ptr<osl::File> CreateSpoolFile (std::u16string_view rName,
+ std::u16string_view rExtension);
void InitPaperSize (const JobData& rJobSetup);
bool writeFeatureList( osl::File* pFile, const JobData&, bool bDocumentSetup );
diff --git a/vcl/qa/api/XGraphicTest.cxx b/vcl/qa/api/XGraphicTest.cxx
index 3694e52ce38f..2dfe4f132346 100644
--- a/vcl/qa/api/XGraphicTest.cxx
+++ b/vcl/qa/api/XGraphicTest.cxx
@@ -7,6 +7,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <test/bootstrapfixture.hxx>
#include <com/sun/star/graphic/XGraphic.hpp>
@@ -32,7 +36,7 @@ public:
{
}
- OUString getFullUrl(const OUString& sFileName)
+ OUString getFullUrl(std::u16string_view sFileName)
{
return m_directories.getURLFromSrc(gaDataUrl) + sFileName;
}
@@ -113,7 +117,7 @@ void XGraphicTest::testGraphicDescriptor()
void XGraphicTest::testGraphicProvider()
{
- OUString aGraphicURL = getFullUrl("TestGraphic.png");
+ OUString aGraphicURL = getFullUrl(u"TestGraphic.png");
{ // Load lazy
uno::Reference<uno::XComponentContext> xContext(comphelper::getProcessComponentContext());
diff --git a/vcl/qa/cppunit/BitmapFilterTest.cxx b/vcl/qa/cppunit/BitmapFilterTest.cxx
index 4a697150c4e5..09831169e656 100644
--- a/vcl/qa/cppunit/BitmapFilterTest.cxx
+++ b/vcl/qa/cppunit/BitmapFilterTest.cxx
@@ -20,6 +20,7 @@
#include <BitmapSymmetryCheck.hxx>
#include <chrono>
+#include <string_view>
namespace
{
@@ -47,12 +48,12 @@ public:
CPPUNIT_TEST_SUITE_END();
private:
- OUString getFullUrl(const OUString& sFileName)
+ OUString getFullUrl(std::u16string_view sFileName)
{
- return m_directories.getURLFromSrc("vcl/qa/cppunit/data/") + sFileName;
+ return m_directories.getURLFromSrc(u"vcl/qa/cppunit/data/") + sFileName;
}
- BitmapEx loadBitmap(const OUString& sFileName)
+ BitmapEx loadBitmap(std::u16string_view sFileName)
{
Graphic aGraphic;
const OUString aURL(getFullUrl(sFileName));
@@ -136,11 +137,13 @@ void BitmapFilterTest::testBlurCorrectness()
void BitmapFilterTest::testBasicMorphology()
{
- const BitmapEx aOrigBitmap = loadBitmap("testBasicMorphology.png");
- const BitmapEx aRefBitmapDilated1 = loadBitmap("testBasicMorphologyDilated1.png");
- const BitmapEx aRefBitmapDilated1Eroded1 = loadBitmap("testBasicMorphologyDilated1Eroded1.png");
- const BitmapEx aRefBitmapDilated2 = loadBitmap("testBasicMorphologyDilated2.png");
- const BitmapEx aRefBitmapDilated2Eroded1 = loadBitmap("testBasicMorphologyDilated2Eroded1.png");
+ const BitmapEx aOrigBitmap = loadBitmap(u"testBasicMorphology.png");
+ const BitmapEx aRefBitmapDilated1 = loadBitmap(u"testBasicMorphologyDilated1.png");
+ const BitmapEx aRefBitmapDilated1Eroded1
+ = loadBitmap(u"testBasicMorphologyDilated1Eroded1.png");
+ const BitmapEx aRefBitmapDilated2 = loadBitmap(u"testBasicMorphologyDilated2.png");
+ const BitmapEx aRefBitmapDilated2Eroded1
+ = loadBitmap(u"testBasicMorphologyDilated2Eroded1.png");
BitmapEx aTransformBitmap = aOrigBitmap;
BitmapFilter::Filter(aTransformBitmap, BitmapDilateFilter(1));
diff --git a/vcl/qa/cppunit/GraphicFormatDetectorTest.cxx b/vcl/qa/cppunit/GraphicFormatDetectorTest.cxx
index 1ce516bf52b3..f4f4698b28a9 100644
--- a/vcl/qa/cppunit/GraphicFormatDetectorTest.cxx
+++ b/vcl/qa/cppunit/GraphicFormatDetectorTest.cxx
@@ -7,6 +7,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <cppunit/TestAssert.h>
#include <cppunit/extensions/HelperMacros.h>
#include <unotest/bootstrapfixturebase.hxx>
@@ -22,9 +26,9 @@ namespace
{
class GraphicFormatDetectorTest : public test::BootstrapFixtureBase
{
- OUString getFullUrl(const OUString& sFileName)
+ OUString getFullUrl(std::u16string_view sFileName)
{
- return m_directories.getURLFromSrc("/vcl/qa/cppunit/data/") + sFileName;
+ return m_directories.getURLFromSrc(u"/vcl/qa/cppunit/data/") + sFileName;
}
void testDetectMET();
@@ -70,7 +74,7 @@ class GraphicFormatDetectorTest : public test::BootstrapFixtureBase
void GraphicFormatDetectorTest::testDetectMET()
{
- SvFileStream aFileStream(getFullUrl("TypeDetectionExample.met"), StreamMode::READ);
+ SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.met"), StreamMode::READ);
vcl::GraphicFormatDetector aDetector(aFileStream, "MET");
CPPUNIT_ASSERT(aDetector.detect());
@@ -85,7 +89,7 @@ void GraphicFormatDetectorTest::testDetectMET()
void GraphicFormatDetectorTest::testDetectBMP()
{
- SvFileStream aFileStream(getFullUrl("TypeDetectionExample.bmp"), StreamMode::READ);
+ SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.bmp"), StreamMode::READ);
vcl::GraphicFormatDetector aDetector(aFileStream, "BMP");
CPPUNIT_ASSERT(aDetector.detect());
@@ -100,7 +104,7 @@ void GraphicFormatDetectorTest::testDetectBMP()
void GraphicFormatDetectorTest::testDetectWMF()
{
- SvFileStream aFileStream(getFullUrl("TypeDetectionExample.wmf"), StreamMode::READ);
+ SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.wmf"), StreamMode::READ);
vcl::GraphicFormatDetector aDetector(aFileStream, "WMF");
CPPUNIT_ASSERT(aDetector.detect());
@@ -115,7 +119,7 @@ void GraphicFormatDetectorTest::testDetectWMF()
void GraphicFormatDetectorTest::testDetectPCX()
{
- SvFileStream aFileStream(getFullUrl("TypeDetectionExample.pcx"), StreamMode::READ);
+ SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.pcx"), StreamMode::READ);
vcl::GraphicFormatDetector aDetector(aFileStream, "PCX");
CPPUNIT_ASSERT(aDetector.detect());
@@ -130,7 +134,7 @@ void GraphicFormatDetectorTest::testDetectPCX()
void GraphicFormatDetectorTest::testDetectJPG()
{
- SvFileStream aFileStream(getFullUrl("TypeDetectionExample.jpg"), StreamMode::READ);
+ SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.jpg"), StreamMode::READ);
vcl::GraphicFormatDetector aDetector(aFileStream, "JPG");
CPPUNIT_ASSERT(aDetector.detect());
@@ -145,7 +149,7 @@ void GraphicFormatDetectorTest::testDetectJPG()
void GraphicFormatDetectorTest::testDetectPNG()
{
- SvFileStream aFileStream(getFullUrl("TypeDetectionExample.png"), StreamMode::READ);
+ SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.png"), StreamMode::READ);
vcl::GraphicFormatDetector aDetector(aFileStream, "PNG");
CPPUNIT_ASSERT(aDetector.detect());
@@ -160,7 +164,7 @@ void GraphicFormatDetectorTest::testDetectPNG()
void GraphicFormatDetectorTest::testDetectGIF()
{
- SvFileStream aFileStream(getFullUrl("TypeDetectionExample.gif"), StreamMode::READ);
+ SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.gif"), StreamMode::READ);
vcl::GraphicFormatDetector aDetector(aFileStream, "GIF");
CPPUNIT_ASSERT(aDetector.detect());
@@ -175,7 +179,7 @@ void GraphicFormatDetectorTest::testDetectGIF()
void GraphicFormatDetectorTest::testDetectPSD()
{
- SvFileStream aFileStream(getFullUrl("TypeDetectionExample.psd"), StreamMode::READ);
+ SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.psd"), StreamMode::READ);
vcl::GraphicFormatDetector aDetector(aFileStream, "PSD");
CPPUNIT_ASSERT(aDetector.detect());
@@ -190,7 +194,7 @@ void GraphicFormatDetectorTest::testDetectPSD()
void GraphicFormatDetectorTest::testDetectTGA()
{
- SvFileStream aFileStream(getFullUrl("TypeDetectionExample.tga"), StreamMode::READ);
+ SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.tga"), StreamMode::READ);
vcl::GraphicFormatDetector aDetector(aFileStream, "TGA");
CPPUNIT_ASSERT(aDetector.detect());
@@ -205,7 +209,7 @@ void GraphicFormatDetectorTest::testDetectTGA()
void GraphicFormatDetectorTest::testDetectTIF()
{
- SvFileStream aFileStream(getFullUrl("TypeDetectionExample.tif"), StreamMode::READ);
+ SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.tif"), StreamMode::READ);
vcl::GraphicFormatDetector aDetector(aFileStream, "TIF");
CPPUNIT_ASSERT(aDetector.detect());
@@ -220,7 +224,7 @@ void GraphicFormatDetectorTest::testDetectTIF()
void GraphicFormatDetectorTest::testDetectXBM()
{
- SvFileStream aFileStream(getFullUrl("TypeDetectionExample.xbm"), StreamMode::READ);
+ SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.xbm"), StreamMode::READ);
vcl::GraphicFormatDetector aDetector(aFileStream, "XBM");
CPPUNIT_ASSERT(aDetector.detect());
@@ -235,7 +239,7 @@ void GraphicFormatDetectorTest::testDetectXBM()
void GraphicFormatDetectorTest::testDetectXPM()
{
- SvFileStream aFileStream(getFullUrl("TypeDetectionExample.xpm"), StreamMode::READ);
+ SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.xpm"), StreamMode::READ);
vcl::GraphicFormatDetector aDetector(aFileStream, "XPM");
CPPUNIT_ASSERT(aDetector.detect());
@@ -250,7 +254,7 @@ void GraphicFormatDetectorTest::testDetectXPM()
void GraphicFormatDetectorTest::testDetectSVG()
{
- SvFileStream aFileStream(getFullUrl("TypeDetectionExample.svg"), StreamMode::READ);
+ SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.svg"), StreamMode::READ);
vcl::GraphicFormatDetector aDetector(aFileStream, "SVG");
CPPUNIT_ASSERT(aDetector.detect());
@@ -265,7 +269,7 @@ void GraphicFormatDetectorTest::testDetectSVG()
void GraphicFormatDetectorTest::testDetectSVGZ()
{
- SvFileStream aFileStream(getFullUrl("TypeDetectionExample.svgz"), StreamMode::READ);
+ SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.svgz"), StreamMode::READ);
vcl::GraphicFormatDetector aDetector(aFileStream, "SVG");
CPPUNIT_ASSERT(aDetector.detect());
@@ -280,7 +284,7 @@ void GraphicFormatDetectorTest::testDetectSVGZ()
void GraphicFormatDetectorTest::testDetectPDF()
{
- SvFileStream aFileStream(getFullUrl("TypeDetectionExample.pdf"), StreamMode::READ);
+ SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.pdf"), StreamMode::READ);
vcl::GraphicFormatDetector aDetector(aFileStream, "PDF");
CPPUNIT_ASSERT(aDetector.detect());
@@ -295,7 +299,7 @@ void GraphicFormatDetectorTest::testDetectPDF()
void GraphicFormatDetectorTest::testDetectEPS()
{
- SvFileStream aFileStream(getFullUrl("TypeDetectionExample.eps"), StreamMode::READ);
+ SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.eps"), StreamMode::READ);
vcl::GraphicFormatDetector aDetector(aFileStream, "EPS");
CPPUNIT_ASSERT(aDetector.detect());
diff --git a/vcl/qa/cppunit/GraphicNativeMetadataTest.cxx b/vcl/qa/cppunit/GraphicNativeMetadataTest.cxx
index 42683a1a3f06..49bf55fa9f4d 100644
--- a/vcl/qa/cppunit/GraphicNativeMetadataTest.cxx
+++ b/vcl/qa/cppunit/GraphicNativeMetadataTest.cxx
@@ -7,6 +7,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <cppunit/TestAssert.h>
#include <cppunit/extensions/HelperMacros.h>
#include <unotest/bootstrapfixturebase.hxx>
@@ -21,9 +25,9 @@ namespace
{
class GraphicNativeMetadataTest : public test::BootstrapFixtureBase
{
- OUString getFullUrl(const OUString& sFileName)
+ OUString getFullUrl(std::u16string_view sFileName)
{
- return m_directories.getURLFromSrc("/vcl/qa/cppunit/data/") + sFileName;
+ return m_directories.getURLFromSrc(u"/vcl/qa/cppunit/data/") + sFileName;
}
void testReadFromGraphic();
@@ -37,7 +41,7 @@ class GraphicNativeMetadataTest : public test::BootstrapFixtureBase
void GraphicNativeMetadataTest::testReadFromGraphic()
{
- SvFileStream aFileStream(getFullUrl("Exif1_180.jpg"), StreamMode::READ);
+ SvFileStream aFileStream(getFullUrl(u"Exif1_180.jpg"), StreamMode::READ);
GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter();
// don't load the graphic, but try to get the metadata
@@ -66,28 +70,28 @@ void GraphicNativeMetadataTest::testExifRotationJpeg()
{
{
// No rotation in metadata
- SvFileStream aFileStream(getFullUrl("Exif1.jpg"), StreamMode::READ);
+ SvFileStream aFileStream(getFullUrl(u"Exif1.jpg"), StreamMode::READ);
GraphicNativeMetadata aMetadata;
aMetadata.read(aFileStream);
CPPUNIT_ASSERT_EQUAL(sal_Int16(0), aMetadata.getRotation().get());
}
{
// Rotation 90 degree clock-wise = 270 degree counter-clock-wise
- SvFileStream aFileStream(getFullUrl("Exif1_090CW.jpg"), StreamMode::READ);
+ SvFileStream aFileStream(getFullUrl(u"Exif1_090CW.jpg"), StreamMode::READ);
GraphicNativeMetadata aMetadata;
aMetadata.read(aFileStream);
CPPUNIT_ASSERT_EQUAL(sal_Int16(2700), aMetadata.getRotation().get());
}
{
// Rotation 180 degree
- SvFileStream aFileStream(getFullUrl("Exif1_180.jpg"), StreamMode::READ);
+ SvFileStream aFileStream(getFullUrl(u"Exif1_180.jpg"), StreamMode::READ);
GraphicNativeMetadata aMetadata;
aMetadata.read(aFileStream);
CPPUNIT_ASSERT_EQUAL(sal_Int16(1800), aMetadata.getRotation().get());
}
{
// Rotation 270 degree clock-wise = 90 degree counter-clock-wise
- SvFileStream aFileStream(getFullUrl("Exif1_270CW.jpg"), StreamMode::READ);
+ SvFileStream aFileStream(getFullUrl(u"Exif1_270CW.jpg"), StreamMode::READ);
GraphicNativeMetadata aMetadata;
aMetadata.read(aFileStream);
CPPUNIT_ASSERT_EQUAL(sal_Int16(900), aMetadata.getRotation().get());
diff --git a/vcl/qa/cppunit/GraphicTest.cxx b/vcl/qa/cppunit/GraphicTest.cxx
index 538995ff5dd2..b1f6b77ef5c2 100644
--- a/vcl/qa/cppunit/GraphicTest.cxx
+++ b/vcl/qa/cppunit/GraphicTest.cxx
@@ -338,7 +338,7 @@ void GraphicTest::testWMFRoundtrip()
{
// Load a WMF file.
test::Directories aDirectories;
- OUString aURL = aDirectories.getURLFromSrc("vcl/qa/cppunit/data/roundtrip.wmf");
+ OUString aURL = aDirectories.getURLFromSrc(u"vcl/qa/cppunit/data/roundtrip.wmf");
SvFileStream aStream(aURL, StreamMode::READ);
sal_uInt64 nExpectedSize = aStream.TellEnd();
GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter();
diff --git a/vcl/qa/cppunit/PDFiumLibraryTest.cxx b/vcl/qa/cppunit/PDFiumLibraryTest.cxx
index 577f73ed1130..88bbf9978da2 100644
--- a/vcl/qa/cppunit/PDFiumLibraryTest.cxx
+++ b/vcl/qa/cppunit/PDFiumLibraryTest.cxx
@@ -11,6 +11,8 @@
#if HAVE_FEATURE_PDFIUM
+#include <string_view>
+
#include <cppunit/TestAssert.h>
#include <cppunit/extensions/HelperMacros.h>
@@ -28,9 +30,9 @@
class PDFiumLibraryTest : public test::BootstrapFixtureBase
{
- OUString getFullUrl(const OUString& sFileName)
+ OUString getFullUrl(std::u16string_view sFileName)
{
- return m_directories.getURLFromSrc("/vcl/qa/cppunit/data/") + sFileName;
+ return m_directories.getURLFromSrc(u"/vcl/qa/cppunit/data/") + sFileName;
}
void testDocument();
@@ -54,7 +56,7 @@ class PDFiumLibraryTest : public test::BootstrapFixtureBase
void PDFiumLibraryTest::testDocument()
{
- OUString aURL = getFullUrl("Pangram.pdf");
+ OUString aURL = getFullUrl(u"Pangram.pdf");
SvFileStream aStream(aURL, StreamMode::READ);
GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter();
Graphic aGraphic = rGraphicFilter.ImportUnloadedGraphic(aStream);
@@ -82,7 +84,7 @@ void PDFiumLibraryTest::testDocument()
void PDFiumLibraryTest::testPages()
{
- OUString aURL = getFullUrl("Pangram.pdf");
+ OUString aURL = getFullUrl(u"Pangram.pdf");
SvFileStream aStream(aURL, StreamMode::READ);
GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter();
Graphic aGraphic = rGraphicFilter.ImportUnloadedGraphic(aStream);
@@ -108,7 +110,7 @@ void PDFiumLibraryTest::testPages()
void PDFiumLibraryTest::testPageObjects()
{
- OUString aURL = getFullUrl("Pangram.pdf");
+ OUString aURL = getFullUrl(u"Pangram.pdf");
SvFileStream aStream(aURL, StreamMode::READ);
GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter();
Graphic aGraphic = rGraphicFilter.ImportUnloadedGraphic(aStream);
@@ -158,7 +160,7 @@ void PDFiumLibraryTest::testPageObjects()
void PDFiumLibraryTest::testAnnotationsMadeInEvince()
{
- OUString aURL = getFullUrl("PangramWithAnnotations.pdf");
+ OUString aURL = getFullUrl(u"PangramWithAnnotations.pdf");
SvFileStream aStream(aURL, StreamMode::READ);
GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter();
Graphic aGraphic = rGraphicFilter.ImportUnloadedGraphic(aStream);
@@ -215,7 +217,7 @@ void PDFiumLibraryTest::testAnnotationsMadeInEvince()
void PDFiumLibraryTest::testAnnotationsMadeInAcrobat()
{
- OUString aURL = getFullUrl("PangramAcrobatAnnotations.pdf");
+ OUString aURL = getFullUrl(u"PangramAcrobatAnnotations.pdf");
SvFileStream aStream(aURL, StreamMode::READ);
GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter();
Graphic aGraphic = rGraphicFilter.ImportUnloadedGraphic(aStream);
@@ -293,7 +295,7 @@ void PDFiumLibraryTest::testAnnotationsMadeInAcrobat()
void PDFiumLibraryTest::testAnnotationsDifferentTypes()
{
- OUString aURL = getFullUrl("PangramWithMultipleTypeOfAnnotations.pdf");
+ OUString aURL = getFullUrl(u"PangramWithMultipleTypeOfAnnotations.pdf");
SvFileStream aStream(aURL, StreamMode::READ);
GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter();
Graphic aGraphic = rGraphicFilter.ImportUnloadedGraphic(aStream);
diff --git a/vcl/qa/cppunit/VectorGraphicSearchTest.cxx b/vcl/qa/cppunit/VectorGraphicSearchTest.cxx
index 0659e4e62dcf..e539c5a81636 100644
--- a/vcl/qa/cppunit/VectorGraphicSearchTest.cxx
+++ b/vcl/qa/cppunit/VectorGraphicSearchTest.cxx
@@ -11,6 +11,8 @@
#if HAVE_FEATURE_PDFIUM
+#include <string_view>
+
#include <cppunit/TestAssert.h>
#include <cppunit/extensions/HelperMacros.h>
@@ -24,9 +26,9 @@
class VectorGraphicSearchTest : public test::BootstrapFixtureBase
{
- OUString getFullUrl(const OUString& sFileName)
+ OUString getFullUrl(std::u16string_view sFileName)
{
- return m_directories.getURLFromSrc("/vcl/qa/cppunit/data/") + sFileName;
+ return m_directories.getURLFromSrc(u"/vcl/qa/cppunit/data/") + sFileName;
}
void test();
@@ -46,7 +48,7 @@ class VectorGraphicSearchTest : public test::BootstrapFixtureBase
void VectorGraphicSearchTest::test()
{
- OUString aURL = getFullUrl("Pangram.pdf");
+ OUString aURL = getFullUrl(u"Pangram.pdf");
SvFileStream aStream(aURL, StreamMode::READ);
GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter();
Graphic aGraphic = rGraphicFilter.ImportUnloadedGraphic(aStream);
@@ -97,7 +99,7 @@ void VectorGraphicSearchTest::test()
// between search matches.
void VectorGraphicSearchTest::testNextPrevious()
{
- OUString aURL = getFullUrl("Pangram.pdf");
+ OUString aURL = getFullUrl(u"Pangram.pdf");
SvFileStream aStream(aURL, StreamMode::READ);
GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter();
Graphic aGraphic = rGraphicFilter.ImportUnloadedGraphic(aStream);
@@ -173,7 +175,7 @@ void VectorGraphicSearchTest::testNextPrevious()
void VectorGraphicSearchTest::testSearchStringChange()
{
- OUString aURL = getFullUrl("Pangram.pdf");
+ OUString aURL = getFullUrl(u"Pangram.pdf");
SvFileStream aStream(aURL, StreamMode::READ);
GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter();
Graphic aGraphic = rGraphicFilter.ImportUnloadedGraphic(aStream);
@@ -204,7 +206,7 @@ void VectorGraphicSearchTest::testSearchStringChange()
void VectorGraphicSearchTest::testSearchMatchWholeWord()
{
- OUString aURL = getFullUrl("Pangram.pdf");
+ OUString aURL = getFullUrl(u"Pangram.pdf");
SvFileStream aStream(aURL, StreamMode::READ);
GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter();
Graphic aGraphic = rGraphicFilter.ImportUnloadedGraphic(aStream);
@@ -243,7 +245,7 @@ void VectorGraphicSearchTest::testSearchMatchWholeWord()
void VectorGraphicSearchTest::testSearchMatchCase()
{
- OUString aURL = getFullUrl("Pangram.pdf");
+ OUString aURL = getFullUrl(u"Pangram.pdf");
SvFileStream aStream(aURL, StreamMode::READ);
GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter();
Graphic aGraphic = rGraphicFilter.ImportUnloadedGraphic(aStream);
diff --git a/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx b/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx
index 10e6f82fc219..201d10e56fd3 100644
--- a/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx
+++ b/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx
@@ -7,6 +7,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <test/bootstrapfixture.hxx>
#include <vcl/virdev.hxx>
@@ -25,7 +29,7 @@ constexpr OUStringLiteral gaDataUrl = u"/vcl/qa/cppunit/bitmaprender/data/";
class BitmapRenderTest : public test::BootstrapFixture
{
- OUString getFullUrl(const OUString& sFileName)
+ OUString getFullUrl(std::u16string_view sFileName)
{
return m_directories.getURLFromSrc(gaDataUrl) + sFileName;
}
@@ -62,7 +66,7 @@ void BitmapRenderTest::testTdf104141()
// Load animated GIF and draw it on green background
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
Graphic aGraphic;
- const OUString aURL(getFullUrl("tdf104141.gif"));
+ const OUString aURL(getFullUrl(u"tdf104141.gif"));
SvFileStream aFileStream(aURL, StreamMode::READ);
ErrCode bResult = rFilter.ImportGraphic(aGraphic, aURL, aFileStream);
CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, bResult);
@@ -85,7 +89,7 @@ void BitmapRenderTest::testTdf113918()
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
Graphic aGraphic;
- const OUString aURL(getFullUrl("tdf113918.png"));
+ const OUString aURL(getFullUrl(u"tdf113918.png"));
SvFileStream aFileStream(aURL, StreamMode::READ);
ErrCode bResult = rFilter.ImportGraphic(aGraphic, aURL, aFileStream);
CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, bResult);
@@ -128,7 +132,7 @@ void BitmapRenderTest::testDrawAlphaBitmapEx()
CPPUNIT_ASSERT_EQUAL(COL_WHITE, pVDev->GetPixel(Point(1, 1)));
CPPUNIT_ASSERT_EQUAL(COL_WHITE, pVDev->GetPixel(Point(2, 2)));
- SvFileStream aFileStream(getFullUrl("ImageRGBA.png"), StreamMode::READ);
+ SvFileStream aFileStream(getFullUrl(u"ImageRGBA.png"), StreamMode::READ);
vcl::PngImageReader aPngReader(aFileStream);
BitmapEx aBitmapEx;
@@ -238,7 +242,7 @@ void BitmapRenderTest::testTdf116888()
// didn't properly release mpUserBuffer after ReadTexture() failure.
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
Graphic aGraphic;
- const OUString aURL(getFullUrl("tdf116888.gif"));
+ const OUString aURL(getFullUrl(u"tdf116888.gif"));
SvFileStream aFileStream(aURL, StreamMode::READ);
ErrCode bResult = rFilter.ImportGraphic(aGraphic, aURL, aFileStream);
CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, bResult);
diff --git a/vcl/qa/cppunit/blocklistparsertest.cxx b/vcl/qa/cppunit/blocklistparsertest.cxx
index 0c221ba776a8..689e8d9c9e24 100644
--- a/vcl/qa/cppunit/blocklistparsertest.cxx
+++ b/vcl/qa/cppunit/blocklistparsertest.cxx
@@ -40,7 +40,7 @@ void BlocklistParserTest::testParse()
{
std::vector<DriverInfo> aDriveInfos;
- Parser aBlocklistParser(m_directories.getURLFromSrc("vcl/qa/cppunit/") + "test_blocklist_parse.xml",
+ Parser aBlocklistParser(m_directories.getURLFromSrc(u"vcl/qa/cppunit/") + "test_blocklist_parse.xml",
aDriveInfos, VersionType::OpenGL);
aBlocklistParser.parse();
@@ -98,7 +98,7 @@ void BlocklistParserTest::testEvaluate()
{
std::vector<DriverInfo> aDriveInfos;
- Parser aBlocklistParser(m_directories.getURLFromSrc("vcl/qa/cppunit/") + "test_blocklist_evaluate.xml",
+ Parser aBlocklistParser(m_directories.getURLFromSrc(u"vcl/qa/cppunit/") + "test_blocklist_evaluate.xml",
aDriveInfos, VersionType::OpenGL);
aBlocklistParser.parse();
@@ -150,7 +150,7 @@ void BlocklistParserTest::testVulkan()
{
std::vector<DriverInfo> aDriveInfos;
- Parser aBlocklistParser(m_directories.getURLFromSrc("vcl/qa/cppunit/") + "test_blocklist_vulkan.xml",
+ Parser aBlocklistParser(m_directories.getURLFromSrc(u"vcl/qa/cppunit/") + "test_blocklist_vulkan.xml",
aDriveInfos, VersionType::Vulkan);
aBlocklistParser.parse();
diff --git a/vcl/qa/cppunit/graphicfilter/filters-test.cxx b/vcl/qa/cppunit/graphicfilter/filters-test.cxx
index fe7485e3944a..5a4443f1075a 100644
--- a/vcl/qa/cppunit/graphicfilter/filters-test.cxx
+++ b/vcl/qa/cppunit/graphicfilter/filters-test.cxx
@@ -150,31 +150,31 @@ void VclFiltersTest::testCVEs()
{
#ifndef DISABLE_CVE_TESTS
testDir(OUString(),
- m_directories.getURLFromSrc("/vcl/qa/cppunit/graphicfilter/data/wmf/"));
+ m_directories.getURLFromSrc(u"/vcl/qa/cppunit/graphicfilter/data/wmf/"));
testDir(OUString(),
- m_directories.getURLFromSrc("/vcl/qa/cppunit/graphicfilter/data/emf/"));
+ m_directories.getURLFromSrc(u"/vcl/qa/cppunit/graphicfilter/data/emf/"));
testDir(OUString(),
- m_directories.getURLFromSrc("/vcl/qa/cppunit/graphicfilter/data/png/"));
+ m_directories.getURLFromSrc(u"/vcl/qa/cppunit/graphicfilter/data/png/"));
testDir(OUString(),
- m_directories.getURLFromSrc("/vcl/qa/cppunit/graphicfilter/data/jpg/"));
+ m_directories.getURLFromSrc(u"/vcl/qa/cppunit/graphicfilter/data/jpg/"));
testDir(OUString(),
- m_directories.getURLFromSrc("/vcl/qa/cppunit/graphicfilter/data/gif/"));
+ m_directories.getURLFromSrc(u"/vcl/qa/cppunit/graphicfilter/data/gif/"));
testDir(OUString(),
- m_directories.getURLFromSrc("/vcl/qa/cppunit/graphicfilter/data/bmp/"));
+ m_directories.getURLFromSrc(u"/vcl/qa/cppunit/graphicfilter/data/bmp/"));
testDir(OUString(),
- m_directories.getURLFromSrc("/vcl/qa/cppunit/graphicfilter/data/xbm/"));
+ m_directories.getURLFromSrc(u"/vcl/qa/cppunit/graphicfilter/data/xbm/"));
testDir(OUString(),
- m_directories.getURLFromSrc("/vcl/qa/cppunit/graphicfilter/data/xpm/"));
+ m_directories.getURLFromSrc(u"/vcl/qa/cppunit/graphicfilter/data/xpm/"));
testDir(OUString(),
- m_directories.getURLFromSrc("/vcl/qa/cppunit/graphicfilter/data/svm/"));
+ m_directories.getURLFromSrc(u"/vcl/qa/cppunit/graphicfilter/data/svm/"));
#endif
}
diff --git a/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx b/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx
index 2ed23db8dbeb..0900c02d4bb5 100644
--- a/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx
+++ b/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx
@@ -8,6 +8,10 @@
*
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <unotest/bootstrapfixturebase.hxx>
#include <vcl/graphicfilter.hxx>
#include <bitmap/BitmapWriteAccess.hxx>
@@ -17,7 +21,7 @@ constexpr OUStringLiteral gaDataUrl(u"/vcl/qa/cppunit/jpeg/data/");
class JpegReaderTest : public test::BootstrapFixtureBase
{
- OUString getFullUrl(const OUString& sFileName)
+ OUString getFullUrl(std::u16string_view sFileName)
{
return m_directories.getURLFromSrc(gaDataUrl) + sFileName;
}
@@ -112,7 +116,7 @@ Graphic JpegReaderTest::loadJPG(const OUString& aURL)
void JpegReaderTest::testReadRGB()
{
- Graphic aGraphic = loadJPG(getFullUrl("JPEGTestRGB.jpeg"));
+ Graphic aGraphic = loadJPG(getFullUrl(u"JPEGTestRGB.jpeg"));
Bitmap aBitmap = aGraphic.GetBitmapEx().GetBitmap();
Size aSize = aBitmap.GetSizePixel();
CPPUNIT_ASSERT_EQUAL(tools::Long(12), aSize.Width());
@@ -129,7 +133,7 @@ void JpegReaderTest::testReadRGB()
void JpegReaderTest::testReadGray()
{
- Graphic aGraphic = loadJPG(getFullUrl("JPEGTestGray.jpeg"));
+ Graphic aGraphic = loadJPG(getFullUrl(u"JPEGTestGray.jpeg"));
Bitmap aBitmap = aGraphic.GetBitmapEx().GetBitmap();
Size aSize = aBitmap.GetSizePixel();
CPPUNIT_ASSERT_EQUAL(tools::Long(12), aSize.Width());
@@ -149,7 +153,7 @@ void JpegReaderTest::testReadGray()
void JpegReaderTest::testReadCMYK()
{
- Graphic aGraphic = loadJPG(getFullUrl("JPEGTestCMYK.jpeg"));
+ Graphic aGraphic = loadJPG(getFullUrl(u"JPEGTestCMYK.jpeg"));
Bitmap aBitmap = aGraphic.GetBitmapEx().GetBitmap();
Size aSize = aBitmap.GetSizePixel();
CPPUNIT_ASSERT_EQUAL(tools::Long(12), aSize.Width());
@@ -166,7 +170,7 @@ void JpegReaderTest::testReadCMYK()
void JpegReaderTest::testTdf138950()
{
- Graphic aGraphic = loadJPG(getFullUrl("tdf138950.jpeg"));
+ Graphic aGraphic = loadJPG(getFullUrl(u"tdf138950.jpeg"));
Bitmap aBitmap = aGraphic.GetBitmapEx().GetBitmap();
Size aSize = aBitmap.GetSizePixel();
CPPUNIT_ASSERT_EQUAL(tools::Long(720), aSize.Width());
diff --git a/vcl/qa/cppunit/jpeg/JpegWriterTest.cxx b/vcl/qa/cppunit/jpeg/JpegWriterTest.cxx
index 234b2ea14514..b2144fe3b47e 100644
--- a/vcl/qa/cppunit/jpeg/JpegWriterTest.cxx
+++ b/vcl/qa/cppunit/jpeg/JpegWriterTest.cxx
@@ -8,6 +8,10 @@
*
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <unotest/bootstrapfixturebase.hxx>
#include <vcl/graphicfilter.hxx>
#include <vcl/BitmapReadAccess.hxx>
@@ -17,7 +21,7 @@ constexpr OUStringLiteral gaDataUrl(u"/vcl/qa/cppunit/jpeg/data/");
class JpegWriterTest : public test::BootstrapFixtureBase
{
- OUString getFullUrl(const OUString& sFileName)
+ OUString getFullUrl(std::u16string_view sFileName)
{
return m_directories.getURLFromSrc(gaDataUrl) + sFileName;
}
@@ -66,7 +70,7 @@ BitmapEx JpegWriterTest::roundtripJPG(const BitmapEx& bitmap)
void JpegWriterTest::testWrite8BitGrayscale()
{
- Bitmap bitmap = roundtripJPG(getFullUrl("8BitGrayscale.jpg")).GetBitmap();
+ Bitmap bitmap = roundtripJPG(getFullUrl(u"8BitGrayscale.jpg")).GetBitmap();
Bitmap::ScopedReadAccess access(bitmap);
const ScanlineFormat format = access->GetScanlineFormat();
// Check that it's still 8bit grayscale.
@@ -82,7 +86,7 @@ void JpegWriterTest::testWrite8BitGrayscale()
void JpegWriterTest::testWrite8BitNonGrayscale()
{
- Bitmap bitmap = roundtripJPG(getFullUrl("8BitNonGrayscale.gif")).GetBitmap();
+ Bitmap bitmap = roundtripJPG(getFullUrl(u"8BitNonGrayscale.gif")).GetBitmap();
Bitmap::ScopedReadAccess access(bitmap);
const ScanlineFormat format = access->GetScanlineFormat();
// Check that it's still 8bit grayscale.
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 255a82553dfb..0236a6e73e5d 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -10,6 +10,7 @@
#include <sal/config.h>
#include <memory>
+#include <string_view>
#include <type_traits>
#include <config_features.h>
@@ -72,8 +73,8 @@ public:
PdfExportTest();
virtual void setUp() override;
virtual void tearDown() override;
- void saveAsPDF(const OUString& rFile);
- void load(const OUString& rFile, vcl::filter::PDFDocument& rDocument);
+ void saveAsPDF(std::u16string_view rFile);
+ void load(std::u16string_view rFile, vcl::filter::PDFDocument& rDocument);
};
PdfExportTest::PdfExportTest() { maTempFile.EnableKillingFile(); }
@@ -117,7 +118,7 @@ void PdfExportTest::tearDown()
OUStringLiteral const DATA_DIRECTORY = u"/vcl/qa/cppunit/pdfexport/data/";
-void PdfExportTest::saveAsPDF(const OUString& rFile)
+void PdfExportTest::saveAsPDF(std::u16string_view rFile)
{
// Import the bugdoc and export as PDF.
OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + rFile;
@@ -130,7 +131,7 @@ void PdfExportTest::saveAsPDF(const OUString& rFile)
xStorable->storeToURL(maTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList());
}
-void PdfExportTest::load(const OUString& rFile, vcl::filter::PDFDocument& rDocument)
+void PdfExportTest::load(std::u16string_view rFile, vcl::filter::PDFDocument& rDocument)
{
saveAsPDF(rFile);
@@ -184,7 +185,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf106059)
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf106693)
{
vcl::filter::PDFDocument aDocument;
- load("tdf106693.odt", aDocument);
+ load(u"tdf106693.odt", aDocument);
// Assert that the XObject in the page resources dictionary is a form XObject.
std::vector<vcl::filter::PDFObjectElement*> aPages = aDocument.GetPages();
@@ -328,7 +329,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf107868)
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf105093)
{
vcl::filter::PDFDocument aDocument;
- load("tdf105093.odp", aDocument);
+ load(u"tdf105093.odp", aDocument);
// The document has one page.
std::vector<vcl::filter::PDFObjectElement*> aPages = aDocument.GetPages();
@@ -602,7 +603,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testSofthyphenPos)
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf107013)
{
vcl::filter::PDFDocument aDocument;
- load("tdf107013.odt", aDocument);
+ load(u"tdf107013.odt", aDocument);
// Get access to the only image on the only page.
std::vector<vcl::filter::PDFObjectElement*> aPages = aDocument.GetPages();
@@ -622,7 +623,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf107013)
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf107018)
{
vcl::filter::PDFDocument aDocument;
- load("tdf107018.odt", aDocument);
+ load(u"tdf107018.odt", aDocument);
// Get access to the only image on the only page.
std::vector<vcl::filter::PDFObjectElement*> aPages = aDocument.GetPages();
@@ -677,7 +678,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf107018)
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf107089)
{
vcl::filter::PDFDocument aDocument;
- load("tdf107089.odt", aDocument);
+ load(u"tdf107089.odt", aDocument);
// Get access to the only image on the only page.
std::vector<vcl::filter::PDFObjectElement*> aPages = aDocument.GetPages();
@@ -724,7 +725,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf107089)
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf99680)
{
vcl::filter::PDFDocument aDocument;
- load("tdf99680.odt", aDocument);
+ load(u"tdf99680.odt", aDocument);
// The document has one page.
std::vector<vcl::filter::PDFObjectElement*> aPages = aDocument.GetPages();
@@ -765,7 +766,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf99680)
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf99680_2)
{
vcl::filter::PDFDocument aDocument;
- load("tdf99680-2.odt", aDocument);
+ load(u"tdf99680-2.odt", aDocument);
// For each document page
std::vector<vcl::filter::PDFObjectElement*> aPages = aDocument.GetPages();
@@ -901,7 +902,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf108963)
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf118244_radioButtonGroup)
{
vcl::filter::PDFDocument aDocument;
- load("tdf118244_radioButtonGroup.odt", aDocument);
+ load(u"tdf118244_radioButtonGroup.odt", aDocument);
// The document has one page.
std::vector<vcl::filter::PDFObjectElement*> aPages = aDocument.GetPages();
@@ -943,7 +944,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf115117_1)
{
#if HAVE_MORE_FONTS
vcl::filter::PDFDocument aDocument;
- load("tdf115117-1.odt", aDocument);
+ load(u"tdf115117-1.odt", aDocument);
vcl::filter::PDFObjectElement* pToUnicode = nullptr;
@@ -1010,7 +1011,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf115117_2)
// See the comments in testTdf115117_1() for explanation.
vcl::filter::PDFDocument aDocument;
- load("tdf115117-2.odt", aDocument);
+ load(u"tdf115117-2.odt", aDocument);
vcl::filter::PDFObjectElement* pToUnicode = nullptr;
@@ -1152,7 +1153,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf66597_1)
#if HAVE_MORE_FONTS
// This requires Amiri font, if it is missing the test will fail.
vcl::filter::PDFDocument aDocument;
- load("tdf66597-1.odt", aDocument);
+ load(u"tdf66597-1.odt", aDocument);
{
// Get access to ToUnicode of the first font
@@ -1249,7 +1250,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf66597_2)
{
#if HAVE_MORE_FONTS
vcl::filter::PDFDocument aDocument;
- load("tdf66597-2.odt", aDocument);
+ load(u"tdf66597-2.odt", aDocument);
{
// Get access to ToUnicode of the first font
@@ -1352,7 +1353,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf66597_3)
{
#if HAVE_MORE_FONTS
vcl::filter::PDFDocument aDocument;
- load("tdf66597-3.odt", aDocument);
+ load(u"tdf66597-3.odt", aDocument);
{
// Get access to ToUnicode of the first font
@@ -1620,7 +1621,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf113143)
CPPUNIT_TEST_FIXTURE(PdfExportTest, testForcePoint71)
{
// I just care it doesn't crash
- saveAsPDF("forcepoint71.key");
+ saveAsPDF(u"forcepoint71.key");
}
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf115262)
@@ -1719,7 +1720,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf115967)
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf121615)
{
vcl::filter::PDFDocument aDocument;
- load("tdf121615.odt", aDocument);
+ load(u"tdf121615.odt", aDocument);
// The document has one page.
std::vector<vcl::filter::PDFObjectElement*> aPages = aDocument.GetPages();
diff --git a/vcl/qa/cppunit/png/PngFilterTest.cxx b/vcl/qa/cppunit/png/PngFilterTest.cxx
index d0d356f23702..42a25652134f 100644
--- a/vcl/qa/cppunit/png/PngFilterTest.cxx
+++ b/vcl/qa/cppunit/png/PngFilterTest.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <test/bootstrapfixture.hxx>
#include <tools/stream.hxx>
#include <vcl/filter/PngImageReader.hxx>
@@ -29,7 +33,7 @@ class PngFilterTest : public test::BootstrapFixture
{
OUString maDataUrl;
- OUString getFullUrl(const OUString& sFileName)
+ OUString getFullUrl(std::u16string_view sFileName)
{
return m_directories.getURLFromSrc(maDataUrl) + sFileName;
}
diff --git a/vcl/qa/cppunit/svm/svmtest.cxx b/vcl/qa/cppunit/svm/svmtest.cxx
index 4460811ca306..f8a4c0a96734 100644
--- a/vcl/qa/cppunit/svm/svmtest.cxx
+++ b/vcl/qa/cppunit/svm/svmtest.cxx
@@ -8,6 +8,10 @@
*
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <test/bootstrapfixture.hxx>
#include <test/xmltesttools.hxx>
#include <vcl/gdimtf.hxx>
@@ -28,7 +32,7 @@ class SvmTest : public test::BootstrapFixture, public XmlTestTools
{
OUString maDataUrl;
- OUString getFullUrl(const OUString& sFileName)
+ OUString getFullUrl(std::u16string_view sFileName)
{
return m_directories.getURLFromSrc(maDataUrl) + sFileName;
}
@@ -37,11 +41,12 @@ class SvmTest : public test::BootstrapFixture, public XmlTestTools
// write GDI Metafile to a file in data directory
// only use this for new tests to create the svm file
- void writeToFile(GDIMetaFile& rMetaFile, OUString const & rName);
+ void writeToFile(GDIMetaFile& rMetaFile, std::u16string_view rName);
- GDIMetaFile writeAndReadStream(GDIMetaFile& rMetaFile, OUString const & rName = OUString());
+ GDIMetaFile writeAndReadStream(
+ GDIMetaFile& rMetaFile, std::u16string_view rName = std::u16string_view());
- GDIMetaFile readFile(const OUString& sName);
+ GDIMetaFile readFile(std::u16string_view sName);
xmlDocUniquePtr dumpMeta(const GDIMetaFile& rMetaFile);
@@ -298,17 +303,17 @@ static void writeMetaFile(GDIMetaFile& rInputMetafile, const OUString& rUrl)
aFileStream.Close();
}
-void SvmTest::writeToFile(GDIMetaFile& rMetaFile, OUString const & rName)
+void SvmTest::writeToFile(GDIMetaFile& rMetaFile, std::u16string_view rName)
{
- if (rName.isEmpty())
+ if (rName.empty())
return;
OUString sFilePath = getFullUrl(rName);
writeMetaFile(rMetaFile, sFilePath);
}
-GDIMetaFile SvmTest::writeAndReadStream(GDIMetaFile& rMetaFile, OUString const & rName)
+GDIMetaFile SvmTest::writeAndReadStream(GDIMetaFile& rMetaFile, std::u16string_view rName)
{
- if (!rName.isEmpty())
+ if (!rName.empty())
writeToFile(rMetaFile, rName);
SvMemoryStream aStream;
@@ -320,7 +325,7 @@ GDIMetaFile SvmTest::writeAndReadStream(GDIMetaFile& rMetaFile, OUString const &
return aResultMetafile;
}
-GDIMetaFile SvmTest::readFile(const OUString& sName)
+GDIMetaFile SvmTest::readFile(std::u16string_view sName)
{
OUString sFilePath = getFullUrl(sName);
return readMetafile(sFilePath);
@@ -386,7 +391,7 @@ void SvmTest::testPixel()
pVirtualDev->DrawPixel(Point(1, 8), COL_BLUE);
checkPixel(writeAndReadStream(aGDIMetaFile));
- checkPixel(readFile("pixel.svm"));
+ checkPixel(readFile(u"pixel.svm"));
}
void SvmTest::checkPoint(const GDIMetaFile& rMetaFile)
@@ -407,7 +412,7 @@ void SvmTest::testPoint()
pVirtualDev->DrawPixel(Point(4, 4));
checkPoint(writeAndReadStream(aGDIMetaFile));
- checkPoint(readFile("point.svm"));
+ checkPoint(readFile(u"point.svm"));
}
void SvmTest::checkLine(const GDIMetaFile& rMetaFile)
@@ -459,7 +464,7 @@ void SvmTest::testLine()
pVirtualDev->DrawLine(Point(1, 8), Point(8, 1), aLineInfo);
checkLine(writeAndReadStream(aGDIMetaFile));
- checkLine(readFile("line.svm"));
+ checkLine(readFile(u"line.svm"));
}
void SvmTest::checkRect(const GDIMetaFile& rMetaFile)
@@ -488,7 +493,7 @@ void SvmTest::testRect()
pVirtualDev->DrawRect(tools::Rectangle(Point(1, 2), Size(4, 4)));
checkRect(writeAndReadStream(aGDIMetaFile));
- checkRect(readFile("rect.svm"));
+ checkRect(readFile(u"rect.svm"));
}
void SvmTest::checkRoundRect(const GDIMetaFile& rMetaFile)
@@ -517,7 +522,7 @@ void SvmTest::testRoundRect()
pVirtualDev->DrawRect(tools::Rectangle(Point(1, 2), Size(4, 4)), 1, 2);
checkRoundRect(writeAndReadStream(aGDIMetaFile));
- checkRoundRect(readFile("roundrect.svm"));
+ checkRoundRect(readFile(u"roundrect.svm"));
}
void SvmTest::checkEllipse(const GDIMetaFile& rMetaFile)
@@ -545,7 +550,7 @@ void SvmTest::testEllipse()
pVirtualDev->DrawEllipse(tools::Rectangle(Point(1, 2), Size(4, 4)));
checkEllipse(writeAndReadStream(aGDIMetaFile));
- checkEllipse(readFile("ellipse.svm"));
+ checkEllipse(readFile(u"ellipse.svm"));
}
void SvmTest::checkArc(const GDIMetaFile& rMetaFile)
@@ -576,7 +581,7 @@ void SvmTest::testArc()
pVirtualDev->DrawArc(tools::Rectangle(Point(1, 2), Size(4, 4)), Point(10, 11), Point(12, 13));
checkArc(writeAndReadStream(aGDIMetaFile));
- checkArc(readFile("arc.svm"));
+ checkArc(readFile(u"arc.svm"));
}
void SvmTest::checkPie(const GDIMetaFile& rMetaFile)
@@ -607,7 +612,7 @@ void SvmTest::testPie()
pVirtualDev->DrawPie(tools::Rectangle(Point(11, 12), Size(4, 4)), Point(20, 21), Point(22, 23));
checkPie(writeAndReadStream(aGDIMetaFile));
- checkPie(readFile("pie.svm"));
+ checkPie(readFile(u"pie.svm"));
}
void SvmTest::checkChord(const GDIMetaFile& rMetaFile)
@@ -638,7 +643,7 @@ void SvmTest::testChord()
pVirtualDev->DrawChord(tools::Rectangle(Point(21, 22), Size(4, 4)), Point(30, 31), Point(32, 33));
checkChord(writeAndReadStream(aGDIMetaFile));
- checkChord(readFile("chord.svm"));
+ checkChord(readFile(u"chord.svm"));
}
void SvmTest::checkPolyLine(const GDIMetaFile& rMetaFile)
@@ -706,7 +711,7 @@ void SvmTest::testPolyLine()
pVirtualDev->DrawPolyLine(aPolygonWithControl, aLineInfo);
checkPolyLine(writeAndReadStream(aGDIMetaFile));
- checkPolyLine(readFile("polyline.svm"));
+ checkPolyLine(readFile(u"polyline.svm"));
}
void SvmTest::checkPolygon(const GDIMetaFile& rMetaFile)
@@ -750,7 +755,7 @@ void SvmTest::testPolygon()
pVirtualDev->DrawPolygon(aPolygonWithControl);
checkPolygon(writeAndReadStream(aGDIMetaFile));
- checkPolygon(readFile("polygon.svm"));
+ checkPolygon(readFile(u"polygon.svm"));
}
void SvmTest::checkPolyPolygon(const GDIMetaFile& rMetaFile)
@@ -796,7 +801,7 @@ void SvmTest::testPolyPolygon()
pVirtualDev->DrawPolyPolygon(aPolyPolygon);
checkPolyPolygon(writeAndReadStream(aGDIMetaFile));
- checkPolyPolygon(readFile("polypolygon.svm"));
+ checkPolyPolygon(readFile(u"polypolygon.svm"));
}
void SvmTest::checkText(const GDIMetaFile& rMetaFile)
@@ -819,7 +824,7 @@ void SvmTest::testText()
pVirtualDev->DrawText(Point(4,6), "xABC", 1, 2);
checkText(writeAndReadStream(aGDIMetaFile));
- checkText(readFile("text.svm"));
+ checkText(readFile(u"text.svm"));
}
void SvmTest::checkTextArray(const GDIMetaFile& rMetaFile)
@@ -842,7 +847,7 @@ void SvmTest::testTextArray()
pVirtualDev->DrawTextArray(Point(4,6), "123456", aDX, 1, 4);
checkTextArray(writeAndReadStream(aGDIMetaFile));
- checkTextArray(readFile("textarray.svm"));
+ checkTextArray(readFile(u"textarray.svm"));
}
void SvmTest::checkstretchText(const GDIMetaFile& rMetaFile)
@@ -864,7 +869,7 @@ void SvmTest::teststretchText()
pVirtualDev->DrawStretchText(Point(4,6), 10, "123456", 1, 4);
checkstretchText(writeAndReadStream(aGDIMetaFile));
- checkstretchText(readFile("strecthtext.svm"));
+ checkstretchText(readFile(u"strecthtext.svm"));
}
void SvmTest::checkTextRect(const GDIMetaFile& rMetaFile)
@@ -886,7 +891,7 @@ void SvmTest::testTextRect()
pVirtualDev->DrawText(tools::Rectangle(Point(0,0), Size(5,5)), "123456", DrawTextFlags::Center);
checkTextRect(writeAndReadStream(aGDIMetaFile));
- checkTextRect(readFile("textrectangle.svm"));
+ checkTextRect(readFile(u"textrectangle.svm"));
}
void SvmTest::checkTextLine(const GDIMetaFile& rMetaFile)
@@ -907,7 +912,7 @@ void SvmTest::testTextLine()
pVirtualDev->DrawTextLine(Point(4,6), 10, STRIKEOUT_SINGLE, LINESTYLE_SINGLE, LINESTYLE_SINGLE);
checkTextLine(writeAndReadStream(aGDIMetaFile));
- checkTextLine(readFile("textline.svm"));
+ checkTextLine(readFile(u"textline.svm"));
}
void SvmTest::checkBitmaps(const GDIMetaFile& rMetaFile)
@@ -959,7 +964,7 @@ void SvmTest::testBitmaps()
checkRendering(pVirtualDev, aReloadedGDIMetaFile);
}
{
- GDIMetaFile aFileGDIMetaFile = readFile("bitmaps.svm");
+ GDIMetaFile aFileGDIMetaFile = readFile(u"bitmaps.svm");
checkBitmaps(aFileGDIMetaFile);
checkRendering(pVirtualDev, aFileGDIMetaFile);
}
@@ -1118,7 +1123,7 @@ void SvmTest::testBitmapExs()
checkRendering(pVirtualDev, aReloadedGDIMetaFile);
}
{
- GDIMetaFile aFileGDIMetaFile = readFile("bitmapexs.svm");
+ GDIMetaFile aFileGDIMetaFile = readFile(u"bitmapexs.svm");
checkBitmapExs(aFileGDIMetaFile);
checkRendering(pVirtualDev, aFileGDIMetaFile);
}
@@ -1173,7 +1178,7 @@ void SvmTest::testMasks()
pVirtualDev->DrawMask(Point(1, 2), Size(3, 4), Point(2, 1), Size(4, 3), aBitmap3, COL_LIGHTRED, MetaActionType::MASKSCALEPART);
checkMasks(writeAndReadStream(aGDIMetaFile));
- checkMasks(readFile("masks.svm"));
+ checkMasks(readFile(u"masks.svm"));
}
void SvmTest::checkGradient(const GDIMetaFile& rMetaFile)
@@ -1246,7 +1251,7 @@ void SvmTest::testGradient()
pVirtualDev->DrawGradient(aRectangle2, aGradient2);
checkGradient(writeAndReadStream(aGDIMetaFile));
- checkGradient(readFile("gradient.svm"));
+ checkGradient(readFile(u"gradient.svm"));
}
void SvmTest::testGradientEx()
@@ -1293,7 +1298,7 @@ void SvmTest::testHatch()
pVirtualDev->DrawHatch(aPolyPolygon, aHatch);
checkHatch(writeAndReadStream(aGDIMetaFile));
- checkHatch(readFile("hatch.svm"));
+ checkHatch(readFile(u"hatch.svm"));
}
void SvmTest::checkWallpaper(const GDIMetaFile& rMetaFile)
@@ -1328,7 +1333,7 @@ void SvmTest::testWallpaper()
pVirtualDev->DrawWallpaper(tools::Rectangle(Point(1, 1), Size(3, 3)), aWallpaper);
checkWallpaper(writeAndReadStream(aGDIMetaFile));
- checkWallpaper(readFile("wallpaper.svm"));
+ checkWallpaper(readFile(u"wallpaper.svm"));
}
void SvmTest::checkClipRegion(const GDIMetaFile& rMetaFile)
@@ -1358,7 +1363,7 @@ void SvmTest::testClipRegion()
pVirtualDev->SetClipRegion(aRegion);
checkClipRegion(writeAndReadStream(aGDIMetaFile));
- checkClipRegion(readFile("clipregion.svm"));
+ checkClipRegion(readFile(u"clipregion.svm"));
}
void SvmTest::testIntersectRectClipRegion()
@@ -1388,7 +1393,7 @@ void SvmTest::testLineColor()
pVirtualDev->Pop();
checkLineColor(writeAndReadStream(aGDIMetaFile));
- checkLineColor(readFile("linecolor.svm"));
+ checkLineColor(readFile(u"linecolor.svm"));
}
void SvmTest::checkFillColor(const GDIMetaFile& rMetaFile)
@@ -1411,7 +1416,7 @@ void SvmTest::testFillColor()
pVirtualDev->Pop();
checkFillColor(writeAndReadStream(aGDIMetaFile));
- checkFillColor(readFile("fillcolor.svm"));
+ checkFillColor(readFile(u"fillcolor.svm"));
}
void SvmTest::checkTextColor(const GDIMetaFile& rMetaFile)
@@ -1432,7 +1437,7 @@ void SvmTest::testTextColor()
pVirtualDev->SetTextColor(Color(0x123456));
checkTextColor(writeAndReadStream(aGDIMetaFile));
- checkTextColor(readFile("textcolor.svm"));
+ checkTextColor(readFile(u"textcolor.svm"));
}
void SvmTest::checkTextFillColor(const GDIMetaFile& rMetaFile)
@@ -1453,7 +1458,7 @@ void SvmTest::testTextFillColor()
pVirtualDev->SetTextFillColor(Color(0x234567));
checkTextFillColor(writeAndReadStream(aGDIMetaFile));
- checkTextFillColor(readFile("textfillecolor.svm"));
+ checkTextFillColor(readFile(u"textfillecolor.svm"));
}
void SvmTest::checkTextLineColor(const GDIMetaFile& rMetaFile)
@@ -1474,7 +1479,7 @@ void SvmTest::testTextLineColor()
pVirtualDev->SetTextLineColor(Color(0x345678));
checkTextLineColor(writeAndReadStream(aGDIMetaFile));
- checkTextLineColor(readFile("textlinecolor.svm"));
+ checkTextLineColor(readFile(u"textlinecolor.svm"));
}
void SvmTest::checkOverLineColor(const GDIMetaFile& rMetaFile)
@@ -1497,7 +1502,7 @@ void SvmTest::testOverLineColor()
pVirtualDev->Pop();
checkOverLineColor(writeAndReadStream(aGDIMetaFile));
- checkOverLineColor(readFile("overlinecolor.svm"));
+ checkOverLineColor(readFile(u"overlinecolor.svm"));
}
void SvmTest::checkTextAlign(const GDIMetaFile& rMetaFile)
@@ -1518,7 +1523,7 @@ void SvmTest::testTextAlign()
pVirtualDev->SetTextAlign(TextAlign::ALIGN_BOTTOM);
checkTextAlign(writeAndReadStream(aGDIMetaFile));
- checkTextAlign(readFile("textalign.svm"));
+ checkTextAlign(readFile(u"textalign.svm"));
}
void SvmTest::testMapMode()
@@ -1561,7 +1566,7 @@ void SvmTest::testPushPop()
pVirtualDev->DrawLine(Point(1,1), Point(8,8));
checkPushPop(writeAndReadStream(aGDIMetaFile));
- checkPushPop(readFile("pushpop.svm"));
+ checkPushPop(readFile(u"pushpop.svm"));
}
void SvmTest::checkRasterOp(const GDIMetaFile& rMetaFile)
@@ -1582,7 +1587,7 @@ void SvmTest::testRasterOp()
pVirtualDev->SetRasterOp(RasterOp::Xor);
checkRasterOp(writeAndReadStream(aGDIMetaFile));
- checkRasterOp(readFile("rasterop.svm"));
+ checkRasterOp(readFile(u"rasterop.svm"));
}
void SvmTest::checkTransparent(const GDIMetaFile& rMetaFile)
@@ -1622,7 +1627,7 @@ void SvmTest::testTransparent()
CPPUNIT_ASSERT(aGDIMetaFile.HasTransparentActions());
checkTransparent(writeAndReadStream(aGDIMetaFile));
- checkTransparent(readFile("transparent.svm"));
+ checkTransparent(readFile(u"transparent.svm"));
}
void SvmTest::testFloatTransparent()
diff --git a/vcl/qa/cppunit/widgetdraw/WidgetDefinitionReaderTest.cxx b/vcl/qa/cppunit/widgetdraw/WidgetDefinitionReaderTest.cxx
index ac5accc5c940..480ff411012f 100644
--- a/vcl/qa/cppunit/widgetdraw/WidgetDefinitionReaderTest.cxx
+++ b/vcl/qa/cppunit/widgetdraw/WidgetDefinitionReaderTest.cxx
@@ -7,6 +7,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <cppunit/TestAssert.h>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/plugin/TestPlugIn.h>
@@ -21,7 +25,7 @@ constexpr OUStringLiteral gaDataUrl(u"/vcl/qa/cppunit/widgetdraw/data/");
class WidgetDefinitionReaderTest : public test::BootstrapFixtureBase
{
private:
- OUString getFullUrl(const OUString& sFileName)
+ OUString getFullUrl(std::u16string_view sFileName)
{
return m_directories.getURLFromSrc(gaDataUrl) + sFileName;
}
@@ -40,21 +44,24 @@ void WidgetDefinitionReaderTest::testReadSettings()
{
{
vcl::WidgetDefinition aDefinition;
- vcl::WidgetDefinitionReader aReader(getFullUrl("definitionSettings1.xml"), getFullUrl(""));
+ vcl::WidgetDefinitionReader aReader(getFullUrl(u"definitionSettings1.xml"),
+ getFullUrl(u""));
CPPUNIT_ASSERT(aReader.read(aDefinition));
CPPUNIT_ASSERT_EQUAL(OString(""), aDefinition.mpSettings->msCenteredTabs);
}
{
vcl::WidgetDefinition aDefinition;
- vcl::WidgetDefinitionReader aReader(getFullUrl("definitionSettings2.xml"), getFullUrl(""));
+ vcl::WidgetDefinitionReader aReader(getFullUrl(u"definitionSettings2.xml"),
+ getFullUrl(u""));
CPPUNIT_ASSERT(aReader.read(aDefinition));
CPPUNIT_ASSERT_EQUAL(OString("true"), aDefinition.mpSettings->msCenteredTabs);
}
{
vcl::WidgetDefinition aDefinition;
- vcl::WidgetDefinitionReader aReader(getFullUrl("definitionSettings3.xml"), getFullUrl(""));
+ vcl::WidgetDefinitionReader aReader(getFullUrl(u"definitionSettings3.xml"),
+ getFullUrl(u""));
CPPUNIT_ASSERT(aReader.read(aDefinition));
CPPUNIT_ASSERT_EQUAL(OString("true"), aDefinition.mpSettings->msNoActiveTabTextRaise);
CPPUNIT_ASSERT_EQUAL(OString("false"), aDefinition.mpSettings->msCenteredTabs);
@@ -73,7 +80,7 @@ void WidgetDefinitionReaderTest::testRead()
{
vcl::WidgetDefinition aDefinition;
- vcl::WidgetDefinitionReader aReader(getFullUrl("definition1.xml"), getFullUrl(""));
+ vcl::WidgetDefinitionReader aReader(getFullUrl(u"definition1.xml"), getFullUrl(u""));
CPPUNIT_ASSERT(aReader.read(aDefinition));
CPPUNIT_ASSERT_EQUAL(OUString("123456"), aDefinition.mpStyle->maFaceColor.AsRGBHexString());
diff --git a/vcl/qa/unit/vcl-dialogs-test.cxx b/vcl/qa/unit/vcl-dialogs-test.cxx
index bca3437099f2..4f5016da2971 100644
--- a/vcl/qa/unit/vcl-dialogs-test.cxx
+++ b/vcl/qa/unit/vcl-dialogs-test.cxx
@@ -48,7 +48,7 @@ VclPtr<VclAbstractDialog> VclDialogsTest::createDialogByID(sal_uInt32 /*nID*/) {
void VclDialogsTest::openAnyDialog()
{
/// process input file containing the UXMLDescriptions of the dialogs to dump
- processDialogBatchFile("vcl/qa/unit/data/vcl-dialogs-test.txt");
+ processDialogBatchFile(u"vcl/qa/unit/data/vcl-dialogs-test.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(VclDialogsTest);
diff --git a/vcl/source/app/brand.cxx b/vcl/source/app/brand.cxx
index 2906061061ca..269d141de3fe 100644
--- a/vcl/source/app/brand.cxx
+++ b/vcl/source/app/brand.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <config_folders.h>
#include <rtl/ustring.hxx>
@@ -41,9 +45,9 @@ namespace {
else
return false;
}
- bool tryLoadPng( const OUString& rBaseDir, const OUString& rName, BitmapEx& rBitmap )
+ bool tryLoadPng( std::u16string_view rBaseDir, std::u16string_view rName, BitmapEx& rBitmap )
{
- return loadPng( rBaseDir + "/" LIBO_ETC_FOLDER + rName, rBitmap);
+ return loadPng( OUString::Concat(rBaseDir) + "/" LIBO_ETC_FOLDER + rName, rBitmap);
}
}
@@ -63,11 +67,11 @@ bool Application::LoadBrandBitmap (const char* pName, BitmapEx &rBitmap)
::std::vector< OUString > aFallbacks( aLanguageTag.getFallbackStrings( true));
for (const OUString & aFallback : aFallbacks)
{
- if (tryLoadPng( aBaseDir, aBaseName + "-" + aFallback + aPng, rBitmap))
+ if (tryLoadPng( aBaseDir, OUString(aBaseName + "-" + aFallback + aPng), rBitmap))
return true;
}
- return tryLoadPng( aBaseDir, aBaseName + aPng, rBitmap);
+ return tryLoadPng( aBaseDir, OUString(aBaseName + aPng), rBitmap);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/control/fmtfield.cxx b/vcl/source/control/fmtfield.cxx
index 20ad995de48d..2910c7e02604 100644
--- a/vcl/source/control/fmtfield.cxx
+++ b/vcl/source/control/fmtfield.cxx
@@ -209,14 +209,14 @@ namespace validation
return ( END == eCurrentState );
}
- bool NumberValidator::isValidNumericFragment( const OUString& _rText )
+ bool NumberValidator::isValidNumericFragment( std::u16string_view _rText )
{
- if ( _rText.isEmpty() )
+ if ( _rText.empty() )
// empty strings are always allowed
return true;
// normalize the string
- OUString sNormalized = "_" + _rText + "_";
+ OUString sNormalized = OUString::Concat("_") + _rText + "_";
return implValidateNormalized( sNormalized );
}
diff --git a/vcl/source/control/notebookbar.cxx b/vcl/source/control/notebookbar.cxx
index 8feb96ee51fd..8506ce965273 100644
--- a/vcl/source/control/notebookbar.cxx
+++ b/vcl/source/control/notebookbar.cxx
@@ -7,6 +7,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <vcl/layout.hxx>
#include <vcl/notebookbar/notebookbar.hxx>
#include <vcl/syswin.hxx>
@@ -29,9 +33,9 @@ static OUString getCustomizedUIRootDir()
return sShareLayer;
}
-static bool doesFileExist(const OUString& sUIDir, const OUString& sUIFile)
+static bool doesFileExist(std::u16string_view sUIDir, std::u16string_view sUIFile)
{
- OUString sUri = sUIDir + sUIFile;
+ OUString sUri = OUString::Concat(sUIDir) + sUIFile;
osl::File file(sUri);
return( file.open(0) == osl::FileBase::E_None );
}
diff --git a/vcl/source/filter/FilterConfigItem.cxx b/vcl/source/filter/FilterConfigItem.cxx
index a81102321388..1514ab60dd72 100644
--- a/vcl/source/filter/FilterConfigItem.cxx
+++ b/vcl/source/filter/FilterConfigItem.cxx
@@ -96,7 +96,7 @@ static bool ImpIsTreeAvailable( Reference< XMultiServiceFactory > const & rXCfgP
return bAvailable;
}
-void FilterConfigItem::ImpInitTree( const OUString& rSubTree )
+void FilterConfigItem::ImpInitTree( std::u16string_view rSubTree )
{
bModified = false;
@@ -104,7 +104,7 @@ void FilterConfigItem::ImpInitTree( const OUString& rSubTree )
Reference< XMultiServiceFactory > xCfgProv = theDefaultProvider::get( xContext );
- OUString sTree = "/org.openoffice." + rSubTree;
+ OUString sTree = OUString::Concat("/org.openoffice.") + rSubTree;
if ( !ImpIsTreeAvailable(xCfgProv, sTree) )
return;
@@ -130,7 +130,7 @@ void FilterConfigItem::ImpInitTree( const OUString& rSubTree )
}
}
-FilterConfigItem::FilterConfigItem( const OUString& rSubTree )
+FilterConfigItem::FilterConfigItem( std::u16string_view rSubTree )
{
ImpInitTree( rSubTree );
}
@@ -142,7 +142,7 @@ FilterConfigItem::FilterConfigItem( css::uno::Sequence< css::beans::PropertyValu
aFilterData = *pFilterData;
}
-FilterConfigItem::FilterConfigItem( const OUString& rSubTree,
+FilterConfigItem::FilterConfigItem( std::u16string_view rSubTree,
css::uno::Sequence< css::beans::PropertyValue > const * pFilterData )
{
ImpInitTree( rSubTree );
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 65ae12a65931..302c094b5071 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -482,7 +482,7 @@ ErrCode GraphicFilter::ImpTestOrFindFormat( const OUString& rPath, SvStream& rSt
nBase = 1;
else if ( pConfig->GetImportFilterType( rFormat ).equalsIgnoreAsciiCase( "pcd_Photo_CD_Base16" ) )
nBase = 0;
- FilterConfigItem aFilterConfigItem( "Office.Common/Filter/Graphic/Import/PCD" );
+ FilterConfigItem aFilterConfigItem( u"Office.Common/Filter/Graphic/Import/PCD" );
aFilterConfigItem.WriteInt32( "Resolution", nBase );
}
}
diff --git a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
index bcc999a79eac..050cf657893e 100644
--- a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
+++ b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
@@ -8,10 +8,13 @@
*
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <FileDefinitionWidgetDraw.hxx>
#include <widgetdraw/WidgetDefinitionReader.hxx>
-#include <sal/config.h>
#include <svdata.hxx>
#include <rtl/bootstrap.hxx>
#include <config_folders.h>
@@ -72,7 +75,8 @@ std::shared_ptr<WidgetDefinition> getWidgetDefinition(OUString const& rDefinitio
return std::shared_ptr<WidgetDefinition>();
}
-std::shared_ptr<WidgetDefinition> const& getWidgetDefinitionForTheme(OUString const& rThemenName)
+std::shared_ptr<WidgetDefinition> const&
+getWidgetDefinitionForTheme(std::u16string_view rThemenName)
{
static std::shared_ptr<WidgetDefinition> spDefinition;
if (!spDefinition)
@@ -110,7 +114,7 @@ FileDefinitionWidgetDraw::FileDefinitionWidgetDraw(SalGraphics& rGraphics)
: m_rGraphics(rGraphics)
, m_bIsActive(false)
{
- m_pWidgetDefinition = getWidgetDefinitionForTheme("online");
+ m_pWidgetDefinition = getWidgetDefinitionForTheme(u"online");
#ifdef IOS
if (!m_pWidgetDefinition)
m_pWidgetDefinition = getWidgetDefinitionForTheme("ios");
diff --git a/vcl/source/gdi/embeddedfontshelper.cxx b/vcl/source/gdi/embeddedfontshelper.cxx
index 3b929be452c3..7e242d640837 100644
--- a/vcl/source/gdi/embeddedfontshelper.cxx
+++ b/vcl/source/gdi/embeddedfontshelper.cxx
@@ -236,14 +236,14 @@ bool EmbeddedFontsHelper::sufficientTTFRights( const void* data, tools::Long siz
return true; // no known restriction
}
-OUString EmbeddedFontsHelper::fontFileUrl( const OUString& familyName, FontFamily family, FontItalic italic,
+OUString EmbeddedFontsHelper::fontFileUrl( std::u16string_view familyName, FontFamily family, FontItalic italic,
FontWeight weight, FontPitch pitch, FontRights rights )
{
OUString path = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE( "bootstrap") "::UserInstallation}";
rtl::Bootstrap::expandMacros( path );
path += "/user/temp/embeddedfonts/fromsystem/";
osl::Directory::createPath( path );
- OUString filename = familyName + "_" + OUString::number( family ) + "_" + OUString::number( italic )
+ OUString filename = OUString::Concat(familyName) + "_" + OUString::number( family ) + "_" + OUString::number( italic )
+ "_" + OUString::number( weight ) + "_" + OUString::number( pitch )
+ ".ttf"; // TODO is it always ttf?
OUString url = path + filename;
diff --git a/vcl/source/image/ImplImageTree.cxx b/vcl/source/image/ImplImageTree.cxx
index 6a9cd8f75628..92ef534467dc 100644
--- a/vcl/source/image/ImplImageTree.cxx
+++ b/vcl/source/image/ImplImageTree.cxx
@@ -99,12 +99,12 @@ OUString convertLcTo32Path(OUString const & rPath)
return aResult;
}
-OUString createPath(std::u16string_view name, sal_Int32 pos, OUString const & locale)
+OUString createPath(std::u16string_view name, sal_Int32 pos, std::u16string_view locale)
{
- return name.substr(0, pos + 1) + locale + name.substr(pos);
+ return OUString::Concat(name.substr(0, pos + 1)) + locale + name.substr(pos);
}
-OUString getIconCacheUrl(OUString const & sVariant, ImageRequestParameters const & rParameters)
+OUString getIconCacheUrl(std::u16string_view sVariant, ImageRequestParameters const & rParameters)
{
OUString sUrl = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/cache/"
+ rParameters.msStyle + "/" + sVariant + "/" + rParameters.msName;
@@ -112,7 +112,8 @@ OUString getIconCacheUrl(OUString const & sVariant, ImageRequestParameters const
return sUrl;
}
-OUString createIconCacheUrl(OUString const & sVariant, ImageRequestParameters const & rParameters)
+OUString createIconCacheUrl(
+ std::u16string_view sVariant, ImageRequestParameters const & rParameters)
{
OUString sUrl(getIconCacheUrl(sVariant, rParameters));
OUString sDir = sUrl.copy(0, sUrl.lastIndexOf('/'));
@@ -359,7 +360,7 @@ OUString createVariant(ImageRequestParameters& rParameters)
return aVariant;
}
-bool loadDiskCachedVersion(OUString const & sVariant, ImageRequestParameters& rParameters)
+bool loadDiskCachedVersion(std::u16string_view sVariant, ImageRequestParameters& rParameters)
{
OUString sUrl(getIconCacheUrl(sVariant, rParameters));
if (!urlExists(sUrl))
@@ -370,7 +371,7 @@ bool loadDiskCachedVersion(OUString const & sVariant, ImageRequestParameters& rP
return true;
}
-void cacheBitmapToDisk(OUString const & sVariant, ImageRequestParameters const & rParameters)
+void cacheBitmapToDisk(std::u16string_view sVariant, ImageRequestParameters const & rParameters)
{
OUString sUrl(createIconCacheUrl(sVariant, rParameters));
vcl::PNGWriter aWriter(rParameters.mrBitmap);
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index 3d2a978e1927..82e01da1dc8d 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -60,7 +60,7 @@ OUString getShaderFolder()
return aUrl + "/opengl/";
}
-OString loadShader(const OUString& rFilename)
+OString loadShader(std::u16string_view rFilename)
{
OUString aFileURL = getShaderFolder() + rFilename +".glsl";
osl::File aFile(aFileURL);
@@ -137,16 +137,16 @@ namespace {
}
}
-static void addPreamble(OString& rShaderSource, const OString& rPreamble)
+static void addPreamble(OString& rShaderSource, std::string_view rPreamble)
{
- if (rPreamble.isEmpty())
+ if (rPreamble.empty())
return;
int nVersionStrStartPos = rShaderSource.indexOf("#version");
if (nVersionStrStartPos == -1)
{
- rShaderSource = rPreamble + "\n" + rShaderSource;
+ rShaderSource = OString::Concat(rPreamble) + "\n" + rShaderSource;
}
else
{
@@ -222,7 +222,7 @@ namespace
OString getStringDigest( const OUString& rVertexShaderName,
const OUString& rFragmentShaderName,
- const OString& rPreamble )
+ std::string_view rPreamble )
{
// read shaders source
OString aVertexShaderSource = getShaderSource( rVertexShaderName );
@@ -305,14 +305,14 @@ namespace
OString createFileName( std::u16string_view rVertexShaderName,
std::u16string_view rFragmentShaderName,
std::u16string_view rGeometryShaderName,
- const OString& rDigest )
+ std::string_view rDigest )
{
OString aFileName = getCacheFolder() +
OUStringToOString( rVertexShaderName, RTL_TEXTENCODING_UTF8 ) + "-" +
OUStringToOString( rFragmentShaderName, RTL_TEXTENCODING_UTF8 ) + "-";
if (!rGeometryShaderName.empty())
aFileName += OUStringToOString( rGeometryShaderName, RTL_TEXTENCODING_UTF8 ) + "-";
- aFileName += rDigest + ".bin";
+ aFileName += OString::Concat(rDigest) + ".bin";
return aFileName;
}
@@ -373,7 +373,7 @@ namespace
OString OpenGLHelper::GetDigest( const OUString& rVertexShaderName,
const OUString& rFragmentShaderName,
- const OString& rPreamble )
+ std::string_view rPreamble )
{
return getStringDigest(rVertexShaderName, rFragmentShaderName, rPreamble);
}
@@ -381,8 +381,8 @@ OString OpenGLHelper::GetDigest( const OUString& rVertexShaderName,
GLint OpenGLHelper::LoadShaders(const OUString& rVertexShaderName,
const OUString& rFragmentShaderName,
const OUString& rGeometryShaderName,
- const OString& preamble,
- const OString& rDigest)
+ std::string_view preamble,
+ std::string_view rDigest)
{
OpenGLZone aZone;
@@ -401,7 +401,7 @@ GLint OpenGLHelper::LoadShaders(const OUString& rVertexShaderName,
aGeometryShaderSource = getShaderSource(rGeometryShaderName);
GLint bBinaryResult = GL_FALSE;
- if (epoxy_has_gl_extension("GL_ARB_get_program_binary") && !rDigest.isEmpty())
+ if (epoxy_has_gl_extension("GL_ARB_get_program_binary") && !rDigest.empty())
{
OString aFileName =
createFileName(rVertexShaderName, rFragmentShaderName, rGeometryShaderName, rDigest);
@@ -426,7 +426,7 @@ GLint OpenGLHelper::LoadShaders(const OUString& rVertexShaderName,
GLint Result = GL_FALSE;
// Compile Vertex Shader
- if( !preamble.isEmpty())
+ if( !preamble.empty())
addPreamble( aVertexShaderSource, preamble );
char const * VertexSourcePointer = aVertexShaderSource.getStr();
glShaderSource(VertexShaderID, 1, &VertexSourcePointer , nullptr);
@@ -439,7 +439,7 @@ GLint OpenGLHelper::LoadShaders(const OUString& rVertexShaderName,
rVertexShaderName, true);
// Compile Fragment Shader
- if( !preamble.isEmpty())
+ if( !preamble.empty())
addPreamble( aFragmentShaderSource, preamble );
char const * FragmentSourcePointer = aFragmentShaderSource.getStr();
glShaderSource(FragmentShaderID, 1, &FragmentSourcePointer , nullptr);
@@ -454,7 +454,7 @@ GLint OpenGLHelper::LoadShaders(const OUString& rVertexShaderName,
if (bHasGeometryShader)
{
// Compile Geometry Shader
- if( !preamble.isEmpty())
+ if( !preamble.empty())
addPreamble( aGeometryShaderSource, preamble );
char const * GeometrySourcePointer = aGeometryShaderSource.getStr();
glShaderSource(GeometryShaderID, 1, &GeometrySourcePointer , nullptr);
@@ -473,7 +473,7 @@ GLint OpenGLHelper::LoadShaders(const OUString& rVertexShaderName,
if (bHasGeometryShader)
glAttachShader(ProgramID, GeometryShaderID);
- if (epoxy_has_gl_extension("GL_ARB_get_program_binary") && !rDigest.isEmpty())
+ if (epoxy_has_gl_extension("GL_ARB_get_program_binary") && !rDigest.empty())
{
glProgramParameteri(ProgramID, GL_PROGRAM_BINARY_RETRIEVABLE_HINT, GL_TRUE);
glLinkProgram(ProgramID);
@@ -513,8 +513,8 @@ GLint OpenGLHelper::LoadShaders(const OUString& rVertexShaderName,
GLint OpenGLHelper::LoadShaders(const OUString& rVertexShaderName,
const OUString& rFragmentShaderName,
- const OString& preamble,
- const OString& rDigest)
+ std::string_view preamble,
+ std::string_view rDigest)
{
return LoadShaders(rVertexShaderName, rFragmentShaderName, OUString(), preamble, rDigest);
}
@@ -523,7 +523,7 @@ GLint OpenGLHelper::LoadShaders(const OUString& rVertexShaderName,
const OUString& rFragmentShaderName,
const OUString& rGeometryShaderName)
{
- return LoadShaders(rVertexShaderName, rFragmentShaderName, rGeometryShaderName, OString(), OString());
+ return LoadShaders(rVertexShaderName, rFragmentShaderName, rGeometryShaderName, std::string_view(), std::string_view());
}
GLint OpenGLHelper::LoadShaders(const OUString& rVertexShaderName,
diff --git a/vcl/unx/generic/print/glyphset.cxx b/vcl/unx/generic/print/glyphset.cxx
index 1afd827dfbb7..d83907038b25 100644
--- a/vcl/unx/generic/print/glyphset.cxx
+++ b/vcl/unx/generic/print/glyphset.cxx
@@ -141,17 +141,17 @@ GlyphSet::GetGlyphSetName (sal_Int32 nGlyphSetID)
}
OString
-GlyphSet::GetReencodedFontName (rtl_TextEncoding nEnc, const OString &rFontName)
+GlyphSet::GetReencodedFontName (rtl_TextEncoding nEnc, std::string_view rFontName)
{
if ( nEnc == RTL_TEXTENCODING_MS_1252
|| nEnc == RTL_TEXTENCODING_ISO_8859_1)
{
- return rFontName + "-iso1252";
+ return OString::Concat(rFontName) + "-iso1252";
}
else
if (nEnc >= RTL_TEXTENCODING_USER_START && nEnc <= RTL_TEXTENCODING_USER_END)
{
- return rFontName
+ return OString::Concat(rFontName)
+ "-enc"
+ OString::number ((nEnc - RTL_TEXTENCODING_USER_START));
}
diff --git a/vcl/unx/generic/print/glyphset.hxx b/vcl/unx/generic/print/glyphset.hxx
index 33b928d759f9..e733846c58b5 100644
--- a/vcl/unx/generic/print/glyphset.hxx
+++ b/vcl/unx/generic/print/glyphset.hxx
@@ -25,6 +25,7 @@
#include <rtl/string.hxx>
#include <vcl/glyphitem.hxx>
+#include <string_view>
#include <vector>
#include <unordered_map>
@@ -65,7 +66,7 @@ public:
sal_Int32 GetFontID () const { return mnFontID;}
static OString
GetReencodedFontName (rtl_TextEncoding nEnc,
- const OString &rFontName);
+ std::string_view rFontName);
bool IsVertical () const { return mbVertical;}
diff --git a/vcl/unx/generic/print/printerjob.cxx b/vcl/unx/generic/print/printerjob.cxx
index de598f1f656d..1ce42b6e0d40 100644
--- a/vcl/unx/generic/print/printerjob.cxx
+++ b/vcl/unx/generic/print/printerjob.cxx
@@ -79,9 +79,9 @@ AppendPS (FILE* pDst, osl::File* pSrc, unsigned char* pBuffer)
*/
std::unique_ptr<osl::File>
-PrinterJob::CreateSpoolFile (const OUString& rName, const OUString& rExtension)
+PrinterJob::CreateSpoolFile (std::u16string_view rName, std::u16string_view rExtension)
{
- OUString aFile = rName + rExtension;
+ OUString aFile = OUString::Concat(rName) + rExtension;
OUString aFileURL;
osl::File::RC nError = osl::File::getFileURLFromSystemPath( aFile, aFileURL );
if (nError != osl::File::E_None)
@@ -296,8 +296,8 @@ PrinterJob::StartJob (
maJobTitle = rJobName;
OUString aExt(".ps");
- mpJobHeader = CreateSpoolFile ("psp_head", aExt);
- mpJobTrailer = CreateSpoolFile ("psp_tail", aExt);
+ mpJobHeader = CreateSpoolFile (u"psp_head", aExt);
+ mpJobTrailer = CreateSpoolFile (u"psp_tail", aExt);
if( ! (mpJobHeader && mpJobTrailer) ) // existing files are removed in destructor
return false;
@@ -551,8 +551,8 @@ PrinterJob::StartPage (const JobData& rJobSetup)
OUString aPageNo = OUString::number (static_cast<sal_Int32>(maPageVector.size())+1); // sequential page number must start with 1
OUString aExt = aPageNo + ".ps";
- maHeaderVector.push_back( CreateSpoolFile ( "psp_pghead", aExt) );
- maPageVector.push_back( CreateSpoolFile ( "psp_pgbody", aExt) );
+ maHeaderVector.push_back( CreateSpoolFile ( u"psp_pghead", aExt) );
+ maPageVector.push_back( CreateSpoolFile ( u"psp_pgbody", aExt) );
osl::File* pPageHeader = maHeaderVector.back().get();
osl::File* pPageBody = maPageVector.back().get();
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 18e735c4e9e9..b36d7d713e86 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -16751,7 +16751,7 @@ private:
}
public:
- GtkInstanceBuilder(GtkWidget* pParent, const OUString& rUIRoot, const OUString& rUIFile,
+ GtkInstanceBuilder(GtkWidget* pParent, std::u16string_view rUIRoot, const OUString& rUIFile,
SystemChildWindow* pInterimGlue, bool bAllowCycleFocusOut)
: weld::Builder()
, m_pStringReplace(Translate::GetReadStringHook())
diff --git a/writerfilter/qa/cppunittests/filters-test/filters-test.cxx b/writerfilter/qa/cppunittests/filters-test/filters-test.cxx
index cd1863259569..f377e8894c32 100644
--- a/writerfilter/qa/cppunittests/filters-test/filters-test.cxx
+++ b/writerfilter/qa/cppunittests/filters-test/filters-test.cxx
@@ -70,7 +70,7 @@ CPPUNIT_TEST_FIXTURE(RtfTest, testFilter)
{
#ifndef DISABLE_CVE_TESTS
testDir(OUString(),
- m_directories.getURLFromSrc("/writerfilter/qa/cppunittests/filters-test/data/"));
+ m_directories.getURLFromSrc(u"/writerfilter/qa/cppunittests/filters-test/data/"));
#endif
}
diff --git a/writerfilter/source/filter/WriterFilter.cxx b/writerfilter/source/filter/WriterFilter.cxx
index 0f0fcdb63391..dcfdf29a60f7 100644
--- a/writerfilter/source/filter/WriterFilter.cxx
+++ b/writerfilter/source/filter/WriterFilter.cxx
@@ -259,7 +259,7 @@ sal_Bool WriterFilter::filter(const uno::Sequence<beans::PropertyValue>& rDescri
m_xContext, pVBAProjectStream->getDocumentStream(), false);
if (xVbaPrjStrg && xVbaPrjStrg->isStorage())
{
- ::oox::ole::VbaProject aVbaProject(m_xContext, xModel, "Writer");
+ ::oox::ole::VbaProject aVbaProject(m_xContext, xModel, u"Writer");
uno::Reference<frame::XFrame> xFrame = aMediaDesc.getUnpackedValueOrDefault(
utl::MediaDescriptor::PROP_FRAME(), uno::Reference<frame::XFrame>());
diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
index fba694b5b77b..813b9cbc75fb 100644
--- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
@@ -499,7 +499,9 @@ void OOXMLDocumentImpl::resolve(Stream & rStream)
// and the domain mapper is likely in an inconsistent state
// In case user chooses to try to continue loading, don't ask again for this file
SfxObjectShell* rShell = SfxObjectShell::GetShellFromComponent(mxModel);
- if (!rShell || !rShell->IsContinueImportOnFilterExceptions("SAXException: " + rErr.Message))
+ if (!rShell
+ || !rShell->IsContinueImportOnFilterExceptions(
+ OUString("SAXException: " + rErr.Message)))
throw;
}
catch (uno::RuntimeException const&)
diff --git a/writerperfect/qa/unit/EPUBExportTest.cxx b/writerperfect/qa/unit/EPUBExportTest.cxx
index cfdefd25c377..91c62ad60a25 100644
--- a/writerperfect/qa/unit/EPUBExportTest.cxx
+++ b/writerperfect/qa/unit/EPUBExportTest.cxx
@@ -7,6 +7,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <libepubgen/libepubgen.h>
#include <com/sun/star/document/XFilter.hpp>
@@ -48,7 +52,8 @@ public:
void setUp() override;
void tearDown() override;
void registerNamespaces(xmlXPathContextPtr& pXmlXpathCtx) override;
- void createDoc(const OUString& rFile, const uno::Sequence<beans::PropertyValue>& rFilterData);
+ void createDoc(std::u16string_view rFile,
+ const uno::Sequence<beans::PropertyValue>& rFilterData);
/// Returns an XML representation of the stream named rName in the exported package.
xmlDocUniquePtr parseExport(const OUString& rName);
/// Parses a CSS representation of the stream named rName and returns it.
@@ -83,7 +88,7 @@ void EPUBExportTest::registerNamespaces(xmlXPathContextPtr& pXmlXpathCtx)
xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("svg"), BAD_CAST("http://www.w3.org/2000/svg"));
}
-void EPUBExportTest::createDoc(const OUString& rFile,
+void EPUBExportTest::createDoc(std::u16string_view rFile,
const uno::Sequence<beans::PropertyValue>& rFilterData)
{
// Import the bugdoc and export as EPUB.
@@ -162,7 +167,7 @@ OUString EPUBExportTest::getCss(std::map<OUString, std::vector<OUString>>& rCss,
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testOutlineLevel)
{
- createDoc("outline-level.fodt", {});
+ createDoc(u"outline-level.fodt", {});
// Make sure that the output is split into two.
CPPUNIT_ASSERT(mxZipFile->hasByName("OEBPS/sections/section0001.xhtml"));
@@ -173,7 +178,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testOutlineLevel)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testMimetype)
{
- createDoc("hello.fodt", {});
+ createDoc(u"hello.fodt", {});
// Check that the mime type is written uncompressed at the expected location.
SvFileStream aFileStream(maTempFile.GetURL(), StreamMode::READ);
@@ -212,7 +217,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testEPUB2)
uno::Sequence<beans::PropertyValue> aFilterData(comphelper::InitPropertySequence(
{ // Explicitly request EPUB2.
{ "EPUBVersion", uno::makeAny(static_cast<sal_Int32>(20)) } }));
- createDoc("hello.fodt", aFilterData);
+ createDoc(u"hello.fodt", aFilterData);
mpXmlDoc = parseExport("OEBPS/content.opf");
// This was 3.0, EPUBVersion filter option was ignored and we always emitted EPUB3.
@@ -225,7 +230,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testEPUBFixedLayout)
{ // Explicitly request fixed layout.
{ "EPUBLayoutMethod",
uno::makeAny(static_cast<sal_Int32>(libepubgen::EPUB_LAYOUT_METHOD_FIXED)) } }));
- createDoc("hello.fodt", aFilterData);
+ createDoc(u"hello.fodt", aFilterData);
mpXmlDoc = parseExport("OEBPS/content.opf");
// This was missing, EPUBLayoutMethod filter option was ignored and we always emitted reflowable layout.
@@ -237,7 +242,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testEPUBFixedLayoutOption)
{
// Explicitly request fixed layout, this time via FilterOptions.
maFilterOptions = "layout=fixed";
- createDoc("hello.fodt", {});
+ createDoc(u"hello.fodt", {});
// This failed, fixed layout was only working via the FilterData map.
mpXmlDoc = parseExport("OEBPS/content.opf");
@@ -251,7 +256,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testEPUBFixedLayoutImplicitBreak)
{ // Explicitly request fixed layout.
{ "EPUBLayoutMethod",
uno::makeAny(static_cast<sal_Int32>(libepubgen::EPUB_LAYOUT_METHOD_FIXED)) } }));
- createDoc("fxl-2page.fodt", aFilterData);
+ createDoc(u"fxl-2page.fodt", aFilterData);
CPPUNIT_ASSERT(mxZipFile->hasByName("OEBPS/sections/section0001.xhtml"));
// This was missing, implicit page break (as calculated by the layout) was lost on export.
@@ -272,7 +277,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testPageBreakSplit)
{ // Explicitly request split on page break (instead of on heading).
{ "EPUBSplitMethod",
uno::makeAny(static_cast<sal_Int32>(libepubgen::EPUB_SPLIT_METHOD_PAGE_BREAK)) } }));
- createDoc("2pages.fodt", aFilterData);
+ createDoc(u"2pages.fodt", aFilterData);
// Make sure that the output is split into two.
CPPUNIT_ASSERT(mxZipFile->hasByName("OEBPS/sections/section0001.xhtml"));
@@ -283,7 +288,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testPageBreakSplit)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testSpanAutostyle)
{
- createDoc("span-autostyle.fodt", {});
+ createDoc(u"span-autostyle.fodt", {});
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
assertXPath(mpXmlDoc, "//xhtml:p/xhtml:span[1]", "class", "span0");
@@ -295,7 +300,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testSpanAutostyle)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testParaAutostyleCharProps)
{
- createDoc("para-autostyle-char-props.fodt", {});
+ createDoc(u"para-autostyle-char-props.fodt", {});
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
// This failed, para-level char props were not exported.
@@ -305,7 +310,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testParaAutostyleCharProps)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testMeta)
{
- createDoc("meta.fodt", {});
+ createDoc(u"meta.fodt", {});
mpXmlDoc = parseExport("OEBPS/content.opf");
// This was "Unknown Author", <meta:initial-creator> was not handled.
@@ -325,7 +330,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testMeta)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testMetaXMP)
{
- createDoc("meta-xmp.fodt", {});
+ createDoc(u"meta-xmp.fodt", {});
mpXmlDoc = parseExport("OEBPS/content.opf");
// These were the libepubgen default values, metadata from a matching .xmp file was not picked up.
@@ -346,7 +351,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testMetaAPI)
{ "RVNGInitialCreator", uno::makeAny(OUString("unknown author from api")) },
{ "RVNGLanguage", uno::makeAny(OUString("hu")) },
{ "RVNGDate", uno::makeAny(OUString("2015-11-20T17:16:07Z")) } }));
- createDoc("meta-xmp.fodt", aFilterData);
+ createDoc(u"meta-xmp.fodt", aFilterData);
mpXmlDoc = parseExport("OEBPS/content.opf");
// These were values from XMP (deadbeef, etc.), not from API.
@@ -364,7 +369,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testCoverImage)
OUString aCoverURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "meta.cover-image.png";
uno::Sequence<beans::PropertyValue> aFilterData(
comphelper::InitPropertySequence({ { "RVNGCoverImage", uno::makeAny(aCoverURL) } }));
- createDoc("hello.fodt", aFilterData);
+ createDoc(u"hello.fodt", aFilterData);
mpXmlDoc = parseExport("OEBPS/content.opf");
// Make sure that the explicitly set cover image is used.
@@ -378,7 +383,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testCoverImage)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testParaNamedstyle)
{
- createDoc("para-namedstyle.fodt", {});
+ createDoc(u"para-namedstyle.fodt", {});
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
assertXPath(mpXmlDoc, "//xhtml:p[1]", "class", "para0");
@@ -393,7 +398,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testParaNamedstyle)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testCharNamedstyle)
{
- createDoc("char-namedstyle.fodt", {});
+ createDoc(u"char-namedstyle.fodt", {});
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
@@ -405,7 +410,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testCharNamedstyle)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testNamedStyleInheritance)
{
- createDoc("named-style-inheritance.fodt", {});
+ createDoc(u"named-style-inheritance.fodt", {});
// Find the CSS rule for the blue text.
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
@@ -421,7 +426,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testNamedStyleInheritance)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testNestedSpan)
{
- createDoc("nested-span.fodt", {});
+ createDoc(u"nested-span.fodt", {});
// Check textural content of nested span.
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
@@ -439,7 +444,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testNestedSpan)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testLineBreak)
{
- createDoc("line-break.fodt", {});
+ createDoc(u"line-break.fodt", {});
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
// This was 0, line break was not handled.
@@ -450,7 +455,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testLineBreak)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testEscape)
{
- createDoc("escape.fodt", {});
+ createDoc(u"escape.fodt", {});
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
// This was lost.
@@ -466,7 +471,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testEscape)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testParaCharProps)
{
- createDoc("para-char-props.fodt", {});
+ createDoc(u"para-char-props.fodt", {});
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
std::map<OUString, std::vector<OUString>> aCssDoc = parseCss("OEBPS/styles/stylesheet.css");
@@ -482,7 +487,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testParaCharProps)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testSection)
{
- createDoc("section.fodt", {});
+ createDoc(u"section.fodt", {});
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
// This was "After.", i.e. in-section content was ignored.
@@ -491,7 +496,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testSection)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testList)
{
- createDoc("list.fodt", {});
+ createDoc(u"list.fodt", {});
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
// This was "C", i.e. in-list content was ignored.
@@ -502,7 +507,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testList)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testImage)
{
- createDoc("image.fodt", {});
+ createDoc(u"image.fodt", {});
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
assertXPath(mpXmlDoc, "//xhtml:p/xhtml:img", 1);
@@ -510,7 +515,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testImage)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testImageBorder)
{
- createDoc("image-border.fodt", {});
+ createDoc(u"image-border.fodt", {});
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
std::map<OUString, std::vector<OUString>> aCssDoc = parseCss("OEBPS/styles/stylesheet.css");
@@ -523,7 +528,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testImageBorder)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testImageNospan)
{
- createDoc("image-nospan.fodt", {});
+ createDoc(u"image-nospan.fodt", {});
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
// Image outside a span was lost.
@@ -532,7 +537,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testImageNospan)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testTable)
{
- createDoc("table.fodt", {});
+ createDoc(u"table.fodt", {});
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
assertXPath(mpXmlDoc, "//xhtml:table/xhtml:tbody/xhtml:tr/xhtml:td", 4);
@@ -540,7 +545,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testTable)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testTableRowSpan)
{
- createDoc("table-row-span.fodt", {});
+ createDoc(u"table-row-span.fodt", {});
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
// This failed, row span wasn't exported.
@@ -549,7 +554,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testTableRowSpan)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testTableCellBorder)
{
- createDoc("table-cell-border.fodt", {});
+ createDoc(u"table-cell-border.fodt", {});
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
std::map<OUString, std::vector<OUString>> aCssDoc = parseCss("OEBPS/styles/stylesheet.css");
@@ -563,7 +568,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testTableCellBorder)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testTableCellWidth)
{
- createDoc("table-cell-width.fodt", {});
+ createDoc(u"table-cell-width.fodt", {});
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
std::map<OUString, std::vector<OUString>> aCssDoc = parseCss("OEBPS/styles/stylesheet.css");
@@ -582,7 +587,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testTableCellWidth)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testTableRowHeight)
{
- createDoc("table-row-height.fodt", {});
+ createDoc(u"table-row-height.fodt", {});
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
std::map<OUString, std::vector<OUString>> aCssDoc = parseCss("OEBPS/styles/stylesheet.css");
@@ -595,7 +600,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testTableRowHeight)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testLink)
{
- createDoc("link.fodt", {});
+ createDoc(u"link.fodt", {});
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
assertXPathContent(mpXmlDoc, "//xhtml:p/xhtml:a/xhtml:span", "https://libreoffice.org/");
@@ -604,7 +609,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testLink)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testLinkInvalid)
{
- createDoc("link-invalid.odt", {});
+ createDoc(u"link-invalid.odt", {});
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
// This was 1, invalid relative link was not filtered out.
@@ -613,7 +618,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testLinkInvalid)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testLinkCharFormat)
{
- createDoc("link-charformat.fodt", {});
+ createDoc(u"link-charformat.fodt", {});
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
// <span> was lost, link text having a char format was missing.
@@ -624,7 +629,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testLinkCharFormat)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testLinkNamedCharFormat)
{
// Character properties from named character style on hyperlink was lost.
- createDoc("link-namedcharformat.fodt", {});
+ createDoc(u"link-namedcharformat.fodt", {});
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
std::map<OUString, std::vector<OUString>> aCssDoc = parseCss("OEBPS/styles/stylesheet.css");
@@ -638,7 +643,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testLinkNamedCharFormat)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testTableWidth)
{
- createDoc("table-width.fodt", {});
+ createDoc(u"table-width.fodt", {});
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
std::map<OUString, std::vector<OUString>> aCssDoc = parseCss("OEBPS/styles/stylesheet.css");
@@ -650,7 +655,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testTableWidth)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testTextBox)
{
- createDoc("text-box.fodt", {});
+ createDoc(u"text-box.fodt", {});
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
std::map<OUString, std::vector<OUString>> aCssDoc = parseCss("OEBPS/styles/stylesheet.css");
@@ -672,7 +677,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testTextBox)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testFontEmbedding)
{
#if !defined(MACOSX)
- createDoc("font-embedding.fodt", {});
+ createDoc(u"font-embedding.fodt", {});
// Make sure that the params of defineEmbeddedFont() are all handled.
// librevenge:name
@@ -697,7 +702,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testFontEmbedding)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testImageLink)
{
- createDoc("image-link.fodt", {});
+ createDoc(u"image-link.fodt", {});
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
// This failed, image was missing.
@@ -706,7 +711,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testImageLink)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testFootnote)
{
- createDoc("footnote.fodt", {});
+ createDoc(u"footnote.fodt", {});
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
// These were missing, footnote was lost.
@@ -716,7 +721,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testFootnote)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testPopup)
{
- createDoc("popup.odt", {});
+ createDoc(u"popup.odt", {});
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
// Test image popup anchor.
@@ -738,7 +743,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testPopupMedia)
{
// This is the same as testPopup(), but the links point to images in the
// default media directory, not in the document directory.
- createDoc("popup-media.odt", {});
+ createDoc(u"popup-media.odt", {});
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
// Test image popup anchor. This failed, number of XPath nodes was 0.
@@ -752,7 +757,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testPopupAPI)
OUString aMediaDir = m_directories.getURLFromSrc(DATA_DIRECTORY) + "popup";
uno::Sequence<beans::PropertyValue> aFilterData(
comphelper::InitPropertySequence({ { "RVNGMediaDir", uno::makeAny(aMediaDir) } }));
- createDoc("popup-api.odt", aFilterData);
+ createDoc(u"popup-api.odt", aFilterData);
// We have a non-empty anchor image.
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
@@ -770,7 +775,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testPageSize)
uno::Sequence<beans::PropertyValue> aFilterData(comphelper::InitPropertySequence(
{ { "EPUBLayoutMethod",
uno::makeAny(static_cast<sal_Int32>(libepubgen::EPUB_LAYOUT_METHOD_FIXED)) } }));
- createDoc("hello.fodt", aFilterData);
+ createDoc(u"hello.fodt", aFilterData);
// This failed, viewport was empty, so page size was lost.
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
@@ -789,7 +794,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testSVG)
uno::Sequence<beans::PropertyValue> aFilterData(comphelper::InitPropertySequence(
{ { "EPUBLayoutMethod",
uno::makeAny(static_cast<sal_Int32>(libepubgen::EPUB_LAYOUT_METHOD_FIXED)) } }));
- createDoc("hello.fodt", aFilterData);
+ createDoc(u"hello.fodt", aFilterData);
CPPUNIT_ASSERT(mxZipFile->hasByName("OEBPS/images/image0001.svg"));
uno::Reference<io::XInputStream> xInputStream(
@@ -815,7 +820,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testSVG)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testTdf115623SingleWritingMode)
{
// Simple page that has single writing mode should work.
- createDoc("tdf115623-single-writing-mode.odt", {});
+ createDoc(u"tdf115623-single-writing-mode.odt", {});
std::map<OUString, std::vector<OUString>> aCssDoc = parseCss("OEBPS/styles/stylesheet.css");
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
OUString aClass = getXPath(mpXmlDoc, "//xhtml:body", "class");
@@ -825,7 +830,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testTdf115623SingleWritingMode)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testTdf115623SplitByChapter)
{
- createDoc("tdf115623-split-by-chapter.odt", {});
+ createDoc(u"tdf115623-split-by-chapter.odt", {});
std::map<OUString, std::vector<OUString>> aCssDoc = parseCss("OEBPS/styles/stylesheet.css");
{
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
@@ -844,7 +849,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testTdf115623SplitByChapter)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testTdf115623ManyPageSpans)
{
- createDoc("tdf115623-many-pagespans.odt", {});
+ createDoc(u"tdf115623-many-pagespans.odt", {});
std::map<OUString, std::vector<OUString>> aCssDoc = parseCss("OEBPS/styles/stylesheet.css");
// Two pages should have different writing modes.
{
@@ -863,7 +868,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testTdf115623ManyPageSpans)
CPPUNIT_TEST_FIXTURE(EPUBExportTest, testSimpleRuby)
{
- createDoc("simple-ruby.odt", {});
+ createDoc(u"simple-ruby.odt", {});
mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
assertXPathContent(mpXmlDoc, "//xhtml:body/xhtml:p/xhtml:ruby/xhtml:span", "base text");
assertXPathContent(mpXmlDoc, "//xhtml:body/xhtml:p/xhtml:ruby/xhtml:rt", "ruby text");
@@ -873,7 +878,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testAbi11105)
{
// This crashed because the paragraph style "P5" which had a master-page-name
// appeared in a table cell messed up page spans.
- createDoc("abi11105.abw", {});
+ createDoc(u"abi11105.abw", {});
}
}
diff --git a/writerperfect/qa/unit/ImportTest.cxx b/writerperfect/qa/unit/ImportTest.cxx
index 07c82d4134cb..9ae26dc3b434 100644
--- a/writerperfect/qa/unit/ImportTest.cxx
+++ b/writerperfect/qa/unit/ImportTest.cxx
@@ -7,6 +7,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
@@ -48,11 +52,11 @@ public:
CPPUNIT_TEST_SUITE_END();
private:
- WpftLoader createCalcLoader(const OUString& rFile) const;
+ WpftLoader createCalcLoader(std::u16string_view rFile) const;
WpftLoader createLoader(const OUString& rUrl, const OUString& rFactoryUrl) const;
- OUString makeUrl(const OUString& rFile) const;
+ OUString makeUrl(std::u16string_view rFile) const;
private:
uno::Reference<lang::XMultiServiceFactory> m_xFilterFactory;
@@ -70,7 +74,7 @@ void ImportTest::setUp()
void ImportTest::testWK3WithFM3()
{
- WpftLoader aLoader(createCalcLoader("SOLVE.WK3"));
+ WpftLoader aLoader(createCalcLoader(u"SOLVE.WK3"));
uno::Reference<sheet::XSpreadsheetDocument> xDoc(aLoader.getDocument(), UNO_QUERY);
CPPUNIT_ASSERT(xDoc.is());
uno::Reference<container::XIndexAccess> xSheets(xDoc->getSheets(), UNO_QUERY);
@@ -84,7 +88,7 @@ void ImportTest::testWK3WithFM3()
CPPUNIT_ASSERT_EQUAL(sal_Int32(0x0000ff), nCharColor); // blue text
}
-WpftLoader ImportTest::createCalcLoader(const OUString& rFile) const
+WpftLoader ImportTest::createCalcLoader(std::u16string_view rFile) const
{
return createLoader(makeUrl(rFile), "private:factory/scalc");
}
@@ -106,9 +110,10 @@ WpftLoader ImportTest::createLoader(const OUString& rUrl, const OUString& rFacto
return WpftLoader(rUrl, xFilter, rFactoryUrl, m_xDesktop, m_xTypeMap, m_xContext);
}
-OUString ImportTest::makeUrl(const OUString& rFile) const
+OUString ImportTest::makeUrl(std::u16string_view rFile) const
{
- return const_cast<ImportTest*>(this)->m_directories.getURLFromSrc("/" TEST_DIR "/" + rFile);
+ return const_cast<ImportTest*>(this)->m_directories.getURLFromSrc(
+ OUString(OUString::Concat("/" TEST_DIR "/") + rFile));
}
CPPUNIT_TEST_SUITE_REGISTRATION(ImportTest);
diff --git a/writerperfect/qa/unit/WpftCalcFilterTest.cxx b/writerperfect/qa/unit/WpftCalcFilterTest.cxx
index e566b4fec981..22d1d4f95dd2 100644
--- a/writerperfect/qa/unit/WpftCalcFilterTest.cxx
+++ b/writerperfect/qa/unit/WpftCalcFilterTest.cxx
@@ -45,13 +45,13 @@ void WpftCalcFilterTest::test()
};
doTest("com.sun.star.comp.Calc.MWAWCalcImportFilter",
- "/writerperfect/qa/unit/data/calc/libmwaw/", aMWAWOptional);
+ u"/writerperfect/qa/unit/data/calc/libmwaw/", aMWAWOptional);
doTest("com.sun.star.comp.Calc.MSWorksCalcImportFilter",
- "/writerperfect/qa/unit/data/calc/libwps/", aWpsOptional);
+ u"/writerperfect/qa/unit/data/calc/libwps/", aWpsOptional);
doTest("org.libreoffice.comp.Calc.NumbersImportFilter",
- "/writerperfect/qa/unit/data/calc/libetonyek/", aEtonyekOptional);
+ u"/writerperfect/qa/unit/data/calc/libetonyek/", aEtonyekOptional);
doTest("org.libreoffice.comp.Calc.StarOfficeCalcImportFilter",
- "/writerperfect/qa/unit/data/calc/libstaroffice/");
+ u"/writerperfect/qa/unit/data/calc/libstaroffice/");
}
CPPUNIT_TEST_SUITE_REGISTRATION(WpftCalcFilterTest);
diff --git a/writerperfect/qa/unit/WpftDrawFilterTest.cxx b/writerperfect/qa/unit/WpftDrawFilterTest.cxx
index f616caa71a0a..3786315c4620 100644
--- a/writerperfect/qa/unit/WpftDrawFilterTest.cxx
+++ b/writerperfect/qa/unit/WpftDrawFilterTest.cxx
@@ -51,23 +51,24 @@ void WpftDrawFilterTest::test()
{ "Draw_3.1.sda", REQUIRE_STAROFFICE_VERSION(0, 0, 1) },
};
- doTest("com.sun.star.comp.Draw.CDRImportFilter", "/writerperfect/qa/unit/data/draw/libcdr/");
+ doTest("com.sun.star.comp.Draw.CDRImportFilter", u"/writerperfect/qa/unit/data/draw/libcdr/");
doTest("com.sun.star.comp.Draw.CMXImportFilter",
- "/writerperfect/qa/unit/data/draw/libcdr-cmx/");
+ u"/writerperfect/qa/unit/data/draw/libcdr-cmx/");
doTest("com.sun.star.comp.Draw.FreehandImportFilter",
- "/writerperfect/qa/unit/data/draw/libfreehand/");
+ u"/writerperfect/qa/unit/data/draw/libfreehand/");
doTest("com.sun.star.comp.Draw.MSPUBImportFilter",
- "/writerperfect/qa/unit/data/draw/libmspub/");
+ u"/writerperfect/qa/unit/data/draw/libmspub/");
doTest("com.sun.star.comp.Draw.MWAWDrawImportFilter",
- "/writerperfect/qa/unit/data/draw/libmwaw/", aMWAWOptional);
+ u"/writerperfect/qa/unit/data/draw/libmwaw/", aMWAWOptional);
doTest("com.sun.star.comp.Draw.VisioImportFilter",
- "/writerperfect/qa/unit/data/draw/libvisio/");
- doTest("com.sun.star.comp.Draw.WPGImportFilter", "/writerperfect/qa/unit/data/draw/libwpg/");
+ u"/writerperfect/qa/unit/data/draw/libvisio/");
+ doTest("com.sun.star.comp.Draw.WPGImportFilter", u"/writerperfect/qa/unit/data/draw/libwpg/");
doTest("org.libreoffice.comp.Draw.PageMakerImportFilter",
- "/writerperfect/qa/unit/data/draw/libpagemaker/");
+ u"/writerperfect/qa/unit/data/draw/libpagemaker/");
doTest("org.libreoffice.comp.Draw.StarOfficeDrawImportFilter",
- "/writerperfect/qa/unit/data/draw/libstaroffice/", aStarOfficeOptional);
- doTest("org.libreoffice.comp.Draw.ZMFImportFilter", "/writerperfect/qa/unit/data/draw/libzmf/");
+ u"/writerperfect/qa/unit/data/draw/libstaroffice/", aStarOfficeOptional);
+ doTest("org.libreoffice.comp.Draw.ZMFImportFilter",
+ u"/writerperfect/qa/unit/data/draw/libzmf/");
}
CPPUNIT_TEST_SUITE_REGISTRATION(WpftDrawFilterTest);
diff --git a/writerperfect/qa/unit/WpftFilterTestBase.cxx b/writerperfect/qa/unit/WpftFilterTestBase.cxx
index 1c5989c792bb..ca9dcc317c5a 100644
--- a/writerperfect/qa/unit/WpftFilterTestBase.cxx
+++ b/writerperfect/qa/unit/WpftFilterTestBase.cxx
@@ -43,13 +43,13 @@ bool WpftFilterTestBase::load(const OUString&, const OUString& rURL, const OUStr
return aLoader.getDocument().is();
}
-void WpftFilterTestBase::doTest(const OUString& rFilter, const OUString& rPath)
+void WpftFilterTestBase::doTest(const OUString& rFilter, std::u16string_view rPath)
{
m_xFilter.set(m_xFactory->createInstanceWithContext(rFilter, m_xContext), uno::UNO_QUERY_THROW);
testDir(OUString(), m_directories.getURLFromSrc(rPath));
}
-void WpftFilterTestBase::doTest(const OUString& rFilter, const OUString& rPath,
+void WpftFilterTestBase::doTest(const OUString& rFilter, std::u16string_view rPath,
const WpftOptionalMap_t& rOptionalMap)
{
m_xFilter.set(m_xFactory->createInstanceWithContext(rFilter, m_xContext), uno::UNO_QUERY_THROW);
diff --git a/writerperfect/qa/unit/WpftFilterTestBase.hxx b/writerperfect/qa/unit/WpftFilterTestBase.hxx
index 509ebcb6d9f1..e13c0bef544d 100644
--- a/writerperfect/qa/unit/WpftFilterTestBase.hxx
+++ b/writerperfect/qa/unit/WpftFilterTestBase.hxx
@@ -12,6 +12,7 @@
#include "wpftqahelperdllapi.h"
+#include <string_view>
#include <unordered_map>
#include <com/sun/star/uno/Reference.hxx>
@@ -49,8 +50,8 @@ public:
explicit WpftFilterTestBase(const OUString& rFactoryURL);
protected:
- void doTest(const OUString& rFilter, const OUString& rPath);
- void doTest(const OUString& rFilter, const OUString& rPath,
+ void doTest(const OUString& rFilter, std::u16string_view rPath);
+ void doTest(const OUString& rFilter, std::u16string_view rPath,
const WpftOptionalMap_t& rOptionalMap);
private:
diff --git a/writerperfect/qa/unit/WpftImpressFilterTest.cxx b/writerperfect/qa/unit/WpftImpressFilterTest.cxx
index f6f7608f7dad..9ff60296b2b6 100644
--- a/writerperfect/qa/unit/WpftImpressFilterTest.cxx
+++ b/writerperfect/qa/unit/WpftImpressFilterTest.cxx
@@ -49,9 +49,9 @@ void WpftImpressFilterTest::test()
};
doTest("org.libreoffice.comp.Impress.KeynoteImportFilter",
- "/writerperfect/qa/unit/data/impress/libetonyek/", aEtonyekOptional);
+ u"/writerperfect/qa/unit/data/impress/libetonyek/", aEtonyekOptional);
doTest("com.sun.star.comp.Impress.MWAWPresentationImportFilter",
- "/writerperfect/qa/unit/data/impress/libmwaw/", aMWAWOptional);
+ u"/writerperfect/qa/unit/data/impress/libmwaw/", aMWAWOptional);
}
CPPUNIT_TEST_SUITE_REGISTRATION(WpftImpressFilterTest);
diff --git a/writerperfect/qa/unit/WpftWriterFilterTest.cxx b/writerperfect/qa/unit/WpftWriterFilterTest.cxx
index 5ae36a64fe8d..d0a4ae68cdcf 100644
--- a/writerperfect/qa/unit/WpftWriterFilterTest.cxx
+++ b/writerperfect/qa/unit/WpftWriterFilterTest.cxx
@@ -55,19 +55,19 @@ void WpftWriterFilterTest::test()
};
doTest("com.sun.star.comp.Writer.AbiWordImportFilter",
- "/writerperfect/qa/unit/data/writer/libabw/");
+ u"/writerperfect/qa/unit/data/writer/libabw/");
doTest("org.libreoffice.comp.Writer.EBookImportFilter",
- "/writerperfect/qa/unit/data/writer/libe-book/", aEBookOptional);
+ u"/writerperfect/qa/unit/data/writer/libe-book/", aEBookOptional);
doTest("com.sun.star.comp.Writer.MSWorksImportFilter",
- "/writerperfect/qa/unit/data/writer/libwps/", aWpsOptional);
+ u"/writerperfect/qa/unit/data/writer/libwps/", aWpsOptional);
doTest("com.sun.star.comp.Writer.MWAWImportFilter",
- "/writerperfect/qa/unit/data/writer/libmwaw/", aMWAWOptional);
+ u"/writerperfect/qa/unit/data/writer/libmwaw/", aMWAWOptional);
doTest("org.libreoffice.comp.Writer.PagesImportFilter",
- "/writerperfect/qa/unit/data/writer/libetonyek/", aEtonyekOptional);
+ u"/writerperfect/qa/unit/data/writer/libetonyek/", aEtonyekOptional);
doTest("org.libreoffice.comp.Writer.StarOfficeWriterImportFilter",
- "/writerperfect/qa/unit/data/writer/libstaroffice/", aStarOfficeOptional);
+ u"/writerperfect/qa/unit/data/writer/libstaroffice/", aStarOfficeOptional);
doTest("com.sun.star.comp.Writer.WordPerfectImportFilter",
- "/writerperfect/qa/unit/data/writer/libwpd/");
+ u"/writerperfect/qa/unit/data/writer/libwpd/");
}
CPPUNIT_TEST_SUITE_REGISTRATION(WpftWriterFilterTest);
diff --git a/writerperfect/qa/unit/writerperfect-dialogs-test.cxx b/writerperfect/qa/unit/writerperfect-dialogs-test.cxx
index 7dc5f9f08a04..0029077931e5 100644
--- a/writerperfect/qa/unit/writerperfect-dialogs-test.cxx
+++ b/writerperfect/qa/unit/writerperfect-dialogs-test.cxx
@@ -48,7 +48,7 @@ VclPtr<VclAbstractDialog> WpfDialogsTest::createDialogByID(sal_uInt32 /*nID*/) {
void WpfDialogsTest::openAnyDialog()
{
/// process input file containing the UXMLDescriptions of the dialogs to dump
- processDialogBatchFile("writerperfect/qa/unit/data/writerperfect-dialogs-test.txt");
+ processDialogBatchFile(u"writerperfect/qa/unit/data/writerperfect-dialogs-test.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(WpfDialogsTest);
diff --git a/writerperfect/source/common/WPXSvInputStream.cxx b/writerperfect/source/common/WPXSvInputStream.cxx
index 2af8475ee99e..9f7ea9caecf1 100644
--- a/writerperfect/source/common/WPXSvInputStream.cxx
+++ b/writerperfect/source/common/WPXSvInputStream.cxx
@@ -87,11 +87,11 @@ OUString lcl_normalizeSubStreamPath(const OUString& rPath)
namespace
{
-OUString concatPath(const OUString& lhs, const OUString& rhs)
+OUString concatPath(std::u16string_view lhs, const OUString& rhs)
{
- if (lhs.isEmpty())
+ if (lhs.empty())
return rhs;
- return lhs + "/" + rhs;
+ return OUString::Concat(lhs) + "/" + rhs;
}
struct OLEStreamData
@@ -143,7 +143,7 @@ struct OLEStorageImpl
tools::SvRef<SotStorageStream> const& getStream(std::size_t nId);
private:
- void traverse(const tools::SvRef<SotStorage>& rStorage, const OUString& rPath);
+ void traverse(const tools::SvRef<SotStorage>& rStorage, std::u16string_view rPath);
tools::SvRef<SotStorageStream> createStream(const OUString& rPath);
@@ -178,7 +178,7 @@ void OLEStorageImpl::initialize(std::unique_ptr<SvStream> pStream)
mxRootStorage = new SotStorage(pStream.release(), true);
- traverse(mxRootStorage, "");
+ traverse(mxRootStorage, u"");
mbInitialized = true;
}
@@ -210,7 +210,7 @@ tools::SvRef<SotStorageStream> const& OLEStorageImpl::getStream(const std::size_
return maStreams[nId].stream;
}
-void OLEStorageImpl::traverse(const tools::SvRef<SotStorage>& rStorage, const OUString& rPath)
+void OLEStorageImpl::traverse(const tools::SvRef<SotStorage>& rStorage, std::u16string_view rPath)
{
SvStorageInfoList infos;
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx
index fc6cdd2ed717..583de4123e88 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -32,6 +32,7 @@
#include <algorithm>
#include <cassert>
#include <string.h>
+#include <string_view>
#include <helpcompiler/HelpIndexer.hxx>
@@ -306,7 +307,7 @@ const std::vector< OUString >& Databases::getModuleList( const OUString& Languag
return m_avModules;
}
-StaticModuleInformation* Databases::getStaticInformationForModule( const OUString& Module,
+StaticModuleInformation* Databases::getStaticInformationForModule( std::u16string_view Module,
const OUString& Language )
{
osl::MutexGuard aGuard( m_aMutex );
@@ -417,17 +418,17 @@ OUString Databases::processLang( const OUString& Language )
return ret;
}
-helpdatafileproxy::Hdf* Databases::getHelpDataFile( const OUString& Database,
+helpdatafileproxy::Hdf* Databases::getHelpDataFile( std::u16string_view Database,
const OUString& Language, bool helpText,
const OUString* pExtensionPath )
{
- if( Database.isEmpty() || Language.isEmpty() )
+ if( Database.empty() || Language.isEmpty() )
return nullptr;
osl::MutexGuard aGuard( m_aMutex );
OUString aFileExt( helpText ? OUString(".ht") : OUString(".db") );
- OUString dbFileName = "/" + Database + aFileExt;
+ OUString dbFileName = OUString::Concat("/") + Database + aFileExt;
OUString key;
if( pExtensionPath == nullptr )
key = processLang( Language ) + dbFileName;
@@ -1270,10 +1271,10 @@ Reference< deployment::XPackage > ExtensionIteratorBase::implGetNextBundledHelpP
}
OUString ExtensionIteratorBase::implGetFileFromPackage(
- const OUString& rFileExtension, const Reference< deployment::XPackage >& xPackage )
+ std::u16string_view rFileExtension, const Reference< deployment::XPackage >& xPackage )
{
// No extension -> search for pure language folder
- bool bLangFolderOnly = rFileExtension.isEmpty();
+ bool bLangFolderOnly = rFileExtension.empty();
OUString aFile;
OUString aLanguage = m_aLanguage;
@@ -1282,7 +1283,7 @@ OUString ExtensionIteratorBase::implGetFileFromPackage(
OUString aStr = xPackage->getRegistrationDataURL().Value + "/" + aLanguage;
if( !bLangFolderOnly )
{
- aStr += "/help" + rFileExtension;
+ aStr += OUString::Concat("/help") + rFileExtension;
}
aFile = m_rDatabases.expandURL( aStr );
@@ -1517,7 +1518,7 @@ OUString KeyDataBaseFileIterator::implGetDbFileFromPackage
( const Reference< deployment::XPackage >& xPackage )
{
OUString aExpandedURL =
- implGetFileFromPackage( ".key", xPackage );
+ implGetFileFromPackage( u".key", xPackage );
return aExpandedURL;
}
@@ -1587,7 +1588,7 @@ Reference< XHierarchicalNameAccess > JarFileIterator::implGetJarFromPackage
Reference< XHierarchicalNameAccess > xNA;
OUString zipFile =
- implGetFileFromPackage( ".jar", xPackage );
+ implGetFileFromPackage( u".jar", xPackage );
try
{
@@ -1712,13 +1713,13 @@ OUString IndexFolderIterator::nextIndexFolder( bool& o_rbExtension, bool& o_rbTe
OUString IndexFolderIterator::implGetIndexFolderFromPackage( bool& o_rbTemporary, const Reference< deployment::XPackage >& xPackage )
{
OUString aIndexFolder =
- implGetFileFromPackage( ".idxl", xPackage );
+ implGetFileFromPackage( u".idxl", xPackage );
o_rbTemporary = false;
if( !m_xSFA->isFolder( aIndexFolder ) )
{
// i98680: Missing index? Try to generate now
- OUString aLangURL = implGetFileFromPackage( OUString(), xPackage );
+ OUString aLangURL = implGetFileFromPackage( std::u16string_view(), xPackage );
if( m_xSFA->isFolder( aLangURL ) )
{
// Test write access (shared extension may be read only)
@@ -1773,7 +1774,7 @@ OUString IndexFolderIterator::implGetIndexFolderFromPackage( bool& o_rbTemporary
aIndexer.indexDocuments();
if( bIsWriteAccess )
- aIndexFolder = implGetFileFromPackage( ".idxl", xPackage );
+ aIndexFolder = implGetFileFromPackage( u".idxl", xPackage );
else
aIndexFolder = aZipDir + "/help.idxl";
}
diff --git a/xmlhelp/source/cxxhelp/provider/databases.hxx b/xmlhelp/source/cxxhelp/provider/databases.hxx
index 9431328143c8..4c719a61c862 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.hxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.hxx
@@ -23,6 +23,7 @@
#include <sal/config.h>
#include <memory>
+#include <string_view>
#include <unordered_map>
#include <unordered_set>
#include <vector>
@@ -147,14 +148,14 @@ namespace chelp {
const std::vector< OUString >& getModuleList( const OUString& Language );
- StaticModuleInformation* getStaticInformationForModule( const OUString& Module,
+ StaticModuleInformation* getStaticInformationForModule( std::u16string_view Module,
const OUString& Language );
bool checkModuleMatchForExtension( std::u16string_view Database, const OUString& doclist );
KeywordInfo* getKeyword( const OUString& Module,
const OUString& Language );
- helpdatafileproxy::Hdf* getHelpDataFile( const OUString& Module,
+ helpdatafileproxy::Hdf* getHelpDataFile( std::u16string_view Module,
const OUString& Language, bool helpText = false,
const OUString* pExtensionPath = nullptr );
@@ -322,7 +323,7 @@ namespace chelp {
( css::uno::Reference< css::deployment::XPackage >& o_xParentPackageBundle );
css::uno::Reference< css::deployment::XPackage > implGetNextBundledHelpPackage
( css::uno::Reference< css::deployment::XPackage >& o_xParentPackageBundle );
- OUString implGetFileFromPackage( const OUString& rFileExtension,
+ OUString implGetFileFromPackage( std::u16string_view rFileExtension,
const css::uno::Reference< css::deployment::XPackage >& xPackage );
void implGetLanguageVectorFromPackage( ::std::vector< OUString > &rv,
const css::uno::Reference< css::deployment::XPackage >& xPackage );
diff --git a/xmloff/inc/txtflde.hxx b/xmloff/inc/txtflde.hxx
index 81efbde29629..989d3fb02149 100644
--- a/xmloff/inc/txtflde.hxx
+++ b/xmloff/inc/txtflde.hxx
@@ -405,7 +405,7 @@ private:
/// make reference name for a sequence field
static OUString MakeSequenceRefName(sal_Int16 nSeqNo,
- const OUString& rSeqName);
+ std::u16string_view rSeqName);
std::unique_ptr<XMLPropertyState> pCombinedCharactersPropertyState;
diff --git a/xmloff/qa/unit/style.cxx b/xmloff/qa/unit/style.cxx
index d9511e3e2a8a..1814d4f4f2ce 100644
--- a/xmloff/qa/unit/style.cxx
+++ b/xmloff/qa/unit/style.cxx
@@ -7,6 +7,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <test/bootstrapfixture.hxx>
#include <unotest/macros_test.hxx>
@@ -27,7 +31,7 @@ public:
void setUp() override;
void tearDown() override;
uno::Reference<lang::XComponent>& getComponent() { return mxComponent; }
- void load(const OUString& rURL);
+ void load(std::u16string_view rURL);
};
void XmloffStyleTest::setUp()
@@ -45,7 +49,7 @@ void XmloffStyleTest::tearDown()
test::BootstrapFixture::tearDown();
}
-void XmloffStyleTest::load(const OUString& rFileName)
+void XmloffStyleTest::load(std::u16string_view rFileName)
{
OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + rFileName;
mxComponent = loadFromDesktop(aURL);
@@ -54,7 +58,7 @@ void XmloffStyleTest::load(const OUString& rFileName)
CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testFillImageBase64)
{
// Load a flat ODG that has base64-encoded bitmap as a fill style.
- load("fill-image-base64.fodg");
+ load(u"fill-image-base64.fodg");
uno::Reference<lang::XMultiServiceFactory> xFactory(getComponent(), uno::UNO_QUERY);
uno::Reference<container::XNameContainer> xBitmaps(
xFactory->createInstance("com.sun.star.drawing.BitmapTable"), uno::UNO_QUERY);
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 9d3b1115f57e..64dccb70abf5 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -1302,7 +1302,7 @@ Reference< XOutputStream > SvXMLImport::GetStreamForGraphicObjectURLFromBase64()
OUString SvXMLImport::ResolveEmbeddedObjectURL(
const OUString& rURL,
- const OUString& rClassId )
+ std::u16string_view rClassId )
{
OUString sRet;
@@ -1311,9 +1311,9 @@ OUString SvXMLImport::ResolveEmbeddedObjectURL(
if ( mxEmbeddedResolver.is() )
{
OUString sURL( rURL );
- if( !rClassId.isEmpty() )
+ if( !rClassId.empty() )
{
- sURL += "!" + rClassId;
+ sURL += OUString::Concat("!") + rClassId;
}
sRet = mxEmbeddedResolver->resolveEmbeddedObjectURL( sURL );
}
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index e513e1e34be2..1e54872ada83 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -43,6 +43,7 @@
#include <xmloff/languagetagodf.hxx>
#include <memory>
+#include <string_view>
#include <vector>
using namespace ::com::sun::star;
@@ -1212,7 +1213,7 @@ SvXMLNumFormatContext::SvXMLNumFormatContext( SvXMLImport& rImport,
return;
LanguageTag aLanguageTag( OUString(), aNatNumAttr.Locale.Language,
- OUString(), aNatNumAttr.Locale.Country);
+ std::u16string_view(), aNatNumAttr.Locale.Country);
aNatNumAttr.Locale = aLanguageTag.getLocale( false);
// NatNum12 spell out formula (cardinal, ordinal, ordinal-feminine etc.)
diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx
index d06bc3cde711..fdad9672c099 100644
--- a/xmloff/source/text/XMLTextFrameContext.cxx
+++ b/xmloff/source/text/XMLTextFrameContext.cxx
@@ -61,6 +61,7 @@
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <basegfx/numeric/ftools.hxx>
#include <map>
+#include <string_view>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -434,7 +435,7 @@ void XMLTextFrameContext_Impl::Create()
else if( !sHRef.isEmpty() )
{
OUString sURL( GetImport().ResolveEmbeddedObjectURL( sHRef,
- OUString() ) );
+ std::u16string_view() ) );
if( GetImport().IsPackageURL( sHRef ) )
{
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index 47dfb71a0bd9..f9c0769ead3e 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -3457,10 +3457,10 @@ OUString XMLTextFieldExport::MakeFootnoteRefName(
OUString XMLTextFieldExport::MakeSequenceRefName(
sal_Int16 nSeqNo,
- const OUString& rSeqName)
+ std::u16string_view rSeqName)
{
// generate foot-/endnote ID
- return "ref" +rSeqName + OUString::number(static_cast<sal_Int32>(nSeqNo));
+ return OUString::Concat("ref") +rSeqName + OUString::number(static_cast<sal_Int32>(nSeqNo));
}
diff --git a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
index a73a392c609b..0c0ce1107a3d 100644
--- a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
+++ b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
@@ -174,7 +174,7 @@ CPPUNIT_TEST_FIXTURE(PDFSigningTest, testPDFAdd)
OUString aSourceDir = m_directories.getURLFromSrc(DATA_DIRECTORY);
OUString aInURL = aSourceDir + "no.pdf";
OUString aTargetDir
- = m_directories.getURLFromWorkdir("/CppunitTest/xmlsecurity_pdfsigning.test.user/");
+ = m_directories.getURLFromWorkdir(u"/CppunitTest/xmlsecurity_pdfsigning.test.user/");
OUString aOutURL = aTargetDir + "add.pdf";
bool bHadCertificates = sign(aInURL, aOutURL, 0);
@@ -200,7 +200,7 @@ CPPUNIT_TEST_FIXTURE(PDFSigningTest, testPDFAdd2)
OUString aSourceDir = m_directories.getURLFromSrc(DATA_DIRECTORY);
OUString aInURL = aSourceDir + "no.pdf";
OUString aTargetDir
- = m_directories.getURLFromWorkdir("/CppunitTest/xmlsecurity_pdfsigning.test.user/");
+ = m_directories.getURLFromWorkdir(u"/CppunitTest/xmlsecurity_pdfsigning.test.user/");
OUString aOutURL = aTargetDir + "add.pdf";
bool bHadCertificates = sign(aInURL, aOutURL, 0);
@@ -234,7 +234,7 @@ CPPUNIT_TEST_FIXTURE(PDFSigningTest, testPDFRemove)
// Remove the signature and write out the result as remove.pdf.
OUString aTargetDir
- = m_directories.getURLFromWorkdir("/CppunitTest/xmlsecurity_pdfsigning.test.user/");
+ = m_directories.getURLFromWorkdir(u"/CppunitTest/xmlsecurity_pdfsigning.test.user/");
OUString aOutURL = aTargetDir + "remove.pdf";
osl::File::copy(aInURL, aOutURL);
{
@@ -265,7 +265,7 @@ CPPUNIT_TEST_FIXTURE(PDFSigningTest, testPDFRemoveAll)
// Copy the test document to a temporary file, as it'll be modified.
OUString aTargetDir
- = m_directories.getURLFromWorkdir("/CppunitTest/xmlsecurity_pdfsigning.test.user/");
+ = m_directories.getURLFromWorkdir(u"/CppunitTest/xmlsecurity_pdfsigning.test.user/");
OUString aOutURL = aTargetDir + "remove-all.pdf";
CPPUNIT_ASSERT_EQUAL(
osl::File::RC::E_None,
@@ -348,7 +348,7 @@ CPPUNIT_TEST_FIXTURE(PDFSigningTest, testPDF16Add)
OUString aSourceDir = m_directories.getURLFromSrc(DATA_DIRECTORY);
OUString aInURL = aSourceDir + "pdf16adobe.pdf";
OUString aTargetDir
- = m_directories.getURLFromWorkdir("/CppunitTest/xmlsecurity_pdfsigning.test.user/");
+ = m_directories.getURLFromWorkdir(u"/CppunitTest/xmlsecurity_pdfsigning.test.user/");
OUString aOutURL = aTargetDir + "add.pdf";
// This failed: verification broke as incorrect xref stream was written as
// part of the new signature.
@@ -438,7 +438,7 @@ CPPUNIT_TEST_FIXTURE(PDFSigningTest, testSigningCertificateAttribute)
OUString aSourceDir = m_directories.getURLFromSrc(DATA_DIRECTORY);
OUString aInURL = aSourceDir + "no.pdf";
OUString aTargetDir
- = m_directories.getURLFromWorkdir("/CppunitTest/xmlsecurity_pdfsigning.test.user/");
+ = m_directories.getURLFromWorkdir(u"/CppunitTest/xmlsecurity_pdfsigning.test.user/");
OUString aOutURL = aTargetDir + "signing-certificate-attribute.pdf";
bool bHadCertificates = sign(aInURL, aOutURL, 0);
if (!bHadCertificates)
diff --git a/xmlsecurity/qa/unit/xmlsecurity-dialogs-test.cxx b/xmlsecurity/qa/unit/xmlsecurity-dialogs-test.cxx
index 41d77079a76b..b5b16c3a72e4 100644
--- a/xmlsecurity/qa/unit/xmlsecurity-dialogs-test.cxx
+++ b/xmlsecurity/qa/unit/xmlsecurity-dialogs-test.cxx
@@ -51,7 +51,7 @@ VclPtr<VclAbstractDialog> XmlsecurityDialogsTest::createDialogByID(sal_uInt32 /*
void XmlsecurityDialogsTest::openAnyDialog()
{
/// process input file containing the UXMLDescriptions of the dialogs to dump
- processDialogBatchFile("xmlsecurity/qa/unit/data/xmlsecurity-dialogs-test.txt");
+ processDialogBatchFile(u"xmlsecurity/qa/unit/data/xmlsecurity-dialogs-test.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(XmlsecurityDialogsTest);
diff --git a/xmlsecurity/source/helper/documentsignaturehelper.cxx b/xmlsecurity/source/helper/documentsignaturehelper.cxx
index f1c48daa3a0c..5ff74dcd325c 100644
--- a/xmlsecurity/source/helper/documentsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/documentsignaturehelper.cxx
@@ -22,6 +22,7 @@
#include <algorithm>
#include <functional>
+#include <string_view>
#include <com/sun/star/io/IOException.hpp>
#include <com/sun/star/embed/XStorage.hpp>
@@ -82,7 +83,7 @@ int compareVersions(
static void ImplFillElementList(
std::vector< OUString >& rList, const Reference < css::embed::XStorage >& rxStore,
- const OUString& rRootStorageName, const bool bRecursive,
+ std::u16string_view rRootStorageName, const bool bRecursive,
const DocumentSignatureAlgorithm mode)
{
const Sequence< OUString > aElements = rxStore->getElementNames();
@@ -190,14 +191,15 @@ DocumentSignatureHelper::CreateElementList(
if (mode == DocumentSignatureAlgorithm::OOo2) //that is, ODF 1.0, 1.1
{
// 1) Main content
- ImplFillElementList(aElements, rxStore, OUString(), false, mode);
+ ImplFillElementList(aElements, rxStore, std::u16string_view(), false, mode);
// 2) Pictures...
OUString aSubStorageName( "Pictures" );
try
{
Reference < css::embed::XStorage > xSubStore = rxStore->openStorageElement( aSubStorageName, css::embed::ElementModes::READ );
- ImplFillElementList(aElements, xSubStore, aSubStorageName+aSep, true, mode);
+ ImplFillElementList(
+ aElements, xSubStore, OUString(aSubStorageName+aSep), true, mode);
}
catch(css::io::IOException& )
{
@@ -208,7 +210,8 @@ DocumentSignatureHelper::CreateElementList(
try
{
Reference < css::embed::XStorage > xSubStore = rxStore->openStorageElement( aSubStorageName, css::embed::ElementModes::READ );
- ImplFillElementList(aElements, xSubStore, aSubStorageName+aSep, true, mode);
+ ImplFillElementList(
+ aElements, xSubStore, OUString(aSubStorageName+aSep), true, mode);
xSubStore.clear();
// Object folders...
@@ -218,7 +221,8 @@ DocumentSignatureHelper::CreateElementList(
if ( ( rName.match( "Object " ) ) && rxStore->isStorageElement( rName ) )
{
Reference < css::embed::XStorage > xTmpSubStore = rxStore->openStorageElement( rName, css::embed::ElementModes::READ );
- ImplFillElementList(aElements, xTmpSubStore, rName+aSep, true, mode);
+ ImplFillElementList(
+ aElements, xTmpSubStore, OUString(rName+aSep), true, mode);
}
}
}
@@ -230,7 +234,7 @@ DocumentSignatureHelper::CreateElementList(
else
{
// Everything except META-INF
- ImplFillElementList(aElements, rxStore, OUString(), true, mode);
+ ImplFillElementList(aElements, rxStore, std::u16string_view(), true, mode);
}
}
break;
@@ -241,7 +245,8 @@ DocumentSignatureHelper::CreateElementList(
try
{
Reference < css::embed::XStorage > xSubStore = rxStore->openStorageElement( aSubStorageName, css::embed::ElementModes::READ );
- ImplFillElementList(aElements, xSubStore, aSubStorageName+aSep, true, mode);
+ ImplFillElementList(
+ aElements, xSubStore, OUString(aSubStorageName+aSep), true, mode);
}
catch( css::io::IOException& )
{
@@ -253,7 +258,8 @@ DocumentSignatureHelper::CreateElementList(
try
{
Reference < css::embed::XStorage > xSubStore = rxStore->openStorageElement( aSubStorageName, css::embed::ElementModes::READ );
- ImplFillElementList(aElements, xSubStore, aSubStorageName+aSep, true, mode);
+ ImplFillElementList(
+ aElements, xSubStore, OUString(aSubStorageName+aSep), true, mode);
}
catch( css::io::IOException& )
{
@@ -264,7 +270,8 @@ DocumentSignatureHelper::CreateElementList(
try
{
Reference < css::embed::XStorage > xSubStore = rxStore->openStorageElement( aSubStorageName, css::embed::ElementModes::READ );
- ImplFillElementList(aElements, xSubStore, aSubStorageName+aSep, true, mode);
+ ImplFillElementList(
+ aElements, xSubStore, OUString(aSubStorageName+aSep), true, mode);
}
catch( css::io::IOException& )
{
@@ -275,7 +282,7 @@ DocumentSignatureHelper::CreateElementList(
case DocumentSignatureMode::Package:
{
// Everything except META-INF
- ImplFillElementList(aElements, rxStore, OUString(), true, mode);
+ ImplFillElementList(aElements, rxStore, std::u16string_view(), true, mode);
}
break;
}
diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
index 1857e58f94ad..9977da48f72c 100644
--- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
@@ -325,7 +325,7 @@ bool XMLSignatureHelper::ReadAndVerifySignatureStorage(const uno::Reference<embe
uno::Reference<embed::XStorage> xSubStorage = xStorage->openStorageElement("_rels", nOpenMode);
uno::Reference<io::XInputStream> xRelStream(xSubStorage->openStreamElement("origin.sigs.rels", nOpenMode), uno::UNO_QUERY);
- uno::Sequence< uno::Sequence<beans::StringPair> > aRelationsInfo = comphelper::OFOPXMLHelper::ReadRelationsInfoSequence(xRelStream, "origin.sigs.rels", mxCtx);
+ uno::Sequence< uno::Sequence<beans::StringPair> > aRelationsInfo = comphelper::OFOPXMLHelper::ReadRelationsInfoSequence(xRelStream, u"origin.sigs.rels", mxCtx);
for (sal_Int32 i = 0; i < aRelationsInfo.getLength(); ++i)
{
@@ -414,7 +414,7 @@ void XMLSignatureHelper::EnsureSignaturesRelation(const css::uno::Reference<css:
sal_Int32 nOpenMode = embed::ElementModes::READWRITE;
uno::Reference<embed::XStorage> xSubStorage = xStorage->openStorageElement("_rels", nOpenMode);
uno::Reference<io::XInputStream> xRelStream(xSubStorage->openStreamElement(".rels", nOpenMode), uno::UNO_QUERY);
- std::vector< uno::Sequence<beans::StringPair> > aRelationsInfo = comphelper::sequenceToContainer< std::vector< uno::Sequence<beans::StringPair> > >(comphelper::OFOPXMLHelper::ReadRelationsInfoSequence(xRelStream, ".rels", mxCtx));
+ std::vector< uno::Sequence<beans::StringPair> > aRelationsInfo = comphelper::sequenceToContainer< std::vector< uno::Sequence<beans::StringPair> > >(comphelper::OFOPXMLHelper::ReadRelationsInfoSequence(xRelStream, u".rels", mxCtx));
// Do we have a relation already?
bool bHaveRelation = false;