summaryrefslogtreecommitdiff
path: root/odk/examples/DevelopersGuide/GUI
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-01-08 09:10:29 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-01-08 09:10:29 +0100
commit382b013275f0dd81d6bbf299782f59d2735c5beb (patch)
tree6fcfccba42ff0ced32342b5c2720dfaf38da19eb /odk/examples/DevelopersGuide/GUI
parentb45e8153b28b7447a922129d3e3a182315c8b337 (diff)
Some ConfigurationProvider -> theDefaultProvider simplifications
Change-Id: I7c25cd94f8a1ca339f7423c26f21f13c7a68906d
Diffstat (limited to 'odk/examples/DevelopersGuide/GUI')
-rw-r--r--odk/examples/DevelopersGuide/GUI/UnoDialogSample.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java b/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java
index e69799580746..851158f91d81 100644
--- a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java
+++ b/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java
@@ -76,6 +76,7 @@ import com.sun.star.awt.XWindowPeer;
import com.sun.star.beans.PropertyValue;
import com.sun.star.beans.XMultiPropertySet;
import com.sun.star.beans.XPropertySet;
+import com.sun.star.configuration.theDefaultProvider;
import com.sun.star.container.XIndexContainer;
import com.sun.star.container.XNameAccess;
import com.sun.star.container.XNameContainer;
@@ -193,13 +194,11 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
*/
public XNameAccess getRegistryKeyContent(String _sKeyName){
try {
- Object oConfigProvider;
PropertyValue[] aNodePath = new PropertyValue[1];
- oConfigProvider = m_xMCF.createInstanceWithContext("com.sun.star.configuration.ConfigurationProvider", this.m_xContext);
+ XMultiServiceFactory xMSFConfig = theDefaultProvider.get(m_xContext);
aNodePath[0] = new PropertyValue();
aNodePath[0].Name = "nodepath";
aNodePath[0].Value = _sKeyName;
- XMultiServiceFactory xMSFConfig = UnoRuntime.queryInterface(XMultiServiceFactory.class, oConfigProvider);
Object oNode = xMSFConfig.createInstanceWithArguments("com.sun.star.configuration.ConfigurationAccess", aNodePath);
XNameAccess xNameAccess = UnoRuntime.queryInterface(XNameAccess.class, oNode);
return xNameAccess;