summaryrefslogtreecommitdiff
path: root/stoc
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2013-06-29 21:24:12 +0200
committerThomas Arnhold <thomas@arnhold.org>2013-06-29 21:52:54 +0000
commitba0a57702cdef7a0389c06841711d7e3079d471c (patch)
tree223c0dd50de4b71cf7df9d0073f7cacca1f18c8d /stoc
parent8a7ede404ca4980f169c4ce634805ea5c1b6b56e (diff)
remove OUString wrap for string literals
For some functions and all kinds of Exceptions. CannotConvertException CloseVetoException DisposedException EmptyUndoStackException ErrorCodeIOException Exception GridInvalidDataException GridInvalidModelException IOException IllegalAccessException IllegalArgumentException IllegalTypeException IndexOutOfBoundsException NoMasterException NoSuchElementException NoSupportException PropertyVetoException RuntimeException SAXException ScannerException StorageWrappedTargetException UnsupportedFlavorException VetoException WrappedTargetException ZipIOException throwGenericSQLException throwIllegallArgumentException createInstance createInstanceWithContext forName getByName getPackageManager getPropertyValue getUnpackedValueOrDefault getValueByName hasPropertyByName openKey setName setPropertyValue supportsService bash command: for i in `cat list`; do git grep "$i\s*(\s*OUString(\s*\"" -- '*.[hc]xx' | cut -d ':' -f1 | sort -u | xargs sed -i -e "s/\(\<$i\s*(\)\s*OUString(\s*\(\"[^\")\\]*\"\)\s*)\s*/\1\2/g" -e "s/\($i.*\)\"+ /\1\" + /g"; done Change-Id: Iaf8e641b0abf28c082906014f87a183517630535 Reviewed-on: https://gerrit.libreoffice.org/4624 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'stoc')
-rw-r--r--stoc/source/inspect/introspection.cxx20
-rw-r--r--stoc/source/invocation/invocation.cxx4
-rw-r--r--stoc/source/javavm/javavm.cxx110
-rw-r--r--stoc/test/testconv.cxx2
-rw-r--r--stoc/test/testcorefl.cxx56
-rw-r--r--stoc/test/testiadapter.cxx6
-rw-r--r--stoc/test/testintrosp.cxx6
-rw-r--r--stoc/test/testloader.cxx2
-rw-r--r--stoc/test/testregistry.cxx34
-rw-r--r--stoc/test/testsmgr_cpnt.cxx6
10 files changed, 123 insertions, 123 deletions
diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx
index 4c36dc546037..b3a708f2ec44 100644
--- a/stoc/source/inspect/introspection.cxx
+++ b/stoc/source/inspect/introspection.cxx
@@ -1661,7 +1661,7 @@ ImplIntrospection::ImplIntrospection( const Reference<XMultiServiceFactory> & rX
mpTypeProviderCache = NULL;
// Spezielle Klassen holen
-// Reference< XInterface > xServiceIface = m_xSMgr->createInstance( OUString("com.sun.star.reflection.CoreReflection") );
+// Reference< XInterface > xServiceIface = m_xSMgr->createInstance("com.sun.star.reflection.CoreReflection");
// if( xServiceIface.is() )
// mxCoreReflection = Reference< XIdlReflection >::query( xServiceIface );
Reference< XPropertySet > xProps( rXSMgr, UNO_QUERY );
@@ -1686,14 +1686,14 @@ ImplIntrospection::ImplIntrospection( const Reference<XMultiServiceFactory> & rX
Reference< XInterface >() );
}
- mxElementAccessClass = mxCoreReflection->forName( OUString("com.sun.star.container.XElementAccess") );
- mxNameContainerClass = mxCoreReflection->forName( OUString("com.sun.star.container.XNameContainer") );
- mxNameAccessClass = mxCoreReflection->forName( OUString("com.sun.star.container.XNameAccess") );
- mxIndexContainerClass = mxCoreReflection->forName( OUString("com.sun.star.container.XIndexContainer") );
- mxIndexAccessClass = mxCoreReflection->forName( OUString("com.sun.star.container.XIndexAccess") );
- mxEnumerationAccessClass = mxCoreReflection->forName( OUString("com.sun.star.container.XEnumerationAccess") );
- mxInterfaceClass = mxCoreReflection->forName( OUString("com.sun.star.uno.XInterface") );
- mxAggregationClass = mxCoreReflection->forName( OUString("com.sun.star.uno.XAggregation") );
+ mxElementAccessClass = mxCoreReflection->forName("com.sun.star.container.XElementAccess");
+ mxNameContainerClass = mxCoreReflection->forName("com.sun.star.container.XNameContainer");
+ mxNameAccessClass = mxCoreReflection->forName("com.sun.star.container.XNameAccess");
+ mxIndexContainerClass = mxCoreReflection->forName("com.sun.star.container.XIndexContainer");
+ mxIndexAccessClass = mxCoreReflection->forName("com.sun.star.container.XIndexAccess");
+ mxEnumerationAccessClass = mxCoreReflection->forName("com.sun.star.container.XEnumerationAccess");
+ mxInterfaceClass = mxCoreReflection->forName("com.sun.star.uno.XInterface");
+ mxAggregationClass = mxCoreReflection->forName("com.sun.star.uno.XAggregation");
mbDisposed = sal_False;
}
@@ -1888,7 +1888,7 @@ Reference<XIdlClass> TypeToIdlClass( const Type& rType, const Reference< XMultiS
OUString sOWName( pTD->pTypeName );
if( !xRefl.is() )
{
- xRefl = Reference< XIdlReflection >( xMgr->createInstance( OUString("com.sun.star.reflection.CoreReflection") ), UNO_QUERY );
+ xRefl = Reference< XIdlReflection >( xMgr->createInstance("com.sun.star.reflection.CoreReflection"), UNO_QUERY );
OSL_ENSURE( xRefl.is(), "### no corereflection!" );
}
xRetClass = xRefl->forName( sOWName );
diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx
index 9c2a2ab3387d..8640f53fbcdc 100644
--- a/stoc/source/invocation/invocation.cxx
+++ b/stoc/source/invocation/invocation.cxx
@@ -1144,7 +1144,7 @@ Sequence< OUString > InvocationService::getSupportedServiceNames(void) throw( Ru
//--------------------------------------------------------------------------------------------------
Reference<XInterface> InvocationService::createInstance(void) throw( Exception, RuntimeException )
{
- //TODO:throw( Exception(OUString("no default construction of invocation adapter possible!"), *this) );
+ //TODO:throw( Exception("no default construction of invocation adapter possible!", *this) );
return Reference<XInterface>(); // dummy
}
@@ -1160,7 +1160,7 @@ Reference<XInterface> InvocationService::createInstanceWithArguments(
}
else
{
- //TODO:throw( Exception(OUString("no default construction of invocation adapter possible!"), *this) );
+ //TODO:throw( Exception("no default construction of invocation adapter possible!", *this) );
return Reference<XInterface>();
}
}
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index daccbe6ea757..5e7dd1b045e5 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -256,7 +256,7 @@ bool askForRetry(css::uno::Any const & rException)
if (xContext.is())
{
css::uno::Reference< css::task::XInteractionHandler > xHandler;
- xContext->getValueByName(OUString("java-vm.interaction-handler"))
+ xContext->getValueByName("java-vm.interaction-handler")
>>= xHandler;
if (xHandler.is())
{
@@ -278,26 +278,26 @@ void getINetPropsFromConfig(stoc_javavm::JVM * pjvm,
css::uno::Reference<css::uno::XInterface> xConfRegistry = xSMgr->createInstanceWithContext(
OUString("com.sun.star.configuration.ConfigurationRegistry"),
xCtx );
- if(!xConfRegistry.is()) throw css::uno::RuntimeException(OUString("javavm.cxx: couldn't get ConfigurationRegistry"), 0);
+ if(!xConfRegistry.is()) throw css::uno::RuntimeException("javavm.cxx: couldn't get ConfigurationRegistry", 0);
css::uno::Reference<css::registry::XSimpleRegistry> xConfRegistry_simple(xConfRegistry, css::uno::UNO_QUERY);
- if(!xConfRegistry_simple.is()) throw css::uno::RuntimeException(OUString("javavm.cxx: couldn't get ConfigurationRegistry"), 0);
+ if(!xConfRegistry_simple.is()) throw css::uno::RuntimeException("javavm.cxx: couldn't get ConfigurationRegistry", 0);
xConfRegistry_simple->open(OUString("org.openoffice.Inet"), sal_True, sal_False);
css::uno::Reference<css::registry::XRegistryKey> xRegistryRootKey = xConfRegistry_simple->getRootKey();
// if ooInetProxyType is not 0 then read the settings
- css::uno::Reference<css::registry::XRegistryKey> proxyEnable= xRegistryRootKey->openKey(OUString("Settings/ooInetProxyType"));
+ css::uno::Reference<css::registry::XRegistryKey> proxyEnable= xRegistryRootKey->openKey("Settings/ooInetProxyType");
if( proxyEnable.is() && 0 != proxyEnable->getLongValue())
{
// read ftp proxy name
- css::uno::Reference<css::registry::XRegistryKey> ftpProxy_name = xRegistryRootKey->openKey(OUString("Settings/ooInetFTPProxyName"));
+ 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=");
ftpHost += ftpProxy_name->getStringValue();
// read ftp proxy port
- css::uno::Reference<css::registry::XRegistryKey> ftpProxy_port = xRegistryRootKey->openKey(OUString("Settings/ooInetFTPProxyPort"));
+ css::uno::Reference<css::registry::XRegistryKey> ftpProxy_port = xRegistryRootKey->openKey("Settings/ooInetFTPProxyPort");
if(ftpProxy_port.is() && ftpProxy_port->getLongValue()) {
OUString ftpPort = OUString("ftp.proxyPort=");
ftpPort += OUString::valueOf(ftpProxy_port->getLongValue());
@@ -308,13 +308,13 @@ void getINetPropsFromConfig(stoc_javavm::JVM * pjvm,
}
// read http proxy name
- css::uno::Reference<css::registry::XRegistryKey> httpProxy_name = xRegistryRootKey->openKey(OUString("Settings/ooInetHTTPProxyName"));
+ 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=");
httpHost += httpProxy_name->getStringValue();
// read http proxy port
- css::uno::Reference<css::registry::XRegistryKey> httpProxy_port = xRegistryRootKey->openKey(OUString("Settings/ooInetHTTPProxyPort"));
+ css::uno::Reference<css::registry::XRegistryKey> httpProxy_port = xRegistryRootKey->openKey("Settings/ooInetHTTPProxyPort");
if(httpProxy_port.is() && httpProxy_port->getLongValue()) {
OUString httpPort = OUString("http.proxyPort=");
httpPort += OUString::valueOf(httpProxy_port->getLongValue());
@@ -325,13 +325,13 @@ void getINetPropsFromConfig(stoc_javavm::JVM * pjvm,
}
// read https proxy name
- css::uno::Reference<css::registry::XRegistryKey> httpsProxy_name = xRegistryRootKey->openKey(OUString("Settings/ooInetHTTPSProxyName"));
+ 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=");
httpsHost += httpsProxy_name->getStringValue();
// read https proxy port
- css::uno::Reference<css::registry::XRegistryKey> httpsProxy_port = xRegistryRootKey->openKey(OUString("Settings/ooInetHTTPSProxyPort"));
+ css::uno::Reference<css::registry::XRegistryKey> httpsProxy_port = xRegistryRootKey->openKey("Settings/ooInetHTTPSProxyPort");
if(httpsProxy_port.is() && httpsProxy_port->getLongValue()) {
OUString httpsPort = OUString("https.proxyPort=");
httpsPort += OUString::valueOf(httpsProxy_port->getLongValue());
@@ -342,7 +342,7 @@ void getINetPropsFromConfig(stoc_javavm::JVM * pjvm,
}
// read nonProxyHosts
- css::uno::Reference<css::registry::XRegistryKey> nonProxies_name = xRegistryRootKey->openKey(OUString("Settings/ooInetNoProxy"));
+ 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=");
@@ -382,7 +382,7 @@ void getDefaultLocaleFromConfig(
css::uno::Reference<css::registry::XRegistryKey> xRegistryRootKey = xConfRegistry_simple->getRootKey();
// read locale
- css::uno::Reference<css::registry::XRegistryKey> locale = xRegistryRootKey->openKey(OUString("L10N/ooLocale"));
+ css::uno::Reference<css::registry::XRegistryKey> locale = xRegistryRootKey->openKey("L10N/ooLocale");
if(locale.is() && !locale->getStringValue().isEmpty()) {
OUString language;
OUString country;
@@ -441,7 +441,7 @@ void getJavaPropsFromSafetySettings(
if (xRegistryRootKey.is())
{
- css::uno::Reference<css::registry::XRegistryKey> key_NetAccess= xRegistryRootKey->openKey(OUString("VirtualMachine/NetAccess"));
+ css::uno::Reference<css::registry::XRegistryKey> key_NetAccess= xRegistryRootKey->openKey("VirtualMachine/NetAccess");
if (key_NetAccess.is())
{
sal_Int32 val= key_NetAccess->getLongValue();
@@ -1176,12 +1176,12 @@ void SAL_CALL JavaVirtualMachine::elementReplaced(
// call java.lang.System.setProperty
// String setProperty( String key, String value)
jclass jcSystem= pJNIEnv->FindClass("java/lang/System");
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:FindClass java/lang/System"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:FindClass java/lang/System", 0);
jmethodID jmSetProps= pJNIEnv->GetStaticMethodID( jcSystem, "setProperty","(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;");
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:GetStaticMethodID java.lang.System.setProperty"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:GetStaticMethodID java.lang.System.setProperty", 0);
jstring jsPropName= pJNIEnv->NewString( aPropertyName.getStr(), aPropertyName.getLength());
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0);
// remove the property if it does not have a value ( user left the dialog field empty)
// or if the port is set to 0
@@ -1192,14 +1192,14 @@ void SAL_CALL JavaVirtualMachine::elementReplaced(
{
// call java.lang.System.getProperties
jmethodID jmGetProps= pJNIEnv->GetStaticMethodID( jcSystem, "getProperties","()Ljava/util/Properties;");
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:GetStaticMethodID java.lang.System.getProperties"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:GetStaticMethodID java.lang.System.getProperties", 0);
jobject joProperties= pJNIEnv->CallStaticObjectMethod( jcSystem, jmGetProps);
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:CallStaticObjectMethod java.lang.System.getProperties"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:CallStaticObjectMethod java.lang.System.getProperties", 0);
// call java.util.Properties.remove
jclass jcProperties= pJNIEnv->FindClass("java/util/Properties");
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:FindClass java/util/Properties"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:FindClass java/util/Properties", 0);
jmethodID jmRemove= pJNIEnv->GetMethodID( jcProperties, "remove", "(Ljava/lang/Object;)Ljava/lang/Object;");
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:GetMethodID java.util.Properties.remove"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:GetMethodID java.util.Properties.remove", 0);
pJNIEnv->CallObjectMethod( joProperties, jmRemove, jsPropName);
// special calse for ftp.nonProxyHosts and http.nonProxyHosts. The office only
@@ -1207,7 +1207,7 @@ void SAL_CALL JavaVirtualMachine::elementReplaced(
if (!aPropertyName2.isEmpty())
{
jstring jsPropName2= pJNIEnv->NewString( aPropertyName2.getStr(), aPropertyName2.getLength());
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0);
pJNIEnv->CallObjectMethod( joProperties, jmRemove, jsPropName2);
}
}
@@ -1215,20 +1215,20 @@ void SAL_CALL JavaVirtualMachine::elementReplaced(
{
// Change the Value of the property
jstring jsPropValue= pJNIEnv->NewString( aPropertyValue.getStr(), aPropertyValue.getLength());
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0);
pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsPropName, jsPropValue);
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:CallStaticObjectMethod java.lang.System.setProperty", 0);
// special calse for ftp.nonProxyHosts and http.nonProxyHosts. The office only
// has a value for two java properties
if (!aPropertyName2.isEmpty())
{
jstring jsPropName2= pJNIEnv->NewString( aPropertyName2.getStr(), aPropertyName2.getLength());
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0);
jsPropValue= pJNIEnv->NewString( aPropertyValue.getStr(), aPropertyValue.getLength());
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0);
pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsPropName2, jsPropValue);
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:CallStaticObjectMethod java.lang.System.setProperty", 0);
}
}
@@ -1238,7 +1238,7 @@ void SAL_CALL JavaVirtualMachine::elementReplaced(
if (bSecurityChanged)
{
jmethodID jmGetSecur= pJNIEnv->GetStaticMethodID( jcSystem,"getSecurityManager","()Ljava/lang/SecurityManager;");
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:GetStaticMethodID java.lang.System.getSecurityManager"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:GetStaticMethodID java.lang.System.getSecurityManager", 0);
jobject joSecur= pJNIEnv->CallStaticObjectMethod( jcSystem, jmGetSecur);
if (joSecur != 0)
{
@@ -1252,9 +1252,9 @@ void SAL_CALL JavaVirtualMachine::elementReplaced(
// The SecurityManagers class Name must be com.sun.star.lib.sandbox.SandboxSecurity
jclass jcSec= pJNIEnv->GetObjectClass( joSecur);
jclass jcClass= pJNIEnv->FindClass("java/lang/Class");
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:FindClass java.lang.Class"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:FindClass java.lang.Class", 0);
jmethodID jmName= pJNIEnv->GetMethodID( jcClass,"getName","()Ljava/lang/String;");
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:GetMethodID java.lang.Class.getName"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:GetMethodID java.lang.Class.getName", 0);
jstring jsClass= (jstring) pJNIEnv->CallObjectMethod( jcSec, jmName);
const jchar* jcharName= pJNIEnv->GetStringChars( jsClass, NULL);
OUString sName( jcharName);
@@ -1269,9 +1269,9 @@ void SAL_CALL JavaVirtualMachine::elementReplaced(
{
// call SandboxSecurity.reset
jmethodID jmReset= pJNIEnv->GetMethodID( jcSec,"reset","()V");
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:GetMethodID com.sun.star.lib.sandbox.SandboxSecurity.reset"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:GetMethodID com.sun.star.lib.sandbox.SandboxSecurity.reset", 0);
pJNIEnv->CallVoidMethod( joSecur, jmReset);
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:CallVoidMethod com.sun.star.lib.sandbox.SandboxSecurity.reset"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:CallVoidMethod com.sun.star.lib.sandbox.SandboxSecurity.reset", 0);
}
}
}
@@ -1426,32 +1426,32 @@ void JavaVirtualMachine::setINetSettingsInVM(bool set_reset)
// creat Java Properties as JNI strings
jstring jsFtpProxyHost= pJNIEnv->NewString( sFtpProxyHost.getStr(), sFtpProxyHost.getLength());
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0);
jstring jsFtpProxyPort= pJNIEnv->NewString( sFtpProxyPort.getStr(), sFtpProxyPort.getLength());
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0);
jstring jsFtpNonProxyHosts= pJNIEnv->NewString( sFtpNonProxyHosts.getStr(), sFtpNonProxyHosts.getLength());
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0);
jstring jsHttpProxyHost= pJNIEnv->NewString( sHttpProxyHost.getStr(), sHttpProxyHost.getLength());
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0);
jstring jsHttpProxyPort= pJNIEnv->NewString( sHttpProxyPort.getStr(), sHttpProxyPort.getLength());
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0);
jstring jsHttpNonProxyHosts= pJNIEnv->NewString( sHttpNonProxyHosts.getStr(), sHttpNonProxyHosts.getLength());
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0);
// prepare java.lang.System.setProperty
jclass jcSystem= pJNIEnv->FindClass("java/lang/System");
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:FindClass java/lang/System"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:FindClass java/lang/System", 0);
jmethodID jmSetProps= pJNIEnv->GetStaticMethodID( jcSystem, "setProperty","(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;");
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:GetStaticMethodID java.lang.System.setProperty"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:GetStaticMethodID java.lang.System.setProperty", 0);
// call java.lang.System.getProperties
jmethodID jmGetProps= pJNIEnv->GetStaticMethodID( jcSystem, "getProperties","()Ljava/util/Properties;");
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:GetStaticMethodID java.lang.System.getProperties"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:GetStaticMethodID java.lang.System.getProperties", 0);
jobject joProperties= pJNIEnv->CallStaticObjectMethod( jcSystem, jmGetProps);
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:CallStaticObjectMethod java.lang.System.getProperties"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:CallStaticObjectMethod java.lang.System.getProperties", 0);
// prepare java.util.Properties.remove
jclass jcProperties= pJNIEnv->FindClass("java/util/Properties");
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:FindClass java/util/Properties"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:FindClass java/util/Properties", 0);
if (set_reset)
{
@@ -1471,44 +1471,44 @@ void JavaVirtualMachine::setINetSettingsInVM(bool set_reset)
if( propName.equals( sFtpProxyHost))
{
jstring jsVal= pJNIEnv->NewString( propValue.getStr(), propValue.getLength());
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0);
pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsFtpProxyHost, jsVal);
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:CallStaticObjectMethod java.lang.System.setProperty", 0);
}
else if( propName.equals( sFtpProxyPort))
{
jstring jsVal= pJNIEnv->NewString( propValue.getStr(), propValue.getLength());
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0);
pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsFtpProxyPort, jsVal);
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:CallStaticObjectMethod java.lang.System.setProperty", 0);
}
else if( propName.equals( sFtpNonProxyHosts))
{
jstring jsVal= pJNIEnv->NewString( propValue.getStr(), propValue.getLength());
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0);
pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsFtpNonProxyHosts, jsVal);
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:CallStaticObjectMethod java.lang.System.setProperty", 0);
}
else if( propName.equals( sHttpProxyHost))
{
jstring jsVal= pJNIEnv->NewString( propValue.getStr(), propValue.getLength());
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0);
pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsHttpProxyHost, jsVal);
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:CallStaticObjectMethod java.lang.System.setProperty", 0);
}
else if( propName.equals( sHttpProxyPort))
{
jstring jsVal= pJNIEnv->NewString( propValue.getStr(), propValue.getLength());
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0);
pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsHttpProxyPort, jsVal);
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:CallStaticObjectMethod java.lang.System.setProperty", 0);
}
else if( propName.equals( sHttpNonProxyHosts))
{
jstring jsVal= pJNIEnv->NewString( propValue.getStr(), propValue.getLength());
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0);
pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsHttpNonProxyHosts, jsVal);
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:CallStaticObjectMethod java.lang.System.setProperty", 0);
}
}
}
@@ -1516,7 +1516,7 @@ void JavaVirtualMachine::setINetSettingsInVM(bool set_reset)
{
// call java.util.Properties.remove
jmethodID jmRemove= pJNIEnv->GetMethodID( jcProperties, "remove", "(Ljava/lang/Object;)Ljava/lang/Object;");
- if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:GetMethodID java.util.Property.remove"), 0);
+ if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:GetMethodID java.util.Property.remove", 0);
pJNIEnv->CallObjectMethod( joProperties, jmRemove, jsFtpProxyHost);
pJNIEnv->CallObjectMethod( joProperties, jmRemove, jsFtpProxyPort);
pJNIEnv->CallObjectMethod( joProperties, jmRemove, jsFtpNonProxyHosts);
diff --git a/stoc/test/testconv.cxx b/stoc/test/testconv.cxx
index 21fc5a37baa9..600e3ae900e7 100644
--- a/stoc/test/testconv.cxx
+++ b/stoc/test/testconv.cxx
@@ -668,7 +668,7 @@ SAL_IMPLEMENT_MAIN()
try
{
Reference< XImplementationRegistration > xImplReg(
- xMgr->createInstance( OUString("com.sun.star.registry.ImplementationRegistration") ), UNO_QUERY );
+ xMgr->createInstance("com.sun.star.registry.ImplementationRegistration"), UNO_QUERY );
OSL_ENSURE( xImplReg.is(), "### no impl reg!" );
OUString aLibName(
diff --git a/stoc/test/testcorefl.cxx b/stoc/test/testcorefl.cxx
index f8a89ab85d9e..e0e04358b821 100644
--- a/stoc/test/testcorefl.cxx
+++ b/stoc/test/testcorefl.cxx
@@ -86,9 +86,9 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl )
Reference< XHierarchicalNameAccess > xHNameAccess( xRefl, UNO_QUERY );
OSL_ENSURE(xHNameAccess.is(), "### cannot get XHierarchicalNameAccess!" );
- OSL_ENSURE(xRefl->forName(OUString("ModuleA.StructA"))->getName() == OUString("ModuleA.StructA"), "test_RegCoreReflection(): error 2b");
- OSL_ENSURE(xRefl->forName(OUString("ModuleA.ExceptionB"))->getTypeClass() == TypeClass_EXCEPTION, "test_RegCoreReflection(): error 2c");
- OSL_ENSURE(xRefl->forName(OUString("ModuleA.ModuleB.EnumA")).is(), "test_RegCoreReflection(): error 2e");
+ OSL_ENSURE(xRefl->forName("ModuleA.StructA")->getName() == OUString("ModuleA.StructA"), "test_RegCoreReflection(): error 2b");
+ OSL_ENSURE(xRefl->forName("ModuleA.ExceptionB")->getTypeClass() == TypeClass_EXCEPTION, "test_RegCoreReflection(): error 2c");
+ OSL_ENSURE(xRefl->forName("ModuleA.ModuleB.EnumA").is(), "test_RegCoreReflection(): error 2e");
OSL_ENSURE(*(const sal_Bool *)xHNameAccess->getByHierarchicalName(OUString("ModuleC.aConstBoolean")).getValue() == aConstBoolean, "test_RegCoreReflection(): error 4c");
@@ -100,7 +100,7 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl )
// Enums
- xClass = xRefl->forName(OUString("ModuleA.ModuleB.EnumA"));
+ xClass = xRefl->forName("ModuleA.ModuleB.EnumA");
OSL_ENSURE(xClass.is(), "test_RegCoreReflection(): error 5");
@@ -119,9 +119,9 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl )
// Interface
- Reference< XIdlClass > xA = xRefl->forName( OUString("ModuleC.XInterfaceB") );
+ Reference< XIdlClass > xA = xRefl->forName("ModuleC.XInterfaceB");
- xClass = xRefl->forName(OUString("ModuleC.XInterfaceB"));
+ xClass = xRefl->forName("ModuleC.XInterfaceB");
OSL_ENSURE(xClass == xA, "test_RegCoreReflection(): error 7");
OSL_ENSURE(xClass.is(), "test_RegCoreReflection(): error 7a");
@@ -150,7 +150,7 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl )
OSL_ENSURE(xClass->getMethods().getArray()[4]->getParameterTypes().getLength() == 1, "test_RegCoreReflection(): error 17");
OSL_ENSURE(xClass->getMethods().getArray()[4]->getParameterTypes().getArray()[0]->getTypeClass() == TypeClass_SHORT, "test_RegCoreReflection(): error 18");
OSL_ENSURE(xClass->getMethods().getArray()[4]->getParameterInfos().getArray()[0].aName == OUString( "aShort" ), "test_RegCoreReflection(): error 18a");
- OSL_ENSURE(xClass->getMethods().getArray()[4]->getParameterInfos().getArray()[0].aType == xRefl->forName( OUString( "short" ) ), "test_RegCoreReflection(): error 18b");
+ OSL_ENSURE(xClass->getMethods().getArray()[4]->getParameterInfos().getArray()[0].aType == xRefl->forName("short"), "test_RegCoreReflection(): error 18b");
OSL_ENSURE(xClass->getMethods().getArray()[4]->getParameterInfos().getArray()[0].aMode == ParamMode_IN, "test_RegCoreReflection(): error 18c");
OSL_ENSURE(xClass->getMethods().getArray()[4]->getExceptionTypes().getLength() == 0, "test_RegCoreReflection(): error 19");
OSL_ENSURE(xClass->getMethods().getArray()[5]->getName() == OUString("methodC"), "test_RegCoreReflection(): error 20");
@@ -187,10 +187,10 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl )
// SequenceReflections
- OSL_ENSURE(xRefl->forName( OUString("[]ModuleA.StructA") )->getTypeClass() == TypeClass_SEQUENCE, "test_RegCoreReflection(): error 48");
- OSL_ENSURE(xRefl->forName( OUString("[]ModuleA.StructA") )->getComponentType().is(), "test_RegCoreReflection(): error 49");
- OSL_ENSURE(xRefl->forName( OUString("[][]ModuleA.StructA") )->getComponentType()->getComponentType()->getName() == OUString("ModuleA.StructA"), "test_RegCoreReflection(): error 50");
- OSL_ENSURE(xRefl->forName( OUString("[]com.sun.star.uno.XInterface") ) == xRefl->forName(OUString( "ModuleA.StructC" ))->getField(OUString("aInterfaceSeq"))->getType(), "test_RegCoreReflection(): error 51");
+ OSL_ENSURE(xRefl->forName("[]ModuleA.StructA")->getTypeClass() == TypeClass_SEQUENCE, "test_RegCoreReflection(): error 48");
+ OSL_ENSURE(xRefl->forName("[]ModuleA.StructA")->getComponentType().is(), "test_RegCoreReflection(): error 49");
+ OSL_ENSURE(xRefl->forName("[][]ModuleA.StructA")->getComponentType()->getComponentType()->getName() == OUString("ModuleA.StructA"), "test_RegCoreReflection(): error 50");
+ OSL_ENSURE(xRefl->forName("[]com.sun.star.uno.XInterface") == xRefl->forName("ModuleA.StructC")->getField(OUString("aInterfaceSeq"))->getType(), "test_RegCoreReflection(): error 51");
StructC aStructC;
aStructC.aLong = aConstLong;
@@ -201,7 +201,7 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl )
Any aAny;
- xRefl->forName(OUString("ModuleA.StructC"))->getField(OUString("aInterfaceSeq"))->getType()->createObject(aAny);
+ xRefl->forName("ModuleA.StructC")->getField(OUString("aInterfaceSeq"))->getType()->createObject(aAny);
OSL_ENSURE(aAny.getValueType() == ::getCppuType( (const Sequence<Reference< XInterface > > *)0 ), "test_RegCoreReflection(): error 51a");
@@ -210,26 +210,26 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl )
sal_Int32 nLong = aConstLong * 2;
aAny.setValue( &nLong, ::getCppuType( (const sal_Int32 *)0 ) );
- OSL_ENSURE(*(sal_Int32*)xRefl->forName(OUString( "ModuleA.StructA" ))->getField(OUString( "aLong" ))->get(
+ OSL_ENSURE(*(sal_Int32*)xRefl->forName("ModuleA.StructA")->getField(OUString( "aLong" ))->get(
Any(&aStructC, ::getCppuType( (const StructC *)0 ))).getValue() == aConstLong, "test_RegCoreReflection(): error 52");
- OSL_ENSURE(xRefl->forName(OUString("ModuleA.StructA"))->getField(OUString( "aLong" ))->getAccessMode() == FieldAccessMode_READWRITE, "test_RegCoreReflection(): error 52a");
- Reference< XIdlField2 > rField ( xRefl->forName(OUString( "ModuleA.StructC" ))->getField(OUString( "aLong" )) , UNO_QUERY );
+ OSL_ENSURE(xRefl->forName("ModuleA.StructA")->getField(OUString( "aLong" ))->getAccessMode() == FieldAccessMode_READWRITE, "test_RegCoreReflection(): error 52a");
+ Reference< XIdlField2 > rField ( xRefl->forName("ModuleA.StructC")->getField(OUString( "aLong" )) , UNO_QUERY );
rField->set(aStructAny, aAny);
- OSL_ENSURE(*(sal_Int32*)xRefl->forName(OUString("ModuleA.StructB"))->getField(OUString( "aLong" ))->get(aStructAny).getValue() == *(sal_Int32*)aAny.getValue(), "test_RegCoreReflection(): error 53");
+ OSL_ENSURE(*(sal_Int32*)xRefl->forName("ModuleA.StructB")->getField(OUString( "aLong" ))->get(aStructAny).getValue() == *(sal_Int32*)aAny.getValue(), "test_RegCoreReflection(): error 53");
- xRefl->forName( OUString("[]ModuleA.StructA") )->createObject(aAny);
+ xRefl->forName("[]ModuleA.StructA")->createObject(aAny);
OSL_ENSURE( aAny.getValueTypeName() == "[]ModuleA.StructA", "test_RegCoreReflection(): error 54" );
- xRefl->forName(OUString("[][]ModuleA.StructA"))->createObject(aAny);
+ xRefl->forName("[][]ModuleA.StructA")->createObject(aAny);
OSL_ENSURE( aAny.getValueTypeName() == "[][]ModuleA.StructA", "test_RegCoreReflection(): error 56" );
- OSL_ENSURE(xRefl->forName(OUString("[][][]unsigned long"))->getComponentType()->getComponentType()->getComponentType()->getTypeClass() == TypeClass_UNSIGNED_LONG, "test_RegCoreReflection(): error 62");
+ OSL_ENSURE(xRefl->forName("[][][]unsigned long")->getComponentType()->getComponentType()->getComponentType()->getTypeClass() == TypeClass_UNSIGNED_LONG, "test_RegCoreReflection(): error 62");
try
{
fprintf( stderr, "%1\n" );
- Any bla = xRefl->forName(OUString("ModuleA.StructC"))->getField(OUString("aString"))->get(Any());
+ Any bla = xRefl->forName("ModuleA.StructC")->getField(OUString("aString"))->get(Any());
OSL_ENSURE(sal_False, "test_RegCoreReflection(): error 63");
return sal_False;
}
@@ -243,7 +243,7 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl )
Any blup;
blup <<= aStructC;
Any gulp;
- rField = Reference< XIdlField2 > ( xRefl->forName(OUString("ModuleA.StructC"))->getField(OUString("aString")) , UNO_QUERY);
+ rField = Reference< XIdlField2 > ( xRefl->forName("ModuleA.StructC")->getField(OUString("aString")) , UNO_QUERY);
rField->set( blup, gulp);
OSL_ENSURE(sal_False, "test_RegCoreReflection(): error 64");
return sal_False;
@@ -260,8 +260,8 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl )
Any blup;
blup <<= aStructC;
rField = Reference< XIdlField2 > (
- xRefl->forName(OUString("ModuleA.StructC"))->getField(OUString("aString")) , UNO_QUERY);
- xRefl->forName(OUString("ModuleA.StructC"))->getField(OUString("aString"))->set(blup, gulp);
+ xRefl->forName("ModuleA.StructC")->getField(OUString("aString")) , UNO_QUERY);
+ xRefl->forName("ModuleA.StructC")->getField(OUString("aString"))->set(blup, gulp);
OSL_ENSURE(sal_False, "test_RegCoreReflection(): error 65");
return sal_False;
}
@@ -273,7 +273,7 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl )
gulp <<= OUString(OUString("Test"));
Any blup;
blup <<= aStructC;
- xRefl->forName(OUString("ModuleA.StructC"))->getField(OUString("aString"))->set(blup, gulp);
+ xRefl->forName("ModuleA.StructC")->getField(OUString("aString"))->set(blup, gulp);
Reference< XInterfaceA > xAI = new OInterfaceA();
@@ -284,7 +284,7 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl )
Any a;
a <<= xAI;
- Any bla = xRefl->forName(OUString("ModuleC.XInterfaceA"))->getMethod(OUString("methodC"))->invoke(a, params);
+ Any bla = xRefl->forName("ModuleC.XInterfaceA")->getMethod(OUString("methodC"))->invoke(a, params);
OSL_ENSURE(sal_False, "test_RegCoreReflection(): error 66");
return sal_False;
}
@@ -302,7 +302,7 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl )
Any a;
a <<= xAI;
- Any bla = xRefl->forName(OUString("ModuleC.XInterfaceA"))->getMethod(OUString("methodC"))->invoke(a, params);
+ Any bla = xRefl->forName("ModuleC.XInterfaceA")->getMethod(OUString("methodC"))->invoke(a, params);
}
try
{
@@ -313,7 +313,7 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl )
Any a;
a <<= xAI;
- Any bla = xRefl->forName(OUString("ModuleC.XInterfaceA"))->getMethod(OUString("methodC"))->invoke(a, params);
+ Any bla = xRefl->forName("ModuleC.XInterfaceA")->getMethod(OUString("methodC"))->invoke(a, params);
OSL_ENSURE(sal_False, "test_RegCoreReflection(): error 67");
return sal_False;
}
@@ -328,7 +328,7 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl )
Any a;
a <<= xAI;
- bool result = (xRefl->forName(OUString("ModuleC.XInterfaceA"))->getMethod(OUString("methodC"))->invoke(a, params).getValueType()
+ bool result = (xRefl->forName("ModuleC.XInterfaceA")->getMethod(OUString("methodC"))->invoke(a, params).getValueType()
== ::getCppuType( (const Sequence<StructB> *)0 )); (void)result;
OSL_ENSURE(result, "test_RegCoreReflection(): error 68");
diff --git a/stoc/test/testiadapter.cxx b/stoc/test/testiadapter.cxx
index e48bb44f59d6..779096ac3e7c 100644
--- a/stoc/test/testiadapter.cxx
+++ b/stoc/test/testiadapter.cxx
@@ -939,7 +939,7 @@ sal_Bool raiseException( const Reference<XLanguageBindingTest > & xLBT )
static sal_Bool test_adapter( const Reference< XMultiServiceFactory > & xMgr )
{
Reference< XInvocationAdapterFactory > xAdapFac(
- xMgr->createInstance( OUString("com.sun.star.script.InvocationAdapterFactory") ), UNO_QUERY );
+ xMgr->createInstance("com.sun.star.script.InvocationAdapterFactory"), UNO_QUERY );
Reference< XInvocationAdapterFactory2 > xAdapFac2( xAdapFac, UNO_QUERY_THROW );
Reference< XLanguageBindingTest > xOriginal( (XLanguageBindingTest *)new Test_Impl() );
@@ -984,9 +984,9 @@ static sal_Bool test_adapter( const Reference< XMultiServiceFactory > & xMgr )
static sal_Bool test_invocation( const Reference< XMultiServiceFactory > & xMgr )
{
Reference< XInvocationAdapterFactory > xAdapFac(
- xMgr->createInstance( OUString("com.sun.star.script.InvocationAdapterFactory") ), UNO_QUERY );
+ xMgr->createInstance("com.sun.star.script.InvocationAdapterFactory"), UNO_QUERY );
Reference< XSingleServiceFactory > xInvocFac(
- xMgr->createInstance( OUString("com.sun.star.script.Invocation") ), UNO_QUERY );
+ xMgr->createInstance("com.sun.star.script.Invocation"), UNO_QUERY );
Reference< XLanguageBindingTest > xOriginal( (XLanguageBindingTest *)new Test_Impl() );
Any aOriginal( &xOriginal, ::getCppuType( &xOriginal ) );
diff --git a/stoc/test/testintrosp.cxx b/stoc/test/testintrosp.cxx
index bcec385465bb..9f2da08d27ad 100644
--- a/stoc/test/testintrosp.cxx
+++ b/stoc/test/testintrosp.cxx
@@ -1186,7 +1186,7 @@ SAL_IMPLEMENT_MAIN()
try
{
Reference< XImplementationRegistration > xImplReg(
- xMgr->createInstance( OUString("com.sun.star.registry.ImplementationRegistration") ), UNO_QUERY );
+ xMgr->createInstance("com.sun.star.registry.ImplementationRegistration"), UNO_QUERY );
OSL_ENSURE( xImplReg.is(), "### no impl reg!" );
// Register services
@@ -1195,7 +1195,7 @@ SAL_IMPLEMENT_MAIN()
xImplReg->registerImplementation(OUString("com.sun.star.loader.SharedLibrary"),
libName, Reference< XSimpleRegistry >() );
fprintf(stderr, "2\n" );
- Reference< XIdlReflection > xRefl( xMgr->createInstance( OUString("com.sun.star.reflection.CoreReflection") ), UNO_QUERY );
+ Reference< XIdlReflection > xRefl( xMgr->createInstance("com.sun.star.reflection.CoreReflection"), UNO_QUERY );
OSL_ENSURE( xRefl.is(), "### no corereflection!" );
// Introspection
@@ -1205,7 +1205,7 @@ SAL_IMPLEMENT_MAIN()
xImplReg->registerImplementation(OUString("com.sun.star.loader.SharedLibrary"),
libName, Reference< XSimpleRegistry >() );
fprintf(stderr, "4\n" );
- Reference< XIntrospection > xIntrosp( xMgr->createInstance( OUString("com.sun.star.beans.Introspection") ), UNO_QUERY );
+ Reference< XIntrospection > xIntrosp( xMgr->createInstance("com.sun.star.beans.Introspection"), UNO_QUERY );
OSL_ENSURE( xRefl.is(), "### no corereflection!" );
fprintf(stderr, "before test_introsp\n" );
diff --git a/stoc/test/testloader.cxx b/stoc/test/testloader.cxx
index edb4a281a3ff..b4a84d3e9660 100644
--- a/stoc/test/testloader.cxx
+++ b/stoc/test/testloader.cxx
@@ -103,7 +103,7 @@ SAL_IMPLEMENT_MAIN()
OSL_ENSURE( xServInfo.is(), "testloader error4");
OSL_ENSURE( xServInfo->getImplementationName() == "com.sun.star.comp.stoc.DLLComponentLoader", "testloader error5");
- OSL_ENSURE( xServInfo->supportsService(OUString( "com.sun.star.loader.SharedLibrary") ), "testloader error6");
+ OSL_ENSURE( xServInfo->supportsService("com.sun.star.loader.SharedLibrary"), "testloader error6");
OSL_ENSURE( xServInfo->getSupportedServiceNames().getLength() == 1, "testloader error7");
xIFace.clear();
diff --git a/stoc/test/testregistry.cxx b/stoc/test/testregistry.cxx
index 9d23f95ca8b1..014ae2fcdb55 100644
--- a/stoc/test/testregistry.cxx
+++ b/stoc/test/testregistry.cxx
@@ -189,7 +189,7 @@ void test_SimpleRegistry(
OSL_ENSURE( xServInfo.is(), "test_SimpleRegistry error2");
OSL_ENSURE( xServInfo->getImplementationName() == "com.sun.star.comp.stoc.SimpleRegistry", "test_SimpleRegistry error3");
- OSL_ENSURE( xServInfo->supportsService(OUString( "com.sun.star.registry.SimpleRegistry")), "test_SimpleRegistry error4");
+ OSL_ENSURE( xServInfo->supportsService("com.sun.star.registry.SimpleRegistry"), "test_SimpleRegistry error4");
OSL_ENSURE( xServInfo->getSupportedServiceNames().getLength() == 1, "test_SimpleRegistry error5");
xServInfo.clear();
@@ -336,7 +336,7 @@ void test_SimpleRegistry(
}
xRootKey = xReg->getRootKey();
- xKey = xRootKey->openKey( OUString( "LinkTest" ) );
+ xKey = xRootKey->openKey("LinkTest");
OSL_ENSURE( xKey.is() && xKey->isValid() && xKey->getKeyName() == "/ThirdKey/FirstSubKey/WithSubSubKey", "test_SimpleRegistry error 1213" );
xKey->closeKey();
OSL_ENSURE(
@@ -344,7 +344,7 @@ void test_SimpleRegistry(
registry::RegistryKeyType_LINK,
"test_SimpleRegistry error 1214" );
- xKey = xRootKey->openKey(OUString( "FirstKey/SecondSubKey" ));
+ xKey = xRootKey->openKey("FirstKey/SecondSubKey");
OSL_ENSURE( !xKey.is(), "test_SimpleRegistry error 27" );
// Test Links
@@ -352,7 +352,7 @@ void test_SimpleRegistry(
xKey->createLink(OUString( "MyFirstLink" ),
OUString( "/ThirdKey/FirstSubKey" ));
- xKey = xRootKey->openKey(OUString( "/FifthKey/MyFirstLink" ));
+ xKey = xRootKey->openKey("/FifthKey/MyFirstLink");
OSL_ENSURE( xKey->isValid(), "test_SimpleRegistry error 27" );
OSL_ENSURE( xKey->getKeyName() == OUString( "/ThirdKey/FirstSubKey" ), "test_SimpleRegistry error 28" );
@@ -381,7 +381,7 @@ void test_SimpleRegistry(
try
{
- xRootKey->openKey(OUString( "/FifthKey/MyFirstLink/WithSubSubKey/MyFourthLink" ));
+ xRootKey->openKey("/FifthKey/MyFirstLink/WithSubSubKey/MyFourthLink");
}
catch(InvalidRegistryException&)
{
@@ -395,7 +395,7 @@ void test_SimpleRegistry(
xRootKey->createLink(OUString( "/FourthKey/MySecondLink" ),
OUString( "/ThirdKey/FirstSubKey/WithSubSubKey" ));
- xKey = xRootKey->openKey(OUString( "SixthKey" ));
+ xKey = xRootKey->openKey("SixthKey");
seqNames = xKey->getKeyNames();
seqKeys = xKey->openKeys();
@@ -446,7 +446,7 @@ void test_DefaultRegistry(
Reference< XPropertySet > xPropSet( rSMgr, UNO_QUERY);
OSL_ENSURE( xPropSet.is(), "test_DefaultRegistry error0");
- Any aPropertyAny( xPropSet->getPropertyValue( OUString("Registry") ) );
+ Any aPropertyAny( xPropSet->getPropertyValue("Registry") );
OSL_ENSURE( aPropertyAny.hasValue(), "test_DefaultRegistry error1");
Reference<XSimpleRegistry> xReg;
@@ -458,7 +458,7 @@ void test_DefaultRegistry(
OSL_ENSURE( xServInfo.is(), "test_DefaultRegistry error2");
OSL_ENSURE( xServInfo->getImplementationName() == OUString( "com.sun.star.comp.stoc.NestedRegistry" ), "test_DefualtRegistry error3");
- OSL_ENSURE( xServInfo->supportsService(OUString( "com.sun.star.registry.NestedRegistry" )), "test_DefaultRegistry error4");
+ OSL_ENSURE( xServInfo->supportsService("com.sun.star.registry.NestedRegistry"), "test_DefaultRegistry error4");
OSL_ENSURE( xServInfo->getSupportedServiceNames().getLength() == 1, "test_DefaultRegistry error5");
xServInfo.clear();
@@ -468,7 +468,7 @@ void test_DefaultRegistry(
{
Reference<XRegistryKey> xRootKey(xReg->getRootKey());
- Reference<XRegistryKey> xKey = xRootKey->openKey(OUString( "/UCR/com/sun/star/registry/XSimpleRegistry" ));
+ Reference<XRegistryKey> xKey = xRootKey->openKey("/UCR/com/sun/star/registry/XSimpleRegistry");
OSL_ENSURE( xKey->getKeyName() == OUString( "/UCR/com/sun/star/registry/XSimpleRegistry" ),
"test_DefaultRegistry error 7" );
@@ -485,11 +485,11 @@ void test_DefaultRegistry(
xReg->mergeKey(OUString( "Test" ), testreg );
}
- xKey = xRootKey->openKey(OUString( "Test/ThirdKey/FirstSubKey/WithSubSubKey" ));
+ xKey = xRootKey->openKey("Test/ThirdKey/FirstSubKey/WithSubSubKey");
if (xKey.is())
xKey->setLongValue(123456789);
- xKey = xRootKey->openKey(OUString( "Test/ThirdKey/FirstSubKey" ));
+ xKey = xRootKey->openKey("Test/ThirdKey/FirstSubKey");
if (xKey.is())
{
xKey->createKey(OUString( "SecondSubSubKey" ));
@@ -499,7 +499,7 @@ void test_DefaultRegistry(
OSL_ENSURE( seqNames.getLength() == 2, "test_DefaultRegistry error 8" );
}
- xKey = xRootKey->openKey(OUString( "/Test/ThirdKey" ));
+ xKey = xRootKey->openKey("/Test/ThirdKey");
if (xKey.is())
{
RegistryValueType valueType = xKey->getValueType();
@@ -535,7 +535,7 @@ void test_DefaultRegistry(
xKey->createLink(OUString( "MyFirstLink" ),
OUString( "/Test/ThirdKey/FirstSubKey" ));
- xKey = xRootKey->openKey(OUString( "/Test/FifthKey/MyFirstLink" ));
+ xKey = xRootKey->openKey("/Test/FifthKey/MyFirstLink");
OSL_ENSURE( xKey->isValid(), "test_DefaultRegistry error 18" );
OSL_ENSURE( xKey->getKeyName() == OUString( "/Test/ThirdKey/FirstSubKey" ),
"test_DefaultRegistry error 19" );
@@ -565,7 +565,7 @@ void test_DefaultRegistry(
try
{
- xRootKey->openKey(OUString( "/Test/FifthKey/MyFirstLink/WithSubSubKey/MyFourthLink" ));
+ xRootKey->openKey("/Test/FifthKey/MyFirstLink/WithSubSubKey/MyFourthLink");
}
catch(InvalidRegistryException&)
{
@@ -578,7 +578,7 @@ void test_DefaultRegistry(
xRootKey->deleteLink(OUString( "/Test/FifthKey/MyFirstLink/WithSubSubKey/MyFourthLink" ));
- xKey = xRootKey->openKey(OUString( "/Test/DefaultLink/SecondSubSubKey" ));
+ xKey = xRootKey->openKey("/Test/DefaultLink/SecondSubSubKey");
if (xKey.is())
{
OSL_ENSURE( xKey->getKeyName() == OUString( "/Test/ThirdKey/FirstSubKey/SecondSubSubKey" ), "test_DefaultRegistry error 23" );
@@ -590,7 +590,7 @@ void test_DefaultRegistry(
"test_DefaultRegistry error 24" );
}
- xKey = xRootKey->openKey(OUString( "Test" ));
+ xKey = xRootKey->openKey("Test");
OSL_ENSURE( xKey->isValid(), "test_DefaultRegistry error 25" );
xRootKey->deleteKey(OUString( "Test" ));
@@ -608,7 +608,7 @@ void test_DefaultRegistry(
testreg2);
}
- xKey = xRootKey->openKey(OUString( "/AllFromTestreg2/ThirdKey/FirstSubKey" ));
+ xKey = xRootKey->openKey("/AllFromTestreg2/ThirdKey/FirstSubKey");
if (xKey.is())
{
xRootKey->deleteKey(OUString( "/AllFromTestreg2" ));
diff --git a/stoc/test/testsmgr_cpnt.cxx b/stoc/test/testsmgr_cpnt.cxx
index b8e100f18952..e2d073f6bfc9 100644
--- a/stoc/test/testsmgr_cpnt.cxx
+++ b/stoc/test/testsmgr_cpnt.cxx
@@ -222,14 +222,14 @@ extern "C" void SAL_CALL test_ServiceManager()
OSL_ENSURE( nLen == 8, "more than 6 factories" );
// try to get an instance for a unknown service
- OSL_VERIFY( !xSMgr->createInstance(OUString("bla.blup.Q")).is() );
+ OSL_VERIFY( !xSMgr->createInstance("bla.blup.Q").is() );
//
// First test : register service via the internal function of the component itself
//
{
Reference< XImplementationRegistration >
- xInst( xSMgr->createInstance(OUString("com.sun.star.registry.ImplementationRegistration")), UNO_QUERY );
+ xInst( xSMgr->createInstance("com.sun.star.registry.ImplementationRegistration"), UNO_QUERY );
OSL_ENSURE( xInst.is(), "no ImplementationRegistration" );
try {
@@ -248,7 +248,7 @@ extern "C" void SAL_CALL test_ServiceManager()
// tests, if a service provider can be instantiated.
- Reference< XInterface > xIFace(xSMgr->createInstance(OUString("com.sun.star.ts.TestManagerImpl")));
+ Reference< XInterface > xIFace(xSMgr->createInstance("com.sun.star.ts.TestManagerImpl"));
OSL_ENSURE( xIFace.is(), "loadable service not found" );
// remove the service