diff options
author | Noel Grandin <noel@peralex.com> | 2013-10-31 17:49:01 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-08 14:50:59 +0200 |
commit | cd30747b74683dc5766073a4a9b3a4c0e5db3723 (patch) | |
tree | a1833a51a2f501693100bb449e5a4b28f564379e /stoc/source | |
parent | c3e55a1f3b88fd53d13f563a4116d588643c34d7 (diff) |
remove unnecessary use of OUString constructor in STOC module
Change-Id: I980223cedb6d0054ef71cbd81691f70a24f506ad
Diffstat (limited to 'stoc/source')
-rw-r--r-- | stoc/source/corereflection/criface.cxx | 2 | ||||
-rw-r--r-- | stoc/source/inspect/introspection.cxx | 2 | ||||
-rw-r--r-- | stoc/source/invocation/invocation.cxx | 6 | ||||
-rw-r--r-- | stoc/source/javavm/javavm.cxx | 52 | ||||
-rw-r--r-- | stoc/source/servicemanager/servicemanager.cxx | 15 | ||||
-rw-r--r-- | stoc/source/simpleregistry/simpleregistry.cxx | 2 | ||||
-rw-r--r-- | stoc/source/uriproc/ExternalUriReferenceTranslator.cxx | 2 | ||||
-rw-r--r-- | stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx | 2 | ||||
-rw-r--r-- | stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx | 2 |
9 files changed, 42 insertions, 43 deletions
diff --git a/stoc/source/corereflection/criface.cxx b/stoc/source/corereflection/criface.cxx index 28310227beaa..b6387ca19191 100644 --- a/stoc/source/corereflection/criface.cxx +++ b/stoc/source/corereflection/criface.cxx @@ -737,7 +737,7 @@ Any SAL_CALL IdlInterfaceMethodImpl::invoke( const Any & rObj, Sequence< Any > & InvocationTargetException aExc; aExc.Context = *(const Reference< XInterface > *)rObj.getValue(); - aExc.Message = OUString("exception occurred during invocation!"); + aExc.Message = "exception occurred during invocation!"; uno_any_destruct( &aExc.TargetException, reinterpret_cast< uno_ReleaseFunc >(cpp_release) ); diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx index 7738a130f993..2ca6beb1e8a9 100644 --- a/stoc/source/inspect/introspection.cxx +++ b/stoc/source/inspect/introspection.cxx @@ -2312,7 +2312,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect( } else { - if( aMethName != OUString("queryInterface") ) + if( aMethName != "queryInterface" ) { rMethodConcept_i |= MethodConcept::DANGEROUS; continue; diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx index 80a71e4572bf..1d8df1ed0aba 100644 --- a/stoc/source/invocation/invocation.cxx +++ b/stoc/source/invocation/invocation.cxx @@ -70,7 +70,7 @@ namespace stoc_inv static Sequence< OUString > inv_getSupportedServiceNames() { Sequence< OUString > seqNames(1); - seqNames.getArray()[0] = OUString(SERVICENAME); + seqNames.getArray()[0] = SERVICENAME; return seqNames; } @@ -668,7 +668,7 @@ Any Invocation_Impl::invoke( const OUString& FunctionName, const Sequence<Any>& { CannotConvertException aExc; aExc.Context = *this; - aExc.Message = OUString("invocation type mismatch!"); + aExc.Message = "invocation type mismatch!"; throw aExc; } } @@ -708,7 +708,7 @@ Any Invocation_Impl::invoke( const OUString& FunctionName, const Sequence<Any>& RuntimeException aExc; aExc.Context = *this; - aExc.Message = OUString("invocation lacking of introspection access!"); + aExc.Message = "invocation lacking of introspection access!"; throw aExc; } diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx index 3f8139ad05d0..a102b86f1a26 100644 --- a/stoc/source/javavm/javavm.cxx +++ b/stoc/source/javavm/javavm.cxx @@ -294,13 +294,13 @@ void getINetPropsFromConfig(stoc_javavm::JVM * pjvm, // read ftp proxy name css::uno::Reference<css::registry::XRegistryKey> ftpProxy_name = xRegistryRootKey->openKey("Settings/ooInetFTPProxyName"); if(ftpProxy_name.is() && !ftpProxy_name->getStringValue().isEmpty()) { - OUString ftpHost = OUString("ftp.proxyHost="); + OUString ftpHost = "ftp.proxyHost="; ftpHost += ftpProxy_name->getStringValue(); // read ftp proxy port css::uno::Reference<css::registry::XRegistryKey> ftpProxy_port = xRegistryRootKey->openKey("Settings/ooInetFTPProxyPort"); if(ftpProxy_port.is() && ftpProxy_port->getLongValue()) { - OUString ftpPort = OUString("ftp.proxyPort="); + OUString ftpPort = "ftp.proxyPort="; ftpPort += OUString::number(ftpProxy_port->getLongValue()); pjvm->pushProp(ftpHost); @@ -311,13 +311,13 @@ void getINetPropsFromConfig(stoc_javavm::JVM * pjvm, // read http proxy name css::uno::Reference<css::registry::XRegistryKey> httpProxy_name = xRegistryRootKey->openKey("Settings/ooInetHTTPProxyName"); if(httpProxy_name.is() && !httpProxy_name->getStringValue().isEmpty()) { - OUString httpHost = OUString("http.proxyHost="); + OUString httpHost = "http.proxyHost="; httpHost += httpProxy_name->getStringValue(); // read http proxy port css::uno::Reference<css::registry::XRegistryKey> httpProxy_port = xRegistryRootKey->openKey("Settings/ooInetHTTPProxyPort"); if(httpProxy_port.is() && httpProxy_port->getLongValue()) { - OUString httpPort = OUString("http.proxyPort="); + OUString httpPort = "http.proxyPort="; httpPort += OUString::number(httpProxy_port->getLongValue()); pjvm->pushProp(httpHost); @@ -328,13 +328,13 @@ void getINetPropsFromConfig(stoc_javavm::JVM * pjvm, // read https proxy name css::uno::Reference<css::registry::XRegistryKey> httpsProxy_name = xRegistryRootKey->openKey("Settings/ooInetHTTPSProxyName"); if(httpsProxy_name.is() && !httpsProxy_name->getStringValue().isEmpty()) { - OUString httpsHost = OUString("https.proxyHost="); + OUString httpsHost = "https.proxyHost="; httpsHost += httpsProxy_name->getStringValue(); // read https proxy port css::uno::Reference<css::registry::XRegistryKey> httpsProxy_port = xRegistryRootKey->openKey("Settings/ooInetHTTPSProxyPort"); if(httpsProxy_port.is() && httpsProxy_port->getLongValue()) { - OUString httpsPort = OUString("https.proxyPort="); + OUString httpsPort = "https.proxyPort="; httpsPort += OUString::number(httpsProxy_port->getLongValue()); pjvm->pushProp(httpsHost); @@ -345,8 +345,8 @@ void getINetPropsFromConfig(stoc_javavm::JVM * pjvm, // read nonProxyHosts css::uno::Reference<css::registry::XRegistryKey> nonProxies_name = xRegistryRootKey->openKey("Settings/ooInetNoProxy"); if(nonProxies_name.is() && !nonProxies_name->getStringValue().isEmpty()) { - OUString httpNonProxyHosts = OUString("http.nonProxyHosts="); - OUString ftpNonProxyHosts= OUString("ftp.nonProxyHosts="); + OUString httpNonProxyHosts = "http.nonProxyHosts="; + OUString ftpNonProxyHosts = "ftp.nonProxyHosts="; OUString value= nonProxies_name->getStringValue(); // replace the separator ";" by "|" value= value.replace((sal_Unicode)';', (sal_Unicode)'|'); @@ -449,11 +449,11 @@ void getJavaPropsFromSafetySettings( OUString sVal; switch( val) { - case 0: sVal= OUString("host"); + case 0: sVal = "host"; break; - case 1: sVal= OUString("unrestricted"); + case 1: sVal = "unrestricted"; break; - case 3: sVal= OUString("none"); + case 3: sVal = "none"; break; } OUString sProperty("appletviewer.security.mode="); @@ -1077,62 +1077,62 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( } else if ( aAccessor == "ooInetHTTPProxyName" ) { - aPropertyName = OUString("http.proxyHost"); + aPropertyName = "http.proxyHost"; rEvent.Element >>= aPropertyValue; } else if ( aAccessor == "ooInetHTTPProxyPort" ) { - aPropertyName = OUString("http.proxyPort"); + aPropertyName = "http.proxyPort"; sal_Int32 n = 0; rEvent.Element >>= n; aPropertyValue = OUString::number(n); } else if ( aAccessor == "ooInetHTTPSProxyName" ) { - aPropertyName = OUString("https.proxyHost"); + aPropertyName = "https.proxyHost"; rEvent.Element >>= aPropertyValue; } else if ( aAccessor == "ooInetHTTPSProxyPort" ) { - aPropertyName = OUString("https.proxyPort"); + aPropertyName = "https.proxyPort"; sal_Int32 n = 0; rEvent.Element >>= n; aPropertyValue = OUString::number(n); } else if ( aAccessor == "ooInetFTPProxyName" ) { - aPropertyName = OUString("ftp.proxyHost"); + aPropertyName = "ftp.proxyHost"; rEvent.Element >>= aPropertyValue; } else if ( aAccessor == "ooInetFTPProxyPort" ) { - aPropertyName = OUString("ftp.proxyPort"); + aPropertyName = "ftp.proxyPort"; sal_Int32 n = 0; rEvent.Element >>= n; aPropertyValue = OUString::number(n); } else if ( aAccessor == "ooInetNoProxy" ) { - aPropertyName = OUString("http.nonProxyHosts"); - aPropertyName2 = OUString("ftp.nonProxyHosts"); + aPropertyName = "http.nonProxyHosts"; + aPropertyName2 = "ftp.nonProxyHosts"; rEvent.Element >>= aPropertyValue; aPropertyValue = aPropertyValue.replace(';', '|'); } else if ( aAccessor == "NetAccess" ) { - aPropertyName = OUString("appletviewer.security.mode"); + aPropertyName = "appletviewer.security.mode"; sal_Int32 n = 0; if (rEvent.Element >>= n) switch (n) { case 0: - aPropertyValue = OUString("host"); + aPropertyValue = "host"; break; case 1: - aPropertyValue = OUString("unrestricted"); + aPropertyValue = "unrestricted"; break; case 3: - aPropertyValue = OUString("none"); + aPropertyValue = "none"; break; } else @@ -1141,13 +1141,13 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( } else if ( aAccessor == "Security" ) { - aPropertyName = OUString("stardiv.security.disableSecurity"); + aPropertyName = "stardiv.security.disableSecurity"; sal_Bool b = sal_Bool(); if (rEvent.Element >>= b) if (b) - aPropertyValue = OUString("false"); + aPropertyValue = "false"; else - aPropertyValue = OUString("true"); + aPropertyValue = "true"; else return; bSecurityChanged = true; diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx index 4b262f3e0cd8..18f3b7aa86d4 100644 --- a/stoc/source/servicemanager/servicemanager.cxx +++ b/stoc/source/servicemanager/servicemanager.cxx @@ -73,7 +73,7 @@ namespace stoc_bootstrap Sequence< OUString > smgr_wrapper_getSupportedServiceNames() { Sequence< OUString > seqNames(1); - seqNames.getArray()[0] = OUString("com.sun.star.lang.MultiServiceFactory"); + seqNames.getArray()[0] = "com.sun.star.lang.MultiServiceFactory"; return seqNames; } @@ -85,8 +85,8 @@ OUString smgr_wrapper_getImplementationName() Sequence< OUString > smgr_getSupportedServiceNames() { Sequence< OUString > seqNames(2); - seqNames.getArray()[0] = OUString("com.sun.star.lang.MultiServiceFactory"); - seqNames.getArray()[1] = OUString("com.sun.star.lang.ServiceManager"); + seqNames.getArray()[0] = "com.sun.star.lang.MultiServiceFactory"; + seqNames.getArray()[1] = "com.sun.star.lang.ServiceManager"; return seqNames; } @@ -98,8 +98,8 @@ OUString smgr_getImplementationName() Sequence< OUString > regsmgr_getSupportedServiceNames() { Sequence< OUString > seqNames(2); - seqNames.getArray()[0] = OUString("com.sun.star.lang.MultiServiceFactory"); - seqNames.getArray()[1] = OUString("com.sun.star.lang.RegistryServiceManager"); + seqNames.getArray()[0] = "com.sun.star.lang.MultiServiceFactory"; + seqNames.getArray()[1] = "com.sun.star.lang.RegistryServiceManager"; return seqNames; } @@ -864,8 +864,7 @@ Any OServiceManager::getPropertyValue(const OUString& PropertyName) else { UnknownPropertyException except; - except.Message = OUString( "ServiceManager : unknown property " ); - except.Message += PropertyName; + except.Message = "ServiceManager : unknown property " + PropertyName; throw except; } } @@ -1507,7 +1506,7 @@ Reference<XInterface > ORegistryServiceManager::loadWithImplementationName( try { - OUString implementationName = OUString("/IMPLEMENTATIONS/") + name; + OUString implementationName = "/IMPLEMENTATIONS/" + name; Reference<XRegistryKey > xImpKey = m_xRootKey->openKey(implementationName); if( xImpKey.is() ) diff --git a/stoc/source/simpleregistry/simpleregistry.cxx b/stoc/source/simpleregistry/simpleregistry.cxx index bd6b308ca240..a3e517c6be94 100644 --- a/stoc/source/simpleregistry/simpleregistry.cxx +++ b/stoc/source/simpleregistry/simpleregistry.cxx @@ -1131,7 +1131,7 @@ css::uno::Reference< css::uno::XInterface > SimpleRegistry_CreateInstance( css::uno::Sequence< OUString > simreg_getSupportedServiceNames() { css::uno::Sequence< OUString > names(1); - names[0] = OUString("com.sun.star.registry.SimpleRegistry"); + names[0] = "com.sun.star.registry.SimpleRegistry"; return names; } diff --git a/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx b/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx index 5f758873cc02..b042197bd858 100644 --- a/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx +++ b/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx @@ -217,7 +217,7 @@ OUString getImplementationName() { css::uno::Sequence< OUString > getSupportedServiceNames() { css::uno::Sequence< OUString > s(1); - s[0] = OUString("com.sun.star.uri.ExternalUriReferenceTranslator"); + s[0] = "com.sun.star.uri.ExternalUriReferenceTranslator"; return s; } diff --git a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx index 3ee11ed5b8bf..48cc768db4b3 100644 --- a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx +++ b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx @@ -460,7 +460,7 @@ OUString getImplementationName() { css::uno::Sequence< OUString > getSupportedServiceNames() { css::uno::Sequence< OUString > s(1); - s[0] = OUString("com.sun.star.uri.UriSchemeParser_vndDOTsunDOTstarDOTscript"); + s[0] = "com.sun.star.uri.UriSchemeParser_vndDOTsunDOTstarDOTscript"; return s; } diff --git a/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx b/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx index 88d5883570f8..16aa0780cd56 100644 --- a/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx +++ b/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx @@ -144,7 +144,7 @@ OUString getImplementationName() { css::uno::Sequence< OUString > getSupportedServiceNames() { css::uno::Sequence< OUString > s(1); - s[0] = OUString("com.sun.star.uri.VndSunStarPkgUrlReferenceFactory"); + s[0] = "com.sun.star.uri.VndSunStarPkgUrlReferenceFactory"; return s; } |