diff options
author | Lars Langhans <lla@openoffice.org> | 2010-05-10 13:35:27 +0200 |
---|---|---|
committer | Lars Langhans <lla@openoffice.org> | 2010-05-10 13:35:27 +0200 |
commit | 8eb9f980b429bd8f553460025600c601a8e45ecf (patch) | |
tree | 04e4a09b66a71a615a2d3c50b6a3a147919738d7 /qadevOOo | |
parent | 049d85552cbdfef0c0147a6bdc9e2e9a14ecc513 (diff) |
gfxcmp02: #159601# cleanups
Diffstat (limited to 'qadevOOo')
-rw-r--r-- | qadevOOo/runner/graphical/Tolerance.java | 23 | ||||
-rw-r--r-- | qadevOOo/runner/helper/OfficeProvider.java | 30 |
2 files changed, 33 insertions, 20 deletions
diff --git a/qadevOOo/runner/graphical/Tolerance.java b/qadevOOo/runner/graphical/Tolerance.java new file mode 100644 index 000000000000..90e853c9124c --- /dev/null +++ b/qadevOOo/runner/graphical/Tolerance.java @@ -0,0 +1,23 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package graphical; + +/** + * + * @author ll93751 + */ +public class Tolerance +{ + private int m_nTolerance; + public Tolerance(int _nAccept) + { + m_nTolerance = _nAccept; + } + public int getAccept() + { + return m_nTolerance; + } +} diff --git a/qadevOOo/runner/helper/OfficeProvider.java b/qadevOOo/runner/helper/OfficeProvider.java index adeecbdeba1d..8589de47ea82 100644 --- a/qadevOOo/runner/helper/OfficeProvider.java +++ b/qadevOOo/runner/helper/OfficeProvider.java @@ -130,9 +130,7 @@ public class OfficeProvider implements AppProvider try { - desk = (XDesktop) UnoRuntime.queryInterface(XDesktop.class, - msf.createInstance( - "com.sun.star.frame.Desktop")); + desk = UnoRuntime.queryInterface(XDesktop.class, msf.createInstance("com.sun.star.frame.Desktop")); } catch (com.sun.star.uno.Exception ue) { @@ -341,18 +339,15 @@ public class OfficeProvider implements AppProvider { // Get component context - final XComponentContext xcomponentcontext = com.sun.star.comp.helper.Bootstrap.createInitialComponentContext( - null); + final XComponentContext xcomponentcontext = com.sun.star.comp.helper.Bootstrap.createInitialComponentContext(null); // initial serviceManager final XMultiComponentFactory xLocalServiceManager = xcomponentcontext.getServiceManager(); // create a connector, so that it can contact the office // XUnoUrlResolver urlResolver = UnoUrlResolver.create(xcomponentcontext); - final Object xUrlResolver = xLocalServiceManager.createInstanceWithContext( - "com.sun.star.bridge.UnoUrlResolver", xcomponentcontext); - final XUnoUrlResolver urlResolver = (XUnoUrlResolver) UnoRuntime.queryInterface( - XUnoUrlResolver.class, xUrlResolver); + final Object xUrlResolver = xLocalServiceManager.createInstanceWithContext("com.sun.star.bridge.UnoUrlResolver", xcomponentcontext); + final XUnoUrlResolver urlResolver = UnoRuntime.queryInterface(XUnoUrlResolver.class, xUrlResolver); final Object rInitialObject = urlResolver.resolve(connectStr); @@ -363,8 +358,7 @@ public class OfficeProvider implements AppProvider debug = true; dbg("resolved url"); - xMSF = (XMultiServiceFactory) UnoRuntime.queryInterface( - XMultiServiceFactory.class, rInitialObject); + xMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, rInitialObject); } return xMSF; @@ -485,7 +479,7 @@ public class OfficeProvider implements AppProvider try { Object quickStarter = msf.createInstance("com.sun.star.office.Quickstart"); - XFastPropertySet fps = (XFastPropertySet) UnoRuntime.queryInterface(XFastPropertySet.class, quickStarter); + XFastPropertySet fps = UnoRuntime.queryInterface(XFastPropertySet.class, quickStarter); fps.setFastPropertyValue(0, false); } catch (com.sun.star.uno.Exception ex) @@ -495,9 +489,7 @@ public class OfficeProvider implements AppProvider try { - desk = (XDesktop) UnoRuntime.queryInterface(XDesktop.class, - msf.createInstance( - "com.sun.star.frame.Desktop")); + desk = UnoRuntime.queryInterface(XDesktop.class, msf.createInstance("com.sun.star.frame.Desktop")); msf = null; if (desk != null) @@ -616,9 +608,7 @@ public class OfficeProvider implements AppProvider { while (compEnum.hasMoreElements()) { - final XCloseable closer = (XCloseable) UnoRuntime.queryInterface( - XCloseable.class, - compEnum.nextElement()); + final XCloseable closer = UnoRuntime.queryInterface(XCloseable.class, compEnum.nextElement()); if (closer != null) { @@ -658,8 +648,7 @@ public class OfficeProvider implements AppProvider if (xPathSubst != null) { - return (XStringSubstitution) UnoRuntime.queryInterface( - XStringSubstitution.class, xPathSubst); + return UnoRuntime.queryInterface(XStringSubstitution.class, xPathSubst); } else { @@ -790,6 +779,7 @@ public class OfficeProvider implements AppProvider this.ow = ow; } + @Override public void run() { System.out.println(utils.getDateTime() + "OfficeProvider:Owp: start "); |