summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--basctl/source/basicide/baside2.cxx2
-rw-r--r--basctl/source/basicide/baside3.cxx2
-rw-r--r--basctl/source/basicide/basides1.cxx10
-rw-r--r--basctl/source/basicide/localizationmgr.cxx2
-rw-r--r--basctl/source/dlged/dlged.cxx4
-rw-r--r--basctl/source/dlged/propbrw.cxx2
-rw-r--r--basegfx/test/SvgPathImportExport.cxx16
-rw-r--r--basegfx/test/boxclipper.cxx2
-rw-r--r--basegfx/test/clipstate.cxx2
-rw-r--r--basic/source/basmgr/basmgr.cxx12
-rw-r--r--basic/source/classes/sbunoobj.cxx6
-rw-r--r--basic/source/runtime/runtime.cxx2
-rw-r--r--basic/source/uno/dlgcont.cxx4
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx2
-rw-r--r--chart2/source/controller/main/ElementSelector.cxx3
-rw-r--r--chart2/source/model/filter/XMLFilter.cxx6
-rw-r--r--chart2/source/model/main/CartesianCoordinateSystem.cxx2
-rw-r--r--chart2/source/model/main/PolarCoordinateSystem.cxx3
-rw-r--r--chart2/source/tools/CachedDataSequence.cxx2
-rw-r--r--chart2/source/tools/ConfigColorScheme.cxx2
-rw-r--r--chart2/source/tools/ErrorBar.cxx2
-rw-r--r--chart2/source/tools/InternalDataProvider.cxx6
-rw-r--r--chart2/source/tools/ReferenceSizeProvider.cxx2
-rw-r--r--chart2/source/tools/Scaling.cxx8
-rw-r--r--chart2/source/tools/UncachedDataSequence.cxx2
-rw-r--r--chart2/source/view/axes/DateScaling.cxx5
-rw-r--r--comphelper/source/misc/numberedcollection.cxx2
-rw-r--r--compilerplugins/clang/stringliteralvar.cxx203
-rw-r--r--compilerplugins/clang/test/stringliteralvar.cxx81
-rw-r--r--configmgr/source/configurationprovider.cxx8
-rw-r--r--connectivity/source/commontools/conncleanup.cxx2
-rw-r--r--connectivity/source/commontools/dbtools2.cxx2
-rw-r--r--connectivity/source/cpool/ZConnectionPool.cxx2
-rw-r--r--connectivity/source/drivers/evoab2/NResultSetMetaData.cxx2
-rw-r--r--connectivity/source/drivers/file/FDatabaseMetaData.cxx2
-rw-r--r--connectivity/source/drivers/firebird/Driver.cxx6
-rw-r--r--connectivity/source/drivers/jdbc/JConnection.cxx3
-rw-r--r--connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx5
-rw-r--r--connectivity/source/parse/sqliterator.cxx2
-rw-r--r--cui/source/customize/acccfg.cxx4
-rw-r--r--cui/source/customize/cfgutil.cxx2
-rw-r--r--cui/source/dialogs/cuigaldlg.cxx2
-rw-r--r--cui/source/dialogs/hlinettp.cxx2
-rw-r--r--cui/source/inc/cfg.hxx8
-rw-r--r--cui/source/options/optasian.cxx4
-rw-r--r--cui/source/options/optgdlg.cxx10
-rw-r--r--cui/source/options/optinet2.cxx16
-rw-r--r--dbaccess/qa/unit/embeddeddb_performancetest.cxx5
-rw-r--r--dbaccess/source/core/api/FilteredContainer.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/datasource.cxx2
-rw-r--r--dbaccess/source/core/misc/DatabaseDataProvider.cxx2
-rw-r--r--dbaccess/source/core/recovery/dbdocrecovery.cxx4
-rw-r--r--dbaccess/source/core/recovery/storagetextstream.cxx2
-rw-r--r--dbaccess/source/core/recovery/subcomponentrecovery.cxx4
-rw-r--r--dbaccess/source/filter/hsqldb/hsqlimport.cxx2
-rw-r--r--dbaccess/source/filter/hsqldb/parseschema.cxx5
-rw-r--r--dbaccess/source/filter/hsqldb/utils.cxx7
-rw-r--r--dbaccess/source/ui/app/AppController.cxx2
-rw-r--r--dbaccess/source/ui/app/AppControllerGen.cxx2
-rw-r--r--dbaccess/source/ui/dlg/queryfilter.cxx4
-rw-r--r--dbaccess/source/ui/misc/indexcollection.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/querycontroller.cxx4
-rw-r--r--desktop/source/app/app.cxx4
-rw-r--r--desktop/source/app/check_ext_deps.cxx2
-rw-r--r--desktop/source/app/cmdlinehelp.cxx8
-rw-r--r--desktop/source/deployment/misc/dp_dependencies.cxx8
-rw-r--r--desktop/source/migration/migration.cxx6
-rw-r--r--editeng/source/misc/svxacorr.cxx6
-rw-r--r--extensions/source/abpilot/admininvokationimpl.cxx2
-rw-r--r--extensions/source/abpilot/fieldmappingimpl.cxx2
-rw-r--r--extensions/source/bibliography/bibconfig.cxx2
-rw-r--r--extensions/source/dbpilots/gridwizard.cxx4
-rw-r--r--extensions/source/dbpilots/optiongrouplayouter.cxx2
-rw-r--r--filter/qa/unit/svg.cxx2
-rw-r--r--filter/qa/unit/textfilterdetect.cxx2
-rw-r--r--filter/source/svg/svgexport.cxx6
-rw-r--r--filter/source/svg/svgfilter.cxx4
-rw-r--r--forms/source/component/DatabaseForm.cxx2
-rw-r--r--forms/source/component/FormattedField.cxx4
-rw-r--r--framework/inc/taskcreatordefs.hxx17
-rw-r--r--framework/qa/cppunit/loadenv.cxx2
-rw-r--r--framework/source/accelerators/acceleratorconfiguration.cxx4
-rw-r--r--framework/source/fwe/xml/menudocumenthandler.cxx12
-rw-r--r--framework/source/fwe/xml/toolboxdocumenthandler.cxx10
-rw-r--r--framework/source/fwi/uielement/constitemcontainer.cxx2
-rw-r--r--framework/source/fwi/uielement/itemcontainer.cxx3
-rw-r--r--framework/source/fwi/uielement/rootitemcontainer.cxx5
-rw-r--r--framework/source/helper/statusindicatorfactory.cxx2
-rw-r--r--framework/source/helper/uiconfigelementwrapperbase.cxx16
-rw-r--r--framework/source/helper/uielementwrapperbase.cxx6
-rw-r--r--framework/source/inc/accelerators/acceleratorconfiguration.hxx6
-rw-r--r--framework/source/layoutmanager/layoutmanager.cxx2
-rw-r--r--framework/source/loadenv/loadenv.cxx4
-rw-r--r--framework/source/services/autorecovery.cxx52
-rw-r--r--framework/source/uiconfiguration/imagemanagerimpl.cxx4
-rw-r--r--framework/source/uielement/recentfilesmenucontroller.cxx6
-rw-r--r--framework/source/uielement/toolbarsmenucontroller.cxx4
-rw-r--r--framework/source/uielement/uicommanddescription.cxx2
-rw-r--r--i18npool/source/collator/chaptercollator.cxx2
-rw-r--r--i18npool/source/collator/collator_unicode.cxx2
-rw-r--r--i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx2
-rw-r--r--i18npool/source/indexentry/indexentrysupplier_ja_phonetic.cxx4
-rw-r--r--i18npool/source/nativenumber/nativenumbersupplier.cxx2
-rw-r--r--i18npool/source/ordinalsuffix/ordinalsuffix.cxx2
-rw-r--r--include/editeng/itemtype.hxx2
-rw-r--r--include/vcl/filter/PDFiumLibrary.hxx10
-rw-r--r--lotuswordpro/qa/cppunit/import_test.cxx2
-rw-r--r--lotuswordpro/source/filter/lwpsilverbullet.cxx6
-rw-r--r--oox/qa/unit/drawingml.cxx2
-rw-r--r--oox/qa/unit/mathml.cxx2
-rw-r--r--oox/qa/unit/shape.cxx2
-rw-r--r--oox/qa/unit/vml.cxx2
-rw-r--r--oox/source/ole/oleobjecthelper.cxx2
-rw-r--r--reportdesign/source/core/api/ReportDefinition.cxx2
-rw-r--r--reportdesign/source/core/api/ReportEngineJFree.cxx2
-rw-r--r--reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx2
-rw-r--r--reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx2
-rw-r--r--reportdesign/source/filter/xml/xmlfilter.cxx8
-rw-r--r--sal/qa/rtl/uri/rtl_testuri.cxx18
-rw-r--r--sc/qa/unit/helper/shared_test_impl.hxx4
-rw-r--r--sc/qa/unit/tiledrendering/tiledrendering.cxx2
-rw-r--r--sc/qa/unit/uicalc/uicalc.cxx2
-rw-r--r--sc/source/core/tool/autoform.cxx2
-rw-r--r--sc/source/ui/docshell/docsh.cxx14
-rw-r--r--sc/source/ui/docshell/impex.cxx2
-rw-r--r--sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx4
-rw-r--r--sc/source/ui/vba/vbaborders.cxx2
-rw-r--r--sc/source/ui/vba/vbainterior.cxx6
-rw-r--r--sc/source/ui/vba/vbarange.cxx6
-rw-r--r--sc/source/ui/vba/vbastyle.cxx2
-rw-r--r--scripting/source/dlgprov/dlgprov.cxx2
-rw-r--r--sd/qa/filter/eppt/eppt.cxx2
-rw-r--r--sd/qa/unit/tiledrendering/LOKitSearchTest.cxx2
-rw-r--r--sd/qa/unit/tiledrendering/tiledrendering.cxx2
-rw-r--r--sd/source/filter/html/htmlex.cxx4
-rw-r--r--sd/source/ui/framework/factories/PresentationFactory.cxx2
-rw-r--r--sd/source/ui/inc/unokywds.hxx99
-rw-r--r--sd/source/ui/sidebar/MasterPagesSelector.cxx2
-rw-r--r--sd/source/ui/tools/EventMultiplexer.cxx4
-rw-r--r--sd/source/ui/unoidl/DrawController.cxx2
-rw-r--r--sd/source/ui/unoidl/unopage.cxx2
-rw-r--r--sdext/source/pdfimport/test/tests.cxx7
-rw-r--r--sfx2/qa/cppunit/view.cxx2
-rw-r--r--sfx2/source/control/emojicontrol.cxx18
-rw-r--r--sfx2/source/dialog/backingwindow.cxx2
-rw-r--r--sfx2/source/doc/DocumentMetadataAccess.cxx6
-rw-r--r--sfx2/source/doc/SfxDocumentMetaData.cxx10
-rw-r--r--sfx2/source/doc/docfac.cxx3
-rw-r--r--sfx2/source/doc/guisaveas.cxx6
-rw-r--r--sfx2/source/doc/templatedlg.cxx8
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx2
-rw-r--r--solenv/CompilerTest_compilerplugins_clang.mk1
-rw-r--r--starmath/source/mathmlexport.cxx4
-rw-r--r--stoc/source/security/access_controller.cxx2
-rw-r--r--svgio/source/svgreader/svgtoken.cxx4
-rw-r--r--svl/source/numbers/zformat.cxx2
-rw-r--r--svtools/source/config/fontsubstconfig.cxx12
-rw-r--r--svtools/source/misc/sampletext.cxx4
-rw-r--r--svtools/source/uno/toolboxcontroller.cxx2
-rw-r--r--svtools/source/uno/unoevent.cxx8
-rw-r--r--svx/qa/unit/unodraw.cxx2
-rw-r--r--svx/source/accessibility/AccessibleShape.cxx4
-rw-r--r--svx/source/fmcomp/fmgridcl.cxx2
-rw-r--r--svx/source/fmcomp/gridcell.cxx4
-rw-r--r--svx/source/form/fmobj.cxx2
-rw-r--r--svx/source/form/fmundo.cxx2
-rw-r--r--svx/source/form/formcontroller.cxx2
-rw-r--r--svx/source/gallery2/gallery1.cxx4
-rw-r--r--svx/source/sidebar/area/AreaPropertyPanelBase.cxx2
-rw-r--r--svx/source/sidebar/line/LinePropertyPanelBase.cxx2
-rw-r--r--svx/source/sidebar/possize/PosSizePropertyPanel.cxx2
-rw-r--r--svx/source/svdraw/svdoole2.cxx2
-rw-r--r--svx/source/tbxctrls/extrusioncontrols.cxx10
-rw-r--r--svx/source/tbxctrls/tbunosearchcontrollers.cxx12
-rw-r--r--svx/source/toolbars/extrusionbar.cxx20
-rw-r--r--svx/source/toolbars/fontworkbar.cxx2
-rw-r--r--svx/source/unodraw/unoshape.cxx86
-rw-r--r--sw/qa/core/crsr/crsr.cxx2
-rw-r--r--sw/qa/core/doc/doc.cxx2
-rw-r--r--sw/qa/core/docnode/docnode.cxx2
-rw-r--r--sw/qa/core/draw/draw.cxx2
-rw-r--r--sw/qa/core/frmedt/frmedt.cxx2
-rw-r--r--sw/qa/core/layout/layout.cxx2
-rw-r--r--sw/qa/core/objectpositioning/objectpositioning.cxx2
-rw-r--r--sw/qa/core/text/text.cxx2
-rw-r--r--sw/qa/core/txtnode/txtnode.cxx2
-rw-r--r--sw/qa/core/undo/undo.cxx2
-rw-r--r--sw/qa/core/unocore/unocore.cxx2
-rw-r--r--sw/qa/core/uwriter.cxx2
-rw-r--r--sw/qa/extras/htmlexport/htmlexport.cxx2
-rw-r--r--sw/qa/extras/htmlimport/htmlimport.cxx2
-rw-r--r--sw/qa/extras/layout/layout.cxx2
-rw-r--r--sw/qa/extras/layout/layout2.cxx2
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport14.cxx2
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport15.cxx2
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport16.cxx2
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport9.cxx2
-rw-r--r--sw/qa/extras/tiledrendering/tiledrendering.cxx2
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx2
-rw-r--r--sw/qa/extras/uiwriter/uiwriter2.cxx5
-rw-r--r--sw/qa/extras/uiwriter/uiwriter3.cxx2
-rw-r--r--sw/qa/extras/unowriter/unowriter.cxx2
-rw-r--r--sw/qa/extras/ww8export/ww8export.cxx2
-rw-r--r--sw/qa/uibase/frmdlg/frmdlg.cxx2
-rw-r--r--sw/qa/uibase/shells/shells.cxx2
-rw-r--r--sw/qa/uibase/uiview/uiview.cxx2
-rw-r--r--sw/qa/uibase/uno/uno.cxx2
-rw-r--r--sw/source/core/access/acccell.cxx2
-rw-r--r--sw/source/core/access/acccontext.hxx2
-rw-r--r--sw/source/core/access/accdoc.cxx4
-rw-r--r--sw/source/core/access/accembedded.cxx2
-rw-r--r--sw/source/core/access/accfootnote.cxx6
-rw-r--r--sw/source/core/access/accheaderfooter.cxx6
-rw-r--r--sw/source/core/access/accpage.cxx2
-rw-r--r--sw/source/core/access/accpara.cxx4
-rw-r--r--sw/source/core/access/accpreview.cxx3
-rw-r--r--sw/source/core/access/acctable.cxx3
-rw-r--r--sw/source/core/crsr/crossrefbookmark.cxx2
-rw-r--r--sw/source/core/swg/SwXMLTextBlocks1.cxx2
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx8
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx4
-rw-r--r--sw/source/filter/ww8/ww8glsy.cxx3
-rw-r--r--sw/source/filter/ww8/ww8par.cxx4
-rw-r--r--sw/source/filter/ww8/ww8scan.hxx16
-rw-r--r--sw/source/filter/ww8/ww8struc.hxx4
-rw-r--r--sw/source/filter/xml/XMLRedlineImportHelper.cxx6
-rw-r--r--sw/source/ui/vba/vbalisthelper.cxx12
-rw-r--r--sw/source/uibase/app/applab.cxx2
-rw-r--r--sw/source/uibase/dbui/mmconfigitem.cxx2
-rw-r--r--sw/source/uibase/utlui/unotools.cxx2
-rw-r--r--testtools/source/bridgetest/currentcontextchecker.cxx4
-rw-r--r--toolkit/source/controls/stdtabcontroller.cxx2
-rw-r--r--toolkit/source/controls/tabpagemodel.cxx2
-rw-r--r--toolkit/source/helper/formpdfexport.cxx28
-rw-r--r--unotools/qa/unit/testGetEnglishSearchName.cxx11
-rw-r--r--unotools/source/config/historyoptions.cxx14
-rw-r--r--unotools/source/config/lingucfg.cxx2
-rw-r--r--unotools/source/config/saveopt.cxx2
-rw-r--r--vbahelper/source/vbahelper/vbacommandbarhelper.hxx10
-rw-r--r--vbahelper/source/vbahelper/vbahelper.cxx8
-rw-r--r--vcl/qa/cppunit/GraphicTest.cxx4
-rw-r--r--vcl/qa/cppunit/PDFDocumentTest.cxx2
-rw-r--r--vcl/qa/cppunit/TypeSerializerTest.cxx2
-rw-r--r--vcl/qa/cppunit/filter/igif/igif.cxx2
-rw-r--r--vcl/qa/cppunit/filter/ipdf/ipdf.cxx2
-rw-r--r--vcl/qa/cppunit/pdfexport/pdfexport.cxx2
-rw-r--r--vcl/source/gdi/gdimtf.cxx2
-rw-r--r--writerfilter/qa/cppunittests/dmapper/CellColorHandler.cxx2
-rw-r--r--writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx2
-rw-r--r--writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx2
-rw-r--r--writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx2
-rw-r--r--writerfilter/qa/cppunittests/dmapper/GraphicImport.cxx2
-rw-r--r--writerfilter/qa/cppunittests/dmapper/PropertyMap.cxx2
-rw-r--r--writerfilter/qa/cppunittests/dmapper/TextEffectsHandler.cxx2
-rw-r--r--writerfilter/qa/cppunittests/rtftok/rtfsdrimport.cxx2
-rw-r--r--writerfilter/qa/cppunittests/rtftok/rtfsprm.cxx2
-rw-r--r--writerfilter/source/dmapper/FormControlHelper.cxx2
-rw-r--r--writerfilter/source/dmapper/TextEffectsHandler.cxx2
-rw-r--r--writerperfect/qa/unit/DirectoryStreamTest.cxx6
-rw-r--r--writerperfect/qa/unit/EPUBExportTest.cxx2
-rw-r--r--writerperfect/qa/unit/WPXSvStreamTest.cxx4
-rw-r--r--xmloff/qa/unit/draw.cxx2
-rw-r--r--xmloff/qa/unit/style.cxx2
-rw-r--r--xmloff/qa/unit/text.cxx2
-rw-r--r--xmloff/source/chart/SchXMLTableContext.cxx2
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx18
-rw-r--r--xmloff/source/forms/elementimport.cxx2
-rw-r--r--xmloff/source/meta/xmlversion.cxx2
-rw-r--r--xmloff/source/text/XMLTextFrameContext.cxx8
-rw-r--r--xmloff/source/text/XMLTextListBlockContext.cxx2
-rw-r--r--xmloff/source/text/XMLTextMarkImportContext.cxx2
-rw-r--r--xmloff/source/text/txtfldi.cxx57
-rw-r--r--xmloff/source/text/txtimp.cxx32
-rw-r--r--xmloff/source/text/txtvfldi.cxx22
-rw-r--r--xmlscript/source/xmllib_imexp/xmllib_export.cxx4
-rw-r--r--xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx2
-rw-r--r--xmlsecurity/qa/unit/signing/signing.cxx2
-rw-r--r--xmlsecurity/qa/unit/signing/signing2.cxx2
279 files changed, 1018 insertions, 707 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 41c0ff4413f3..95768b0cfe54 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -93,7 +93,7 @@ short const ValidWindow = 0x1234;
#if defined(OW) || defined(MTF)
char const FilterMask_All[] = "*";
#else
-char const FilterMask_All[] = "*.*";
+OUStringLiteral const FilterMask_All = u"*.*";
#endif
} // end anonymous namespace
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index 063828689a0f..32dfa80c2baf 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -71,7 +71,7 @@ using namespace ::com::sun::star::ui::dialogs;
#ifdef _WIN32
char const FilterMask_All[] = "*.*";
#else
-char const FilterMask_All[] = "*";
+OUStringLiteral const FilterMask_All = u"*";
#endif
DialogWindow::DialogWindow(DialogWindowLayout* pParent, ScriptDocument const& rDocument,
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index d49060c0719d..7d931a70bad4 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -1209,10 +1209,12 @@ void Shell::SetCurWindow( BaseWindow* pNewWin, bool bUpdateTabBar, bool bRemembe
void Shell::ManageToolbars()
{
- static const char aMacroBarResName[] = "private:resource/toolbar/macrobar";
- static const char aDialogBarResName[] = "private:resource/toolbar/dialogbar";
- static const char aInsertControlsBarResName[] = "private:resource/toolbar/insertcontrolsbar";
- static const char aFormControlsBarResName[] = "private:resource/toolbar/formcontrolsbar";
+ static const OUStringLiteral aMacroBarResName = u"private:resource/toolbar/macrobar";
+ static const OUStringLiteral aDialogBarResName = u"private:resource/toolbar/dialogbar";
+ static const OUStringLiteral aInsertControlsBarResName
+ = u"private:resource/toolbar/insertcontrolsbar";
+ static const OUStringLiteral aFormControlsBarResName
+ = u"private:resource/toolbar/formcontrolsbar";
if( !pCurWin )
return;
diff --git a/basctl/source/basicide/localizationmgr.cxx b/basctl/source/basicide/localizationmgr.cxx
index 45c6239bc5c7..1e31f8a47d0f 100644
--- a/basctl/source/basicide/localizationmgr.cxx
+++ b/basctl/source/basicide/localizationmgr.cxx
@@ -74,7 +74,7 @@ bool LocalizationMgr::isLibraryLocalized ()
void LocalizationMgr::handleTranslationbar ()
{
- static const char aToolBarResName[] = "private:resource/toolbar/translationbar";
+ static const OUStringLiteral aToolBarResName = u"private:resource/toolbar/translationbar";
Reference< beans::XPropertySet > xFrameProps
( m_pShell->GetViewFrame()->GetFrame().GetFrameInterface(), uno::UNO_QUERY );
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 533e2381f3e7..ced23c5474bc 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -57,8 +57,8 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::io;
-const char aResourceResolverPropName[] = "ResourceResolver";
-const char aDecorationPropName[] = "Decoration";
+const OUStringLiteral aResourceResolverPropName = u"ResourceResolver";
+const OUStringLiteral aDecorationPropName = u"Decoration";
// DlgEdHint
diff --git a/basctl/source/dlged/propbrw.cxx b/basctl/source/dlged/propbrw.cxx
index 5ddf9ec154b1..73e90e2827ac 100644
--- a/basctl/source/dlged/propbrw.cxx
+++ b/basctl/source/dlged/propbrw.cxx
@@ -141,7 +141,7 @@ void PropBrw::ImplReCreateController()
// create a property browser controller
Reference< XMultiComponentFactory > xFactory( xInspectorContext->getServiceManager(), UNO_SET_THROW );
- static const char16_t s_sControllerServiceName[] = u"com.sun.star.awt.PropertyBrowserController";
+ static const OUStringLiteral s_sControllerServiceName = u"com.sun.star.awt.PropertyBrowserController";
m_xBrowserController.set( xFactory->createInstanceWithContext( s_sControllerServiceName, xInspectorContext ), UNO_QUERY );
if ( !m_xBrowserController.is() )
{
diff --git a/basegfx/test/SvgPathImportExport.cxx b/basegfx/test/SvgPathImportExport.cxx
index 59f87e735815..7fa0468e7042 100644
--- a/basegfx/test/SvgPathImportExport.cxx
+++ b/basegfx/test/SvgPathImportExport.cxx
@@ -116,7 +116,7 @@ public:
CPPUNIT_ASSERT_MESSAGE("importing simple rectangle from SVG-D",
utils::importFromSvgD( aPoly, aPath0, false, nullptr ));
aExport = utils::exportToSvgD( aPoly, true, true, false );
- const char sExportString[] = "m10 10h-20v-20h20z";
+ static const OUStringLiteral sExportString = u"m10 10h-20v-20h20z";
CPPUNIT_ASSERT_EQUAL_MESSAGE("exporting rectangle to SVG-D",
OUString(sExportString), aExport );
CPPUNIT_ASSERT_MESSAGE("importing simple rectangle from SVG-D (round-trip",
@@ -143,8 +143,8 @@ public:
// so for correct unit test i add the new exported string here as sExportStringSimpleBezier
// and compare to it.
- const char sExportStringSimpleBezier[] =
- "m11430 0c-8890 3810 5715 6985 5715 6985"
+ static const OUStringLiteral sExportStringSimpleBezier =
+ u"m11430 0c-8890 3810 5715 6985 5715 6985"
"l-17145-1905c0 0 22860-10160 16510 6350"
"s-3810-11430-3810-11430z";
CPPUNIT_ASSERT_EQUAL_MESSAGE("exporting bezier polygon to SVG-D", OUString(sExportStringSimpleBezier), aExport);
@@ -164,8 +164,8 @@ public:
// same here, the corrected export with the corrected B2DPolygon is simply more efficient,
// so i needed to change the compare string. Also adding the re-import comparison below.
- const char sExportString1[] =
- "m1917 1114c-89-189-233-284-430-284-167 0-306 91-419 273s-170 370-17"
+ static const OUStringLiteral sExportString1 =
+ u"m1917 1114c-89-189-233-284-430-284-167 0-306 91-419 273s-170 370-17"
"0 564c0 145 33 259 98 342 65 84 150 126 257 126q115.5 0 231-57s147-97 210-176 99-143 109-190c38-199 76-398 114"
"-598zm840 1646c-133 73-312 139-537 197-225 57-440 86-644 87-483-1-866-132-1150-392-284-261-426-619-426-1076 0-"
"292 67-560 200-803s321-433 562-569 514-204 821-204c405 0 739 125 1003 374 264 250 396 550 396 899 0 313-88 576"
@@ -187,8 +187,8 @@ public:
CPPUNIT_ASSERT_MESSAGE("importing complex polygon from SVG-D",
utils::importFromSvgD( aPoly, aPath3, false, nullptr ));
aExport = utils::exportToSvgD( aPoly, true, true, false );
- const char sExportString2[] =
- "m1598 125h306v2334h-306v-1105h-1293v1105h-305v-2334h305v973h1293"
+ static const OUStringLiteral sExportString2 =
+ u"m1598 125h306v2334h-306v-1105h-1293v1105h-305v-2334h305v973h1293"
"zm2159 1015 78-44 85 235-91 47-91 40-90 34-90 29-89 21-88 16-88 10-88 3-102-4-97"
"-12-91-19-85-26-40-16-39-18-38-20-36-22-34-24-33-26-32-27-30-30-29-31-27-33-25-3"
"3-23-36-21-36-19-38-18-40-16-40-26-86-18-91-11-97-4-103 3-98 11-94 17-89 24-84 3"
@@ -220,7 +220,7 @@ public:
utils::createPolygonFromRect( B2DRange(0.0,0.0,4000.0,4000.0) ));
aExport = utils::exportToSvgD( B2DPolyPolygon(aRect), false, false, false );
- const char sExportStringRect[] = "M0 0H4000V4000H0Z";
+ static const OUStringLiteral sExportStringRect = u"M0 0H4000V4000H0Z";
CPPUNIT_ASSERT_EQUAL_MESSAGE("exporting to rectangle svg-d string",
OUString(sExportStringRect), aExport);
}
diff --git a/basegfx/test/boxclipper.cxx b/basegfx/test/boxclipper.cxx
index 47d3584df06e..cca5cabf3766 100644
--- a/basegfx/test/boxclipper.cxx
+++ b/basegfx/test/boxclipper.cxx
@@ -155,7 +155,7 @@ public:
aRandomIntersections.appendElement( aRandomRange, B2VectorOrientation::Negative );
}
#else
- const char randomSvg[]="m394 783h404v57h-404zm-197-505h571v576h-571zm356-634h75v200h-75zm-40-113h403v588h-403zm93-811h111v494h-111zm-364-619h562v121h-562zm-134-8h292v27h-292zm110 356h621v486h-621zm78-386h228v25h-228zm475-345h201v201h-201zm-2-93h122v126h-122zm-417-243h567v524h-567zm-266-738h863v456h-863zm262-333h315v698h-315zm-328-826h43v393h-43zm830-219h120v664h-120zm-311-636h221v109h-221zm-500 137h628v19h-628zm681-94h211v493h-211zm-366-646h384v355h-384zm-189-199h715v247h-715zm165-459h563v601h-563zm258-479h98v606h-98zm270-517h65v218h-65zm-44-259h96v286h-96zm-599-202h705v468h-705zm216-803h450v494h-450zm-150-22h26v167h-26zm-55-599h50v260h-50zm190-278h490v387h-490zm-290-453h634v392h-634zm257 189h552v300h-552zm-151-690h136v455h-136zm12-597h488v432h-488zm501-459h48v39h-48zm-224-112h429v22h-429zm-281 102h492v621h-492zm519-158h208v17h-208zm-681-563h56v427h-56zm126-451h615v392h-615zm-47-410h598v522h-598zm-32 316h79v110h-79zm-71-129h18v127h-18zm126-993h743v589h-743zm211-430h428v750h-428zm61-554h100v220h-100zm-353-49h658v157h-658zm778-383h115v272h-115zm-249-541h119v712h-119zm203 86h94v40h-94z";
+ static const OUStringLiteral randomSvg=u"m394 783h404v57h-404zm-197-505h571v576h-571zm356-634h75v200h-75zm-40-113h403v588h-403zm93-811h111v494h-111zm-364-619h562v121h-562zm-134-8h292v27h-292zm110 356h621v486h-621zm78-386h228v25h-228zm475-345h201v201h-201zm-2-93h122v126h-122zm-417-243h567v524h-567zm-266-738h863v456h-863zm262-333h315v698h-315zm-328-826h43v393h-43zm830-219h120v664h-120zm-311-636h221v109h-221zm-500 137h628v19h-628zm681-94h211v493h-211zm-366-646h384v355h-384zm-189-199h715v247h-715zm165-459h563v601h-563zm258-479h98v606h-98zm270-517h65v218h-65zm-44-259h96v286h-96zm-599-202h705v468h-705zm216-803h450v494h-450zm-150-22h26v167h-26zm-55-599h50v260h-50zm190-278h490v387h-490zm-290-453h634v392h-634zm257 189h552v300h-552zm-151-690h136v455h-136zm12-597h488v432h-488zm501-459h48v39h-48zm-224-112h429v22h-429zm-281 102h492v621h-492zm519-158h208v17h-208zm-681-563h56v427h-56zm126-451h615v392h-615zm-47-410h598v522h-598zm-32 316h79v110h-79zm-71-129h18v127h-18zm126-993h743v589h-743zm211-430h428v750h-428zm61-554h100v220h-100zm-353-49h658v157h-658zm778-383h115v272h-115zm-249-541h119v712h-119zm203 86h94v40h-94z";
B2DPolyPolygon randomPoly;
CPPUNIT_ASSERT(utils::importFromSvgD(randomPoly, randomSvg, false, nullptr));
for (auto const& aPolygon : randomPoly)
diff --git a/basegfx/test/clipstate.cxx b/basegfx/test/clipstate.cxx
index 44e64b8c23d8..94c0246d8312 100644
--- a/basegfx/test/clipstate.cxx
+++ b/basegfx/test/clipstate.cxx
@@ -127,7 +127,7 @@ public:
{
utils::B2DClipState aMixedClip;
- const char unionSvg[]="m100 10v90h-90v10h-20v-10h-90v-90h-10v-20h10v-90h90v-10h20v10h90v90h10v20z";
+ static const OUStringLiteral unionSvg=u"m100 10v90h-90v10h-20v-10h-90v-90h-10v-20h10v-90h90v-10h20v10h90v90h10v20z";
B2DPolyPolygon aTmp1;
CPPUNIT_ASSERT(utils::importFromSvgD(aTmp1, unionSvg, false, nullptr));
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 77f5939cd9d0..a3cf5b9e3ccf 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -84,12 +84,12 @@ typedef WeakImplHelper< script::XStarBasicAccess > StarBasicAccessHelper;
// Version 2
// + bool bReference
-const char szStdLibName[] = "Standard";
-const char szBasicStorage[] = "StarBASIC";
-const char szOldManagerStream[] = "BasicManager";
-const char szManagerStream[] = "BasicManager2";
-const char szImbedded[] = "LIBIMBEDDED";
-const char szCryptingKey[] = "CryptedBasic";
+const OUStringLiteral szStdLibName = u"Standard";
+const OUStringLiteral szBasicStorage = u"StarBASIC";
+const OUStringLiteral szOldManagerStream = u"BasicManager";
+const OUStringLiteral szManagerStream = u"BasicManager2";
+const OUStringLiteral szImbedded = u"LIBIMBEDDED";
+const OStringLiteral szCryptingKey = "CryptedBasic";
const StreamMode eStreamReadMode = StreamMode::READ | StreamMode::NOCREATE | StreamMode::SHARE_DENYALL;
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 3816d351302c..82ffb8c11699 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -99,9 +99,9 @@ using namespace cppu;
// Identifiers for creating the strings for dbg_Properties
-char16_t constexpr ID_DBG_SUPPORTEDINTERFACES[] = u"Dbg_SupportedInterfaces";
-char const ID_DBG_PROPERTIES[] = "Dbg_Properties";
-char const ID_DBG_METHODS[] = "Dbg_Methods";
+OUStringLiteral constexpr ID_DBG_SUPPORTEDINTERFACES = u"Dbg_SupportedInterfaces";
+OUStringLiteral const ID_DBG_PROPERTIES = u"Dbg_Properties";
+OUStringLiteral const ID_DBG_METHODS = u"Dbg_Methods";
char const aSeqLevelStr[] = "[]";
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 5a64166b63a1..3ceaf38cafc7 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -1786,7 +1786,7 @@ void removeDimAsNewRecoverItem( SbxVariable* pVar )
// saving object variable
// not-object variables will cause errors
-const char pCollectionStr[] = "Collection";
+const OUStringLiteral pCollectionStr = u"Collection";
void SbiRuntime::StepSET_Impl( SbxVariableRef& refVal, SbxVariableRef& refVar, bool bHandleDefaultProp )
{
diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx
index b303349fa009..a8e124616910 100644
--- a/basic/source/uno/dlgcont.cxx
+++ b/basic/source/uno/dlgcont.cxx
@@ -342,8 +342,8 @@ SfxLibraryContainer* SfxDialogLibraryContainer::createInstanceImpl()
return new SfxDialogLibraryContainer();
}
-const char aResourceFileNameBase[] = "DialogStrings";
-const char aResourceFileCommentBase[] = "# Strings for Dialog Library ";
+const OUStringLiteral aResourceFileNameBase = u"DialogStrings";
+const OUStringLiteral aResourceFileCommentBase = u"# Strings for Dialog Library ";
// Resource handling
Reference< css::resource::XStringResourcePersistence >
diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx
index 373fec6c8344..3b48c7907a4c 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx
@@ -60,7 +60,7 @@ WrappedScaleTextProperty::WrappedScaleTextProperty(const std::shared_ptr<Chart2M
void WrappedScaleTextProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
{
- static const char aRefSizeName[] = "ReferencePageSize";
+ static const OUStringLiteral aRefSizeName = u"ReferencePageSize";
if( !xInnerPropertySet.is() )
return;
diff --git a/chart2/source/controller/main/ElementSelector.cxx b/chart2/source/controller/main/ElementSelector.cxx
index 2fa6fa360616..91e299d4906d 100644
--- a/chart2/source/controller/main/ElementSelector.cxx
+++ b/chart2/source/controller/main/ElementSelector.cxx
@@ -48,7 +48,8 @@ using ::com::sun::star::uno::Sequence;
namespace
{
-const char lcl_aServiceName[] = "com.sun.star.comp.chart.ElementSelectorToolbarController";
+const OUStringLiteral lcl_aServiceName
+ = u"com.sun.star.comp.chart.ElementSelectorToolbarController";
}
SelectorListBox::SelectorListBox(vcl::Window* pParent)
diff --git a/chart2/source/model/filter/XMLFilter.cxx b/chart2/source/model/filter/XMLFilter.cxx
index ec1bf1f8b3a3..96b66e95e338 100644
--- a/chart2/source/model/filter/XMLFilter.cxx
+++ b/chart2/source/model/filter/XMLFilter.cxx
@@ -58,9 +58,9 @@ using ::osl::MutexGuard;
namespace
{
-char const sXML_metaStreamName[] = "meta.xml";
-char const sXML_styleStreamName[] = "styles.xml";
-char const sXML_contentStreamName[] = "content.xml";
+OUStringLiteral const sXML_metaStreamName = u"meta.xml";
+OUStringLiteral const sXML_styleStreamName = u"styles.xml";
+OUStringLiteral const sXML_contentStreamName = u"content.xml";
uno::Reference< embed::XStorage > lcl_getWriteStorage(
diff --git a/chart2/source/model/main/CartesianCoordinateSystem.cxx b/chart2/source/model/main/CartesianCoordinateSystem.cxx
index dd0f77b40e58..f8cc8f17ad88 100644
--- a/chart2/source/model/main/CartesianCoordinateSystem.cxx
+++ b/chart2/source/model/main/CartesianCoordinateSystem.cxx
@@ -31,7 +31,7 @@ namespace com::sun::star::uno { class XComponentContext; }
namespace
{
-const char CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME[] = "com.sun.star.chart2.CoordinateSystems.Cartesian";
+const OUStringLiteral CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME = u"com.sun.star.chart2.CoordinateSystems.Cartesian";
}
diff --git a/chart2/source/model/main/PolarCoordinateSystem.cxx b/chart2/source/model/main/PolarCoordinateSystem.cxx
index 5ec3252ae582..2d2497bc23c9 100644
--- a/chart2/source/model/main/PolarCoordinateSystem.cxx
+++ b/chart2/source/model/main/PolarCoordinateSystem.cxx
@@ -31,7 +31,8 @@ using ::com::sun::star::uno::Sequence;
namespace
{
-const char CHART2_COOSYSTEM_POLAR_SERVICE_NAME[] = "com.sun.star.chart2.CoordinateSystems.Polar";
+const OUStringLiteral CHART2_COOSYSTEM_POLAR_SERVICE_NAME
+ = u"com.sun.star.chart2.CoordinateSystems.Polar";
}
diff --git a/chart2/source/tools/CachedDataSequence.cxx b/chart2/source/tools/CachedDataSequence.cxx
index 4eaf5d8f2743..dc44985589cc 100644
--- a/chart2/source/tools/CachedDataSequence.cxx
+++ b/chart2/source/tools/CachedDataSequence.cxx
@@ -42,7 +42,7 @@ using ::chart::impl::CachedDataSequence_Base;
namespace
{
-const char lcl_aServiceName[] = "com.sun.star.comp.chart.CachedDataSequence";
+const OUStringLiteral lcl_aServiceName = u"com.sun.star.comp.chart.CachedDataSequence";
enum
{
diff --git a/chart2/source/tools/ConfigColorScheme.cxx b/chart2/source/tools/ConfigColorScheme.cxx
index 5645fb22b68f..2aaf672800ac 100644
--- a/chart2/source/tools/ConfigColorScheme.cxx
+++ b/chart2/source/tools/ConfigColorScheme.cxx
@@ -34,7 +34,7 @@ using ::com::sun::star::uno::Sequence;
namespace
{
-const char aSeriesPropName[] = "Series";
+const OUStringLiteral aSeriesPropName = u"Series";
} // anonymous namespace
diff --git a/chart2/source/tools/ErrorBar.cxx b/chart2/source/tools/ErrorBar.cxx
index 91d6c003a067..6dd803093365 100644
--- a/chart2/source/tools/ErrorBar.cxx
+++ b/chart2/source/tools/ErrorBar.cxx
@@ -41,7 +41,7 @@ using namespace ::com::sun::star;
namespace
{
-const char lcl_aServiceName[] = "com.sun.star.comp.chart2.ErrorBar";
+const OUStringLiteral lcl_aServiceName = u"com.sun.star.comp.chart2.ErrorBar";
bool lcl_isInternalData( const uno::Reference< chart2::data::XLabeledDataSequence > & xLSeq )
{
diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx
index 94481ce9e5f8..abc3aea59d8f 100644
--- a/chart2/source/tools/InternalDataProvider.cxx
+++ b/chart2/source/tools/InternalDataProvider.cxx
@@ -57,12 +57,12 @@ namespace chart
namespace
{
-const char lcl_aCategoriesRangeName[] = "categories";
+const OUStringLiteral lcl_aCategoriesRangeName = u"categories";
const char lcl_aCategoriesLevelRangeNamePrefix[] = "categoriesL "; //L <-> level
const char lcl_aCategoriesPointRangeNamePrefix[] = "categoriesP "; //P <-> point
-const char lcl_aCategoriesRoleName[] = "categories";
+const OUStringLiteral lcl_aCategoriesRoleName = u"categories";
const char lcl_aLabelRangePrefix[] = "label ";
-const char lcl_aCompleteRange[] = "all";
+const OUStringLiteral lcl_aCompleteRange = u"all";
typedef std::multimap< OUString, uno::WeakReference< chart2::data::XDataSequence > >
lcl_tSequenceMap;
diff --git a/chart2/source/tools/ReferenceSizeProvider.cxx b/chart2/source/tools/ReferenceSizeProvider.cxx
index 44109500552a..8e254903929e 100644
--- a/chart2/source/tools/ReferenceSizeProvider.cxx
+++ b/chart2/source/tools/ReferenceSizeProvider.cxx
@@ -131,7 +131,7 @@ void ReferenceSizeProvider::setValuesAtPropertySet(
if( ! xProp.is())
return;
- static const char aRefSizeName[] = "ReferencePageSize";
+ static const OUStringLiteral aRefSizeName = u"ReferencePageSize";
try
{
diff --git a/chart2/source/tools/Scaling.cxx b/chart2/source/tools/Scaling.cxx
index 27a9c51a7a44..212eadba54ee 100644
--- a/chart2/source/tools/Scaling.cxx
+++ b/chart2/source/tools/Scaling.cxx
@@ -27,10 +27,10 @@ namespace com::sun::star::uno { class XComponentContext; }
namespace
{
-const char lcl_aServiceName_Logarithmic[] = "com.sun.star.chart2.LogarithmicScaling";
-const char lcl_aServiceName_Exponential[] = "com.sun.star.chart2.ExponentialScaling";
-const char lcl_aServiceName_Linear[] = "com.sun.star.chart2.LinearScaling";
-const char lcl_aServiceName_Power[] = "com.sun.star.chart2.PowerScaling";
+const OUStringLiteral lcl_aServiceName_Logarithmic = u"com.sun.star.chart2.LogarithmicScaling";
+const OUStringLiteral lcl_aServiceName_Exponential = u"com.sun.star.chart2.ExponentialScaling";
+const OUStringLiteral lcl_aServiceName_Linear = u"com.sun.star.chart2.LinearScaling";
+const OUStringLiteral lcl_aServiceName_Power = u"com.sun.star.chart2.PowerScaling";
}
diff --git a/chart2/source/tools/UncachedDataSequence.cxx b/chart2/source/tools/UncachedDataSequence.cxx
index 8851988b6d85..bdffa24a458d 100644
--- a/chart2/source/tools/UncachedDataSequence.cxx
+++ b/chart2/source/tools/UncachedDataSequence.cxx
@@ -41,7 +41,7 @@ using ::chart::impl::UncachedDataSequence_Base;
namespace
{
-const char lcl_aServiceName[] = "com.sun.star.comp.chart.UncachedDataSequence";
+const OUStringLiteral lcl_aServiceName = u"com.sun.star.comp.chart.UncachedDataSequence";
enum
{
diff --git a/chart2/source/view/axes/DateScaling.cxx b/chart2/source/view/axes/DateScaling.cxx
index 60ffc14bbfae..b5a690e203aa 100644
--- a/chart2/source/view/axes/DateScaling.cxx
+++ b/chart2/source/view/axes/DateScaling.cxx
@@ -25,8 +25,9 @@
namespace
{
-const char lcl_aServiceName_DateScaling[] = "com.sun.star.chart2.DateScaling";
-const char lcl_aServiceName_InverseDateScaling[] = "com.sun.star.chart2.InverseDateScaling";
+const OUStringLiteral lcl_aServiceName_DateScaling = u"com.sun.star.chart2.DateScaling";
+const OUStringLiteral lcl_aServiceName_InverseDateScaling
+ = u"com.sun.star.chart2.InverseDateScaling";
const double lcl_fNumberOfMonths = 12.0;//todo: this needs to be offered by basic tools Date class if it should be more generic
}
diff --git a/comphelper/source/misc/numberedcollection.cxx b/comphelper/source/misc/numberedcollection.cxx
index 8252a306330b..20ed2cc43d9d 100644
--- a/comphelper/source/misc/numberedcollection.cxx
+++ b/comphelper/source/misc/numberedcollection.cxx
@@ -24,7 +24,7 @@
namespace comphelper{
-const char ERRMSG_INVALID_COMPONENT_PARAM[] = "NULL as component reference not allowed.";
+const OUStringLiteral ERRMSG_INVALID_COMPONENT_PARAM = u"NULL as component reference not allowed.";
NumberedCollection::NumberedCollection()
diff --git a/compilerplugins/clang/stringliteralvar.cxx b/compilerplugins/clang/stringliteralvar.cxx
new file mode 100644
index 000000000000..348193421a61
--- /dev/null
+++ b/compilerplugins/clang/stringliteralvar.cxx
@@ -0,0 +1,203 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+// Find constant character array variables that are passed into O[U]String constructors and should
+// thus be turned into O[U]StringLiteral variables.
+//
+// Such a variable may have been used in multiple places, not all of which would be compatible with
+// changing the variable's type to O[U]StringLiteral. However, this plugin is aggressive and
+// ignores all but the first use of such a variable. In all cases of incompatible uses so far, it
+// was possible to change to surrounding code (for the better) to make the changes work.
+//
+// The plugin also flags O[U]StringLiteral variables of automatic storage duration, and uses of such
+// variables with sizeof---two likely errors that can occur once a variable has been changed from a
+// character array to O[U]StringLiteral.
+//
+//TODO: In theory, we should not only look for variables, but also for non-static data members. In
+// practice, those should be rare, though, as they should arguably have been static data members to
+// begin with.
+
+#include <cassert>
+
+#include "check.hxx"
+#include "plugin.hxx"
+
+namespace
+{
+bool isAutomaticVariable(VarDecl const* decl)
+{
+ switch (cast<VarDecl>(decl)->getStorageDuration())
+ {
+ case SD_Automatic:
+ return true;
+ case SD_Thread:
+ case SD_Static:
+ return false;
+ case SD_FullExpression:
+ case SD_Dynamic:
+ assert(false);
+ default:
+ llvm_unreachable("unknown StorageDuration");
+ }
+}
+
+class StringLiteralVar final : public loplugin::FilteringPlugin<StringLiteralVar>
+{
+public:
+ explicit StringLiteralVar(loplugin::InstantiationData const& data)
+ : FilteringPlugin(data)
+ {
+ }
+
+ bool TraverseInitListExpr(InitListExpr* expr, DataRecursionQueue* queue = nullptr)
+ {
+ return WalkUpFromInitListExpr(expr)
+ && TraverseSynOrSemInitListExpr(
+ expr->isSemanticForm() ? expr : expr->getSemanticForm(), queue);
+ }
+
+ bool VisitCXXConstructExpr(CXXConstructExpr const* expr)
+ {
+ if (ignoreLocation(expr))
+ {
+ return true;
+ }
+ loplugin::TypeCheck const tc(expr->getType());
+ if (!(tc.Class("OString").Namespace("rtl").GlobalNamespace()
+ || tc.Class("OUString").Namespace("rtl").GlobalNamespace()))
+ {
+ return true;
+ }
+ switch (expr->getConstructor()->getNumParams())
+ {
+ case 1:
+ {
+ auto const e = dyn_cast<DeclRefExpr>(expr->getArg(0)->IgnoreParenImpCasts());
+ if (e == nullptr)
+ {
+ return true;
+ }
+ auto const tc = loplugin::TypeCheck(e->getType());
+ if (!(tc.Class("OStringLiteral").Namespace("rtl").GlobalNamespace()
+ || tc.Class("OUStringLiteral").Namespace("rtl").GlobalNamespace()))
+ {
+ return true;
+ }
+ auto const d = e->getDecl();
+ if (!isAutomaticVariable(cast<VarDecl>(d)))
+ {
+ return true;
+ }
+ if (!reportedAutomatic_.insert(d).second)
+ {
+ return true;
+ }
+ report(DiagnosticsEngine::Warning,
+ "variable %0 of type %1 with automatic storage duration most likely needs "
+ "to be static",
+ d->getLocation())
+ << d << d->getType() << d->getSourceRange();
+ report(DiagnosticsEngine::Note, "first converted to %0 here", expr->getLocation())
+ << expr->getType() << expr->getSourceRange();
+ }
+ break;
+ case 2:
+ {
+ auto const e1 = dyn_cast<DeclRefExpr>(expr->getArg(0)->IgnoreParenImpCasts());
+ if (e1 == nullptr)
+ {
+ return true;
+ }
+ auto const t = e1->getType();
+ if (!(t.isConstQualified() && t->isConstantArrayType()))
+ {
+ return true;
+ }
+ auto const e2 = expr->getArg(1);
+ if (!(isa<CXXDefaultArgExpr>(e2)
+ && loplugin::TypeCheck(e2->getType())
+ .Struct("Dummy")
+ .Namespace("libreoffice_internal")
+ .Namespace("rtl")
+ .GlobalNamespace()))
+ {
+ return true;
+ }
+ auto const d = e1->getDecl();
+ if (!reportedArray_.insert(d).second)
+ {
+ return true;
+ }
+ report(DiagnosticsEngine::Warning,
+ "change type of variable %0 from constant character array (%1) to "
+ "%select{OStringLiteral|OUStringLiteral}2%select{|, and make it static}3",
+ d->getLocation())
+ << d << d->getType()
+ << (tc.Class("OString").Namespace("rtl").GlobalNamespace() ? 0 : 1)
+ << isAutomaticVariable(cast<VarDecl>(d)) << d->getSourceRange();
+ report(DiagnosticsEngine::Note, "first passed into a %0 constructor here",
+ expr->getLocation())
+ << expr->getType().getUnqualifiedType() << expr->getSourceRange();
+ }
+ break;
+ }
+ return true;
+ }
+
+ bool VisitUnaryExprOrTypeTraitExpr(UnaryExprOrTypeTraitExpr const* expr)
+ {
+ if (ignoreLocation(expr))
+ {
+ return true;
+ }
+ if (expr->getKind() != UETT_SizeOf)
+ {
+ return true;
+ }
+ if (expr->isArgumentType())
+ {
+ return true;
+ }
+ auto const e = dyn_cast<DeclRefExpr>(expr->getArgumentExpr()->IgnoreParenImpCasts());
+ if (e == nullptr)
+ {
+ return true;
+ }
+ auto const tc = loplugin::TypeCheck(e->getType());
+ if (!(tc.Class("OStringLiteral").Namespace("rtl").GlobalNamespace()
+ || tc.Class("OUStringLiteral").Namespace("rtl").GlobalNamespace()))
+ {
+ return true;
+ }
+ auto const d = e->getDecl();
+ report(DiagnosticsEngine::Warning,
+ "variable %0 of type %1 suspiciously used in a sizeof expression", e->getLocation())
+ << d << d->getType() << expr->getSourceRange();
+ return true;
+ }
+
+ bool preRun() override { return compiler.getLangOpts().CPlusPlus; }
+
+private:
+ void run() override
+ {
+ if (preRun())
+ {
+ TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
+ }
+ }
+
+ std::set<Decl const*> reportedAutomatic_;
+ std::set<Decl const*> reportedArray_;
+};
+
+static loplugin::Plugin::Registration<StringLiteralVar> reg("stringliteralvar");
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/compilerplugins/clang/test/stringliteralvar.cxx b/compilerplugins/clang/test/stringliteralvar.cxx
new file mode 100644
index 000000000000..25a85f90a5a3
--- /dev/null
+++ b/compilerplugins/clang/test/stringliteralvar.cxx
@@ -0,0 +1,81 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <sal/config.h>
+
+#include <vector>
+
+#include <rtl/ustring.hxx>
+
+// expected-error@+1 {{change type of variable 'literal1' from constant character array ('const char [4]') to OStringLiteral [loplugin:stringliteralvar]}}
+char const literal1[] = "foo";
+OString f1()
+{
+ // expected-note@+1 {{first passed into a 'rtl::OString' constructor here [loplugin:stringliteralvar]}}
+ return literal1;
+}
+
+void f(OUString const&);
+void f2()
+{
+ // expected-error@+1 {{change type of variable 'literal' from constant character array ('const char [4]') to OUStringLiteral, and make it static [loplugin:stringliteralvar]}}
+ char const literal[] = "foo";
+ // expected-note@+1 {{first passed into a 'rtl::OUString' constructor here [loplugin:stringliteralvar]}}
+ f(literal);
+}
+
+struct S3
+{
+ // expected-error@+1 {{change type of variable 'literal' from constant character array ('const char16_t [4]') to OUStringLiteral [loplugin:stringliteralvar]}}
+ static constexpr char16_t literal[] = u"foo";
+};
+void f3()
+{
+ // expected-note@+1 {{first passed into a 'rtl::OUString' constructor here [loplugin:stringliteralvar]}}
+ f(S3::literal);
+}
+
+std::vector<OUString> f4()
+{
+ // expected-error@+1 {{change type of variable 'literal' from constant character array ('const char16_t [4]') to OUStringLiteral [loplugin:stringliteralvar]}}
+ static constexpr char16_t literal[] = u"foo";
+ // expected-note@+1 {{first passed into a 'rtl::OUString' constructor here [loplugin:stringliteralvar]}}
+ return { literal };
+}
+
+void f5()
+{
+ // expected-error@+1 {{variable 'literal' of type 'const rtl::OUStringLiteral<4>' with automatic storage duration most likely needs to be static [loplugin:stringliteralvar]}}
+ OUStringLiteral const literal = u"foo";
+ // expected-note@+1 {{first converted to 'rtl::OUString' here [loplugin:stringliteralvar]}}
+ f(literal);
+}
+
+void f6()
+{
+ // expected-error@+1 {{variable 'literal' of type 'const rtl::OUStringLiteral<4>' with automatic storage duration most likely needs to be static [loplugin:stringliteralvar]}}
+ constexpr OUStringLiteral literal = u"foo";
+ // expected-note@+1 {{first converted to 'rtl::OUString' here [loplugin:stringliteralvar]}}
+ f(literal);
+}
+
+void f7()
+{
+ static constexpr OUStringLiteral const literal = u"foo";
+ f(literal);
+}
+
+void f8()
+{
+ static constexpr OUStringLiteral const literal = u"foo";
+ // expected-error@+1 {{variable 'literal' of type 'const rtl::OUStringLiteral<4>' suspiciously used in a sizeof expression [loplugin:stringliteralvar]}}
+ (void)sizeof literal;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/configmgr/source/configurationprovider.cxx b/configmgr/source/configurationprovider.cxx
index d74019e6b05c..294791516862 100644
--- a/configmgr/source/configurationprovider.cxx
+++ b/configmgr/source/configurationprovider.cxx
@@ -60,10 +60,10 @@ namespace configmgr::configuration_provider {
namespace {
-char const accessServiceName[] =
- "com.sun.star.configuration.ConfigurationAccess";
-char const updateAccessServiceName[] =
- "com.sun.star.configuration.ConfigurationUpdateAccess";
+OUStringLiteral const accessServiceName =
+ u"com.sun.star.configuration.ConfigurationAccess";
+OUStringLiteral const updateAccessServiceName =
+ u"com.sun.star.configuration.ConfigurationUpdateAccess";
void badNodePath() {
throw css::uno::Exception(
diff --git a/connectivity/source/commontools/conncleanup.cxx b/connectivity/source/commontools/conncleanup.cxx
index c33cc7289a65..f1d80581ff5a 100644
--- a/connectivity/source/commontools/conncleanup.cxx
+++ b/connectivity/source/commontools/conncleanup.cxx
@@ -35,7 +35,7 @@ namespace dbtools
using namespace css::sdbc;
using namespace css::lang;
- const char ACTIVE_CONNECTION_PROPERTY_NAME[] = "ActiveConnection";
+ const OUStringLiteral ACTIVE_CONNECTION_PROPERTY_NAME = u"ActiveConnection";
OAutoConnectionDisposer::OAutoConnectionDisposer(const Reference< XRowSet >& _rxRowSet, const Reference< XConnection >& _rxConnection)
:m_xRowSet( _rxRowSet )
diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx
index 59f7dd50136e..db6e81a7400a 100644
--- a/connectivity/source/commontools/dbtools2.cxx
+++ b/connectivity/source/commontools/dbtools2.cxx
@@ -1014,7 +1014,7 @@ bool isAggregateColumn( const Reference< XPropertySet > &_xColumn )
{
bool bAgg(false);
- static const char sAgg[] = "AggregateFunction";
+ static const OUStringLiteral sAgg = u"AggregateFunction";
if ( _xColumn->getPropertySetInfo()->hasPropertyByName(sAgg) )
_xColumn->getPropertyValue(sAgg) >>= bAgg;
diff --git a/connectivity/source/cpool/ZConnectionPool.cxx b/connectivity/source/cpool/ZConnectionPool.cxx
index 7d05b6e0236b..c0b034814deb 100644
--- a/connectivity/source/cpool/ZConnectionPool.cxx
+++ b/connectivity/source/cpool/ZConnectionPool.cxx
@@ -41,7 +41,7 @@ void SAL_CALL OPoolTimer::onShot()
m_pPool->invalidatePooledConnections();
}
-const char TIMEOUT_NODENAME[] = "Timeout";
+const OUStringLiteral TIMEOUT_NODENAME = u"Timeout";
OConnectionPool::OConnectionPool(const Reference< XDriver >& _xDriver,
const Reference< XInterface >& _xDriverNode,
diff --git a/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx b/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx
index 4982cc455665..4c9446348681 100644
--- a/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx
+++ b/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx
@@ -40,7 +40,7 @@ OEvoabResultSetMetaData::~OEvoabResultSetMetaData()
void OEvoabResultSetMetaData::setEvoabFields(const ::rtl::Reference<connectivity::OSQLColumns> &xColumns)
{
- static const char aName[] = "Name";
+ static const OUStringLiteral aName = u"Name";
for (const auto& rxColumn : *xColumns)
{
diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
index c965367dab0e..6a247ee8f41e 100644
--- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
@@ -165,7 +165,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables(
// check if any type is given
// when no types are given then we have to return all tables e.g. TABLE
- static const char aTable[] = "TABLE";
+ static const OUStringLiteral aTable = u"TABLE";
bool bTableFound = true;
sal_Int32 nLength = types.getLength();
diff --git a/connectivity/source/drivers/firebird/Driver.cxx b/connectivity/source/drivers/firebird/Driver.cxx
index 3ad9576c11fb..04c65ba06860 100644
--- a/connectivity/source/drivers/firebird/Driver.cxx
+++ b/connectivity/source/drivers/firebird/Driver.cxx
@@ -45,9 +45,9 @@ using namespace connectivity::firebird;
// Static const variables
namespace {
-const char our_sFirebirdTmpVar[] = "FIREBIRD_TMP";
-const char our_sFirebirdLockVar[] = "FIREBIRD_LOCK";
-const char our_sFirebirdMsgVar[] = "FIREBIRD_MSG";
+const OUStringLiteral our_sFirebirdTmpVar = u"FIREBIRD_TMP";
+const OUStringLiteral our_sFirebirdLockVar = u"FIREBIRD_LOCK";
+const OUStringLiteral our_sFirebirdMsgVar = u"FIREBIRD_MSG";
#ifdef MACOSX
const char our_sFirebirdLibVar[] = "LIBREOFFICE_FIREBIRD_LIB";
#endif
diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx b/connectivity/source/drivers/jdbc/JConnection.cxx
index 1d33f2941316..cf0b549b11aa 100644
--- a/connectivity/source/drivers/jdbc/JConnection.cxx
+++ b/connectivity/source/drivers/jdbc/JConnection.cxx
@@ -699,7 +699,8 @@ void java_sql_Connection::loadDriverFromProperties( const OUString& _sDriverClas
OUString java_sql_Connection::impl_getJavaDriverClassPath_nothrow(const OUString& _sDriverClass)
{
- static const char s_sNodeName[] = "org.openoffice.Office.DataAccess/JDBC/DriverClassPaths";
+ static const OUStringLiteral s_sNodeName
+ = u"org.openoffice.Office.DataAccess/JDBC/DriverClassPaths";
::utl::OConfigurationTreeRoot aNamesRoot = ::utl::OConfigurationTreeRoot::createWithComponentContext(
m_pDriver->getContext(), s_sNodeName, -1, ::utl::OConfigurationTreeRoot::CM_READONLY);
OUString sURL;
diff --git a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
index a47758f31a5d..28cb14faa981 100644
--- a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
@@ -1090,8 +1090,9 @@ void ODatabaseMetaDataResultSet::openSpecialColumns(bool _bRowVer,const Any& cat
// E.g. psqlodbc up to at least version 09.01.0100 segfaults
if (table.empty())
{
- const char errMsg[] = "ODBC: Trying to get special columns of empty table name";
- const char SQLState[] = "HY009";
+ static const OUStringLiteral errMsg
+ = u"ODBC: Trying to get special columns of empty table name";
+ static const OUStringLiteral SQLState = u"HY009";
throw SQLException( errMsg, *this, SQLState, -1, Any() );
}
diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx
index d7d7512b7acd..9f860327757c 100644
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -264,7 +264,7 @@ namespace
{
OUString sComposedName;
- static const char s_sWildcard[] = "%" ;
+ static const OUStringLiteral s_sWildcard = u"%" ;
// we want all catalogues, all schemas, all tables
Sequence< OUString > sTableTypes(3);
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index 014c8b09f328..e7aa9c83f29d 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -65,9 +65,9 @@
using namespace css;
-const char FOLDERNAME_UICONFIG[] = "Configurations2";
+const OUStringLiteral FOLDERNAME_UICONFIG = u"Configurations2";
-const char MEDIATYPE_PROPNAME[] = "MediaType";
+const OUStringLiteral MEDIATYPE_PROPNAME = u"MediaType";
const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1,
KEY_F2,
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index f694f26fd6bc..e538bc25bcee 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -74,7 +74,7 @@ const char CMDURL_STYLEPROT_ONLY[] = ".uno:StyleApply?";
const char CMDURL_SPART_ONLY [] = "Style:string=";
const char CMDURL_FPART_ONLY [] = "FamilyName:string=";
-const char STYLEPROP_UINAME[] = "DisplayName";
+const OUStringLiteral STYLEPROP_UINAME = u"DisplayName";
OUString SfxStylesInfo_Impl::generateCommand(const OUString& sFamily, const OUString& sStyle)
{
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 116dac39f0a6..76abb324b583 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -709,7 +709,7 @@ void TPGalleryThemeProperties::FillFilterList()
#if HAVE_FEATURE_AVMEDIA
// media filters
- static const char aWildcard[] = "*.";
+ static const OUStringLiteral aWildcard = u"*.";
::avmedia::FilterNameVector aFilters= ::avmedia::MediaWindow::getMediaFilters();
for(const std::pair<OUString,OUString> & aFilter : aFilters)
diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx
index 140d2a59da3b..9c938e40ae66 100644
--- a/cui/source/dialogs/hlinettp.cxx
+++ b/cui/source/dialogs/hlinettp.cxx
@@ -23,7 +23,7 @@
#include <hlinettp.hxx>
#include <hlmarkwn_def.hxx>
-char const sAnonymous[] = "anonymous";
+OUStringLiteral const sAnonymous = u"anonymous";
char const sFTPScheme[] = INET_FTP_SCHEME;
/*************************************************************************
diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx
index 0bc2085178d2..4fd7fb801ebc 100644
--- a/cui/source/inc/cfg.hxx
+++ b/cui/source/inc/cfg.hxx
@@ -42,18 +42,18 @@
#define notebookbarTabScope "notebookbarTabScope"
const char ITEM_DESCRIPTOR_COMMANDURL[] = "CommandURL";
-const char ITEM_DESCRIPTOR_CONTAINER[] = "ItemDescriptorContainer";
+inline const OUStringLiteral ITEM_DESCRIPTOR_CONTAINER = u"ItemDescriptorContainer";
const char ITEM_DESCRIPTOR_LABEL[] = "Label";
const char ITEM_DESCRIPTOR_TYPE[] = "Type";
const char ITEM_DESCRIPTOR_STYLE[] = "Style";
const char ITEM_DESCRIPTOR_ISVISIBLE[] = "IsVisible";
const char ITEM_DESCRIPTOR_RESOURCEURL[] = "ResourceURL";
-const char ITEM_DESCRIPTOR_UINAME[] = "UIName";
+inline const OUStringLiteral ITEM_DESCRIPTOR_UINAME = u"UIName";
-const char ITEM_MENUBAR_URL[] = "private:resource/menubar/menubar";
+inline const OUStringLiteral ITEM_MENUBAR_URL = u"private:resource/menubar/menubar";
constexpr char16_t ITEM_TOOLBAR_URL[] = u"private:resource/toolbar/";
-const char CUSTOM_TOOLBAR_STR[] = "custom_toolbar_";
+inline const OUStringLiteral CUSTOM_TOOLBAR_STR = u"custom_toolbar_";
const char aMenuSeparatorStr[] = " | ";
diff --git a/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx
index 1daf56dbb64b..c16a533bbf9e 100644
--- a/cui/source/options/optasian.cxx
+++ b/cui/source/options/optasian.cxx
@@ -43,8 +43,8 @@ using namespace com::sun::star::i18n;
using namespace com::sun::star::frame;
using namespace com::sun::star::beans;
-const char cIsKernAsianPunctuation[] = "IsKernAsianPunctuation";
-const char cCharacterCompressionType[] = "CharacterCompressionType";
+const OUStringLiteral cIsKernAsianPunctuation = u"IsKernAsianPunctuation";
+const OUStringLiteral cCharacterCompressionType = u"CharacterCompressionType";
namespace {
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index a1b820b93585..21d46a879e36 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -1019,11 +1019,11 @@ struct LanguageConfig_Impl
static bool bLanguageCurrentDoc_Impl = false;
// some things we'll need...
-const char sAccessSrvc[] = "com.sun.star.configuration.ConfigurationAccess";
-const char sAccessUpdSrvc[] = "com.sun.star.configuration.ConfigurationUpdateAccess";
-const char sInstalledLocalesPath[] = "org.openoffice.Setup/Office/InstalledLocales";
-const char sUserLocalePath[] = "org.openoffice.Office.Linguistic/General";
-const char sUserLocaleKey[] = "UILocale";
+const OUStringLiteral sAccessSrvc = u"com.sun.star.configuration.ConfigurationAccess";
+const OUStringLiteral sAccessUpdSrvc = u"com.sun.star.configuration.ConfigurationUpdateAccess";
+const OUStringLiteral sInstalledLocalesPath = u"org.openoffice.Setup/Office/InstalledLocales";
+const OUStringLiteral sUserLocalePath = u"org.openoffice.Office.Linguistic/General";
+const OUStringLiteral sUserLocaleKey = u"UILocale";
static Sequence< OUString > seqInstalledLanguages;
static OUString lcl_getDatePatternsConfigString( const LocaleDataWrapper& rLocaleWrapper )
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 3f7bad1d804a..5e2df9189d7a 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -93,14 +93,14 @@ IMPL_LINK(SvxProxyTabPage, PortChangedHdl, weld::Entry&, rEdit, void)
}
}
-const char g_aProxyModePN[] = "ooInetProxyType";
-const char g_aHttpProxyPN[] = "ooInetHTTPProxyName";
-const char g_aHttpPortPN[] = "ooInetHTTPProxyPort";
-const char g_aHttpsProxyPN[] = "ooInetHTTPSProxyName";
-const char g_aHttpsPortPN[] = "ooInetHTTPSProxyPort";
-const char g_aFtpProxyPN[] = "ooInetFTPProxyName";
-const char g_aFtpPortPN[] = "ooInetFTPProxyPort";
-const char g_aNoProxyDescPN[] = "ooInetNoProxy";
+const OUStringLiteral g_aProxyModePN = u"ooInetProxyType";
+const OUStringLiteral g_aHttpProxyPN = u"ooInetHTTPProxyName";
+const OUStringLiteral g_aHttpPortPN = u"ooInetHTTPProxyPort";
+const OUStringLiteral g_aHttpsProxyPN = u"ooInetHTTPSProxyName";
+const OUStringLiteral g_aHttpsPortPN = u"ooInetHTTPSProxyPort";
+const OUStringLiteral g_aFtpProxyPN = u"ooInetFTPProxyName";
+const OUStringLiteral g_aFtpPortPN = u"ooInetFTPProxyPort";
+const OUStringLiteral g_aNoProxyDescPN = u"ooInetNoProxy";
IMPL_STATIC_LINK(SvxProxyTabPage, NumberOnlyTextFilterHdl, OUString&, rTest, bool)
{
diff --git a/dbaccess/qa/unit/embeddeddb_performancetest.cxx b/dbaccess/qa/unit/embeddeddb_performancetest.cxx
index 0517a9fd170c..abd72db66fe4 100644
--- a/dbaccess/qa/unit/embeddeddb_performancetest.cxx
+++ b/dbaccess/qa/unit/embeddeddb_performancetest.cxx
@@ -82,7 +82,8 @@ class EmbeddedDBPerformanceTest
: public DBTestBase
{
private:
- static const char our_sEnableTestEnvVar[];
+ static constexpr OUStringLiteral our_sEnableTestEnvVar = u"DBA_PERFTEST";
+
// We store the results and print them at the end due to the amount of warning
// noise present which otherwise obscures the results.
@@ -140,8 +141,6 @@ void EmbeddedDBPerformanceTest::printTimes(
.append("\n");
}
-const char EmbeddedDBPerformanceTest::our_sEnableTestEnvVar[] = "DBA_PERFTEST";
-
// TODO: we probably should create a document from scratch instead?
void EmbeddedDBPerformanceTest::testPerformance()
diff --git a/dbaccess/source/core/api/FilteredContainer.cxx b/dbaccess/source/core/api/FilteredContainer.cxx
index 0e8b2926c37e..74b522a4b459 100644
--- a/dbaccess/source/core/api/FilteredContainer.cxx
+++ b/dbaccess/source/core/api/FilteredContainer.cxx
@@ -343,7 +343,7 @@ static sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, std::
}
}
- static const char sAll[] = "%";
+ static const OUStringLiteral sAll = u"%";
Reference< XResultSet > xTables = m_xMetaData->getTables( Any(), sAll, sAll, aTableTypeFilter );
Reference< XRow > xCurrentRow( xTables, UNO_QUERY_THROW );
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index cf6753794800..b5a789fad212 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -311,7 +311,7 @@ namespace
}
}
-const char sPictures[] = "Pictures";
+const OUStringLiteral sPictures = u"Pictures";
// base documents seem to have a different behaviour to other documents, the
// root storage contents at least seem to be re-used over different saves, thus if there is a
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index 891df4de9dc8..206b8e490e6e 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -644,7 +644,7 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const OUString
if (bNeedMigration)
{
// back up content xml file if migration was successful
- constexpr char BACKUP_XML_NAME[] = "content_before_migration.xml";
+ static constexpr OUStringLiteral BACKUP_XML_NAME = u"content_before_migration.xml";
try
{
if(xRootStorage->isStreamElement(BACKUP_XML_NAME))
diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
index b6366e4482fb..f317bd474c38 100644
--- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx
+++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
@@ -266,7 +266,7 @@ uno::Reference< chart2::data::XDataSequence > SAL_CALL DatabaseDataProvider::cre
osl::MutexGuard g(m_aMutex);
uno::Reference< chart2::data::XDataSequence > xData = m_xInternal->createDataSequenceByRangeRepresentation(_sRangeRepresentation);
uno::Reference<beans::XPropertySet> xProp(xData,uno::UNO_QUERY);
- static const char s_sNumberFormatKey[] = "NumberFormatKey";
+ static const OUStringLiteral s_sNumberFormatKey = u"NumberFormatKey";
if ( xProp.is() && xProp->getPropertySetInfo()->hasPropertyByName(s_sNumberFormatKey) )
{
xProp->setPropertyValue(s_sNumberFormatKey,impl_getNumberFormatKey_nothrow(_sRangeRepresentation));
diff --git a/dbaccess/source/core/recovery/dbdocrecovery.cxx b/dbaccess/source/core/recovery/dbdocrecovery.cxx
index ab5947d91261..d111aa86b6cf 100644
--- a/dbaccess/source/core/recovery/dbdocrecovery.cxx
+++ b/dbaccess/source/core/recovery/dbdocrecovery.cxx
@@ -86,9 +86,9 @@ namespace dbaccess
return true;
}
- const char sRecoveryDataSubStorageName[] = "recovery";
+ const OUStringLiteral sRecoveryDataSubStorageName = u"recovery";
- const char sObjectMapStreamName[] = "storage-component-map.ini";
+ const OUStringLiteral sObjectMapStreamName = u"storage-component-map.ini";
void lcl_writeObjectMap_throw( const Reference<XComponentContext> & i_rContext, const Reference< XStorage >& i_rStorage,
const MapStringToCompDesc& i_mapStorageToCompDesc )
diff --git a/dbaccess/source/core/recovery/storagetextstream.cxx b/dbaccess/source/core/recovery/storagetextstream.cxx
index 6ea4ef005320..1dd774bc8a31 100644
--- a/dbaccess/source/core/recovery/storagetextstream.cxx
+++ b/dbaccess/source/core/recovery/storagetextstream.cxx
@@ -36,7 +36,7 @@ namespace dbaccess
Reference< XTextOutputStream2 > xTextOutput;
};
- const char sLineFeed[] = "\n";
+ const OUStringLiteral sLineFeed = u"\n";
// StorageTextOutputStream
StorageTextOutputStream::StorageTextOutputStream( const Reference<XComponentContext>& i_rContext,
diff --git a/dbaccess/source/core/recovery/subcomponentrecovery.cxx b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
index ab16ee9e2c04..11dfa49d17ad 100644
--- a/dbaccess/source/core/recovery/subcomponentrecovery.cxx
+++ b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
@@ -160,8 +160,8 @@ namespace dbaccess
return xCommandProcessor;
}
- const char sSettingsStreamName[] = "settings.xml";
- const char sCurrentQueryDesignName[] = "ooo:current-query-design";
+ const OUStringLiteral sSettingsStreamName = u"settings.xml";
+ const OUStringLiteral sCurrentQueryDesignName = u"ooo:current-query-design";
}
namespace {
diff --git a/dbaccess/source/filter/hsqldb/hsqlimport.cxx b/dbaccess/source/filter/hsqldb/hsqlimport.cxx
index a017d8dfa12e..f24ceb6f2ff0 100644
--- a/dbaccess/source/filter/hsqldb/hsqlimport.cxx
+++ b/dbaccess/source/filter/hsqldb/hsqlimport.cxx
@@ -266,7 +266,7 @@ void HsqlImporter::parseTableRows(const std::vector<sal_Int32>& rIndexes,
const std::vector<ColumnDefinition>& rColTypes,
const OUString& sTableName)
{
- constexpr char BINARY_FILENAME[] = "data";
+ static constexpr OUStringLiteral BINARY_FILENAME = u"data";
if (!m_xStorage->hasByName(BINARY_FILENAME))
{
diff --git a/dbaccess/source/filter/hsqldb/parseschema.cxx b/dbaccess/source/filter/hsqldb/parseschema.cxx
index 6dfc59778bf0..e1d794cdca8b 100644
--- a/dbaccess/source/filter/hsqldb/parseschema.cxx
+++ b/dbaccess/source/filter/hsqldb/parseschema.cxx
@@ -111,7 +111,7 @@ void SchemaParser::parseSchema()
{
assert(m_rStorage);
- constexpr char SCHEMA_FILENAME[] = "script";
+ static constexpr OUStringLiteral SCHEMA_FILENAME = u"script";
if (!m_rStorage->hasByName(SCHEMA_FILENAME))
{
SAL_WARN("dbaccess", "script file does not exist in storage during hsqldb import");
@@ -175,7 +175,8 @@ std::vector<ColumnDefinition> SchemaParser::getTableColumnTypes(const OUString&
{
if (m_ColumnTypes.count(sTableName) < 1)
{
- constexpr char NOT_EXIST[] = "Internal error while getting column information of table";
+ static constexpr OUStringLiteral NOT_EXIST
+ = u"Internal error while getting column information of table";
SAL_WARN("dbaccess", NOT_EXIST << ". Table name is: " << sTableName);
dbtools::throwGenericSQLException(NOT_EXIST, ::comphelper::getProcessComponentContext());
}
diff --git a/dbaccess/source/filter/hsqldb/utils.cxx b/dbaccess/source/filter/hsqldb/utils.cxx
index f2b2b517b8fc..041df17a700a 100644
--- a/dbaccess/source/filter/hsqldb/utils.cxx
+++ b/dbaccess/source/filter/hsqldb/utils.cxx
@@ -129,9 +129,10 @@ void utils::ensureFirebirdTableLength(const OUString& sName)
{
if (sName.getLength() > 30) // Firebird limitation
{
- constexpr char NAME_TOO_LONG[] = "Firebird 3 doesn't support object (table, field) names "
- "of more than 30 characters; please shorten your object "
- "names in the original file and try again.";
+ static constexpr OUStringLiteral NAME_TOO_LONG
+ = u"Firebird 3 doesn't support object (table, field) names "
+ "of more than 30 characters; please shorten your object "
+ "names in the original file and try again.";
dbtools::throwGenericSQLException(NAME_TOO_LONG,
::comphelper::getProcessComponentContext());
}
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 987536261316..d75d557615a2 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -674,7 +674,7 @@ FeatureState OApplicationController::GetState(sal_uInt16 _nId) const
aReturn.bEnabled = xEnumAccess.is();
if ( aReturn.bEnabled )
{
- static const char s_sReportDesign[] = "org.libreoffice.report.pentaho.SOReportJobFactory";
+ static const OUStringLiteral s_sReportDesign = u"org.libreoffice.report.pentaho.SOReportJobFactory";
Reference< XEnumeration > xEnumDrivers = xEnumAccess->createContentEnumeration(s_sReportDesign);
aReturn.bEnabled = xEnumDrivers.is() && xEnumDrivers->hasMoreElements();
}
diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx
index 1d7019a81b29..0ce728d7fa2a 100644
--- a/dbaccess/source/ui/app/AppControllerGen.cxx
+++ b/dbaccess/source/ui/app/AppControllerGen.cxx
@@ -639,7 +639,7 @@ void OApplicationController::onLoadedMenu(const Reference< css::frame::XLayoutMa
if ( !_xLayoutManager.is() )
return;
- static const char s_sStatusbar[] = "private:resource/statusbar/statusbar";
+ static const OUStringLiteral s_sStatusbar = u"private:resource/statusbar/statusbar";
_xLayoutManager->createElement( s_sStatusbar );
_xLayoutManager->requestElement( s_sStatusbar );
diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx
index 67df2db8ccdf..da4d61641936 100644
--- a/dbaccess/source/ui/dlg/queryfilter.cxx
+++ b/dbaccess/source/ui/dlg/queryfilter.cxx
@@ -304,10 +304,10 @@ bool DlgFilterCrit::getCondition(const weld::ComboBox& _rField,const weld::Combo
}
}
xColumn->getPropertyValue(PROPERTY_REALNAME) >>= _rFilter.Name;
- static const char sAgg[] = "AggregateFunction";
+ static const OUStringLiteral sAgg = u"AggregateFunction";
if ( xInfo->hasPropertyByName(sAgg) )
xColumn->getPropertyValue(sAgg) >>= bHaving;
- static const char sFunction[] = "Function";
+ static const OUStringLiteral sFunction = u"Function";
if ( xInfo->hasPropertyByName(sFunction) )
xColumn->getPropertyValue(sFunction) >>= bFunction;
}
diff --git a/dbaccess/source/ui/misc/indexcollection.cxx b/dbaccess/source/ui/misc/indexcollection.cxx
index fb83377f1740..046a41a000ea 100644
--- a/dbaccess/source/ui/misc/indexcollection.cxx
+++ b/dbaccess/source/ui/misc/indexcollection.cxx
@@ -122,7 +122,7 @@ namespace dbaui
}
// set the properties
- static const char s_sNamePropertyName[] = "Name";
+ static const OUStringLiteral s_sNamePropertyName = u"Name";
// the index' own props
xIndexDescriptor->setPropertyValue("IsUnique", css::uno::makeAny(_rPos->bUnique));
xIndexDescriptor->setPropertyValue(s_sNamePropertyName, makeAny(_rPos->sName));
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index 6a77aa548855..5bab3d26f30b 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -149,8 +149,8 @@ namespace
return;
xLayoutManager->lock();
- static const char s_sDesignToolbar[] = "private:resource/toolbar/designobjectbar";
- static const char s_sSqlToolbar[] = "private:resource/toolbar/sqlobjectbar";
+ static const OUStringLiteral s_sDesignToolbar = u"private:resource/toolbar/designobjectbar";
+ static const OUStringLiteral s_sSqlToolbar = u"private:resource/toolbar/sqlobjectbar";
if ( _bDesign )
{
xLayoutManager->destroyElement( s_sSqlToolbar );
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 112be4caf94d..596e83b14ebf 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -560,7 +560,7 @@ bool Desktop::QueryExit()
{
}
- const char SUSPEND_QUICKSTARTVETO[] = "SuspendQuickstartVeto";
+ static const OUStringLiteral SUSPEND_QUICKSTARTVETO = u"SuspendQuickstartVeto";
Reference< XDesktop2 > xDesktop = css::frame::Desktop::create( ::comphelper::getProcessComponentContext() );
Reference< XPropertySet > xPropertySet(xDesktop, UNO_QUERY_THROW);
@@ -872,7 +872,7 @@ namespace {
#if HAVE_FEATURE_BREAKPAD
void handleCrashReport()
{
- static const char SERVICENAME_CRASHREPORT[] = "com.sun.star.comp.svx.CrashReportUI";
+ static const OUStringLiteral SERVICENAME_CRASHREPORT = u"com.sun.star.comp.svx.CrashReportUI";
css::uno::Reference< css::uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
diff --git a/desktop/source/app/check_ext_deps.cxx b/desktop/source/app/check_ext_deps.cxx
index 8af149f1f93b..2e667e0ad64c 100644
--- a/desktop/source/app/check_ext_deps.cxx
+++ b/desktop/source/app/check_ext_deps.cxx
@@ -207,7 +207,7 @@ void SilentCommandEnv::pop()
} // end namespace
-const char aAccessSrvc[] = "com.sun.star.configuration.ConfigurationUpdateAccess";
+const OUStringLiteral aAccessSrvc = u"com.sun.star.configuration.ConfigurationUpdateAccess";
static sal_Int16 impl_showExtensionDialog( uno::Reference< uno::XComponentContext > const &xContext )
{
diff --git a/desktop/source/app/cmdlinehelp.cxx b/desktop/source/app/cmdlinehelp.cxx
index 1d7fe7613be7..03e45b7278c0 100644
--- a/desktop/source/app/cmdlinehelp.cxx
+++ b/desktop/source/app/cmdlinehelp.cxx
@@ -35,11 +35,11 @@
namespace desktop
{
- const char aCmdLineHelp_version[] =
- "%PRODUCTNAME %PRODUCTVERSION%PRODUCTEXTENSION %BUILDID\n"
+ const OUStringLiteral aCmdLineHelp_version =
+ u"%PRODUCTNAME %PRODUCTVERSION%PRODUCTEXTENSION %BUILDID\n"
"\n";
- const char aCmdLineHelp[] =
- "Usage: %CMDNAME [argument...]\n"
+ const OUStringLiteral aCmdLineHelp =
+ u"Usage: %CMDNAME [argument...]\n"
" argument - switches, switch parameters and document URIs (filenames). \n\n"
"Using without special arguments: \n"
"Opens the start center, if it is used without any arguments. \n"
diff --git a/desktop/source/deployment/misc/dp_dependencies.cxx b/desktop/source/deployment/misc/dp_dependencies.cxx
index eae5ca5cb7d8..732778e2bbd1 100644
--- a/desktop/source/deployment/misc/dp_dependencies.cxx
+++ b/desktop/source/deployment/misc/dp_dependencies.cxx
@@ -43,14 +43,14 @@ namespace {
char const namespaceLibreOffice[] =
"http://libreoffice.org/extensions/description/2011";
-char const namespaceOpenOfficeOrg[] =
- "http://openoffice.org/extensions/description/2006";
+OUStringLiteral const namespaceOpenOfficeOrg =
+ u"http://openoffice.org/extensions/description/2006";
char const minimalVersionLibreOffice[] = "LibreOffice-minimal-version";
char const maximalVersionLibreOffice[] = "LibreOffice-maximal-version";
-char const minimalVersionOpenOfficeOrg[] =
- "OpenOffice.org-minimal-version";
+OUStringLiteral const minimalVersionOpenOfficeOrg =
+ u"OpenOffice.org-minimal-version";
char const maximalVersionOpenOfficeOrg[] =
"OpenOffice.org-maximal-version";
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index 1637a9d63ade..4955c279ec32 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -69,9 +69,9 @@ using namespace com::sun::star;
namespace desktop
{
-const char ITEM_DESCRIPTOR_COMMANDURL[] = "CommandURL";
-const char ITEM_DESCRIPTOR_CONTAINER[] = "ItemDescriptorContainer";
-const char ITEM_DESCRIPTOR_LABEL[] = "Label";
+const OUStringLiteral ITEM_DESCRIPTOR_COMMANDURL = u"CommandURL";
+const OUStringLiteral ITEM_DESCRIPTOR_CONTAINER = u"ItemDescriptorContainer";
+const OUStringLiteral ITEM_DESCRIPTOR_LABEL = u"Label";
static OUString mapModuleShortNameToIdentifier(std::u16string_view sShortName)
{
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 3b9da426dc64..d04247c397f2 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -95,9 +95,9 @@ namespace o3tl {
}
const sal_Unicode cNonBreakingSpace = 0xA0; // UNICODE code for no break space
-const char pXMLImplWrdStt_ExcptLstStr[] = "WordExceptList.xml";
-const char pXMLImplCplStt_ExcptLstStr[] = "SentenceExceptList.xml";
-const char pXMLImplAutocorr_ListStr[] = "DocumentList.xml";
+const OUStringLiteral pXMLImplWrdStt_ExcptLstStr = u"WordExceptList.xml";
+const OUStringLiteral pXMLImplCplStt_ExcptLstStr = u"SentenceExceptList.xml";
+const OUStringLiteral pXMLImplAutocorr_ListStr = u"DocumentList.xml";
const char
/* also at these beginnings - Brackets and all kinds of begin characters */
diff --git a/extensions/source/abpilot/admininvokationimpl.cxx b/extensions/source/abpilot/admininvokationimpl.cxx
index fe208e85b3ec..720ef26fb90c 100644
--- a/extensions/source/abpilot/admininvokationimpl.cxx
+++ b/extensions/source/abpilot/admininvokationimpl.cxx
@@ -62,7 +62,7 @@ namespace abp
{
// the service name of the administration dialog
static const char16_t s_sAdministrationServiceName[] = u"com.sun.star.sdb.DatasourceAdministrationDialog";
- static const char s_sDataSourceTypeChangeDialog[] = "com.sun.star.sdb.DataSourceTypeChangeDialog";
+ static const OUStringLiteral s_sDataSourceTypeChangeDialog = u"com.sun.star.sdb.DataSourceTypeChangeDialog";
// the parameters for the call
Sequence<Any> aArguments(comphelper::InitAnyPropertySequence(
diff --git a/extensions/source/abpilot/fieldmappingimpl.cxx b/extensions/source/abpilot/fieldmappingimpl.cxx
index 7a72f8475c4b..34d860cf3f49 100644
--- a/extensions/source/abpilot/fieldmappingimpl.cxx
+++ b/extensions/source/abpilot/fieldmappingimpl.cxx
@@ -50,7 +50,7 @@ namespace abp
const char16_t sDriverSettingsNodeName[] = u"/org.openoffice.Office.DataAccess/DriverSettings/com.sun.star.comp.sdbc.MozabDriver";
- const char sAddressBookNodeName[] = "/org.openoffice.Office.DataAccess/AddressBook";
+ const OUStringLiteral sAddressBookNodeName = u"/org.openoffice.Office.DataAccess/AddressBook";
namespace fieldmapping
{
diff --git a/extensions/source/bibliography/bibconfig.cxx b/extensions/source/bibliography/bibconfig.cxx
index ee271f4cc898..f5a68212922d 100644
--- a/extensions/source/bibliography/bibconfig.cxx
+++ b/extensions/source/bibliography/bibconfig.cxx
@@ -33,7 +33,7 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::sdb;
-constexpr char16_t cDataSourceHistory[] = u"DataSourceHistory";
+constexpr OUStringLiteral cDataSourceHistory = u"DataSourceHistory";
Sequence<OUString> const & BibConfig::GetPropertyNames()
{
diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx
index 478a7b34ab51..43d6054cdfa3 100644
--- a/extensions/source/dbpilots/gridwizard.cxx
+++ b/extensions/source/dbpilots/gridwizard.cxx
@@ -93,8 +93,8 @@ namespace dbp
if (!xColumnFactory.is() || !xColumnContainer.is())
return;
- static const char s_sMouseWheelBehavior[] = "MouseWheelBehavior";
- static const char s_sEmptyString[] = "";
+ static const OUStringLiteral s_sMouseWheelBehavior = u"MouseWheelBehavior";
+ static const OUStringLiteral s_sEmptyString = u"";
// collect "descriptors" for the to-be-created (grid)columns
std::vector< OUString > aColumnServiceNames; // service names to be used with the XGridColumnFactory
diff --git a/extensions/source/dbpilots/optiongrouplayouter.cxx b/extensions/source/dbpilots/optiongrouplayouter.cxx
index 546fa9ca7a7d..bfd14727cfb1 100644
--- a/extensions/source/dbpilots/optiongrouplayouter.cxx
+++ b/extensions/source/dbpilots/optiongrouplayouter.cxx
@@ -189,7 +189,7 @@ namespace dbp
void OOptionGroupLayouter::implAnchorShape(const Reference< XPropertySet >& _rxShapeProps)
{
- static const char s_sAnchorPropertyName[] = "AnchorType";
+ static const OUStringLiteral s_sAnchorPropertyName = u"AnchorType";
Reference< XPropertySetInfo > xPropertyInfo;
if (_rxShapeProps.is())
xPropertyInfo = _rxShapeProps->getPropertySetInfo();
diff --git a/filter/qa/unit/svg.cxx b/filter/qa/unit/svg.cxx
index 792964cb00d9..d870307a1c4d 100644
--- a/filter/qa/unit/svg.cxx
+++ b/filter/qa/unit/svg.cxx
@@ -20,7 +20,7 @@
using namespace ::com::sun::star;
-char const DATA_DIRECTORY[] = "/filter/qa/unit/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/filter/qa/unit/data/";
/// SVG filter tests.
class SvgFilterTest : public test::BootstrapFixture, public unotest::MacrosTest, public XmlTestTools
diff --git a/filter/qa/unit/textfilterdetect.cxx b/filter/qa/unit/textfilterdetect.cxx
index fb1ff1d2ac7e..1efbebc47b93 100644
--- a/filter/qa/unit/textfilterdetect.cxx
+++ b/filter/qa/unit/textfilterdetect.cxx
@@ -54,7 +54,7 @@ void TextFilterDetectTest::tearDown()
test::BootstrapFixture::tearDown();
}
-char const DATA_DIRECTORY[] = "/filter/qa/unit/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/filter/qa/unit/data/";
CPPUNIT_TEST_FIXTURE(TextFilterDetectTest, testTdf114428)
{
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index bcf97a8b0678..a77457687076 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -83,7 +83,7 @@ using namespace ::xmloff::token;
#define SVG_PROP_POSITIONED_CHARACTERS "UsePositionedCharacters"
// ooo xml elements
-constexpr char16_t aOOOElemTextField[] = u"" NSPREFIX "text_field";
+constexpr OUStringLiteral aOOOElemTextField = u"" NSPREFIX "text_field";
// ooo xml attributes for meta_slide
@@ -93,13 +93,13 @@ const char aOOOAttrBackgroundVisibility[] = NSPREFIX "background-visibility";
const char aOOOAttrMasterObjectsVisibility[] = NSPREFIX "master-objects-visibility";
const char aOOOAttrSlideDuration[] = NSPREFIX "slide-duration";
const OUString aOOOAttrDateTimeField = NSPREFIX "date-time-field";
-const char aOOOAttrFooterField[] = NSPREFIX "footer-field";
+const OUStringLiteral aOOOAttrFooterField = u"" NSPREFIX "footer-field";
const char aOOOAttrHasTransition[] = NSPREFIX "has-transition";
// ooo xml attributes for pages and shapes
const char aOOOAttrName[] = NSPREFIX "name";
-const char constSvgNamespace[] = "http://www.w3.org/2000/svg";
+const OUStringLiteral constSvgNamespace = u"http://www.w3.org/2000/svg";
/** Text Field Class Hierarchy
diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx
index 8025550b5837..a15dc12f53e6 100644
--- a/filter/source/svg/svgfilter.cxx
+++ b/filter/source/svg/svgfilter.cxx
@@ -63,8 +63,8 @@ using namespace ::com::sun::star;
namespace
{
- const char constFilterNameDraw[] = "svg_Scalable_Vector_Graphics_Draw";
- const char constFilterName[] = "svg_Scalable_Vector_Graphics";
+ const OUStringLiteral constFilterNameDraw = u"svg_Scalable_Vector_Graphics_Draw";
+ const OUStringLiteral constFilterName = u"svg_Scalable_Vector_Graphics";
}
SVGFilter::SVGFilter( const Reference< XComponentContext >& rxCtx ) :
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index 97c76efb5eff..11b8bd14d352 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -1943,7 +1943,7 @@ void ODatabaseForm::reset_impl(bool _bApproveByListeners)
if ( xColProps.is() )
xPSI = xColProps->getPropertySetInfo( );
- static const char PROPERTY_CONTROLDEFAULT[] = "ControlDefault";
+ static const OUStringLiteral PROPERTY_CONTROLDEFAULT = u"ControlDefault";
if ( xPSI.is() && xPSI->hasPropertyByName( PROPERTY_CONTROLDEFAULT ) )
{
Any aDefault = xColProps->getPropertyValue( PROPERTY_CONTROLDEFAULT );
diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx
index 18cb21882d6a..1e201c7b3858 100644
--- a/forms/source/component/FormattedField.cxx
+++ b/forms/source/component/FormattedField.cxx
@@ -649,7 +649,7 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
Reference<XNumberFormats> xFormats = xSupplier->getNumberFormats();
OUString sFormatDescription;
LanguageType eFormatLanguage = LANGUAGE_DONTKNOW;
- static const char s_aLocaleProp[] = "Locale";
+ static const OUStringLiteral s_aLocaleProp = u"Locale";
Reference<css::beans::XPropertySet> xFormat = xFormats->getByKey(nKey);
if (hasProperty(s_aLocaleProp, xFormat))
{
@@ -660,7 +660,7 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
eFormatLanguage = LanguageTag::convertToLanguageType( *pLocale, false);
}
}
- static const char s_aFormatStringProp[] = "FormatString";
+ static const OUStringLiteral s_aFormatStringProp = u"FormatString";
if (hasProperty(s_aFormatStringProp, xFormat))
xFormat->getPropertyValue(s_aFormatStringProp) >>= sFormatDescription;
_rxOutStream->writeUTF(sFormatDescription);
diff --git a/framework/inc/taskcreatordefs.hxx b/framework/inc/taskcreatordefs.hxx
index 1b63cd28105b..02b85221c801 100644
--- a/framework/inc/taskcreatordefs.hxx
+++ b/framework/inc/taskcreatordefs.hxx
@@ -21,37 +21,38 @@
#define INCLUDED_FRAMEWORK_INC_TASKCREATORDEFS_HXX
/// [XFrame] if it's set, it will be used as parent frame for the new created frame.
-const char ARGUMENT_PARENTFRAME[] = "ParentFrame"; // XFrame
+const OUStringLiteral ARGUMENT_PARENTFRAME = u"ParentFrame"; // XFrame
/** [OUString] if it's not a special name (beginning with "_" ... which are not allowed here!)
it will be set as the API name of the new created frame.
*/
-const char ARGUMENT_FRAMENAME[] = "FrameName"; // OUString
+const OUStringLiteral ARGUMENT_FRAMENAME = u"FrameName"; // OUString
/// [sal_Bool] If it's set to sal_True we will make the new created frame visible.
-const char ARGUMENT_MAKEVISIBLE[] = "MakeVisible"; // sal_Bool
+const OUStringLiteral ARGUMENT_MAKEVISIBLE = u"MakeVisible"; // sal_Bool
/** [sal_Bool] If not "ContainerWindow" property is set it force creation of a
top level window as new container window.
*/
-const char ARGUMENT_CREATETOPWINDOW[] = "CreateTopWindow"; // sal_Bool
+const OUStringLiteral ARGUMENT_CREATETOPWINDOW = u"CreateTopWindow"; // sal_Bool
/// [Rectangle] Place the new created frame on this place and resize the container window.
-const char ARGUMENT_POSSIZE[] = "PosSize"; // Rectangle
+inline const OUStringLiteral ARGUMENT_POSSIZE = u"PosSize"; // Rectangle
/// [XWindow] an outside created window, used as container window of the new created frame.
-const char ARGUMENT_CONTAINERWINDOW[] = "ContainerWindow"; // XWindow
+inline const OUStringLiteral ARGUMENT_CONTAINERWINDOW = u"ContainerWindow"; // XWindow
/** [sal_Bool] enable/disable special mode, where this frame will be part of
the persistent window state feature suitable for any office module window
*/
-const char ARGUMENT_SUPPORTPERSISTENTWINDOWSTATE[] = "SupportPersistentWindowState"; // sal_Bool
+const OUStringLiteral ARGUMENT_SUPPORTPERSISTENTWINDOWSTATE
+ = u"SupportPersistentWindowState"; // sal_Bool
/** [sal_Bool] enable/disable special mode, where the title bar of our
the new created frame will be updated automatically.
Default = ON !
*/
-const char ARGUMENT_ENABLE_TITLEBARUPDATE[] = "EnableTitleBarUpdate"; // sal_Bool
+inline const OUStringLiteral ARGUMENT_ENABLE_TITLEBARUPDATE = u"EnableTitleBarUpdate"; // sal_Bool
#endif // INCLUDED_FRAMEWORK_INC_TASKCREATORDEFS_HXX
diff --git a/framework/qa/cppunit/loadenv.cxx b/framework/qa/cppunit/loadenv.cxx
index 96d28cd47396..5ce6826060d0 100644
--- a/framework/qa/cppunit/loadenv.cxx
+++ b/framework/qa/cppunit/loadenv.cxx
@@ -35,7 +35,7 @@ void Test::setUp()
mxDesktop.set(frame::Desktop::create(mxComponentContext));
}
-char const DATA_DIRECTORY[] = "/framework/qa/cppunit/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/framework/qa/cppunit/data/";
class DocumentOpener
{
diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx
index d2df6e582c8f..e813213a92a0 100644
--- a/framework/source/accelerators/acceleratorconfiguration.cxx
+++ b/framework/source/accelerators/acceleratorconfiguration.cxx
@@ -57,8 +57,8 @@
namespace framework
{
- const char CFG_ENTRY_SECONDARY[] = "SecondaryKeys";
- const char CFG_PROP_COMMAND[] = "Command";
+ const OUStringLiteral CFG_ENTRY_SECONDARY = u"SecondaryKeys";
+ const OUStringLiteral CFG_PROP_COMMAND = u"Command";
static OUString lcl_getKeyString(const css::awt::KeyEvent& aKeyEvent)
{
diff --git a/framework/source/fwe/xml/menudocumenthandler.cxx b/framework/source/fwe/xml/menudocumenthandler.cxx
index 4b5a7ff06f10..ad55be6dd213 100644
--- a/framework/source/fwe/xml/menudocumenthandler.cxx
+++ b/framework/source/fwe/xml/menudocumenthandler.cxx
@@ -72,12 +72,12 @@
#define ATTRIBUTE_ITEMSTYLE_RADIO "radio"
// Property names of a menu/menu item ItemDescriptor
-const char ITEM_DESCRIPTOR_COMMANDURL[] = "CommandURL";
-const char ITEM_DESCRIPTOR_HELPURL[] = "HelpURL";
-const char ITEM_DESCRIPTOR_CONTAINER[] = "ItemDescriptorContainer";
-const char ITEM_DESCRIPTOR_LABEL[] = "Label";
-const char ITEM_DESCRIPTOR_TYPE[] = "Type";
-const char ITEM_DESCRIPTOR_STYLE[] = "Style";
+const OUStringLiteral ITEM_DESCRIPTOR_COMMANDURL = u"CommandURL";
+const OUStringLiteral ITEM_DESCRIPTOR_HELPURL = u"HelpURL";
+const OUStringLiteral ITEM_DESCRIPTOR_CONTAINER = u"ItemDescriptorContainer";
+const OUStringLiteral ITEM_DESCRIPTOR_LABEL = u"Label";
+const OUStringLiteral ITEM_DESCRIPTOR_TYPE = u"Type";
+const OUStringLiteral ITEM_DESCRIPTOR_STYLE = u"Style";
// using namespaces
diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
index 5ed0ee665405..a829e03ad20d 100644
--- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx
+++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
@@ -48,11 +48,11 @@ namespace framework
{
// Property names of a menu/menu item ItemDescriptor
-const char ITEM_DESCRIPTOR_COMMANDURL[] = "CommandURL";
-const char ITEM_DESCRIPTOR_LABEL[] = "Label";
-const char ITEM_DESCRIPTOR_TYPE[] = "Type";
-const char ITEM_DESCRIPTOR_STYLE[] = "Style";
-const char ITEM_DESCRIPTOR_VISIBLE[] = "IsVisible";
+const OUStringLiteral ITEM_DESCRIPTOR_COMMANDURL = u"CommandURL";
+const OUStringLiteral ITEM_DESCRIPTOR_LABEL = u"Label";
+const OUStringLiteral ITEM_DESCRIPTOR_TYPE = u"Type";
+const OUStringLiteral ITEM_DESCRIPTOR_STYLE = u"Style";
+const OUStringLiteral ITEM_DESCRIPTOR_VISIBLE = u"IsVisible";
static void ExtractToolbarParameters( const Sequence< PropertyValue >& rProp,
OUString& rCommandURL,
diff --git a/framework/source/fwi/uielement/constitemcontainer.cxx b/framework/source/fwi/uielement/constitemcontainer.cxx
index d0a621babcd5..212f0a80e24b 100644
--- a/framework/source/fwi/uielement/constitemcontainer.cxx
+++ b/framework/source/fwi/uielement/constitemcontainer.cxx
@@ -33,7 +33,7 @@ using namespace com::sun::star::beans;
using namespace com::sun::star::container;
const int PROPHANDLE_UINAME = 1;
-const char PROPNAME_UINAME[] = "UIName";
+const OUStringLiteral PROPNAME_UINAME = u"UIName";
namespace framework
{
diff --git a/framework/source/fwi/uielement/itemcontainer.cxx b/framework/source/fwi/uielement/itemcontainer.cxx
index 79e5104e933f..55f6ccecfd50 100644
--- a/framework/source/fwi/uielement/itemcontainer.cxx
+++ b/framework/source/fwi/uielement/itemcontainer.cxx
@@ -30,7 +30,8 @@ using namespace com::sun::star::lang;
using namespace com::sun::star::beans;
using namespace com::sun::star::container;
-const char WRONG_TYPE_EXCEPTION[] = "Type must be css::uno::Sequence< css::beans::PropertyValue >";
+const OUStringLiteral WRONG_TYPE_EXCEPTION
+ = u"Type must be css::uno::Sequence< css::beans::PropertyValue >";
namespace framework
{
diff --git a/framework/source/fwi/uielement/rootitemcontainer.cxx b/framework/source/fwi/uielement/rootitemcontainer.cxx
index edf695135d1d..0016789d2da6 100644
--- a/framework/source/fwi/uielement/rootitemcontainer.cxx
+++ b/framework/source/fwi/uielement/rootitemcontainer.cxx
@@ -33,10 +33,11 @@ using namespace com::sun::star::lang;
using namespace com::sun::star::beans;
using namespace com::sun::star::container;
-const char WRONG_TYPE_EXCEPTION[] = "Type must be css::uno::Sequence< css::beans::PropertyValue >";
+const OUStringLiteral WRONG_TYPE_EXCEPTION
+ = u"Type must be css::uno::Sequence< css::beans::PropertyValue >";
const int PROPHANDLE_UINAME = 1;
-const char PROPNAME_UINAME[] = "UIName";
+const OUStringLiteral PROPNAME_UINAME = u"UIName";
namespace framework
{
diff --git a/framework/source/helper/statusindicatorfactory.cxx b/framework/source/helper/statusindicatorfactory.cxx
index f525a1d2c1dd..ce923b2f9e55 100644
--- a/framework/source/helper/statusindicatorfactory.cxx
+++ b/framework/source/helper/statusindicatorfactory.cxx
@@ -48,7 +48,7 @@ struct RescheduleLock: public rtl::Static<osl::Mutex, RescheduleLock> {}; ///< m
}
-const char PROGRESS_RESOURCE[] = "private:resource/progressbar/progressbar";
+const OUStringLiteral PROGRESS_RESOURCE = u"private:resource/progressbar/progressbar";
StatusIndicatorFactory::StatusIndicatorFactory(const css::uno::Reference< css::uno::XComponentContext >& xContext)
: m_xContext (xContext )
diff --git a/framework/source/helper/uiconfigelementwrapperbase.cxx b/framework/source/helper/uiconfigelementwrapperbase.cxx
index b0138d04a77c..f27c51186f30 100644
--- a/framework/source/helper/uiconfigelementwrapperbase.cxx
+++ b/framework/source/helper/uiconfigelementwrapperbase.cxx
@@ -37,14 +37,14 @@ const int UIELEMENT_PROPHANDLE_TYPE = 5;
const int UIELEMENT_PROPHANDLE_XMENUBAR = 6;
const int UIELEMENT_PROPHANDLE_CONFIGLISTENER = 7;
const int UIELEMENT_PROPHANDLE_NOCLOSE = 8;
-const char UIELEMENT_PROPNAME_CONFIGLISTENER[] = "ConfigListener";
-const char UIELEMENT_PROPNAME_CONFIGSOURCE[] = "ConfigurationSource";
-const char UIELEMENT_PROPNAME_FRAME[] = "Frame";
-const char UIELEMENT_PROPNAME_PERSISTENT[] = "Persistent";
-const char UIELEMENT_PROPNAME_RESOURCEURL[] = "ResourceURL";
-const char UIELEMENT_PROPNAME_TYPE[] = "Type";
-const char UIELEMENT_PROPNAME_XMENUBAR[] = "XMenuBar";
-const char UIELEMENT_PROPNAME_NOCLOSE[] = "NoClose";
+const OUStringLiteral UIELEMENT_PROPNAME_CONFIGLISTENER = u"ConfigListener";
+const OUStringLiteral UIELEMENT_PROPNAME_CONFIGSOURCE = u"ConfigurationSource";
+const OUStringLiteral UIELEMENT_PROPNAME_FRAME = u"Frame";
+const OUStringLiteral UIELEMENT_PROPNAME_PERSISTENT = u"Persistent";
+const OUStringLiteral UIELEMENT_PROPNAME_RESOURCEURL = u"ResourceURL";
+const OUStringLiteral UIELEMENT_PROPNAME_TYPE = u"Type";
+const OUStringLiteral UIELEMENT_PROPNAME_XMENUBAR = u"XMenuBar";
+const OUStringLiteral UIELEMENT_PROPNAME_NOCLOSE = u"NoClose";
using namespace com::sun::star::beans;
using namespace com::sun::star::uno;
using namespace com::sun::star::frame;
diff --git a/framework/source/helper/uielementwrapperbase.cxx b/framework/source/helper/uielementwrapperbase.cxx
index 76cf234ff94f..06db2788beac 100644
--- a/framework/source/helper/uielementwrapperbase.cxx
+++ b/framework/source/helper/uielementwrapperbase.cxx
@@ -28,9 +28,9 @@
const int UIELEMENT_PROPHANDLE_RESOURCEURL = 1;
const int UIELEMENT_PROPHANDLE_TYPE = 2;
const int UIELEMENT_PROPHANDLE_FRAME = 3;
-const char UIELEMENT_PROPNAME_RESOURCEURL[] = "ResourceURL";
-const char UIELEMENT_PROPNAME_TYPE[] = "Type";
-const char UIELEMENT_PROPNAME_FRAME[] = "Frame";
+const OUStringLiteral UIELEMENT_PROPNAME_RESOURCEURL = u"ResourceURL";
+const OUStringLiteral UIELEMENT_PROPNAME_TYPE = u"Type";
+const OUStringLiteral UIELEMENT_PROPNAME_FRAME = u"Frame";
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
diff --git a/framework/source/inc/accelerators/acceleratorconfiguration.hxx b/framework/source/inc/accelerators/acceleratorconfiguration.hxx
index 8066a63ff760..6f9daa38b14b 100644
--- a/framework/source/inc/accelerators/acceleratorconfiguration.hxx
+++ b/framework/source/inc/accelerators/acceleratorconfiguration.hxx
@@ -40,9 +40,9 @@
namespace framework
{
-const char CFG_ENTRY_PRIMARY[] = "PrimaryKeys";
-const char CFG_ENTRY_GLOBAL[] = "Global";
-const char CFG_ENTRY_MODULES[] = "Modules";
+inline const OUStringLiteral CFG_ENTRY_PRIMARY = u"PrimaryKeys";
+inline const OUStringLiteral CFG_ENTRY_GLOBAL = u"Global";
+inline const OUStringLiteral CFG_ENTRY_MODULES = u"Modules";
/**
implements a read/write access to the accelerator configuration.
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 67a40b89738c..6090cb0f9646 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -76,7 +76,7 @@ using namespace ::com::sun::star::container;
using namespace ::com::sun::star::ui;
using namespace ::com::sun::star::frame;
-const char STATUS_BAR_ALIAS[] = "private:resource/statusbar/statusbar";
+const OUStringLiteral STATUS_BAR_ALIAS = u"private:resource/statusbar/statusbar";
namespace framework
{
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index 59687abbeefb..c24e65959cfb 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -91,8 +91,8 @@
#include <classes/taskcreator.hxx>
#include <tools/fileutil.hxx>
-const char PROP_TYPES[] = "Types";
-const char PROP_NAME[] = "Name";
+const OUStringLiteral PROP_TYPES = u"Types";
+const OUStringLiteral PROP_NAME = u"Name";
namespace framework {
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index c7cdabb4e365..10b8574d6155 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -995,30 +995,30 @@ private:
};
// recovery.xcu
-const char CFG_PACKAGE_RECOVERY[] = "org.openoffice.Office.Recovery/";
+const OUStringLiteral CFG_PACKAGE_RECOVERY = u"org.openoffice.Office.Recovery/";
const char CFG_ENTRY_AUTOSAVE_ENABLED[] = "AutoSave/Enabled";
const char CFG_ENTRY_AUTOSAVE_TIMEINTERVALL[] = "AutoSave/TimeIntervall"; //sic!
-const char CFG_ENTRY_REALDEFAULTFILTER[] = "ooSetupFactoryActualFilter";
+const OUStringLiteral CFG_ENTRY_REALDEFAULTFILTER = u"ooSetupFactoryActualFilter";
-const char CFG_ENTRY_PROP_TEMPURL[] = "TempURL";
-const char CFG_ENTRY_PROP_ORIGINALURL[] = "OriginalURL";
-const char CFG_ENTRY_PROP_TEMPLATEURL[] = "TemplateURL";
-const char CFG_ENTRY_PROP_FACTORYURL[] = "FactoryURL";
-const char CFG_ENTRY_PROP_MODULE[] = "Module";
-const char CFG_ENTRY_PROP_DOCUMENTSTATE[] = "DocumentState";
-const char CFG_ENTRY_PROP_FILTER[] = "Filter";
-const char CFG_ENTRY_PROP_TITLE[] = "Title";
-const char CFG_ENTRY_PROP_ID[] = "ID";
-const char CFG_ENTRY_PROP_VIEWNAMES[] = "ViewNames";
+const OUStringLiteral CFG_ENTRY_PROP_TEMPURL = u"TempURL";
+const OUStringLiteral CFG_ENTRY_PROP_ORIGINALURL = u"OriginalURL";
+const OUStringLiteral CFG_ENTRY_PROP_TEMPLATEURL = u"TemplateURL";
+const OUStringLiteral CFG_ENTRY_PROP_FACTORYURL = u"FactoryURL";
+const OUStringLiteral CFG_ENTRY_PROP_MODULE = u"Module";
+const OUStringLiteral CFG_ENTRY_PROP_DOCUMENTSTATE = u"DocumentState";
+const OUStringLiteral CFG_ENTRY_PROP_FILTER = u"Filter";
+const OUStringLiteral CFG_ENTRY_PROP_TITLE = u"Title";
+const OUStringLiteral CFG_ENTRY_PROP_ID = u"ID";
+const OUStringLiteral CFG_ENTRY_PROP_VIEWNAMES = u"ViewNames";
-const char FILTER_PROP_TYPE[] = "Type";
-const char TYPE_PROP_EXTENSIONS[] = "Extensions";
+const OUStringLiteral FILTER_PROP_TYPE = u"Type";
+const OUStringLiteral TYPE_PROP_EXTENSIONS = u"Extensions";
// setup.xcu
-const char CFG_ENTRY_PROP_EMPTYDOCUMENTURL[] = "ooSetupFactoryEmptyDocumentURL";
-const char CFG_ENTRY_PROP_FACTORYSERVICE[] = "ooSetupFactoryDocumentService";
+const OUStringLiteral CFG_ENTRY_PROP_EMPTYDOCUMENTURL = u"ooSetupFactoryEmptyDocumentURL";
+const OUStringLiteral CFG_ENTRY_PROP_FACTORYSERVICE = u"ooSetupFactoryDocumentService";
const char EVENT_ON_NEW[] = "OnNew";
const char EVENT_ON_LOAD[] = "OnLoad";
@@ -1034,7 +1034,7 @@ const char EVENT_ON_SAVEFAILED[] = "OnSaveFailed";
const char EVENT_ON_SAVEASFAILED[] = "OnSaveAsFailed";
const char EVENT_ON_SAVETOFAILED[] = "OnCopyToFailed";
-const char RECOVERY_ITEM_BASE_IDENTIFIER[] = "recovery_item_";
+const OUStringLiteral RECOVERY_ITEM_BASE_IDENTIFIER = u"recovery_item_";
const char CMD_PROTOCOL[] = "vnd.sun.star.autorecovery:";
@@ -1050,17 +1050,17 @@ const char CMD_DO_SESSION_RESTORE[] = "/doSessionRestore"; // restore a saved
const char CMD_DO_DISABLE_RECOVERY[] = "/disableRecovery"; // disable recovery and auto save (!) temp. for this office session
const char CMD_DO_SET_AUTOSAVE_STATE[] = "/setAutoSaveState"; // disable/enable auto save (not crash save) for this office session
-const char REFERRER_USER[] = "private:user";
+const OUStringLiteral REFERRER_USER = u"private:user";
-const char PROP_DISPATCH_ASYNCHRON[] = "DispatchAsynchron";
-const char PROP_PROGRESS[] = "StatusIndicator";
-const char PROP_SAVEPATH[] = "SavePath";
-const char PROP_ENTRY_ID[] = "EntryID";
-const char PROP_AUTOSAVE_STATE[] = "AutoSaveState";
+const OUStringLiteral PROP_DISPATCH_ASYNCHRON = u"DispatchAsynchron";
+const OUStringLiteral PROP_PROGRESS = u"StatusIndicator";
+const OUStringLiteral PROP_SAVEPATH = u"SavePath";
+const OUStringLiteral PROP_ENTRY_ID = u"EntryID";
+const OUStringLiteral PROP_AUTOSAVE_STATE = u"AutoSaveState";
-const char OPERATION_START[] = "start";
-const char OPERATION_STOP[] = "stop";
-const char OPERATION_UPDATE[] = "update";
+const OUStringLiteral OPERATION_START = u"start";
+const OUStringLiteral OPERATION_STOP = u"stop";
+const OUStringLiteral OPERATION_UPDATE = u"update";
const sal_Int32 MIN_DISCSPACE_DOCSAVE = 5; // [MB]
const sal_Int32 MIN_DISCSPACE_CONFIGSAVE = 1; // [MB]
diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx
index 681ce8a4a7ba..6206aa3864f5 100644
--- a/framework/source/uiconfiguration/imagemanagerimpl.cxx
+++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx
@@ -64,8 +64,8 @@ using namespace ::cppu;
const sal_Int16 MAX_IMAGETYPE_VALUE = css::ui::ImageType::SIZE_32;
-const char IMAGE_FOLDER[] = "images";
-const char BITMAPS_FOLDER[] = "Bitmaps";
+const OUStringLiteral IMAGE_FOLDER = u"images";
+const OUStringLiteral BITMAPS_FOLDER = u"Bitmaps";
const o3tl::enumarray<vcl::ImageType, const char*> IMAGELIST_XML_FILE =
{
diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx
index 3d79087be85d..e0fd3d07f4d2 100644
--- a/framework/source/uielement/recentfilesmenucontroller.cxx
+++ b/framework/source/uielement/recentfilesmenucontroller.cxx
@@ -40,9 +40,9 @@ using namespace com::sun::star::util;
namespace {
-const char CMD_CLEAR_LIST[] = ".uno:ClearRecentFileList";
-const char CMD_OPEN_AS_TEMPLATE[] = ".uno:OpenTemplate";
-const char CMD_OPEN_REMOTE[] = ".uno:OpenRemote";
+const OUStringLiteral CMD_CLEAR_LIST = u".uno:ClearRecentFileList";
+const OUStringLiteral CMD_OPEN_AS_TEMPLATE = u".uno:OpenTemplate";
+const OUStringLiteral CMD_OPEN_REMOTE = u".uno:OpenRemote";
class RecentFilesMenuController : public svt::PopupMenuControllerBase
{
diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx
index 7cce1b37d29c..0689cd39aff2 100644
--- a/framework/source/uielement/toolbarsmenucontroller.cxx
+++ b/framework/source/uielement/toolbarsmenucontroller.cxx
@@ -68,9 +68,9 @@ using namespace ::com::sun::star::util;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::ui;
-const char CMD_RESTOREVISIBILITY[] = ".cmd:RestoreVisibility";
+const OUStringLiteral CMD_RESTOREVISIBILITY = u".cmd:RestoreVisibility";
-const char STATIC_CMD_PART[] = ".uno:AvailableToolbars?Toolbar:string=";
+const OUStringLiteral STATIC_CMD_PART = u".uno:AvailableToolbars?Toolbar:string=";
const char STATIC_INTERNAL_CMD_PART[] = ".cmd:";
namespace framework
diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx
index 28c606ea96a4..23ef0b8654f4 100644
--- a/framework/source/uielement/uicommanddescription.cxx
+++ b/framework/source/uielement/uicommanddescription.cxx
@@ -50,7 +50,7 @@ using namespace ::com::sun::star::frame;
const char CONFIGURATION_ROOT_ACCESS[] = "/org.openoffice.Office.UI.";
// Special resource URLs to retrieve additional information
-const char PRIVATE_RESOURCE_URL[] = "private:";
+const OUStringLiteral PRIVATE_RESOURCE_URL = u"private:";
const sal_Int32 COMMAND_PROPERTY_IMAGE = 1;
const sal_Int32 COMMAND_PROPERTY_ROTATE = 2;
diff --git a/i18npool/source/collator/chaptercollator.cxx b/i18npool/source/collator/chaptercollator.cxx
index fb4128a6c7c3..153f5ff3d38d 100644
--- a/i18npool/source/collator/chaptercollator.cxx
+++ b/i18npool/source/collator/chaptercollator.cxx
@@ -72,7 +72,7 @@ ChapterCollator::compareSubstring( const OUString& str1, sal_Int32 off1, sal_Int
return res1.Value == res2.Value ? 0 : res1.Value > res2.Value ? 1 : -1;
}
-const char cChapCollator[] = "com.sun.star.i18n.ChapterCollator";
+const OUStringLiteral cChapCollator = u"com.sun.star.i18n.ChapterCollator";
OUString SAL_CALL
ChapterCollator::getImplementationName()
diff --git a/i18npool/source/collator/collator_unicode.cxx b/i18npool/source/collator/collator_unicode.cxx
index dd273e687f21..f3ba3c062050 100644
--- a/i18npool/source/collator/collator_unicode.cxx
+++ b/i18npool/source/collator/collator_unicode.cxx
@@ -38,7 +38,7 @@ using namespace ::com::sun::star::uno;
namespace i18npool {
-const char implementationName[] = "com.sun.star.i18n.Collator_Unicode";
+const OUStringLiteral implementationName = u"com.sun.star.i18n.Collator_Unicode";
Collator_Unicode::Collator_Unicode()
{
diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
index d352aec6f9de..fd98a6bc32e3 100644
--- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
+++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
@@ -419,7 +419,7 @@ static
void lcl_formatPersianWord( sal_Int32 nNumber, OUString& rsResult )
{
OUStringBuffer aTemp(64);
- static const sal_Unicode asPersianWord_conjunction_data[] = u" \u0648 ";
+ static const OUStringLiteral asPersianWord_conjunction_data = u" \u0648 ";
OUString asPersianWord_conjunction( asPersianWord_conjunction_data );
unsigned char nSection = 0;
diff --git a/i18npool/source/indexentry/indexentrysupplier_ja_phonetic.cxx b/i18npool/source/indexentry/indexentrysupplier_ja_phonetic.cxx
index 214893a901d4..b4a9f3e0cda6 100644
--- a/i18npool/source/indexentry/indexentrysupplier_ja_phonetic.cxx
+++ b/i18npool/source/indexentry/indexentrysupplier_ja_phonetic.cxx
@@ -63,7 +63,7 @@ sal_Int16 SAL_CALL IndexEntrySupplier_ja_phonetic::compareIndexEntry(
return result;
}
-const char first[] = "phonetic (alphanumeric first)";
+const OUStringLiteral first = u"phonetic (alphanumeric first)";
sal_Bool SAL_CALL IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_syllable::loadAlgorithm(
const css::lang::Locale& rLocale, const OUString& /*SortAlgorithm*/,
sal_Int32 collatorOptions )
@@ -77,7 +77,7 @@ sal_Bool SAL_CALL IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_consonant
return collator->loadCollatorAlgorithm(first, rLocale, collatorOptions) == 0;
}
-const char last[] = "phonetic (alphanumeric last)";
+const OUStringLiteral last = u"phonetic (alphanumeric last)";
sal_Bool SAL_CALL IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_syllable::loadAlgorithm(
const css::lang::Locale& rLocale, const OUString& /*SortAlgorithm*/,
sal_Int32 collatorOptions )
diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx b/i18npool/source/nativenumber/nativenumbersupplier.cxx
index dbd3f77b7b4c..a745396782df 100644
--- a/i18npool/source/nativenumber/nativenumbersupplier.cxx
+++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx
@@ -1220,7 +1220,7 @@ OUString getCyrillicNativeNumberString(const OUString& aNumberString)
return aNumberString;
}
-const char implementationName[] = "com.sun.star.i18n.NativeNumberSupplier";
+const OUStringLiteral implementationName = u"com.sun.star.i18n.NativeNumberSupplier";
OUString SAL_CALL NativeNumberSupplierService::getImplementationName()
{
diff --git a/i18npool/source/ordinalsuffix/ordinalsuffix.cxx b/i18npool/source/ordinalsuffix/ordinalsuffix.cxx
index 6f7f966cbe01..38732564fd0c 100644
--- a/i18npool/source/ordinalsuffix/ordinalsuffix.cxx
+++ b/i18npool/source/ordinalsuffix/ordinalsuffix.cxx
@@ -134,7 +134,7 @@ uno::Sequence< OUString > SAL_CALL OrdinalSuffixService::getOrdinalSuffix( sal_I
return comphelper::containerToSequence(retVec);
}
-const char cOrdinalSuffix[] = "com.sun.star.i18n.OrdinalSuffix";
+const OUStringLiteral cOrdinalSuffix = u"com.sun.star.i18n.OrdinalSuffix";
OUString SAL_CALL OrdinalSuffixService::getImplementationName()
{
diff --git a/include/editeng/itemtype.hxx b/include/editeng/itemtype.hxx
index 2e2115eb7766..470bd99f16f2 100644
--- a/include/editeng/itemtype.hxx
+++ b/include/editeng/itemtype.hxx
@@ -29,7 +29,7 @@ class Color;
class IntlWrapper;
// static and prototypes -------------------------------------------------
-const sal_Unicode cpDelim[] = u", ";
+inline const OUStringLiteral cpDelim = u", ";
EDITENG_DLLPUBLIC OUString GetMetricText( tools::Long nVal, MapUnit eSrcUnit, MapUnit eDestUnit, const IntlWrapper * pIntl );
OUString GetColorString( const Color& rCol );
diff --git a/include/vcl/filter/PDFiumLibrary.hxx b/include/vcl/filter/PDFiumLibrary.hxx
index 5dc8ea46fede..32a9a68a55cc 100644
--- a/include/vcl/filter/PDFiumLibrary.hxx
+++ b/include/vcl/filter/PDFiumLibrary.hxx
@@ -40,11 +40,11 @@ class SvMemoryStream;
namespace vcl::pdf
{
-constexpr char constDictionaryKeyTitle[] = "T";
-constexpr char constDictionaryKeyContents[] = "Contents";
-constexpr char constDictionaryKeyPopup[] = "Popup";
-constexpr char constDictionaryKeyModificationDate[] = "M";
-constexpr char constDictionaryKeyInteriorColor[] = "IC";
+inline constexpr OStringLiteral constDictionaryKeyTitle = "T";
+inline constexpr OStringLiteral constDictionaryKeyContents = "Contents";
+inline constexpr OStringLiteral constDictionaryKeyPopup = "Popup";
+inline constexpr OStringLiteral constDictionaryKeyModificationDate = "M";
+inline constexpr OStringLiteral constDictionaryKeyInteriorColor = "IC";
class PDFiumBitmap;
class PDFiumDocument;
diff --git a/lotuswordpro/qa/cppunit/import_test.cxx b/lotuswordpro/qa/cppunit/import_test.cxx
index 6c629cb6031b..6963ba5d5a76 100644
--- a/lotuswordpro/qa/cppunit/import_test.cxx
+++ b/lotuswordpro/qa/cppunit/import_test.cxx
@@ -51,7 +51,7 @@ void LotusWordProTest::tearDown()
test::BootstrapFixture::tearDown();
}
-char const DATA_DIRECTORY[] = "/lotuswordpro/qa/cppunit/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/lotuswordpro/qa/cppunit/data/";
CPPUNIT_TEST_FIXTURE(LotusWordProTest, testTdf129993)
{
diff --git a/lotuswordpro/source/filter/lwpsilverbullet.cxx b/lotuswordpro/source/filter/lwpsilverbullet.cxx
index 76b4810c1427..457df875c948 100644
--- a/lotuswordpro/source/filter/lwpsilverbullet.cxx
+++ b/lotuswordpro/source/filter/lwpsilverbullet.cxx
@@ -282,19 +282,19 @@ OUString LwpSilverBullet::GetNumCharByStyleID(LwpFribParaNumber const * pParaNum
break;
case NUMCHAR_Chinese1:
{
- sal_Unicode const sBuf[13] = u"\u58f9\u002c\u0020\u8d30, \u53c1, ...";
+ static OUStringLiteral const sBuf = u"\u58f9\u002c\u0020\u8d30, \u53c1, ...";
strNumChar = OUString(sBuf);
}
break;
case NUMCHAR_Chinese2:
{
- sal_Unicode const sBuf[13] = u"\u4e00, \u4e8c, \u4e09, ...";
+ static OUStringLiteral const sBuf = u"\u4e00, \u4e8c, \u4e09, ...";
strNumChar = OUString(sBuf);
}
break;
case NUMCHAR_Chinese3:
{
- sal_Unicode const sBuf[13] = u"\u7532, \u4e59, \u4e19, ...";
+ static OUStringLiteral const sBuf = u"\u7532, \u4e59, \u4e19, ...";
strNumChar = OUString(sBuf);
}
break;
diff --git a/oox/qa/unit/drawingml.cxx b/oox/qa/unit/drawingml.cxx
index c7e72d458194..e5896b0b49ed 100644
--- a/oox/qa/unit/drawingml.cxx
+++ b/oox/qa/unit/drawingml.cxx
@@ -95,7 +95,7 @@ void OoxDrawingmlTest::loadAndReload(const OUString& rURL, const OUString& rFilt
mxComponent = loadFromDesktop(aTempFile.GetURL());
}
-char const DATA_DIRECTORY[] = "/oox/qa/unit/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/oox/qa/unit/data/";
CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTransparentText)
{
diff --git a/oox/qa/unit/mathml.cxx b/oox/qa/unit/mathml.cxx
index bb629ccc9097..87bdcaee3d9a 100644
--- a/oox/qa/unit/mathml.cxx
+++ b/oox/qa/unit/mathml.cxx
@@ -42,7 +42,7 @@ void OoxMathmlTest::tearDown()
test::BootstrapFixture::tearDown();
}
-char const DATA_DIRECTORY[] = "/oox/qa/unit/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/oox/qa/unit/data/";
CPPUNIT_TEST_FIXTURE(OoxMathmlTest, testImportCharacters)
{
diff --git a/oox/qa/unit/shape.cxx b/oox/qa/unit/shape.cxx
index a57c779d00fd..24ec173ce9d5 100644
--- a/oox/qa/unit/shape.cxx
+++ b/oox/qa/unit/shape.cxx
@@ -18,7 +18,7 @@
using namespace ::com::sun::star;
-char const DATA_DIRECTORY[] = "/oox/qa/unit/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/oox/qa/unit/data/";
/// oox shape tests.
class OoxShapeTest : public test::BootstrapFixture, public unotest::MacrosTest
diff --git a/oox/qa/unit/vml.cxx b/oox/qa/unit/vml.cxx
index ec64a08c3fcf..d6e79a3da956 100644
--- a/oox/qa/unit/vml.cxx
+++ b/oox/qa/unit/vml.cxx
@@ -19,7 +19,7 @@
using namespace ::com::sun::star;
-char const DATA_DIRECTORY[] = "/oox/qa/unit/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/oox/qa/unit/data/";
/// oox vml tests.
class OoxVmlTest : public test::BootstrapFixture, public unotest::MacrosTest
diff --git a/oox/source/ole/oleobjecthelper.cxx b/oox/source/ole/oleobjecthelper.cxx
index 6716ac1ebb29..5cc2b789778a 100644
--- a/oox/source/ole/oleobjecthelper.cxx
+++ b/oox/source/ole/oleobjecthelper.cxx
@@ -89,7 +89,7 @@ void SaveInteropProperties(uno::Reference<frame::XModel> const& xModel,
OUString const& rObjectName, OUString const*const pOldObjectName,
OUString const& rProgId)
{
- static const char sEmbeddingsPropName[] = "EmbeddedObjects";
+ static const OUStringLiteral sEmbeddingsPropName = u"EmbeddedObjects";
// get interop grab bag from document
uno::Reference<beans::XPropertySet> const xDocProps(xModel, uno::UNO_QUERY);
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index 4ae9e44be52b..e7f97aec9f83 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -1278,7 +1278,7 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS
uno::Reference< beans::XPropertySet> xProp(_xStorageToSaveTo,uno::UNO_QUERY);
if ( xProp.is() )
{
- static const char sPropName[] = "MediaType";
+ static const OUStringLiteral sPropName = u"MediaType";
OUString sOldMediaType;
xProp->getPropertyValue(sPropName) >>= sOldMediaType;
if ( !xProp->getPropertyValue(sPropName).hasValue() || sOldMediaType.isEmpty() || MIMETYPE_OASIS_OPENDOCUMENT_REPORT_ASCII != sOldMediaType )
diff --git a/reportdesign/source/core/api/ReportEngineJFree.cxx b/reportdesign/source/core/api/ReportEngineJFree.cxx
index d8ead8f8eb88..a60c59b20fa2 100644
--- a/reportdesign/source/core/api/ReportEngineJFree.cxx
+++ b/reportdesign/source/core/api/ReportEngineJFree.cxx
@@ -130,7 +130,7 @@ OUString OReportEngineJFree::getNewOutputName()
if ( !m_xReport.is() || !m_xActiveConnection.is() )
throw lang::IllegalArgumentException();
- static const char s_sMediaType[] = "MediaType";
+ static const OUStringLiteral s_sMediaType = u"MediaType";
MimeConfigurationHelper aConfighelper(m_xContext);
const OUString sMimeType = m_xReport->getMimeType();
diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
index 31bfb04f08e9..ed93930bebb7 100644
--- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
@@ -345,7 +345,7 @@ void ExportDocumentHandler::exportTableRows()
const OUString sRElement(lcl_createAttribute(XML_NP_RPT,XML_REPORT_ELEMENT) );
const OUString sRComponent( lcl_createAttribute(XML_NP_RPT,XML_REPORT_COMPONENT) ) ;
const OUString sFormulaAttrib( lcl_createAttribute(XML_NP_RPT,XML_FORMULA) );
- static const char s_sFloat[] = "float";
+ static const OUStringLiteral s_sFloat = u"float";
SvXMLAttributeList* pCellAtt = new SvXMLAttributeList();
uno::Reference< xml::sax::XAttributeList > xCellAtt = pCellAtt;
diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
index 81ff22b0b26a..72da191b0710 100644
--- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
@@ -340,7 +340,7 @@ void SAL_CALL ImportDocumentHandler::initialize( const uno::Sequence< uno::Any >
m_xDatabaseDataProvider.set(m_xModel->getDataProvider(),uno::UNO_QUERY);
if ( !m_xDatabaseDataProvider.is() )
{
- static const char s_sDatabaseDataProvider[] = "com.sun.star.chart2.data.DatabaseDataProvider";
+ static const OUStringLiteral s_sDatabaseDataProvider = u"com.sun.star.chart2.data.DatabaseDataProvider";
m_xDatabaseDataProvider.set(m_xContext->getServiceManager()->createInstanceWithContext(s_sDatabaseDataProvider
,m_xContext),uno::UNO_QUERY_THROW);
m_xDatabaseDataProvider->setRowLimit(10);
diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx
index 808b276fba92..cf9ff3c7bc02 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -417,7 +417,7 @@ bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
aArgs[0] <<= beans::NamedValue("Storage",uno::makeAny(xStorage));
xEmbeddedObjectResolver.set( xReportServiceFactory->createInstanceWithArguments("com.sun.star.document.ImportEmbeddedObjectResolver",aArgs) , uno::UNO_QUERY);
- static const char s_sOld[] = "OldFormat";
+ static const OUStringLiteral s_sOld = u"OldFormat";
static comphelper::PropertyMapEntry const pMap[] =
{
{ OUString("OldFormat") , 1, cppu::UnoType<sal_Bool>::get(), beans::PropertyAttribute::BOUND, 0 },
@@ -436,8 +436,8 @@ bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
xProp->setPropertyValue("StreamRelPath", uno::makeAny(sHierarchicalDocumentName));
uno::Reference<XComponent> xModel = GetModel();
- static const char s_sMeta[] = "meta.xml";
- static const char s_sStreamName[] = "StreamName";
+ static const OUStringLiteral s_sMeta = u"meta.xml";
+ static const OUStringLiteral s_sStreamName = u"StreamName";
xProp->setPropertyValue(s_sStreamName, uno::makeAny(OUString(s_sMeta)));
ErrCode nRet = ReadThroughComponent( xStorage
,xModel
@@ -758,7 +758,7 @@ bool ORptFilter::isOldFormat() const
uno::Reference<beans::XPropertySet> xProp = getImportInfo();
if ( xProp.is() )
{
- static const char s_sOld[] = "OldFormat";
+ static const OUStringLiteral s_sOld = u"OldFormat";
if ( xProp->getPropertySetInfo()->hasPropertyByName(s_sOld))
{
xProp->getPropertyValue(s_sOld) >>= bOldFormat;
diff --git a/sal/qa/rtl/uri/rtl_testuri.cxx b/sal/qa/rtl/uri/rtl_testuri.cxx
index e2d076b19127..3cc366a9336d 100644
--- a/sal/qa/rtl/uri/rtl_testuri.cxx
+++ b/sal/qa/rtl/uri/rtl_testuri.cxx
@@ -358,7 +358,7 @@ void Test::test_Uri() {
// Check encode with unusual text encodings:
{
- sal_Unicode const aText1U[] = u" !\u0401\u045F";
+ static OUStringLiteral const aText1U = u" !\u0401\u045F";
aText1 = OUString(aText1U);
aText2 = "%20!%A1%FF";
CPPUNIT_ASSERT_EQUAL_MESSAGE(
@@ -374,9 +374,9 @@ void Test::test_Uri() {
aText2, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_ISO_8859_5));
}
{
- sal_Unicode const aText1U[] = u" !\u0401\u0700\u045F";
+ static OUStringLiteral const aText1U = u" !\u0401\u0700\u045F";
aText1 = OUString(aText1U);
- sal_Unicode const aText2U[] =
+ static OUStringLiteral const aText2U =
u"%20!%A1\u0700%FF";
aText2 = OUString(aText2U);
CPPUNIT_ASSERT_EQUAL_MESSAGE(
@@ -393,7 +393,7 @@ void Test::test_Uri() {
}
#if WITH_LOCALE_ALL || WITH_LOCALE_zh
{
- sal_Unicode const aText1U[] = u" !\u028A\U00022513";
+ static OUStringLiteral const aText1U = u" !\u028A\U00022513";
aText1 = OUString(aText1U);
aText2 = "%20!%81%30%B1%33%95%39%C5%37";
CPPUNIT_ASSERT_EQUAL_MESSAGE(
@@ -412,7 +412,7 @@ void Test::test_Uri() {
// Check strict mode:
{
- sal_Unicode const aText1U[] = u" !\u0401\u0700\u045F";
+ static OUStringLiteral const aText1U = u" !\u0401\u0700\u045F";
aText1 = OUString(aText1U);
aText2 = OUString();
CPPUNIT_ASSERT_EQUAL_MESSAGE(
@@ -452,7 +452,7 @@ void Test::test_Uri() {
}
{
aText1 = "%81%30%B1%33";
- sal_Unicode const aText2U[] = u"\u028A";
+ static OUStringLiteral const aText2U = u"\u028A";
aText2 = OUString(aText2U);
CPPUNIT_ASSERT_EQUAL_MESSAGE(
"failure 27",
@@ -462,7 +462,7 @@ void Test::test_Uri() {
}
{
aText1 = "%810%B13";
- sal_Unicode const aText2U[] = u"\u028A";
+ static OUStringLiteral const aText2U = u"\u028A";
aText2 = OUString(aText2U);
CPPUNIT_ASSERT_EQUAL_MESSAGE(
"failure 28",
@@ -484,7 +484,7 @@ void Test::test_Uri() {
RTL_TEXTENCODING_UTF8));
}
{
- sal_Unicode const aText1U[] = u"\u00EA";
+ static OUStringLiteral const aText1U = u"\u00EA";
aText1 = OUString(aText1U);
aText2 = "%C3%AA";
CPPUNIT_ASSERT_EQUAL_MESSAGE(
@@ -495,7 +495,7 @@ void Test::test_Uri() {
RTL_TEXTENCODING_UTF8));
}
{
- sal_Unicode const aText1U[] = u" !\u0401\u0700\u045F";
+ static OUStringLiteral const aText1U = u" !\u0401\u0700\u045F";
aText1 = OUString(aText1U);
aText2 = OUString();
CPPUNIT_ASSERT_EQUAL_MESSAGE(
diff --git a/sc/qa/unit/helper/shared_test_impl.hxx b/sc/qa/unit/helper/shared_test_impl.hxx
index 92c05c6d7e9a..ae77d0ebf44e 100644
--- a/sc/qa/unit/helper/shared_test_impl.hxx
+++ b/sc/qa/unit/helper/shared_test_impl.hxx
@@ -278,11 +278,11 @@ void testCeilingFloor_Impl( ScDocument& rDoc )
{
// Original test case document is ceiling-floor.xlsx
// Sheet1.K1 has =AND(K3:K81) to evaluate all results.
- const char pORef[] = "Sheet1.K1";
+ static const OUStringLiteral pORef = u"Sheet1.K1";
ScAddress aPos;
aPos.Parse(pORef, rDoc);
ASSERT_FORMULA_EQUAL(rDoc, aPos, "AND(K3:K81)", "Wrong formula.");
- CPPUNIT_ASSERT_MESSAGE( OString( pORef + OStringLiteral(" result is error.")).getStr(),
+ CPPUNIT_ASSERT_MESSAGE( OUString( pORef + " result is error.").toUtf8().getStr(),
isFormulaWithoutError( rDoc, aPos));
CPPUNIT_ASSERT_EQUAL(1.0, rDoc.GetValue(aPos));
}
diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 2cf0bb5821e9..7d4dc617b1ef 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -56,7 +56,7 @@ static std::ostream& operator<<(std::ostream& os, ViewShellId const & id)
namespace
{
-char const DATA_DIRECTORY[] = "/sc/qa/unit/tiledrendering/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/sc/qa/unit/tiledrendering/data/";
class ScTiledRenderingTest : public test::BootstrapFixture, public unotest::MacrosTest, public XmlTestTools
{
diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index 2376779b32f7..69170a814a0e 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -59,7 +59,7 @@ void ScUiCalcTest::checkCurrentCell(SCCOL nCol, SCROW nRow)
CPPUNIT_ASSERT_EQUAL(sal_Int32(nRow), ScDocShell::GetViewData()->GetCurY());
}
-char const DATA_DIRECTORY[] = "/sc/qa/unit/uicalc/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/sc/qa/unit/uicalc/data/";
ScModelObj* ScUiCalcTest::createDoc(const char* pName)
{
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index 22d32a82597a..f8bb63325318 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -64,7 +64,7 @@
* be synchronized with Writer's SwTableAutoFmtTbl sw/source/core/doc/tblafmt.cxx
*/
-const char sAutoTblFmtName[] = "autotbl.fmt";
+const OUStringLiteral sAutoTblFmtName = u"autotbl.fmt";
// till SO5PF
const sal_uInt16 AUTOFORMAT_ID_X = 9501;
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 5a9915580725..7cb7cbf30b63 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -140,10 +140,10 @@ using ::std::vector;
// Filter names (like in sclib.cxx)
-const char pFilterSc50[] = "StarCalc 5.0";
+const OUStringLiteral pFilterSc50 = u"StarCalc 5.0";
const char pFilterXML[] = "StarOffice XML (Calc)";
-const char pFilterAscii[] = SC_TEXT_CSV_FILTER_NAME;
-const char pFilterLotus[] = "Lotus";
+const OUStringLiteral pFilterAscii = u"" SC_TEXT_CSV_FILTER_NAME;
+const OUStringLiteral pFilterLotus = u"Lotus";
const char pFilterQPro6[] = "Quattro Pro 6.0";
const char pFilterExcel4[] = "MS Excel 4.0";
const char pFilterEx4Temp[] = "MS Excel 4.0 Vorlage/Template";
@@ -153,11 +153,11 @@ const char pFilterExcel95[] = "MS Excel 95";
const char pFilterEx95Temp[] = "MS Excel 95 Vorlage/Template";
const char pFilterExcel97[] = "MS Excel 97";
const char pFilterEx97Temp[] = "MS Excel 97 Vorlage/Template";
-const char pFilterDBase[] = "dBase";
-const char pFilterDif[] = "DIF";
+const OUStringLiteral pFilterDBase = u"dBase";
+const OUStringLiteral pFilterDif = u"DIF";
const char pFilterSylk[] = "SYLK";
-const char pFilterHtml[] = "HTML (StarCalc)";
-const char pFilterHtmlWebQ[] = "calc_HTML_WebQuery";
+const OUStringLiteral pFilterHtml = u"HTML (StarCalc)";
+const OUStringLiteral pFilterHtmlWebQ = u"calc_HTML_WebQuery";
const char pFilterRtf[] = "Rich Text Format (StarCalc)";
#define ShellClass_ScDocShell
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 0dfd3e67840a..54fc6ea0765e 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -1119,7 +1119,7 @@ static bool lcl_PutString(
sal_Int16 nMonth = static_cast<sal_Int16>(aMStr.toInt32());
if (!nMonth)
{
- static const char aSepShortened[] = "SEP";
+ static const OUStringLiteral aSepShortened = u"SEP";
uno::Sequence< i18n::CalendarItem2 > xMonths;
sal_Int32 i, nMonthCount;
// first test all month names from local international
diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
index 43bc3b857346..5de763f8b4f4 100644
--- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
+++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
@@ -36,8 +36,8 @@
using namespace css;
using namespace css::uno;
-const char SETBORDERSTYLE[] = "SetBorderStyle";
-const char LINESTYLE[] = "LineStyle";
+const OStringLiteral SETBORDERSTYLE = "SetBorderStyle";
+const OStringLiteral LINESTYLE = "LineStyle";
// namespace open
diff --git a/sc/source/ui/vba/vbaborders.cxx b/sc/source/ui/vba/vbaborders.cxx
index 97034dec7a0b..be098444b670 100644
--- a/sc/source/ui/vba/vbaborders.cxx
+++ b/sc/source/ui/vba/vbaborders.cxx
@@ -42,7 +42,7 @@ typedef InheritedHelperInterfaceWeakImpl<excel::XBorder > ScVbaBorder_Base;
// borders, the enumeration will match the order in this list
const sal_Int16 supportedIndexTable[] = { XlBordersIndex::xlEdgeLeft, XlBordersIndex::xlEdgeTop, XlBordersIndex::xlEdgeBottom, XlBordersIndex::xlEdgeRight, XlBordersIndex::xlDiagonalDown, XlBordersIndex::xlDiagonalUp, XlBordersIndex::xlInsideVertical, XlBordersIndex::xlInsideHorizontal };
-const char sTableBorder[] = "TableBorder";
+const OUStringLiteral sTableBorder = u"TableBorder";
// Equiv widths in 1/100 mm
const sal_Int32 OOLineThin = 35;
diff --git a/sc/source/ui/vba/vbainterior.cxx b/sc/source/ui/vba/vbainterior.cxx
index c4897d92328c..6a38df7d8ba4 100644
--- a/sc/source/ui/vba/vbainterior.cxx
+++ b/sc/source/ui/vba/vbainterior.cxx
@@ -34,9 +34,9 @@ using namespace ::com::sun::star;
using namespace ::ooo::vba;
using namespace ::ooo::vba::excel::XlPattern;
-const char BACKCOLOR[] = "CellBackColor";
-const char PATTERN[] = "Pattern";
-const char PATTERNCOLOR[] = "PatternColor";
+const OUStringLiteral BACKCOLOR = u"CellBackColor";
+const OUStringLiteral PATTERN = u"Pattern";
+const OUStringLiteral PATTERNCOLOR = u"PatternColor";
static std::map< sal_Int32, sal_Int32 > aPatternMap {
{ xlPatternAutomatic, 0 },
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 323a4f394540..b67751245cc6 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -670,7 +670,7 @@ public:
}
-const char ISVISIBLE[] = "IsVisible";
+const OUStringLiteral ISVISIBLE = u"IsVisible";
const char EQUALS[] = "=";
const char NOTEQUALS[] = "<>";
const char GREATERTHAN[] = ">";
@@ -678,7 +678,7 @@ const char GREATERTHANEQUALS[] = ">=";
const char LESSTHAN[] = "<";
const char LESSTHANEQUALS[] = "<=";
constexpr OUStringLiteral STR_ERRORMESSAGE_APPLIESTOSINGLERANGEONLY(u"The command you chose cannot be performed with multiple selections.\nSelect a single range and click the command again");
-const char CELLSTYLE[] = "CellStyle";
+const OUStringLiteral CELLSTYLE = u"CellStyle";
namespace {
@@ -967,7 +967,7 @@ public:
}
-const char sNA[] = "#N/A";
+const OUStringLiteral sNA = u"#N/A";
namespace {
diff --git a/sc/source/ui/vba/vbastyle.cxx b/sc/source/ui/vba/vbastyle.cxx
index fa026a907f62..638ee7bdd734 100644
--- a/sc/source/ui/vba/vbastyle.cxx
+++ b/sc/source/ui/vba/vbastyle.cxx
@@ -25,7 +25,7 @@
using namespace ::ooo::vba;
using namespace ::com::sun::star;
-const char DISPLAYNAME[] = "DisplayName";
+const OUStringLiteral DISPLAYNAME = u"DisplayName";
uno::Reference< container::XNameAccess >
ScVbaStyle::getStylesNameContainer( const uno::Reference< frame::XModel >& xModel )
diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx
index 124aa905ebb3..62f612baa53b 100644
--- a/scripting/source/dlgprov/dlgprov.cxx
+++ b/scripting/source/dlgprov/dlgprov.cxx
@@ -555,7 +555,7 @@ namespace dlgprov
// XDialogProvider
- const char aDecorationPropName[] = "Decoration";
+ const OUStringLiteral aDecorationPropName = u"Decoration";
Reference < XControl > DialogProviderImpl::createDialogImpl(
const OUString& URL, const Reference< XInterface >& xHandler,
diff --git a/sd/qa/filter/eppt/eppt.cxx b/sd/qa/filter/eppt/eppt.cxx
index d1d7cdd029c3..491d243b7bb8 100644
--- a/sd/qa/filter/eppt/eppt.cxx
+++ b/sd/qa/filter/eppt/eppt.cxx
@@ -48,7 +48,7 @@ void Test::tearDown()
test::BootstrapFixture::tearDown();
}
-char const DATA_DIRECTORY[] = "/sd/qa/filter/eppt/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/sd/qa/filter/eppt/data/";
CPPUNIT_TEST_FIXTURE(Test, testOOXMLCustomShapeBitmapFill)
{
diff --git a/sd/qa/unit/tiledrendering/LOKitSearchTest.cxx b/sd/qa/unit/tiledrendering/LOKitSearchTest.cxx
index e01ec99c3227..6397f8c25acc 100644
--- a/sd/qa/unit/tiledrendering/LOKitSearchTest.cxx
+++ b/sd/qa/unit/tiledrendering/LOKitSearchTest.cxx
@@ -36,7 +36,7 @@ using namespace css;
class LOKitSearchTest : public SdModelTestBase, public XmlTestTools
{
private:
- static constexpr char DATA_DIRECTORY[] = "/sd/qa/unit/tiledrendering/data/";
+ static constexpr OUStringLiteral DATA_DIRECTORY = u"/sd/qa/unit/tiledrendering/data/";
public:
LOKitSearchTest() = default;
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 73ab1f1b6b97..f8901d2a0f9d 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -61,7 +61,7 @@ using namespace css;
namespace
{
- char const DATA_DIRECTORY[] = "/sd/qa/unit/tiledrendering/data/";
+ OUStringLiteral const DATA_DIRECTORY = u"/sd/qa/unit/tiledrendering/data/";
}
static std::ostream& operator<<(std::ostream& os, ViewShellId id)
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index bcd21c6e8074..85a37b6b7d1d 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -2222,8 +2222,8 @@ OUString const & HtmlExport::getDocumentTitle()
return mDocTitle;
}
-const char JS_NavigateAbs[] =
- "function NavigateAbs( nPage )\r\n"
+const OUStringLiteral JS_NavigateAbs =
+ u"function NavigateAbs( nPage )\r\n"
"{\r\n"
" frames[\"show\"].location.href = \"img\" + nPage + \".$EXT\";\r\n"
" //frames[\"notes\"].location.href = \"note\" + nPage + \".$EXT\";\r\n"
diff --git a/sd/source/ui/framework/factories/PresentationFactory.cxx b/sd/source/ui/framework/factories/PresentationFactory.cxx
index 7384b8612fbb..cb1bcf5b88a0 100644
--- a/sd/source/ui/framework/factories/PresentationFactory.cxx
+++ b/sd/source/ui/framework/factories/PresentationFactory.cxx
@@ -86,7 +86,7 @@ private:
//===== PresentationFactory ===================================================
-const char gsPresentationViewURL[] = "private:resource/view/Presentation";
+const OUStringLiteral gsPresentationViewURL = u"private:resource/view/Presentation";
PresentationFactory::PresentationFactory (
const Reference<frame::XController>& rxController)
diff --git a/sd/source/ui/inc/unokywds.hxx b/sd/source/ui/inc/unokywds.hxx
index 6fa44746e00d..07ba9cd3e3ec 100644
--- a/sd/source/ui/inc/unokywds.hxx
+++ b/sd/source/ui/inc/unokywds.hxx
@@ -23,18 +23,18 @@
#include <sal/config.h>
// SdUnoPseudoStyleFamily
-inline const char sUNO_PseudoSheet_Background[] = "background";
+inline const OUStringLiteral sUNO_PseudoSheet_Background = u"background";
// SdLayer
-inline const char sUNO_LayerName_background[] = "background";
-inline const char sUNO_LayerName_background_objects[] = "backgroundobjects";
-inline const char sUNO_LayerName_layout[] = "layout";
-inline const char sUNO_LayerName_controls[] = "controls";
-inline const char sUNO_LayerName_measurelines[] = "measurelines";
+inline const OUStringLiteral sUNO_LayerName_background = u"background";
+inline const OUStringLiteral sUNO_LayerName_background_objects = u"backgroundobjects";
+inline const OUStringLiteral sUNO_LayerName_layout = u"layout";
+inline const OUStringLiteral sUNO_LayerName_controls = u"controls";
+inline const OUStringLiteral sUNO_LayerName_measurelines = u"measurelines";
// services
-inline const char sUNO_Service_FillProperties[] = "com.sun.star.drawing.FillProperties";
-inline const char sUNO_Service_PageBackground[] = "com.sun.star.drawing.PageBackground";
+inline const OUStringLiteral sUNO_Service_FillProperties = u"com.sun.star.drawing.FillProperties";
+inline const OUStringLiteral sUNO_Service_PageBackground = u"com.sun.star.drawing.PageBackground";
inline const char sUNO_Service_ImageMapRectangleObject[]
= "com.sun.star.image.ImageMapRectangleObject";
inline const char sUNO_Service_ImageMapCircleObject[] = "com.sun.star.image.ImageMapCircleObject";
@@ -58,53 +58,54 @@ inline const char16_t sUNO_Prop_InteropGrabBag[] = u"InteropGrabBag";
// view settings
inline const char sUNO_View_ViewId[] = "ViewId";
-inline const char sUNO_View_SnapLinesDrawing[] = "SnapLinesDrawing";
-inline const char sUNO_View_SnapLinesNotes[] = "SnapLinesNotes";
-inline const char sUNO_View_SnapLinesHandout[] = "SnapLinesHandout";
-inline const char sUNO_View_RulerIsVisible[] = "RulerIsVisible";
-inline const char sUNO_View_PageKind[] = "PageKind";
-inline const char sUNO_View_SelectedPage[] = "SelectedPage";
-inline const char sUNO_View_IsLayerMode[] = "IsLayerMode";
-inline const char sUNO_View_IsDoubleClickTextEdit[] = "IsDoubleClickTextEdit";
-inline const char sUNO_View_IsClickChangeRotation[] = "IsClickChangeRotation";
-inline const char sUNO_View_SlidesPerRow[] = "SlidesPerRow";
-inline const char sUNO_View_EditMode[] = "EditMode";
+inline const OUStringLiteral sUNO_View_SnapLinesDrawing = u"SnapLinesDrawing";
+inline const OUStringLiteral sUNO_View_SnapLinesNotes = u"SnapLinesNotes";
+inline const OUStringLiteral sUNO_View_SnapLinesHandout = u"SnapLinesHandout";
+inline const OUStringLiteral sUNO_View_RulerIsVisible = u"RulerIsVisible";
+inline const OUStringLiteral sUNO_View_PageKind = u"PageKind";
+inline const OUStringLiteral sUNO_View_SelectedPage = u"SelectedPage";
+inline const OUStringLiteral sUNO_View_IsLayerMode = u"IsLayerMode";
+inline const OUStringLiteral sUNO_View_IsDoubleClickTextEdit = u"IsDoubleClickTextEdit";
+inline const OUStringLiteral sUNO_View_IsClickChangeRotation = u"IsClickChangeRotation";
+inline const OUStringLiteral sUNO_View_SlidesPerRow = u"SlidesPerRow";
+inline const OUStringLiteral sUNO_View_EditMode = u"EditMode";
inline const char sUNO_View_EditModeStandard[] = "EditModeStandard"; // To be deprecated
// inline const char sUNO_View_EditModeNotes[] = "EditModeNotes";
// inline const char sUNO_View_EditModeHandout[] = "EditModeHandout";
-inline const char sUNO_View_GridIsVisible[] = "GridIsVisible";
-inline const char sUNO_View_GridIsFront[] = "GridIsFront";
-inline const char sUNO_View_IsSnapToGrid[] = "IsSnapToGrid";
-inline const char sUNO_View_IsSnapToPageMargins[] = "IsSnapToPageMargins";
-inline const char sUNO_View_IsSnapToSnapLines[] = "IsSnapToSnapLines";
-inline const char sUNO_View_IsSnapToObjectFrame[] = "IsSnapToObjectFrame";
-inline const char sUNO_View_IsSnapToObjectPoints[] = "IsSnapToObjectPoints";
-inline const char sUNO_View_IsPlusHandlesAlwaysVisible[] = "IsPlusHandlesAlwaysVisible";
-inline const char sUNO_View_IsFrameDragSingles[] = "IsFrameDragSingles";
-inline const char sUNO_View_EliminatePolyPointLimitAngle[] = "EliminatePolyPointLimitAngle";
-inline const char sUNO_View_IsEliminatePolyPoints[] = "IsEliminatePolyPoints";
+inline const OUStringLiteral sUNO_View_GridIsVisible = u"GridIsVisible";
+inline const OUStringLiteral sUNO_View_GridIsFront = u"GridIsFront";
+inline const OUStringLiteral sUNO_View_IsSnapToGrid = u"IsSnapToGrid";
+inline const OUStringLiteral sUNO_View_IsSnapToPageMargins = u"IsSnapToPageMargins";
+inline const OUStringLiteral sUNO_View_IsSnapToSnapLines = u"IsSnapToSnapLines";
+inline const OUStringLiteral sUNO_View_IsSnapToObjectFrame = u"IsSnapToObjectFrame";
+inline const OUStringLiteral sUNO_View_IsSnapToObjectPoints = u"IsSnapToObjectPoints";
+inline const OUStringLiteral sUNO_View_IsPlusHandlesAlwaysVisible = u"IsPlusHandlesAlwaysVisible";
+inline const OUStringLiteral sUNO_View_IsFrameDragSingles = u"IsFrameDragSingles";
+inline const OUStringLiteral sUNO_View_EliminatePolyPointLimitAngle
+ = u"EliminatePolyPointLimitAngle";
+inline const OUStringLiteral sUNO_View_IsEliminatePolyPoints = u"IsEliminatePolyPoints";
inline const char sUNO_View_ActiveLayer[] = "ActiveLayer";
-inline const char sUNO_View_NoAttribs[] = "NoAttribs";
-inline const char sUNO_View_NoColors[] = "NoColors";
-inline const char sUNO_View_GridCoarseWidth[] = "GridCoarseWidth";
-inline const char sUNO_View_GridCoarseHeight[] = "GridCoarseHeight";
-inline const char sUNO_View_GridFineWidth[] = "GridFineWidth";
-inline const char sUNO_View_GridFineHeight[] = "GridFineHeight";
-inline const char sUNO_View_IsAngleSnapEnabled[] = "IsAngleSnapEnabled";
-inline const char sUNO_View_SnapAngle[] = "SnapAngle";
-inline const char sUNO_View_GridSnapWidthXNumerator[] = "GridSnapWidthXNumerator";
-inline const char sUNO_View_GridSnapWidthXDenominator[] = "GridSnapWidthXDenominator";
-inline const char sUNO_View_GridSnapWidthYNumerator[] = "GridSnapWidthYNumerator";
-inline const char sUNO_View_GridSnapWidthYDenominator[] = "GridSnapWidthYDenominator";
-inline const char sUNO_View_VisibleLayers[] = "VisibleLayers";
-inline const char sUNO_View_PrintableLayers[] = "PrintableLayers";
-inline const char sUNO_View_LockedLayers[] = "LockedLayers";
+inline const OUStringLiteral sUNO_View_NoAttribs = u"NoAttribs";
+inline const OUStringLiteral sUNO_View_NoColors = u"NoColors";
+inline const OUStringLiteral sUNO_View_GridCoarseWidth = u"GridCoarseWidth";
+inline const OUStringLiteral sUNO_View_GridCoarseHeight = u"GridCoarseHeight";
+inline const OUStringLiteral sUNO_View_GridFineWidth = u"GridFineWidth";
+inline const OUStringLiteral sUNO_View_GridFineHeight = u"GridFineHeight";
+inline const OUStringLiteral sUNO_View_IsAngleSnapEnabled = u"IsAngleSnapEnabled";
+inline const OUStringLiteral sUNO_View_SnapAngle = u"SnapAngle";
+inline const OUStringLiteral sUNO_View_GridSnapWidthXNumerator = u"GridSnapWidthXNumerator";
+inline const OUStringLiteral sUNO_View_GridSnapWidthXDenominator = u"GridSnapWidthXDenominator";
+inline const OUStringLiteral sUNO_View_GridSnapWidthYNumerator = u"GridSnapWidthYNumerator";
+inline const OUStringLiteral sUNO_View_GridSnapWidthYDenominator = u"GridSnapWidthYDenominator";
+inline const OUStringLiteral sUNO_View_VisibleLayers = u"VisibleLayers";
+inline const OUStringLiteral sUNO_View_PrintableLayers = u"PrintableLayers";
+inline const OUStringLiteral sUNO_View_LockedLayers = u"LockedLayers";
-inline const char sUNO_View_VisibleAreaTop[] = "VisibleAreaTop";
-inline const char sUNO_View_VisibleAreaLeft[] = "VisibleAreaLeft";
-inline const char sUNO_View_VisibleAreaWidth[] = "VisibleAreaWidth";
-inline const char sUNO_View_VisibleAreaHeight[] = "VisibleAreaHeight";
+inline const OUStringLiteral sUNO_View_VisibleAreaTop = u"VisibleAreaTop";
+inline const OUStringLiteral sUNO_View_VisibleAreaLeft = u"VisibleAreaLeft";
+inline const OUStringLiteral sUNO_View_VisibleAreaWidth = u"VisibleAreaWidth";
+inline const OUStringLiteral sUNO_View_VisibleAreaHeight = u"VisibleAreaHeight";
inline const char sUNO_View_ZoomOnPage[] = "ZoomOnPage";
#endif
diff --git a/sd/source/ui/sidebar/MasterPagesSelector.cxx b/sd/source/ui/sidebar/MasterPagesSelector.cxx
index 3e176707fd06..ca0fd8ae490b 100644
--- a/sd/source/ui/sidebar/MasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/MasterPagesSelector.cxx
@@ -50,7 +50,7 @@ namespace sd::sidebar {
/** menu entry that is executed as default action when the left mouse button is
clicked over a master page.
*/
-const char gsDefaultClickAction[] = "applyselect";
+const OStringLiteral gsDefaultClickAction = "applyselect";
MasterPagesSelector::MasterPagesSelector (
vcl::Window* pParent,
diff --git a/sd/source/ui/tools/EventMultiplexer.cxx b/sd/source/ui/tools/EventMultiplexer.cxx
index d182a4cd7a9a..f3c881af253f 100644
--- a/sd/source/ui/tools/EventMultiplexer.cxx
+++ b/sd/source/ui/tools/EventMultiplexer.cxx
@@ -139,8 +139,8 @@ private:
DECL_LINK(SlideSorterSelectionChangeListener, LinkParamNone*, void);
};
-const char aCurrentPagePropertyName[] = "CurrentPage";
-const char aEditModePropertyName[] = "IsMasterPageMode";
+const OUStringLiteral aCurrentPagePropertyName = u"CurrentPage";
+const OUStringLiteral aEditModePropertyName = u"IsMasterPageMode";
//===== EventMultiplexer ======================================================
diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx
index 83a5e8f28967..697ea5d5910c 100644
--- a/sd/source/ui/unoidl/DrawController.cxx
+++ b/sd/source/ui/unoidl/DrawController.cxx
@@ -203,7 +203,7 @@ OUString SAL_CALL DrawController::getImplementationName( )
return "DrawController" ;
}
-const char ssServiceName[] = "com.sun.star.drawing.DrawingDocumentDrawView";
+const OUStringLiteral ssServiceName = u"com.sun.star.drawing.DrawingDocumentDrawView";
sal_Bool SAL_CALL DrawController::supportsService (const OUString& rsServiceName)
{
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index b082556d17b6..4a4f09cd50e3 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -102,7 +102,7 @@ enum WID_PAGE
}
-char const sEmptyPageName[sizeof("page")] = "page";
+OUStringLiteral const sEmptyPageName = u"page";
// this function stores the property maps for draw pages in impress and draw
static const SvxItemPropertySet* ImplGetDrawPagePropertySet( bool bImpress, PageKind ePageKind )
diff --git a/sdext/source/pdfimport/test/tests.cxx b/sdext/source/pdfimport/test/tests.cxx
index 128352ad2e72..58f3d332b4e0 100644
--- a/sdext/source/pdfimport/test/tests.cxx
+++ b/sdext/source/pdfimport/test/tests.cxx
@@ -226,7 +226,7 @@ namespace
CPPUNIT_ASSERT_MESSAGE( "Line width is 0",
rtl::math::approxEqual(rContext.LineWidth, 28.3) );
- const char sExportString[] = "m53570 7650-35430 24100";
+ static const OUStringLiteral sExportString = u"m53570 7650-35430 24100";
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Stroke is m535.7 518.5-354.3-241",
OUString(sExportString), basegfx::utils::exportToSvgD( aPath, true, true, false ) );
@@ -248,7 +248,7 @@ namespace
CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "Line width is 0",
0, rContext.LineWidth, 0.0000001 );
- const char sExportString[] = "m49890 5670.00000000001-35430 24090";
+ static const OUStringLiteral sExportString = u"m49890 5670.00000000001-35430 24090";
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Stroke is m49890 5670.00000000001-35430 24090",
OUString(sExportString), basegfx::utils::exportToSvgD( aPath, true, true, false ) );
@@ -305,7 +305,8 @@ namespace
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Font id is 0",
sal_Int32(0), rContext.FontId );
- const char sExportString[] = "m12050 49610c-4310 0-7800-3490-7800-7800 0-4300 "
+ static const OUStringLiteral sExportString
+ = u"m12050 49610c-4310 0-7800-3490-7800-7800 0-4300 "
"3490-7790 7800-7790 4300 0 7790 3490 7790 7790 0 4310-3490 7800-7790 7800z";
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Stroke is a 4-bezier circle",
OUString(sExportString), basegfx::utils::exportToSvgD( aPath, true, true, false ) );
diff --git a/sfx2/qa/cppunit/view.cxx b/sfx2/qa/cppunit/view.cxx
index b2c42b5d4e7e..5df7ffa18c37 100644
--- a/sfx2/qa/cppunit/view.cxx
+++ b/sfx2/qa/cppunit/view.cxx
@@ -24,7 +24,7 @@
using namespace com::sun::star;
-char const DATA_DIRECTORY[] = "/sfx2/qa/cppunit/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/sfx2/qa/cppunit/data/";
/// Covers sfx2/source/view/ fixes.
class Sfx2ViewTest : public test::BootstrapFixture, public unotest::MacrosTest
diff --git a/sfx2/source/control/emojicontrol.cxx b/sfx2/source/control/emojicontrol.cxx
index 850c87897974..67d097584645 100644
--- a/sfx2/source/control/emojicontrol.cxx
+++ b/sfx2/source/control/emojicontrol.cxx
@@ -26,15 +26,15 @@
#include <comphelper/dispatchcommand.hxx>
#include <officecfg/Office/Common.hxx>
-const char FILTER_PEOPLE[] = "people";
-const char FILTER_NATURE[] = "nature";
-const char FILTER_FOOD[] = "food";
-const char FILTER_ACTIVITY[] = "activity";
-const char FILTER_TRAVEL[] = "travel";
-const char FILTER_OBJECTS[] = "objects";
-const char FILTER_SYMBOLS[] = "symbols";
-const char FILTER_FLAGS[] = "flags";
-const char FILTER_UNICODE9[] = "unicode9";
+const OStringLiteral FILTER_PEOPLE = "people";
+const OStringLiteral FILTER_NATURE = "nature";
+const OStringLiteral FILTER_FOOD = "food";
+const OStringLiteral FILTER_ACTIVITY = "activity";
+const OStringLiteral FILTER_TRAVEL = "travel";
+const OStringLiteral FILTER_OBJECTS = "objects";
+const OStringLiteral FILTER_SYMBOLS = "symbols";
+const OStringLiteral FILTER_FLAGS = "flags";
+const OStringLiteral FILTER_UNICODE9 = "unicode9";
using namespace com::sun::star;
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
index cab0ebd4be6a..e1ed8755103f 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -57,7 +57,7 @@ using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::document;
-const char SERVICENAME_CFGREADACCESS[] = "com.sun.star.configuration.ConfigurationAccess";
+const OUStringLiteral SERVICENAME_CFGREADACCESS = u"com.sun.star.configuration.ConfigurationAccess";
// increase size of the text in the buttons on the left fMultiplier-times
float const g_fMultiplier = 1.4f;
diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx
index 0a931f4088ef..39664cc1d3b4 100644
--- a/sfx2/source/doc/DocumentMetadataAccess.cxx
+++ b/sfx2/source/doc/DocumentMetadataAccess.cxx
@@ -84,9 +84,9 @@ bool isValidNCName(std::u16string_view i_rIdref)
}
-const char s_content [] = "content.xml";
-const char s_styles [] = "styles.xml";
-const char s_manifest[] = "manifest.rdf";
+const OUStringLiteral s_content = u"content.xml";
+const OUStringLiteral s_styles = u"styles.xml";
+const OUStringLiteral s_manifest = u"manifest.rdf";
const char s_odfmime [] = "application/vnd.oasis.opendocument.";
diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx
index 962918897301..f26eae3b3add 100644
--- a/sfx2/source/doc/SfxDocumentMetaData.cxx
+++ b/sfx2/source/doc/SfxDocumentMetaData.cxx
@@ -403,13 +403,13 @@ const char* s_stdMetaList[] = {
nullptr
};
-const char s_nsXLink[] = "http://www.w3.org/1999/xlink";
-const char s_nsDC[] = "http://purl.org/dc/elements/1.1/";
-const char s_nsODF[] = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
-const char s_nsODFMeta[] = "urn:oasis:names:tc:opendocument:xmlns:meta:1.0";
+const OUStringLiteral s_nsXLink = u"http://www.w3.org/1999/xlink";
+const OUStringLiteral s_nsDC = u"http://purl.org/dc/elements/1.1/";
+const OUStringLiteral s_nsODF = u"urn:oasis:names:tc:opendocument:xmlns:office:1.0";
+const OUStringLiteral s_nsODFMeta = u"urn:oasis:names:tc:opendocument:xmlns:meta:1.0";
// const char* s_nsOOo = "http://openoffice.org/2004/office"; // not used (yet?)
-const char s_meta [] = "meta.xml";
+const OUStringLiteral s_meta = u"meta.xml";
bool isValidDate(const css::util::Date & i_rDate)
{
diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx
index 27d5134075ed..3bc794343f8c 100644
--- a/sfx2/source/doc/docfac.cxx
+++ b/sfx2/source/doc/docfac.cxx
@@ -133,7 +133,8 @@ void SfxObjectFactory::SetSystemTemplate( const OUString& rServiceName, const OU
static const int nMaxPathSize = 16000;
const OUString sConfPath = "Office/Factories/" + rServiceName;
- static const char PROP_DEF_TEMPL_CHANGED[] = "ooSetupFactorySystemDefaultTemplateChanged";
+ static const OUStringLiteral PROP_DEF_TEMPL_CHANGED
+ = u"ooSetupFactorySystemDefaultTemplateChanged";
static const char DEF_TPL_STR[] = "/soffice.";
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 42ad906e07d7..ad94a17e4231 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -110,9 +110,9 @@
#define STATUS_SAVEAS 2
#define STATUS_SAVEAS_STANDARDNAME 3
-const char aFilterNameString[] = "FilterName";
-const char aFilterOptionsString[] = "FilterOptions";
-const char aFilterDataString[] = "FilterData";
+const OUStringLiteral aFilterNameString = u"FilterName";
+const OUStringLiteral aFilterOptionsString = u"FilterOptions";
+const OUStringLiteral aFilterDataString = u"FilterData";
using namespace ::com::sun::star;
using namespace css::system;
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 13444e6b4280..1f4bd0dccfb4 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -54,10 +54,10 @@
#include <sfx2/strings.hrc>
-const char TM_SETTING_MANAGER[] = "TemplateManager";
-const char TM_SETTING_LASTFOLDER[] = "LastFolder";
-const char TM_SETTING_LASTAPPLICATION[] = "LastApplication";
-const char TM_SETTING_VIEWMODE[] = "ViewMode";
+const OUStringLiteral TM_SETTING_MANAGER = u"TemplateManager";
+const OUStringLiteral TM_SETTING_LASTFOLDER = u"LastFolder";
+const OUStringLiteral TM_SETTING_LASTAPPLICATION = u"LastApplication";
+const OUStringLiteral TM_SETTING_VIEWMODE = u"ViewMode";
#define MNI_ACTION_NEW_FOLDER "new"
#define MNI_ACTION_RENAME_FOLDER "rename"
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 83dbd0e561f4..e6cf00fe376f 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -65,7 +65,7 @@ using namespace css::uno;
namespace
{
- const char gsReadOnlyCommandName[] = ".uno:EditDoc";
+ const OUStringLiteral gsReadOnlyCommandName = u".uno:EditDoc";
const sal_Int32 gnWidthCloseThreshold (70);
const sal_Int32 gnWidthOpenThreshold (40);
diff --git a/solenv/CompilerTest_compilerplugins_clang.mk b/solenv/CompilerTest_compilerplugins_clang.mk
index 1dd0495e4d54..dc143526b9e4 100644
--- a/solenv/CompilerTest_compilerplugins_clang.mk
+++ b/solenv/CompilerTest_compilerplugins_clang.mk
@@ -86,6 +86,7 @@ $(eval $(call gb_CompilerTest_add_exception_objects,compilerplugins_clang, \
compilerplugins/clang/test/stringconcatauto \
compilerplugins/clang/test/stringconcatliterals \
compilerplugins/clang/test/stringconstant \
+ compilerplugins/clang/test/stringliteralvar \
compilerplugins/clang/test/stringloop \
compilerplugins/clang/test/stringstatic \
compilerplugins/clang/test/stringview \
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx
index 85365ad7bbd3..9a8f700af2ec 100644
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -1042,7 +1042,7 @@ void SmXMLExport::ExportAttributes(const SmNode* pNode, int nLevel)
{
//proper entity support required
SvXMLElementExport aMath(*this, XML_NAMESPACE_MATH, XML_MO, true, true);
- sal_Unicode const nArse[2] = u"\u00AF";
+ static OUStringLiteral const nArse = u"\u00AF";
GetDocHandler()->characters(nArse);
}
break;
@@ -1050,7 +1050,7 @@ void SmXMLExport::ExportAttributes(const SmNode* pNode, int nLevel)
{
//proper entity support required
SvXMLElementExport aMath(*this, XML_NAMESPACE_MATH, XML_MO, true, true);
- sal_Unicode const nArse[2] = u"\u0332";
+ static OUStringLiteral const nArse = u"\u0332";
GetDocHandler()->characters(nArse);
}
break;
diff --git a/stoc/source/security/access_controller.cxx b/stoc/source/security/access_controller.cxx
index 856c493a355f..055c9e5563e3 100644
--- a/stoc/source/security/access_controller.cxx
+++ b/stoc/source/security/access_controller.cxx
@@ -63,7 +63,7 @@ namespace {
// static stuff initialized when loading lib
OUString s_envType = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
-const char s_acRestriction[] = "access-control.restriction";
+const OUStringLiteral s_acRestriction = u"access-control.restriction";
/** ac context intersects permissions of two ac contexts
diff --git a/svgio/source/svgreader/svgtoken.cxx b/svgio/source/svgreader/svgtoken.cxx
index 3bb517d42021..590e85b0a96d 100644
--- a/svgio/source/svgreader/svgtoken.cxx
+++ b/svgio/source/svgreader/svgtoken.cxx
@@ -91,8 +91,8 @@ namespace svgio::svgreader
const char aSVGStrPatternTransform[] = "patternTransform";
const char aSVGStrOpacity[] = "opacity";
const char aSVGStrVisibility[] = "visibility";
- const char aSVGStrTitle[] = "title";
- const char aSVGStrDesc[] = "desc";
+ const OUStringLiteral aSVGStrTitle = u"title";
+ const OUStringLiteral aSVGStrDesc = u"desc";
const char aSVGStrPreserveAspectRatio[] = "preserveAspectRatio";
const char aSVGStrDefer[] = "defer";
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 92e62e87aeae..d8f755ba5be5 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -51,7 +51,7 @@ using namespace svt;
namespace {
-char const GREGORIAN[] = "gregorian";
+OUStringLiteral const GREGORIAN = u"gregorian";
const sal_uInt16 UPPER_PRECISION = 300; // entirely arbitrary...
const double EXP_LOWER_BOUND = 1.0E-4; // prefer scientific notation below this value.
diff --git a/svtools/source/config/fontsubstconfig.cxx b/svtools/source/config/fontsubstconfig.cxx
index e0fb350d8cba..e3c156fbfb36 100644
--- a/svtools/source/config/fontsubstconfig.cxx
+++ b/svtools/source/config/fontsubstconfig.cxx
@@ -32,13 +32,13 @@ using namespace com::sun::star::uno;
using namespace com::sun::star::beans;
-const char cReplacement[] = "Replacement";
-const char cFontPairs[] = "FontPairs";
+const OUStringLiteral cReplacement = u"Replacement";
+const OUStringLiteral cFontPairs = u"FontPairs";
-const char cReplaceFont[] = "ReplaceFont";
-const char cSubstituteFont[]= "SubstituteFont";
-const char cOnScreenOnly[] = "OnScreenOnly";
-const char cAlways[] = "Always";
+const OUStringLiteral cReplaceFont = u"ReplaceFont";
+const OUStringLiteral cSubstituteFont= u"SubstituteFont";
+const OUStringLiteral cOnScreenOnly = u"OnScreenOnly";
+const OUStringLiteral cAlways = u"Always";
typedef std::vector<SubstitutionStruct> SubstitutionStructArr;
diff --git a/svtools/source/misc/sampletext.cxx b/svtools/source/misc/sampletext.cxx
index b8fd11b2e744..e96962254521 100644
--- a/svtools/source/misc/sampletext.cxx
+++ b/svtools/source/misc/sampletext.cxx
@@ -150,14 +150,14 @@ OUString makeShortRepresentativeSymbolTextForSelectedFont(OutputDevice const &rD
{
if (rDevice.GetFont().GetFamilyName() == "Symbol")
{
- static const sal_Unicode aImplAppleSymbolText[] =
+ static const OUStringLiteral aImplAppleSymbolText =
u"\u03BC\u2202\u2211\u220F\u03C0\u222B\u03A9\u221A";
bool bHasSampleTextGlyphs
= (-1 == rDevice.HasGlyphs(rDevice.GetFont(), aImplAppleSymbolText));
//It's the Apple version
if (bHasSampleTextGlyphs)
return aImplAppleSymbolText;
- static const sal_Unicode aImplAdobeSymbolText[] =
+ static const OUStringLiteral aImplAdobeSymbolText =
u"\uF06D\uF0B6\uF0E5\uF0D5\uF070\uF0F2\uF057\uF0D6";
return aImplAdobeSymbolText;
}
diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx
index b8c9ba9b4a0d..e3da167c21bb 100644
--- a/svtools/source/uno/toolboxcontroller.cxx
+++ b/svtools/source/uno/toolboxcontroller.cxx
@@ -33,7 +33,7 @@
#include <comphelper/processfactory.hxx>
const int TOOLBARCONTROLLER_PROPHANDLE_SUPPORTSVISIBLE = 1;
-const char TOOLBARCONTROLLER_PROPNAME_SUPPORTSVISIBLE[] = "SupportsVisible";
+const OUStringLiteral TOOLBARCONTROLLER_PROPNAME_SUPPORTSVISIBLE = u"SupportsVisible";
using namespace ::cppu;
diff --git a/svtools/source/uno/unoevent.cxx b/svtools/source/uno/unoevent.cxx
index 5b24cffd068b..3094d9a297ee 100644
--- a/svtools/source/uno/unoevent.cxx
+++ b/svtools/source/uno/unoevent.cxx
@@ -33,13 +33,13 @@ using css::lang::IllegalArgumentException;
using css::beans::PropertyValue;
-const char sAPI_ServiceName[] = "com.sun.star.container.XNameReplace";
+const OUStringLiteral sAPI_ServiceName = u"com.sun.star.container.XNameReplace";
const char sEventType[] = "EventType";
const char sMacroName[] = "MacroName";
const char sLibrary[] = "Library";
-const char sStarBasic[] = "StarBasic";
-const char sScript[] = "Script";
-const char sNone[] = "None";
+const OUStringLiteral sStarBasic = u"StarBasic";
+const OUStringLiteral sScript = u"Script";
+const OUStringLiteral sNone = u"None";
namespace {
diff --git a/svx/qa/unit/unodraw.cxx b/svx/qa/unit/unodraw.cxx
index 938e44f9ca21..8220234c2ea5 100644
--- a/svx/qa/unit/unodraw.cxx
+++ b/svx/qa/unit/unodraw.cxx
@@ -38,7 +38,7 @@ using namespace ::com::sun::star;
namespace
{
-char const DATA_DIRECTORY[] = "/svx/qa/unit/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/svx/qa/unit/data/";
/// Tests for svx/source/unodraw/ code.
class UnodrawTest : public test::BootstrapFixture, public unotest::MacrosTest, public XmlTestTools
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx
index 6e4891d4f011..47c9a5179e31 100644
--- a/svx/source/accessibility/AccessibleShape.cxx
+++ b/svx/source/accessibility/AccessibleShape.cxx
@@ -493,8 +493,8 @@ awt::Rectangle SAL_CALL AccessibleShape::getBounds()
if ( mxShape.is() )
{
- static const char sBoundRectName[] = "BoundRect";
- static const char sAnchorPositionName[] = "AnchorPosition";
+ static const OUStringLiteral sBoundRectName = u"BoundRect";
+ static const OUStringLiteral sAnchorPositionName = u"AnchorPosition";
// Get the shape's bounding box in internal coordinates (in 100th of
// mm). Use the property BoundRect. Only if that is not supported ask
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index 27f5cbe31425..479378b2fe5f 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -1670,7 +1670,7 @@ void FmGridControl::InitColumnByField(
}
// the control type is determined by the ColumnServiceName
- static const char s_sPropColumnServiceName[] = "ColumnServiceName";
+ static const OUStringLiteral s_sPropColumnServiceName = u"ColumnServiceName";
if ( !::comphelper::hasProperty( s_sPropColumnServiceName, _rxColumnModel ) )
return;
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index cc1c314a781d..640457278dc2 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -82,8 +82,8 @@ using namespace ::dbtools;
using ::com::sun::star::util::XNumberFormatter;
-const char INVALIDTEXT[] = "###";
-const char OBJECTTEXT[] = "<OBJECT>";
+const OUStringLiteral INVALIDTEXT = u"###";
+const OUStringLiteral OBJECTTEXT = u"<OBJECT>";
//= helper
diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx
index 92d21e907c32..0ea146643a62 100644
--- a/svx/source/form/fmobj.cxx
+++ b/svx/source/form/fmobj.cxx
@@ -122,7 +122,7 @@ void FmFormObj::impl_checkRefDevice_nothrow( bool _force )
Reference< XPropertySet > xModelProps( GetUnoControlModel(), UNO_QUERY_THROW );
Reference< XPropertySetInfo > xPropertyInfo( xModelProps->getPropertySetInfo(), UNO_SET_THROW );
- static const char sRefDevicePropName[] = "ReferenceDevice";
+ static const OUStringLiteral sRefDevicePropName = u"ReferenceDevice";
if ( xPropertyInfo->hasPropertyByName( sRefDevicePropName ) )
{
VCLXDevice* pUnoRefDevice = new VCLXDevice;
diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx
index 355736067a75..6ce26d06d058 100644
--- a/svx/source/form/fmundo.cxx
+++ b/svx/source/form/fmundo.cxx
@@ -677,7 +677,7 @@ void SAL_CALL FmXUndoEnvironment::propertyChange(const PropertyChangeEvent& evt)
// TODO: we should cache all those things, else this might be too expensive.
// However, this requires we're notified of changes in the value binding
- static const char s_sExternalData[] = "ExternalData";
+ static const OUStringLiteral s_sExternalData = u"ExternalData";
if ( xBindingPropsPSI.is() && xBindingPropsPSI->hasPropertyByName( s_sExternalData ) )
{
bool bExternalData = true;
diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx
index edbe9ff49b93..a66e23ede35d 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -3552,7 +3552,7 @@ namespace
{
try
{
- static const char s_sFormsCheckRequiredFields[] = "FormsCheckRequiredFields";
+ static const OUStringLiteral s_sFormsCheckRequiredFields = u"FormsCheckRequiredFields";
// first, check whether the form has a property telling us the answer
// this allows people to use the XPropertyContainer interface of a form to control
diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx
index b265d039622c..9c8ef924390a 100644
--- a/svx/source/gallery2/gallery1.cxx
+++ b/svx/source/gallery2/gallery1.cxx
@@ -343,8 +343,8 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, bool& rbDirIsReadO
if( xContentAccess.is() )
{
- static const char s_sTitle[] = "Title";
- static const char s_sIsReadOnly[] = "IsReadOnly";
+ static const OUStringLiteral s_sTitle = u"Title";
+ static const OUStringLiteral s_sIsReadOnly = u"IsReadOnly";
while( xResultSet->next() )
{
diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
index 30c199144e8b..15590fc5be55 100644
--- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
@@ -35,7 +35,7 @@
using namespace css;
using namespace css::uno;
-const char SIDEBARGRADIENT[] = "sidebargradient";
+const OStringLiteral SIDEBARGRADIENT = "sidebargradient";
namespace svx::sidebar {
diff --git a/svx/source/sidebar/line/LinePropertyPanelBase.cxx b/svx/source/sidebar/line/LinePropertyPanelBase.cxx
index f1b49ebde5c1..287a8f90343e 100644
--- a/svx/source/sidebar/line/LinePropertyPanelBase.cxx
+++ b/svx/source/sidebar/line/LinePropertyPanelBase.cxx
@@ -31,7 +31,7 @@
using namespace css;
using namespace css::uno;
-const char SELECTWIDTH[] = "SelectWidth";
+const OStringLiteral SELECTWIDTH = "SelectWidth";
namespace svx::sidebar {
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index 99126931ad1d..4d74ebcd94b8 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -48,7 +48,7 @@
using namespace css;
using namespace css::uno;
-const char USERITEM_NAME[] = "FitItem";
+const OUStringLiteral USERITEM_NAME = u"FitItem";
namespace svx::sidebar {
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index 23eb06465e87..2c8602847fde 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -407,7 +407,7 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::deactivatedUI()
css::uno::Reference< css::frame::XLayoutManager > xLayoutManager(getLayoutManager());
if ( xLayoutManager.is() )
{
- static const char aMenuBarURL[] = "private:resource/menubar/menubar";
+ static const OUStringLiteral aMenuBarURL = u"private:resource/menubar/menubar";
if ( !xLayoutManager->isElementVisible( aMenuBarURL ) )
xLayoutManager->createElement( aMenuBarURL );
}
diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx
index ea3b7603b962..5398663f1740 100644
--- a/svx/source/tbxctrls/extrusioncontrols.cxx
+++ b/svx/source/tbxctrls/extrusioncontrols.cxx
@@ -44,8 +44,8 @@ namespace svx
{
const sal_Int32 gSkewList[] = { 135, 90, 45, 180, 0, -360, -135, -90, -45 };
-const char g_sExtrusionDirection[] = ".uno:ExtrusionDirection";
-const char g_sExtrusionProjection[] = ".uno:ExtrusionProjection";
+const OUStringLiteral g_sExtrusionDirection = u".uno:ExtrusionDirection";
+const OUStringLiteral g_sExtrusionProjection = u".uno:ExtrusionProjection";
const std::u16string_view aLightOffBmps[] =
{
@@ -563,8 +563,8 @@ com_sun_star_comp_svx_ExtrusionDepthController_get_implementation(
}
-const char g_sExtrusionLightingDirection[] = ".uno:ExtrusionLightingDirection";
-const char g_sExtrusionLightingIntensity[] = ".uno:ExtrusionLightingIntensity";
+const OUStringLiteral g_sExtrusionLightingDirection = u".uno:ExtrusionLightingDirection";
+const OUStringLiteral g_sExtrusionLightingIntensity = u".uno:ExtrusionLightingIntensity";
ExtrusionLightingWindow::ExtrusionLightingWindow(svt::PopupWindowController* pControl,
weld::Widget* pParent)
@@ -795,7 +795,7 @@ com_sun_star_comp_svx_ExtrusionLightingControl_get_implementation(
}
-const char g_sExtrusionSurface[] = ".uno:ExtrusionSurface";
+const OUStringLiteral g_sExtrusionSurface = u".uno:ExtrusionSurface";
ExtrusionSurfaceWindow::ExtrusionSurfaceWindow(svt::PopupWindowController* pControl, weld::Widget* pParent)
: WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/surfacewindow.ui", "SurfaceWindow")
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index a1860eea7126..dc697903a51f 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -66,12 +66,12 @@ using namespace css;
namespace {
-const char COMMAND_FINDTEXT[] = ".uno:FindText";
-const char COMMAND_DOWNSEARCH[] = ".uno:DownSearch";
-const char COMMAND_UPSEARCH[] = ".uno:UpSearch";
-const char COMMAND_FINDALL[] = ".uno:FindAll";
-const char COMMAND_MATCHCASE[] = ".uno:MatchCase";
-const char COMMAND_SEARCHFORMATTED[] = ".uno:SearchFormattedDisplayString";
+const OUStringLiteral COMMAND_FINDTEXT = u".uno:FindText";
+const OUStringLiteral COMMAND_DOWNSEARCH = u".uno:DownSearch";
+const OUStringLiteral COMMAND_UPSEARCH = u".uno:UpSearch";
+const OUStringLiteral COMMAND_FINDALL = u".uno:FindAll";
+const OUStringLiteral COMMAND_MATCHCASE = u".uno:MatchCase";
+const OUStringLiteral COMMAND_SEARCHFORMATTED = u".uno:SearchFormattedDisplayString";
const sal_Int32 REMEMBER_SIZE = 10;
diff --git a/svx/source/toolbars/extrusionbar.cxx b/svx/source/toolbars/extrusionbar.cxx
index 5297f304b7bf..96d73abb5fd9 100644
--- a/svx/source/toolbars/extrusionbar.cxx
+++ b/svx/source/toolbars/extrusionbar.cxx
@@ -115,8 +115,8 @@ static void getLightingDirectionDefaults( const Direction3D **pLighting1Defaults
static void impl_execute( SfxRequest const & rReq, SdrCustomShapeGeometryItem& rGeometryItem, SdrObject* pObj )
{
- static const char sExtrusion[] = "Extrusion";
- static const char sRotateAngle[] = "RotateAngle";
+ static const OUStringLiteral sExtrusion = u"Extrusion";
+ static const OUStringLiteral sRotateAngle = u"RotateAngle";
sal_uInt16 nSID = rReq.GetSlot();
switch( nSID )
@@ -615,7 +615,7 @@ static void getExtrusionDirectionState( SdrView const * pSdrView, SfxItemSet& rS
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
const size_t nCount = rMarkList.GetMarkCount();
- static const char sExtrusion[] = "Extrusion";
+ static const OUStringLiteral sExtrusion = u"Extrusion";
const css::uno::Any* pAny;
@@ -762,7 +762,7 @@ static void getExtrusionProjectionState( SdrView const * pSdrView, SfxItemSet& r
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
const size_t nCount = rMarkList.GetMarkCount();
- static const char sExtrusion[] = "Extrusion";
+ static const OUStringLiteral sExtrusion = u"Extrusion";
const css::uno::Any* pAny;
@@ -817,7 +817,7 @@ static void getExtrusionSurfaceState( SdrView const * pSdrView, SfxItemSet& rSet
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
const size_t nCount = rMarkList.GetMarkCount();
- static const char sExtrusion[] = "Extrusion";
+ static const OUStringLiteral sExtrusion = u"Extrusion";
const css::uno::Any* pAny;
@@ -902,7 +902,7 @@ static void getExtrusionDepthState( SdrView const * pSdrView, SfxItemSet& rSet )
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
const size_t nCount = rMarkList.GetMarkCount();
- static const char sExtrusion[] = "Extrusion";
+ static const OUStringLiteral sExtrusion = u"Extrusion";
const css::uno::Any* pAny;
@@ -981,7 +981,7 @@ static void getExtrusionLightingDirectionState( SdrView const * pSdrView, SfxIte
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
const size_t nCount = rMarkList.GetMarkCount();
- static const char sExtrusion[] = "Extrusion";
+ static const OUStringLiteral sExtrusion = u"Extrusion";
const Direction3D * pLighting1Defaults;
const Direction3D * pLighting2Defaults;
@@ -1060,7 +1060,7 @@ static void getExtrusionLightingIntensityState( SdrView const * pSdrView, SfxIte
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
const size_t nCount = rMarkList.GetMarkCount();
- static const char sExtrusion[] = "Extrusion";
+ static const OUStringLiteral sExtrusion = u"Extrusion";
const css::uno::Any* pAny;
@@ -1127,7 +1127,7 @@ static void getExtrusionColorState( SdrView const * pSdrView, SfxItemSet& rSet )
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
const size_t nCount = rMarkList.GetMarkCount();
- static const char sExtrusion[] = "Extrusion";
+ static const OUStringLiteral sExtrusion = u"Extrusion";
const css::uno::Any* pAny;
@@ -1196,7 +1196,7 @@ static void getExtrusionColorState( SdrView const * pSdrView, SfxItemSet& rSet )
namespace svx {
bool checkForSelectedCustomShapes( SdrView const * pSdrView, bool bOnlyExtruded )
{
- static const char sExtrusion[] = "Extrusion";
+ static const OUStringLiteral sExtrusion = u"Extrusion";
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
const size_t nCount = rMarkList.GetMarkCount();
diff --git a/svx/source/toolbars/fontworkbar.cxx b/svx/source/toolbars/fontworkbar.cxx
index 308f4d2f6b60..cbdd9d5804f7 100644
--- a/svx/source/toolbars/fontworkbar.cxx
+++ b/svx/source/toolbars/fontworkbar.cxx
@@ -210,7 +210,7 @@ bool checkForSelectedFontWork( SdrView const * pSdrView, sal_uInt32& nCheckStatu
if ( nCheckStatus & 2 )
return ( nCheckStatus & 1 ) != 0;
- static const char sTextPath[] = "TextPath";
+ static const OUStringLiteral sTextPath = u"TextPath";
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
const size_t nCount = rMarkList.GetMarkCount();
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index dca42fc19dce..1715a6dea257 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -3121,49 +3121,49 @@ OUString SAL_CALL SvxShape::getImplementationName()
return "SvxShape";
}
-const char sUNO_service_style_ParagraphProperties[] = "com.sun.star.style.ParagraphProperties";
-const char sUNO_service_style_ParagraphPropertiesComplex[] = "com.sun.star.style.ParagraphPropertiesComplex";
-const char sUNO_service_style_ParagraphPropertiesAsian[] = "com.sun.star.style.ParagraphPropertiesAsian";
-const char sUNO_service_style_CharacterProperties[] = "com.sun.star.style.CharacterProperties";
-const char sUNO_service_style_CharacterPropertiesComplex[] = "com.sun.star.style.CharacterPropertiesComplex";
-const char sUNO_service_style_CharacterPropertiesAsian[] = "com.sun.star.style.CharacterPropertiesAsian";
-
-const char sUNO_service_drawing_FillProperties[] = "com.sun.star.drawing.FillProperties";
-const char sUNO_service_drawing_TextProperties[] = "com.sun.star.drawing.TextProperties";
-const char sUNO_service_drawing_LineProperties[] = "com.sun.star.drawing.LineProperties";
-const char sUNO_service_drawing_ConnectorProperties[] = "com.sun.star.drawing.ConnectorProperties";
-const char sUNO_service_drawing_MeasureProperties[] = "com.sun.star.drawing.MeasureProperties";
-const char sUNO_service_drawing_ShadowProperties[] = "com.sun.star.drawing.ShadowProperties";
-
-const char sUNO_service_drawing_RotationDescriptor[] = "com.sun.star.drawing.RotationDescriptor";
-
-const char sUNO_service_drawing_Text[] = "com.sun.star.drawing.Text";
-const char sUNO_service_drawing_GroupShape[] = "com.sun.star.drawing.GroupShape";
-
-const char sUNO_service_drawing_CustomShapeProperties[] = "com.sun.star.drawing.CustomShapeProperties";
-const char sUNO_service_drawing_CustomShape[] = "com.sun.star.drawing.CustomShape";
-
-const char sUNO_service_drawing_PolyPolygonDescriptor[] = "com.sun.star.drawing.PolyPolygonDescriptor";
-const char sUNO_service_drawing_PolyPolygonBezierDescriptor[]= "com.sun.star.drawing.PolyPolygonBezierDescriptor";
-
-const char sUNO_service_drawing_LineShape[] = "com.sun.star.drawing.LineShape";
-const char sUNO_service_drawing_Shape[] = "com.sun.star.drawing.Shape";
-const char sUNO_service_drawing_RectangleShape[] = "com.sun.star.drawing.RectangleShape";
-const char sUNO_service_drawing_EllipseShape[] = "com.sun.star.drawing.EllipseShape";
-const char sUNO_service_drawing_PolyPolygonShape[] = "com.sun.star.drawing.PolyPolygonShape";
-const char sUNO_service_drawing_PolyLineShape[] = "com.sun.star.drawing.PolyLineShape";
-const char sUNO_service_drawing_OpenBezierShape[] = "com.sun.star.drawing.OpenBezierShape";
-const char sUNO_service_drawing_ClosedBezierShape[] = "com.sun.star.drawing.ClosedBezierShape";
-const char sUNO_service_drawing_TextShape[] = "com.sun.star.drawing.TextShape";
-const char sUNO_service_drawing_GraphicObjectShape[] = "com.sun.star.drawing.GraphicObjectShape";
-const char sUNO_service_drawing_OLE2Shape[] = "com.sun.star.drawing.OLE2Shape";
-const char sUNO_service_drawing_PageShape[] = "com.sun.star.drawing.PageShape";
-const char sUNO_service_drawing_CaptionShape[] = "com.sun.star.drawing.CaptionShape";
-const char sUNO_service_drawing_MeasureShape[] = "com.sun.star.drawing.MeasureShape";
-const char sUNO_service_drawing_FrameShape[] = "com.sun.star.drawing.FrameShape";
-const char sUNO_service_drawing_ControlShape[] = "com.sun.star.drawing.ControlShape";
-const char sUNO_service_drawing_ConnectorShape[] = "com.sun.star.drawing.ConnectorShape";
-const char sUNO_service_drawing_MediaShape[] = "com.sun.star.drawing.MediaShape";
+const OUStringLiteral sUNO_service_style_ParagraphProperties = u"com.sun.star.style.ParagraphProperties";
+const OUStringLiteral sUNO_service_style_ParagraphPropertiesComplex = u"com.sun.star.style.ParagraphPropertiesComplex";
+const OUStringLiteral sUNO_service_style_ParagraphPropertiesAsian = u"com.sun.star.style.ParagraphPropertiesAsian";
+const OUStringLiteral sUNO_service_style_CharacterProperties = u"com.sun.star.style.CharacterProperties";
+const OUStringLiteral sUNO_service_style_CharacterPropertiesComplex = u"com.sun.star.style.CharacterPropertiesComplex";
+const OUStringLiteral sUNO_service_style_CharacterPropertiesAsian = u"com.sun.star.style.CharacterPropertiesAsian";
+
+const OUStringLiteral sUNO_service_drawing_FillProperties = u"com.sun.star.drawing.FillProperties";
+const OUStringLiteral sUNO_service_drawing_TextProperties = u"com.sun.star.drawing.TextProperties";
+const OUStringLiteral sUNO_service_drawing_LineProperties = u"com.sun.star.drawing.LineProperties";
+const OUStringLiteral sUNO_service_drawing_ConnectorProperties = u"com.sun.star.drawing.ConnectorProperties";
+const OUStringLiteral sUNO_service_drawing_MeasureProperties = u"com.sun.star.drawing.MeasureProperties";
+const OUStringLiteral sUNO_service_drawing_ShadowProperties = u"com.sun.star.drawing.ShadowProperties";
+
+const OUStringLiteral sUNO_service_drawing_RotationDescriptor = u"com.sun.star.drawing.RotationDescriptor";
+
+const OUStringLiteral sUNO_service_drawing_Text = u"com.sun.star.drawing.Text";
+const OUStringLiteral sUNO_service_drawing_GroupShape = u"com.sun.star.drawing.GroupShape";
+
+const OUStringLiteral sUNO_service_drawing_CustomShapeProperties = u"com.sun.star.drawing.CustomShapeProperties";
+const OUStringLiteral sUNO_service_drawing_CustomShape = u"com.sun.star.drawing.CustomShape";
+
+const OUStringLiteral sUNO_service_drawing_PolyPolygonDescriptor = u"com.sun.star.drawing.PolyPolygonDescriptor";
+const OUStringLiteral sUNO_service_drawing_PolyPolygonBezierDescriptor= u"com.sun.star.drawing.PolyPolygonBezierDescriptor";
+
+const OUStringLiteral sUNO_service_drawing_LineShape = u"com.sun.star.drawing.LineShape";
+const OUStringLiteral sUNO_service_drawing_Shape = u"com.sun.star.drawing.Shape";
+const OUStringLiteral sUNO_service_drawing_RectangleShape = u"com.sun.star.drawing.RectangleShape";
+const OUStringLiteral sUNO_service_drawing_EllipseShape = u"com.sun.star.drawing.EllipseShape";
+const OUStringLiteral sUNO_service_drawing_PolyPolygonShape = u"com.sun.star.drawing.PolyPolygonShape";
+const OUStringLiteral sUNO_service_drawing_PolyLineShape = u"com.sun.star.drawing.PolyLineShape";
+const OUStringLiteral sUNO_service_drawing_OpenBezierShape = u"com.sun.star.drawing.OpenBezierShape";
+const OUStringLiteral sUNO_service_drawing_ClosedBezierShape = u"com.sun.star.drawing.ClosedBezierShape";
+const OUStringLiteral sUNO_service_drawing_TextShape = u"com.sun.star.drawing.TextShape";
+const OUStringLiteral sUNO_service_drawing_GraphicObjectShape = u"com.sun.star.drawing.GraphicObjectShape";
+const OUStringLiteral sUNO_service_drawing_OLE2Shape = u"com.sun.star.drawing.OLE2Shape";
+const OUStringLiteral sUNO_service_drawing_PageShape = u"com.sun.star.drawing.PageShape";
+const OUStringLiteral sUNO_service_drawing_CaptionShape = u"com.sun.star.drawing.CaptionShape";
+const OUStringLiteral sUNO_service_drawing_MeasureShape = u"com.sun.star.drawing.MeasureShape";
+const OUStringLiteral sUNO_service_drawing_FrameShape = u"com.sun.star.drawing.FrameShape";
+const OUStringLiteral sUNO_service_drawing_ControlShape = u"com.sun.star.drawing.ControlShape";
+const OUStringLiteral sUNO_service_drawing_ConnectorShape = u"com.sun.star.drawing.ConnectorShape";
+const OUStringLiteral sUNO_service_drawing_MediaShape = u"com.sun.star.drawing.MediaShape";
uno::Sequence< OUString > SAL_CALL SvxShape::getSupportedServiceNames()
diff --git a/sw/qa/core/crsr/crsr.cxx b/sw/qa/core/crsr/crsr.cxx
index f02c3bd3487b..5ccdf5c068c6 100644
--- a/sw/qa/core/crsr/crsr.cxx
+++ b/sw/qa/core/crsr/crsr.cxx
@@ -24,7 +24,7 @@
#include <unotxdoc.hxx>
#include <wrtsh.hxx>
-char const DATA_DIRECTORY[] = "/sw/qa/core/crsr/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/sw/qa/core/crsr/data/";
/// Covers sw/source/core/crsr/ fixes.
class SwCoreCrsrTest : public SwModelTestBase
diff --git a/sw/qa/core/doc/doc.cxx b/sw/qa/core/doc/doc.cxx
index f3bb4508189b..b2eb2de95c8a 100644
--- a/sw/qa/core/doc/doc.cxx
+++ b/sw/qa/core/doc/doc.cxx
@@ -25,7 +25,7 @@
#include <view.hxx>
#include <ndtxt.hxx>
-char const DATA_DIRECTORY[] = "/sw/qa/core/doc/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/sw/qa/core/doc/data/";
/// Covers sw/source/core/doc/ fixes.
class SwCoreDocTest : public SwModelTestBase
diff --git a/sw/qa/core/docnode/docnode.cxx b/sw/qa/core/docnode/docnode.cxx
index 830133eb2c78..a2d2524a586e 100644
--- a/sw/qa/core/docnode/docnode.cxx
+++ b/sw/qa/core/docnode/docnode.cxx
@@ -13,7 +13,7 @@
#include <doc.hxx>
#include <docary.hxx>
-char const DATA_DIRECTORY[] = "/sw/qa/core/docnode/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/sw/qa/core/docnode/data/";
/// Covers sw/source/core/docnode/ fixes.
class Test : public SwModelTestBase
diff --git a/sw/qa/core/draw/draw.cxx b/sw/qa/core/draw/draw.cxx
index 162bf237d154..d015277286ab 100644
--- a/sw/qa/core/draw/draw.cxx
+++ b/sw/qa/core/draw/draw.cxx
@@ -16,7 +16,7 @@
#include <drawdoc.hxx>
#include <wrtsh.hxx>
-char const DATA_DIRECTORY[] = "/sw/qa/core/draw/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/sw/qa/core/draw/data/";
/// Covers sw/source/core/draw/ fixes.
class SwCoreDrawTest : public SwModelTestBase
diff --git a/sw/qa/core/frmedt/frmedt.cxx b/sw/qa/core/frmedt/frmedt.cxx
index c0ea7e0566e9..ca29e2121048 100644
--- a/sw/qa/core/frmedt/frmedt.cxx
+++ b/sw/qa/core/frmedt/frmedt.cxx
@@ -24,7 +24,7 @@
#include <docsh.hxx>
#include <swdtflvr.hxx>
-char const DATA_DIRECTORY[] = "/sw/qa/core/frmedt/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/sw/qa/core/frmedt/data/";
/// Covers sw/source/core/frmedt/ fixes.
class SwCoreFrmedtTest : public SwModelTestBase
diff --git a/sw/qa/core/layout/layout.cxx b/sw/qa/core/layout/layout.cxx
index 73fd9a8a0d5b..67b91433855e 100644
--- a/sw/qa/core/layout/layout.cxx
+++ b/sw/qa/core/layout/layout.cxx
@@ -21,7 +21,7 @@
#include <IDocumentLayoutAccess.hxx>
#include <rootfrm.hxx>
-char const DATA_DIRECTORY[] = "/sw/qa/core/layout/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/sw/qa/core/layout/data/";
/// Covers sw/source/core/layout/ fixes.
class SwCoreLayoutTest : public SwModelTestBase
diff --git a/sw/qa/core/objectpositioning/objectpositioning.cxx b/sw/qa/core/objectpositioning/objectpositioning.cxx
index 13a936500329..4c53f029ea9a 100644
--- a/sw/qa/core/objectpositioning/objectpositioning.cxx
+++ b/sw/qa/core/objectpositioning/objectpositioning.cxx
@@ -16,7 +16,7 @@
#include <unotxdoc.hxx>
#include <docsh.hxx>
-char const DATA_DIRECTORY[] = "/sw/qa/core/objectpositioning/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/sw/qa/core/objectpositioning/data/";
/// Covers sw/source/core/objectpositioning/ fixes.
class SwCoreObjectpositioningTest : public SwModelTestBase
diff --git a/sw/qa/core/text/text.cxx b/sw/qa/core/text/text.cxx
index 6122bab09911..ee6ab278d333 100644
--- a/sw/qa/core/text/text.cxx
+++ b/sw/qa/core/text/text.cxx
@@ -15,7 +15,7 @@
#include <unotxdoc.hxx>
#include <wrtsh.hxx>
-char const DATA_DIRECTORY[] = "/sw/qa/core/text/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/sw/qa/core/text/data/";
/// Covers sw/source/core/text/ fixes.
class SwCoreTextTest : public SwModelTestBase
diff --git a/sw/qa/core/txtnode/txtnode.cxx b/sw/qa/core/txtnode/txtnode.cxx
index ce55e517e196..1c4d48b04598 100644
--- a/sw/qa/core/txtnode/txtnode.cxx
+++ b/sw/qa/core/txtnode/txtnode.cxx
@@ -17,7 +17,7 @@
#include <unotxdoc.hxx>
#include <docsh.hxx>
-char const DATA_DIRECTORY[] = "/sw/qa/core/txtnode/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/sw/qa/core/txtnode/data/";
/// Covers sw/source/core/txtnode/ fixes.
class SwCoreTxtnodeTest : public SwModelTestBase
diff --git a/sw/qa/core/undo/undo.cxx b/sw/qa/core/undo/undo.cxx
index e43d154f3a66..32aecfbe6616 100644
--- a/sw/qa/core/undo/undo.cxx
+++ b/sw/qa/core/undo/undo.cxx
@@ -22,7 +22,7 @@
#include <view.hxx>
#include <cmdid.h>
-char const DATA_DIRECTORY[] = "/sw/qa/core/undo/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/sw/qa/core/undo/data/";
/// Covers sw/source/core/undo/ fixes.
class SwCoreUndoTest : public SwModelTestBase
diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx
index a831dd5a0e27..5ea16ca0a829 100644
--- a/sw/qa/core/unocore/unocore.cxx
+++ b/sw/qa/core/unocore/unocore.cxx
@@ -21,7 +21,7 @@ using namespace ::com::sun::star;
namespace
{
-char const DATA_DIRECTORY[] = "/sw/qa/core/unocore/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/sw/qa/core/unocore/data/";
}
/// Covers sw/source/core/unocore/ fixes.
diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx
index 868710550c2d..9da61561f3ff 100644
--- a/sw/qa/core/uwriter.cxx
+++ b/sw/qa/core/uwriter.cxx
@@ -760,7 +760,7 @@ void SwDocTest::testSwScanner()
{
SwDocStat aDocStat;
- const char aString[] = "Lorem ipsum";
+ static const OUStringLiteral aString = u"Lorem ipsum";
m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, aString);
pTextNode = aPaM.GetNode().GetTextNode();
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx
index cf370a324789..0db4e0c2f164 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -246,7 +246,7 @@ void SwHtmlDomExportTest::ParseOle1FromRtfUrl(const OUString& rRtfUrl, SvMemoryS
CPPUNIT_ASSERT(rOle1.Tell());
}
-char const DATA_DIRECTORY[] = "/sw/qa/extras/htmlexport/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/sw/qa/extras/htmlexport/data/";
DECLARE_HTMLEXPORT_ROUNDTRIP_TEST(testFdo81276, "fdo81276.html")
{
diff --git a/sw/qa/extras/htmlimport/htmlimport.cxx b/sw/qa/extras/htmlimport/htmlimport.cxx
index 45260d167011..d46f2d242b85 100644
--- a/sw/qa/extras/htmlimport/htmlimport.cxx
+++ b/sw/qa/extras/htmlimport/htmlimport.cxx
@@ -404,7 +404,7 @@ class SwHtmlOptionsImportTest : public SwModelTestBase
{
};
-char const DATA_DIRECTORY[] = "/sw/qa/extras/htmlimport/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/sw/qa/extras/htmlimport/data/";
CPPUNIT_TEST_FIXTURE(SwHtmlOptionsImportTest, testAllowedRTFOLEMimeTypes)
{
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index ba9aed2ff496..39562206284c 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -22,7 +22,7 @@
#include <textboxhelper.hxx>
#include <unoframe.hxx>
-char const DATA_DIRECTORY[] = "/sw/qa/extras/layout/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/sw/qa/extras/layout/data/";
/// Test to assert layout / rendering result of Writer.
class SwLayoutWriter : public SwModelTestBase
diff --git a/sw/qa/extras/layout/layout2.cxx b/sw/qa/extras/layout/layout2.cxx
index b87b4c992c60..4ce216cf112e 100644
--- a/sw/qa/extras/layout/layout2.cxx
+++ b/sw/qa/extras/layout/layout2.cxx
@@ -50,7 +50,7 @@
#include <svx/svdotext.hxx>
#include <dcontact.hxx>
-char const DATA_DIRECTORY[] = "/sw/qa/extras/layout/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/sw/qa/extras/layout/data/";
/// Test to assert layout / rendering result of Writer.
class SwLayoutWriter2 : public SwModelTestBase
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
index 3601d735f717..91116fbdf2d6 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -38,7 +38,7 @@
using namespace com::sun::star;
-char const DATA_DIRECTORY[] = "/sw/qa/extras/ooxmlexport/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/sw/qa/extras/ooxmlexport/data/";
class Test : public SwModelTestBase
{
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
index c91488efb93b..9e3aecaa6c20 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
@@ -21,7 +21,7 @@
#include <com/sun/star/text/XTextFieldsSupplier.hpp>
#include <com/sun/star/text/XTextField.hpp>
-char const DATA_DIRECTORY[] = "/sw/qa/extras/ooxmlexport/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/sw/qa/extras/ooxmlexport/data/";
class Test : public SwModelTestBase
{
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
index e12804e58289..e7e1fb180121 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
@@ -14,7 +14,7 @@
#include <com/sun/star/text/XTextTable.hpp>
#include <com/sun/star/text/XTextTablesSupplier.hpp>
-char const DATA_DIRECTORY[] = "/sw/qa/extras/ooxmlexport/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/sw/qa/extras/ooxmlexport/data/";
class Test : public SwModelTestBase
{
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index a670b356827c..39f6cd39b3b0 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -1362,7 +1362,7 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf111964, "tdf111964.docx")
{
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// Unicode spaces that are not XML whitespace must not be trimmed
- const sal_Unicode sWSReference [] = u"\u2002\u2002\u2002\u2002\u2002";
+ static const OUStringLiteral sWSReference = u"\u2002\u2002\u2002\u2002\u2002";
assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[6]/w:t", sWSReference);
}
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index bd356dfcdc4a..6b39401a9580 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -60,7 +60,7 @@
#include <docsh.hxx>
#include <txtfrm.hxx>
-char const DATA_DIRECTORY[] = "/sw/qa/extras/tiledrendering/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/sw/qa/extras/tiledrendering/data/";
static std::ostream& operator<<(std::ostream& os, ViewShellId id)
{
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index fec30772d5dd..6bce5bff36c3 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -137,7 +137,7 @@
namespace
{
-char const DATA_DIRECTORY[] = "/sw/qa/extras/uiwriter/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/sw/qa/extras/uiwriter/data/";
int CountFilesInDirectory(const OUString &rURL)
{
diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx b/sw/qa/extras/uiwriter/uiwriter2.cxx
index 50a41b548eff..5dc5aab4eb80 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -71,8 +71,9 @@
namespace
{
-char const DATA_DIRECTORY[] = "/sw/qa/extras/uiwriter/data2/";
-char const FLOATING_TABLE_DATA_DIRECTORY[] = "/sw/qa/extras/uiwriter/data/floating_table/";
+OUStringLiteral const DATA_DIRECTORY = u"/sw/qa/extras/uiwriter/data2/";
+OUStringLiteral const FLOATING_TABLE_DATA_DIRECTORY
+ = u"/sw/qa/extras/uiwriter/data/floating_table/";
} // namespace
/// Second set of tests asserting the behavior of Writer user interface shells.
diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx b/sw/qa/extras/uiwriter/uiwriter3.cxx
index a598386ede3d..a3a2a06a03a6 100644
--- a/sw/qa/extras/uiwriter/uiwriter3.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter3.cxx
@@ -38,7 +38,7 @@
namespace
{
-char const DATA_DIRECTORY[] = "/sw/qa/extras/uiwriter/data3/";
+OUStringLiteral const DATA_DIRECTORY = u"/sw/qa/extras/uiwriter/data3/";
} // namespace
/// Third set of tests asserting the behavior of Writer user interface shells.
diff --git a/sw/qa/extras/unowriter/unowriter.cxx b/sw/qa/extras/unowriter/unowriter.cxx
index eac432ccb2d6..c492712cff32 100644
--- a/sw/qa/extras/unowriter/unowriter.cxx
+++ b/sw/qa/extras/unowriter/unowriter.cxx
@@ -59,7 +59,7 @@ using namespace ::com::sun::star;
namespace
{
-char const DATA_DIRECTORY[] = "/sw/qa/extras/unowriter/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/sw/qa/extras/unowriter/data/";
/// Listener implementation for testPasteListener.
class PasteListener : public cppu::WeakImplHelper<text::XPasteListener>
diff --git a/sw/qa/extras/ww8export/ww8export.cxx b/sw/qa/extras/ww8export/ww8export.cxx
index 807337eee0d1..4776c4613503 100644
--- a/sw/qa/extras/ww8export/ww8export.cxx
+++ b/sw/qa/extras/ww8export/ww8export.cxx
@@ -1325,7 +1325,7 @@ DECLARE_WW8EXPORT_TEST(testTdf92281, "tdf92281.doc")
xCursor->goRight( 5 , false );
uno::Reference< beans::XPropertySet > xPropSet(xCursor, uno::UNO_QUERY);
- const sal_Unicode aFontname[14] = u"\u65B0\u7D30\u660E\u9AD4;PMingLiU";
+ static const OUStringLiteral aFontname = u"\u65B0\u7D30\u660E\u9AD4;PMingLiU";
CPPUNIT_ASSERT_EQUAL(OUString("Calibri"), getProperty<OUString>(xPropSet, "CharFontName"));
CPPUNIT_ASSERT_EQUAL(OUString(aFontname), getProperty<OUString>(xPropSet, "CharFontNameAsian"));
CPPUNIT_ASSERT_EQUAL(OUString("Times New Roman"), getProperty<OUString>(xPropSet, "CharFontNameComplex"));
diff --git a/sw/qa/uibase/frmdlg/frmdlg.cxx b/sw/qa/uibase/frmdlg/frmdlg.cxx
index 39d55be0a880..607b8f1178b0 100644
--- a/sw/qa/uibase/frmdlg/frmdlg.cxx
+++ b/sw/qa/uibase/frmdlg/frmdlg.cxx
@@ -11,7 +11,7 @@
#include <com/sun/star/text/TextContentAnchorType.hpp>
-char const DATA_DIRECTORY[] = "/sw/qa/uibase/frmdlg/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/sw/qa/uibase/frmdlg/data/";
/// Covers sw/source/uibase/frmdlg/ fixes.
class SwUibaseFrmdlgTest : public SwModelTestBase
diff --git a/sw/qa/uibase/shells/shells.cxx b/sw/qa/uibase/shells/shells.cxx
index 963fc6dd4f2a..a0d3beb6a148 100644
--- a/sw/qa/uibase/shells/shells.cxx
+++ b/sw/qa/uibase/shells/shells.cxx
@@ -31,7 +31,7 @@
#include <drawdoc.hxx>
#include <docsh.hxx>
-char const DATA_DIRECTORY[] = "/sw/qa/uibase/shells/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/sw/qa/uibase/shells/data/";
/// Covers sw/source/uibase/shells/ fixes.
class SwUibaseShellsTest : public SwModelTestBase
diff --git a/sw/qa/uibase/uiview/uiview.cxx b/sw/qa/uibase/uiview/uiview.cxx
index 9f84a734a016..89c91af3c8ba 100644
--- a/sw/qa/uibase/uiview/uiview.cxx
+++ b/sw/qa/uibase/uiview/uiview.cxx
@@ -20,7 +20,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/packages/zip/ZipFileAccess.hpp>
-char const DATA_DIRECTORY[] = "/sw/qa/uibase/uiview/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/sw/qa/uibase/uiview/data/";
/// Covers sw/source/uibase/uiview/ fixes.
class SwUibaseUiviewTest : public SwModelTestBase
diff --git a/sw/qa/uibase/uno/uno.cxx b/sw/qa/uibase/uno/uno.cxx
index 4c6dc724b712..2924d54c52e6 100644
--- a/sw/qa/uibase/uno/uno.cxx
+++ b/sw/qa/uibase/uno/uno.cxx
@@ -13,7 +13,7 @@
#include <vcl/scheduler.hxx>
-char const DATA_DIRECTORY[] = "/sw/qa/uibase/uno/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/sw/qa/uibase/uno/data/";
/// Covers sw/source/uibase/uno/ fixes.
class SwUibaseUnoTest : public SwModelTestBase
diff --git a/sw/source/core/access/acccell.cxx b/sw/source/core/access/acccell.cxx
index a1b52d41c98f..154f4d0fe85f 100644
--- a/sw/source/core/access/acccell.cxx
+++ b/sw/source/core/access/acccell.cxx
@@ -50,7 +50,7 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
using namespace sw::access;
-const char sImplementationName[] = "com.sun.star.comp.Writer.SwAccessibleCellView";
+const OUStringLiteral sImplementationName = u"com.sun.star.comp.Writer.SwAccessibleCellView";
bool SwAccessibleCell::IsSelected()
{
diff --git a/sw/source/core/access/acccontext.hxx b/sw/source/core/access/acccontext.hxx
index 4915305586ce..59c4df3962b3 100644
--- a/sw/source/core/access/acccontext.hxx
+++ b/sw/source/core/access/acccontext.hxx
@@ -40,7 +40,7 @@ namespace accessibility {
class AccessibleShape;
}
-const char sAccessibleServiceName[] = "com.sun.star.accessibility.Accessible";
+inline const OUStringLiteral sAccessibleServiceName = u"com.sun.star.accessibility.Accessible";
class SwAccessibleContext :
public ::cppu::WeakImplHelper<
diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx
index 4b9777b74c36..852e537da3ad 100644
--- a/sw/source/core/access/accdoc.cxx
+++ b/sw/source/core/access/accdoc.cxx
@@ -52,8 +52,8 @@
#include <dview.hxx>
#include <dcontact.hxx>
#include <svx/svdmark.hxx>
-const char sServiceName[] = "com.sun.star.text.AccessibleTextDocumentView";
-const char sImplementationName[] = "com.sun.star.comp.Writer.SwAccessibleDocumentView";
+const OUStringLiteral sServiceName = u"com.sun.star.text.AccessibleTextDocumentView";
+const OUStringLiteral sImplementationName = u"com.sun.star.comp.Writer.SwAccessibleDocumentView";
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
diff --git a/sw/source/core/access/accembedded.cxx b/sw/source/core/access/accembedded.cxx
index 58d9a7672c31..6ec441bcef05 100644
--- a/sw/source/core/access/accembedded.cxx
+++ b/sw/source/core/access/accembedded.cxx
@@ -31,7 +31,7 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::accessibility;
-const char sImplementationName[] = "com.sun.star.comp.Writer.SwAccessibleEmbeddedObject";
+const OUStringLiteral sImplementationName = u"com.sun.star.comp.Writer.SwAccessibleEmbeddedObject";
SwAccessibleEmbeddedObject::SwAccessibleEmbeddedObject(
std::shared_ptr<SwAccessibleMap> const& pInitMap,
diff --git a/sw/source/core/access/accfootnote.cxx b/sw/source/core/access/accfootnote.cxx
index eb843ca3601d..815f26899140 100644
--- a/sw/source/core/access/accfootnote.cxx
+++ b/sw/source/core/access/accfootnote.cxx
@@ -33,8 +33,10 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::accessibility;
-const char sImplementationNameFootnote[] = "com.sun.star.comp.Writer.SwAccessibleFootnoteView";
-const char sImplementationNameEndnote[] = "com.sun.star.comp.Writer.SwAccessibleEndnoteView";
+const OUStringLiteral sImplementationNameFootnote
+ = u"com.sun.star.comp.Writer.SwAccessibleFootnoteView";
+const OUStringLiteral sImplementationNameEndnote
+ = u"com.sun.star.comp.Writer.SwAccessibleEndnoteView";
SwAccessibleFootnote::SwAccessibleFootnote(
std::shared_ptr<SwAccessibleMap> const& pInitMap,
diff --git a/sw/source/core/access/accheaderfooter.cxx b/sw/source/core/access/accheaderfooter.cxx
index b40bcf58d954..aa41ac4bd795 100644
--- a/sw/source/core/access/accheaderfooter.cxx
+++ b/sw/source/core/access/accheaderfooter.cxx
@@ -29,8 +29,10 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::accessibility;
-const char sImplementationNameHeader[] = "com.sun.star.comp.Writer.SwAccessibleHeaderView";
-const char sImplementationNameFooter[] = "com.sun.star.comp.Writer.SwAccessibleFooterView";
+const OUStringLiteral sImplementationNameHeader
+ = u"com.sun.star.comp.Writer.SwAccessibleHeaderView";
+const OUStringLiteral sImplementationNameFooter
+ = u"com.sun.star.comp.Writer.SwAccessibleFooterView";
SwAccessibleHeaderFooter::SwAccessibleHeaderFooter(
std::shared_ptr<SwAccessibleMap> const& pInitMap,
diff --git a/sw/source/core/access/accpage.cxx b/sw/source/core/access/accpage.cxx
index e8ea905d7368..a01f44ec4f60 100644
--- a/sw/source/core/access/accpage.cxx
+++ b/sw/source/core/access/accpage.cxx
@@ -32,7 +32,7 @@ using namespace ::com::sun::star::accessibility;
using uno::Sequence;
-const char sImplementationName[] = "com.sun.star.comp.Writer.SwAccessiblePageView";
+const OUStringLiteral sImplementationName = u"com.sun.star.comp.Writer.SwAccessiblePageView";
bool SwAccessiblePage::IsSelected()
{
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 8e3bf82bb749..49291ed0c44a 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -111,8 +111,8 @@ namespace com::sun::star::text {
class XText;
}
-const char sServiceName[] = "com.sun.star.text.AccessibleParagraphView";
-const char sImplementationName[] = "com.sun.star.comp.Writer.SwAccessibleParagraphView";
+const OUStringLiteral sServiceName = u"com.sun.star.text.AccessibleParagraphView";
+const OUStringLiteral sImplementationName = u"com.sun.star.comp.Writer.SwAccessibleParagraphView";
OUString const & SwAccessibleParagraph::GetString()
{
diff --git a/sw/source/core/access/accpreview.cxx b/sw/source/core/access/accpreview.cxx
index 3465aae96408..75ad890d590a 100644
--- a/sw/source/core/access/accpreview.cxx
+++ b/sw/source/core/access/accpreview.cxx
@@ -22,7 +22,8 @@
#include <strings.hrc>
#include "accpreview.hxx"
-const char sImplementationName[] = "com.sun.star.comp.Writer.SwAccessibleDocumentPageView";
+const OUStringLiteral sImplementationName
+ = u"com.sun.star.comp.Writer.SwAccessibleDocumentPageView";
using ::com::sun::star::uno::Sequence;
diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx
index 2adcda28e35a..1c731d684b29 100644
--- a/sw/source/core/access/acctable.cxx
+++ b/sw/source/core/access/acctable.cxx
@@ -1731,7 +1731,8 @@ uno::Reference< XAccessibleTable >
OUString SAL_CALL SwAccessibleTableColHeaders::getImplementationName()
{
- static const char sImplName[] = "com.sun.star.comp.Writer.SwAccessibleTableColumnHeadersView";
+ static const OUStringLiteral sImplName
+ = u"com.sun.star.comp.Writer.SwAccessibleTableColumnHeadersView";
return sImplName;
}
diff --git a/sw/source/core/crsr/crossrefbookmark.cxx b/sw/source/core/crsr/crossrefbookmark.cxx
index 9fbba6de069a..a2f046f2fa84 100644
--- a/sw/source/core/crsr/crossrefbookmark.cxx
+++ b/sw/source/core/crsr/crossrefbookmark.cxx
@@ -27,7 +27,7 @@
namespace
{
- const char CrossRefNumItemBookmark_NamePrefix[] = "__RefNumPara__";
+ const OUStringLiteral CrossRefNumItemBookmark_NamePrefix = u"__RefNumPara__";
}
namespace sw::mark
diff --git a/sw/source/core/swg/SwXMLTextBlocks1.cxx b/sw/source/core/swg/SwXMLTextBlocks1.cxx
index 122a0fbe6ffb..be9f13410419 100644
--- a/sw/source/core/swg/SwXMLTextBlocks1.cxx
+++ b/sw/source/core/swg/SwXMLTextBlocks1.cxx
@@ -44,7 +44,7 @@
#include <sfx2/event.hxx>
#include <swerror.h>
-const char XMLN_BLOCKLIST[] = "BlockList.xml";
+const OUStringLiteral XMLN_BLOCKLIST = u"BlockList.xml";
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index c3a9fd3786c0..048fcd0e8e37 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -145,14 +145,14 @@ const char aH3String[] = "H3";
const char aH4String[] = "H4";
const char aH5String[] = "H5";
const char aH6String[] = "H6";
-const char aListString[] = "L";
-const char aListItemString[] = "LI";
-const char aListBodyString[] = "LBody";
+const OUStringLiteral aListString = u"L";
+const OUStringLiteral aListItemString = u"LI";
+const OUStringLiteral aListBodyString = u"LBody";
const char aBlockQuoteString[] = "BlockQuote";
const char aCaptionString[] = "Caption";
const char aIndexString[] = "Index";
const char aTOCString[] = "TOC";
-const char aTOCIString[] = "TOCI";
+const OUStringLiteral aTOCIString = u"TOCI";
const char aTableString[] = "Table";
const char aTRString[] = "TR";
const char aTDString[] = "TD";
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 70f2cd9c6f48..26ef68865bda 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -693,14 +693,14 @@ void WW8Export::ExportDopTypography(WW8DopTypography &rTypo)
!lcl_CmpBeginEndChars
(
pForbidden->endLine,
- WW8DopTypography::JapanNotEndLevel1,
+ OUString(WW8DopTypography::JapanNotEndLevel1).getStr(),
WW8DopTypography::nMaxLeading * sizeof(sal_Unicode)
)
&&
!lcl_CmpBeginEndChars
(
pForbidden->beginLine,
- WW8DopTypography::JapanNotBeginLevel1,
+ OUString(WW8DopTypography::JapanNotBeginLevel1).getStr(),
WW8DopTypography::nMaxFollowing * sizeof(sal_Unicode)
)
)
diff --git a/sw/source/filter/ww8/ww8glsy.cxx b/sw/source/filter/ww8/ww8glsy.cxx
index 30e8ac1219bc..91bb6e9ad5f1 100644
--- a/sw/source/filter/ww8/ww8glsy.cxx
+++ b/sw/source/filter/ww8/ww8glsy.cxx
@@ -44,7 +44,8 @@ WW8Glossary::WW8Glossary(tools::SvRef<SotStorageStream> &refStrm, sal_uInt8 nVer
if (aWwFib.m_nFibBack >= 0x6A) //Word97
{
xTableStream = pStg->OpenSotStream(
- aWwFib.m_fWhichTableStm ? SL::a1Table : SL::a0Table, StreamMode::STD_READ);
+ aWwFib.m_fWhichTableStm ? OUString(SL::a1Table) : OUString(SL::a0Table),
+ StreamMode::STD_READ);
if (xTableStream.is() && ERRCODE_NONE == xTableStream->GetError())
{
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 905cfb6c683f..b3d4fba36294 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4970,7 +4970,7 @@ void SwWW8ImplReader::ReadGlobalTemplateSettings( std::u16string_view sCreatedFr
refMainStream->SetEndian(SvStreamEndian::LITTLE);
WW8Fib aWwFib( *refMainStream, 8 );
tools::SvRef<SotStorageStream> xTableStream =
- rRoot->OpenSotStream(aWwFib.m_fWhichTableStm ? SL::a1Table : SL::a0Table, StreamMode::STD_READ);
+ rRoot->OpenSotStream(aWwFib.m_fWhichTableStm ? OUString(SL::a1Table) : OUString(SL::a0Table), StreamMode::STD_READ);
if (xTableStream.is() && ERRCODE_NONE == xTableStream->GetError())
{
@@ -5505,7 +5505,7 @@ ErrCode SwWW8ImplReader::SetSubStreams(tools::SvRef<SotStorageStream> &rTableStr
}
rTableStream = m_pStg->OpenSotStream(
- m_xWwFib->m_fWhichTableStm ? SL::a1Table : SL::a0Table,
+ m_xWwFib->m_fWhichTableStm ? OUString(SL::a1Table) : OUString(SL::a0Table),
StreamMode::STD_READ);
m_pTableStream = rTableStream.get();
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index b9beb92652e0..e6b6a8c65373 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -41,14 +41,14 @@ class SvStream;
//Commonly used string literals for stream and storage names in word docs
namespace SL
{
- const char aObjectPool[] = "ObjectPool";
- const char a1Table[] = "1Table";
- const char a0Table[] = "0Table";
- const char aData[] = "Data";
- const char aCheckBox[] = "CheckBox";
- const char aListBox[] = "ListBox";
- const char aTextField[] = "TextField";
- const char aMSMacroCmds[] = "MSMacroCmds";
+ inline const OUStringLiteral aObjectPool = u"ObjectPool";
+ inline const OUStringLiteral a1Table = u"1Table";
+ inline const OUStringLiteral a0Table = u"0Table";
+ inline const OUStringLiteral aData = u"Data";
+ inline const OUStringLiteral aCheckBox = u"CheckBox";
+ inline const OUStringLiteral aListBox = u"ListBox";
+ inline const OUStringLiteral aTextField = u"TextField";
+ inline const OUStringLiteral aMSMacroCmds = u"MSMacroCmds";
}
struct SprmInfo
diff --git a/sw/source/filter/ww8/ww8struc.hxx b/sw/source/filter/ww8/ww8struc.hxx
index f272437da648..c4b1eabc84c4 100644
--- a/sw/source/filter/ww8/ww8struc.hxx
+++ b/sw/source/filter/ww8/ww8struc.hxx
@@ -394,7 +394,7 @@ public:
//full document, might not matter all that much though ?
enum RuleLengths {nMaxFollowing = 101, nMaxLeading = 51};
- static constexpr sal_Unicode JapanNotBeginLevel1[]
+ static constexpr OUStringLiteral JapanNotBeginLevel1
= u"\u0021\u0025\u0029\u002c\u002e\u003a\u003b\u003f"
"\u005d\u007d\u00a2\u00b0\u2019\u201d\u2030\u2032"
"\u2033\u2103\u3001\u3002\u3005\u3009\u300b\u300d"
@@ -402,7 +402,7 @@ public:
"\u30fd\u30fe\uff01\uff05\uff09\uff0c\uff0e\uff1a"
"\uff1b\uff1f\uff3d\uff5d\uff61\uff63\uff64\uff65"
"\uff9e\uff9f\uffe0";
- static constexpr sal_Unicode JapanNotEndLevel1[]
+ static constexpr OUStringLiteral JapanNotEndLevel1
= u"\u0024\u0028\u005b\u005c\u007b\u00a3\u00a5\u2018"
"\u201c\u3008\u300a\u300c\u300e\u3010\u3014\uff04"
"\uff08\uff3b\uff5b\uff62\uffe1\uffe5";
diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
index 91aa7e048637..9568b1b681a1 100644
--- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx
+++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
@@ -231,9 +231,9 @@ RedlineInfo::~RedlineInfo()
delete pNextRedline;
}
-const char g_sShowChanges[] = "ShowChanges";
-const char g_sRecordChanges[] = "RecordChanges";
-const char g_sRedlineProtectionKey[] = "RedlineProtectionKey";
+const OUStringLiteral g_sShowChanges = u"ShowChanges";
+const OUStringLiteral g_sRecordChanges = u"RecordChanges";
+const OUStringLiteral g_sRedlineProtectionKey = u"RedlineProtectionKey";
XMLRedlineImportHelper::XMLRedlineImportHelper(
SvXMLImport & rImport,
diff --git a/sw/source/ui/vba/vbalisthelper.cxx b/sw/source/ui/vba/vbalisthelper.cxx
index 3ae9a5e79c4c..4e863236931f 100644
--- a/sw/source/ui/vba/vbalisthelper.cxx
+++ b/sw/source/ui/vba/vbalisthelper.cxx
@@ -31,12 +31,12 @@ using namespace ::com::sun::star;
const sal_Int32 LIST_LEVEL_COUNT = 9;
-const char UNO_NAME_PARENT_NUMBERING[] = "ParentNumbering";
-const char UNO_NAME_PREFIX[] = "Prefix";
-const char UNO_NAME_SUFFIX[] = "Suffix";
-const char UNO_NAME_CHAR_STYLE_NAME[] = "CharStyleName";
-const char UNO_NAME_NUMBERING_TYPE[] = "NumberingType";
-const char UNO_NAME_BULLET_CHAR[] = "BulletChar";
+const OUStringLiteral UNO_NAME_PARENT_NUMBERING = u"ParentNumbering";
+const OUStringLiteral UNO_NAME_PREFIX = u"Prefix";
+const OUStringLiteral UNO_NAME_SUFFIX = u"Suffix";
+const OUStringLiteral UNO_NAME_CHAR_STYLE_NAME = u"CharStyleName";
+const OUStringLiteral UNO_NAME_NUMBERING_TYPE = u"NumberingType";
+const OUStringLiteral UNO_NAME_BULLET_CHAR = u"BulletChar";
const sal_Unicode CHAR_CLOSED_DOT[] = u"\u2022";
const char CHAR_EMPTY_DOT[] = "o";
diff --git a/sw/source/uibase/app/applab.cxx b/sw/source/uibase/app/applab.cxx
index fda48d4e007f..4c3a8c1a4b56 100644
--- a/sw/source/uibase/app/applab.cxx
+++ b/sw/source/uibase/app/applab.cxx
@@ -61,7 +61,7 @@
using namespace ::com::sun::star;
-const char MASTER_LABEL[] = "MasterLabel";
+const OUStringLiteral MASTER_LABEL = u"MasterLabel";
static const SwFrameFormat *lcl_InsertBCText( SwWrtShell& rSh, const SwLabItem& rItem,
SwFrameFormat &rFormat,
diff --git a/sw/source/uibase/dbui/mmconfigitem.cxx b/sw/source/uibase/dbui/mmconfigitem.cxx
index cdcb729c10a1..34b74011b9c3 100644
--- a/sw/source/uibase/dbui/mmconfigitem.cxx
+++ b/sw/source/uibase/dbui/mmconfigitem.cxx
@@ -55,7 +55,7 @@ using namespace ::com::sun::star::sdb;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::sdbcx;
-constexpr char16_t cAddressDataAssignments[] = u"AddressDataAssignments";
+constexpr OUStringLiteral cAddressDataAssignments = u"AddressDataAssignments";
const char cDBColumnAssignments[] = "DBColumnAssignments";
const char cDataSourceName[] = "DataSource/DataSourceName";
const char cDataTableName[] = "DataSource/DataTableName" ;
diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx
index e580e0b5817a..f1f41ecb4bd2 100644
--- a/sw/source/uibase/utlui/unotools.cxx
+++ b/sw/source/uibase/utlui/unotools.cxx
@@ -52,7 +52,7 @@
using namespace ::com::sun::star;
-const char cFactory[] = "private:factory/swriter";
+const OUStringLiteral cFactory = u"private:factory/swriter";
static void disableScrollBars(uno::Reference< beans::XPropertySet > const & xViewProps,
bool bEnableOnlineMode)
diff --git a/testtools/source/bridgetest/currentcontextchecker.cxx b/testtools/source/bridgetest/currentcontextchecker.cxx
index 4fda634e91f1..801fe5d55229 100644
--- a/testtools/source/bridgetest/currentcontextchecker.cxx
+++ b/testtools/source/bridgetest/currentcontextchecker.cxx
@@ -38,8 +38,8 @@
namespace {
-char const KEY[] = "testtools.bridgetest.Key";
-char const VALUE[] = "good";
+OUStringLiteral const KEY = u"testtools.bridgetest.Key";
+OUStringLiteral const VALUE = u"good";
class CurrentContext:
public ::osl::DebugBase< CurrentContext >,
diff --git a/toolkit/source/controls/stdtabcontroller.cxx b/toolkit/source/controls/stdtabcontroller.cxx
index c0173e822c75..32c2e6e63c82 100644
--- a/toolkit/source/controls/stdtabcontroller.cxx
+++ b/toolkit/source/controls/stdtabcontroller.cxx
@@ -111,7 +111,7 @@ bool StdTabController::ImplCreateComponentSequence(
if ( pTabs )
{
// opt: Constant String for TabStop name
- static const char aTabStopName[] = "Tabstop";
+ static const OUStringLiteral aTabStopName = u"Tabstop";
Reference< XPropertySet > xPSet( xCtrl->getModel(), UNO_QUERY );
Reference< XPropertySetInfo > xInfo = xPSet->getPropertySetInfo();
diff --git a/toolkit/source/controls/tabpagemodel.cxx b/toolkit/source/controls/tabpagemodel.cxx
index 30f45d9258bd..498e8329ffdf 100644
--- a/toolkit/source/controls/tabpagemodel.cxx
+++ b/toolkit/source/controls/tabpagemodel.cxx
@@ -141,7 +141,7 @@ void SAL_CALL UnoControlTabPageModel::initialize (const Sequence<Any>& rArgument
Reference<XPropertySet> xDialogProp(xDialogModel,UNO_QUERY);
if ( xDialogProp.is() )
{
- static const char s_sResourceResolver[] = "ResourceResolver";
+ static const OUStringLiteral s_sResourceResolver = u"ResourceResolver";
Reference<XPropertySet> xThis(*this,UNO_QUERY);
xThis->setPropertyValue(s_sResourceResolver,xDialogProp->getPropertyValue(s_sResourceResolver));
xThis->setPropertyValue(GetPropertyName(BASEPROPERTY_TITLE),xDialogProp->getPropertyValue(GetPropertyName(BASEPROPERTY_TITLE)));
diff --git a/toolkit/source/helper/formpdfexport.cxx b/toolkit/source/helper/formpdfexport.cxx
index a265d18dfdf0..188410af86d4 100644
--- a/toolkit/source/helper/formpdfexport.cxx
+++ b/toolkit/source/helper/formpdfexport.cxx
@@ -58,7 +58,7 @@ namespace toolkitform
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::container;
- const char FM_PROP_NAME[] = "Name";
+ const OUStringLiteral FM_PROP_NAME = u"Name";
namespace
{
@@ -67,7 +67,7 @@ namespace toolkitform
*/
sal_Int16 classifyFormControl( const Reference< XPropertySet >& _rxModel )
{
- static const char FM_PROP_CLASSID[] = "ClassId";
+ static const OUStringLiteral FM_PROP_CLASSID = u"ClassId";
sal_Int16 nControlType = FormComponentType::CONTROL;
Reference< XPropertySetInfo > xPSI;
@@ -312,8 +312,8 @@ namespace toolkitform
SAL_INFO("toolkit.helper", "describePDFControl: unable to get property HelpText");
}
Any aText;
- static const char FM_PROP_TEXT[] = "Text";
- static const char FM_PROP_LABEL[] = "Label";
+ static const OUStringLiteral FM_PROP_TEXT = u"Text";
+ static const OUStringLiteral FM_PROP_LABEL = u"Label";
if ( xPSI->hasPropertyByName( FM_PROP_TEXT ) )
aText = xModelProps->getPropertyValue( FM_PROP_TEXT );
else if ( xPSI->hasPropertyByName( FM_PROP_LABEL ) )
@@ -326,7 +326,7 @@ namespace toolkitform
// readonly
- static const char FM_PROP_READONLY[] = "ReadOnly";
+ static const OUStringLiteral FM_PROP_READONLY = u"ReadOnly";
if ( xPSI->hasPropertyByName( FM_PROP_READONLY ) )
if( ! (xModelProps->getPropertyValue( FM_PROP_READONLY ) >>= Descriptor->ReadOnly) )
SAL_WARN("toolkit.helper", "describePDFControl: unable to get property " << FM_PROP_READONLY);
@@ -334,7 +334,7 @@ namespace toolkitform
// border
{
- static const char FM_PROP_BORDER[] = "Border";
+ static const OUStringLiteral FM_PROP_BORDER = u"Border";
if ( xPSI->hasPropertyByName( FM_PROP_BORDER ) )
{
sal_Int16 nBorderType = 0;
@@ -356,7 +356,7 @@ namespace toolkitform
// background color
- static const char FM_PROP_BACKGROUNDCOLOR[] = "BackgroundColor";
+ static const OUStringLiteral FM_PROP_BACKGROUNDCOLOR = u"BackgroundColor";
if ( xPSI->hasPropertyByName( FM_PROP_BACKGROUNDCOLOR ) )
{
Color nBackColor = COL_TRANSPARENT;
@@ -367,7 +367,7 @@ namespace toolkitform
// text color
- static const char FM_PROP_TEXTCOLOR[] = "TextColor";
+ static const OUStringLiteral FM_PROP_TEXTCOLOR = u"TextColor";
if ( xPSI->hasPropertyByName( FM_PROP_TEXTCOLOR ) )
{
Color nTextColor = COL_TRANSPARENT;
@@ -382,7 +382,7 @@ namespace toolkitform
// multi line and word break
// The MultiLine property of the control is mapped to both the "MULTILINE" and
// "WORDBREAK" style flags
- static const char FM_PROP_MULTILINE[] = "MultiLine";
+ static const OUStringLiteral FM_PROP_MULTILINE = u"MultiLine";
if ( xPSI->hasPropertyByName( FM_PROP_MULTILINE ) )
{
bool bMultiLine = false;
@@ -393,7 +393,7 @@ namespace toolkitform
}
// horizontal alignment
- static const char FM_PROP_ALIGN[] = "Align";
+ static const OUStringLiteral FM_PROP_ALIGN = u"Align";
if ( xPSI->hasPropertyByName( FM_PROP_ALIGN ) )
{
sal_Int16 nAlign = awt::TextAlign::LEFT;
@@ -429,7 +429,7 @@ namespace toolkitform
}
// font
- static const char FM_PROP_FONT[] = "FontDescriptor";
+ static const OUStringLiteral FM_PROP_FONT = u"FontDescriptor";
if ( xPSI->hasPropertyByName( FM_PROP_FONT ) )
{
FontDescriptor aUNOFont;
@@ -473,7 +473,7 @@ namespace toolkitform
pEditWidget->FileSelect = true;
// maximum text length
- static const char FM_PROP_MAXTEXTLEN[] = "MaxTextLen";
+ static const OUStringLiteral FM_PROP_MAXTEXTLEN = u"MaxTextLen";
if ( xPSI->hasPropertyByName( FM_PROP_MAXTEXTLEN ) )
{
sal_Int16 nMaxTextLength = 0;
@@ -494,7 +494,7 @@ namespace toolkitform
FormButtonType eButtonType = FormButtonType_PUSH;
if( ! (xModelProps->getPropertyValue("ButtonType") >>= eButtonType) )
SAL_WARN("toolkit.helper", "describePDFControl: unable to get property ButtonType");
- static const char FM_PROP_TARGET_URL[] = "TargetURL";
+ static const OUStringLiteral FM_PROP_TARGET_URL = u"TargetURL";
if ( eButtonType == FormButtonType_SUBMIT )
{
// if a button is a submit button, then it uses the URL at its parent form
@@ -556,7 +556,7 @@ namespace toolkitform
// check boxes
- static const char FM_PROP_STATE[] = "State";
+ static const OUStringLiteral FM_PROP_STATE = u"State";
if ( Descriptor->getType() == vcl::PDFWriter::CheckBox )
{
vcl::PDFWriter::CheckBoxWidget* pCheckBoxWidget = static_cast< vcl::PDFWriter::CheckBoxWidget* >( Descriptor.get() );
diff --git a/unotools/qa/unit/testGetEnglishSearchName.cxx b/unotools/qa/unit/testGetEnglishSearchName.cxx
index da59fc377f51..18bec28f7521 100644
--- a/unotools/qa/unit/testGetEnglishSearchName.cxx
+++ b/unotools/qa/unit/testGetEnglishSearchName.cxx
@@ -45,23 +45,24 @@ void Test::testSingleElement()
//for Japanese fontname
// IPAMincho
- sal_Unicode const aIPAMincho[]=u"ipa\u660e\u671d";
+ static OUStringLiteral const aIPAMincho=u"ipa\u660e\u671d";
OUString test_ja_JP1 = GetEnglishSearchFontName(aIPAMincho);
CPPUNIT_ASSERT_EQUAL( OUString("ipamincho"),test_ja_JP1);
// IPAGothic
- sal_Unicode const aIPAGothic[]=u"ipa\u30b4\u30b7\u30c3\u30af";
+ static OUStringLiteral const aIPAGothic=u"ipa\u30b4\u30b7\u30c3\u30af";
OUString test_ja_JP2 = GetEnglishSearchFontName(aIPAGothic);
CPPUNIT_ASSERT_EQUAL( OUString("ipagothic"),test_ja_JP2);
// HiraginoKakuGothic
- sal_Unicode const aHiraginoKakuGothic[]=u"\u30D2\u30E9\u30AE\u30CE\u89D2\u30B4\u30B7\u30C3\u30AF";
+ static OUStringLiteral const aHiraginoKakuGothic=u"\u30D2\u30E9\u30AE\u30CE\u89D2\u30B4\u30B7\u30C3\u30AF";
OUString test_ja_JP3 = GetEnglishSearchFontName(aHiraginoKakuGothic);
CPPUNIT_ASSERT_EQUAL( OUString("hiraginosans"),test_ja_JP3);
// HiraginoMincho Pro N
- sal_Unicode const aHiraginoMinchoProN[]=u"\u30D2\u30E9\u30AE\u30CE\u660E\u671Dpron";
+ static OUStringLiteral const aHiraginoMinchoProN=u"\u30D2\u30E9\u30AE\u30CE\u660E\u671Dpron";
OUString test_ja_JP4 = GetEnglishSearchFontName(aHiraginoMinchoProN);
CPPUNIT_ASSERT_EQUAL( OUString("hiraginominchopron"),test_ja_JP4);
// HiraginoMaruGothic Pro N
- sal_Unicode const aHiraginoMaruGothicProN[]=u"\u30D2\u30E9\u30AE\u30CE\u4E38\u30B4pron";
+ static OUStringLiteral const aHiraginoMaruGothicProN
+ =u"\u30D2\u30E9\u30AE\u30CE\u4E38\u30B4pron";
OUString test_ja_JP5 = GetEnglishSearchFontName(aHiraginoMaruGothicProN);
CPPUNIT_ASSERT_EQUAL( OUString("hiraginomarugothicpron"),test_ja_JP5);
}
diff --git a/unotools/source/config/historyoptions.cxx b/unotools/source/config/historyoptions.cxx
index 4e6aac18caf7..91c8861b2f52 100644
--- a/unotools/source/config/historyoptions.cxx
+++ b/unotools/source/config/historyoptions.cxx
@@ -50,13 +50,13 @@ namespace {
const ::sal_Int32 s_nOffsetPassword = 3;
const ::sal_Int32 s_nOffsetThumbnail = 4;
- const char s_sItemList[] = "ItemList";
- const char s_sOrderList[] = "OrderList";
- const char s_sHistoryItemRef[] = "HistoryItemRef";
- const char s_sFilter[] = "Filter";
- const char s_sTitle[] = "Title";
- const char s_sPassword[] = "Password";
- const char s_sThumbnail[] = "Thumbnail";
+ const OUStringLiteral s_sItemList = u"ItemList";
+ const OUStringLiteral s_sOrderList = u"OrderList";
+ const OUStringLiteral s_sHistoryItemRef = u"HistoryItemRef";
+ const OUStringLiteral s_sFilter = u"Filter";
+ const OUStringLiteral s_sTitle = u"Title";
+ const OUStringLiteral s_sPassword = u"Password";
+ const OUStringLiteral s_sThumbnail = u"Thumbnail";
class theHistoryOptionsMutex : public rtl::Static<osl::Mutex, theHistoryOptionsMutex>{};
}
diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx
index be0e52e769e0..c0a8438792fd 100644
--- a/unotools/source/config/lingucfg.cxx
+++ b/unotools/source/config/lingucfg.cxx
@@ -803,7 +803,7 @@ bool SvtLinguConfigItem::IsReadOnly( sal_Int32 nPropertyHandle ) const
static SvtLinguConfigItem *pCfgItem = nullptr;
static sal_Int32 nCfgItemRefCount = 0;
-const char aG_Dictionaries[] = "Dictionaries";
+const OUStringLiteral aG_Dictionaries = u"Dictionaries";
SvtLinguConfig::SvtLinguConfig()
{
diff --git a/unotools/source/config/saveopt.cxx b/unotools/source/config/saveopt.cxx
index d8f4d37dd790..e8bb2aade654 100644
--- a/unotools/source/config/saveopt.cxx
+++ b/unotools/source/config/saveopt.cxx
@@ -714,7 +714,7 @@ public:
}
-const char cUserDefinedSettings[] = "UserDefinedSettings";
+const OUStringLiteral cUserDefinedSettings = u"UserDefinedSettings";
SvtLoadOptions_Impl::SvtLoadOptions_Impl()
: ConfigItem( "Office.Common/Load" )
diff --git a/vbahelper/source/vbahelper/vbacommandbarhelper.hxx b/vbahelper/source/vbahelper/vbacommandbarhelper.hxx
index 536d4f6a3d0e..ff515561b23f 100644
--- a/vbahelper/source/vbahelper/vbacommandbarhelper.hxx
+++ b/vbahelper/source/vbahelper/vbacommandbarhelper.hxx
@@ -29,13 +29,13 @@
const char ITEM_DESCRIPTOR_COMMANDURL[] = "CommandURL";
const char ITEM_DESCRIPTOR_HELPURL[] = "HelpURL";
-const char ITEM_DESCRIPTOR_CONTAINER[] = "ItemDescriptorContainer";
-const char ITEM_DESCRIPTOR_LABEL[] = "Label";
+inline const OUStringLiteral ITEM_DESCRIPTOR_CONTAINER = u"ItemDescriptorContainer";
+inline const OUStringLiteral ITEM_DESCRIPTOR_LABEL = u"Label";
const char ITEM_DESCRIPTOR_TYPE[] = "Type";
const char ITEM_DESCRIPTOR_STYLE[] = "Style";
-const char ITEM_DESCRIPTOR_ISVISIBLE[] = "IsVisible";
-const char ITEM_DESCRIPTOR_UINAME[] = "UIName";
-const char ITEM_DESCRIPTOR_ENABLED[] = "Enabled";
+inline const OUStringLiteral ITEM_DESCRIPTOR_ISVISIBLE = u"IsVisible";
+inline const OUStringLiteral ITEM_DESCRIPTOR_UINAME = u"UIName";
+inline const OUStringLiteral ITEM_DESCRIPTOR_ENABLED = u"Enabled";
const char ITEM_MENUBAR_URL[] = "private:resource/menubar/menubar";
constexpr char16_t ITEM_TOOLBAR_URL[] = u"private:resource/toolbar/";
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx
index d47dbb01bdd6..7ae94d465bfa 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx
@@ -851,10 +851,10 @@ double UserFormGeometryHelper::getOffsetY() const
}
-const char saPosXName[] = "PositionX";
-const char saPosYName[] = "PositionY";
-const char saWidthName[] = "Width";
-const char saHeightName[] = "Height";
+const OUStringLiteral saPosXName = u"PositionX";
+const OUStringLiteral saPosYName = u"PositionY";
+const OUStringLiteral saWidthName = u"Width";
+const OUStringLiteral saHeightName = u"Height";
double UserFormGeometryHelper::implGetPos( bool bPosY ) const
{
diff --git a/vcl/qa/cppunit/GraphicTest.cxx b/vcl/qa/cppunit/GraphicTest.cxx
index 2059dde020f1..538995ff5dd2 100644
--- a/vcl/qa/cppunit/GraphicTest.cxx
+++ b/vcl/qa/cppunit/GraphicTest.cxx
@@ -211,8 +211,8 @@ bool checkBitmap(Graphic& rGraphic)
return bResult;
}
-char const DATA_DIRECTORY[] = "/vcl/qa/cppunit/data/";
-char const PDFEXPORT_DATA_DIRECTORY[] = "/vcl/qa/cppunit/pdfexport/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/vcl/qa/cppunit/data/";
+OUStringLiteral const PDFEXPORT_DATA_DIRECTORY = u"/vcl/qa/cppunit/pdfexport/data/";
void GraphicTest::testUnloadedGraphic()
{
diff --git a/vcl/qa/cppunit/PDFDocumentTest.cxx b/vcl/qa/cppunit/PDFDocumentTest.cxx
index 66de7dfc77d4..f1717cf4041f 100644
--- a/vcl/qa/cppunit/PDFDocumentTest.cxx
+++ b/vcl/qa/cppunit/PDFDocumentTest.cxx
@@ -22,7 +22,7 @@ public:
PDFDocumentTest() = default;
};
-char const DATA_DIRECTORY[] = "/vcl/qa/cppunit/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/vcl/qa/cppunit/data/";
CPPUNIT_TEST_FIXTURE(PDFDocumentTest, testParseBasicPDF)
{
diff --git a/vcl/qa/cppunit/TypeSerializerTest.cxx b/vcl/qa/cppunit/TypeSerializerTest.cxx
index 6b3445032309..ac568a1e31f2 100644
--- a/vcl/qa/cppunit/TypeSerializerTest.cxx
+++ b/vcl/qa/cppunit/TypeSerializerTest.cxx
@@ -33,7 +33,7 @@
namespace
{
-constexpr char DATA_DIRECTORY[] = "/vcl/qa/cppunit/data/";
+constexpr OUStringLiteral DATA_DIRECTORY = u"/vcl/qa/cppunit/data/";
std::vector<unsigned char> calculateHash(SvStream& rStream)
{
diff --git a/vcl/qa/cppunit/filter/igif/igif.cxx b/vcl/qa/cppunit/filter/igif/igif.cxx
index 8dea02ca529b..21a2f8eb0ce8 100644
--- a/vcl/qa/cppunit/filter/igif/igif.cxx
+++ b/vcl/qa/cppunit/filter/igif/igif.cxx
@@ -20,7 +20,7 @@ using namespace com::sun::star;
namespace
{
-char const DATA_DIRECTORY[] = "/vcl/qa/cppunit/filter/igif/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/vcl/qa/cppunit/filter/igif/data/";
/// Covers vcl/source/filter/igif/ fixes.
class Test : public test::BootstrapFixture
diff --git a/vcl/qa/cppunit/filter/ipdf/ipdf.cxx b/vcl/qa/cppunit/filter/ipdf/ipdf.cxx
index 11881bb09c00..e7e407108d76 100644
--- a/vcl/qa/cppunit/filter/ipdf/ipdf.cxx
+++ b/vcl/qa/cppunit/filter/ipdf/ipdf.cxx
@@ -32,7 +32,7 @@ using namespace ::com::sun::star;
namespace
{
-char const DATA_DIRECTORY[] = "/vcl/qa/cppunit/filter/ipdf/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/vcl/qa/cppunit/filter/ipdf/data/";
}
/// Covers vcl/source/filter/ipdf/ fixes.
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 61debc5ed5ec..255a82553dfb 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -115,7 +115,7 @@ void PdfExportTest::tearDown()
test::BootstrapFixture::tearDown();
}
-char const DATA_DIRECTORY[] = "/vcl/qa/cppunit/pdfexport/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/vcl/qa/cppunit/pdfexport/data/";
void PdfExportTest::saveAsPDF(const OUString& rFile)
{
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 7f09b25e2025..765264569e58 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -1489,7 +1489,7 @@ tools::Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, tools::R
{
MetaTextLineAction* pAct = static_cast<MetaTextLineAction*>(pAction);
// measure a test string to get ascend and descent right
- static const sal_Unicode pStr[] = u"\u00c4g";
+ static const OUStringLiteral pStr = u"\u00c4g";
OUString aStr( pStr );
tools::Rectangle aRect;
diff --git a/writerfilter/qa/cppunittests/dmapper/CellColorHandler.cxx b/writerfilter/qa/cppunittests/dmapper/CellColorHandler.cxx
index 646d0968b7e5..a834cf1173ec 100644
--- a/writerfilter/qa/cppunittests/dmapper/CellColorHandler.cxx
+++ b/writerfilter/qa/cppunittests/dmapper/CellColorHandler.cxx
@@ -46,7 +46,7 @@ void Test::tearDown()
test::BootstrapFixture::tearDown();
}
-char const DATA_DIRECTORY[] = "/writerfilter/qa/cppunittests/dmapper/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/writerfilter/qa/cppunittests/dmapper/data/";
CPPUNIT_TEST_FIXTURE(Test, test129205)
{
diff --git a/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx b/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx
index d6e6830b88fb..4090d6a05381 100644
--- a/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx
+++ b/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx
@@ -50,7 +50,7 @@ void Test::tearDown()
test::BootstrapFixture::tearDown();
}
-char const DATA_DIRECTORY[] = "/writerfilter/qa/cppunittests/dmapper/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/writerfilter/qa/cppunittests/dmapper/data/";
CPPUNIT_TEST_FIXTURE(Test, testLargeParaTopMargin)
{
diff --git a/writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx b/writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx
index e49ea59d9cb5..d84fcac50d51 100644
--- a/writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx
@@ -48,7 +48,7 @@ void Test::tearDown()
test::BootstrapFixture::tearDown();
}
-char const DATA_DIRECTORY[] = "/writerfilter/qa/cppunittests/dmapper/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/writerfilter/qa/cppunittests/dmapper/data/";
CPPUNIT_TEST_FIXTURE(Test, test1cellInsidevRightborder)
{
diff --git a/writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx b/writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx
index 355b61898cf8..41d1d4065206 100644
--- a/writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx
@@ -50,7 +50,7 @@ void Test::tearDown()
test::BootstrapFixture::tearDown();
}
-char const DATA_DIRECTORY[] = "/writerfilter/qa/cppunittests/dmapper/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/writerfilter/qa/cppunittests/dmapper/data/";
CPPUNIT_TEST_FIXTURE(Test, testPageBreakFooterTable)
{
diff --git a/writerfilter/qa/cppunittests/dmapper/GraphicImport.cxx b/writerfilter/qa/cppunittests/dmapper/GraphicImport.cxx
index 28a0cc178410..1d88c651a149 100644
--- a/writerfilter/qa/cppunittests/dmapper/GraphicImport.cxx
+++ b/writerfilter/qa/cppunittests/dmapper/GraphicImport.cxx
@@ -50,7 +50,7 @@ void Test::tearDown()
test::BootstrapFixture::tearDown();
}
-char const DATA_DIRECTORY[] = "/writerfilter/qa/cppunittests/dmapper/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/writerfilter/qa/cppunittests/dmapper/data/";
CPPUNIT_TEST_FIXTURE(Test, testGroupShapeRotation)
{
diff --git a/writerfilter/qa/cppunittests/dmapper/PropertyMap.cxx b/writerfilter/qa/cppunittests/dmapper/PropertyMap.cxx
index 2c7586649c01..473f77a5c783 100644
--- a/writerfilter/qa/cppunittests/dmapper/PropertyMap.cxx
+++ b/writerfilter/qa/cppunittests/dmapper/PropertyMap.cxx
@@ -47,7 +47,7 @@ void Test::tearDown()
test::BootstrapFixture::tearDown();
}
-char const DATA_DIRECTORY[] = "/writerfilter/qa/cppunittests/dmapper/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/writerfilter/qa/cppunittests/dmapper/data/";
CPPUNIT_TEST_FIXTURE(Test, testFloatingTableHeader)
{
diff --git a/writerfilter/qa/cppunittests/dmapper/TextEffectsHandler.cxx b/writerfilter/qa/cppunittests/dmapper/TextEffectsHandler.cxx
index d48a35e25dc1..b3b7e5b1b11f 100644
--- a/writerfilter/qa/cppunittests/dmapper/TextEffectsHandler.cxx
+++ b/writerfilter/qa/cppunittests/dmapper/TextEffectsHandler.cxx
@@ -45,7 +45,7 @@ void Test::tearDown()
test::BootstrapFixture::tearDown();
}
-char const DATA_DIRECTORY[] = "/writerfilter/qa/cppunittests/dmapper/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/writerfilter/qa/cppunittests/dmapper/data/";
CPPUNIT_TEST_FIXTURE(Test, testSemiTransparentText)
{
diff --git a/writerfilter/qa/cppunittests/rtftok/rtfsdrimport.cxx b/writerfilter/qa/cppunittests/rtftok/rtfsdrimport.cxx
index 64c679f6e5cc..6e8b09211ea3 100644
--- a/writerfilter/qa/cppunittests/rtftok/rtfsdrimport.cxx
+++ b/writerfilter/qa/cppunittests/rtftok/rtfsdrimport.cxx
@@ -46,7 +46,7 @@ void Test::tearDown()
test::BootstrapFixture::tearDown();
}
-char const DATA_DIRECTORY[] = "/writerfilter/qa/cppunittests/rtftok/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/writerfilter/qa/cppunittests/rtftok/data/";
CPPUNIT_TEST_FIXTURE(Test, testPictureInTextframe)
{
diff --git a/writerfilter/qa/cppunittests/rtftok/rtfsprm.cxx b/writerfilter/qa/cppunittests/rtftok/rtfsprm.cxx
index 9f5ec63e8b3f..5a39d0b8f9cf 100644
--- a/writerfilter/qa/cppunittests/rtftok/rtfsprm.cxx
+++ b/writerfilter/qa/cppunittests/rtftok/rtfsprm.cxx
@@ -46,7 +46,7 @@ void Test::tearDown()
test::BootstrapFixture::tearDown();
}
-char const DATA_DIRECTORY[] = "/writerfilter/qa/cppunittests/rtftok/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/writerfilter/qa/cppunittests/rtftok/data/";
CPPUNIT_TEST_FIXTURE(Test, testLeftMarginDedup)
{
diff --git a/writerfilter/source/dmapper/FormControlHelper.cxx b/writerfilter/source/dmapper/FormControlHelper.cxx
index 180cbec10e85..599faebf535b 100644
--- a/writerfilter/source/dmapper/FormControlHelper.cxx
+++ b/writerfilter/source/dmapper/FormControlHelper.cxx
@@ -89,7 +89,7 @@ uno::Reference<form::XForm> const & FormControlHelper::FormControlHelper_Impl::g
if (xFormsSupplier.is())
{
uno::Reference<container::XNameContainer> xFormsNamedContainer(xFormsSupplier->getForms());
- static const char sDOCXForm[] = "DOCX-Standard";
+ static const OUStringLiteral sDOCXForm = u"DOCX-Standard";
OUString sFormName(sDOCXForm);
sal_uInt16 nUnique = 0;
diff --git a/writerfilter/source/dmapper/TextEffectsHandler.cxx b/writerfilter/source/dmapper/TextEffectsHandler.cxx
index 13fed5237051..7f707fbb845b 100644
--- a/writerfilter/source/dmapper/TextEffectsHandler.cxx
+++ b/writerfilter/source/dmapper/TextEffectsHandler.cxx
@@ -70,7 +70,7 @@ OUString lclGetNameForElementId(sal_uInt32 aId)
return aIdMap[aId];
}
-const char constAttributesSequenceName[] = "attributes";
+const OUStringLiteral constAttributesSequenceName = u"attributes";
}
diff --git a/writerperfect/qa/unit/DirectoryStreamTest.cxx b/writerperfect/qa/unit/DirectoryStreamTest.cxx
index fcf77743c0c5..cbb55a91126b 100644
--- a/writerperfect/qa/unit/DirectoryStreamTest.cxx
+++ b/writerperfect/qa/unit/DirectoryStreamTest.cxx
@@ -56,9 +56,9 @@ private:
uno::Reference<ucb::XContent> m_xNonexistent;
};
-const char g_aDirPath[] = "/writerperfect/qa/unit/data/stream/test.dir";
-const char g_aNondirPath[] = "/writerperfect/qa/unit/data/stream/test.dir/mimetype";
-const char g_aNonexistentPath[] = "/writerperfect/qa/unit/data/stream/foo/bar";
+const OUStringLiteral g_aDirPath = u"/writerperfect/qa/unit/data/stream/test.dir";
+const OUStringLiteral g_aNondirPath = u"/writerperfect/qa/unit/data/stream/test.dir/mimetype";
+const OUStringLiteral g_aNonexistentPath = u"/writerperfect/qa/unit/data/stream/foo/bar";
DirectoryStreamTest::DirectoryStreamTest()
{
diff --git a/writerperfect/qa/unit/EPUBExportTest.cxx b/writerperfect/qa/unit/EPUBExportTest.cxx
index 247448ba32c9..cfdefd25c377 100644
--- a/writerperfect/qa/unit/EPUBExportTest.cxx
+++ b/writerperfect/qa/unit/EPUBExportTest.cxx
@@ -30,7 +30,7 @@ using namespace ::com::sun::star;
namespace
{
-char const DATA_DIRECTORY[] = "/writerperfect/qa/unit/data/writer/epubexport/";
+OUStringLiteral const DATA_DIRECTORY = u"/writerperfect/qa/unit/data/writer/epubexport/";
/// Tests the EPUB export filter.
class EPUBExportTest : public test::BootstrapFixture,
diff --git a/writerperfect/qa/unit/WPXSvStreamTest.cxx b/writerperfect/qa/unit/WPXSvStreamTest.cxx
index 21715229e299..8a41aeedbced 100644
--- a/writerperfect/qa/unit/WPXSvStreamTest.cxx
+++ b/writerperfect/qa/unit/WPXSvStreamTest.cxx
@@ -64,8 +64,8 @@ private:
};
const char aText[] = "hello world";
-const char aOLEFile[] = "/writerperfect/qa/unit/data/stream/fdo40686-1.doc";
-const char aZipFile[] = "/writerperfect/qa/unit/data/stream/test.odt";
+const OUStringLiteral aOLEFile = u"/writerperfect/qa/unit/data/stream/fdo40686-1.doc";
+const OUStringLiteral aZipFile = u"/writerperfect/qa/unit/data/stream/test.odt";
shared_ptr<RVNGInputStream> lcl_createStream()
{
diff --git a/xmloff/qa/unit/draw.cxx b/xmloff/qa/unit/draw.cxx
index 8365b463efc6..4128e33b96f2 100644
--- a/xmloff/qa/unit/draw.cxx
+++ b/xmloff/qa/unit/draw.cxx
@@ -20,7 +20,7 @@
using namespace ::com::sun::star;
-char const DATA_DIRECTORY[] = "/xmloff/qa/unit/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/xmloff/qa/unit/data/";
/// Covers xmloff/source/draw/ fixes.
class XmloffDrawTest : public test::BootstrapFixture, public unotest::MacrosTest
diff --git a/xmloff/qa/unit/style.cxx b/xmloff/qa/unit/style.cxx
index 4a5b7af616c1..d9511e3e2a8a 100644
--- a/xmloff/qa/unit/style.cxx
+++ b/xmloff/qa/unit/style.cxx
@@ -15,7 +15,7 @@
using namespace ::com::sun::star;
-char const DATA_DIRECTORY[] = "/xmloff/qa/unit/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/xmloff/qa/unit/data/";
/// Covers xmloff/source/style/ fixes.
class XmloffStyleTest : public test::BootstrapFixture, public unotest::MacrosTest
diff --git a/xmloff/qa/unit/text.cxx b/xmloff/qa/unit/text.cxx
index 3d1873d02e83..de2f718f53dc 100644
--- a/xmloff/qa/unit/text.cxx
+++ b/xmloff/qa/unit/text.cxx
@@ -14,7 +14,7 @@
using namespace ::com::sun::star;
-char const DATA_DIRECTORY[] = "/xmloff/qa/unit/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/xmloff/qa/unit/data/";
/// Covers xmloff/source/text/ fixes.
class XmloffStyleTest : public test::BootstrapFixture, public unotest::MacrosTest
diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx
index ac5bcdbc2515..15de497408aa 100644
--- a/xmloff/source/chart/SchXMLTableContext.cxx
+++ b/xmloff/source/chart/SchXMLTableContext.cxx
@@ -55,7 +55,7 @@ using ::com::sun::star::uno::Reference;
namespace
{
-const char aCategoriesRange[] = "categories";
+const OUStringLiteral aCategoriesRange = u"categories";
typedef ::std::multimap< OUString, OUString >
lcl_tOriginalRangeToInternalRangeMap;
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index c7a6b44401aa..dac4db9eb464 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <xmloff/autolayout.hxx>
#include <xmloff/unointerfacetouniqueidentifiermapper.hxx>
#include <xmloff/namespacemap.hxx>
@@ -1313,7 +1317,7 @@ void SdXMLExport::ImpPrepDrawPageInfos()
}
}
-static OUString findOrAppendImpl( std::vector< OUString >& rVector, const OUString& rText, const char* pPrefix )
+static OUString findOrAppendImpl( std::vector< OUString >& rVector, const OUString& rText, std::u16string_view pPrefix )
{
// search rVector if there is already a string that equals rText
auto aIter = std::find(rVector.begin(), rVector.end(), rText);
@@ -1325,10 +1329,10 @@ static OUString findOrAppendImpl( std::vector< OUString >& rVector, const OUStri
// create a reference string with pPrefix and the index of the
// found or created rText
- return OUString::createFromAscii( pPrefix ) + OUString::number( nIndex );
+ return pPrefix + OUString::number( nIndex );
}
-static OUString findOrAppendImpl( std::vector< DateTimeDeclImpl >& rVector, const OUString& rText, bool bFixed, sal_Int32 nFormat, const char* pPrefix )
+static OUString findOrAppendImpl( std::vector< DateTimeDeclImpl >& rVector, const OUString& rText, bool bFixed, sal_Int32 nFormat, std::u16string_view pPrefix )
{
// search rVector if there is already a DateTimeDeclImpl with rText,bFixed and nFormat
auto aIter = std::find_if(rVector.begin(), rVector.end(),
@@ -1351,12 +1355,12 @@ static OUString findOrAppendImpl( std::vector< DateTimeDeclImpl >& rVector, cons
// create a reference string with pPrefix and the index of the
// found or created DateTimeDeclImpl
- return OUString::createFromAscii( pPrefix ) + OUString::number( nIndex );
+ return pPrefix + OUString::number( nIndex );
}
-const char gpStrHeaderTextPrefix[] = "hdr";
-const char gpStrFooterTextPrefix[] = "ftr";
-const char gpStrDateTimeTextPrefix[] = "dtd";
+const OUStringLiteral gpStrHeaderTextPrefix = u"hdr";
+const OUStringLiteral gpStrFooterTextPrefix = u"ftr";
+const OUStringLiteral gpStrDateTimeTextPrefix = u"dtd";
HeaderFooterPageSettingsImpl SdXMLExport::ImpPrepDrawPageHeaderFooterDecls( const Reference<XDrawPage>& xDrawPage )
{
diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx
index 6f892de8ca09..79bc77a71e89 100644
--- a/xmloff/source/forms/elementimport.cxx
+++ b/xmloff/source/forms/elementimport.cxx
@@ -442,7 +442,7 @@ namespace xmloff
{
// no optimization here. If this method gets called, the XML stream did not contain a name for the
// element, which is a heavy error. So in this case we don't care for performance
- static const char sUnnamedName[] = "unnamed";
+ static const OUStringLiteral sUnnamedName = u"unnamed";
OSL_ENSURE(m_xParentContainer.is(), "OElementImport::implGetDefaultName: no parent container!");
if (!m_xParentContainer.is())
return sUnnamedName;
diff --git a/xmloff/source/meta/xmlversion.cxx b/xmloff/source/meta/xmlversion.cxx
index 76fe43b5d2fb..2aa1100e5b21 100644
--- a/xmloff/source/meta/xmlversion.cxx
+++ b/xmloff/source/meta/xmlversion.cxx
@@ -40,7 +40,7 @@ using namespace ::com::sun::star::xml::sax;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star;
-const char XMLN_VERSIONSLIST[] = "VersionList.xml";
+const OUStringLiteral XMLN_VERSIONSLIST = u"VersionList.xml";
XMLVersionListExport::XMLVersionListExport(
const css::uno::Reference< css::uno::XComponentContext >& rContext,
diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx
index 7c028bd1ef63..d06bc3cde711 100644
--- a/xmloff/source/text/XMLTextFrameContext.cxx
+++ b/xmloff/source/text/XMLTextFrameContext.cxx
@@ -1226,10 +1226,10 @@ void XMLTextFrameContext_Impl::SetHyperlink( const OUString& rHRef,
const OUString& rTargetFrameName,
bool bMap )
{
- static const char s_HyperLinkURL[] = "HyperLinkURL";
- static const char s_HyperLinkName[] = "HyperLinkName";
- static const char s_HyperLinkTarget[] = "HyperLinkTarget";
- static const char s_ServerMap[] = "ServerMap";
+ static const OUStringLiteral s_HyperLinkURL = u"HyperLinkURL";
+ static const OUStringLiteral s_HyperLinkName = u"HyperLinkName";
+ static const OUStringLiteral s_HyperLinkTarget = u"HyperLinkTarget";
+ static const OUStringLiteral s_ServerMap = u"ServerMap";
if( !xPropSet.is() )
return;
diff --git a/xmloff/source/text/XMLTextListBlockContext.cxx b/xmloff/source/text/XMLTextListBlockContext.cxx
index 9240413a004b..b7a55c2ac80b 100644
--- a/xmloff/source/text/XMLTextListBlockContext.cxx
+++ b/xmloff/source/text/XMLTextListBlockContext.cxx
@@ -55,7 +55,7 @@ XMLTextListBlockContext::XMLTextListBlockContext(
, msListId()
, msContinueListId()
{
- static const char s_PropNameDefaultListId[] = "DefaultListId";
+ static const OUStringLiteral s_PropNameDefaultListId = u"DefaultListId";
{
// get the parent list block context (if any); this is a bit ugly...
XMLTextListBlockContext * pLB(nullptr);
diff --git a/xmloff/source/text/XMLTextMarkImportContext.cxx b/xmloff/source/text/XMLTextMarkImportContext.cxx
index b81152a3c211..e48159449f02 100644
--- a/xmloff/source/text/XMLTextMarkImportContext.cxx
+++ b/xmloff/source/text/XMLTextMarkImportContext.cxx
@@ -241,7 +241,7 @@ static auto PopFieldmark(XMLTextImportHelper & rHelper) -> void
void XMLTextMarkImportContext::endFastElement(sal_Int32 nElement)
{
- static const char sAPI_bookmark[] = "com.sun.star.text.Bookmark";
+ static const OUStringLiteral sAPI_bookmark = u"com.sun.star.text.Bookmark";
lcl_MarkType nTmp{};
if (!SvXMLUnitConverter::convertEnum(nTmp, SvXMLImport::getNameFromToken(nElement), lcl_aMarkTypeMap))
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 0c65d17b1d67..e813d4a725f7 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -86,39 +86,39 @@ using namespace ::xmloff::token;
// service prefix and service names
-constexpr char16_t sAPI_textfield_prefix[] = u"com.sun.star.text.TextField.";
+constexpr OUStringLiteral sAPI_textfield_prefix = u"com.sun.star.text.TextField.";
constexpr char16_t sAPI_fieldmaster_prefix[] = u"com.sun.star.text.FieldMaster.";
const char sAPI_presentation_prefix[] = "com.sun.star.presentation.TextField.";
-const char sAPI_date_time[] = "DateTime";
-const char sAPI_page_number[] = "PageNumber";
-const char sAPI_docinfo_change_date_time[] = "DocInfo.ChangeDateTime";
-const char sAPI_docinfo_create_date_time[] = "DocInfo.CreateDateTime";
-const char sAPI_docinfo_custom[] = "DocInfo.Custom";
-const char sAPI_docinfo_print_date_time[] = "DocInfo.PrintDateTime";
-const char sAPI_dde[] = "DDE";
-const char sAPI_url[] = "URL";
+const OUStringLiteral sAPI_date_time = u"DateTime";
+const OUStringLiteral sAPI_page_number = u"PageNumber";
+const OUStringLiteral sAPI_docinfo_change_date_time = u"DocInfo.ChangeDateTime";
+const OUStringLiteral sAPI_docinfo_create_date_time = u"DocInfo.CreateDateTime";
+const OUStringLiteral sAPI_docinfo_custom = u"DocInfo.Custom";
+const OUStringLiteral sAPI_docinfo_print_date_time = u"DocInfo.PrintDateTime";
+const OUStringLiteral sAPI_dde = u"DDE";
+const OUStringLiteral sAPI_url = u"URL";
// property names
-const char sAPI_is_fixed[] = "IsFixed";
-const char sAPI_content[] = "Content";
-const char sAPI_author[] = "Author";
-const char sAPI_hint[] = "Hint";
-const char sAPI_name[] = "Name";
-const char sAPI_sub_type[] = "SubType";
-const char sAPI_date_time_value[] = "DateTimeValue";
-const char sAPI_number_format[] = "NumberFormat";
-const char sAPI_numbering_type[] = "NumberingType";
-const char sAPI_offset[] = "Offset";
-const char sAPI_condition[] = "Condition";
-const char sAPI_set_number[] = "SetNumber";
-const char sAPI_file_format[] = "FileFormat";
-const char sAPI_is_date[] = "IsDate";
-const char sAPI_current_presentation[] = "CurrentPresentation";
-const char sAPI_is_hidden[] = "IsHidden";
-const char sAPI_is_fixed_language[] = "IsFixedLanguage";
-
-const char sAPI_true[] = "TRUE";
+const OUStringLiteral sAPI_is_fixed = u"IsFixed";
+const OUStringLiteral sAPI_content = u"Content";
+const OUStringLiteral sAPI_author = u"Author";
+const OUStringLiteral sAPI_hint = u"Hint";
+const OUStringLiteral sAPI_name = u"Name";
+const OUStringLiteral sAPI_sub_type = u"SubType";
+const OUStringLiteral sAPI_date_time_value = u"DateTimeValue";
+const OUStringLiteral sAPI_number_format = u"NumberFormat";
+const OUStringLiteral sAPI_numbering_type = u"NumberingType";
+const OUStringLiteral sAPI_offset = u"Offset";
+const OUStringLiteral sAPI_condition = u"Condition";
+const OUStringLiteral sAPI_set_number = u"SetNumber";
+const OUStringLiteral sAPI_file_format = u"FileFormat";
+const OUStringLiteral sAPI_is_date = u"IsDate";
+const OUStringLiteral sAPI_current_presentation = u"CurrentPresentation";
+const OUStringLiteral sAPI_is_hidden = u"IsHidden";
+const OUStringLiteral sAPI_is_fixed_language = u"IsFixedLanguage";
+
+const OUStringLiteral sAPI_true = u"TRUE";
XMLTextFieldImportContext::XMLTextFieldImportContext(
@@ -1537,7 +1537,6 @@ OUString XMLSimpleDocInfoImportContext::MapTokenToServiceName(
case XML_ELEMENT(TEXT, XML_TITLE):
pServiceName = "DocInfo.Title";
break;
-
default:
XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElementToken);
assert(false);
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index 6585a4b25517..e32c02d8ca1b 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -405,7 +405,7 @@ XMLTextImportHelper::XMLTextImportHelper(
bProgress, bBlockMode, bOrganizerMode) )
, m_xBackpatcherImpl( MakeBackpatcherImpl() )
{
- static const char s_PropNameDefaultListId[] = "DefaultListId";
+ static const OUStringLiteral s_PropNameDefaultListId = u"DefaultListId";
Reference< XChapterNumberingSupplier > xCNSupplier( rModel, UNO_QUERY );
@@ -1013,14 +1013,14 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
bool bSetListAttrs,
bool bOutlineContentVisible)
{
- static const char s_NumberingRules[] = "NumberingRules";
- static const char s_NumberingIsNumber[] = "NumberingIsNumber";
- static const char s_NumberingLevel[] = "NumberingLevel";
- static const char s_ParaIsNumberingRestart[] = "ParaIsNumberingRestart";
- static const char s_NumberingStartValue[] = "NumberingStartValue";
- static const char s_PropNameListId[] = "ListId";
- static const char s_PageDescName[] = "PageDescName";
- static const char s_OutlineLevel[] = "OutlineLevel";
+ static const OUStringLiteral s_NumberingRules = u"NumberingRules";
+ static const OUStringLiteral s_NumberingIsNumber = u"NumberingIsNumber";
+ static const OUStringLiteral s_NumberingLevel = u"NumberingLevel";
+ static const OUStringLiteral s_ParaIsNumberingRestart = u"ParaIsNumberingRestart";
+ static const OUStringLiteral s_NumberingStartValue = u"NumberingStartValue";
+ static const OUStringLiteral s_PropNameListId = u"ListId";
+ static const OUStringLiteral s_PageDescName = u"PageDescName";
+ static const OUStringLiteral s_OutlineLevel = u"OutlineLevel";
const XmlStyleFamily nFamily = bPara ? XmlStyleFamily::TEXT_PARAGRAPH
: XmlStyleFamily::TEXT_TEXT;
@@ -1619,12 +1619,12 @@ void XMLTextImportHelper::SetHyperlink(
const OUString& rVisitedStyleName,
XMLEventsImportContext* pEvents)
{
- static const char s_HyperLinkURL[] = "HyperLinkURL";
- static const char s_HyperLinkName[] = "HyperLinkName";
- static const char s_HyperLinkTarget[] = "HyperLinkTarget";
- static const char s_UnvisitedCharStyleName[] = "UnvisitedCharStyleName";
- static const char s_VisitedCharStyleName[] = "VisitedCharStyleName";
- static const char s_HyperLinkEvents[] = "HyperLinkEvents";
+ static const OUStringLiteral s_HyperLinkURL = u"HyperLinkURL";
+ static const OUStringLiteral s_HyperLinkName = u"HyperLinkName";
+ static const OUStringLiteral s_HyperLinkTarget = u"HyperLinkTarget";
+ static const OUStringLiteral s_UnvisitedCharStyleName = u"UnvisitedCharStyleName";
+ static const OUStringLiteral s_VisitedCharStyleName = u"VisitedCharStyleName";
+ static const OUStringLiteral s_HyperLinkEvents = u"HyperLinkEvents";
Reference < XPropertySet > xPropSet( rCursor, UNO_QUERY );
Reference < XPropertySetInfo > xPropSetInfo(
@@ -2212,7 +2212,7 @@ void XMLTextImportHelper::ConnectFrameChains(
bool XMLTextImportHelper::IsInFrame() const
{
- static const char s_TextFrame[] = "TextFrame";
+ static const OUStringLiteral s_TextFrame = u"TextFrame";
bool bIsInFrame = false;
diff --git a/xmloff/source/text/txtvfldi.cxx b/xmloff/source/text/txtvfldi.cxx
index 790844cef1bd..f6fdcaee02c4 100644
--- a/xmloff/source/text/txtvfldi.cxx
+++ b/xmloff/source/text/txtvfldi.cxx
@@ -54,17 +54,17 @@
// service names
constexpr char16_t sAPI_fieldmaster_prefix[] = u"com.sun.star.text.FieldMaster.";
-const char sAPI_get_expression[] = "GetExpression";
-const char sAPI_set_expression[] = "SetExpression";
-const char sAPI_user[] = "User";
-const char sAPI_database[] = "com.sun.star.text.TextField.Database";
+const OUStringLiteral sAPI_get_expression = u"GetExpression";
+const OUStringLiteral sAPI_set_expression = u"SetExpression";
+const OUStringLiteral sAPI_user = u"User";
+const OUStringLiteral sAPI_database = u"com.sun.star.text.TextField.Database";
// property names
-const char sAPI_content[] = "Content";
-const char sAPI_sub_type[] = "SubType";
-const char sAPI_number_format[] = "NumberFormat";
-const char sAPI_is_visible[] = "IsVisible";
-const char sAPI_current_presentation[] = "CurrentPresentation";
+const OUStringLiteral sAPI_content = u"Content";
+const OUStringLiteral sAPI_sub_type = u"SubType";
+const OUStringLiteral sAPI_number_format = u"NumberFormat";
+const OUStringLiteral sAPI_is_visible = u"IsVisible";
+const OUStringLiteral sAPI_current_presentation = u"CurrentPresentation";
using namespace ::com::sun::star;
@@ -866,8 +866,8 @@ bool XMLVariableDeclImportContext::FindFieldMaster(
OUStringBuffer sService;
sService.append(sAPI_fieldmaster_prefix);
- sService.appendAscii((eVarType==VarTypeUserField) ?
- sAPI_user : sAPI_set_expression);
+ sService.append((eVarType==VarTypeUserField) ?
+ OUString(sAPI_user) : OUString(sAPI_set_expression));
Reference<XInterface> xIfc =
xFactory->createInstance( sService.makeStringAndClear() );
if (xIfc.is()) {
diff --git a/xmlscript/source/xmllib_imexp/xmllib_export.cxx b/xmlscript/source/xmllib_imexp/xmllib_export.cxx
index f7a3b17ddc46..fa74273205fb 100644
--- a/xmlscript/source/xmllib_imexp/xmllib_export.cxx
+++ b/xmlscript/source/xmllib_imexp/xmllib_export.cxx
@@ -29,8 +29,8 @@ using namespace com::sun::star;
namespace xmlscript
{
-const char aTrueStr[] = "true";
-const char aFalseStr[] = "false";
+const OUStringLiteral aTrueStr = u"true";
+const OUStringLiteral aFalseStr = u"false";
void
exportLibraryContainer(
diff --git a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
index f6bdfce9c050..a73a392c609b 100644
--- a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
+++ b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
@@ -37,7 +37,7 @@ using namespace com::sun::star;
namespace
{
-char const DATA_DIRECTORY[] = "/xmlsecurity/qa/unit/pdfsigning/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/xmlsecurity/qa/unit/pdfsigning/data/";
}
/// Testsuite for the PDF signing feature.
diff --git a/xmlsecurity/qa/unit/signing/signing.cxx b/xmlsecurity/qa/unit/signing/signing.cxx
index 23d6dc9162dd..c5542dc3306f 100644
--- a/xmlsecurity/qa/unit/signing/signing.cxx
+++ b/xmlsecurity/qa/unit/signing/signing.cxx
@@ -63,7 +63,7 @@ using namespace com::sun::star;
namespace
{
-char const DATA_DIRECTORY[] = "/xmlsecurity/qa/unit/signing/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/xmlsecurity/qa/unit/signing/data/";
}
/// Testsuite for the document signing feature.
diff --git a/xmlsecurity/qa/unit/signing/signing2.cxx b/xmlsecurity/qa/unit/signing/signing2.cxx
index ea88982b9be8..89a3e1bcf2ce 100644
--- a/xmlsecurity/qa/unit/signing/signing2.cxx
+++ b/xmlsecurity/qa/unit/signing/signing2.cxx
@@ -31,7 +31,7 @@ using namespace css;
namespace
{
-char const DATA_DIRECTORY[] = "/xmlsecurity/qa/unit/signing/data/";
+OUStringLiteral const DATA_DIRECTORY = u"/xmlsecurity/qa/unit/signing/data/";
}
/// Testsuite for the document signing feature.