summaryrefslogtreecommitdiff
path: root/framework/qa
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 /framework/qa
parentb45e8153b28b7447a922129d3e3a182315c8b337 (diff)
Some ConfigurationProvider -> theDefaultProvider simplifications
Change-Id: I7c25cd94f8a1ca339f7423c26f21f13c7a68906d
Diffstat (limited to 'framework/qa')
-rw-r--r--framework/qa/complex/accelerators/AcceleratorsConfigurationTest.java4
-rw-r--r--framework/qa/complex/framework/autosave/AutoSave.java2
-rw-r--r--framework/qa/complex/framework/autosave/ConfigHelper.java8
3 files changed, 7 insertions, 7 deletions
diff --git a/framework/qa/complex/accelerators/AcceleratorsConfigurationTest.java b/framework/qa/complex/accelerators/AcceleratorsConfigurationTest.java
index 96f24e57da30..c5cc63253f25 100644
--- a/framework/qa/complex/accelerators/AcceleratorsConfigurationTest.java
+++ b/framework/qa/complex/accelerators/AcceleratorsConfigurationTest.java
@@ -21,6 +21,7 @@ package complex.accelerators;
import com.sun.star.awt.KeyEvent;
import com.sun.star.beans.PropertyValue;
import com.sun.star.beans.XPropertySet;
+import com.sun.star.configuration.theDefaultProvider;
import com.sun.star.container.XNameAccess;
import com.sun.star.embed.XStorage;
import com.sun.star.embed.XTransactedObject;
@@ -750,7 +751,8 @@ public class AcceleratorsConfigurationTest
boolean bReadOnly)
throws java.lang.Exception
{
- XMultiServiceFactory xConfigRoot = UnoRuntime.queryInterface(XMultiServiceFactory.class, xSMGR.createInstance("com.sun.star.configuration.ConfigurationProvider"));
+ XMultiServiceFactory xConfigRoot = theDefaultProvider.get(
+ connection.getComponentContext());
PropertyValue[] lParams = new PropertyValue[2];
lParams[0] = new PropertyValue();
diff --git a/framework/qa/complex/framework/autosave/AutoSave.java b/framework/qa/complex/framework/autosave/AutoSave.java
index ec80058782fa..92d95f8da5cf 100644
--- a/framework/qa/complex/framework/autosave/AutoSave.java
+++ b/framework/qa/complex/framework/autosave/AutoSave.java
@@ -208,7 +208,7 @@ public class AutoSave
// prepare AutoSave
// make sure it will be started every 1 min
- ConfigHelper aConfig = new ConfigHelper(m_xSMGR, "org.openoffice.Office.Recovery", false);
+ ConfigHelper aConfig = new ConfigHelper(connection.getComponentContext(), "org.openoffice.Office.Recovery", false);
aConfig.writeRelativeKey("AutoSave", "Enabled" , Boolean.TRUE );
aConfig.writeRelativeKey("AutoSave", "TimeIntervall", new Integer(1)); // 1 min
aConfig.flush();
diff --git a/framework/qa/complex/framework/autosave/ConfigHelper.java b/framework/qa/complex/framework/autosave/ConfigHelper.java
index 8de6e87505ff..ab11a324478e 100644
--- a/framework/qa/complex/framework/autosave/ConfigHelper.java
+++ b/framework/qa/complex/framework/autosave/ConfigHelper.java
@@ -20,24 +20,22 @@ package complex.framework.autosave;
import com.sun.star.uno.*;
import com.sun.star.lang.*;
+import com.sun.star.configuration.theDefaultProvider;
import com.sun.star.container.*;
import com.sun.star.beans.*;
import com.sun.star.util.*;
class ConfigHelper
{
- private XMultiServiceFactory m_xSMGR = null;
private XHierarchicalNameAccess m_xConfig = null;
//-----------------------------------------------
- public ConfigHelper(XMultiServiceFactory xSMGR ,
+ public ConfigHelper(XComponentContext context,
String sConfigPath ,
boolean bReadOnly )
throws com.sun.star.uno.Exception
{
- m_xSMGR = xSMGR;
-
- XMultiServiceFactory xConfigRoot = UnoRuntime.queryInterface(XMultiServiceFactory.class, m_xSMGR.createInstance("com.sun.star.configuration.ConfigurationProvider"));
+ XMultiServiceFactory xConfigRoot = theDefaultProvider.get(context);
PropertyValue[] lParams = new PropertyValue[1];
lParams[0] = new PropertyValue();