Kaydet (Commit) 8eb9f980 authored tarafından Lars Langhans's avatar Lars Langhans

gfxcmp02: #159601# cleanups

üst 049d8555
/*
* 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;
}
}
......@@ -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 ");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment