diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-04 13:16:37 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-04 13:38:30 +0200 |
commit | f493555623fb36bb51e78a4630483271ed36afe7 (patch) | |
tree | ddd107373aafbcbdd3f31a1fd5f4e53e7c073f59 /qadevOOo/tests/java/ifc/frame/_XDispatchRecorderSupplier.java | |
parent | cebdd852165cd3080a4eee885dceadcc41173ef3 (diff) |
java: remove some casting in lib.TestParameters#getMSF
where the return value is always cast to XMultiServiceFactory,
so just do the cast in the method and avoid noise at the call sites.
Change-Id: I3a2e06ac6edb3c6021eda6442032db57aaa22e13
Diffstat (limited to 'qadevOOo/tests/java/ifc/frame/_XDispatchRecorderSupplier.java')
-rw-r--r-- | qadevOOo/tests/java/ifc/frame/_XDispatchRecorderSupplier.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/qadevOOo/tests/java/ifc/frame/_XDispatchRecorderSupplier.java b/qadevOOo/tests/java/ifc/frame/_XDispatchRecorderSupplier.java index 7a868c9dd15c..4c529b7c968d 100644 --- a/qadevOOo/tests/java/ifc/frame/_XDispatchRecorderSupplier.java +++ b/qadevOOo/tests/java/ifc/frame/_XDispatchRecorderSupplier.java @@ -74,13 +74,13 @@ public class _XDispatchRecorderSupplier extends MultiMethodTest { * service created for obtaining document's frame. */ protected void before() { - SOfficeFactory SOF = SOfficeFactory.getFactory((XMultiServiceFactory) tParam.getMSF()); + SOfficeFactory SOF = SOfficeFactory.getFactory(tParam.getMSF()); try { log.println( "creating a text document" ); xTextDoc = SOF.createTextDoc(null); - Object inst = ((XMultiServiceFactory)tParam.getMSF()).createInstance + Object inst = tParam.getMSF().createInstance ("com.sun.star.frame.Desktop"); desktop = UnoRuntime.queryInterface (XDesktop.class, inst); @@ -163,7 +163,7 @@ public class _XDispatchRecorderSupplier extends MultiMethodTest { boolean res = true; if (recorder == null) { try { - Object inst = ((XMultiServiceFactory) tParam.getMSF()).createInstance + Object inst = tParam.getMSF().createInstance ("com.sun.star.comp.framework.DispatchRecorder"); recorder = UnoRuntime.queryInterface (XDispatchRecorder.class, inst); @@ -182,7 +182,7 @@ public class _XDispatchRecorderSupplier extends MultiMethodTest { XDispatchProvider xDispProv = UnoRuntime.queryInterface(XDispatchProvider.class, fr); - URL dispURL = utils.parseURL((XMultiServiceFactory) tParam.getMSF(), ".uno:InsertText"); + URL dispURL = utils.parseURL(tParam.getMSF(), ".uno:InsertText"); XDispatch xDisp = xDispProv.queryDispatch(dispURL,"",0); |