diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-12-31 10:26:43 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-01-04 14:44:33 +0000 |
commit | f14d64fa71565e86c98348f9c54cc6cab53649d8 (patch) | |
tree | 830034b8c4ac9e9bf83f049fabb3138f9a854486 /svtools/source/uno/unoevent.cxx | |
parent | 549e900b4b0047b8cb6c236ea50a3fc046e5fb51 (diff) |
these fields can be static constants
Change-Id: Id56e219782d7f858cdeb26232c7aabd4f643c9d9
Reviewed-on: https://gerrit.libreoffice.org/21020
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'svtools/source/uno/unoevent.cxx')
-rw-r--r-- | svtools/source/uno/unoevent.cxx | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/svtools/source/uno/unoevent.cxx b/svtools/source/uno/unoevent.cxx index 56e6ccb93b56..d789301a4c37 100644 --- a/svtools/source/uno/unoevent.cxx +++ b/svtools/source/uno/unoevent.cxx @@ -35,19 +35,18 @@ using css::lang::XServiceInfo; using css::beans::PropertyValue; -const sal_Char sAPI_ServiceName[] = "com.sun.star.container.XNameReplace"; -const sal_Char sAPI_SvDetachedEventDescriptor[] = "SvDetachedEventDescriptor"; +static const char sAPI_ServiceName[] = "com.sun.star.container.XNameReplace"; +static const char sAPI_SvDetachedEventDescriptor[] = "SvDetachedEventDescriptor"; +static const char sEventType[] = "EventType"; +static const char sMacroName[] = "MacroName"; +static const char sLibrary[] = "Library"; +static const char sStarBasic[] = "StarBasic"; +static const char sJavaScript[] = "JavaScript"; +static const char sScript[] = "Script"; +static const char sNone[] = "None"; SvBaseEventDescriptor::SvBaseEventDescriptor( const SvEventDescription* pSupportedMacroItems ) : - sEventType("EventType"), - sMacroName("MacroName"), - sLibrary("Library"), - sStarBasic("StarBasic"), - sJavaScript("JavaScript"), - sScript("Script"), - sNone("None"), - sServiceName(sAPI_ServiceName), mpSupportedMacroItems(pSupportedMacroItems), mnMacroItems(0) { @@ -151,7 +150,7 @@ sal_Bool SvBaseEventDescriptor::supportsService(const OUString& rServiceName) Sequence<OUString> SvBaseEventDescriptor::getSupportedServiceNames() throw(RuntimeException, std::exception) { - Sequence<OUString> aSequence { sServiceName }; + Sequence<OUString> aSequence { sAPI_ServiceName }; return aSequence; } @@ -194,7 +193,7 @@ void SvBaseEventDescriptor::getAnyFromMacro(Any& rAny, // create type PropertyValue aTypeValue; aTypeValue.Name = sEventType; - aTmp <<= sStarBasic; + aTmp <<= OUString(sStarBasic); aTypeValue.Value = aTmp; aSequence[0] = aTypeValue; @@ -227,7 +226,7 @@ void SvBaseEventDescriptor::getAnyFromMacro(Any& rAny, // create type PropertyValue aTypeValue; aTypeValue.Name = sEventType; - aTmp <<= sScript; + aTmp <<= OUString(sScript); aTypeValue.Value = aTmp; aSequence[0] = aTypeValue; @@ -259,7 +258,7 @@ void SvBaseEventDescriptor::getAnyFromMacro(Any& rAny, PropertyValue aKindValue; aKindValue.Name = sEventType; Any aTmp; - aTmp <<= sNone; + aTmp <<= OUString(sNone); aKindValue.Value = aTmp; aSequence[0] = aKindValue; |