summaryrefslogtreecommitdiff
path: root/dbaccess/qa
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-01-16 16:06:33 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-01-16 18:40:05 +0100
commit62951cdd17530f6218232f3d482bfd4ddd8a95ec (patch)
tree98376b3704c388143eefcb6abce624a48236eb74 /dbaccess/qa
parent997d21183322a0a94b96868073808841d2773902 (diff)
Introduce com.sun.star.frame.theGlobalEventBroadcaster singleton
...to supersede com.sun.star.frame.GlobalEventBroadcaster single-instance service. Change-Id: I74ecaadadb4c600d39979aa7c13b6389bed38fd7
Diffstat (limited to 'dbaccess/qa')
-rw-r--r--dbaccess/qa/complex/dbaccess/Beamer.java6
-rw-r--r--dbaccess/qa/complex/dbaccess/DatabaseDocument.java9
2 files changed, 10 insertions, 5 deletions
diff --git a/dbaccess/qa/complex/dbaccess/Beamer.java b/dbaccess/qa/complex/dbaccess/Beamer.java
index 6fc022c4fe52..97c4c6b4f45b 100644
--- a/dbaccess/qa/complex/dbaccess/Beamer.java
+++ b/dbaccess/qa/complex/dbaccess/Beamer.java
@@ -20,14 +20,15 @@ package complex.dbaccess;
import com.sun.star.beans.PropertyState;
import com.sun.star.beans.PropertyValue;
import com.sun.star.container.XEnumeration;
-import com.sun.star.container.XEnumerationAccess;
import com.sun.star.frame.FrameSearchFlag;
import com.sun.star.frame.XComponentLoader;
import com.sun.star.frame.XController;
import com.sun.star.frame.XDispatch;
import com.sun.star.frame.XDispatchProvider;
import com.sun.star.frame.XFrame;
+import com.sun.star.frame.XGlobalEventBroadcaster;
import com.sun.star.frame.XModel;
+import com.sun.star.frame.theGlobalEventBroadcaster;
import com.sun.star.lang.XComponent;
import com.sun.star.sdb.CommandType;
import com.sun.star.uno.Exception;
@@ -111,7 +112,8 @@ public class Beamer extends TestCase
final XFrame beamer = frame.findFrame("_beamer", 0);
assertNotNull(beamer);
- final XEnumerationAccess evtBc = UnoRuntime.queryInterface(XEnumerationAccess.class, getMSF().createInstance("com.sun.star.frame.GlobalEventBroadcaster"));
+ final XGlobalEventBroadcaster evtBc = theGlobalEventBroadcaster.get(
+ getComponentContext());
XEnumeration enumeration = evtBc.createEnumeration();
int count = -1;
while (enumeration.hasMoreElements())
diff --git a/dbaccess/qa/complex/dbaccess/DatabaseDocument.java b/dbaccess/qa/complex/dbaccess/DatabaseDocument.java
index fc5999dcba5f..7f1ab1309811 100644
--- a/dbaccess/qa/complex/dbaccess/DatabaseDocument.java
+++ b/dbaccess/qa/complex/dbaccess/DatabaseDocument.java
@@ -36,7 +36,6 @@ import com.sun.star.beans.PropertyValue;
import com.sun.star.beans.XPropertySet;
import com.sun.star.container.XNameContainer;
import com.sun.star.container.XSet;
-import com.sun.star.document.XDocumentEventBroadcaster;
import com.sun.star.document.XDocumentEventListener;
import com.sun.star.document.XEmbeddedScripts;
import com.sun.star.document.XEventsSupplier;
@@ -45,10 +44,12 @@ import com.sun.star.frame.XComponentLoader;
import com.sun.star.frame.XDispatch;
import com.sun.star.frame.XDispatchProvider;
import com.sun.star.frame.XFrame;
+import com.sun.star.frame.XGlobalEventBroadcaster;
import com.sun.star.frame.XLoadable;
import com.sun.star.frame.XModel;
import com.sun.star.frame.XModel2;
import com.sun.star.frame.XTitle;
+import com.sun.star.frame.theGlobalEventBroadcaster;
import com.sun.star.lang.EventObject;
import com.sun.star.lang.XServiceInfo;
import com.sun.star.lang.XSingleComponentFactory;
@@ -260,7 +261,8 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document.
globalFactory.insert(m_callbackFactory);
// register ourself as listener at the global event broadcaster
- final XDocumentEventBroadcaster broadcaster = UnoRuntime.queryInterface(XDocumentEventBroadcaster.class, getMSF().createInstance("com.sun.star.frame.GlobalEventBroadcaster"));
+ final XGlobalEventBroadcaster broadcaster
+ = theGlobalEventBroadcaster.get(getComponentContext());
broadcaster.addDocumentEventListener(this);
}
catch (Exception e)
@@ -282,7 +284,8 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document.
m_callbackFactory.dispose();
// revoke ourself as listener at the global event broadcaster
- final XDocumentEventBroadcaster broadcaster = UnoRuntime.queryInterface(XDocumentEventBroadcaster.class, getMSF().createInstance("com.sun.star.frame.GlobalEventBroadcaster"));
+ final XGlobalEventBroadcaster broadcaster
+ = theGlobalEventBroadcaster.get(getComponentContext());
broadcaster.removeDocumentEventListener(this);
}
catch (Exception e)