summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-01-08 19:54:55 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-01-09 13:01:49 +0100
commitac396f2f6b058ddff8c394443669b8c5d8b97b71 (patch)
treefc5120838a69ced58c3cd2333718ffeb6d4adf67 /framework
parent0c20b68149797c8b0779534a8e0cb9045085d451 (diff)
fix coverity parse errors
Change-Id: I3a1179947704452e3ffec02be59d0f7bf0b75ab0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109017 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'framework')
-rw-r--r--framework/inc/taskcreatordefs.hxx17
-rw-r--r--framework/source/accelerators/acceleratorconfiguration.cxx4
-rw-r--r--framework/source/fwe/xml/menudocumenthandler.cxx12
-rw-r--r--framework/source/fwe/xml/toolboxdocumenthandler.cxx10
-rw-r--r--framework/source/fwi/uielement/constitemcontainer.cxx2
-rw-r--r--framework/source/fwi/uielement/itemcontainer.cxx2
-rw-r--r--framework/source/fwi/uielement/rootitemcontainer.cxx4
-rw-r--r--framework/source/helper/statusindicatorfactory.cxx2
-rw-r--r--framework/source/helper/uiconfigelementwrapperbase.cxx16
-rw-r--r--framework/source/helper/uielementwrapperbase.cxx6
-rw-r--r--framework/source/inc/accelerators/acceleratorconfiguration.hxx6
-rw-r--r--framework/source/jobs/jobexecutor.cxx4
-rw-r--r--framework/source/layoutmanager/layoutmanager.cxx2
-rw-r--r--framework/source/loadenv/loadenv.cxx4
-rw-r--r--framework/source/services/autorecovery.cxx52
-rw-r--r--framework/source/uiconfiguration/imagemanagerimpl.cxx4
-rw-r--r--framework/source/uielement/recentfilesmenucontroller.cxx6
-rw-r--r--framework/source/uielement/toolbarsmenucontroller.cxx4
-rw-r--r--framework/source/uielement/uicommanddescription.cxx2
19 files changed, 80 insertions, 79 deletions
diff --git a/framework/inc/taskcreatordefs.hxx b/framework/inc/taskcreatordefs.hxx
index 02b85221c801..df56779d4699 100644
--- a/framework/inc/taskcreatordefs.hxx
+++ b/framework/inc/taskcreatordefs.hxx
@@ -21,38 +21,39 @@
#define INCLUDED_FRAMEWORK_INC_TASKCREATORDEFS_HXX
/// [XFrame] if it's set, it will be used as parent frame for the new created frame.
-const OUStringLiteral ARGUMENT_PARENTFRAME = u"ParentFrame"; // XFrame
+constexpr OUStringLiteral ARGUMENT_PARENTFRAME = u"ParentFrame"; // XFrame
/** [OUString] if it's not a special name (beginning with "_" ... which are not allowed here!)
it will be set as the API name of the new created frame.
*/
-const OUStringLiteral ARGUMENT_FRAMENAME = u"FrameName"; // OUString
+constexpr OUStringLiteral ARGUMENT_FRAMENAME = u"FrameName"; // OUString
/// [sal_Bool] If it's set to sal_True we will make the new created frame visible.
-const OUStringLiteral ARGUMENT_MAKEVISIBLE = u"MakeVisible"; // sal_Bool
+constexpr OUStringLiteral ARGUMENT_MAKEVISIBLE = u"MakeVisible"; // sal_Bool
/** [sal_Bool] If not "ContainerWindow" property is set it force creation of a
top level window as new container window.
*/
-const OUStringLiteral ARGUMENT_CREATETOPWINDOW = u"CreateTopWindow"; // sal_Bool
+constexpr OUStringLiteral ARGUMENT_CREATETOPWINDOW = u"CreateTopWindow"; // sal_Bool
/// [Rectangle] Place the new created frame on this place and resize the container window.
-inline const OUStringLiteral ARGUMENT_POSSIZE = u"PosSize"; // Rectangle
+inline constexpr OUStringLiteral ARGUMENT_POSSIZE = u"PosSize"; // Rectangle
/// [XWindow] an outside created window, used as container window of the new created frame.
-inline const OUStringLiteral ARGUMENT_CONTAINERWINDOW = u"ContainerWindow"; // XWindow
+inline constexpr OUStringLiteral ARGUMENT_CONTAINERWINDOW = u"ContainerWindow"; // XWindow
/** [sal_Bool] enable/disable special mode, where this frame will be part of
the persistent window state feature suitable for any office module window
*/
-const OUStringLiteral ARGUMENT_SUPPORTPERSISTENTWINDOWSTATE
+constexpr OUStringLiteral ARGUMENT_SUPPORTPERSISTENTWINDOWSTATE
= u"SupportPersistentWindowState"; // sal_Bool
/** [sal_Bool] enable/disable special mode, where the title bar of our
the new created frame will be updated automatically.
Default = ON !
*/
-inline const OUStringLiteral ARGUMENT_ENABLE_TITLEBARUPDATE = u"EnableTitleBarUpdate"; // sal_Bool
+inline constexpr OUStringLiteral ARGUMENT_ENABLE_TITLEBARUPDATE
+ = u"EnableTitleBarUpdate"; // sal_Bool
#endif // INCLUDED_FRAMEWORK_INC_TASKCREATORDEFS_HXX
diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx
index eb01a00c5291..85edc3833025 100644
--- a/framework/source/accelerators/acceleratorconfiguration.cxx
+++ b/framework/source/accelerators/acceleratorconfiguration.cxx
@@ -57,8 +57,8 @@
namespace framework
{
- const OUStringLiteral CFG_ENTRY_SECONDARY = u"SecondaryKeys";
- const OUStringLiteral CFG_PROP_COMMAND = u"Command";
+ constexpr OUStringLiteral CFG_ENTRY_SECONDARY = u"SecondaryKeys";
+ constexpr OUStringLiteral CFG_PROP_COMMAND = u"Command";
static OUString lcl_getKeyString(const css::awt::KeyEvent& aKeyEvent)
{
diff --git a/framework/source/fwe/xml/menudocumenthandler.cxx b/framework/source/fwe/xml/menudocumenthandler.cxx
index ad55be6dd213..dbc6f7a22444 100644
--- a/framework/source/fwe/xml/menudocumenthandler.cxx
+++ b/framework/source/fwe/xml/menudocumenthandler.cxx
@@ -72,12 +72,12 @@
#define ATTRIBUTE_ITEMSTYLE_RADIO "radio"
// Property names of a menu/menu item ItemDescriptor
-const OUStringLiteral ITEM_DESCRIPTOR_COMMANDURL = u"CommandURL";
-const OUStringLiteral ITEM_DESCRIPTOR_HELPURL = u"HelpURL";
-const OUStringLiteral ITEM_DESCRIPTOR_CONTAINER = u"ItemDescriptorContainer";
-const OUStringLiteral ITEM_DESCRIPTOR_LABEL = u"Label";
-const OUStringLiteral ITEM_DESCRIPTOR_TYPE = u"Type";
-const OUStringLiteral ITEM_DESCRIPTOR_STYLE = u"Style";
+constexpr OUStringLiteral ITEM_DESCRIPTOR_COMMANDURL = u"CommandURL";
+constexpr OUStringLiteral ITEM_DESCRIPTOR_HELPURL = u"HelpURL";
+constexpr OUStringLiteral ITEM_DESCRIPTOR_CONTAINER = u"ItemDescriptorContainer";
+constexpr OUStringLiteral ITEM_DESCRIPTOR_LABEL = u"Label";
+constexpr OUStringLiteral ITEM_DESCRIPTOR_TYPE = u"Type";
+constexpr OUStringLiteral ITEM_DESCRIPTOR_STYLE = u"Style";
// using namespaces
diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
index a829e03ad20d..8d7b9835c3f4 100644
--- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx
+++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
@@ -48,11 +48,11 @@ namespace framework
{
// Property names of a menu/menu item ItemDescriptor
-const OUStringLiteral ITEM_DESCRIPTOR_COMMANDURL = u"CommandURL";
-const OUStringLiteral ITEM_DESCRIPTOR_LABEL = u"Label";
-const OUStringLiteral ITEM_DESCRIPTOR_TYPE = u"Type";
-const OUStringLiteral ITEM_DESCRIPTOR_STYLE = u"Style";
-const OUStringLiteral ITEM_DESCRIPTOR_VISIBLE = u"IsVisible";
+constexpr OUStringLiteral ITEM_DESCRIPTOR_COMMANDURL = u"CommandURL";
+constexpr OUStringLiteral ITEM_DESCRIPTOR_LABEL = u"Label";
+constexpr OUStringLiteral ITEM_DESCRIPTOR_TYPE = u"Type";
+constexpr OUStringLiteral ITEM_DESCRIPTOR_STYLE = u"Style";
+constexpr OUStringLiteral ITEM_DESCRIPTOR_VISIBLE = u"IsVisible";
static void ExtractToolbarParameters( const Sequence< PropertyValue >& rProp,
OUString& rCommandURL,
diff --git a/framework/source/fwi/uielement/constitemcontainer.cxx b/framework/source/fwi/uielement/constitemcontainer.cxx
index 212f0a80e24b..e02fb7aa3d9a 100644
--- a/framework/source/fwi/uielement/constitemcontainer.cxx
+++ b/framework/source/fwi/uielement/constitemcontainer.cxx
@@ -33,7 +33,7 @@ using namespace com::sun::star::beans;
using namespace com::sun::star::container;
const int PROPHANDLE_UINAME = 1;
-const OUStringLiteral PROPNAME_UINAME = u"UIName";
+constexpr OUStringLiteral PROPNAME_UINAME = u"UIName";
namespace framework
{
diff --git a/framework/source/fwi/uielement/itemcontainer.cxx b/framework/source/fwi/uielement/itemcontainer.cxx
index 55f6ccecfd50..de2b047653ab 100644
--- a/framework/source/fwi/uielement/itemcontainer.cxx
+++ b/framework/source/fwi/uielement/itemcontainer.cxx
@@ -30,7 +30,7 @@ using namespace com::sun::star::lang;
using namespace com::sun::star::beans;
using namespace com::sun::star::container;
-const OUStringLiteral WRONG_TYPE_EXCEPTION
+constexpr OUStringLiteral WRONG_TYPE_EXCEPTION
= u"Type must be css::uno::Sequence< css::beans::PropertyValue >";
namespace framework
diff --git a/framework/source/fwi/uielement/rootitemcontainer.cxx b/framework/source/fwi/uielement/rootitemcontainer.cxx
index 0016789d2da6..b570154f2eb0 100644
--- a/framework/source/fwi/uielement/rootitemcontainer.cxx
+++ b/framework/source/fwi/uielement/rootitemcontainer.cxx
@@ -33,11 +33,11 @@ using namespace com::sun::star::lang;
using namespace com::sun::star::beans;
using namespace com::sun::star::container;
-const OUStringLiteral WRONG_TYPE_EXCEPTION
+constexpr OUStringLiteral WRONG_TYPE_EXCEPTION
= u"Type must be css::uno::Sequence< css::beans::PropertyValue >";
const int PROPHANDLE_UINAME = 1;
-const OUStringLiteral PROPNAME_UINAME = u"UIName";
+constexpr OUStringLiteral PROPNAME_UINAME = u"UIName";
namespace framework
{
diff --git a/framework/source/helper/statusindicatorfactory.cxx b/framework/source/helper/statusindicatorfactory.cxx
index ce923b2f9e55..62efba05933f 100644
--- a/framework/source/helper/statusindicatorfactory.cxx
+++ b/framework/source/helper/statusindicatorfactory.cxx
@@ -48,7 +48,7 @@ struct RescheduleLock: public rtl::Static<osl::Mutex, RescheduleLock> {}; ///< m
}
-const OUStringLiteral PROGRESS_RESOURCE = u"private:resource/progressbar/progressbar";
+constexpr OUStringLiteral PROGRESS_RESOURCE = u"private:resource/progressbar/progressbar";
StatusIndicatorFactory::StatusIndicatorFactory(const css::uno::Reference< css::uno::XComponentContext >& xContext)
: m_xContext (xContext )
diff --git a/framework/source/helper/uiconfigelementwrapperbase.cxx b/framework/source/helper/uiconfigelementwrapperbase.cxx
index f27c51186f30..399bf8bc9d8c 100644
--- a/framework/source/helper/uiconfigelementwrapperbase.cxx
+++ b/framework/source/helper/uiconfigelementwrapperbase.cxx
@@ -37,14 +37,14 @@ const int UIELEMENT_PROPHANDLE_TYPE = 5;
const int UIELEMENT_PROPHANDLE_XMENUBAR = 6;
const int UIELEMENT_PROPHANDLE_CONFIGLISTENER = 7;
const int UIELEMENT_PROPHANDLE_NOCLOSE = 8;
-const OUStringLiteral UIELEMENT_PROPNAME_CONFIGLISTENER = u"ConfigListener";
-const OUStringLiteral UIELEMENT_PROPNAME_CONFIGSOURCE = u"ConfigurationSource";
-const OUStringLiteral UIELEMENT_PROPNAME_FRAME = u"Frame";
-const OUStringLiteral UIELEMENT_PROPNAME_PERSISTENT = u"Persistent";
-const OUStringLiteral UIELEMENT_PROPNAME_RESOURCEURL = u"ResourceURL";
-const OUStringLiteral UIELEMENT_PROPNAME_TYPE = u"Type";
-const OUStringLiteral UIELEMENT_PROPNAME_XMENUBAR = u"XMenuBar";
-const OUStringLiteral UIELEMENT_PROPNAME_NOCLOSE = u"NoClose";
+constexpr OUStringLiteral UIELEMENT_PROPNAME_CONFIGLISTENER = u"ConfigListener";
+constexpr OUStringLiteral UIELEMENT_PROPNAME_CONFIGSOURCE = u"ConfigurationSource";
+constexpr OUStringLiteral UIELEMENT_PROPNAME_FRAME = u"Frame";
+constexpr OUStringLiteral UIELEMENT_PROPNAME_PERSISTENT = u"Persistent";
+constexpr OUStringLiteral UIELEMENT_PROPNAME_RESOURCEURL = u"ResourceURL";
+constexpr OUStringLiteral UIELEMENT_PROPNAME_TYPE = u"Type";
+constexpr OUStringLiteral UIELEMENT_PROPNAME_XMENUBAR = u"XMenuBar";
+constexpr OUStringLiteral UIELEMENT_PROPNAME_NOCLOSE = u"NoClose";
using namespace com::sun::star::beans;
using namespace com::sun::star::uno;
using namespace com::sun::star::frame;
diff --git a/framework/source/helper/uielementwrapperbase.cxx b/framework/source/helper/uielementwrapperbase.cxx
index 06db2788beac..829e4f9523eb 100644
--- a/framework/source/helper/uielementwrapperbase.cxx
+++ b/framework/source/helper/uielementwrapperbase.cxx
@@ -28,9 +28,9 @@
const int UIELEMENT_PROPHANDLE_RESOURCEURL = 1;
const int UIELEMENT_PROPHANDLE_TYPE = 2;
const int UIELEMENT_PROPHANDLE_FRAME = 3;
-const OUStringLiteral UIELEMENT_PROPNAME_RESOURCEURL = u"ResourceURL";
-const OUStringLiteral UIELEMENT_PROPNAME_TYPE = u"Type";
-const OUStringLiteral UIELEMENT_PROPNAME_FRAME = u"Frame";
+constexpr OUStringLiteral UIELEMENT_PROPNAME_RESOURCEURL = u"ResourceURL";
+constexpr OUStringLiteral UIELEMENT_PROPNAME_TYPE = u"Type";
+constexpr OUStringLiteral UIELEMENT_PROPNAME_FRAME = u"Frame";
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
diff --git a/framework/source/inc/accelerators/acceleratorconfiguration.hxx b/framework/source/inc/accelerators/acceleratorconfiguration.hxx
index 38d9eaff9e98..df7bed019ff2 100644
--- a/framework/source/inc/accelerators/acceleratorconfiguration.hxx
+++ b/framework/source/inc/accelerators/acceleratorconfiguration.hxx
@@ -44,9 +44,9 @@
namespace framework
{
-inline const OUStringLiteral CFG_ENTRY_PRIMARY = u"PrimaryKeys";
-inline const OUStringLiteral CFG_ENTRY_GLOBAL = u"Global";
-inline const OUStringLiteral CFG_ENTRY_MODULES = u"Modules";
+inline constexpr OUStringLiteral CFG_ENTRY_PRIMARY = u"PrimaryKeys";
+inline constexpr OUStringLiteral CFG_ENTRY_GLOBAL = u"Global";
+inline constexpr OUStringLiteral CFG_ENTRY_MODULES = u"Modules";
/**
implements a read/write access to the accelerator configuration.
diff --git a/framework/source/jobs/jobexecutor.cxx b/framework/source/jobs/jobexecutor.cxx
index c90a8f56a1ed..30b90cca6ec4 100644
--- a/framework/source/jobs/jobexecutor.cxx
+++ b/framework/source/jobs/jobexecutor.cxx
@@ -241,8 +241,8 @@ void SAL_CALL JobExecutor::trigger( const OUString& sEvent )
void SAL_CALL JobExecutor::notifyEvent( const css::document::EventObject& aEvent )
{
- static const OUStringLiteral EVENT_ON_DOCUMENT_OPENED(u"onDocumentOpened"); // Job UI event : OnNew or OnLoad
- static const OUStringLiteral EVENT_ON_DOCUMENT_ADDED(u"onDocumentAdded"); // Job API event : OnCreate or OnLoadFinished
+ static constexpr OUStringLiteral EVENT_ON_DOCUMENT_OPENED(u"onDocumentOpened"); // Job UI event : OnNew or OnLoad
+ static constexpr OUStringLiteral EVENT_ON_DOCUMENT_ADDED(u"onDocumentAdded"); // Job API event : OnCreate or OnLoadFinished
OUString aModuleIdentifier;
::std::vector< JobData::TJob2DocEventBinding > lJobs;
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 6090cb0f9646..e080497b066b 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -76,7 +76,7 @@ using namespace ::com::sun::star::container;
using namespace ::com::sun::star::ui;
using namespace ::com::sun::star::frame;
-const OUStringLiteral STATUS_BAR_ALIAS = u"private:resource/statusbar/statusbar";
+constexpr OUStringLiteral STATUS_BAR_ALIAS = u"private:resource/statusbar/statusbar";
namespace framework
{
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index c24e65959cfb..159247cb2d29 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -91,8 +91,8 @@
#include <classes/taskcreator.hxx>
#include <tools/fileutil.hxx>
-const OUStringLiteral PROP_TYPES = u"Types";
-const OUStringLiteral PROP_NAME = u"Name";
+constexpr OUStringLiteral PROP_TYPES = u"Types";
+constexpr OUStringLiteral PROP_NAME = u"Name";
namespace framework {
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 10b8574d6155..76594a4ec5f3 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -995,30 +995,30 @@ private:
};
// recovery.xcu
-const OUStringLiteral CFG_PACKAGE_RECOVERY = u"org.openoffice.Office.Recovery/";
+constexpr OUStringLiteral CFG_PACKAGE_RECOVERY = u"org.openoffice.Office.Recovery/";
const char CFG_ENTRY_AUTOSAVE_ENABLED[] = "AutoSave/Enabled";
const char CFG_ENTRY_AUTOSAVE_TIMEINTERVALL[] = "AutoSave/TimeIntervall"; //sic!
-const OUStringLiteral CFG_ENTRY_REALDEFAULTFILTER = u"ooSetupFactoryActualFilter";
+constexpr OUStringLiteral CFG_ENTRY_REALDEFAULTFILTER = u"ooSetupFactoryActualFilter";
-const OUStringLiteral CFG_ENTRY_PROP_TEMPURL = u"TempURL";
-const OUStringLiteral CFG_ENTRY_PROP_ORIGINALURL = u"OriginalURL";
-const OUStringLiteral CFG_ENTRY_PROP_TEMPLATEURL = u"TemplateURL";
-const OUStringLiteral CFG_ENTRY_PROP_FACTORYURL = u"FactoryURL";
-const OUStringLiteral CFG_ENTRY_PROP_MODULE = u"Module";
-const OUStringLiteral CFG_ENTRY_PROP_DOCUMENTSTATE = u"DocumentState";
-const OUStringLiteral CFG_ENTRY_PROP_FILTER = u"Filter";
-const OUStringLiteral CFG_ENTRY_PROP_TITLE = u"Title";
-const OUStringLiteral CFG_ENTRY_PROP_ID = u"ID";
-const OUStringLiteral CFG_ENTRY_PROP_VIEWNAMES = u"ViewNames";
+constexpr OUStringLiteral CFG_ENTRY_PROP_TEMPURL = u"TempURL";
+constexpr OUStringLiteral CFG_ENTRY_PROP_ORIGINALURL = u"OriginalURL";
+constexpr OUStringLiteral CFG_ENTRY_PROP_TEMPLATEURL = u"TemplateURL";
+constexpr OUStringLiteral CFG_ENTRY_PROP_FACTORYURL = u"FactoryURL";
+constexpr OUStringLiteral CFG_ENTRY_PROP_MODULE = u"Module";
+constexpr OUStringLiteral CFG_ENTRY_PROP_DOCUMENTSTATE = u"DocumentState";
+constexpr OUStringLiteral CFG_ENTRY_PROP_FILTER = u"Filter";
+constexpr OUStringLiteral CFG_ENTRY_PROP_TITLE = u"Title";
+constexpr OUStringLiteral CFG_ENTRY_PROP_ID = u"ID";
+constexpr OUStringLiteral CFG_ENTRY_PROP_VIEWNAMES = u"ViewNames";
-const OUStringLiteral FILTER_PROP_TYPE = u"Type";
-const OUStringLiteral TYPE_PROP_EXTENSIONS = u"Extensions";
+constexpr OUStringLiteral FILTER_PROP_TYPE = u"Type";
+constexpr OUStringLiteral TYPE_PROP_EXTENSIONS = u"Extensions";
// setup.xcu
-const OUStringLiteral CFG_ENTRY_PROP_EMPTYDOCUMENTURL = u"ooSetupFactoryEmptyDocumentURL";
-const OUStringLiteral CFG_ENTRY_PROP_FACTORYSERVICE = u"ooSetupFactoryDocumentService";
+constexpr OUStringLiteral CFG_ENTRY_PROP_EMPTYDOCUMENTURL = u"ooSetupFactoryEmptyDocumentURL";
+constexpr OUStringLiteral CFG_ENTRY_PROP_FACTORYSERVICE = u"ooSetupFactoryDocumentService";
const char EVENT_ON_NEW[] = "OnNew";
const char EVENT_ON_LOAD[] = "OnLoad";
@@ -1034,7 +1034,7 @@ const char EVENT_ON_SAVEFAILED[] = "OnSaveFailed";
const char EVENT_ON_SAVEASFAILED[] = "OnSaveAsFailed";
const char EVENT_ON_SAVETOFAILED[] = "OnCopyToFailed";
-const OUStringLiteral RECOVERY_ITEM_BASE_IDENTIFIER = u"recovery_item_";
+constexpr OUStringLiteral RECOVERY_ITEM_BASE_IDENTIFIER = u"recovery_item_";
const char CMD_PROTOCOL[] = "vnd.sun.star.autorecovery:";
@@ -1050,17 +1050,17 @@ const char CMD_DO_SESSION_RESTORE[] = "/doSessionRestore"; // restore a saved
const char CMD_DO_DISABLE_RECOVERY[] = "/disableRecovery"; // disable recovery and auto save (!) temp. for this office session
const char CMD_DO_SET_AUTOSAVE_STATE[] = "/setAutoSaveState"; // disable/enable auto save (not crash save) for this office session
-const OUStringLiteral REFERRER_USER = u"private:user";
+constexpr OUStringLiteral REFERRER_USER = u"private:user";
-const OUStringLiteral PROP_DISPATCH_ASYNCHRON = u"DispatchAsynchron";
-const OUStringLiteral PROP_PROGRESS = u"StatusIndicator";
-const OUStringLiteral PROP_SAVEPATH = u"SavePath";
-const OUStringLiteral PROP_ENTRY_ID = u"EntryID";
-const OUStringLiteral PROP_AUTOSAVE_STATE = u"AutoSaveState";
+constexpr OUStringLiteral PROP_DISPATCH_ASYNCHRON = u"DispatchAsynchron";
+constexpr OUStringLiteral PROP_PROGRESS = u"StatusIndicator";
+constexpr OUStringLiteral PROP_SAVEPATH = u"SavePath";
+constexpr OUStringLiteral PROP_ENTRY_ID = u"EntryID";
+constexpr OUStringLiteral PROP_AUTOSAVE_STATE = u"AutoSaveState";
-const OUStringLiteral OPERATION_START = u"start";
-const OUStringLiteral OPERATION_STOP = u"stop";
-const OUStringLiteral OPERATION_UPDATE = u"update";
+constexpr OUStringLiteral OPERATION_START = u"start";
+constexpr OUStringLiteral OPERATION_STOP = u"stop";
+constexpr OUStringLiteral OPERATION_UPDATE = u"update";
const sal_Int32 MIN_DISCSPACE_DOCSAVE = 5; // [MB]
const sal_Int32 MIN_DISCSPACE_CONFIGSAVE = 1; // [MB]
diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx
index 6206aa3864f5..cfccf014f11c 100644
--- a/framework/source/uiconfiguration/imagemanagerimpl.cxx
+++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx
@@ -64,8 +64,8 @@ using namespace ::cppu;
const sal_Int16 MAX_IMAGETYPE_VALUE = css::ui::ImageType::SIZE_32;
-const OUStringLiteral IMAGE_FOLDER = u"images";
-const OUStringLiteral BITMAPS_FOLDER = u"Bitmaps";
+constexpr OUStringLiteral IMAGE_FOLDER = u"images";
+constexpr OUStringLiteral BITMAPS_FOLDER = u"Bitmaps";
const o3tl::enumarray<vcl::ImageType, const char*> IMAGELIST_XML_FILE =
{
diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx
index e0fd3d07f4d2..9e1d9d84bfdb 100644
--- a/framework/source/uielement/recentfilesmenucontroller.cxx
+++ b/framework/source/uielement/recentfilesmenucontroller.cxx
@@ -40,9 +40,9 @@ using namespace com::sun::star::util;
namespace {
-const OUStringLiteral CMD_CLEAR_LIST = u".uno:ClearRecentFileList";
-const OUStringLiteral CMD_OPEN_AS_TEMPLATE = u".uno:OpenTemplate";
-const OUStringLiteral CMD_OPEN_REMOTE = u".uno:OpenRemote";
+constexpr OUStringLiteral CMD_CLEAR_LIST = u".uno:ClearRecentFileList";
+constexpr OUStringLiteral CMD_OPEN_AS_TEMPLATE = u".uno:OpenTemplate";
+constexpr OUStringLiteral CMD_OPEN_REMOTE = u".uno:OpenRemote";
class RecentFilesMenuController : public svt::PopupMenuControllerBase
{
diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx
index 0689cd39aff2..8f08976528cf 100644
--- a/framework/source/uielement/toolbarsmenucontroller.cxx
+++ b/framework/source/uielement/toolbarsmenucontroller.cxx
@@ -68,9 +68,9 @@ using namespace ::com::sun::star::util;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::ui;
-const OUStringLiteral CMD_RESTOREVISIBILITY = u".cmd:RestoreVisibility";
+constexpr OUStringLiteral CMD_RESTOREVISIBILITY = u".cmd:RestoreVisibility";
-const OUStringLiteral STATIC_CMD_PART = u".uno:AvailableToolbars?Toolbar:string=";
+constexpr OUStringLiteral STATIC_CMD_PART = u".uno:AvailableToolbars?Toolbar:string=";
const char STATIC_INTERNAL_CMD_PART[] = ".cmd:";
namespace framework
diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx
index 85a2a3e4ccc4..7fdef0eaf06d 100644
--- a/framework/source/uielement/uicommanddescription.cxx
+++ b/framework/source/uielement/uicommanddescription.cxx
@@ -54,7 +54,7 @@ using namespace ::com::sun::star::frame;
const char CONFIGURATION_ROOT_ACCESS[] = "/org.openoffice.Office.UI.";
// Special resource URLs to retrieve additional information
-const OUStringLiteral PRIVATE_RESOURCE_URL = u"private:";
+constexpr OUStringLiteral PRIVATE_RESOURCE_URL = u"private:";
const sal_Int32 COMMAND_PROPERTY_IMAGE = 1;
const sal_Int32 COMMAND_PROPERTY_ROTATE = 2;