diff options
Diffstat (limited to 'stoc')
-rw-r--r-- | stoc/source/javaloader/javaloader.cxx | 5 | ||||
-rw-r--r-- | stoc/source/javavm/javavm.cxx | 16 |
2 files changed, 4 insertions, 17 deletions
diff --git a/stoc/source/javaloader/javaloader.cxx b/stoc/source/javaloader/javaloader.cxx index 5b421b0ba253..7ff8f610c8aa 100644 --- a/stoc/source/javaloader/javaloader.cxx +++ b/stoc/source/javaloader/javaloader.cxx @@ -257,10 +257,7 @@ const css::uno::Reference<XImplementationLoader> & JavaComponentLoader::getJavaL } // set the service manager at the javaloader - css::uno::Reference<XInitialization> javaLoader_XInitialization(m_javaLoader, UNO_QUERY); - if(!javaLoader_XInitialization.is()) - throw RuntimeException( - "javaloader error - initialization of java javaloader failed, no XInitialization"); + css::uno::Reference<XInitialization> javaLoader_XInitialization(m_javaLoader, UNO_QUERY_THROW); Any any; any <<= css::uno::Reference<XMultiComponentFactory>( diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx index ee5069d98752..ef8e8aefa345 100644 --- a/stoc/source/javavm/javavm.cxx +++ b/stoc/source/javavm/javavm.cxx @@ -273,9 +273,7 @@ void getINetPropsFromConfig(stoc_javavm::JVM * pjvm, xCtx ); if(!xConfRegistry.is()) throw css::uno::RuntimeException("javavm.cxx: couldn't get ConfigurationRegistry", nullptr); - css::uno::Reference<css::registry::XSimpleRegistry> xConfRegistry_simple(xConfRegistry, css::uno::UNO_QUERY); - if(!xConfRegistry_simple.is()) throw css::uno::RuntimeException("javavm.cxx: couldn't get ConfigurationRegistry", nullptr); - + css::uno::Reference<css::registry::XSimpleRegistry> xConfRegistry_simple(xConfRegistry, css::uno::UNO_QUERY_THROW); xConfRegistry_simple->open("org.openoffice.Inet", true, false); css::uno::Reference<css::registry::XRegistryKey> xRegistryRootKey = xConfRegistry_simple->getRootKey(); @@ -358,11 +356,7 @@ void getDefaultLocaleFromConfig( "javavm.cxx: couldn't get ConfigurationRegistry", nullptr); css::uno::Reference<css::registry::XSimpleRegistry> xConfRegistry_simple( - xConfRegistry, css::uno::UNO_QUERY); - if(!xConfRegistry_simple.is()) - throw css::uno::RuntimeException( - "javavm.cxx: couldn't get ConfigurationRegistry", nullptr); - + xConfRegistry, css::uno::UNO_QUERY_THROW); xConfRegistry_simple->open("org.openoffice.Setup", true, false); css::uno::Reference<css::registry::XRegistryKey> xRegistryRootKey = xConfRegistry_simple->getRootKey(); @@ -464,11 +458,7 @@ void getJavaPropsFromSafetySettings( "javavm.cxx: couldn't get ConfigurationRegistry", nullptr); css::uno::Reference<css::registry::XSimpleRegistry> xConfRegistry_simple( - xConfRegistry, css::uno::UNO_QUERY); - if(!xConfRegistry_simple.is()) - throw css::uno::RuntimeException( - "javavm.cxx: couldn't get ConfigurationRegistry", nullptr); - + xConfRegistry, css::uno::UNO_QUERY_THROW); xConfRegistry_simple->open( "org.openoffice.Office.Java", true, false); |