summaryrefslogtreecommitdiff
path: root/stoc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-02-14 16:10:00 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-02-15 14:17:25 +0000
commit9a7d112603393ad45b71d36860ac7d0d8175c06d (patch)
tree066c5fb585a2ccf3e39343c227817fee5220f2c2 /stoc
parent90e6afc6e236ebe7abcc406fa9cb9d5455f0ae81 (diff)
Some simplifications, using UNO_QUERY_THROW
Change-Id: Icc72bd482d37e1857137470a8357659ab4d0a969 Reviewed-on: https://gerrit.libreoffice.org/34257 Tested-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'stoc')
-rw-r--r--stoc/source/javaloader/javaloader.cxx5
-rw-r--r--stoc/source/javavm/javavm.cxx16
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);