Kaydet (Commit) 9a7d1126 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Some simplifications, using UNO_QUERY_THROW

Change-Id: Icc72bd482d37e1857137470a8357659ab4d0a969
Reviewed-on: https://gerrit.libreoffice.org/34257Tested-by: 's avatarStephan Bergmann <sbergman@redhat.com>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 90e6afc6
......@@ -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>(
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment