diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2011-11-14 22:07:23 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2011-11-14 22:07:23 +0100 |
commit | 8b75883b87c9f7989f98fb413f5e51200c52891c (patch) | |
tree | 5eaf6d052d25c61654b4e06ffb67784eab9d263b /odk | |
parent | avoid trying to run stuff at configure time due to cross-compile need (diff) | |
download | core-8b75883b87c9f7989f98fb413f5e51200c52891c.tar.gz core-8b75883b87c9f7989f98fb413f5e51200c52891c.zip |
Simplified some uses of css.configuration.theDefaultProvider.
* Retro-added new-style UNOIDL singleton specification for it, for easy
instantiation.
* Plus new comphelper::getComponentContext to map from XMultiServiceFactory
to XComponentContext.
Diffstat (limited to 'odk')
-rw-r--r-- | odk/examples/java/Inspector/Inspector.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/odk/examples/java/Inspector/Inspector.java b/odk/examples/java/Inspector/Inspector.java index c8887d4c0344..39daa05e8826 100644 --- a/odk/examples/java/Inspector/Inspector.java +++ b/odk/examples/java/Inspector/Inspector.java @@ -38,6 +38,7 @@ import com.sun.star.awt.XMessageBoxFactory; import com.sun.star.awt.XWindowPeer; import com.sun.star.beans.NamedValue; import com.sun.star.beans.XPropertySet; +import com.sun.star.configuration.theDefaultProvider; import com.sun.star.container.XNameAccess; import com.sun.star.frame.XModel; import com.sun.star.lang.XComponent; @@ -410,8 +411,7 @@ public class Inspector{ sAccess = "com.sun.star.configuration.ConfigurationAccess"; } XMultiComponentFactory xMCF = m_xComponentContext.getServiceManager(); - Object oDefaultProvider = xMCF.createInstanceWithContext("com.sun.star.configuration.DefaultProvider", this.getXComponentContext()); - XMultiServiceFactory xMSFCfg = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, oDefaultProvider); + XMultiServiceFactory xMSFCfg = theDefaultProvider.get(this.getXComponentContext()); Object oAccess = xMSFCfg.createInstanceWithArguments(sAccess, new Object[]{new NamedValue("nodepath", _sNodePath)}); xNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, oAccess); } catch (com.sun.star.uno.Exception e) { |