diff options
author | Noel Grandin <noel@peralex.com> | 2014-11-03 14:03:54 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-11-05 08:44:19 +0200 |
commit | 705c48d32eec0aa5180e60ca157daca4b154e4a3 (patch) | |
tree | 97f43496f4b429a2b8d03b1e71cb2a1c33142a15 /scripting/source/vbaevents | |
parent | b7d8a58ff2698ffc6e22943f64aa97c5ea253bd9 (diff) |
fdo#38835 strip out OUString globals
they are largely unnecessary these days, since our OUString infrastructure
gained optimised handling for static char constants.
Change-Id: I07f73484f82d0582252cb4324d4107c998432c37
Diffstat (limited to 'scripting/source/vbaevents')
-rw-r--r-- | scripting/source/vbaevents/eventhelper.cxx | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx index c5fe35169a6f..d0b97dbf0330 100644 --- a/scripting/source/vbaevents/eventhelper.cxx +++ b/scripting/source/vbaevents/eventhelper.cxx @@ -95,8 +95,8 @@ using namespace ::com::sun::star::uno; using namespace ::ooo::vba; // Some constants -const static OUString DELIM("::"); -const static sal_Int32 DELIMLEN = DELIM.getLength(); +static const char DELIM[] = "::"; +static const sal_Int32 DELIMLEN = strlen(DELIM); bool isKeyEventOk( awt::KeyEvent& evt, const Sequence< Any >& params ) { @@ -1058,17 +1058,7 @@ namespace evtlstner { OUString SAL_CALL getImplementationName() { - static OUString* pImplName = 0; - if ( !pImplName ) - { - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if ( !pImplName ) - { - static OUString aImplName( "ooo.vba.EventListener" ); - pImplName = &aImplName; - } - } - return *pImplName; + return OUString( "ooo.vba.EventListener" ); } uno::Reference< XInterface > SAL_CALL create( @@ -1087,17 +1077,7 @@ namespace ooevtdescgen { OUString SAL_CALL getImplementationName() { - static OUString* pImplName = 0; - if ( !pImplName ) - { - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if ( !pImplName ) - { - static OUString aImplName( "ooo.vba.VBAToOOEventDesc" ); - pImplName = &aImplName; - } - } - return *pImplName; + return OUString( "ooo.vba.VBAToOOEventDesc" ); } uno::Reference< XInterface > SAL_CALL create( |