diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-15 21:20:30 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-17 18:45:56 +0200 |
commit | 429a960e157f3375e795cdec8f265ace1c5bdc9e (patch) | |
tree | f36bea7935a5e5fb9cd6e57765fed6d8c8690928 /unotools | |
parent | 4417c30d6aa8d415f1f63364bb5dedcd44ae5562 (diff) |
elide some OUString allocation
Change-Id: Iadd73477bf3b0edaa0fb7db10f9ffca88fe737e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134476
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/source/config/eventcfg.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/unotools/source/config/eventcfg.cxx b/unotools/source/config/eventcfg.cxx index fb1eb948a47b..8cd883e0a0be 100644 --- a/unotools/source/config/eventcfg.cxx +++ b/unotools/source/config/eventcfg.cxx @@ -240,11 +240,13 @@ void GlobalEventConfig_Impl::replaceByName( const OUString& aName, const Any& aE css::uno::Sequence < css::beans::PropertyValue > GlobalEventConfig_Impl::getByName( const OUString& aName ) { + static constexpr OUStringLiteral sEventType = u"EventType"; + static constexpr OUStringLiteral sScript = u"Script"; Sequence< beans::PropertyValue > props(2); auto pProps = props.getArray(); - pProps[0].Name = "EventType"; - pProps[0].Value <<= OUString("Script"); - pProps[1].Name = "Script"; + pProps[0].Name = sEventType; + pProps[0].Value <<= OUString(sScript); + pProps[1].Name = sScript; EventBindingHash::const_iterator it = m_eventBindingHash.find( aName ); if( it != m_eventBindingHash.end() ) { |