summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--avmedia/source/vlc/vlcframegrabber.cxx4
-rw-r--r--avmedia/source/vlc/vlcplayer.cxx4
-rw-r--r--avmedia/source/vlc/vlcwindow.cxx4
-rw-r--r--basctl/source/basicide/basidectrlr.cxx2
-rw-r--r--basctl/source/basicide/localizationmgr.cxx6
-rw-r--r--chart2/source/controller/dialogs/DialogModel.cxx2
-rw-r--r--chart2/source/controller/dialogs/tp_DataSource.cxx2
-rw-r--r--chart2/source/controller/sidebar/ChartColorWrapper.cxx2
-rw-r--r--chart2/source/model/main/ChartModel.cxx4
-rw-r--r--chart2/source/view/main/ChartView.cxx4
-rw-r--r--comphelper/source/container/embeddedobjectcontainer.cxx2
-rw-r--r--comphelper/source/misc/backupfilehelper.cxx2
-rw-r--r--comphelper/source/officeinstdir/officeinstallationdirectories.cxx4
-rw-r--r--comphelper/source/xml/ofopxmlhelper.cxx36
-rw-r--r--compilerplugins/clang/stringstatic.cxx4
-rw-r--r--connectivity/source/drivers/firebird/Connection.cxx4
-rw-r--r--cui/source/dialogs/colorpicker.cxx4
-rw-r--r--cui/source/options/treeopt.cxx2
-rw-r--r--dbaccess/source/ui/dlg/dbfindex.cxx2
-rw-r--r--desktop/qa/desktop_lib/test_desktop_lib.cxx4
-rw-r--r--desktop/source/lib/init.cxx22
-rw-r--r--extensions/source/bibliography/datman.cxx2
-rw-r--r--extensions/source/logging/csvformatter.cxx2
-rw-r--r--filter/source/msfilter/msocximex.cxx2
-rw-r--r--filter/source/msfilter/msvbahelper.cxx4
-rw-r--r--filter/source/xsltdialog/xmlfilterjar.cxx2
-rw-r--r--idlc/source/astdeclaration.cxx2
-rw-r--r--oox/source/core/xmlfilterbase.cxx6
-rw-r--r--oox/source/crypto/Standard2007Engine.cxx2
-rw-r--r--oox/source/helper/modelobjecthelper.cxx10
-rw-r--r--oox/source/ole/vbacontrol.cxx2
-rw-r--r--oox/source/vml/vmlinputstream.cxx4
-rw-r--r--oox/source/vml/vmlshapecontext.cxx2
-rw-r--r--package/source/manifest/ManifestImport.cxx142
-rw-r--r--package/source/zippackage/ZipPackage.cxx10
-rw-r--r--reportdesign/source/filter/xml/xmlStyleImport.cxx8
-rw-r--r--sal/osl/w32/path_helper.cxx4
-rw-r--r--sal/qa/osl/pipe/osl_Pipe.cxx8
-rw-r--r--sal/qa/rtl/digest/rtl_digest.cxx4
-rw-r--r--sal/qa/rtl/textenc/rtl_textcvt.cxx2
-rw-r--r--sc/source/core/tool/compiler.cxx6
-rw-r--r--sc/source/filter/excel/xiescher.cxx6
-rw-r--r--sc/source/filter/oox/defnamesbuffer.cxx2
-rw-r--r--sc/source/filter/oox/pagesettings.cxx10
-rw-r--r--sc/source/filter/oox/worksheethelper.cxx2
-rw-r--r--sc/source/filter/xml/XMLStylesExportHelper.cxx20
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx2
-rw-r--r--sc/source/filter/xml/xmlstyli.cxx8
-rw-r--r--sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx2
-rw-r--r--sc/source/ui/dbgui/scuiasciiopt.cxx6
-rw-r--r--sc/source/ui/unoobj/PivotTableDataProvider.cxx6
-rw-r--r--sc/source/ui/vba/vbaaxis.cxx8
-rw-r--r--sc/source/ui/vba/vbachart.cxx32
-rw-r--r--sc/source/ui/vba/vbachartobject.cxx2
-rw-r--r--sc/source/ui/view/formatsh.cxx2
-rw-r--r--sd/source/filter/xml/sdtransform.cxx6
-rw-r--r--sd/source/ui/dlg/sdabstdlg.cxx2
-rw-r--r--sd/source/ui/dlg/tpaction.cxx2
-rw-r--r--sd/source/ui/docshell/docshel4.cxx6
-rw-r--r--sd/source/ui/presenter/PresenterTextView.cxx18
-rw-r--r--sd/source/ui/remotecontrol/ImagePreparer.cxx4
-rw-r--r--sd/source/ui/unoidl/unoobj.cxx30
-rw-r--r--sdext/source/presenter/PresenterHelper.cxx2
-rw-r--r--sdext/source/presenter/PresenterNotesView.cxx4
-rw-r--r--sfx2/source/appl/sfxhelp.cxx2
-rw-r--r--sfx2/source/doc/doctemplateslocal.cxx8
-rw-r--r--sfx2/source/doc/objstor.cxx2
-rw-r--r--svx/qa/unit/classicshapes.cxx2
-rw-r--r--svx/qa/unit/customshapes.cxx2
-rw-r--r--svx/source/dialog/ClassificationDialog.cxx2
-rw-r--r--svx/source/form/fmshimp.cxx4
-rw-r--r--svx/source/inc/datanavi.hxx6
-rw-r--r--svx/source/table/tablelayouter.cxx2
-rw-r--r--svx/source/table/tablertfexporter.cxx2
-rw-r--r--svx/source/tbxctrls/extrusioncontrols.cxx4
-rw-r--r--svx/source/tbxctrls/fontworkgallery.cxx6
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx6
-rw-r--r--sw/source/core/edit/edfcol.cxx30
-rw-r--r--sw/source/core/txtnode/thints.cxx2
-rw-r--r--sw/source/filter/ww8/docxexport.cxx4
-rw-r--r--sw/source/filter/xml/xmltexte.cxx2
-rw-r--r--sw/source/uibase/dialog/swabstdlg.cxx2
-rw-r--r--test/source/sheet/xsheetoutline.cxx12
-rw-r--r--ucb/source/ucp/file/filtask.cxx30
-rw-r--r--vbahelper/source/msforms/vbamultipage.cxx2
-rw-r--r--vbahelper/source/msforms/vbaprogressbar.cxx2
-rw-r--r--vbahelper/source/vbahelper/vbaglobalbase.cxx2
-rw-r--r--vcl/qa/api/XGraphicTest.cxx2
-rw-r--r--vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx2
-rw-r--r--vcl/qa/cppunit/jpeg/JpegReaderTest.cxx2
-rw-r--r--vcl/qa/cppunit/jpeg/JpegWriterTest.cxx2
-rw-r--r--vcl/qa/cppunit/widgetdraw/WidgetDefinitionReaderTest.cxx2
-rw-r--r--vcl/source/app/IconThemeInfo.cxx6
-rw-r--r--vcl/unx/generic/printer/ppdparser.cxx2
-rw-r--r--xmloff/source/core/SettingsExportHelper.cxx14
-rw-r--r--xmloff/source/draw/XMLImageMapContext.cxx2
-rw-r--r--xmloff/source/draw/XMLImageMapExport.cxx22
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx2
-rw-r--r--xmloff/source/draw/shapeexport.cxx40
-rw-r--r--xmloff/source/script/XMLEventExport.cxx2
-rw-r--r--xmloff/source/script/XMLScriptContextFactory.cxx6
-rw-r--r--xmloff/source/script/XMLScriptExportHandler.cxx2
-rw-r--r--xmloff/source/script/XMLStarBasicContextFactory.cxx8
-rw-r--r--xmloff/source/script/XMLStarBasicExportHandler.cxx10
-rw-r--r--xmloff/source/style/XMLPageExport.cxx4
-rw-r--r--xmloff/source/style/numehelp.cxx8
-rw-r--r--xmloff/source/style/prstylei.cxx4
-rw-r--r--xmloff/source/style/styleexp.cxx10
-rw-r--r--xmloff/source/style/xmlnume.cxx6
-rw-r--r--xmloff/source/style/xmlnumi.cxx10
-rw-r--r--xmloff/source/style/xmlstyle.cxx4
-rw-r--r--xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx24
-rw-r--r--xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx20
-rw-r--r--xmloff/source/text/XMLLineNumberingImportContext.cxx22
-rw-r--r--xmloff/source/text/XMLTextColumnsContext.cxx14
-rw-r--r--xmloff/source/text/XMLTextColumnsExport.cxx16
-rw-r--r--xmloff/source/text/XMLTextMasterPageContext.cxx2
-rw-r--r--xmloff/source/text/XMLTextMasterPageExport.cxx22
-rw-r--r--xmloff/source/text/XMLTextShapeImportHelper.cxx6
-rw-r--r--xmloff/source/text/XMLTextShapeStyleContext.cxx2
-rw-r--r--xmloff/source/text/txtflde.cxx140
-rw-r--r--xmloff/source/text/txtfldi.cxx34
-rw-r--r--xmlscript/source/xml_helper/xml_impctx.cxx4
123 files changed, 570 insertions, 570 deletions
diff --git a/avmedia/source/vlc/vlcframegrabber.cxx b/avmedia/source/vlc/vlcframegrabber.cxx
index 359e2c409f79..6b8a689029a2 100644
--- a/avmedia/source/vlc/vlcframegrabber.cxx
+++ b/avmedia/source/vlc/vlcframegrabber.cxx
@@ -42,8 +42,8 @@ namespace avmedia::vlc {
namespace
{
- const OUStringLiteral AVMEDIA_VLC_GRABBER_IMPLEMENTATIONNAME = u"com.sun.star.comp.avmedia.VLCFrameGrabber_VLC";
- const OUStringLiteral AVMEDIA_VLC_GRABBER_SERVICENAME = u"com.sun.star.media.VLCFrameGrabber_VLC";
+ constexpr OUStringLiteral AVMEDIA_VLC_GRABBER_IMPLEMENTATIONNAME = u"com.sun.star.comp.avmedia.VLCFrameGrabber_VLC";
+ constexpr OUStringLiteral AVMEDIA_VLC_GRABBER_SERVICENAME = u"com.sun.star.media.VLCFrameGrabber_VLC";
const int MSEC_IN_SEC = 1000;
const char * const VLC_ARGS[] = {
diff --git a/avmedia/source/vlc/vlcplayer.cxx b/avmedia/source/vlc/vlcplayer.cxx
index 4880b1869b7c..215c7fa01310 100644
--- a/avmedia/source/vlc/vlcplayer.cxx
+++ b/avmedia/source/vlc/vlcplayer.cxx
@@ -32,8 +32,8 @@ namespace avmedia::vlc {
namespace
{
- const OUStringLiteral AVMEDIA_VLC_PLAYER_IMPLEMENTATIONNAME = u"com.sun.star.comp.avmedia.Player_VLC";
- const OUStringLiteral AVMEDIA_VLC_PLAYER_SERVICENAME = u"com.sun.star.media.Player_VLC";
+ constexpr OUStringLiteral AVMEDIA_VLC_PLAYER_IMPLEMENTATIONNAME = u"com.sun.star.comp.avmedia.Player_VLC";
+ constexpr OUStringLiteral AVMEDIA_VLC_PLAYER_SERVICENAME = u"com.sun.star.media.Player_VLC";
const int MS_IN_SEC = 1000; // Millisec in sec
}
diff --git a/avmedia/source/vlc/vlcwindow.cxx b/avmedia/source/vlc/vlcwindow.cxx
index 29c8b239899a..45bd805e344d 100644
--- a/avmedia/source/vlc/vlcwindow.cxx
+++ b/avmedia/source/vlc/vlcwindow.cxx
@@ -28,8 +28,8 @@ namespace avmedia::vlc {
namespace
{
- const OUStringLiteral AVMEDIA_VLC_WINDOW_IMPLEMENTATIONNAME = u"com.sun.star.comp.avmedia.Window_VLC";
- const OUStringLiteral AVMEDIA_VLC_WINDOW_SERVICENAME = u"com.sun.star.media.Window_VLC";
+ constexpr OUStringLiteral AVMEDIA_VLC_WINDOW_IMPLEMENTATIONNAME = u"com.sun.star.comp.avmedia.Window_VLC";
+ constexpr OUStringLiteral AVMEDIA_VLC_WINDOW_SERVICENAME = u"com.sun.star.media.Window_VLC";
}
VLCWindow::VLCWindow( VLCPlayer& player, const intptr_t prevWinID )
diff --git a/basctl/source/basicide/basidectrlr.cxx b/basctl/source/basicide/basidectrlr.cxx
index da8334f0a093..88e67bc3bbc0 100644
--- a/basctl/source/basicide/basidectrlr.cxx
+++ b/basctl/source/basicide/basidectrlr.cxx
@@ -32,7 +32,7 @@ namespace
{
int const nPropertyIconId = 1;
-OUStringLiteral const sPropertyIconId(u"IconId");
+constexpr OUStringLiteral sPropertyIconId(u"IconId");
}
diff --git a/basctl/source/basicide/localizationmgr.cxx b/basctl/source/basicide/localizationmgr.cxx
index c8a393440094..3a57c8de672d 100644
--- a/basctl/source/basicide/localizationmgr.cxx
+++ b/basctl/source/basicide/localizationmgr.cxx
@@ -47,9 +47,9 @@ using namespace ::com::sun::star::resource;
namespace
{
-OUStringLiteral const aDot(u".");
-OUStringLiteral const aEsc(u"&");
-OUStringLiteral const aSemi(u";");
+constexpr OUStringLiteral aDot(u".");
+constexpr OUStringLiteral aEsc(u"&");
+constexpr OUStringLiteral aSemi(u";");
} // namespace
diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx
index cb4bc4413f20..7e7d10896d03 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -54,7 +54,7 @@ using ::com::sun::star::uno::Sequence;
namespace
{
-const OUStringLiteral lcl_aLabelRole( u"label" );
+constexpr OUStringLiteral lcl_aLabelRole( u"label" );
struct lcl_ChartTypeToSeriesCnt
{
diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx
index 99b24f47d5f4..6ac626957517 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.cxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.cxx
@@ -46,7 +46,7 @@ using ::com::sun::star::uno::Sequence;
namespace
{
-const OUStringLiteral lcl_aLabelRole( u"label" );
+constexpr OUStringLiteral lcl_aLabelRole( u"label" );
void lcl_UpdateCurrentRange(weld::TreeView& rOutListBox, const OUString & rRole,
const OUString& rRange)
diff --git a/chart2/source/controller/sidebar/ChartColorWrapper.cxx b/chart2/source/controller/sidebar/ChartColorWrapper.cxx
index aace24ef7830..962c5b935004 100644
--- a/chart2/source/controller/sidebar/ChartColorWrapper.cxx
+++ b/chart2/source/controller/sidebar/ChartColorWrapper.cxx
@@ -100,7 +100,7 @@ void ChartColorWrapper::updateModel(const css::uno::Reference<css::frame::XModel
void ChartColorWrapper::updateData()
{
- static const OUStringLiteral aLineColor = u"LineColor";
+ static constexpr OUStringLiteral aLineColor = u"LineColor";
static const std::u16string_view aCommands[2] = {u".uno:XLineColor", u".uno:FillColor"};
css::uno::Reference<css::beans::XPropertySet> xPropSet = getPropSet(mxModel);
diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx
index 14d96c15a874..0b75c82319d1 100644
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -69,9 +69,9 @@ using namespace ::chart::CloneHelper;
namespace
{
-const OUStringLiteral lcl_aGDIMetaFileMIMEType(
+constexpr OUStringLiteral lcl_aGDIMetaFileMIMEType(
u"application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"");
-const OUStringLiteral lcl_aGDIMetaFileMIMETypeHighContrast(
+constexpr OUStringLiteral lcl_aGDIMetaFileMIMETypeHighContrast(
u"application/x-openoffice-highcontrast-gdimetafile;windows_formatname=\"GDIMetaFile\"");
} // anonymous namespace
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 126a041fe832..bfb7ed2bda20 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -1108,9 +1108,9 @@ void ChartView::impl_deleteCoordinateSystems()
// datatransfer::XTransferable
namespace
{
-const OUStringLiteral lcl_aGDIMetaFileMIMEType(
+constexpr OUStringLiteral lcl_aGDIMetaFileMIMEType(
u"application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"" );
-const OUStringLiteral lcl_aGDIMetaFileMIMETypeHighContrast(
+constexpr OUStringLiteral lcl_aGDIMetaFileMIMETypeHighContrast(
u"application/x-openoffice-highcontrast-gdimetafile;windows_formatname=\"GDIMetaFile\"" );
} // anonymous namespace
diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx
index 6adb91987455..92b93a1ff704 100644
--- a/comphelper/source/container/embeddedobjectcontainer.cxx
+++ b/comphelper/source/container/embeddedobjectcontainer.cxx
@@ -914,7 +914,7 @@ bool EmbeddedObjectContainer::RemoveEmbeddedObject( const uno::Reference < embed
// the media type will be provided with object insertion
OUString aOrigStorMediaType;
uno::Reference< beans::XPropertySet > xStorProps( pImpl->mxStorage, uno::UNO_QUERY_THROW );
- static const OUStringLiteral s_sMediaType(u"MediaType");
+ static constexpr OUStringLiteral s_sMediaType(u"MediaType");
xStorProps->getPropertyValue( s_sMediaType ) >>= aOrigStorMediaType;
SAL_WARN_IF( aOrigStorMediaType.isEmpty(), "comphelper.container", "No valuable media type in the storage!" );
diff --git a/comphelper/source/misc/backupfilehelper.cxx b/comphelper/source/misc/backupfilehelper.cxx
index 02e279623971..dc9e0ab9143d 100644
--- a/comphelper/source/misc/backupfilehelper.cxx
+++ b/comphelper/source/misc/backupfilehelper.cxx
@@ -353,7 +353,7 @@ namespace
typedef std::vector< ExtensionInfoEntry > ExtensionInfoEntryVector;
- const OUStringLiteral gaRegPath { u"/registry/com.sun.star.comp.deployment.bundle.PackageRegistryBackend/backenddb.xml" };
+ constexpr OUStringLiteral gaRegPath { u"/registry/com.sun.star.comp.deployment.bundle.PackageRegistryBackend/backenddb.xml" };
class ExtensionInfo
{
diff --git a/comphelper/source/officeinstdir/officeinstallationdirectories.cxx b/comphelper/source/officeinstdir/officeinstallationdirectories.cxx
index 79dfcd9ebb48..1bee23622d42 100644
--- a/comphelper/source/officeinstdir/officeinstallationdirectories.cxx
+++ b/comphelper/source/officeinstdir/officeinstallationdirectories.cxx
@@ -75,8 +75,8 @@ static bool makeCanonicalFileURL( OUString & rURL )
namespace comphelper {
-OUStringLiteral const g_aOfficeBrandDirMacro(u"$(brandbaseurl)");
-OUStringLiteral const g_aUserDirMacro(u"$(userdataurl)");
+constexpr OUStringLiteral g_aOfficeBrandDirMacro(u"$(brandbaseurl)");
+constexpr OUStringLiteral g_aUserDirMacro(u"$(userdataurl)");
OfficeInstallationDirectories::OfficeInstallationDirectories(
const uno::Reference< uno::XComponentContext > & xCtx )
diff --git a/comphelper/source/xml/ofopxmlhelper.cxx b/comphelper/source/xml/ofopxmlhelper.cxx
index 9e8886b48f24..3bf5984f9d83 100644
--- a/comphelper/source/xml/ofopxmlhelper.cxx
+++ b/comphelper/source/xml/ofopxmlhelper.cxx
@@ -196,12 +196,12 @@ void WriteContentSequence(
xWriter->setOutputStream( xOutStream );
- static const OUStringLiteral aTypesElement(u"Types");
- static const OUStringLiteral aDefaultElement(u"Default");
- static const OUStringLiteral aOverrideElement(u"Override");
- static const OUStringLiteral aContentTypeAttr(u"ContentType");
- static const OUStringLiteral aCDATAString(u"CDATA");
- static const OUStringLiteral aWhiteSpace(u" ");
+ static constexpr OUStringLiteral aTypesElement(u"Types");
+ static constexpr OUStringLiteral aDefaultElement(u"Default");
+ static constexpr OUStringLiteral aOverrideElement(u"Override");
+ static constexpr OUStringLiteral aContentTypeAttr(u"ContentType");
+ static constexpr OUStringLiteral aCDATAString(u"CDATA");
+ static constexpr OUStringLiteral aWhiteSpace(u" ");
// write the namespace
AttributeList* pRootAttrList = new AttributeList;
@@ -269,20 +269,20 @@ uno::Sequence< uno::Sequence< beans::StringPair > > ReadSequence_Impl(
} // namespace OFOPXMLHelper
// Relations info related strings
-OUStringLiteral const g_aRelListElement(u"Relationships");
-OUStringLiteral const g_aRelElement( u"Relationship" );
-OUStringLiteral const g_aIDAttr( u"Id" );
-OUStringLiteral const g_aTypeAttr( u"Type" );
-OUStringLiteral const g_aTargetModeAttr( u"TargetMode" );
-OUStringLiteral const g_aTargetAttr( u"Target" );
+constexpr OUStringLiteral g_aRelListElement(u"Relationships");
+constexpr OUStringLiteral g_aRelElement( u"Relationship" );
+constexpr OUStringLiteral g_aIDAttr( u"Id" );
+constexpr OUStringLiteral g_aTypeAttr( u"Type" );
+constexpr OUStringLiteral g_aTargetModeAttr( u"TargetMode" );
+constexpr OUStringLiteral g_aTargetAttr( u"Target" );
// ContentType related strings
-OUStringLiteral const g_aTypesElement( u"Types" );
-OUStringLiteral const g_aDefaultElement( u"Default" );
-OUStringLiteral const g_aOverrideElement( u"Override" );
-OUStringLiteral const g_aExtensionAttr( u"Extension" );
-OUStringLiteral const g_aPartNameAttr( u"PartName" );
-OUStringLiteral const g_aContentTypeAttr( u"ContentType" );
+constexpr OUStringLiteral g_aTypesElement( u"Types" );
+constexpr OUStringLiteral g_aDefaultElement( u"Default" );
+constexpr OUStringLiteral g_aOverrideElement( u"Override" );
+constexpr OUStringLiteral g_aExtensionAttr( u"Extension" );
+constexpr OUStringLiteral g_aPartNameAttr( u"PartName" );
+constexpr OUStringLiteral g_aContentTypeAttr( u"ContentType" );
OFOPXMLHelper_Impl::OFOPXMLHelper_Impl( sal_uInt16 nFormat )
: m_nFormat( nFormat )
diff --git a/compilerplugins/clang/stringstatic.cxx b/compilerplugins/clang/stringstatic.cxx
index fcc984b0515b..364bc566aa97 100644
--- a/compilerplugins/clang/stringstatic.cxx
+++ b/compilerplugins/clang/stringstatic.cxx
@@ -17,8 +17,8 @@
/** Look for static O*String and O*String[], they can be more efficiently declared as:
- static const OUStringLiteral our_aLBEntryMap[] = {u" ", u", "};
- static const OUStringLiteral sName(u"name");
+ static constexpr OUStringLiteral our_aLBEntryMap[] = {u" ", u", "};
+ static constexpr OUStringLiteral sName(u"name");
which is more efficient at startup time.
*/
diff --git a/connectivity/source/drivers/firebird/Connection.cxx b/connectivity/source/drivers/firebird/Connection.cxx
index 62bac1d8c88c..05c24e9f73be 100644
--- a/connectivity/source/drivers/firebird/Connection.cxx
+++ b/connectivity/source/drivers/firebird/Connection.cxx
@@ -72,11 +72,11 @@ using namespace ::com::sun::star::uno;
* Location within the .odb that an embedded .fdb will be stored.
* Only relevant for embedded dbs.
*/
-const OUStringLiteral our_sFDBLocation( u"firebird.fdb" );
+constexpr OUStringLiteral our_sFDBLocation( u"firebird.fdb" );
/**
* Older version of LO may store the database in a .fdb file
*/
-const OUStringLiteral our_sFBKLocation( u"firebird.fbk" );
+constexpr OUStringLiteral our_sFBKLocation( u"firebird.fbk" );
Connection::Connection()
: Connection_BASE(m_aMutex)
diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx
index c7ba64437b24..da948f9492b1 100644
--- a/cui/source/dialogs/colorpicker.cxx
+++ b/cui/source/dialogs/colorpicker.cxx
@@ -1247,8 +1247,8 @@ com_sun_star_cui_ColorPicker_get_implementation(
}
-const OUStringLiteral gsColorKey( u"Color" );
-const OUStringLiteral gsModeKey( u"Mode" );
+constexpr OUStringLiteral gsColorKey( u"Color" );
+constexpr OUStringLiteral gsModeKey( u"Mode" );
ColorPicker::ColorPicker()
: ColorPickerBase( m_aMutex )
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 25a2f9a679e1..209f5d3d9384 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -118,7 +118,7 @@ using namespace ::com::sun::star::util;
LastPageSaver* OfaTreeOptionsDialog::pLastPageSaver = nullptr;
// some stuff for easier changes for SvtViewOptions
-const OUStringLiteral VIEWOPT_DATANAME = u"page data";
+constexpr OUStringLiteral VIEWOPT_DATANAME = u"page data";
static void SetViewOptUserItem( SvtViewOptions& rOpt, const OUString& rData )
{
diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx
index 5cd2f85f20c3..011050e8f8cf 100644
--- a/dbaccess/source/ui/dlg/dbfindex.cxx
+++ b/dbaccess/source/ui/dlg/dbfindex.cxx
@@ -36,7 +36,7 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::ucb;
using namespace ::svt;
-const OStringLiteral aGroupIdent("dBase III");
+constexpr OStringLiteral aGroupIdent("dBase III");
ODbaseIndexDialog::ODbaseIndexDialog(weld::Window * pParent, const OUString& aDataSrcName)
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 2aa81b3e3b88..68f6add5139c 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -2739,7 +2739,7 @@ void DesktopLOKTest::testComplexSelection()
{
// Start with a blank text file and add contents.
LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
- static const OStringLiteral aText("hello world");
+ static constexpr OStringLiteral aText("hello world");
// Certainly not complex.
CPPUNIT_ASSERT_EQUAL(static_cast<int>(LOK_SELTYPE_NONE), pDocument->pClass->getSelectionType(pDocument));
@@ -2821,7 +2821,7 @@ void DesktopLOKTest::testCalcSaveAs()
void DesktopLOKTest::testSpellcheckerMultiView()
{
- static const OUStringLiteral aLangISO(u"en-US");
+ static constexpr OUStringLiteral aLangISO(u"en-US");
SvtSysLocaleOptions aSysLocaleOptions;
aSysLocaleOptions.SetLocaleConfigString(aLangISO);
aSysLocaleOptions.SetUILocaleConfigString(aLangISO);
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index ecef209842a8..24b3a1f9c24f 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3713,13 +3713,13 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* /*pThis*/, unsigned long
if (aMap.find("id") == aMap.end())
return;
- static const OUStringLiteral sClickAction(u"CLICK");
- static const OUStringLiteral sSelectAction(u"SELECT");
- static const OUStringLiteral sClearAction(u"CLEAR");
- static const OUStringLiteral sTypeAction(u"TYPE");
- static const OUStringLiteral sUpAction(u"UP");
- static const OUStringLiteral sDownAction(u"DOWN");
- static const OUStringLiteral sValue(u"VALUE");
+ static constexpr OUStringLiteral sClickAction(u"CLICK");
+ static constexpr OUStringLiteral sSelectAction(u"SELECT");
+ static constexpr OUStringLiteral sClearAction(u"CLEAR");
+ static constexpr OUStringLiteral sTypeAction(u"TYPE");
+ static constexpr OUStringLiteral sUpAction(u"UP");
+ static constexpr OUStringLiteral sDownAction(u"DOWN");
+ static constexpr OUStringLiteral sValue(u"VALUE");
bool bIsWeldedDialog = false;
@@ -4894,10 +4894,10 @@ static char* doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo
SetLastExceptionMsg();
OString aCommand(pCommand);
- static const OStringLiteral aViewRowColumnHeaders(".uno:ViewRowColumnHeaders");
- static const OStringLiteral aSheetGeometryData(".uno:SheetGeometryData");
- static const OStringLiteral aCellCursor(".uno:CellCursor");
- static const OStringLiteral aFontSubset(".uno:FontSubset&name=");
+ static constexpr OStringLiteral aViewRowColumnHeaders(".uno:ViewRowColumnHeaders");
+ static constexpr OStringLiteral aSheetGeometryData(".uno:SheetGeometryData");
+ static constexpr OStringLiteral aCellCursor(".uno:CellCursor");
+ static constexpr OStringLiteral aFontSubset(".uno:FontSubset&name=");
if (!strcmp(pCommand, ".uno:LanguageStatus"))
{
diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx
index 47754921b3e9..7209c978471f 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -524,7 +524,7 @@ void SAL_CALL BibInterceptorHelper::setMasterDispatchProvider( const css::uno::R
}
-OUStringLiteral const gGridName(u"theGrid");
+constexpr OUStringLiteral gGridName(u"theGrid");
BibDataManager::BibDataManager()
:BibDataManager_Base( GetMutex() )
diff --git a/extensions/source/logging/csvformatter.cxx b/extensions/source/logging/csvformatter.cxx
index ce140329457e..57f4d3cf0545 100644
--- a/extensions/source/logging/csvformatter.cxx
+++ b/extensions/source/logging/csvformatter.cxx
@@ -88,7 +88,7 @@ namespace
{
const sal_Unicode quote_char = '"';
const sal_Unicode comma_char = ',';
- const OUStringLiteral dos_newline = u"\r\n";
+ constexpr OUStringLiteral dos_newline = u"\r\n";
bool needsQuoting(const OUString& str)
{
diff --git a/filter/source/msfilter/msocximex.cxx b/filter/source/msfilter/msocximex.cxx
index ae4198cec178..d2236f62c30c 100644
--- a/filter/source/msfilter/msocximex.cxx
+++ b/filter/source/msfilter/msocximex.cxx
@@ -31,7 +31,7 @@
using namespace ::com::sun::star;
-OUStringLiteral const sWW8_form( u"WW-Standard" );
+constexpr OUStringLiteral sWW8_form( u"WW-Standard" );
SvxMSConvertOCXControls::SvxMSConvertOCXControls( const uno::Reference< frame::XModel >& rxModel) : mxModel(rxModel)
{
diff --git a/filter/source/msfilter/msvbahelper.cxx b/filter/source/msfilter/msvbahelper.cxx
index 6beab7cb82ad..4614d4306aff 100644
--- a/filter/source/msfilter/msvbahelper.cxx
+++ b/filter/source/msfilter/msvbahelper.cxx
@@ -48,8 +48,8 @@ using namespace ::com::sun::star;
namespace ooo::vba {
-const OUStringLiteral sUrlPart0( u"vnd.sun.star.script:" );
-const OUStringLiteral sUrlPart1( u"?language=Basic&location=document" );
+constexpr OUStringLiteral sUrlPart0( u"vnd.sun.star.script:" );
+constexpr OUStringLiteral sUrlPart1( u"?language=Basic&location=document" );
OUString makeMacroURL( const OUString& sMacroName )
{
diff --git a/filter/source/xsltdialog/xmlfilterjar.cxx b/filter/source/xsltdialog/xmlfilterjar.cxx
index 7bc05b27e093..4bf9f156c535 100644
--- a/filter/source/xsltdialog/xmlfilterjar.cxx
+++ b/filter/source/xsltdialog/xmlfilterjar.cxx
@@ -59,7 +59,7 @@ using namespace com::sun::star::io;
using ::rtl::Uri;
-const OUStringLiteral sVndSunStarPackage(u"vnd.sun.star.Package:");
+constexpr OUStringLiteral sVndSunStarPackage(u"vnd.sun.star.Package:");
XMLFilterJarHelper::XMLFilterJarHelper( const Reference< XComponentContext >& rxContext )
: mxContext( rxContext ),
diff --git a/idlc/source/astdeclaration.cxx b/idlc/source/astdeclaration.cxx
index e3c5dff52682..58939868aac3 100644
--- a/idlc/source/astdeclaration.cxx
+++ b/idlc/source/astdeclaration.cxx
@@ -22,7 +22,7 @@
#include <rtl/strbuf.hxx>
#include <osl/diagnose.h>
-const OStringLiteral sGlobal("::");
+constexpr OStringLiteral sGlobal("::");
static OString convertName(const OString& name)
{
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index adf132dded13..dbc419c28a3e 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -181,7 +181,7 @@ struct XmlFilterBaseImpl
explicit XmlFilterBaseImpl();
};
-const OUStringLiteral gaBinSuffix( u".bin" );
+constexpr OUStringLiteral gaBinSuffix( u".bin" );
XmlFilterBaseImpl::XmlFilterBaseImpl() :
mrNamespaceMap(StaticNamespaceMap::get())
@@ -248,7 +248,7 @@ void XmlFilterBase::putPropertiesToDocumentGrabBag(const css::uno::Reference<css
{
uno::Reference<beans::XPropertySetInfo> xPropsInfo = xDocProps->getPropertySetInfo();
- static const OUStringLiteral aGrabBagPropName = u"InteropGrabBag";
+ static constexpr OUStringLiteral aGrabBagPropName = u"InteropGrabBag";
if (xPropsInfo.is() && xPropsInfo->hasPropertyByName(aGrabBagPropName))
{
// get existing grab bag
@@ -1041,7 +1041,7 @@ void XmlFilterBase::exportCustomFragments()
uno::Reference<beans::XPropertySet> xPropSet(xModel, uno::UNO_QUERY_THROW);
uno::Reference<beans::XPropertySetInfo> xPropSetInfo = xPropSet->getPropertySetInfo();
- static const OUStringLiteral aName = u"" UNO_NAME_MISC_OBJ_INTEROPGRABBAG;
+ static constexpr OUStringLiteral aName = u"" UNO_NAME_MISC_OBJ_INTEROPGRABBAG;
if (!xPropSetInfo->hasPropertyByName(aName))
return;
diff --git a/oox/source/crypto/Standard2007Engine.cxx b/oox/source/crypto/Standard2007Engine.cxx
index ebfac58ee3f8..ec9269e771fc 100644
--- a/oox/source/crypto/Standard2007Engine.cxx
+++ b/oox/source/crypto/Standard2007Engine.cxx
@@ -32,7 +32,7 @@ void lclRandomGenerateValues(sal_uInt8* aArray, sal_uInt32 aSize)
rtl_random_destroyPool(aRandomPool);
}
-const OUStringLiteral lclCspName = u"Microsoft Enhanced RSA and AES Cryptographic Provider";
+constexpr OUStringLiteral lclCspName = u"Microsoft Enhanced RSA and AES Cryptographic Provider";
constexpr const sal_uInt32 AES128Size = 16;
} // end anonymous namespace
diff --git a/oox/source/helper/modelobjecthelper.cxx b/oox/source/helper/modelobjecthelper.cxx
index da84bd63c6c8..c5115bba3e7c 100644
--- a/oox/source/helper/modelobjecthelper.cxx
+++ b/oox/source/helper/modelobjecthelper.cxx
@@ -88,11 +88,11 @@ void ObjectContainer::createContainer() const
OSL_ENSURE( mxContainer.is(), "ObjectContainer::createContainer - container not found" );
}
-const OUStringLiteral gaDashNameBase( u"msLineDash " ); ///< Base name for all named line dashes.
-const OUStringLiteral gaGradientNameBase( u"msFillGradient " ); ///< Base name for all named fill gradients.
-const OUStringLiteral gaTransGradNameBase( u"msTransGradient " ); ///< Base name for all named fill gradients.
-const OUStringLiteral gaBitmapUrlNameBase( u"msFillBitmap " ); ///< Base name for all named fill bitmap URLs.
-const OUStringLiteral gaHatchNameBase( u"msFillHatch " ); ///< Base name for all named fill hatches.
+constexpr OUStringLiteral gaDashNameBase( u"msLineDash " ); ///< Base name for all named line dashes.
+constexpr OUStringLiteral gaGradientNameBase( u"msFillGradient " ); ///< Base name for all named fill gradients.
+constexpr OUStringLiteral gaTransGradNameBase( u"msTransGradient " ); ///< Base name for all named fill gradients.
+constexpr OUStringLiteral gaBitmapUrlNameBase( u"msFillBitmap " ); ///< Base name for all named fill bitmap URLs.
+constexpr OUStringLiteral gaHatchNameBase( u"msFillHatch " ); ///< Base name for all named fill hatches.
ModelObjectHelper::ModelObjectHelper( const Reference< XMultiServiceFactory >& rxModelFactory ) :
maMarkerContainer( rxModelFactory, "com.sun.star.drawing.MarkerTable" ),
diff --git a/oox/source/ole/vbacontrol.cxx b/oox/source/ole/vbacontrol.cxx
index 18bcb2226805..1b85c27dd6f6 100644
--- a/oox/source/ole/vbacontrol.cxx
+++ b/oox/source/ole/vbacontrol.cxx
@@ -100,7 +100,7 @@ private:
sal_Int32 mnIndex;
};
-const OUStringLiteral gaDummyBaseName( u"DummyGroupSep" );
+constexpr OUStringLiteral gaDummyBaseName( u"DummyGroupSep" );
VbaControlNamesSet::VbaControlNamesSet() :
mnIndex( 0 )
diff --git a/oox/source/vml/vmlinputstream.cxx b/oox/source/vml/vmlinputstream.cxx
index 72bceb6e4016..cdb8b9724ec6 100644
--- a/oox/source/vml/vmlinputstream.cxx
+++ b/oox/source/vml/vmlinputstream.cxx
@@ -263,8 +263,8 @@ bool lclProcessCharacters( OStringBuffer& rBuffer, const OString& rChars )
} // namespace
-const OStringLiteral gaOpeningCData( "<![CDATA[" );
-const OStringLiteral gaClosingCData( "]]>" );
+constexpr OStringLiteral gaOpeningCData( "<![CDATA[" );
+constexpr OStringLiteral gaClosingCData( "]]>" );
InputStream::InputStream( const Reference< XComponentContext >& rxContext, const Reference< XInputStream >& rxInStrm ) :
// use single-byte ISO-8859-1 encoding which maps all byte characters to the first 256 Unicode characters
diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx
index 6613f476930a..5ade9c17bd93 100644
--- a/oox/source/vml/vmlshapecontext.cxx
+++ b/oox/source/vml/vmlshapecontext.cxx
@@ -290,7 +290,7 @@ ShapeTypeContext::ShapeTypeContext(ContextHandler2Helper const & rParent,
{
mrTypeModel.maShapeName = rAttribs.getXString( XML_id, OUString() );
// get ShapeType and ShapeId from name for compatibility
- static const OUStringLiteral sShapeTypePrefix = u"shapetype_";
+ static constexpr OUStringLiteral sShapeTypePrefix = u"shapetype_";
if( mrTypeModel.maShapeName.startsWith( sShapeTypePrefix ) )
{
mrTypeModel.maShapeId = mrTypeModel.maShapeName;
diff --git a/package/source/manifest/ManifestImport.cxx b/package/source/manifest/ManifestImport.cxx
index 81acb9e403cf..76c0be4ea36f 100644
--- a/package/source/manifest/ManifestImport.cxx
+++ b/package/source/manifest/ManifestImport.cxx
@@ -34,77 +34,77 @@ using namespace com::sun::star;
using namespace std;
-const OUStringLiteral gsFileEntryElement ( u"" ELEMENT_FILE_ENTRY );
-const OUStringLiteral gsEncryptionDataElement( u"" ELEMENT_ENCRYPTION_DATA );
-const OUStringLiteral gsAlgorithmElement ( u"" ELEMENT_ALGORITHM );
-const OUStringLiteral gsStartKeyAlgElement ( u"" ELEMENT_START_KEY_GENERATION );
-const OUStringLiteral gsKeyDerivationElement( u"" ELEMENT_KEY_DERIVATION );
-
-const OUStringLiteral gsMediaTypeAttribute ( u"" ATTRIBUTE_MEDIA_TYPE );
-const OUStringLiteral gsVersionAttribute ( u"" ATTRIBUTE_VERSION );
-const OUStringLiteral gsFullPathAttribute ( u"" ATTRIBUTE_FULL_PATH );
-const OUStringLiteral gsSizeAttribute ( u"" ATTRIBUTE_SIZE );
-const OUStringLiteral gsSaltAttribute ( u"" ATTRIBUTE_SALT );
-const OUStringLiteral gsInitialisationVectorAttribute ( u"" ATTRIBUTE_INITIALISATION_VECTOR );
-const OUStringLiteral gsIterationCountAttribute ( u"" ATTRIBUTE_ITERATION_COUNT );
-const OUStringLiteral gsKeySizeAttribute ( u"" ATTRIBUTE_KEY_SIZE );
-const OUStringLiteral gsAlgorithmNameAttribute ( u"" ATTRIBUTE_ALGORITHM_NAME );
-const OUStringLiteral gsStartKeyAlgNameAttribute ( u"" ATTRIBUTE_START_KEY_GENERATION_NAME );
-const OUStringLiteral gsKeyDerivationNameAttribute ( u"" ATTRIBUTE_KEY_DERIVATION_NAME );
-const OUStringLiteral gsChecksumAttribute ( u"" ATTRIBUTE_CHECKSUM );
-const OUStringLiteral gsChecksumTypeAttribute ( u"" ATTRIBUTE_CHECKSUM_TYPE );
-
-const OUStringLiteral gsKeyInfoElement ( u"" ELEMENT_ENCRYPTED_KEYINFO );
-const OUStringLiteral gsManifestKeyInfoElement ( u"" ELEMENT_MANIFEST_KEYINFO );
-const OUStringLiteral gsEncryptedKeyElement ( u"" ELEMENT_ENCRYPTEDKEY );
-const OUStringLiteral gsEncryptionMethodElement ( u"" ELEMENT_ENCRYPTIONMETHOD );
-const OUStringLiteral gsPgpDataElement ( u"" ELEMENT_PGPDATA );
-const OUStringLiteral gsPgpKeyIDElement ( u"" ELEMENT_PGPKEYID );
-const OUStringLiteral gsPGPKeyPacketElement ( u"" ELEMENT_PGPKEYPACKET );
-const OUStringLiteral gsAlgorithmAttribute ( u"" ATTRIBUTE_ALGORITHM );
-const OUStringLiteral gsCipherDataElement ( u"" ELEMENT_CIPHERDATA );
-const OUStringLiteral gsCipherValueElement ( u"" ELEMENT_CIPHERVALUE );
-
-const OUStringLiteral gsManifestKeyInfoElement13 ( u"" ELEMENT_MANIFEST13_KEYINFO );
-const OUStringLiteral gsEncryptedKeyElement13 ( u"" ELEMENT_ENCRYPTEDKEY13 );
-const OUStringLiteral gsEncryptionMethodElement13 ( u"" ELEMENT_ENCRYPTIONMETHOD13 );
-const OUStringLiteral gsPgpDataElement13 ( u"" ELEMENT_PGPDATA13 );
-const OUStringLiteral gsPgpKeyIDElement13 ( u"" ELEMENT_PGPKEYID13 );
-const OUStringLiteral gsPGPKeyPacketElement13 ( u"" ELEMENT_PGPKEYPACKET13 );
-const OUStringLiteral gsAlgorithmAttribute13 ( u"" ATTRIBUTE_ALGORITHM13 );
-const OUStringLiteral gsCipherDataElement13 ( u"" ELEMENT_CIPHERDATA13 );
-const OUStringLiteral gsCipherValueElement13 ( u"" ELEMENT_CIPHERVALUE13 );
-
-const OUStringLiteral gsFullPathProperty ( u"FullPath" );
-const OUStringLiteral gsMediaTypeProperty ( u"MediaType" );
-const OUStringLiteral gsVersionProperty ( u"Version" );
-const OUStringLiteral gsIterationCountProperty ( u"IterationCount" );
-const OUStringLiteral gsDerivedKeySizeProperty ( u"DerivedKeySize" );
-const OUStringLiteral gsSaltProperty ( u"Salt" );
-const OUStringLiteral gsInitialisationVectorProperty ( u"InitialisationVector" );
-const OUStringLiteral gsSizeProperty ( u"Size" );
-const OUStringLiteral gsDigestProperty ( u"Digest" );
-const OUStringLiteral gsEncryptionAlgProperty ( u"EncryptionAlgorithm" );
-const OUStringLiteral gsStartKeyAlgProperty ( u"StartKeyAlgorithm" );
-const OUStringLiteral gsDigestAlgProperty ( u"DigestAlgorithm" );
-
-const OUStringLiteral gsSHA256_URL_ODF12 ( u"" SHA256_URL_ODF12 );
-const OUStringLiteral gsSHA256_URL ( u"" SHA256_URL );
-const OUStringLiteral gsSHA1_Name ( u"" SHA1_NAME );
-const OUStringLiteral gsSHA1_URL ( u"" SHA1_URL );
-
-const OUStringLiteral gsSHA256_1k_URL ( u"" SHA256_1K_URL );
-const OUStringLiteral gsSHA1_1k_Name ( u"" SHA1_1K_NAME );
-const OUStringLiteral gsSHA1_1k_URL ( u"" SHA1_1K_URL );
-
-const OUStringLiteral gsBlowfish_Name ( u"" BLOWFISH_NAME );
-const OUStringLiteral gsBlowfish_URL ( u"" BLOWFISH_URL );
-const OUStringLiteral gsAES128_URL ( u"" AES128_URL );
-const OUStringLiteral gsAES192_URL ( u"" AES192_URL );
-const OUStringLiteral gsAES256_URL ( u"" AES256_URL );
-
-const OUStringLiteral gsPBKDF2_Name ( u"" PBKDF2_NAME );
-const OUStringLiteral gsPBKDF2_URL ( u"" PBKDF2_URL );
+constexpr OUStringLiteral gsFileEntryElement ( u"" ELEMENT_FILE_ENTRY );
+constexpr OUStringLiteral gsEncryptionDataElement( u"" ELEMENT_ENCRYPTION_DATA );
+constexpr OUStringLiteral gsAlgorithmElement ( u"" ELEMENT_ALGORITHM );
+constexpr OUStringLiteral gsStartKeyAlgElement ( u"" ELEMENT_START_KEY_GENERATION );
+constexpr OUStringLiteral gsKeyDerivationElement( u"" ELEMENT_KEY_DERIVATION );
+
+constexpr OUStringLiteral gsMediaTypeAttribute ( u"" ATTRIBUTE_MEDIA_TYPE );
+constexpr OUStringLiteral gsVersionAttribute ( u"" ATTRIBUTE_VERSION );
+constexpr OUStringLiteral gsFullPathAttribute ( u"" ATTRIBUTE_FULL_PATH );
+constexpr OUStringLiteral gsSizeAttribute ( u"" ATTRIBUTE_SIZE );
+constexpr OUStringLiteral gsSaltAttribute ( u"" ATTRIBUTE_SALT );
+constexpr OUStringLiteral gsInitialisationVectorAttribute ( u"" ATTRIBUTE_INITIALISATION_VECTOR );
+constexpr OUStringLiteral gsIterationCountAttribute ( u"" ATTRIBUTE_ITERATION_COUNT );
+constexpr OUStringLiteral gsKeySizeAttribute ( u"" ATTRIBUTE_KEY_SIZE );
+constexpr OUStringLiteral gsAlgorithmNameAttribute ( u"" ATTRIBUTE_ALGORITHM_NAME );
+constexpr OUStringLiteral gsStartKeyAlgNameAttribute ( u"" ATTRIBUTE_START_KEY_GENERATION_NAME );
+constexpr OUStringLiteral gsKeyDerivationNameAttribute ( u"" ATTRIBUTE_KEY_DERIVATION_NAME );
+constexpr OUStringLiteral gsChecksumAttribute ( u"" ATTRIBUTE_CHECKSUM );
+constexpr OUStringLiteral gsChecksumTypeAttribute ( u"" ATTRIBUTE_CHECKSUM_TYPE );
+
+constexpr OUStringLiteral gsKeyInfoElement ( u"" ELEMENT_ENCRYPTED_KEYINFO );
+constexpr OUStringLiteral gsManifestKeyInfoElement ( u"" ELEMENT_MANIFEST_KEYINFO );
+constexpr OUStringLiteral gsEncryptedKeyElement ( u"" ELEMENT_ENCRYPTEDKEY );
+constexpr OUStringLiteral gsEncryptionMethodElement ( u"" ELEMENT_ENCRYPTIONMETHOD );
+constexpr OUStringLiteral gsPgpDataElement ( u"" ELEMENT_PGPDATA );
+constexpr OUStringLiteral gsPgpKeyIDElement ( u"" ELEMENT_PGPKEYID );
+constexpr OUStringLiteral gsPGPKeyPacketElement ( u"" ELEMENT_PGPKEYPACKET );
+constexpr OUStringLiteral gsAlgorithmAttribute ( u"" ATTRIBUTE_ALGORITHM );
+constexpr OUStringLiteral gsCipherDataElement ( u"" ELEMENT_CIPHERDATA );
+constexpr OUStringLiteral gsCipherValueElement ( u"" ELEMENT_CIPHERVALUE );
+
+constexpr OUStringLiteral gsManifestKeyInfoElement13 ( u"" ELEMENT_MANIFEST13_KEYINFO );
+constexpr OUStringLiteral gsEncryptedKeyElement13 ( u"" ELEMENT_ENCRYPTEDKEY13 );
+constexpr OUStringLiteral gsEncryptionMethodElement13 ( u"" ELEMENT_ENCRYPTIONMETHOD13 );
+constexpr OUStringLiteral gsPgpDataElement13 ( u"" ELEMENT_PGPDATA13 );
+constexpr OUStringLiteral gsPgpKeyIDElement13 ( u"" ELEMENT_PGPKEYID13 );
+constexpr OUStringLiteral gsPGPKeyPacketElement13 ( u"" ELEMENT_PGPKEYPACKET13 );
+constexpr OUStringLiteral gsAlgorithmAttribute13 ( u"" ATTRIBUTE_ALGORITHM13 );
+constexpr OUStringLiteral gsCipherDataElement13 ( u"" ELEMENT_CIPHERDATA13 );
+constexpr OUStringLiteral gsCipherValueElement13 ( u"" ELEMENT_CIPHERVALUE13 );
+
+constexpr OUStringLiteral gsFullPathProperty ( u"FullPath" );
+constexpr OUStringLiteral gsMediaTypeProperty ( u"MediaType" );
+constexpr OUStringLiteral gsVersionProperty ( u"Version" );
+constexpr OUStringLiteral gsIterationCountProperty ( u"IterationCount" );
+constexpr OUStringLiteral gsDerivedKeySizeProperty ( u"DerivedKeySize" );
+constexpr OUStringLiteral gsSaltProperty ( u"Salt" );
+constexpr OUStringLiteral gsInitialisationVectorProperty ( u"InitialisationVector" );
+constexpr OUStringLiteral gsSizeProperty ( u"Size" );
+constexpr OUStringLiteral gsDigestProperty ( u"Digest" );
+constexpr OUStringLiteral gsEncryptionAlgProperty ( u"EncryptionAlgorithm" );
+constexpr OUStringLiteral gsStartKeyAlgProperty ( u"StartKeyAlgorithm" );
+constexpr OUStringLiteral gsDigestAlgProperty ( u"DigestAlgorithm" );
+
+constexpr OUStringLiteral gsSHA256_URL_ODF12 ( u"" SHA256_URL_ODF12 );
+constexpr OUStringLiteral gsSHA256_URL ( u"" SHA256_URL );
+constexpr OUStringLiteral gsSHA1_Name ( u"" SHA1_NAME );
+constexpr OUStringLiteral gsSHA1_URL ( u"" SHA1_URL );
+
+constexpr OUStringLiteral gsSHA256_1k_URL ( u"" SHA256_1K_URL );
+constexpr OUStringLiteral gsSHA1_1k_Name ( u"" SHA1_1K_NAME );
+constexpr OUStringLiteral gsSHA1_1k_URL ( u"" SHA1_1K_URL );
+
+constexpr OUStringLiteral gsBlowfish_Name ( u"" BLOWFISH_NAME );
+constexpr OUStringLiteral gsBlowfish_URL ( u"" BLOWFISH_URL );
+constexpr OUStringLiteral gsAES128_URL ( u"" AES128_URL );
+constexpr OUStringLiteral gsAES192_URL ( u"" AES192_URL );
+constexpr OUStringLiteral gsAES256_URL ( u"" AES256_URL );
+
+constexpr OUStringLiteral gsPBKDF2_Name ( u"" PBKDF2_NAME );
+constexpr OUStringLiteral gsPBKDF2_URL ( u"" PBKDF2_URL );
ManifestImport::ManifestImport( vector < Sequence < PropertyValue > > & rNewManVector )
: bIgnoreEncryptData ( false )
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index a9d71cdb1623..bdb5c25a8bf0 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -1225,7 +1225,7 @@ uno::Reference< io::XInputStream > ZipPackage::writeTempFile()
// Remove the old manifest.xml file as the
// manifest will be re-generated and the
// META-INF directory implicitly created if does not exist
- static const OUStringLiteral sMeta (u"META-INF");
+ static constexpr OUStringLiteral sMeta (u"META-INF");
if ( m_xRootFolder->hasByName( sMeta ) )
{
@@ -1247,7 +1247,7 @@ uno::Reference< io::XInputStream > ZipPackage::writeTempFile()
// Remove the old [Content_Types].xml file as the
// file will be re-generated
- static const OUStringLiteral aContentTypes(u"[Content_Types].xml");
+ static constexpr OUStringLiteral aContentTypes(u"[Content_Types].xml");
if ( m_xRootFolder->hasByName( aContentTypes ) )
m_xRootFolder->removeByName( aContentTypes );
@@ -1256,9 +1256,9 @@ uno::Reference< io::XInputStream > ZipPackage::writeTempFile()
// Create a vector to store data for the manifest.xml file
vector < uno::Sequence < PropertyValue > > aManList;
- static const OUStringLiteral sMediaType(u"MediaType");
- static const OUStringLiteral sVersion(u"Version");
- static const OUStringLiteral sFullPath(u"FullPath");
+ static constexpr OUStringLiteral sMediaType(u"MediaType");
+ static constexpr OUStringLiteral sVersion(u"Version");
+ static constexpr OUStringLiteral sFullPath(u"FullPath");
const bool bIsGpgEncrypt = m_aGpgProps.hasElements();
if ( m_nFormat == embed::StorageFormats::PACKAGE )
diff --git a/reportdesign/source/filter/xml/xmlStyleImport.cxx b/reportdesign/source/filter/xml/xmlStyleImport.cxx
index 3e473740cf8b..a6cb71fa3d7a 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.cxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.cxx
@@ -141,10 +141,10 @@ void OControlStyleContext::SetAttribute( sal_uInt16 nPrefixKey,
}
-const OUStringLiteral g_sTableStyleFamilyName( u"" XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME );
-const OUStringLiteral g_sColumnStyleFamilyName( u"" XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME );
-const OUStringLiteral g_sRowStyleFamilyName( u"" XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME );
-const OUStringLiteral g_sCellStyleFamilyName( u"" XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME );
+constexpr OUStringLiteral g_sTableStyleFamilyName( u"" XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME );
+constexpr OUStringLiteral g_sColumnStyleFamilyName( u"" XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME );
+constexpr OUStringLiteral g_sRowStyleFamilyName( u"" XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME );
+constexpr OUStringLiteral g_sCellStyleFamilyName( u"" XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME );
OReportStylesContext::OReportStylesContext( ORptFilter& rImport,
const bool bTempAutoStyles ) :
diff --git a/sal/osl/w32/path_helper.cxx b/sal/osl/w32/path_helper.cxx
index 52808b3a9774..a2dd134fded9 100644
--- a/sal/osl/w32/path_helper.cxx
+++ b/sal/osl/w32/path_helper.cxx
@@ -25,8 +25,8 @@
#include <algorithm>
#include <wchar.h>
-const OUStringLiteral BACKSLASH (u"\\");
-const OUStringLiteral SLASH (u"/");
+constexpr OUStringLiteral BACKSLASH (u"\\");
+constexpr OUStringLiteral SLASH (u"/");
void osl_systemPathEnsureSeparator(/*inout*/ rtl_uString** ppustrPath)
{
diff --git a/sal/qa/osl/pipe/osl_Pipe.cxx b/sal/qa/osl/pipe/osl_Pipe.cxx
index c34bb0448977..f9e2bb16174e 100644
--- a/sal/qa/osl/pipe/osl_Pipe.cxx
+++ b/sal/qa/osl/pipe/osl_Pipe.cxx
@@ -87,11 +87,11 @@ static void printPipeError( ::osl::Pipe const & aPipe )
// pipe name and transfer contents
-const OUStringLiteral aTestPipeName(u"testpipe2");
-const OUStringLiteral aTestPipe1(u"testpipe1");
+constexpr OUStringLiteral aTestPipeName(u"testpipe2");
+constexpr OUStringLiteral aTestPipe1(u"testpipe1");
-const OStringLiteral m_pTestString1("Sun Microsystems");
-const OStringLiteral m_pTestString2("test pipe PASS/OK");
+constexpr OStringLiteral m_pTestString1("Sun Microsystems");
+constexpr OStringLiteral m_pTestString2("test pipe PASS/OK");
// test code start here
diff --git a/sal/qa/rtl/digest/rtl_digest.cxx b/sal/qa/rtl/digest/rtl_digest.cxx
index d948deaf6d6c..d890f924ddb1 100644
--- a/sal/qa/rtl/digest/rtl_digest.cxx
+++ b/sal/qa/rtl/digest/rtl_digest.cxx
@@ -39,8 +39,8 @@ using namespace rtl;
namespace
{
-const OStringLiteral sSampleString ("This is a sample sentence, which we use to check some crypto functions in sal.");
-const OStringLiteral sSampleString_only_one_diff ("This is a sample sentence. which we use to check some crypto functions in sal.");
+constexpr OStringLiteral sSampleString ("This is a sample sentence, which we use to check some crypto functions in sal.");
+constexpr OStringLiteral sSampleString_only_one_diff ("This is a sample sentence. which we use to check some crypto functions in sal.");
const rtlDigestAlgorithm constDigestAlgorithms[] =
{
diff --git a/sal/qa/rtl/textenc/rtl_textcvt.cxx b/sal/qa/rtl/textenc/rtl_textcvt.cxx
index 6dec034a96ff..1952e4b7a904 100644
--- a/sal/qa/rtl/textenc/rtl_textcvt.cxx
+++ b/sal/qa/rtl/textenc/rtl_textcvt.cxx
@@ -2961,7 +2961,7 @@ void Test::testInvalidUtf8() {
auto const converter = rtl_createTextToUnicodeConverter(
RTL_TEXTENCODING_JAVA_UTF8);
CPPUNIT_ASSERT(converter != nullptr);
- OStringLiteral const input(u8"\U00010000");
+ constexpr OStringLiteral input(u8"\U00010000");
sal_Unicode buf[TEST_STRING_SIZE];
sal_uInt32 info;
sal_Size converted;
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 95909a0fbbbb..423582cea2a0 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -723,7 +723,7 @@ struct Convention_A1 : public ScCompiler::Convention
KParseTokens::ASC_UNDERSCORE | KParseTokens::ASC_DOLLAR;
constexpr sal_Int32 nContFlags = nStartFlags | KParseTokens::ASC_DOT;
// '?' allowed in range names because of Xcl :-/
- static const OUStringLiteral aAddAllowed(u"?#");
+ static constexpr OUStringLiteral aAddAllowed(u"?#");
return pCharClass->parseAnyToken( rFormula,
nSrcPos, nStartFlags, aAddAllowed,
(bGroupSeparator ? nContFlags | KParseTokens::GROUP_SEPARATOR_IN_NUMBER : nContFlags),
@@ -1354,7 +1354,7 @@ struct ConventionXL_A1 : public Convention_A1, public ConventionXL
KParseTokens::ASC_UNDERSCORE | KParseTokens::ASC_DOLLAR;
constexpr sal_Int32 nContFlags = nStartFlags | KParseTokens::ASC_DOT;
// '?' allowed in range names
- static const OUStringLiteral aAddAllowed(u"?!");
+ static constexpr OUStringLiteral aAddAllowed(u"?!");
return pCharClass->parseAnyToken( rFormula,
nSrcPos, nStartFlags, aAddAllowed,
(bGroupSeparator ? nContFlags | KParseTokens::GROUP_SEPARATOR_IN_NUMBER : nContFlags),
@@ -1698,7 +1698,7 @@ struct ConventionXL_R1C1 : public ScCompiler::Convention, public ConventionXL
KParseTokens::ASC_UNDERSCORE ;
constexpr sal_Int32 nContFlags = nStartFlags | KParseTokens::ASC_DOT;
// '?' allowed in range names
- static const OUStringLiteral aAddAllowed(u"?-[]!");
+ static constexpr OUStringLiteral aAddAllowed(u"?-[]!");
return pCharClass->parseAnyToken( rFormula,
nSrcPos, nStartFlags, aAddAllowed,
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index 3944e89c03d0..e589b25c33f0 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -468,7 +468,7 @@ SdrObjectUniquePtr XclImpDrawObjBase::CreateSdrObject( XclImpDffConverter& rDffC
{
const Reference< XControlModel >& xCtrlModel = pSdrUnoObj->GetUnoControlModel();
Reference< XPropertySet > xPropSet(xCtrlModel,UNO_QUERY);
- const static OUStringLiteral sPropertyName(u"ControlTypeinMSO");
+ static constexpr OUStringLiteral sPropertyName(u"ControlTypeinMSO");
enum { eCreateFromOffice = 0, eCreateFromMSTBXControl, eCreateFromMSOCXControl };
@@ -488,7 +488,7 @@ SdrObjectUniquePtr XclImpDrawObjBase::CreateSdrObject( XclImpDffConverter& rDffC
if( mnObjType == 8 )//OCX
{
//Need summary type for export
- const static OUStringLiteral sObjIdPropertyName(u"ObjIDinMSO");
+ static constexpr OUStringLiteral sObjIdPropertyName(u"ObjIDinMSO");
const XclImpPictureObj* const pObj = dynamic_cast< const XclImpPictureObj* const >(this);
if( pObj != nullptr && pObj->IsOcxControl() )
{
@@ -3299,7 +3299,7 @@ XclImpDffConverter::XclImpDffConvData::XclImpDffConvData(
{
}
-const OUStringLiteral gaStdFormName( u"Standard" ); /// Standard name of control forms.
+constexpr OUStringLiteral gaStdFormName( u"Standard" ); /// Standard name of control forms.
XclImpDffConverter::XclImpDffConverter( const XclImpRoot& rRoot, SvStream& rDffStrm ) :
XclImpSimpleDffConverter( rRoot, rDffStrm ),
diff --git a/sc/source/filter/oox/defnamesbuffer.cxx b/sc/source/filter/oox/defnamesbuffer.cxx
index aa8a9b30139e..733d4790f8ff 100644
--- a/sc/source/filter/oox/defnamesbuffer.cxx
+++ b/sc/source/filter/oox/defnamesbuffer.cxx
@@ -53,7 +53,7 @@ const sal_uInt32 BIFF12_DEFNAME_VBNAME = 0x00000004;
const sal_uInt32 BIFF12_DEFNAME_MACRO = 0x00000008;
const sal_uInt32 BIFF12_DEFNAME_BUILTIN = 0x00000020;
-const OUStringLiteral spcOoxPrefix(u"_xlnm.");
+constexpr OUStringLiteral spcOoxPrefix(u"_xlnm.");
const char* const sppcBaseNames[] =
{
diff --git a/sc/source/filter/oox/pagesettings.cxx b/sc/source/filter/oox/pagesettings.cxx
index 2d7f49988cc2..b19caea83634 100644
--- a/sc/source/filter/oox/pagesettings.cxx
+++ b/sc/source/filter/oox/pagesettings.cxx
@@ -470,11 +470,11 @@ const char* const sppcItalicNames[] =
} // namespace
-const OUStringLiteral gaPageNumberService( u"com.sun.star.text.TextField.PageNumber" );
-const OUStringLiteral gaPageCountService( u"com.sun.star.text.TextField.PageCount" );
-const OUStringLiteral gaSheetNameService( u"com.sun.star.text.TextField.SheetName" );
-const OUStringLiteral gaFileNameService( u"com.sun.star.text.TextField.FileName" );
-const OUStringLiteral gaDateTimeService( u"com.sun.star.text.TextField.DateTime" );
+constexpr OUStringLiteral gaPageNumberService( u"com.sun.star.text.TextField.PageNumber" );
+constexpr OUStringLiteral gaPageCountService( u"com.sun.star.text.TextField.PageCount" );
+constexpr OUStringLiteral gaSheetNameService( u"com.sun.star.text.TextField.SheetName" );
+constexpr OUStringLiteral gaFileNameService( u"com.sun.star.text.TextField.FileName" );
+constexpr OUStringLiteral gaDateTimeService( u"com.sun.star.text.TextField.DateTime" );
HeaderFooterParser::HeaderFooterParser( const WorkbookHelper& rHelper ) :
WorkbookHelper( rHelper ),
diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx
index c41e6e7709e8..110ce64ba79c 100644
--- a/sc/source/filter/oox/worksheethelper.cxx
+++ b/sc/source/filter/oox/worksheethelper.cxx
@@ -389,7 +389,7 @@ private:
bool mbHasDefWidth; /// True = default column width is set from defaultColWidth attribute.
};
-const OUStringLiteral gaSheetCellRanges( u"com.sun.star.sheet.SheetCellRanges" ); /// Service name for a SheetCellRanges object.
+constexpr OUStringLiteral gaSheetCellRanges( u"com.sun.star.sheet.SheetCellRanges" ); /// Service name for a SheetCellRanges object.
WorksheetGlobals::WorksheetGlobals( const WorkbookHelper& rHelper, const ISegmentProgressBarRef& rxProgressBar, WorksheetType eSheetType, SCTAB nSheet ) :
WorkbookHelper( rHelper ),
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx
index cc9133da19b4..cb00b0074538 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx
@@ -75,16 +75,16 @@ bool ScMyValidation::IsEqual(const ScMyValidation& aVal) const
aVal.sFormula2 == sFormula2;
}
-const OUStringLiteral gsERRALSTY(u"" SC_UNONAME_ERRALSTY);
-const OUStringLiteral gsIGNOREBL(u"" SC_UNONAME_IGNOREBL);
-const OUStringLiteral gsSHOWLIST(u"" SC_UNONAME_SHOWLIST);
-const OUStringLiteral gsTYPE(u"" SC_UNONAME_TYPE);
-const OUStringLiteral gsSHOWINP(u"" SC_UNONAME_SHOWINP);
-const OUStringLiteral gsSHOWERR(u"" SC_UNONAME_SHOWERR);
-const OUStringLiteral gsINPTITLE(u"" SC_UNONAME_INPTITLE);
-const OUStringLiteral gsINPMESS(u"" SC_UNONAME_INPMESS);
-const OUStringLiteral gsERRTITLE(u"" SC_UNONAME_ERRTITLE);
-const OUStringLiteral gsERRMESS(u"" SC_UNONAME_ERRMESS);
+constexpr OUStringLiteral gsERRALSTY(u"" SC_UNONAME_ERRALSTY);
+constexpr OUStringLiteral gsIGNOREBL(u"" SC_UNONAME_IGNOREBL);
+constexpr OUStringLiteral gsSHOWLIST(u"" SC_UNONAME_SHOWLIST);
+constexpr OUStringLiteral gsTYPE(u"" SC_UNONAME_TYPE);
+constexpr OUStringLiteral gsSHOWINP(u"" SC_UNONAME_SHOWINP);
+constexpr OUStringLiteral gsSHOWERR(u"" SC_UNONAME_SHOWERR);
+constexpr OUStringLiteral gsINPTITLE(u"" SC_UNONAME_INPTITLE);
+constexpr OUStringLiteral gsINPMESS(u"" SC_UNONAME_INPMESS);
+constexpr OUStringLiteral gsERRTITLE(u"" SC_UNONAME_ERRTITLE);
+constexpr OUStringLiteral gsERRMESS(u"" SC_UNONAME_ERRMESS);
ScMyValidationsContainer::ScMyValidationsContainer()
: aValidationVec()
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index ce93ca8ee6fd..aa886af6b412 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -336,7 +336,7 @@ sal_Int16 ScXMLExport::GetMeasureUnit()
return SvXMLUnitConverter::GetMeasureUnit(eFieldUnit);
}
-const OUStringLiteral gsLayerID( u"" SC_LAYERID );
+constexpr OUStringLiteral gsLayerID( u"" SC_LAYERID );
ScXMLExport::ScXMLExport(
const css::uno::Reference< css::uno::XComponentContext >& rContext,
diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx
index bd928fb9a9e8..8712531e526c 100644
--- a/sc/source/filter/xml/xmlstyli.cxx
+++ b/sc/source/filter/xml/xmlstyli.cxx
@@ -657,10 +657,10 @@ SvXMLStyleContext *XMLTableStylesContext::CreateDefaultStyleStyleChildContext(
return pStyle;
}
-const OUStringLiteral gsCellStyleServiceName(u"com.sun.star.style.CellStyle");
-const OUStringLiteral gsColumnStyleServiceName(u"" XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME);
-const OUStringLiteral gsRowStyleServiceName(u"" XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME);
-const OUStringLiteral gsTableStyleServiceName(u"" XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME);
+constexpr OUStringLiteral gsCellStyleServiceName(u"com.sun.star.style.CellStyle");
+constexpr OUStringLiteral gsColumnStyleServiceName(u"" XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME);
+constexpr OUStringLiteral gsRowStyleServiceName(u"" XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME);
+constexpr OUStringLiteral gsTableStyleServiceName(u"" XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME);
XMLTableStylesContext::XMLTableStylesContext( SvXMLImport& rImport,
const bool bTempAutoStyles )
diff --git a/sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx b/sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx
index cfd42a02d28c..77926a28e03d 100644
--- a/sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/FourierAnalysisDialog.cxx
@@ -219,7 +219,7 @@ void ScFourierAnalysisDialog::getDataLabel(OUString& rLabel)
void ScFourierAnalysisDialog::genFormula(OUString& rFormula)
{
- static const OUStringLiteral aSep(u";");
+ static constexpr OUStringLiteral aSep(u";");
if (!mbPolar)
{
diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx
index 5e5f08bf87a7..bfc154bffc08 100644
--- a/sc/source/ui/dbgui/scuiasciiopt.cxx
+++ b/sc/source/ui/dbgui/scuiasciiopt.cxx
@@ -80,9 +80,9 @@ const ::std::vector<OUString> CSVImportOptionNames =
"Language",
"SkipEmptyCells"
};
-const OUStringLiteral aSep_Path = u"Office.Calc/Dialogs/CSVImport";
-const OUStringLiteral aSep_Path_Clpbrd = u"Office.Calc/Dialogs/ClipboardTextImport";
-const OUStringLiteral aSep_Path_Text2Col = u"Office.Calc/Dialogs/TextToColumnsImport";
+constexpr OUStringLiteral aSep_Path = u"Office.Calc/Dialogs/CSVImport";
+constexpr OUStringLiteral aSep_Path_Clpbrd = u"Office.Calc/Dialogs/ClipboardTextImport";
+constexpr OUStringLiteral aSep_Path_Text2Col = u"Office.Calc/Dialogs/TextToColumnsImport";
namespace {
CSVImportOptionsIndex getSkipEmptyCellsIndex( ScImportAsciiCall eCall )
diff --git a/sc/source/ui/unoobj/PivotTableDataProvider.cxx b/sc/source/ui/unoobj/PivotTableDataProvider.cxx
index 4cf99e3d826a..21ecd47686ce 100644
--- a/sc/source/ui/unoobj/PivotTableDataProvider.cxx
+++ b/sc/source/ui/unoobj/PivotTableDataProvider.cxx
@@ -55,9 +55,9 @@ namespace sc
{
namespace
{
-const OUStringLiteral constIdCategories(u"categories");
-const OUStringLiteral constIdLabel(u"label");
-const OUStringLiteral constIdData(u"data");
+constexpr OUStringLiteral constIdCategories(u"categories");
+constexpr OUStringLiteral constIdLabel(u"label");
+constexpr OUStringLiteral constIdData(u"data");
const SfxItemPropertyMapEntry* lcl_GetDataProviderPropertyMap()
{
diff --git a/sc/source/ui/vba/vbaaxis.cxx b/sc/source/ui/vba/vbaaxis.cxx
index 3ab2aafb937f..fa272d291d08 100644
--- a/sc/source/ui/vba/vbaaxis.cxx
+++ b/sc/source/ui/vba/vbaaxis.cxx
@@ -29,10 +29,10 @@ using namespace ::ooo::vba::excel::XlAxisCrosses;
using namespace ::ooo::vba::excel::XlAxisType;
using namespace ::ooo::vba::excel::XlScaleType;
-const OUStringLiteral ORIGIN(u"Origin");
-const OUStringLiteral AUTOORIGIN(u"AutoOrigin");
-const OUStringLiteral VBA_MIN(u"Max");
-const OUStringLiteral VBA_MAX(u"Min");
+constexpr OUStringLiteral ORIGIN(u"Origin");
+constexpr OUStringLiteral AUTOORIGIN(u"AutoOrigin");
+constexpr OUStringLiteral VBA_MIN(u"Max");
+constexpr OUStringLiteral VBA_MAX(u"Min");
ScVbaChart*
ScVbaAxis::getChartPtr()
{
diff --git a/sc/source/ui/vba/vbachart.cxx b/sc/source/ui/vba/vbachart.cxx
index 29aedba2e8fb..dcd73199f2bb 100644
--- a/sc/source/ui/vba/vbachart.cxx
+++ b/sc/source/ui/vba/vbachart.cxx
@@ -48,23 +48,23 @@ using namespace ::ooo::vba::excel::XlRowCol;
using namespace ::ooo::vba::excel::XlAxisType;
using namespace ::ooo::vba::excel::XlAxisGroup;
-const OUStringLiteral CHART_NAME(u"Name");
+constexpr OUStringLiteral CHART_NAME(u"Name");
// #TODO move this constant to vbaseries.[ch]xx ( when it exists )
-const OUStringLiteral DEFAULTSERIESPREFIX(u"Series");
-const OUStringLiteral DATAROWSOURCE(u"DataRowSource");
-const OUStringLiteral UPDOWN(u"UpDown");
-const OUStringLiteral VOLUME(u"Volume");
-const OUStringLiteral LINES(u"Lines");
-const OUStringLiteral SPLINETYPE(u"SplineType");
-const OUStringLiteral SYMBOLTYPE(u"SymbolType");
-const OUStringLiteral DEEP(u"Deep");
-const OUStringLiteral SOLIDTYPE(u"SolidType");
-const OUStringLiteral VERTICAL(u"Vertical");
-const OUStringLiteral PERCENT(u"Percent");
-const OUStringLiteral STACKED(u"Stacked");
-const OUStringLiteral DIM3D(u"Dim3D");
-const OUStringLiteral HASMAINTITLE(u"HasMainTitle");
-const OUStringLiteral HASLEGEND(u"HasLegend");
+constexpr OUStringLiteral DEFAULTSERIESPREFIX(u"Series");
+constexpr OUStringLiteral DATAROWSOURCE(u"DataRowSource");
+constexpr OUStringLiteral UPDOWN(u"UpDown");
+constexpr OUStringLiteral VOLUME(u"Volume");
+constexpr OUStringLiteral LINES(u"Lines");
+constexpr OUStringLiteral SPLINETYPE(u"SplineType");
+constexpr OUStringLiteral SYMBOLTYPE(u"SymbolType");
+constexpr OUStringLiteral DEEP(u"Deep");
+constexpr OUStringLiteral SOLIDTYPE(u"SolidType");
+constexpr OUStringLiteral VERTICAL(u"Vertical");
+constexpr OUStringLiteral PERCENT(u"Percent");
+constexpr OUStringLiteral STACKED(u"Stacked");
+constexpr OUStringLiteral DIM3D(u"Dim3D");
+constexpr OUStringLiteral HASMAINTITLE(u"HasMainTitle");
+constexpr OUStringLiteral HASLEGEND(u"HasLegend");
ScVbaChart::ScVbaChart( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::lang::XComponent >& _xChartComponent, const css::uno::Reference< css::table::XTableChart >& _xTableChart ) : ChartImpl_BASE( _xParent, _xContext ), mxTableChart( _xTableChart )
{
diff --git a/sc/source/ui/vba/vbachartobject.cxx b/sc/source/ui/vba/vbachartobject.cxx
index d87b4c622121..2afcea0ffe2f 100644
--- a/sc/source/ui/vba/vbachartobject.cxx
+++ b/sc/source/ui/vba/vbachartobject.cxx
@@ -29,7 +29,7 @@
using namespace ::com::sun::star;
using namespace ::ooo::vba;
-const OUStringLiteral PERSIST_NAME(u"PersistName");
+constexpr OUStringLiteral PERSIST_NAME(u"PersistName");
ScVbaChartObject::ScVbaChartObject( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::table::XTableChart >& _xTableChart, const css::uno::Reference< css::drawing::XDrawPageSupplier >& _xDrawPageSupplier ) : ChartObjectImpl_BASE( _xParent, _xContext ), xTableChart( _xTableChart ), xDrawPageSupplier( _xDrawPageSupplier )
{
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index e783194e60ca..6567f5f3ab97 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -2575,7 +2575,7 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet )
bThousand = nIntegerDigits > 0 && ((nIntegerDigits % 3) == 0);
}
OUString aFormat;
- static const OUStringLiteral sBreak = u",";
+ static constexpr OUStringLiteral sBreak = u",";
const OUString sThousand = OUString::number(static_cast<sal_Int32>(bThousand));
const OUString sNegRed = OUString::number(static_cast<sal_Int32>(bNegRed));
const OUString sPrecision = OUString::number(nPrecision);
diff --git a/sd/source/filter/xml/sdtransform.cxx b/sd/source/filter/xml/sdtransform.cxx
index 18b60542993a..2cb951f2d990 100644
--- a/sd/source/filter/xml/sdtransform.cxx
+++ b/sd/source/filter/xml/sdtransform.cxx
@@ -81,9 +81,9 @@ void TransformOOo2xDocument( SdDrawDocument* pDocument )
}
}
-const OUStringLiteral gsEnableNumbering( u"enable-numbering" );
-const OUStringLiteral gsTextNamespace( u"urn:oasis:names:tc:opendocument:xmlns:text:1.0" );
-const OUStringLiteral gsTrue( u"true" );
+constexpr OUStringLiteral gsEnableNumbering( u"enable-numbering" );
+constexpr OUStringLiteral gsTextNamespace( u"urn:oasis:names:tc:opendocument:xmlns:text:1.0" );
+constexpr OUStringLiteral gsTrue( u"true" );
SdTransformOOo2xDocument::SdTransformOOo2xDocument( SdDrawDocument& rDocument )
: mrDocument( rDocument )
diff --git a/sd/source/ui/dlg/sdabstdlg.cxx b/sd/source/ui/dlg/sdabstdlg.cxx
index 64c1e6051507..e79289b503da 100644
--- a/sd/source/ui/dlg/sdabstdlg.cxx
+++ b/sd/source/ui/dlg/sdabstdlg.cxx
@@ -39,7 +39,7 @@ SdAbstractDialogFactory* SdAbstractDialogFactory::Create()
SdFuncPtrCreateDialogFactory fp = nullptr;
#ifndef DISABLE_DYNLOADING
static ::osl::Module aDialogLibrary;
- static const OUStringLiteral sLibName(u"" SDUI_DLL_NAME);
+ static constexpr OUStringLiteral sLibName(u"" SDUI_DLL_NAME);
if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, sLibName ) )
fp = reinterpret_cast<SdAbstractDialogFactory* (SAL_CALL*)()>(
aDialogLibrary.getFunctionSymbol( "SdCreateDialogFactory" ));
diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx
index 69c87586a9c4..f4f2430e6cfc 100644
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -64,7 +64,7 @@ using namespace com::sun::star::lang;
#define DOCUMENT_TOKEN '#'
// XML content stream
-const OUStringLiteral pStarDrawXMLContent( u"content.xml" );
+constexpr OUStringLiteral pStarDrawXMLContent( u"content.xml" );
/**
* Constructor of the Tab dialog: appends the pages to the dialog
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index 6b7a9c953596..dd1230163241 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -81,9 +81,9 @@ using namespace ::com::sun::star::uno;
using ::sd::framework::FrameworkHelper;
// PowerPoint-Filter
-const OUStringLiteral pFilterPowerPoint97( u"MS PowerPoint 97" );
-const OUStringLiteral pFilterPowerPoint97Template( u"MS PowerPoint 97 Vorlage" );
-const OUStringLiteral pFilterPowerPoint97AutoPlay( u"MS PowerPoint 97 AutoPlay" );
+constexpr OUStringLiteral pFilterPowerPoint97( u"MS PowerPoint 97" );
+constexpr OUStringLiteral pFilterPowerPoint97Template( u"MS PowerPoint 97 Vorlage" );
+constexpr OUStringLiteral pFilterPowerPoint97AutoPlay( u"MS PowerPoint 97 AutoPlay" );
namespace sd {
diff --git a/sd/source/ui/presenter/PresenterTextView.cxx b/sd/source/ui/presenter/PresenterTextView.cxx
index 55e110901e1f..46daeb6f061d 100644
--- a/sd/source/ui/presenter/PresenterTextView.cxx
+++ b/sd/source/ui/presenter/PresenterTextView.cxx
@@ -43,15 +43,15 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
-const OUStringLiteral gsTextPropertyName(u"Text");
-const OUStringLiteral gsBitmapPropertyName(u"Bitmap");
-const OUStringLiteral gsSizePropertyName(u"Size");
-const OUStringLiteral gsBackgroundColorPropertyName(u"BackgroundColor");
-const OUStringLiteral gsTextColorPropertyName(u"TextColor");
-const OUStringLiteral gsFontDescriptorPropertyName(u"FontDescriptor");
-const OUStringLiteral gsTopPropertyName(u"Top");
-const OUStringLiteral gsTopRelativePropertyName(u"RelativeTop");
-const OUStringLiteral gsTotalHeightPropertyName(u"TotalHeight");
+constexpr OUStringLiteral gsTextPropertyName(u"Text");
+constexpr OUStringLiteral gsBitmapPropertyName(u"Bitmap");
+constexpr OUStringLiteral gsSizePropertyName(u"Size");
+constexpr OUStringLiteral gsBackgroundColorPropertyName(u"BackgroundColor");
+constexpr OUStringLiteral gsTextColorPropertyName(u"TextColor");
+constexpr OUStringLiteral gsFontDescriptorPropertyName(u"FontDescriptor");
+constexpr OUStringLiteral gsTopPropertyName(u"Top");
+constexpr OUStringLiteral gsTopRelativePropertyName(u"RelativeTop");
+constexpr OUStringLiteral gsTotalHeightPropertyName(u"TotalHeight");
namespace sd::presenter {
diff --git a/sd/source/ui/remotecontrol/ImagePreparer.cxx b/sd/source/ui/remotecontrol/ImagePreparer.cxx
index 838f2acf86fc..c65a5d4c48df 100644
--- a/sd/source/ui/remotecontrol/ImagePreparer.cxx
+++ b/sd/source/ui/remotecontrol/ImagePreparer.cxx
@@ -208,9 +208,9 @@ OString ImagePreparer::prepareNotes( sal_uInt32 aSlideNumber )
else
return "";
- static const OUStringLiteral sNotesShapeName (
+ static constexpr OUStringLiteral sNotesShapeName (
u"com.sun.star.presentation.NotesShape" );
- static const OUStringLiteral sTextShapeName (
+ static constexpr OUStringLiteral sTextShapeName (
u"com.sun.star.drawing.TextShape" );
if (aNotesPage.is())
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index 9e29e3e47b89..4b27bd429af0 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -1058,21 +1058,21 @@ uno::Reference< container::XNameReplace > SAL_CALL SdXShape::getEvents( )
return new SdUnoEventsAccess( this );
}
-const OUStringLiteral gaStrOnClick( u"OnClick" );
-const OUStringLiteral gaStrServiceName( u"com.sun.star.documents.Events" );
-const OUStringLiteral gaStrEventType( u"EventType" );
-const OUStringLiteral gaStrPresentation( u"Presentation" );
-const OUStringLiteral gaStrLibrary(u"Library");
-const OUStringLiteral gaStrMacroName(u"MacroName");
-const OUStringLiteral gaStrClickAction( u"ClickAction" );
-const OUStringLiteral gaStrBookmark( u"Bookmark" );
-const OUStringLiteral gaStrEffect( u"Effect" );
-const OUStringLiteral gaStrPlayFull( u"PlayFull" );
-const OUStringLiteral gaStrVerb( u"Verb" );
-const OUStringLiteral gaStrSoundURL( u"SoundURL" );
-const OUStringLiteral gaStrSpeed( u"Speed" );
-const OUStringLiteral gaStrStarBasic( u"StarBasic" );
-const OUStringLiteral gaStrScript( u"Script" );
+constexpr OUStringLiteral gaStrOnClick( u"OnClick" );
+constexpr OUStringLiteral gaStrServiceName( u"com.sun.star.documents.Events" );
+constexpr OUStringLiteral gaStrEventType( u"EventType" );
+constexpr OUStringLiteral gaStrPresentation( u"Presentation" );
+constexpr OUStringLiteral gaStrLibrary(u"Library");
+constexpr OUStringLiteral gaStrMacroName(u"MacroName");
+constexpr OUStringLiteral gaStrClickAction( u"ClickAction" );
+constexpr OUStringLiteral gaStrBookmark( u"Bookmark" );
+constexpr OUStringLiteral gaStrEffect( u"Effect" );
+constexpr OUStringLiteral gaStrPlayFull( u"PlayFull" );
+constexpr OUStringLiteral gaStrVerb( u"Verb" );
+constexpr OUStringLiteral gaStrSoundURL( u"SoundURL" );
+constexpr OUStringLiteral gaStrSpeed( u"Speed" );
+constexpr OUStringLiteral gaStrStarBasic( u"StarBasic" );
+constexpr OUStringLiteral gaStrScript( u"Script" );
SdUnoEventsAccess::SdUnoEventsAccess( SdXShape* pShape ) throw()
: mpShape( pShape )
diff --git a/sdext/source/presenter/PresenterHelper.cxx b/sdext/source/presenter/PresenterHelper.cxx
index f66b4eb00a86..76bec0ecee7d 100644
--- a/sdext/source/presenter/PresenterHelper.cxx
+++ b/sdext/source/presenter/PresenterHelper.cxx
@@ -28,7 +28,7 @@ using namespace ::com::sun::star::presentation;
namespace sdext::presenter {
-const OUStringLiteral msPaneURLPrefix( u"private:resource/pane/");
+constexpr OUStringLiteral msPaneURLPrefix( u"private:resource/pane/");
const OUString PresenterHelper::msFullScreenPaneURL( msPaneURLPrefix + "FullScreenPane");
Reference<presentation::XSlideShowController> PresenterHelper::GetSlideShowController (
diff --git a/sdext/source/presenter/PresenterNotesView.cxx b/sdext/source/presenter/PresenterNotesView.cxx
index 9dfad6d405bc..86258464471d 100644
--- a/sdext/source/presenter/PresenterNotesView.cxx
+++ b/sdext/source/presenter/PresenterNotesView.cxx
@@ -217,9 +217,9 @@ void PresenterNotesView::CreateToolBar (
void PresenterNotesView::SetSlide (const Reference<drawing::XDrawPage>& rxNotesPage)
{
- static const OUStringLiteral sNotesShapeName (
+ static constexpr OUStringLiteral sNotesShapeName (
u"com.sun.star.presentation.NotesShape");
- static const OUStringLiteral sTextShapeName (
+ static constexpr OUStringLiteral sTextShapeName (
u"com.sun.star.drawing.TextShape");
if (!rxNotesPage.is())
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 6e74694d2e49..da46da4274d5 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -702,7 +702,7 @@ bool SfxHelp::Start(const OUString& rURL, weld::Widget* pWidget)
/// Redirect the vnd.sun.star.help:// urls to http://help.libreoffice.org
static bool impl_showOnlineHelp( const OUString& rURL )
{
- static const OUStringLiteral aInternal(u"vnd.sun.star.help://");
+ static constexpr OUStringLiteral aInternal(u"vnd.sun.star.help://");
if ( rURL.getLength() <= aInternal.getLength() || !rURL.startsWith(aInternal) )
return false;
diff --git a/sfx2/source/doc/doctemplateslocal.cxx b/sfx2/source/doc/doctemplateslocal.cxx
index bb9b71df760a..d7c24934f89a 100644
--- a/sfx2/source/doc/doctemplateslocal.cxx
+++ b/sfx2/source/doc/doctemplateslocal.cxx
@@ -34,10 +34,10 @@ namespace
{
// Relations info related strings
-const OUStringLiteral g_sGroupListElement(u"groupuinames:template-group-list");
-const OUStringLiteral g_sGroupElement(u"groupuinames:template-group");
-const OUStringLiteral g_sNameAttr(u"groupuinames:name");
-const OUStringLiteral g_sUINameAttr(u"groupuinames:default-ui-name");
+constexpr OUStringLiteral g_sGroupListElement(u"groupuinames:template-group-list");
+constexpr OUStringLiteral g_sGroupElement(u"groupuinames:template-group");
+constexpr OUStringLiteral g_sNameAttr(u"groupuinames:name");
+constexpr OUStringLiteral g_sUINameAttr(u"groupuinames:default-ui-name");
}
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 83088354fad6..76e838709b20 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -1106,7 +1106,7 @@ private:
static OUString lcl_strip_template(const OUString &aString)
{
- static const OUStringLiteral sPostfix(u"_template");
+ static constexpr OUStringLiteral sPostfix(u"_template");
OUString sRes(aString);
if (sRes.endsWith(sPostfix))
sRes = sRes.copy(0, sRes.getLength() - sPostfix.getLength());
diff --git a/svx/qa/unit/classicshapes.cxx b/svx/qa/unit/classicshapes.cxx
index b67222b218ed..7f02865c03d5 100644
--- a/svx/qa/unit/classicshapes.cxx
+++ b/svx/qa/unit/classicshapes.cxx
@@ -24,7 +24,7 @@ using namespace ::com::sun::star;
namespace
{
-const OUStringLiteral sDataDirectory(u"svx/qa/unit/data/");
+constexpr OUStringLiteral sDataDirectory(u"svx/qa/unit/data/");
/// Tests not about special features of custom shapes, but about shapes in general.
class ClassicshapesTest : public test::BootstrapFixture, public unotest::MacrosTest
diff --git a/svx/qa/unit/customshapes.cxx b/svx/qa/unit/customshapes.cxx
index 2bd56385844a..e500c9bd2649 100644
--- a/svx/qa/unit/customshapes.cxx
+++ b/svx/qa/unit/customshapes.cxx
@@ -29,7 +29,7 @@ using namespace ::com::sun::star;
namespace
{
-const OUStringLiteral sDataDirectory(u"svx/qa/unit/data/");
+constexpr OUStringLiteral sDataDirectory(u"svx/qa/unit/data/");
/// Tests for svx/source/customshapes/ code.
class CustomshapesTest : public test::BootstrapFixture, public unotest::MacrosTest
diff --git a/svx/source/dialog/ClassificationDialog.cxx b/svx/source/dialog/ClassificationDialog.cxx
index e09cbe1c8cbe..1cd3a7b6ee93 100644
--- a/svx/source/dialog/ClassificationDialog.cxx
+++ b/svx/source/dialog/ClassificationDialog.cxx
@@ -71,7 +71,7 @@ namespace {
constexpr size_t RECENTLY_USED_LIMIT = 5;
-const OUStringLiteral constRecentlyUsedFileName(u"recentlyUsed.xml");
+constexpr OUStringLiteral constRecentlyUsedFileName(u"recentlyUsed.xml");
OUString lcl_getClassificationUserPath()
{
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index b9ba22286d05..1e24c6c4a946 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -3669,8 +3669,8 @@ void FmXFormShell::smartControlReset( const Reference< XIndexAccess >& _rxModels
return;
}
- static const OUStringLiteral sClassIdPropertyName = u"" FM_PROP_CLASSID;
- static const OUStringLiteral sBoundFieldPropertyName = u"" FM_PROP_BOUNDFIELD;
+ static constexpr OUStringLiteral sClassIdPropertyName = u"" FM_PROP_CLASSID;
+ static constexpr OUStringLiteral sBoundFieldPropertyName = u"" FM_PROP_BOUNDFIELD;
sal_Int32 nCount = _rxModels->getCount();
Reference< XPropertySet > xCurrent;
Reference< XPropertySetInfo > xCurrentInfo;
diff --git a/svx/source/inc/datanavi.hxx b/svx/source/inc/datanavi.hxx
index f574adc4c05a..652ce21fa876 100644
--- a/svx/source/inc/datanavi.hxx
+++ b/svx/source/inc/datanavi.hxx
@@ -82,9 +82,9 @@ namespace svxform
OUString m_sInstance_UI;
OUString m_sNone_UI;
- static constexpr OUStringLiteral const m_sDoc_API = u"all";
- static constexpr OUStringLiteral const m_sInstance_API = u"instance";
- static constexpr OUStringLiteral const m_sNone_API = u"none";
+ static constexpr OUStringLiteral m_sDoc_API = u"all";
+ static constexpr OUStringLiteral m_sInstance_API = u"instance";
+ static constexpr OUStringLiteral m_sNone_API = u"none";
ReplaceString( const ReplaceString& ) = delete;
diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx
index f0e8c735473d..f1d74673cd03 100644
--- a/svx/source/table/tablelayouter.cxx
+++ b/svx/source/table/tablelayouter.cxx
@@ -46,7 +46,7 @@ namespace sdr::table {
static SvxBorderLine gEmptyBorder;
-const OUStringLiteral gsSize( u"Size" );
+constexpr OUStringLiteral gsSize( u"Size" );
TableLayouter::TableLayouter( const TableModelRef& xTableModel )
: mxTable( xTableModel )
diff --git a/svx/source/table/tablertfexporter.cxx b/svx/source/table/tablertfexporter.cxx
index 528d97bd1c41..f30d4dae6d72 100644
--- a/svx/source/table/tablertfexporter.cxx
+++ b/svx/source/table/tablertfexporter.cxx
@@ -67,7 +67,7 @@ void ExportAsRTF( SvStream& rStrm, SdrTableObj& rObj )
aEx.Write();
}
-const OUStringLiteral gsSize( u"Size" );
+constexpr OUStringLiteral gsSize( u"Size" );
SdrTableRtfExporter::SdrTableRtfExporter( SvStream& rStrm, SdrTableObj& rObj )
: mrStrm( rStrm )
diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx
index 092a7ab53539..387957e95d9c 100644
--- a/svx/source/tbxctrls/extrusioncontrols.cxx
+++ b/svx/source/tbxctrls/extrusioncontrols.cxx
@@ -326,8 +326,8 @@ double ExtrusionDepthDialog::getDepth() const
double const aDepthListInch[] = { 0, 1270,2540,5080,10160 };
double const aDepthListMM[] = { 0, 1000, 2500, 5000, 10000 };
-const OUStringLiteral gsExtrusionDepth( u".uno:ExtrusionDepth" );
-const OUStringLiteral gsMetricUnit( u".uno:MetricUnit" );
+constexpr OUStringLiteral gsExtrusionDepth( u".uno:ExtrusionDepth" );
+constexpr OUStringLiteral gsMetricUnit( u".uno:MetricUnit" );
ExtrusionDepthWindow::ExtrusionDepthWindow(svt::PopupWindowController* pControl, weld::Widget* pParent)
: WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/depthwindow.ui", "DepthWindow")
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx
index d51f2e647422..24fa16afbe39 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -278,7 +278,7 @@ private:
}
-const OUStringLiteral gsFontworkAlignment(u".uno:FontworkAlignment");
+constexpr OUStringLiteral gsFontworkAlignment(u".uno:FontworkAlignment");
FontworkAlignmentWindow::FontworkAlignmentWindow(svt::PopupWindowController* pControl, weld::Widget* pParent)
: WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/fontworkalignmentcontrol.ui", "FontworkAlignmentControl")
@@ -464,8 +464,8 @@ private:
}
-const OUStringLiteral gsFontworkCharacterSpacing(u".uno:FontworkCharacterSpacing");
-const OUStringLiteral gsFontworkKernCharacterPairs(u".uno:FontworkKernCharacterPairs");
+constexpr OUStringLiteral gsFontworkCharacterSpacing(u".uno:FontworkCharacterSpacing");
+constexpr OUStringLiteral gsFontworkKernCharacterPairs(u".uno:FontworkKernCharacterPairs");
FontworkCharacterSpacingWindow::FontworkCharacterSpacingWindow(svt::PopupWindowController* pControl, weld::Widget* pParent)
: WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/fontworkcharacterspacingcontrol.ui", "FontworkCharacterSpacingControl")
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index d74def305a0b..5e5470507693 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -652,8 +652,8 @@ static void lcl_selectCharacters(SwPaM& rPaM, sal_Int32 first, sal_Int32 end)
rPaM.GetPoint()->nContent.Assign(rPaM.GetContentNode(), end);
}
-const OUStringLiteral ORIGINAL_REPLACE_CONTENT(u"toto titi tutu");
-const OUStringLiteral EXPECTED_REPLACE_CONTENT(u"toto toto tutu");
+constexpr OUStringLiteral ORIGINAL_REPLACE_CONTENT(u"toto titi tutu");
+constexpr OUStringLiteral EXPECTED_REPLACE_CONTENT(u"toto toto tutu");
void SwUiWriterTest::testReplaceForward()
{
@@ -1601,7 +1601,7 @@ void SwUiWriterTest::testTextFieldGetAnchorGetTextInFooter() {
const sal_Unicode CHINESE_TRADITIONAL_CONTENT(0x9F8D);
const sal_Unicode CHINESE_SIMPLIFIED_CONTENT(0x9F99);
-const OUStringLiteral NON_CHINESE_CONTENT(u"Hippopotamus");
+constexpr OUStringLiteral NON_CHINESE_CONTENT(u"Hippopotamus");
// Tests that a blank document is still blank after conversion
void SwUiWriterTest::testChineseConversionBlank()
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 23988e1c4e12..9a3050ca8969 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -99,20 +99,20 @@
namespace
{
-const OUStringLiteral MetaFilename(u"tscp/bails.rdf");
-const OUStringLiteral MetaNS(u"urn:bails");
-const OUStringLiteral ParagraphSignatureRDFNamespace = u"urn:bails:loext:paragraph:signature:";
-const OUStringLiteral ParagraphSignatureIdRDFName = u"urn:bails:loext:paragraph:signature:id";
-const OUStringLiteral ParagraphSignatureDigestRDFName = u":digest";
-const OUStringLiteral ParagraphSignatureDateRDFName = u":date";
-const OUStringLiteral ParagraphSignatureUsageRDFName = u":usage";
-const OUStringLiteral ParagraphSignatureLastIdRDFName = u"urn:bails:loext:paragraph:signature:lastid";
-const OUStringLiteral ParagraphClassificationNameRDFName = u"urn:bails:loext:paragraph:classification:name";
-const OUStringLiteral ParagraphClassificationValueRDFName = u"urn:bails:loext:paragraph:classification:value";
-const OUStringLiteral ParagraphClassificationAbbrRDFName = u"urn:bails:loext:paragraph:classification:abbreviation";
-const OUStringLiteral ParagraphClassificationFieldNamesRDFName = u"urn:bails:loext:paragraph:classification:fields";
-const OUStringLiteral MetadataFieldServiceName = u"com.sun.star.text.textfield.MetadataField";
-const OUStringLiteral DocInfoServiceName = u"com.sun.star.text.TextField.DocInfo.Custom";
+constexpr OUStringLiteral MetaFilename(u"tscp/bails.rdf");
+constexpr OUStringLiteral MetaNS(u"urn:bails");
+constexpr OUStringLiteral ParagraphSignatureRDFNamespace = u"urn:bails:loext:paragraph:signature:";
+constexpr OUStringLiteral ParagraphSignatureIdRDFName = u"urn:bails:loext:paragraph:signature:id";
+constexpr OUStringLiteral ParagraphSignatureDigestRDFName = u":digest";
+constexpr OUStringLiteral ParagraphSignatureDateRDFName = u":date";
+constexpr OUStringLiteral ParagraphSignatureUsageRDFName = u":usage";
+constexpr OUStringLiteral ParagraphSignatureLastIdRDFName = u"urn:bails:loext:paragraph:signature:lastid";
+constexpr OUStringLiteral ParagraphClassificationNameRDFName = u"urn:bails:loext:paragraph:classification:name";
+constexpr OUStringLiteral ParagraphClassificationValueRDFName = u"urn:bails:loext:paragraph:classification:value";
+constexpr OUStringLiteral ParagraphClassificationAbbrRDFName = u"urn:bails:loext:paragraph:classification:abbreviation";
+constexpr OUStringLiteral ParagraphClassificationFieldNamesRDFName = u"urn:bails:loext:paragraph:classification:fields";
+constexpr OUStringLiteral MetadataFieldServiceName = u"com.sun.star.text.textfield.MetadataField";
+constexpr OUStringLiteral DocInfoServiceName = u"com.sun.star.text.TextField.DocInfo.Custom";
/// Find all page styles which are currently used in the document.
std::vector<OUString> lcl_getUsedPageStyles(SwViewShell const * pShell)
@@ -1922,7 +1922,7 @@ void SwEditShell::RestoreMetadataFieldsAndValidateParagraphSignatures()
if (!xParagraphs.is())
return;
- static const OUStringLiteral sBlank(u"");
+ static constexpr OUStringLiteral sBlank(u"");
const sfx::ClassificationKeyCreator aKeyCreator(SfxClassificationHelper::getPolicyType());
const css::uno::Sequence<css::uno::Reference<rdf::XURI>> aGraphNames = SwRDFHelper::getGraphNames(xModel, MetaNS);
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index b7e115e34054..c771a862bee4 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -1234,7 +1234,7 @@ void SwTextNode::DestroyAttr( SwTextAttr* pAttr )
{
if (SwDocShell* pDocSh = pDoc->GetDocShell())
{
- static const OUStringLiteral metaNS(u"urn:bails");
+ static constexpr OUStringLiteral metaNS(u"urn:bails");
const css::uno::Reference<css::rdf::XResource> xSubject = pMeta->MakeUnoObject();
uno::Reference<frame::XModel> xModel = pDocSh->GetBaseModel();
SwRDFHelper::clearStatements(xModel, metaNS, xSubject);
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index 373d08f14c32..e045f5bb235e 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -916,7 +916,7 @@ void DocxExport::WriteDocVars(const sax_fastparser::FSHelperPtr& pFS)
// Only write docVars if there will be at least a single docVar.
bool bStarted = false;
- const OUStringLiteral aPrefix(u"com.sun.star.text.fieldmaster.User.");
+ constexpr OUStringLiteral aPrefix(u"com.sun.star.text.fieldmaster.User.");
for (const auto& rMasterName : std::as_const(aMasterNames))
{
if (!rMasterName.startsWith(aPrefix))
@@ -1447,7 +1447,7 @@ void DocxExport::WriteCustomXml()
uno::Reference< beans::XPropertySet > xPropSet( m_pDoc->GetDocShell()->GetBaseModel(), uno::UNO_QUERY_THROW );
uno::Reference< beans::XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo();
- static const OUStringLiteral aName = u"" UNO_NAME_MISC_OBJ_INTEROPGRABBAG;
+ static constexpr OUStringLiteral aName = u"" UNO_NAME_MISC_OBJ_INTEROPGRABBAG;
if ( !xPropSetInfo->hasPropertyByName( aName ) )
return;
diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx
index ec313fb5eda7..2d8192fafaf0 100644
--- a/sw/source/filter/xml/xmltexte.cxx
+++ b/sw/source/filter/xml/xmltexte.cxx
@@ -80,7 +80,7 @@ SwNoTextNode *SwXMLTextParagraphExport::GetNoTextNode(
return pNdIdx->GetNodes()[pNdIdx->GetIndex() + 1]->GetNoTextNode();
}
-const OUStringLiteral gsEmbeddedObjectProtocol( u"vnd.sun.star.EmbeddedObject:" );
+constexpr OUStringLiteral gsEmbeddedObjectProtocol( u"vnd.sun.star.EmbeddedObject:" );
SwXMLTextParagraphExport::SwXMLTextParagraphExport(
SwXMLExport& rExp,
diff --git a/sw/source/uibase/dialog/swabstdlg.cxx b/sw/source/uibase/dialog/swabstdlg.cxx
index cf86ec6c3b7d..d5651d731cd4 100644
--- a/sw/source/uibase/dialog/swabstdlg.cxx
+++ b/sw/source/uibase/dialog/swabstdlg.cxx
@@ -38,7 +38,7 @@ SwAbstractDialogFactory* SwAbstractDialogFactory::Create()
SwFuncPtrCreateDialogFactory fp = nullptr;
#ifndef DISABLE_DYNLOADING
static ::osl::Module aDialogLibrary;
- static const OUStringLiteral sLibName(u"" SWUI_DLL_NAME);
+ static constexpr OUStringLiteral sLibName(u"" SWUI_DLL_NAME);
if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, sLibName,
SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY ) )
fp = reinterpret_cast<SwAbstractDialogFactory* (SAL_CALL*)()>(
diff --git a/test/source/sheet/xsheetoutline.cxx b/test/source/sheet/xsheetoutline.cxx
index c07fd866b05d..9e6844c3234c 100644
--- a/test/source/sheet/xsheetoutline.cxx
+++ b/test/source/sheet/xsheetoutline.cxx
@@ -28,13 +28,13 @@ using namespace css::uno;
namespace apitest {
-const OUStringLiteral colLevel1 = u"OutlineSheet.A1:Z1";
-const OUStringLiteral colLevel2 = u"OutlineSheet.C1:W1";
-const OUStringLiteral colLevel3 = u"OutlineSheet.E1:U1";
-const OUStringLiteral colLevel4 = u"OutlineSheet.G1:S1";
+constexpr OUStringLiteral colLevel1 = u"OutlineSheet.A1:Z1";
+constexpr OUStringLiteral colLevel2 = u"OutlineSheet.C1:W1";
+constexpr OUStringLiteral colLevel3 = u"OutlineSheet.E1:U1";
+constexpr OUStringLiteral colLevel4 = u"OutlineSheet.G1:S1";
-const OUStringLiteral rowLevel1 = u"OutlineSheet.A1:A30";
-const OUStringLiteral rowLevel2 = u"OutlineSheet.A3:A27";
+constexpr OUStringLiteral rowLevel1 = u"OutlineSheet.A1:A30";
+constexpr OUStringLiteral rowLevel2 = u"OutlineSheet.A3:A27";
static OUString getVisibleAdress(
uno::Reference<sheet::XSpreadsheet> const& xSheet,
diff --git a/ucb/source/ucp/file/filtask.cxx b/ucb/source/ucp/file/filtask.cxx
index 432f60dd66e3..790dd3d7ba8c 100644
--- a/ucb/source/ucp/file/filtask.cxx
+++ b/ucb/source/ucp/file/filtask.cxx
@@ -116,21 +116,21 @@ TaskManager::MyProperty::MyProperty( bool theisNat
// Default properties
-const OUStringLiteral Title( u"Title" );
-const OUStringLiteral CasePreservingURL( u"CasePreservingURL" );
-const OUStringLiteral IsDocument( u"IsDocument" );
-const OUStringLiteral IsFolder( u"IsFolder" );
-const OUStringLiteral DateModified( u"DateModified" );
-const OUStringLiteral Size( u"Size" );
-const OUStringLiteral IsVolume( u"IsVolume" );
-const OUStringLiteral IsRemoveable( u"IsRemoveable" );
-const OUStringLiteral IsRemote( u"IsRemote" );
-const OUStringLiteral IsCompactDisc( u"IsCompactDisc" );
-const OUStringLiteral IsFloppy( u"IsFloppy" );
-const OUStringLiteral IsHidden( u"IsHidden" );
-const OUStringLiteral ContentType( u"ContentType" );
-const OUStringLiteral IsReadOnly( u"IsReadOnly" );
-const OUStringLiteral CreatableContentsInfo( u"CreatableContentsInfo" );
+constexpr OUStringLiteral Title( u"Title" );
+constexpr OUStringLiteral CasePreservingURL( u"CasePreservingURL" );
+constexpr OUStringLiteral IsDocument( u"IsDocument" );
+constexpr OUStringLiteral IsFolder( u"IsFolder" );
+constexpr OUStringLiteral DateModified( u"DateModified" );
+constexpr OUStringLiteral Size( u"Size" );
+constexpr OUStringLiteral IsVolume( u"IsVolume" );
+constexpr OUStringLiteral IsRemoveable( u"IsRemoveable" );
+constexpr OUStringLiteral IsRemote( u"IsRemote" );
+constexpr OUStringLiteral IsCompactDisc( u"IsCompactDisc" );
+constexpr OUStringLiteral IsFloppy( u"IsFloppy" );
+constexpr OUStringLiteral IsHidden( u"IsHidden" );
+constexpr OUStringLiteral ContentType( u"ContentType" );
+constexpr OUStringLiteral IsReadOnly( u"IsReadOnly" );
+constexpr OUStringLiteral CreatableContentsInfo( u"CreatableContentsInfo" );
TaskManager::TaskManager( const uno::Reference< uno::XComponentContext >& rxContext,
FileProvider* pProvider, bool bWithConfig )
diff --git a/vbahelper/source/msforms/vbamultipage.cxx b/vbahelper/source/msforms/vbamultipage.cxx
index 26bc28523bed..6387f285a554 100644
--- a/vbahelper/source/msforms/vbamultipage.cxx
+++ b/vbahelper/source/msforms/vbamultipage.cxx
@@ -25,7 +25,7 @@
using namespace com::sun::star;
using namespace ooo::vba;
-const OUStringLiteral SVALUE( u"MultiPageValue" );
+constexpr OUStringLiteral SVALUE( u"MultiPageValue" );
namespace {
diff --git a/vbahelper/source/msforms/vbaprogressbar.cxx b/vbahelper/source/msforms/vbaprogressbar.cxx
index 8a5219459670..f988112b5c52 100644
--- a/vbahelper/source/msforms/vbaprogressbar.cxx
+++ b/vbahelper/source/msforms/vbaprogressbar.cxx
@@ -22,7 +22,7 @@ using namespace com::sun::star;
using namespace ooo::vba;
// uno servicename com.sun.star.awt.UnoControlProgressBarMode
-const OUStringLiteral SVALUE( u"ProgressValue" );
+constexpr OUStringLiteral SVALUE( u"ProgressValue" );
ScVbaProgressBar::ScVbaProgressBar( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, std::unique_ptr<ov::AbstractGeometryAttributes> pGeomHelper )
: ProgressBarImpl_BASE( xParent, xContext, xControl, xModel, std::move(pGeomHelper) )
diff --git a/vbahelper/source/vbahelper/vbaglobalbase.cxx b/vbahelper/source/vbahelper/vbaglobalbase.cxx
index 7b0e4f539e41..82808161e154 100644
--- a/vbahelper/source/vbahelper/vbaglobalbase.cxx
+++ b/vbahelper/source/vbahelper/vbaglobalbase.cxx
@@ -33,7 +33,7 @@ using namespace ooo::vba;
// special key to return the Application
const char sAppService[] = "ooo.vba.Application";
-const OUStringLiteral gsApplication( u"Application" );
+constexpr OUStringLiteral gsApplication( u"Application" );
VbaGlobalsBase::VbaGlobalsBase(
const uno::Reference< ov::XHelperInterface >& xParent,
diff --git a/vcl/qa/api/XGraphicTest.cxx b/vcl/qa/api/XGraphicTest.cxx
index 52374ff77070..3694e52ce38f 100644
--- a/vcl/qa/api/XGraphicTest.cxx
+++ b/vcl/qa/api/XGraphicTest.cxx
@@ -22,7 +22,7 @@ namespace
{
using namespace css;
-OUStringLiteral const gaDataUrl = u"/vcl/qa/api/data/";
+constexpr OUStringLiteral gaDataUrl = u"/vcl/qa/api/data/";
class XGraphicTest : public test::BootstrapFixture
{
diff --git a/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx b/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx
index 9c560459c24a..d13696571a9e 100644
--- a/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx
+++ b/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx
@@ -21,7 +21,7 @@
#include <svdata.hxx>
#include <salinst.hxx>
-OUStringLiteral const gaDataUrl = u"/vcl/qa/cppunit/bitmaprender/data/";
+constexpr OUStringLiteral gaDataUrl = u"/vcl/qa/cppunit/bitmaprender/data/";
class BitmapRenderTest : public test::BootstrapFixture
{
diff --git a/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx b/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx
index 953a35df93b1..65f5f8047bb6 100644
--- a/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx
+++ b/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx
@@ -13,7 +13,7 @@
#include <bitmapwriteaccess.hxx>
#include <tools/stream.hxx>
-OUStringLiteral const gaDataUrl(u"/vcl/qa/cppunit/jpeg/data/");
+constexpr OUStringLiteral gaDataUrl(u"/vcl/qa/cppunit/jpeg/data/");
class JpegReaderTest : public test::BootstrapFixtureBase
{
diff --git a/vcl/qa/cppunit/jpeg/JpegWriterTest.cxx b/vcl/qa/cppunit/jpeg/JpegWriterTest.cxx
index 2b89f9427395..fcd343ec4edc 100644
--- a/vcl/qa/cppunit/jpeg/JpegWriterTest.cxx
+++ b/vcl/qa/cppunit/jpeg/JpegWriterTest.cxx
@@ -13,7 +13,7 @@
#include <vcl/bitmapaccess.hxx>
#include <tools/stream.hxx>
-OUStringLiteral const gaDataUrl(u"/vcl/qa/cppunit/jpeg/data/");
+constexpr OUStringLiteral gaDataUrl(u"/vcl/qa/cppunit/jpeg/data/");
class JpegWriterTest : public test::BootstrapFixtureBase
{
diff --git a/vcl/qa/cppunit/widgetdraw/WidgetDefinitionReaderTest.cxx b/vcl/qa/cppunit/widgetdraw/WidgetDefinitionReaderTest.cxx
index ca2eb15a5b98..ac5accc5c940 100644
--- a/vcl/qa/cppunit/widgetdraw/WidgetDefinitionReaderTest.cxx
+++ b/vcl/qa/cppunit/widgetdraw/WidgetDefinitionReaderTest.cxx
@@ -16,7 +16,7 @@
namespace
{
-OUStringLiteral const gaDataUrl(u"/vcl/qa/cppunit/widgetdraw/data/");
+constexpr OUStringLiteral gaDataUrl(u"/vcl/qa/cppunit/widgetdraw/data/");
class WidgetDefinitionReaderTest : public test::BootstrapFixtureBase
{
diff --git a/vcl/source/app/IconThemeInfo.cxx b/vcl/source/app/IconThemeInfo.cxx
index d37519549962..aa7a5cf7c1bd 100644
--- a/vcl/source/app/IconThemeInfo.cxx
+++ b/vcl/source/app/IconThemeInfo.cxx
@@ -18,9 +18,9 @@
namespace {
-const OUStringLiteral KARASA_JAGA_ID(u"karasa_jaga");
-const OUStringLiteral KARASA_JAGA_DISPLAY_NAME(u"Karasa Jaga");
-const OUStringLiteral HELPIMG_FAKE_THEME(u"helpimg");
+constexpr OUStringLiteral KARASA_JAGA_ID(u"karasa_jaga");
+constexpr OUStringLiteral KARASA_JAGA_DISPLAY_NAME(u"Karasa Jaga");
+constexpr OUStringLiteral HELPIMG_FAKE_THEME(u"helpimg");
OUString
filename_from_url(const OUString& url)
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index 88338abb9cb9..b3137fd2b00c 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -962,7 +962,7 @@ void PPDParser::parse( ::std::vector< OString >& rLines )
// ppd_group_t structure. Groups can be specified in the PPD file; if an
// option is not associated with a group, it is put in a "General" or
// "Extra" group depending on the option.
- static const OStringLiteral aDefaultPPDGroupName("General");
+ static constexpr OStringLiteral aDefaultPPDGroupName("General");
std::vector< OString >::iterator line = rLines.begin();
PPDParser::hash_type::const_iterator keyit;
diff --git a/xmloff/source/core/SettingsExportHelper.cxx b/xmloff/source/core/SettingsExportHelper.cxx
index fbabfe5df775..6c193e19267e 100644
--- a/xmloff/source/core/SettingsExportHelper.cxx
+++ b/xmloff/source/core/SettingsExportHelper.cxx
@@ -45,13 +45,13 @@
using namespace ::com::sun::star;
using namespace ::xmloff::token;
-const OUStringLiteral gsPrinterIndependentLayout( u"PrinterIndependentLayout" );
-const OUStringLiteral gsColorTableURL( u"ColorTableURL" );
-const OUStringLiteral gsLineEndTableURL( u"LineEndTableURL" );
-const OUStringLiteral gsHatchTableURL( u"HatchTableURL" );
-const OUStringLiteral gsDashTableURL( u"DashTableURL" );
-const OUStringLiteral gsGradientTableURL( u"GradientTableURL" );
-const OUStringLiteral gsBitmapTableURL( u"BitmapTableURL" );
+constexpr OUStringLiteral gsPrinterIndependentLayout( u"PrinterIndependentLayout" );
+constexpr OUStringLiteral gsColorTableURL( u"ColorTableURL" );
+constexpr OUStringLiteral gsLineEndTableURL( u"LineEndTableURL" );
+constexpr OUStringLiteral gsHatchTableURL( u"HatchTableURL" );
+constexpr OUStringLiteral gsDashTableURL( u"DashTableURL" );
+constexpr OUStringLiteral gsGradientTableURL( u"GradientTableURL" );
+constexpr OUStringLiteral gsBitmapTableURL( u"BitmapTableURL" );
XMLSettingsExportHelper::XMLSettingsExportHelper( ::xmloff::XMLSettingsExportContext& i_rContext )
: m_rContext( i_rContext )
diff --git a/xmloff/source/draw/XMLImageMapContext.cxx b/xmloff/source/draw/XMLImageMapContext.cxx
index d822f363400e..99949c2d5caf 100644
--- a/xmloff/source/draw/XMLImageMapContext.cxx
+++ b/xmloff/source/draw/XMLImageMapContext.cxx
@@ -554,7 +554,7 @@ void XMLImageMapCircleContext::Prepare(
}
-const OUStringLiteral gsImageMap(u"ImageMap");
+constexpr OUStringLiteral gsImageMap(u"ImageMap");
XMLImageMapContext::XMLImageMapContext(
SvXMLImport& rImport,
diff --git a/xmloff/source/draw/XMLImageMapExport.cxx b/xmloff/source/draw/XMLImageMapExport.cxx
index 25117838ac88..746d975b737a 100644
--- a/xmloff/source/draw/XMLImageMapExport.cxx
+++ b/xmloff/source/draw/XMLImageMapExport.cxx
@@ -53,17 +53,17 @@ using ::com::sun::star::document::XEventsSupplier;
using ::com::sun::star::lang::XServiceInfo;
using ::com::sun::star::drawing::PointSequence;
-const OUStringLiteral gsBoundary(u"Boundary");
-const OUStringLiteral gsCenter(u"Center");
-const OUStringLiteral gsDescription(u"Description");
-const OUStringLiteral gsImageMap(u"ImageMap");
-const OUStringLiteral gsIsActive(u"IsActive");
-const OUStringLiteral gsName(u"Name");
-const OUStringLiteral gsPolygon(u"Polygon");
-const OUStringLiteral gsRadius(u"Radius");
-const OUStringLiteral gsTarget(u"Target");
-const OUStringLiteral gsURL(u"URL");
-const OUStringLiteral gsTitle(u"Title");
+constexpr OUStringLiteral gsBoundary(u"Boundary");
+constexpr OUStringLiteral gsCenter(u"Center");
+constexpr OUStringLiteral gsDescription(u"Description");
+constexpr OUStringLiteral gsImageMap(u"ImageMap");
+constexpr OUStringLiteral gsIsActive(u"IsActive");
+constexpr OUStringLiteral gsName(u"Name");
+constexpr OUStringLiteral gsPolygon(u"Polygon");
+constexpr OUStringLiteral gsRadius(u"Radius");
+constexpr OUStringLiteral gsTarget(u"Target");
+constexpr OUStringLiteral gsURL(u"URL");
+constexpr OUStringLiteral gsTitle(u"Title");
XMLImageMapExport::XMLImageMapExport(SvXMLExport& rExp) :
mrExport(rExp)
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 708dfb3fa085..b67829c58eac 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -368,7 +368,7 @@ ImpXMLAutoLayoutInfo::ImpXMLAutoLayoutInfo(sal_uInt16 nTyp, ImpXMLEXPPageMasterI
maPresRect.SetSize(aLayoutSize);
}
-const OUStringLiteral gsPageLayoutNames( u"PageLayoutNames" );
+constexpr OUStringLiteral gsPageLayoutNames( u"PageLayoutNames" );
SdXMLExport::SdXMLExport(
const css::uno::Reference< css::uno::XComponentContext >& xContext,
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 6b3559200d02..58d916c7608f 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -146,26 +146,26 @@ bool supportsText(XmlShapeType eShapeType)
}
-const OUStringLiteral gsZIndex( u"ZOrder" );
-const OUStringLiteral gsPrintable( u"Printable" );
-const OUStringLiteral gsVisible( u"Visible" );
-const OUStringLiteral gsModel( u"Model" );
-const OUStringLiteral gsStartShape( u"StartShape" );
-const OUStringLiteral gsEndShape( u"EndShape" );
-const OUStringLiteral gsOnClick( u"OnClick" );
-const OUStringLiteral gsEventType( u"EventType" );
-const OUStringLiteral gsPresentation( u"Presentation" );
-const OUStringLiteral gsMacroName( u"MacroName" );
-const OUStringLiteral gsScript( u"Script" );
-const OUStringLiteral gsLibrary( u"Library" );
-const OUStringLiteral gsClickAction( u"ClickAction" );
-const OUStringLiteral gsBookmark( u"Bookmark" );
-const OUStringLiteral gsEffect( u"Effect" );
-const OUStringLiteral gsPlayFull( u"PlayFull" );
-const OUStringLiteral gsVerb( u"Verb" );
-const OUStringLiteral gsSoundURL( u"SoundURL" );
-const OUStringLiteral gsSpeed( u"Speed" );
-const OUStringLiteral gsStarBasic( u"StarBasic" );
+constexpr OUStringLiteral gsZIndex( u"ZOrder" );
+constexpr OUStringLiteral gsPrintable( u"Printable" );
+constexpr OUStringLiteral gsVisible( u"Visible" );
+constexpr OUStringLiteral gsModel( u"Model" );
+constexpr OUStringLiteral gsStartShape( u"StartShape" );
+constexpr OUStringLiteral gsEndShape( u"EndShape" );
+constexpr OUStringLiteral gsOnClick( u"OnClick" );
+constexpr OUStringLiteral gsEventType( u"EventType" );
+constexpr OUStringLiteral gsPresentation( u"Presentation" );
+constexpr OUStringLiteral gsMacroName( u"MacroName" );
+constexpr OUStringLiteral gsScript( u"Script" );
+constexpr OUStringLiteral gsLibrary( u"Library" );
+constexpr OUStringLiteral gsClickAction( u"ClickAction" );
+constexpr OUStringLiteral gsBookmark( u"Bookmark" );
+constexpr OUStringLiteral gsEffect( u"Effect" );
+constexpr OUStringLiteral gsPlayFull( u"PlayFull" );
+constexpr OUStringLiteral gsVerb( u"Verb" );
+constexpr OUStringLiteral gsSoundURL( u"SoundURL" );
+constexpr OUStringLiteral gsSpeed( u"Speed" );
+constexpr OUStringLiteral gsStarBasic( u"StarBasic" );
XMLShapeExport::XMLShapeExport(SvXMLExport& rExp,
SvXMLExportPropertyMapper *pExtMapper )
diff --git a/xmloff/source/script/XMLEventExport.cxx b/xmloff/source/script/XMLEventExport.cxx
index 7d45be7fffd8..877edf198ab9 100644
--- a/xmloff/source/script/XMLEventExport.cxx
+++ b/xmloff/source/script/XMLEventExport.cxx
@@ -40,7 +40,7 @@ using ::com::sun::star::container::XNameReplace;
using ::com::sun::star::container::XNameAccess;
using ::xmloff::token::XML_EVENT_LISTENERS;
-const OUStringLiteral gsEventType(u"EventType");
+constexpr OUStringLiteral gsEventType(u"EventType");
XMLEventExport::XMLEventExport(SvXMLExport& rExp) :
rExport(rExp),
diff --git a/xmloff/source/script/XMLScriptContextFactory.cxx b/xmloff/source/script/XMLScriptContextFactory.cxx
index 9dfb704c71f1..da16657efd5c 100644
--- a/xmloff/source/script/XMLScriptContextFactory.cxx
+++ b/xmloff/source/script/XMLScriptContextFactory.cxx
@@ -32,9 +32,9 @@ using ::com::sun::star::beans::PropertyValue;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
-const OUStringLiteral gsEventType(u"EventType");
-const OUStringLiteral gsScript(u"Script");
-const OUStringLiteral gsURL(u"Script");
+constexpr OUStringLiteral gsEventType(u"EventType");
+constexpr OUStringLiteral gsScript(u"Script");
+constexpr OUStringLiteral gsURL(u"Script");
XMLScriptContextFactory::XMLScriptContextFactory()
{
diff --git a/xmloff/source/script/XMLScriptExportHandler.cxx b/xmloff/source/script/XMLScriptExportHandler.cxx
index af7cb2ec976b..6b35a4456402 100644
--- a/xmloff/source/script/XMLScriptExportHandler.cxx
+++ b/xmloff/source/script/XMLScriptExportHandler.cxx
@@ -31,7 +31,7 @@ using namespace ::xmloff::token;
using ::com::sun::star::beans::PropertyValue;
-const OUStringLiteral gsURL(u"Script");
+constexpr OUStringLiteral gsURL(u"Script");
XMLScriptExportHandler::XMLScriptExportHandler()
{
diff --git a/xmloff/source/script/XMLStarBasicContextFactory.cxx b/xmloff/source/script/XMLStarBasicContextFactory.cxx
index 739fe5afad52..4c384f98acc6 100644
--- a/xmloff/source/script/XMLStarBasicContextFactory.cxx
+++ b/xmloff/source/script/XMLStarBasicContextFactory.cxx
@@ -33,10 +33,10 @@ using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
-const OUStringLiteral gsEventType(u"EventType");
-const OUStringLiteral gsLibrary(u"Library");
-const OUStringLiteral gsMacroName(u"MacroName");
-const OUStringLiteral gsStarBasic(u"StarBasic");
+constexpr OUStringLiteral gsEventType(u"EventType");
+constexpr OUStringLiteral gsLibrary(u"Library");
+constexpr OUStringLiteral gsMacroName(u"MacroName");
+constexpr OUStringLiteral gsStarBasic(u"StarBasic");
XMLStarBasicContextFactory::XMLStarBasicContextFactory()
{
diff --git a/xmloff/source/script/XMLStarBasicExportHandler.cxx b/xmloff/source/script/XMLStarBasicExportHandler.cxx
index e61b3f8f8ebb..2170d32fdfd0 100644
--- a/xmloff/source/script/XMLStarBasicExportHandler.cxx
+++ b/xmloff/source/script/XMLStarBasicExportHandler.cxx
@@ -32,11 +32,11 @@ using namespace ::xmloff::token;
using ::com::sun::star::beans::PropertyValue;
-const OUStringLiteral gsStarBasic(u"StarBasic");
-const OUStringLiteral gsLibrary(u"Library");
-const OUStringLiteral gsMacroName(u"MacroName");
-const OUStringLiteral gsStarOffice(u"StarOffice");
-const OUStringLiteral gsApplication(u"application");
+constexpr OUStringLiteral gsStarBasic(u"StarBasic");
+constexpr OUStringLiteral gsLibrary(u"Library");
+constexpr OUStringLiteral gsMacroName(u"MacroName");
+constexpr OUStringLiteral gsStarOffice(u"StarOffice");
+constexpr OUStringLiteral gsApplication(u"application");
XMLStarBasicExportHandler::XMLStarBasicExportHandler()
{
diff --git a/xmloff/source/style/XMLPageExport.cxx b/xmloff/source/style/XMLPageExport.cxx
index 27bbfbb942f5..640e11b7094d 100644
--- a/xmloff/source/style/XMLPageExport.cxx
+++ b/xmloff/source/style/XMLPageExport.cxx
@@ -41,8 +41,8 @@ using namespace ::com::sun::star::container;
using namespace ::com::sun::star::beans;
using namespace ::xmloff::token;
-const OUStringLiteral gsIsPhysical( u"IsPhysical" );
-const OUStringLiteral gsFollowStyle( u"FollowStyle" );
+constexpr OUStringLiteral gsIsPhysical( u"IsPhysical" );
+constexpr OUStringLiteral gsFollowStyle( u"FollowStyle" );
namespace {
diff --git a/xmloff/source/style/numehelp.cxx b/xmloff/source/style/numehelp.cxx
index d1479cf0c4cc..3d46adcb575e 100644
--- a/xmloff/source/style/numehelp.cxx
+++ b/xmloff/source/style/numehelp.cxx
@@ -38,10 +38,10 @@
using namespace com::sun::star;
using namespace xmloff::token;
-const OUStringLiteral gsStandardFormat(u"StandardFormat");
-const OUStringLiteral gsType(u"Type");
-const OUStringLiteral gsCurrencySymbol(u"CurrencySymbol");
-const OUStringLiteral gsCurrencyAbbreviation(u"CurrencyAbbreviation");
+constexpr OUStringLiteral gsStandardFormat(u"StandardFormat");
+constexpr OUStringLiteral gsType(u"Type");
+constexpr OUStringLiteral gsCurrencySymbol(u"CurrencySymbol");
+constexpr OUStringLiteral gsCurrencyAbbreviation(u"CurrencyAbbreviation");
XMLNumberFormatAttributesExportHelper::XMLNumberFormatAttributesExportHelper(
css::uno::Reference< css::util::XNumberFormatsSupplier > const & xTempNumberFormatsSupplier)
diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx
index 48cbeca9edad..2d2ef1b4b047 100644
--- a/xmloff/source/style/prstylei.cxx
+++ b/xmloff/source/style/prstylei.cxx
@@ -143,8 +143,8 @@ namespace
-const OUStringLiteral gsIsPhysical( u"IsPhysical" );
-const OUStringLiteral gsFollowStyle( u"FollowStyle" );
+constexpr OUStringLiteral gsIsPhysical( u"IsPhysical" );
+constexpr OUStringLiteral gsFollowStyle( u"FollowStyle" );
XMLPropStyleContext::XMLPropStyleContext( SvXMLImport& rImport,
SvXMLStylesContext& rStyles, XmlStyleFamily nFamily,
diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx
index 66cab27c9d19..c87d3e3edff6 100644
--- a/xmloff/source/style/styleexp.cxx
+++ b/xmloff/source/style/styleexp.cxx
@@ -52,11 +52,11 @@ using namespace ::xmloff::token;
using ::com::sun::star::document::XEventsSupplier;
-const OUStringLiteral gsIsPhysical( u"IsPhysical" );
-const OUStringLiteral gsIsAutoUpdate( u"IsAutoUpdate" );
-const OUStringLiteral gsFollowStyle( u"FollowStyle" );
-const OUStringLiteral gsNumberingStyleName( u"NumberingStyleName" );
-const OUStringLiteral gsOutlineLevel( u"OutlineLevel" );
+constexpr OUStringLiteral gsIsPhysical( u"IsPhysical" );
+constexpr OUStringLiteral gsIsAutoUpdate( u"IsAutoUpdate" );
+constexpr OUStringLiteral gsFollowStyle( u"FollowStyle" );
+constexpr OUStringLiteral gsNumberingStyleName( u"NumberingStyleName" );
+constexpr OUStringLiteral gsOutlineLevel( u"OutlineLevel" );
XMLStyleExport::XMLStyleExport(
SvXMLExport& rExp,
diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx
index 9dd157122b1a..2aac21253218 100644
--- a/xmloff/source/style/xmlnume.cxx
+++ b/xmloff/source/style/xmlnume.cxx
@@ -606,9 +606,9 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
}
-const OUStringLiteral gsNumberingRules( u"NumberingRules" );
-const OUStringLiteral gsIsPhysical( u"IsPhysical" );
-const OUStringLiteral gsIsContinuousNumbering( u"IsContinuousNumbering" );
+constexpr OUStringLiteral gsNumberingRules( u"NumberingRules" );
+constexpr OUStringLiteral gsIsPhysical( u"IsPhysical" );
+constexpr OUStringLiteral gsIsContinuousNumbering( u"IsContinuousNumbering" );
SvxXMLNumRuleExport::SvxXMLNumRuleExport( SvXMLExport& rExp ) :
rExport( rExp ),
diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx
index bed36cb693da..73e3d1e2b3c5 100644
--- a/xmloff/source/style/xmlnumi.cxx
+++ b/xmloff/source/style/xmlnumi.cxx
@@ -228,8 +228,8 @@ public:
}
};
-const OUStringLiteral gsStarBats( u"StarBats" );
-const OUStringLiteral gsStarMath( u"StarMath" );
+constexpr OUStringLiteral gsStarBats( u"StarBats" );
+constexpr OUStringLiteral gsStarMath( u"StarMath" );
SvxXMLListLevelStyleContext_Impl::SvxXMLListLevelStyleContext_Impl(
SvXMLImport& rImport, sal_Int32 nElement,
@@ -918,9 +918,9 @@ void SvxXMLListStyleContext::SetAttribute( sal_uInt16 nPrefixKey,
}
}
-const OUStringLiteral sIsPhysical( u"IsPhysical" );
-const OUStringLiteral sNumberingRules( u"NumberingRules" );
-const OUStringLiteral sIsContinuousNumbering( u"IsContinuousNumbering" );
+constexpr OUStringLiteral sIsPhysical( u"IsPhysical" );
+constexpr OUStringLiteral sNumberingRules( u"NumberingRules" );
+constexpr OUStringLiteral sIsContinuousNumbering( u"IsContinuousNumbering" );
SvxXMLListStyleContext::SvxXMLListStyleContext( SvXMLImport& rImport,
bool bOutl )
diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx
index 67909f15fb96..2a8e44b21285 100644
--- a/xmloff/source/style/xmlstyle.cxx
+++ b/xmloff/source/style/xmlstyle.cxx
@@ -59,8 +59,8 @@ using namespace ::com::sun::star::container;
using namespace ::com::sun::star::style;
using namespace ::xmloff::token;
-const OUStringLiteral gsParaStyleServiceName( u"com.sun.star.style.ParagraphStyle" );
-const OUStringLiteral gsTextStyleServiceName( u"com.sun.star.style.CharacterStyle" );
+constexpr OUStringLiteral gsParaStyleServiceName( u"com.sun.star.style.ParagraphStyle" );
+constexpr OUStringLiteral gsTextStyleServiceName( u"com.sun.star.style.CharacterStyle" );
void SvXMLStyleContext::SetAttribute( sal_uInt16 nPrefixKey,
const OUString& rLocalName,
diff --git a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
index 855ce4a1a97a..2aa5fb939e9f 100644
--- a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
+++ b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
@@ -109,18 +109,18 @@ void XMLFootnoteConfigHelper::characters( const OUString& rChars )
// XMLFootnoteConfigurationImportContext
-const OUStringLiteral gsPropertyAnchorCharStyleName(u"AnchorCharStyleName");
-const OUStringLiteral gsPropertyCharStyleName(u"CharStyleName");
-const OUStringLiteral gsPropertyNumberingType(u"NumberingType");
-const OUStringLiteral gsPropertyPageStyleName(u"PageStyleName");
-const OUStringLiteral gsPropertyParagraphStyleName(u"ParaStyleName");
-const OUStringLiteral gsPropertyPrefix(u"Prefix");
-const OUStringLiteral gsPropertyStartAt(u"StartAt");
-const OUStringLiteral gsPropertySuffix(u"Suffix");
-const OUStringLiteral gsPropertyPositionEndOfDoc(u"PositionEndOfDoc");
-const OUStringLiteral gsPropertyFootnoteCounting(u"FootnoteCounting");
-const OUStringLiteral gsPropertyEndNotice(u"EndNotice");
-const OUStringLiteral gsPropertyBeginNotice(u"BeginNotice");
+constexpr OUStringLiteral gsPropertyAnchorCharStyleName(u"AnchorCharStyleName");
+constexpr OUStringLiteral gsPropertyCharStyleName(u"CharStyleName");
+constexpr OUStringLiteral gsPropertyNumberingType(u"NumberingType");
+constexpr OUStringLiteral gsPropertyPageStyleName(u"PageStyleName");
+constexpr OUStringLiteral gsPropertyParagraphStyleName(u"ParaStyleName");
+constexpr OUStringLiteral gsPropertyPrefix(u"Prefix");
+constexpr OUStringLiteral gsPropertyStartAt(u"StartAt");
+constexpr OUStringLiteral gsPropertySuffix(u"Suffix");
+constexpr OUStringLiteral gsPropertyPositionEndOfDoc(u"PositionEndOfDoc");
+constexpr OUStringLiteral gsPropertyFootnoteCounting(u"FootnoteCounting");
+constexpr OUStringLiteral gsPropertyEndNotice(u"EndNotice");
+constexpr OUStringLiteral gsPropertyBeginNotice(u"BeginNotice");
XMLFootnoteConfigurationImportContext::XMLFootnoteConfigurationImportContext(
SvXMLImport& rImport,
diff --git a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
index 41f102ba519c..81d9f32af949 100644
--- a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
+++ b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
@@ -45,16 +45,16 @@ using ::com::sun::star::beans::XPropertySet;
using ::com::sun::star::lang::XMultiServiceFactory;
-const OUStringLiteral gsFieldMaster_Bibliography(u"com.sun.star.text.FieldMaster.Bibliography");
-const OUStringLiteral gsBracketBefore(u"BracketBefore");
-const OUStringLiteral gsBracketAfter(u"BracketAfter");
-const OUStringLiteral gsIsNumberEntries(u"IsNumberEntries");
-const OUStringLiteral gsIsSortByPosition(u"IsSortByPosition");
-const OUStringLiteral gsSortKeys(u"SortKeys");
-const OUStringLiteral gsSortKey(u"SortKey");
-const OUStringLiteral gsIsSortAscending(u"IsSortAscending");
-const OUStringLiteral gsSortAlgorithm(u"SortAlgorithm");
-const OUStringLiteral gsLocale(u"Locale");
+constexpr OUStringLiteral gsFieldMaster_Bibliography(u"com.sun.star.text.FieldMaster.Bibliography");
+constexpr OUStringLiteral gsBracketBefore(u"BracketBefore");
+constexpr OUStringLiteral gsBracketAfter(u"BracketAfter");
+constexpr OUStringLiteral gsIsNumberEntries(u"IsNumberEntries");
+constexpr OUStringLiteral gsIsSortByPosition(u"IsSortByPosition");
+constexpr OUStringLiteral gsSortKeys(u"SortKeys");
+constexpr OUStringLiteral gsSortKey(u"SortKey");
+constexpr OUStringLiteral gsIsSortAscending(u"IsSortAscending");
+constexpr OUStringLiteral gsSortAlgorithm(u"SortAlgorithm");
+constexpr OUStringLiteral gsLocale(u"Locale");
XMLIndexBibliographyConfigurationContext::XMLIndexBibliographyConfigurationContext(
SvXMLImport& rImport) :
diff --git a/xmloff/source/text/XMLLineNumberingImportContext.cxx b/xmloff/source/text/XMLLineNumberingImportContext.cxx
index 7df8c1917c1e..fde276850f9c 100644
--- a/xmloff/source/text/XMLLineNumberingImportContext.cxx
+++ b/xmloff/source/text/XMLLineNumberingImportContext.cxx
@@ -44,17 +44,17 @@ using ::com::sun::star::xml::sax::XFastAttributeList;
using ::com::sun::star::text::XLineNumberingProperties;
-const OUStringLiteral gsCharStyleName(u"CharStyleName");
-const OUStringLiteral gsCountEmptyLines(u"CountEmptyLines");
-const OUStringLiteral gsCountLinesInFrames(u"CountLinesInFrames");
-const OUStringLiteral gsDistance(u"Distance");
-const OUStringLiteral gsInterval(u"Interval");
-const OUStringLiteral gsSeparatorText(u"SeparatorText");
-const OUStringLiteral gsNumberPosition(u"NumberPosition");
-const OUStringLiteral gsNumberingType(u"NumberingType");
-const OUStringLiteral gsIsOn(u"IsOn");
-const OUStringLiteral gsRestartAtEachPage(u"RestartAtEachPage");
-const OUStringLiteral gsSeparatorInterval(u"SeparatorInterval");
+constexpr OUStringLiteral gsCharStyleName(u"CharStyleName");
+constexpr OUStringLiteral gsCountEmptyLines(u"CountEmptyLines");
+constexpr OUStringLiteral gsCountLinesInFrames(u"CountLinesInFrames");
+constexpr OUStringLiteral gsDistance(u"Distance");
+constexpr OUStringLiteral gsInterval(u"Interval");
+constexpr OUStringLiteral gsSeparatorText(u"SeparatorText");
+constexpr OUStringLiteral gsNumberPosition(u"NumberPosition");
+constexpr OUStringLiteral gsNumberingType(u"NumberingType");
+constexpr OUStringLiteral gsIsOn(u"IsOn");
+constexpr OUStringLiteral gsRestartAtEachPage(u"RestartAtEachPage");
+constexpr OUStringLiteral gsSeparatorInterval(u"SeparatorInterval");
XMLLineNumberingImportContext::XMLLineNumberingImportContext(
SvXMLImport& rImport)
diff --git a/xmloff/source/text/XMLTextColumnsContext.cxx b/xmloff/source/text/XMLTextColumnsContext.cxx
index e6b0a54fa917..6c5bc01077d3 100644
--- a/xmloff/source/text/XMLTextColumnsContext.cxx
+++ b/xmloff/source/text/XMLTextColumnsContext.cxx
@@ -210,13 +210,13 @@ XMLTextColumnSepContext_Impl::XMLTextColumnSepContext_Impl(
}
}
-const OUStringLiteral gsSeparatorLineIsOn(u"SeparatorLineIsOn");
-const OUStringLiteral gsSeparatorLineWidth(u"SeparatorLineWidth");
-const OUStringLiteral gsSeparatorLineColor(u"SeparatorLineColor");
-const OUStringLiteral gsSeparatorLineRelativeHeight(u"SeparatorLineRelativeHeight");
-const OUStringLiteral gsSeparatorLineVerticalAlignment(u"SeparatorLineVerticalAlignment");
-const OUStringLiteral gsAutomaticDistance(u"AutomaticDistance");
-const OUStringLiteral gsSeparatorLineStyle(u"SeparatorLineStyle");
+constexpr OUStringLiteral gsSeparatorLineIsOn(u"SeparatorLineIsOn");
+constexpr OUStringLiteral gsSeparatorLineWidth(u"SeparatorLineWidth");
+constexpr OUStringLiteral gsSeparatorLineColor(u"SeparatorLineColor");
+constexpr OUStringLiteral gsSeparatorLineRelativeHeight(u"SeparatorLineRelativeHeight");
+constexpr OUStringLiteral gsSeparatorLineVerticalAlignment(u"SeparatorLineVerticalAlignment");
+constexpr OUStringLiteral gsAutomaticDistance(u"AutomaticDistance");
+constexpr OUStringLiteral gsSeparatorLineStyle(u"SeparatorLineStyle");
XMLTextColumnsContext::XMLTextColumnsContext(
SvXMLImport& rImport, sal_Int32 nElement,
diff --git a/xmloff/source/text/XMLTextColumnsExport.cxx b/xmloff/source/text/XMLTextColumnsExport.cxx
index 85f0009a9639..13f06fde36e6 100644
--- a/xmloff/source/text/XMLTextColumnsExport.cxx
+++ b/xmloff/source/text/XMLTextColumnsExport.cxx
@@ -43,14 +43,14 @@ using namespace ::com::sun::star::beans;
using namespace ::xmloff::token;
-const OUStringLiteral gsSeparatorLineIsOn(u"SeparatorLineIsOn");
-const OUStringLiteral gsSeparatorLineWidth(u"SeparatorLineWidth");
-const OUStringLiteral gsSeparatorLineColor(u"SeparatorLineColor");
-const OUStringLiteral gsSeparatorLineRelativeHeight(u"SeparatorLineRelativeHeight");
-const OUStringLiteral gsSeparatorLineVerticalAlignment(u"SeparatorLineVerticalAlignment");
-const OUStringLiteral gsIsAutomatic(u"IsAutomatic");
-const OUStringLiteral gsAutomaticDistance(u"AutomaticDistance");
-const OUStringLiteral gsSeparatorLineStyle(u"SeparatorLineStyle");
+constexpr OUStringLiteral gsSeparatorLineIsOn(u"SeparatorLineIsOn");
+constexpr OUStringLiteral gsSeparatorLineWidth(u"SeparatorLineWidth");
+constexpr OUStringLiteral gsSeparatorLineColor(u"SeparatorLineColor");
+constexpr OUStringLiteral gsSeparatorLineRelativeHeight(u"SeparatorLineRelativeHeight");
+constexpr OUStringLiteral gsSeparatorLineVerticalAlignment(u"SeparatorLineVerticalAlignment");
+constexpr OUStringLiteral gsIsAutomatic(u"IsAutomatic");
+constexpr OUStringLiteral gsAutomaticDistance(u"AutomaticDistance");
+constexpr OUStringLiteral gsSeparatorLineStyle(u"SeparatorLineStyle");
XMLTextColumnsExport::XMLTextColumnsExport( SvXMLExport& rExp ) :
rExport( rExp )
diff --git a/xmloff/source/text/XMLTextMasterPageContext.cxx b/xmloff/source/text/XMLTextMasterPageContext.cxx
index 9a0350db0974..5803ec5790a8 100644
--- a/xmloff/source/text/XMLTextMasterPageContext.cxx
+++ b/xmloff/source/text/XMLTextMasterPageContext.cxx
@@ -65,7 +65,7 @@ Reference < XStyle > XMLTextMasterPageContext::Create()
return xNewStyle;
}
-const OUStringLiteral gsFollowStyle( u"FollowStyle" );
+constexpr OUStringLiteral gsFollowStyle( u"FollowStyle" );
XMLTextMasterPageContext::XMLTextMasterPageContext( SvXMLImport& rImport,
sal_Int32 /*nElement*/,
diff --git a/xmloff/source/text/XMLTextMasterPageExport.cxx b/xmloff/source/text/XMLTextMasterPageExport.cxx
index 13851617d8a7..87490a0df2ee 100644
--- a/xmloff/source/text/XMLTextMasterPageExport.cxx
+++ b/xmloff/source/text/XMLTextMasterPageExport.cxx
@@ -32,17 +32,17 @@ using namespace ::com::sun::star::text;
using namespace ::com::sun::star::beans;
using namespace ::xmloff::token;
-const OUStringLiteral gsHeaderText( u"HeaderText" );
-const OUStringLiteral gsHeaderOn( u"HeaderIsOn" );
-const OUStringLiteral gsHeaderShareContent( u"HeaderIsShared" );
-const OUStringLiteral gsHeaderTextFirst( u"HeaderTextFirst" );
-const OUStringLiteral gsHeaderTextLeft( u"HeaderTextLeft" );
-const OUStringLiteral gsFirstShareContent( u"FirstIsShared" );
-const OUStringLiteral gsFooterText( u"FooterText" );
-const OUStringLiteral gsFooterOn( u"FooterIsOn" );
-const OUStringLiteral gsFooterShareContent( u"FooterIsShared" );
-const OUStringLiteral gsFooterTextFirst( u"FooterTextFirst" );
-const OUStringLiteral gsFooterTextLeft( u"FooterTextLeft" );
+constexpr OUStringLiteral gsHeaderText( u"HeaderText" );
+constexpr OUStringLiteral gsHeaderOn( u"HeaderIsOn" );
+constexpr OUStringLiteral gsHeaderShareContent( u"HeaderIsShared" );
+constexpr OUStringLiteral gsHeaderTextFirst( u"HeaderTextFirst" );
+constexpr OUStringLiteral gsHeaderTextLeft( u"HeaderTextLeft" );
+constexpr OUStringLiteral gsFirstShareContent( u"FirstIsShared" );
+constexpr OUStringLiteral gsFooterText( u"FooterText" );
+constexpr OUStringLiteral gsFooterOn( u"FooterIsOn" );
+constexpr OUStringLiteral gsFooterShareContent( u"FooterIsShared" );
+constexpr OUStringLiteral gsFooterTextFirst( u"FooterTextFirst" );
+constexpr OUStringLiteral gsFooterTextLeft( u"FooterTextLeft" );
XMLTextMasterPageExport::XMLTextMasterPageExport( SvXMLExport& rExp ) :
XMLPageExport( rExp )
diff --git a/xmloff/source/text/XMLTextShapeImportHelper.cxx b/xmloff/source/text/XMLTextShapeImportHelper.cxx
index 78488da2099b..506ad146e4ff 100644
--- a/xmloff/source/text/XMLTextShapeImportHelper.cxx
+++ b/xmloff/source/text/XMLTextShapeImportHelper.cxx
@@ -41,9 +41,9 @@ using namespace ::com::sun::star::text;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::xml::sax;
-const OUStringLiteral gsAnchorType(u"AnchorType");
-const OUStringLiteral gsAnchorPageNo(u"AnchorPageNo");
-const OUStringLiteral gsVertOrientPosition(u"VertOrientPosition");
+constexpr OUStringLiteral gsAnchorType(u"AnchorType");
+constexpr OUStringLiteral gsAnchorPageNo(u"AnchorPageNo");
+constexpr OUStringLiteral gsVertOrientPosition(u"VertOrientPosition");
XMLTextShapeImportHelper::XMLTextShapeImportHelper(
SvXMLImport& rImp ) :
diff --git a/xmloff/source/text/XMLTextShapeStyleContext.cxx b/xmloff/source/text/XMLTextShapeStyleContext.cxx
index a7c7049c025d..27accc1ed1c2 100644
--- a/xmloff/source/text/XMLTextShapeStyleContext.cxx
+++ b/xmloff/source/text/XMLTextShapeStyleContext.cxx
@@ -134,7 +134,7 @@ void XMLTextShapeStyleContext::SetAttribute( sal_uInt16 nPrefixKey,
}
-const OUStringLiteral gsIsAutoUpdate( u"IsAutoUpdate" );
+constexpr OUStringLiteral gsIsAutoUpdate( u"IsAutoUpdate" );
XMLTextShapeStyleContext::XMLTextShapeStyleContext( SvXMLImport& rImport,
SvXMLStylesContext& rStyles, XmlStyleFamily nFamily ) :
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index fa4c6541d00a..f4d32a263144 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -295,78 +295,78 @@ static Sequence<OUString> GetStringSequenceProperty(
// service names
-const OUStringLiteral gsServicePrefix(u"com.sun.star.text.textfield.");
-const OUStringLiteral gsFieldMasterPrefix(u"com.sun.star.text.FieldMaster.");
-const OUStringLiteral gsPresentationServicePrefix(u"com.sun.star.presentation.TextField.");
+constexpr OUStringLiteral gsServicePrefix(u"com.sun.star.text.textfield.");
+constexpr OUStringLiteral gsFieldMasterPrefix(u"com.sun.star.text.FieldMaster.");
+constexpr OUStringLiteral gsPresentationServicePrefix(u"com.sun.star.presentation.TextField.");
// property names
-const OUStringLiteral gsPropertyAdjust(u"Adjust");
-const OUStringLiteral gsPropertyAuthor(u"Author");
-const OUStringLiteral gsPropertyChapterFormat(u"ChapterFormat");
-const OUStringLiteral gsPropertyChapterNumberingLevel(u"ChapterNumberingLevel");
-const OUStringLiteral gsPropertyCharStyleNames(u"CharStyleNames");
-const OUStringLiteral gsPropertyCondition(u"Condition");
-const OUStringLiteral gsPropertyContent(u"Content");
-const OUStringLiteral gsPropertyDataBaseName(u"DataBaseName");
-const OUStringLiteral gsPropertyDataBaseURL(u"DataBaseURL");
-const OUStringLiteral gsPropertyDataColumnName(u"DataColumnName");
-const OUStringLiteral gsPropertyDataCommandType(u"DataCommandType");
-const OUStringLiteral gsPropertyDataTableName(u"DataTableName");
-const OUStringLiteral gsPropertyDateTime(u"DateTime");
-const OUStringLiteral gsPropertyDateTimeValue(u"DateTimeValue");
-const OUStringLiteral gsPropertyDDECommandElement(u"DDECommandElement");
-const OUStringLiteral gsPropertyDDECommandFile(u"DDECommandFile");
-const OUStringLiteral gsPropertyDDECommandType(u"DDECommandType");
-const OUStringLiteral gsPropertyDependentTextFields(u"DependentTextFields");
-const OUStringLiteral gsPropertyFalseContent(u"FalseContent");
-const OUStringLiteral gsPropertyFields(u"Fields");
-const OUStringLiteral gsPropertyFieldSubType(u"UserDataType");
-const OUStringLiteral gsPropertyFileFormat(u"FileFormat");
-const OUStringLiteral gsPropertyFullName(u"FullName");
-const OUStringLiteral gsPropertyHint(u"Hint");
-const OUStringLiteral gsPropertyInitials(u"Initials");
-const OUStringLiteral gsPropertyInstanceName(u"InstanceName");
-const OUStringLiteral gsPropertyIsAutomaticUpdate(u"IsAutomaticUpdate");
-const OUStringLiteral gsPropertyIsConditionTrue(u"IsConditionTrue");
-const OUStringLiteral gsPropertyIsDataBaseFormat(u"DataBaseFormat");
-const OUStringLiteral gsPropertyIsDate(u"IsDate");
-const OUStringLiteral gsPropertyIsExpression(u"IsExpression");
-const OUStringLiteral gsPropertyIsFixed(u"IsFixed");
-const OUStringLiteral gsPropertyIsFixedLanguage(u"IsFixedLanguage");
-const OUStringLiteral gsPropertyIsHidden(u"IsHidden");
-const OUStringLiteral gsPropertyIsInput(u"Input");
-const OUStringLiteral gsPropertyIsShowFormula(u"IsShowFormula");
-const OUStringLiteral gsPropertyIsVisible(u"IsVisible");
-const OUStringLiteral gsPropertyItems(u"Items");
-const OUStringLiteral gsPropertyLevel(u"Level");
-const OUStringLiteral gsPropertyMeasureKind(u"Kind");
-const OUStringLiteral gsPropertyName(u"Name");
-const OUStringLiteral gsPropertyNumberFormat(u"NumberFormat");
-const OUStringLiteral gsPropertyNumberingSeparator(u"NumberingSeparator");
-const OUStringLiteral gsPropertyNumberingType(u"NumberingType");
-const OUStringLiteral gsPropertyOffset(u"Offset");
-const OUStringLiteral gsPropertyOn(u"On");
-const OUStringLiteral gsPropertyPlaceholderType(u"PlaceHolderType");
-const OUStringLiteral gsPropertyReferenceFieldPart(u"ReferenceFieldPart");
-const OUStringLiteral gsPropertyReferenceFieldSource(u"ReferenceFieldSource");
-const OUStringLiteral gsPropertyReferenceFieldLanguage(u"ReferenceFieldLanguage");
-const OUStringLiteral gsPropertyScriptType(u"ScriptType");
-const OUStringLiteral gsPropertySelectedItem(u"SelectedItem");
-const OUStringLiteral gsPropertySequenceNumber(u"SequenceNumber");
-const OUStringLiteral gsPropertySequenceValue(u"SequenceValue");
-const OUStringLiteral gsPropertySetNumber(u"SetNumber");
-const OUStringLiteral gsPropertySourceName(u"SourceName");
-const OUStringLiteral gsPropertySubType(u"SubType");
-const OUStringLiteral gsPropertyTargetFrame(u"TargetFrame");
-const OUStringLiteral gsPropertyTrueContent(u"TrueContent");
-const OUStringLiteral gsPropertyURL(u"URL");
-const OUStringLiteral gsPropertyURLContent(u"URLContent");
-const OUStringLiteral gsPropertyUserText(u"UserText");
-const OUStringLiteral gsPropertyValue(u"Value");
-const OUStringLiteral gsPropertyVariableName(u"VariableName");
-const OUStringLiteral gsPropertyHelp(u"Help");
-const OUStringLiteral gsPropertyTooltip(u"Tooltip");
-const OUStringLiteral gsPropertyTextRange(u"TextRange");
+constexpr OUStringLiteral gsPropertyAdjust(u"Adjust");
+constexpr OUStringLiteral gsPropertyAuthor(u"Author");
+constexpr OUStringLiteral gsPropertyChapterFormat(u"ChapterFormat");
+constexpr OUStringLiteral gsPropertyChapterNumberingLevel(u"ChapterNumberingLevel");
+constexpr OUStringLiteral gsPropertyCharStyleNames(u"CharStyleNames");
+constexpr OUStringLiteral gsPropertyCondition(u"Condition");
+constexpr OUStringLiteral gsPropertyContent(u"Content");
+constexpr OUStringLiteral gsPropertyDataBaseName(u"DataBaseName");
+constexpr OUStringLiteral gsPropertyDataBaseURL(u"DataBaseURL");
+constexpr OUStringLiteral gsPropertyDataColumnName(u"DataColumnName");
+constexpr OUStringLiteral gsPropertyDataCommandType(u"DataCommandType");
+constexpr OUStringLiteral gsPropertyDataTableName(u"DataTableName");
+constexpr OUStringLiteral gsPropertyDateTime(u"DateTime");
+constexpr OUStringLiteral gsPropertyDateTimeValue(u"DateTimeValue");
+constexpr OUStringLiteral gsPropertyDDECommandElement(u"DDECommandElement");
+constexpr OUStringLiteral gsPropertyDDECommandFile(u"DDECommandFile");
+constexpr OUStringLiteral gsPropertyDDECommandType(u"DDECommandType");
+constexpr OUStringLiteral gsPropertyDependentTextFields(u"DependentTextFields");
+constexpr OUStringLiteral gsPropertyFalseContent(u"FalseContent");
+constexpr OUStringLiteral gsPropertyFields(u"Fields");
+constexpr OUStringLiteral gsPropertyFieldSubType(u"UserDataType");
+constexpr OUStringLiteral gsPropertyFileFormat(u"FileFormat");
+constexpr OUStringLiteral gsPropertyFullName(u"FullName");
+constexpr OUStringLiteral gsPropertyHint(u"Hint");
+constexpr OUStringLiteral gsPropertyInitials(u"Initials");
+constexpr OUStringLiteral gsPropertyInstanceName(u"InstanceName");
+constexpr OUStringLiteral gsPropertyIsAutomaticUpdate(u"IsAutomaticUpdate");
+constexpr OUStringLiteral gsPropertyIsConditionTrue(u"IsConditionTrue");
+constexpr OUStringLiteral gsPropertyIsDataBaseFormat(u"DataBaseFormat");
+constexpr OUStringLiteral gsPropertyIsDate(u"IsDate");
+constexpr OUStringLiteral gsPropertyIsExpression(u"IsExpression");
+constexpr OUStringLiteral gsPropertyIsFixed(u"IsFixed");
+constexpr OUStringLiteral gsPropertyIsFixedLanguage(u"IsFixedLanguage");
+constexpr OUStringLiteral gsPropertyIsHidden(u"IsHidden");
+constexpr OUStringLiteral gsPropertyIsInput(u"Input");
+constexpr OUStringLiteral gsPropertyIsShowFormula(u"IsShowFormula");
+constexpr OUStringLiteral gsPropertyIsVisible(u"IsVisible");
+constexpr OUStringLiteral gsPropertyItems(u"Items");
+constexpr OUStringLiteral gsPropertyLevel(u"Level");
+constexpr OUStringLiteral gsPropertyMeasureKind(u"Kind");
+constexpr OUStringLiteral gsPropertyName(u"Name");
+constexpr OUStringLiteral gsPropertyNumberFormat(u"NumberFormat");
+constexpr OUStringLiteral gsPropertyNumberingSeparator(u"NumberingSeparator");
+constexpr OUStringLiteral gsPropertyNumberingType(u"NumberingType");
+constexpr OUStringLiteral gsPropertyOffset(u"Offset");
+constexpr OUStringLiteral gsPropertyOn(u"On");
+constexpr OUStringLiteral gsPropertyPlaceholderType(u"PlaceHolderType");
+constexpr OUStringLiteral gsPropertyReferenceFieldPart(u"ReferenceFieldPart");
+constexpr OUStringLiteral gsPropertyReferenceFieldSource(u"ReferenceFieldSource");
+constexpr OUStringLiteral gsPropertyReferenceFieldLanguage(u"ReferenceFieldLanguage");
+constexpr OUStringLiteral gsPropertyScriptType(u"ScriptType");
+constexpr OUStringLiteral gsPropertySelectedItem(u"SelectedItem");
+constexpr OUStringLiteral gsPropertySequenceNumber(u"SequenceNumber");
+constexpr OUStringLiteral gsPropertySequenceValue(u"SequenceValue");
+constexpr OUStringLiteral gsPropertySetNumber(u"SetNumber");
+constexpr OUStringLiteral gsPropertySourceName(u"SourceName");
+constexpr OUStringLiteral gsPropertySubType(u"SubType");
+constexpr OUStringLiteral gsPropertyTargetFrame(u"TargetFrame");
+constexpr OUStringLiteral gsPropertyTrueContent(u"TrueContent");
+constexpr OUStringLiteral gsPropertyURL(u"URL");
+constexpr OUStringLiteral gsPropertyURLContent(u"URLContent");
+constexpr OUStringLiteral gsPropertyUserText(u"UserText");
+constexpr OUStringLiteral gsPropertyValue(u"Value");
+constexpr OUStringLiteral gsPropertyVariableName(u"VariableName");
+constexpr OUStringLiteral gsPropertyHelp(u"Help");
+constexpr OUStringLiteral gsPropertyTooltip(u"Tooltip");
+constexpr OUStringLiteral gsPropertyTextRange(u"TextRange");
XMLTextFieldExport::XMLTextFieldExport( SvXMLExport& rExp,
std::unique_ptr<XMLPropertyState> pCombinedCharState)
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 958ebd6b4a92..ff54d40bc0f9 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -535,7 +535,7 @@ void XMLTextFieldImportContext::ForceUpdate(
// XMLSenderFieldImportContext
-const OUStringLiteral gsPropertyFieldSubType(u"UserDataType");
+constexpr OUStringLiteral gsPropertyFieldSubType(u"UserDataType");
XMLSenderFieldImportContext::XMLSenderFieldImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp,
@@ -654,7 +654,7 @@ void XMLSenderFieldImportContext::PrepareField(
// XMLAuthorFieldImportContext
-const OUStringLiteral gsPropertyAuthorFullName(u"FullName");
+constexpr OUStringLiteral gsPropertyAuthorFullName(u"FullName");
XMLAuthorFieldImportContext::XMLAuthorFieldImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp,
@@ -727,7 +727,7 @@ SvXMLEnumMapEntry<PageNumberType> const lcl_aSelectPageAttrMap[] =
{ XML_TOKEN_INVALID, PageNumberType(0) },
};
-const OUStringLiteral gsPropertyUserText(u"UserText");
+constexpr OUStringLiteral gsPropertyUserText(u"UserText");
XMLPageContinuationImportContext::XMLPageContinuationImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx,
@@ -878,8 +878,8 @@ void XMLPageNumberImportContext::PrepareField(
// Placeholder
-const OUStringLiteral gsPropertyPlaceholderType(u"PlaceHolderType");
-const OUStringLiteral gsPropertyPlaceholder(u"PlaceHolder");
+constexpr OUStringLiteral gsPropertyPlaceholderType(u"PlaceHolderType");
+constexpr OUStringLiteral gsPropertyPlaceholder(u"PlaceHolder");
XMLPlaceholderFieldImportContext::XMLPlaceholderFieldImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp,
@@ -960,7 +960,7 @@ void XMLPlaceholderFieldImportContext::PrepareField(
// time field
-const OUStringLiteral gsPropertyAdjust(u"Adjust");
+constexpr OUStringLiteral gsPropertyAdjust(u"Adjust");
XMLTimeFieldImportContext::XMLTimeFieldImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp,
@@ -1136,11 +1136,11 @@ void XMLDateFieldImportContext::ProcessAttribute(
// database field superclass
-const OUStringLiteral gsPropertyDataBaseName(u"DataBaseName");
-const OUStringLiteral gsPropertyDataBaseURL(u"DataBaseURL");
-const OUStringLiteral gsPropertyTableName(u"DataTableName");
-const OUStringLiteral gsPropertyDataCommandType(u"DataCommandType");
-const OUStringLiteral gsPropertyIsVisible(u"IsVisible");
+constexpr OUStringLiteral gsPropertyDataBaseName(u"DataBaseName");
+constexpr OUStringLiteral gsPropertyDataBaseURL(u"DataBaseURL");
+constexpr OUStringLiteral gsPropertyTableName(u"DataTableName");
+constexpr OUStringLiteral gsPropertyDataCommandType(u"DataCommandType");
+constexpr OUStringLiteral gsPropertyIsVisible(u"IsVisible");
XMLDatabaseFieldImportContext::XMLDatabaseFieldImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp,
@@ -1604,7 +1604,7 @@ const char* XMLSimpleDocInfoImportContext::MapTokenToServiceName(
// revision field
-const OUStringLiteral sPropertyRevision(u"Revision");
+constexpr OUStringLiteral sPropertyRevision(u"Revision");
XMLRevisionDocInfoImportContext::XMLRevisionDocInfoImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx,
@@ -1874,9 +1874,9 @@ void XMLHiddenParagraphImportContext::PrepareField(
// import conditional text (<text:conditional-text>)
-const OUStringLiteral gsPropertyTrueContent(u"TrueContent");
-const OUStringLiteral gsPropertyFalseContent(u"FalseContent");
-const OUStringLiteral gsPropertyIsConditionTrue(u"IsConditionTrue");
+constexpr OUStringLiteral gsPropertyTrueContent(u"TrueContent");
+constexpr OUStringLiteral gsPropertyFalseContent(u"FalseContent");
+constexpr OUStringLiteral gsPropertyIsConditionTrue(u"IsConditionTrue");
XMLConditionalTextImportContext::XMLConditionalTextImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp,
@@ -2159,8 +2159,8 @@ const SvXMLEnumMapEntry<sal_uInt16> aChapterDisplayMap[] =
{ XML_TOKEN_INVALID, 0 }
};
-const OUStringLiteral gsPropertyChapterFormat(u"ChapterFormat");
-const OUStringLiteral gsPropertyLevel(u"Level");
+constexpr OUStringLiteral gsPropertyChapterFormat(u"ChapterFormat");
+constexpr OUStringLiteral gsPropertyLevel(u"Level");
XMLChapterImportContext::XMLChapterImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp,
diff --git a/xmlscript/source/xml_helper/xml_impctx.cxx b/xmlscript/source/xml_helper/xml_impctx.cxx
index d1435eeef9f3..1520235c26c6 100644
--- a/xmlscript/source/xml_helper/xml_impctx.cxx
+++ b/xmlscript/source/xml_helper/xml_impctx.cxx
@@ -160,8 +160,8 @@ public:
}
-OUStringLiteral const g_sXMLNS_PREFIX_UNKNOWN( u"<<< unknown prefix >>>" );
-OUStringLiteral const g_sXMLNS( u"xmlns" );
+constexpr OUStringLiteral g_sXMLNS_PREFIX_UNKNOWN( u"<<< unknown prefix >>>" );
+constexpr OUStringLiteral g_sXMLNS( u"xmlns" );
DocumentHandlerImpl::DocumentHandlerImpl(