java: code some code to use non-deprecated constructors

Change-Id: I4194a3dfd361d1955cf5bb4fab915150eecfa21a
This commit is contained in:
Noel Grandin
2014-08-05 11:42:57 +02:00
parent 2d700944b5
commit 336f3b9153
6 changed files with 30 additions and 25 deletions

View File

@@ -193,6 +193,7 @@ public class LocalOfficeConnection
* @param containerFactory This is a application provided AWT container
* factory.
*/
@Deprecated
public void setContainerFactory(ContainerFactory containerFactory)
{
}
@@ -221,6 +222,7 @@ public class LocalOfficeConnection
* @param container This is an AWT container.
* @return The office window instance.
*/
@Deprecated
public OfficeWindow createOfficeWindow(Container container)
{
return new LocalOfficeWindow(this);

View File

@@ -19,6 +19,7 @@ package complex.bean;
import java.awt.event.*;
import com.sun.star.comp.beans.OOoBean;
import com.sun.star.uno.UnoRuntime;
@@ -28,6 +29,7 @@ import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.openoffice.test.OfficeConnection;
import static org.junit.Assert.*;
class PrivateLocalOfficeConnection extends com.sun.star.comp.beans.LocalOfficeConnection
@@ -38,6 +40,7 @@ class PrivateLocalOfficeConnection extends com.sun.star.comp.beans.LocalOfficeCo
}
}
@Deprecated
public class OOoBeanTest
{

View File

@@ -26,7 +26,7 @@ import com.sun.star.loader.XImplementationLoader;
import com.sun.star.registry.XSimpleRegistry;
@Deprecated
public class SharedLibraryLoader_Test {
private static final String NATIVE_SERVICE_MANAGER_IMP_NAME = "com.sun.star.comp.stoc.OServiceManager";

View File

@@ -35,7 +35,7 @@ import com.sun.star.comp.helper.RegistryServiceFactory;
import com.sun.star.uno.UnoRuntime;
@Deprecated
public class Factory_Test
extends WeakBase
implements XServiceInfo

View File

@@ -35,25 +35,27 @@
// __________ Imports __________
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.Any;
// factory for creating components
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.beans.XPropertySet;
// application specific classes
import com.sun.star.chart.XChartDocument;
import com.sun.star.chart.XDiagram;
import com.sun.star.drawing.*;
import com.sun.star.frame.XModel;
import com.sun.star.text.XTextDocument;
import com.sun.star.text.XTextContent;
import com.sun.star.text.XTextCursor;
import com.sun.star.text.XText;
// base graphics things
import com.sun.star.awt.Point;
import com.sun.star.awt.Size;
import com.sun.star.beans.XPropertySet;
// application specific classes
import com.sun.star.chart.XChartDocument;
import com.sun.star.chart.XDiagram;
import com.sun.star.drawing.XDrawPageSupplier;
import com.sun.star.drawing.XDrawPagesSupplier;
import com.sun.star.drawing.XShape;
import com.sun.star.drawing.XShapes;
import com.sun.star.frame.XModel;
// factory for creating components
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.text.XText;
import com.sun.star.text.XTextContent;
import com.sun.star.text.XTextCursor;
import com.sun.star.text.XTextDocument;
import com.sun.star.uno.Any;
import com.sun.star.uno.Type;
import com.sun.star.uno.UnoRuntime;
// __________ Implementation __________
@@ -90,7 +92,7 @@ public class ChartHelper
XPropertySet xPropSet = UnoRuntime.queryInterface(
XPropertySet.class, xTextContent);
Any aAny = new Any(String.class, msChartClassID);
Any aAny = new Any(new Type(String.class), msChartClassID);
xPropSet.setPropertyValue("CLSID", aAny );
XTextDocument xTextDoc = UnoRuntime.queryInterface(XTextDocument.class,
@@ -106,15 +108,15 @@ public class ChartHelper
XShape.class, xTextContent);
xShape.setSize( aExtent );
aAny = new Any(Short.class,
aAny = new Any(new Type(Short.class),
new Short(com.sun.star.text.VertOrientation.NONE));
xPropSet.setPropertyValue("VertOrient", aAny );
aAny = new Any(Short.class,
aAny = new Any(new Type(Short.class),
new Short(com.sun.star.text.HoriOrientation.NONE));
xPropSet.setPropertyValue("HoriOrient", aAny );
aAny = new Any(Integer.class, new Integer(aUpperLeft.Y));
aAny = new Any(new Type(Integer.class), new Integer(aUpperLeft.Y));
xPropSet.setPropertyValue("VertOrientPosition", aAny );
aAny = new Any(Integer.class, new Integer(aUpperLeft.X));
aAny = new Any(new Type(Integer.class), new Integer(aUpperLeft.X));
xPropSet.setPropertyValue("HoriOrientPosition", aAny );
// retrieve the chart document as model of the OLE shape

View File

@@ -39,8 +39,6 @@ import com.sun.star.uno.Type;
*/
public class Parameters implements XPropertySet {
/* final protected Map parameters;
final Parameters defaults; */
final protected Map<String, Object> parameters;
final Parameters defaults;
Property[] props;