summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-05-02 15:40:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-05-04 20:12:15 +0200
commit293ef452f2f0f398bea5f422a4dcff777d768e0b (patch)
tree592ca069d902538f0889fe2b5be1847144e4b16a
parentf221ccd6dc5340038daa024bb4384b0a3f8e7259 (diff)
replace createFromAscii with OUString literals in GlobalEventConfig_Impl
Change-Id: Ib74e96b93683f3bfe613ae09f49a6d4158810df2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167128 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--unotools/source/config/eventcfg.cxx60
1 files changed, 30 insertions, 30 deletions
diff --git a/unotools/source/config/eventcfg.cxx b/unotools/source/config/eventcfg.cxx
index c6c0f63e42a6..f9c2b2722ba7 100644
--- a/unotools/source/config/eventcfg.cxx
+++ b/unotools/source/config/eventcfg.cxx
@@ -45,36 +45,36 @@ using namespace ::com::sun::star;
#define SETNODE_BINDINGS "Bindings"
#define PROPERTYNAME_BINDINGURL "BindingURL"
-static o3tl::enumarray<GlobalEventId, const char*> pEventAsciiNames =
+constexpr o3tl::enumarray<GlobalEventId, OUString> pEventAsciiNames =
{
-"OnStartApp",
-"OnCloseApp",
-"OnCreate",
-"OnNew",
-"OnLoadFinished",
-"OnLoad",
-"OnPrepareUnload",
-"OnUnload",
-"OnSave",
-"OnSaveDone",
-"OnSaveFailed",
-"OnSaveAs",
-"OnSaveAsDone",
-"OnSaveAsFailed",
-"OnCopyTo",
-"OnCopyToDone",
-"OnCopyToFailed",
-"OnFocus",
-"OnUnfocus",
-"OnPrint",
-"OnViewCreated",
-"OnPrepareViewClosing",
-"OnViewClosed",
-"OnModifyChanged",
-"OnTitleChanged",
-"OnVisAreaChanged",
-"OnModeChanged",
-"OnStorageChanged"
+u"OnStartApp"_ustr,
+u"OnCloseApp"_ustr,
+u"OnCreate"_ustr,
+u"OnNew"_ustr,
+u"OnLoadFinished"_ustr,
+u"OnLoad"_ustr,
+u"OnPrepareUnload"_ustr,
+u"OnUnload"_ustr,
+u"OnSave"_ustr,
+u"OnSaveDone"_ustr,
+u"OnSaveFailed"_ustr,
+u"OnSaveAs"_ustr,
+u"OnSaveAsDone"_ustr,
+u"OnSaveAsFailed"_ustr,
+u"OnCopyTo"_ustr,
+u"OnCopyToDone"_ustr,
+u"OnCopyToFailed"_ustr,
+u"OnFocus"_ustr,
+u"OnUnfocus"_ustr,
+u"OnPrint"_ustr,
+u"OnViewCreated"_ustr,
+u"OnPrepareViewClosing"_ustr,
+u"OnViewClosed"_ustr,
+u"OnModifyChanged"_ustr,
+u"OnTitleChanged"_ustr,
+u"OnVisAreaChanged"_ustr,
+u"OnModeChanged"_ustr,
+u"OnStorageChanged"_ustr
};
typedef std::unordered_map< OUString, OUString > EventBindingHash;
@@ -128,7 +128,7 @@ GlobalEventConfig_Impl::GlobalEventConfig_Impl()
{
// the supported event names
for (const GlobalEventId id : o3tl::enumrange<GlobalEventId>())
- m_supportedEvents[id] = OUString::createFromAscii( pEventAsciiNames[id] );
+ m_supportedEvents[id] = pEventAsciiNames[id];
initBindingInfo();