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/dlgprov | |
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/dlgprov')
-rw-r--r-- | scripting/source/dlgprov/dlgevtatt.cxx | 4 | ||||
-rw-r--r-- | scripting/source/dlgprov/dlgprov.cxx | 37 |
2 files changed, 11 insertions, 30 deletions
diff --git a/scripting/source/dlgprov/dlgevtatt.cxx b/scripting/source/dlgprov/dlgevtatt.cxx index cc7bd099874e..30ac109cf683 100644 --- a/scripting/source/dlgprov/dlgevtatt.cxx +++ b/scripting/source/dlgprov/dlgevtatt.cxx @@ -546,9 +546,9 @@ namespace dlgprov void DialogUnoScriptListenerImpl::firing_impl( const ScriptEvent& aScriptEvent, Any* pRet ) { - static OUString sUnoURLScheme("vnd.sun.star.UNO:"); + static const char sUnoURLScheme[] = "vnd.sun.star.UNO:"; - OUString aMethodName = aScriptEvent.ScriptCode.copy( sUnoURLScheme.getLength() ); + OUString aMethodName = aScriptEvent.ScriptCode.copy( strlen(sUnoURLScheme) ); const Any* pArguments = aScriptEvent.Arguments.getConstArray(); Any aEventObject = pArguments[0]; diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx index cc821c675e47..38294297cc75 100644 --- a/scripting/source/dlgprov/dlgprov.cxx +++ b/scripting/source/dlgprov/dlgprov.cxx @@ -88,7 +88,7 @@ namespace dlgprov { -static OUString aResourceResolverPropName("ResourceResolver"); +static const char aResourceResolverPropName[] = "ResourceResolver"; Reference< resource::XStringResourceManager > lcl_getStringResourceManager(const Reference< XComponentContext >& i_xContext,const OUString& i_sURL) { @@ -166,37 +166,18 @@ static OUString aResourceResolverPropName("ResourceResolver"); static OUString getImplementationName_DialogProviderImpl() { - static OUString* pImplName = 0; - if ( !pImplName ) - { - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if ( !pImplName ) - { - static OUString aImplName( "com.sun.star.comp.scripting.DialogProvider" ); - pImplName = &aImplName; - } - } - return *pImplName; + return OUString( "com.sun.star.comp.scripting.DialogProvider" ); } static Sequence< OUString > getSupportedServiceNames_DialogProviderImpl() { - static Sequence< OUString >* pNames = 0; - if ( !pNames ) - { - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if ( !pNames ) - { - static Sequence< OUString > aNames(3); - aNames[0] = "com.sun.star.awt.DialogProvider"; - aNames[1] = "com.sun.star.awt.DialogProvider2"; - aNames[2] = "com.sun.star.awt.ContainerWindowProvider"; - pNames = &aNames; - } - } - return *pNames; + Sequence< OUString > aNames(3); + aNames[0] = "com.sun.star.awt.DialogProvider"; + aNames[1] = "com.sun.star.awt.DialogProvider2"; + aNames[2] = "com.sun.star.awt.ContainerWindowProvider"; + return aNames; } @@ -645,8 +626,8 @@ static OUString aResourceResolverPropName("ResourceResolver"); // XDialogProvider - static OUString aDecorationPropName("Decoration"); - static OUString aTitlePropName("Title"); + static const char aDecorationPropName[] = "Decoration"; + static const char aTitlePropName[] = "Title"; Reference < XControl > DialogProviderImpl::createDialogImpl( const OUString& URL, const Reference< XInterface >& xHandler, |