diff options
Diffstat (limited to 'qadevOOo/tests/java/mod/_sc/ScViewPaneObj.java')
-rw-r--r-- | qadevOOo/tests/java/mod/_sc/ScViewPaneObj.java | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/qadevOOo/tests/java/mod/_sc/ScViewPaneObj.java b/qadevOOo/tests/java/mod/_sc/ScViewPaneObj.java index cf8bbce0843b..88e2a0fd87d2 100644 --- a/qadevOOo/tests/java/mod/_sc/ScViewPaneObj.java +++ b/qadevOOo/tests/java/mod/_sc/ScViewPaneObj.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -75,14 +75,14 @@ public class ScViewPaneObj extends TestCase { static private XSpreadsheetDocument xSpreadsheetDoc; static private SOfficeFactory SOF; static private XInterface oObj; - + /** * Creates Spreadsheet document. */ public void initialize( TestParameters Param, PrintWriter log ) { // get a soffice factory object SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)Param.getMSF()); - + try { log.println("creating a spreadsheetdocument"); xSpreadsheetDoc = SOF.createCalcDoc(null); @@ -91,7 +91,7 @@ public class ScViewPaneObj extends TestCase { throw new StatusException( "Couldn't create document ", e ); } } - + /** * Disposes Spreadsheet document. */ @@ -101,7 +101,7 @@ public class ScViewPaneObj extends TestCase { UnoRuntime.queryInterface(XComponent.class, xSpreadsheetDoc); util.DesktopTools.closeDoc(oComp); } - + /** * Creating a Testenvironment for the interfaces to be tested. * Retieves the current controller of the spreadsheet document using the @@ -119,7 +119,7 @@ public class ScViewPaneObj extends TestCase { */ protected TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) { XDrawPage oDrawPage; - + XModel xm = (XModel) UnoRuntime.queryInterface(XModel.class, xSpreadsheetDoc); XController xc = xm.getCurrentController(); @@ -138,36 +138,36 @@ public class ScViewPaneObj extends TestCase { e.printStackTrace(log); throw new StatusException("Couldn't get by index", e); } - + TestEnvironment tEnv = new TestEnvironment(oObj); - + //Relation for XControlAccess tEnv.addObjRelation("DOCUMENT", UnoRuntime.queryInterface(XComponent.class,xSpreadsheetDoc)); tEnv.addObjRelation("XControlAccess.isSheet", Boolean.TRUE); - + XViewPane VP = (XViewPane) UnoRuntime.queryInterface(XViewPane.class, oObj); CellRangeAddress dataArea = VP.getVisibleRange(); tEnv.addObjRelation("DATAAREA", dataArea); - + // XForm for com.sun.star.view.XFormLayerAccess log.println("adding relation for com.sun.star.view.XFormLayerAccess: XForm"); - + XForm myForm = null; String kindOfControl="CommandButton"; XShape aShape = null; try{ log.println("adding contol shape '" + kindOfControl + "'"); XComponent oComp = (XComponent) UnoRuntime.queryInterface(XComponent.class, xSpreadsheetDoc) ; - + aShape = FormTools.createControlShape(oComp, 3000, 4500, 15000, 10000, kindOfControl); - + } catch (Exception e){ e.printStackTrace(log); throw new StatusException("Couldn't create following control shape : '" + kindOfControl + "': ", e); } - + try { log.println( "getting Drawpages" ); XDrawPagesSupplier oDPS = (XDrawPagesSupplier) @@ -179,7 +179,7 @@ public class ScViewPaneObj extends TestCase { new Type(XDrawPage.class),oDP.getByIndex(0)); if (oDrawPage == null) log.println("ERROR: could not get DrawPage: null"); - + oDrawPage.add(aShape); log.println("getting XForm"); XNameContainer xForm = FormTools.getForms(oDrawPage); @@ -202,7 +202,7 @@ public class ScViewPaneObj extends TestCase { } catch (com.sun.star.lang.IllegalArgumentException ex) { log.println("ERROR: could not add ObjectRelation 'XFormLayerAccess.XForm': " + ex.toString()); } - + return tEnv; } } |