java: code some code to use non-deprecated constructors
Change-Id: I4194a3dfd361d1955cf5bb4fab915150eecfa21a
This commit is contained in:
@@ -193,6 +193,7 @@ public class LocalOfficeConnection
|
|||||||
* @param containerFactory This is a application provided AWT container
|
* @param containerFactory This is a application provided AWT container
|
||||||
* factory.
|
* factory.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public void setContainerFactory(ContainerFactory containerFactory)
|
public void setContainerFactory(ContainerFactory containerFactory)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -221,6 +222,7 @@ public class LocalOfficeConnection
|
|||||||
* @param container This is an AWT container.
|
* @param container This is an AWT container.
|
||||||
* @return The office window instance.
|
* @return The office window instance.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public OfficeWindow createOfficeWindow(Container container)
|
public OfficeWindow createOfficeWindow(Container container)
|
||||||
{
|
{
|
||||||
return new LocalOfficeWindow(this);
|
return new LocalOfficeWindow(this);
|
||||||
|
@@ -19,6 +19,7 @@ package complex.bean;
|
|||||||
|
|
||||||
|
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
|
|
||||||
import com.sun.star.comp.beans.OOoBean;
|
import com.sun.star.comp.beans.OOoBean;
|
||||||
import com.sun.star.uno.UnoRuntime;
|
import com.sun.star.uno.UnoRuntime;
|
||||||
|
|
||||||
@@ -28,6 +29,7 @@ import org.junit.AfterClass;
|
|||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.openoffice.test.OfficeConnection;
|
import org.openoffice.test.OfficeConnection;
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
class PrivateLocalOfficeConnection extends com.sun.star.comp.beans.LocalOfficeConnection
|
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
|
public class OOoBeanTest
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@@ -26,7 +26,7 @@ import com.sun.star.loader.XImplementationLoader;
|
|||||||
|
|
||||||
import com.sun.star.registry.XSimpleRegistry;
|
import com.sun.star.registry.XSimpleRegistry;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public class SharedLibraryLoader_Test {
|
public class SharedLibraryLoader_Test {
|
||||||
|
|
||||||
private static final String NATIVE_SERVICE_MANAGER_IMP_NAME = "com.sun.star.comp.stoc.OServiceManager";
|
private static final String NATIVE_SERVICE_MANAGER_IMP_NAME = "com.sun.star.comp.stoc.OServiceManager";
|
||||||
|
@@ -35,7 +35,7 @@ import com.sun.star.comp.helper.RegistryServiceFactory;
|
|||||||
import com.sun.star.uno.UnoRuntime;
|
import com.sun.star.uno.UnoRuntime;
|
||||||
|
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public class Factory_Test
|
public class Factory_Test
|
||||||
extends WeakBase
|
extends WeakBase
|
||||||
implements XServiceInfo
|
implements XServiceInfo
|
||||||
|
@@ -35,25 +35,27 @@
|
|||||||
// __________ Imports __________
|
// __________ 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
|
// base graphics things
|
||||||
import com.sun.star.awt.Point;
|
import com.sun.star.awt.Point;
|
||||||
import com.sun.star.awt.Size;
|
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 __________
|
// __________ Implementation __________
|
||||||
|
|
||||||
@@ -90,7 +92,7 @@ public class ChartHelper
|
|||||||
XPropertySet xPropSet = UnoRuntime.queryInterface(
|
XPropertySet xPropSet = UnoRuntime.queryInterface(
|
||||||
XPropertySet.class, xTextContent);
|
XPropertySet.class, xTextContent);
|
||||||
|
|
||||||
Any aAny = new Any(String.class, msChartClassID);
|
Any aAny = new Any(new Type(String.class), msChartClassID);
|
||||||
xPropSet.setPropertyValue("CLSID", aAny );
|
xPropSet.setPropertyValue("CLSID", aAny );
|
||||||
|
|
||||||
XTextDocument xTextDoc = UnoRuntime.queryInterface(XTextDocument.class,
|
XTextDocument xTextDoc = UnoRuntime.queryInterface(XTextDocument.class,
|
||||||
@@ -106,15 +108,15 @@ public class ChartHelper
|
|||||||
XShape.class, xTextContent);
|
XShape.class, xTextContent);
|
||||||
xShape.setSize( aExtent );
|
xShape.setSize( aExtent );
|
||||||
|
|
||||||
aAny = new Any(Short.class,
|
aAny = new Any(new Type(Short.class),
|
||||||
new Short(com.sun.star.text.VertOrientation.NONE));
|
new Short(com.sun.star.text.VertOrientation.NONE));
|
||||||
xPropSet.setPropertyValue("VertOrient", aAny );
|
xPropSet.setPropertyValue("VertOrient", aAny );
|
||||||
aAny = new Any(Short.class,
|
aAny = new Any(new Type(Short.class),
|
||||||
new Short(com.sun.star.text.HoriOrientation.NONE));
|
new Short(com.sun.star.text.HoriOrientation.NONE));
|
||||||
xPropSet.setPropertyValue("HoriOrient", aAny );
|
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 );
|
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 );
|
xPropSet.setPropertyValue("HoriOrientPosition", aAny );
|
||||||
|
|
||||||
// retrieve the chart document as model of the OLE shape
|
// retrieve the chart document as model of the OLE shape
|
||||||
|
@@ -39,8 +39,6 @@ import com.sun.star.uno.Type;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public class Parameters implements XPropertySet {
|
public class Parameters implements XPropertySet {
|
||||||
/* final protected Map parameters;
|
|
||||||
final Parameters defaults; */
|
|
||||||
final protected Map<String, Object> parameters;
|
final protected Map<String, Object> parameters;
|
||||||
final Parameters defaults;
|
final Parameters defaults;
|
||||||
Property[] props;
|
Property[] props;
|
||||||
|
Reference in New Issue
Block a user