summaryrefslogtreecommitdiff
path: root/qadevOOo/tests/java/mod/_sch
diff options
context:
space:
mode:
Diffstat (limited to 'qadevOOo/tests/java/mod/_sch')
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccArea.java121
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccAxis.java119
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccDataPoint.java120
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccDataSeries.java120
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccDiagram.java120
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccFloor.java145
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccGrid.java121
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccLegend.java119
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccLegendEntry.java119
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccStatisticsObject.java124
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccTitle.java119
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccWall.java144
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccessibleDocumentView.java133
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChXChartAxis.java130
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChXChartData.java102
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChXChartDataArray.java106
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChXChartDocument.java172
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChXChartView.java147
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChXDataPoint.java162
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChXDataRow.java169
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChXDiagram.java413
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChartArea.java122
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChartGrid.java122
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChartLegend.java142
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChartLine.java150
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChartTitle.java120
26 files changed, 3681 insertions, 0 deletions
diff --git a/qadevOOo/tests/java/mod/_sch/AccArea.java b/qadevOOo/tests/java/mod/_sch/AccArea.java
new file mode 100644
index 000000000000..b371f1950558
--- /dev/null
+++ b/qadevOOo/tests/java/mod/_sch/AccArea.java
@@ -0,0 +1,121 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+package mod._sch;
+
+import java.io.PrintWriter;
+
+import lib.StatusException;
+import lib.TestCase;
+import lib.TestEnvironment;
+import lib.TestParameters;
+import util.AccessibilityTools;
+import util.SOfficeFactory;
+import util.utils;
+
+import com.sun.star.accessibility.AccessibleRole;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.XAccessibleComponent;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.awt.XWindow;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.frame.XModel;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.XInterface;
+
+public class AccArea extends TestCase {
+
+ XChartDocument xChartDoc = null;
+
+ protected TestEnvironment createTestEnvironment(
+ TestParameters Param, PrintWriter log) {
+
+ if (xChartDoc != null) cleanup(Param, log);
+ log.println( "creating a chart document" );
+ SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)Param.getMSF());
+ try {
+ log.println( "creating a chartdocument" );
+ xChartDoc = SOF.createChartDoc(null);
+ } catch (com.sun.star.uno.Exception e) {
+ // Some exception occures.FAILED
+ e.printStackTrace( log );
+ throw new StatusException( "Couldn't create document", e );
+ }
+
+ XInterface oObj = null;
+
+ XModel aModel = (XModel)
+ UnoRuntime.queryInterface(XModel.class, xChartDoc);
+
+ AccessibilityTools at = new AccessibilityTools();
+
+ XWindow xWindow = at.getCurrentWindow((XMultiServiceFactory)Param.getMSF(), aModel);
+ XAccessible xRoot = at.getAccessibleObject(xWindow);
+
+ at.printAccessibleTree(log, xRoot, Param.getBool(util.PropertyName.DEBUG_IS_ACTIVE));
+
+ XAccessibleContext cont = at.getAccessibleObjectForRole(
+ xRoot, AccessibleRole.SHAPE, "", "AccArea");
+
+
+ oObj = cont;
+
+ log.println("ImplementationName " + utils.getImplName(oObj));
+ log.println("AccessibleName " + cont.getAccessibleName());
+
+ TestEnvironment tEnv = new TestEnvironment(oObj);
+
+ final XAccessibleComponent acc = (XAccessibleComponent)
+ UnoRuntime.queryInterface(
+ XAccessibleComponent.class,oObj);
+ tEnv.addObjRelation("EventProducer",
+ new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
+ public void fireEvent() {
+ acc.grabFocus();
+ }
+ });
+
+ return tEnv;
+
+ }
+
+ /**
+ * Called while disposing a <code>TestEnvironment</code>.
+ * Disposes text document.
+ * @param tParam test parameters
+ * @param tEnv the environment to cleanup
+ * @param log writer to log information while testing
+ */
+ protected void cleanup( TestParameters Param, PrintWriter log) {
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
+ }
+
+}
diff --git a/qadevOOo/tests/java/mod/_sch/AccAxis.java b/qadevOOo/tests/java/mod/_sch/AccAxis.java
new file mode 100644
index 000000000000..2cdecae03aca
--- /dev/null
+++ b/qadevOOo/tests/java/mod/_sch/AccAxis.java
@@ -0,0 +1,119 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+package mod._sch;
+
+import java.io.PrintWriter;
+
+import lib.StatusException;
+import lib.TestCase;
+import lib.TestEnvironment;
+import lib.TestParameters;
+import util.AccessibilityTools;
+import util.SOfficeFactory;
+import util.utils;
+
+import com.sun.star.accessibility.AccessibleRole;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.XAccessibleComponent;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.awt.XWindow;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.frame.XModel;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.XInterface;
+
+public class AccAxis extends TestCase {
+
+ XChartDocument xChartDoc = null;
+
+ protected TestEnvironment createTestEnvironment(
+ TestParameters Param, PrintWriter log) {
+
+ if (xChartDoc != null) cleanup(Param, log);
+ log.println( "creating a chart document" );
+ SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)Param.getMSF());
+ try {
+ log.println( "creating a chartdocument" );
+ xChartDoc = SOF.createChartDoc(null);
+ } catch (com.sun.star.uno.Exception e) {
+ // Some exception occures.FAILED
+ e.printStackTrace( log );
+ throw new StatusException( "Couldn't create document", e );
+ }
+
+ XInterface oObj = null;
+
+ XModel aModel = (XModel)
+ UnoRuntime.queryInterface(XModel.class, xChartDoc);
+
+ AccessibilityTools at = new AccessibilityTools();
+
+ XWindow xWindow = at.getCurrentWindow((XMultiServiceFactory)Param.getMSF(), aModel);
+ XAccessible xRoot = at.getAccessibleObject(xWindow);
+
+ XAccessibleContext cont = at.getAccessibleObjectForRole(
+ xRoot, AccessibleRole.SHAPE, "", "AccAxis");
+
+
+ oObj = cont;
+
+ log.println("ImplementationName " + utils.getImplName(oObj));
+ log.println("AccessibleName " + cont.getAccessibleName());
+
+ TestEnvironment tEnv = new TestEnvironment(oObj);
+
+ final XAccessibleComponent acc = (XAccessibleComponent)
+ UnoRuntime.queryInterface(
+ XAccessibleComponent.class,oObj);
+ tEnv.addObjRelation("EventProducer",
+ new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
+ public void fireEvent() {
+ acc.grabFocus();
+ }
+ });
+
+ return tEnv;
+
+ }
+
+ /**
+ * Called while disposing a <code>TestEnvironment</code>.
+ * Disposes text document.
+ * @param tParam test parameters
+ * @param tEnv the environment to cleanup
+ * @param log writer to log information while testing
+ */
+ protected void cleanup( TestParameters Param, PrintWriter log) {
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
+ }
+
+}
diff --git a/qadevOOo/tests/java/mod/_sch/AccDataPoint.java b/qadevOOo/tests/java/mod/_sch/AccDataPoint.java
new file mode 100644
index 000000000000..3e94364a0559
--- /dev/null
+++ b/qadevOOo/tests/java/mod/_sch/AccDataPoint.java
@@ -0,0 +1,120 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+package mod._sch;
+
+import java.io.PrintWriter;
+
+import lib.StatusException;
+import lib.TestCase;
+import lib.TestEnvironment;
+import lib.TestParameters;
+import util.AccessibilityTools;
+import util.SOfficeFactory;
+import util.utils;
+
+import com.sun.star.accessibility.AccessibleRole;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.XAccessibleComponent;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.awt.XWindow;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.frame.XModel;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.XInterface;
+
+public class AccDataPoint extends TestCase {
+
+ XChartDocument xChartDoc = null;
+
+ protected TestEnvironment createTestEnvironment(
+ TestParameters Param, PrintWriter log) {
+
+ if (xChartDoc != null) cleanup(Param, log);
+ log.println( "creating a chart document" );
+ SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)Param.getMSF());
+ try {
+ log.println( "creating a chartdocument" );
+ xChartDoc = SOF.createChartDoc(null);
+ } catch (com.sun.star.uno.Exception e) {
+ // Some exception occures.FAILED
+ e.printStackTrace( log );
+ throw new StatusException( "Couldn't create document", e );
+ }
+
+ XInterface oObj = null;
+
+ XModel aModel = (XModel)
+ UnoRuntime.queryInterface(XModel.class, xChartDoc);
+
+ AccessibilityTools at = new AccessibilityTools();
+
+ XWindow xWindow = at.getCurrentWindow((XMultiServiceFactory)Param.getMSF(), aModel);
+ XAccessible xRoot = at.getAccessibleObject(xWindow);
+
+ at.printAccessibleTree(log, xRoot, Param.getBool(util.PropertyName.DEBUG_IS_ACTIVE));
+
+ XAccessibleContext cont = at.getAccessibleObjectForRole(
+ xRoot, AccessibleRole.SHAPE, "", "AccDataPoint");
+
+ oObj = cont;
+
+ log.println("ImplementationName " + utils.getImplName(oObj));
+ log.println("AccessibleName " + cont.getAccessibleName());
+
+ TestEnvironment tEnv = new TestEnvironment(oObj);
+
+ final XAccessibleComponent acc = (XAccessibleComponent)
+ UnoRuntime.queryInterface(
+ XAccessibleComponent.class,oObj);
+ tEnv.addObjRelation("EventProducer",
+ new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
+ public void fireEvent() {
+ acc.grabFocus();
+ }
+ });
+
+ return tEnv;
+
+ }
+
+ /**
+ * Called while disposing a <code>TestEnvironment</code>.
+ * Disposes text document.
+ * @param tParam test parameters
+ * @param tEnv the environment to cleanup
+ * @param log writer to log information while testing
+ */
+ protected void cleanup( TestParameters Param, PrintWriter log) {
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
+ }
+
+}
diff --git a/qadevOOo/tests/java/mod/_sch/AccDataSeries.java b/qadevOOo/tests/java/mod/_sch/AccDataSeries.java
new file mode 100644
index 000000000000..2d5ec4fde1d5
--- /dev/null
+++ b/qadevOOo/tests/java/mod/_sch/AccDataSeries.java
@@ -0,0 +1,120 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+package mod._sch;
+
+import java.io.PrintWriter;
+
+import lib.StatusException;
+import lib.TestCase;
+import lib.TestEnvironment;
+import lib.TestParameters;
+import util.AccessibilityTools;
+import util.SOfficeFactory;
+import util.utils;
+
+import com.sun.star.accessibility.AccessibleRole;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.XAccessibleComponent;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.awt.XWindow;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.frame.XModel;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.XInterface;
+
+public class AccDataSeries extends TestCase {
+
+ XChartDocument xChartDoc = null;
+
+ protected TestEnvironment createTestEnvironment(
+ TestParameters Param, PrintWriter log) {
+
+ if (xChartDoc != null) cleanup(Param, log);
+ log.println( "creating a chart document" );
+ SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)Param.getMSF());
+ try {
+ log.println( "creating a chartdocument" );
+ xChartDoc = SOF.createChartDoc(null);
+ } catch (com.sun.star.uno.Exception e) {
+ // Some exception occures.FAILED
+ e.printStackTrace( log );
+ throw new StatusException( "Couldn't create document", e );
+ }
+
+ XInterface oObj = null;
+
+ XModel aModel = (XModel)
+ UnoRuntime.queryInterface(XModel.class, xChartDoc);
+
+ AccessibilityTools at = new AccessibilityTools();
+
+ XWindow xWindow = at.getCurrentWindow((XMultiServiceFactory)Param.getMSF(), aModel);
+ XAccessible xRoot = at.getAccessibleObject(xWindow);
+
+ at.printAccessibleTree(log, xRoot, Param.getBool(util.PropertyName.DEBUG_IS_ACTIVE));
+
+ XAccessibleContext cont = at.getAccessibleObjectForRole(
+ xRoot, AccessibleRole.SHAPE, "", "AccDataSeries");
+
+ oObj = cont;
+
+ log.println("ImplementationName " + utils.getImplName(oObj));
+ log.println("AccessibleName " + cont.getAccessibleName());
+
+ TestEnvironment tEnv = new TestEnvironment(oObj);
+
+ final XAccessibleComponent acc = (XAccessibleComponent)
+ UnoRuntime.queryInterface(
+ XAccessibleComponent.class,oObj);
+ tEnv.addObjRelation("EventProducer",
+ new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
+ public void fireEvent() {
+ acc.grabFocus();
+ }
+ });
+
+ return tEnv;
+
+ }
+
+ /**
+ * Called while disposing a <code>TestEnvironment</code>.
+ * Disposes text document.
+ * @param tParam test parameters
+ * @param tEnv the environment to cleanup
+ * @param log writer to log information while testing
+ */
+ protected void cleanup( TestParameters Param, PrintWriter log) {
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
+ }
+
+}
diff --git a/qadevOOo/tests/java/mod/_sch/AccDiagram.java b/qadevOOo/tests/java/mod/_sch/AccDiagram.java
new file mode 100644
index 000000000000..9b7f90766fdd
--- /dev/null
+++ b/qadevOOo/tests/java/mod/_sch/AccDiagram.java
@@ -0,0 +1,120 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+package mod._sch;
+
+import java.io.PrintWriter;
+
+import lib.StatusException;
+import lib.TestCase;
+import lib.TestEnvironment;
+import lib.TestParameters;
+import util.AccessibilityTools;
+import util.SOfficeFactory;
+import util.utils;
+
+import com.sun.star.accessibility.AccessibleRole;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.XAccessibleComponent;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.awt.XWindow;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.frame.XModel;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.XInterface;
+
+public class AccDiagram extends TestCase {
+
+ XChartDocument xChartDoc = null;
+
+ protected TestEnvironment createTestEnvironment(
+ TestParameters Param, PrintWriter log) {
+
+ if (xChartDoc != null) cleanup(Param, log);
+ log.println( "creating a chart document" );
+ SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)Param.getMSF());
+ try {
+ log.println( "creating a chartdocument" );
+ xChartDoc = SOF.createChartDoc(null);
+ } catch (com.sun.star.uno.Exception e) {
+ // Some exception occures.FAILED
+ e.printStackTrace( log );
+ throw new StatusException( "Couldn't create document", e );
+ }
+
+ XInterface oObj = null;
+
+ XModel aModel = (XModel)
+ UnoRuntime.queryInterface(XModel.class, xChartDoc);
+
+ AccessibilityTools at = new AccessibilityTools();
+
+ XWindow xWindow = at.getCurrentWindow((XMultiServiceFactory)Param.getMSF(), aModel);
+ XAccessible xRoot = at.getAccessibleObject(xWindow);
+
+ at.printAccessibleTree(log, xRoot, Param.getBool(util.PropertyName.DEBUG_IS_ACTIVE));
+
+ XAccessibleContext cont = at.getAccessibleObjectForRole(
+ xRoot, AccessibleRole.SHAPE, "", "AccDiagram");
+
+ oObj = cont;
+
+ log.println("ImplementationName " + utils.getImplName(oObj));
+ log.println("AccessibleName " + cont.getAccessibleName());
+
+ TestEnvironment tEnv = new TestEnvironment(oObj);
+
+ final XAccessibleComponent acc = (XAccessibleComponent)
+ UnoRuntime.queryInterface(
+ XAccessibleComponent.class,oObj);
+ tEnv.addObjRelation("EventProducer",
+ new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
+ public void fireEvent() {
+ acc.grabFocus();
+ }
+ });
+
+ return tEnv;
+
+ }
+
+ /**
+ * Called while disposing a <code>TestEnvironment</code>.
+ * Disposes text document.
+ * @param tParam test parameters
+ * @param tEnv the environment to cleanup
+ * @param log writer to log information while testing
+ */
+ protected void cleanup( TestParameters Param, PrintWriter log) {
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
+ }
+
+}
diff --git a/qadevOOo/tests/java/mod/_sch/AccFloor.java b/qadevOOo/tests/java/mod/_sch/AccFloor.java
new file mode 100644
index 000000000000..37d56815983d
--- /dev/null
+++ b/qadevOOo/tests/java/mod/_sch/AccFloor.java
@@ -0,0 +1,145 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+package mod._sch;
+
+import java.io.PrintWriter;
+
+import lib.StatusException;
+import lib.TestCase;
+import lib.TestEnvironment;
+import lib.TestParameters;
+import util.AccessibilityTools;
+import util.SOfficeFactory;
+import util.utils;
+
+import com.sun.star.accessibility.AccessibleRole;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.XAccessibleComponent;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.awt.XWindow;
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.frame.XModel;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.XInterface;
+
+public class AccFloor extends TestCase {
+
+ XChartDocument xChartDoc = null;
+
+ protected TestEnvironment createTestEnvironment(
+ TestParameters Param, PrintWriter log) {
+
+ if (xChartDoc != null) cleanup(Param, log);
+ log.println( "creating a chart document" );
+ SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)Param.getMSF());
+ try {
+ log.println( "creating a chartdocument" );
+ xChartDoc = SOF.createChartDoc(null);
+ } catch (com.sun.star.uno.Exception e) {
+ // Some exception occures.FAILED
+ e.printStackTrace( log );
+ throw new StatusException( "Couldn't create document", e );
+ }
+
+ log.println("Change Diagram to 3D");
+ XPropertySet ChartProps = (XPropertySet)
+ UnoRuntime.queryInterface( XPropertySet.class, xChartDoc.getDiagram() );
+ try {
+ ChartProps.setPropertyValue("Dim3D", new Boolean(true));
+ } catch(com.sun.star.lang.WrappedTargetException e) {
+ log.println("Couldn't change Diagram to 3D");
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't change Diagram to 3D", e);
+ } catch(com.sun.star.lang.IllegalArgumentException e) {
+ log.println("Couldn't change Diagram to 3D");
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't change Diagram to 3D", e);
+ } catch(com.sun.star.beans.PropertyVetoException e) {
+ log.println("Couldn't change Diagram to 3D");
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't change Diagram to 3D", e);
+ } catch(com.sun.star.beans.UnknownPropertyException e) {
+ log.println("Couldn't change Diagram to 3D");
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't change Diagram to 3D", e);
+ }
+
+ XInterface oObj = null;
+
+ XModel aModel = (XModel)
+ UnoRuntime.queryInterface(XModel.class, xChartDoc);
+
+ AccessibilityTools at = new AccessibilityTools();
+
+ XWindow xWindow = at.getCurrentWindow((XMultiServiceFactory)Param.getMSF(), aModel);
+ XAccessible xRoot = at.getAccessibleObject(xWindow);
+
+ at.printAccessibleTree(log, xRoot, Param.getBool(util.PropertyName.DEBUG_IS_ACTIVE));
+
+ XAccessibleContext cont = at.getAccessibleObjectForRole(
+ xRoot, AccessibleRole.SHAPE, "", "AccFloor");
+
+
+ oObj = cont;
+
+ log.println("ImplementationName " + utils.getImplName(oObj));
+ log.println("AccessibleName " + cont.getAccessibleName());
+
+ TestEnvironment tEnv = new TestEnvironment(oObj);
+
+ final XAccessibleComponent acc = (XAccessibleComponent)
+ UnoRuntime.queryInterface(
+ XAccessibleComponent.class,oObj);
+ tEnv.addObjRelation("EventProducer",
+ new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
+ public void fireEvent() {
+ acc.grabFocus();
+ }
+ });
+
+ return tEnv;
+
+ }
+
+ /**
+ * Called while disposing a <code>TestEnvironment</code>.
+ * Disposes text document.
+ * @param tParam test parameters
+ * @param tEnv the environment to cleanup
+ * @param log writer to log information while testing
+ */
+ protected void cleanup( TestParameters Param, PrintWriter log) {
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
+ }
+
+}
diff --git a/qadevOOo/tests/java/mod/_sch/AccGrid.java b/qadevOOo/tests/java/mod/_sch/AccGrid.java
new file mode 100644
index 000000000000..268f53ec8b3d
--- /dev/null
+++ b/qadevOOo/tests/java/mod/_sch/AccGrid.java
@@ -0,0 +1,121 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+package mod._sch;
+
+import java.io.PrintWriter;
+
+import lib.StatusException;
+import lib.TestCase;
+import lib.TestEnvironment;
+import lib.TestParameters;
+import util.AccessibilityTools;
+import util.SOfficeFactory;
+import util.utils;
+
+import com.sun.star.accessibility.AccessibleRole;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.XAccessibleComponent;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.awt.XWindow;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.frame.XModel;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.XInterface;
+
+public class AccGrid extends TestCase {
+
+ XChartDocument xChartDoc = null;
+
+ protected TestEnvironment createTestEnvironment(
+ TestParameters Param, PrintWriter log) {
+
+ if (xChartDoc != null) cleanup(Param, log);
+ log.println( "creating a chart document" );
+ SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)Param.getMSF());
+ try {
+ log.println( "creating a chartdocument" );
+ xChartDoc = SOF.createChartDoc(null);
+ } catch (com.sun.star.uno.Exception e) {
+ // Some exception occures.FAILED
+ e.printStackTrace( log );
+ throw new StatusException( "Couldn't create document", e );
+ }
+
+ XInterface oObj = null;
+
+ XModel aModel = (XModel)
+ UnoRuntime.queryInterface(XModel.class, xChartDoc);
+
+ AccessibilityTools at = new AccessibilityTools();
+
+ XWindow xWindow = at.getCurrentWindow((XMultiServiceFactory)Param.getMSF(), aModel);
+ XAccessible xRoot = at.getAccessibleObject(xWindow);
+
+ at.printAccessibleTree(log, xRoot, Param.getBool(util.PropertyName.DEBUG_IS_ACTIVE));
+
+ XAccessibleContext cont = at.getAccessibleObjectForRole(
+ xRoot, AccessibleRole.SHAPE, "", "AccGrid");
+
+
+ oObj = cont;
+
+ log.println("ImplementationName " + utils.getImplName(oObj));
+ log.println("AccessibleName " + cont.getAccessibleName());
+
+ TestEnvironment tEnv = new TestEnvironment(oObj);
+
+ final XAccessibleComponent acc = (XAccessibleComponent)
+ UnoRuntime.queryInterface(
+ XAccessibleComponent.class,oObj);
+ tEnv.addObjRelation("EventProducer",
+ new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
+ public void fireEvent() {
+ acc.grabFocus();
+ }
+ });
+
+ return tEnv;
+
+ }
+
+ /**
+ * Called while disposing a <code>TestEnvironment</code>.
+ * Disposes text document.
+ * @param tParam test parameters
+ * @param tEnv the environment to cleanup
+ * @param log writer to log information while testing
+ */
+ protected void cleanup( TestParameters Param, PrintWriter log) {
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
+ }
+
+}
diff --git a/qadevOOo/tests/java/mod/_sch/AccLegend.java b/qadevOOo/tests/java/mod/_sch/AccLegend.java
new file mode 100644
index 000000000000..aa46cdb8407d
--- /dev/null
+++ b/qadevOOo/tests/java/mod/_sch/AccLegend.java
@@ -0,0 +1,119 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+package mod._sch;
+
+import java.io.PrintWriter;
+
+import lib.StatusException;
+import lib.TestCase;
+import lib.TestEnvironment;
+import lib.TestParameters;
+import util.AccessibilityTools;
+import util.SOfficeFactory;
+import util.utils;
+
+import com.sun.star.accessibility.AccessibleRole;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.XAccessibleComponent;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.awt.XWindow;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.frame.XModel;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.XInterface;
+
+public class AccLegend extends TestCase {
+
+ XChartDocument xChartDoc = null;
+
+ protected TestEnvironment createTestEnvironment(
+ TestParameters Param, PrintWriter log) {
+
+ if (xChartDoc != null) cleanup(Param, log);
+ log.println( "creating a chart document" );
+ SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)Param.getMSF());
+ try {
+ log.println( "creating a chartdocument" );
+ xChartDoc = SOF.createChartDoc(null);
+ } catch (com.sun.star.uno.Exception e) {
+ // Some exception occures.FAILED
+ e.printStackTrace( log );
+ throw new StatusException( "Couldn't create document", e );
+ }
+
+ XInterface oObj = null;
+
+ XModel aModel = (XModel)
+ UnoRuntime.queryInterface(XModel.class, xChartDoc);
+
+ AccessibilityTools at = new AccessibilityTools();
+
+ XWindow xWindow = at.getCurrentWindow((XMultiServiceFactory)Param.getMSF(), aModel);
+ XAccessible xRoot = at.getAccessibleObject(xWindow);
+
+ XAccessibleContext cont = at.getAccessibleObjectForRole(
+ xRoot, AccessibleRole.SHAPE, "", "AccLegend");
+
+
+ oObj = cont;
+
+ log.println("ImplementationName " + utils.getImplName(oObj));
+ log.println("AccessibleName " + cont.getAccessibleName());
+
+ TestEnvironment tEnv = new TestEnvironment(oObj);
+
+ final XAccessibleComponent acc = (XAccessibleComponent)
+ UnoRuntime.queryInterface(
+ XAccessibleComponent.class,oObj);
+ tEnv.addObjRelation("EventProducer",
+ new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
+ public void fireEvent() {
+ acc.grabFocus();
+ }
+ });
+
+ return tEnv;
+
+ }
+
+ /**
+ * Called while disposing a <code>TestEnvironment</code>.
+ * Disposes text document.
+ * @param tParam test parameters
+ * @param tEnv the environment to cleanup
+ * @param log writer to log information while testing
+ */
+ protected void cleanup( TestParameters Param, PrintWriter log) {
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
+ }
+
+}
diff --git a/qadevOOo/tests/java/mod/_sch/AccLegendEntry.java b/qadevOOo/tests/java/mod/_sch/AccLegendEntry.java
new file mode 100644
index 000000000000..61c221df57e0
--- /dev/null
+++ b/qadevOOo/tests/java/mod/_sch/AccLegendEntry.java
@@ -0,0 +1,119 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+package mod._sch;
+
+import java.io.PrintWriter;
+
+import lib.StatusException;
+import lib.TestCase;
+import lib.TestEnvironment;
+import lib.TestParameters;
+import util.AccessibilityTools;
+import util.SOfficeFactory;
+import util.utils;
+
+import com.sun.star.accessibility.AccessibleRole;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.XAccessibleComponent;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.awt.XWindow;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.frame.XModel;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.XInterface;
+
+public class AccLegendEntry extends TestCase {
+
+ XChartDocument xChartDoc = null;
+
+ protected TestEnvironment createTestEnvironment(
+ TestParameters Param, PrintWriter log) {
+
+ if (xChartDoc != null) cleanup(Param, log);
+ log.println( "creating a chart document" );
+ SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)Param.getMSF());
+ try {
+ log.println( "creating a chartdocument" );
+ xChartDoc = SOF.createChartDoc(null);
+ } catch (com.sun.star.uno.Exception e) {
+ // Some exception occures.FAILED
+ e.printStackTrace( log );
+ throw new StatusException( "Couldn't create document", e );
+ }
+
+ XInterface oObj = null;
+
+ XModel aModel = (XModel)
+ UnoRuntime.queryInterface(XModel.class, xChartDoc);
+
+ AccessibilityTools at = new AccessibilityTools();
+
+ XWindow xWindow = at.getCurrentWindow((XMultiServiceFactory)Param.getMSF(), aModel);
+ XAccessible xRoot = at.getAccessibleObject(xWindow);
+
+ XAccessibleContext cont = at.getAccessibleObjectForRole(
+ xRoot, AccessibleRole.SHAPE, "", "AccLegendEntry");
+
+
+ oObj = cont;
+
+ log.println("ImplementationName " + utils.getImplName(oObj));
+ log.println("AccessibleName " + cont.getAccessibleName());
+
+ TestEnvironment tEnv = new TestEnvironment(oObj);
+
+ final XAccessibleComponent acc = (XAccessibleComponent)
+ UnoRuntime.queryInterface(
+ XAccessibleComponent.class,oObj);
+ tEnv.addObjRelation("EventProducer",
+ new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
+ public void fireEvent() {
+ acc.grabFocus();
+ }
+ });
+
+ return tEnv;
+
+ }
+
+ /**
+ * Called while disposing a <code>TestEnvironment</code>.
+ * Disposes text document.
+ * @param tParam test parameters
+ * @param tEnv the environment to cleanup
+ * @param log writer to log information while testing
+ */
+ protected void cleanup( TestParameters Param, PrintWriter log) {
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
+ }
+
+}
diff --git a/qadevOOo/tests/java/mod/_sch/AccStatisticsObject.java b/qadevOOo/tests/java/mod/_sch/AccStatisticsObject.java
new file mode 100644
index 000000000000..aafe91fdd3d4
--- /dev/null
+++ b/qadevOOo/tests/java/mod/_sch/AccStatisticsObject.java
@@ -0,0 +1,124 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+package mod._sch;
+
+import java.io.PrintWriter;
+
+import lib.StatusException;
+import lib.TestCase;
+import lib.TestEnvironment;
+import lib.TestParameters;
+import util.AccessibilityTools;
+import util.SOfficeFactory;
+import util.utils;
+
+import com.sun.star.accessibility.AccessibleRole;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.XAccessibleComponent;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.awt.XWindow;
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.frame.XModel;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.XInterface;
+
+public class AccStatisticsObject extends TestCase {
+
+ XChartDocument xChartDoc = null;
+
+ protected TestEnvironment createTestEnvironment(
+ TestParameters Param, PrintWriter log) {
+
+ if (xChartDoc != null) cleanup(Param, log);
+ log.println( "creating a chart document" );
+ SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)Param.getMSF());
+ try {
+ log.println( "creating a chartdocument" );
+ xChartDoc = SOF.createChartDoc(null);
+ log.println("Display MeanValue");
+ XPropertySet diagProps = (XPropertySet)
+ UnoRuntime.queryInterface(XPropertySet.class, xChartDoc.getDiagram());
+ diagProps.setPropertyValue("MeanValue",new Boolean(true));
+ } catch (com.sun.star.uno.Exception e) {
+ // Some exception occures.FAILED
+ e.printStackTrace( log );
+ throw new StatusException( "Couldn't create document", e );
+ }
+
+ XInterface oObj = null;
+
+ XModel aModel = (XModel)
+ UnoRuntime.queryInterface(XModel.class, xChartDoc);
+
+ AccessibilityTools at = new AccessibilityTools();
+
+ XWindow xWindow = at.getCurrentWindow((XMultiServiceFactory)Param.getMSF(), aModel);
+ XAccessible xRoot = at.getAccessibleObject(xWindow);
+
+ XAccessibleContext cont = at.getAccessibleObjectForRole(
+ xRoot, AccessibleRole.SHAPE, "", "AccStatisticsObject");
+
+
+ oObj = cont;
+
+ log.println("ImplementationName " + utils.getImplName(oObj));
+ log.println("AccessibleName " + cont.getAccessibleName());
+
+ TestEnvironment tEnv = new TestEnvironment(oObj);
+
+ final XAccessibleComponent acc = (XAccessibleComponent)
+ UnoRuntime.queryInterface(
+ XAccessibleComponent.class,oObj);
+ tEnv.addObjRelation("EventProducer",
+ new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
+ public void fireEvent() {
+ acc.grabFocus();
+ }
+ });
+
+ return tEnv;
+
+ }
+
+ /**
+ * Called while disposing a <code>TestEnvironment</code>.
+ * Disposes text document.
+ * @param tParam test parameters
+ * @param tEnv the environment to cleanup
+ * @param log writer to log information while testing
+ */
+ protected void cleanup( TestParameters Param, PrintWriter log) {
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
+ }
+
+}
diff --git a/qadevOOo/tests/java/mod/_sch/AccTitle.java b/qadevOOo/tests/java/mod/_sch/AccTitle.java
new file mode 100644
index 000000000000..0639f19ca4cc
--- /dev/null
+++ b/qadevOOo/tests/java/mod/_sch/AccTitle.java
@@ -0,0 +1,119 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+package mod._sch;
+
+import java.io.PrintWriter;
+
+import lib.StatusException;
+import lib.TestCase;
+import lib.TestEnvironment;
+import lib.TestParameters;
+import util.AccessibilityTools;
+import util.SOfficeFactory;
+import util.utils;
+
+import com.sun.star.accessibility.AccessibleRole;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.XAccessibleComponent;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.awt.XWindow;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.frame.XModel;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.XInterface;
+
+public class AccTitle extends TestCase {
+
+ XChartDocument xChartDoc = null;
+
+ protected TestEnvironment createTestEnvironment(
+ TestParameters Param, PrintWriter log) {
+
+ if (xChartDoc != null) cleanup(Param, log);
+ log.println( "creating a chart document" );
+ SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)Param.getMSF());
+ try {
+ log.println( "creating a chartdocument" );
+ xChartDoc = SOF.createChartDoc(null);
+ } catch (com.sun.star.uno.Exception e) {
+ // Some exception occures.FAILED
+ e.printStackTrace( log );
+ throw new StatusException( "Couldn't create document", e );
+ }
+
+ XInterface oObj = null;
+
+ XModel aModel = (XModel)
+ UnoRuntime.queryInterface(XModel.class, xChartDoc);
+
+ AccessibilityTools at = new AccessibilityTools();
+
+ XWindow xWindow = at.getCurrentWindow((XMultiServiceFactory)Param.getMSF(), aModel);
+ XAccessible xRoot = at.getAccessibleObject(xWindow);
+
+ XAccessibleContext cont = at.getAccessibleObjectForRole(
+ xRoot, AccessibleRole.SHAPE, "", "AccTitle");
+
+
+ oObj = cont;
+
+ log.println("ImplementationName " + utils.getImplName(oObj));
+ log.println("AccessibleName " + cont.getAccessibleName());
+
+ TestEnvironment tEnv = new TestEnvironment(oObj);
+
+ final XAccessibleComponent acc = (XAccessibleComponent)
+ UnoRuntime.queryInterface(
+ XAccessibleComponent.class,oObj);
+ tEnv.addObjRelation("EventProducer",
+ new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
+ public void fireEvent() {
+ acc.grabFocus();
+ }
+ });
+
+ return tEnv;
+
+ }
+
+ /**
+ * Called while disposing a <code>TestEnvironment</code>.
+ * Disposes text document.
+ * @param tParam test parameters
+ * @param tEnv the environment to cleanup
+ * @param log writer to log information while testing
+ */
+ protected void cleanup( TestParameters Param, PrintWriter log) {
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
+ }
+
+}
diff --git a/qadevOOo/tests/java/mod/_sch/AccWall.java b/qadevOOo/tests/java/mod/_sch/AccWall.java
new file mode 100644
index 000000000000..66779421cc0b
--- /dev/null
+++ b/qadevOOo/tests/java/mod/_sch/AccWall.java
@@ -0,0 +1,144 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+package mod._sch;
+
+import java.io.PrintWriter;
+
+import lib.StatusException;
+import lib.TestCase;
+import lib.TestEnvironment;
+import lib.TestParameters;
+import util.AccessibilityTools;
+import util.SOfficeFactory;
+import util.utils;
+
+import com.sun.star.accessibility.AccessibleRole;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.XAccessibleComponent;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.awt.XWindow;
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.frame.XModel;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.XInterface;
+
+public class AccWall extends TestCase {
+
+ XChartDocument xChartDoc = null;
+
+ protected TestEnvironment createTestEnvironment(
+ TestParameters Param, PrintWriter log) {
+
+ if (xChartDoc != null) cleanup(Param, log);
+ log.println( "creating a chart document" );
+ SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)Param.getMSF());
+ try {
+ log.println( "creating a chartdocument" );
+ xChartDoc = SOF.createChartDoc(null);
+ } catch (com.sun.star.uno.Exception e) {
+ // Some exception occures.FAILED
+ e.printStackTrace( log );
+ throw new StatusException( "Couldn't create document", e );
+ }
+
+ log.println("Change Diagram to 3D");
+ XPropertySet ChartProps = (XPropertySet)
+ UnoRuntime.queryInterface( XPropertySet.class, xChartDoc.getDiagram() );
+ try {
+ ChartProps.setPropertyValue("Dim3D", new Boolean(true));
+ } catch(com.sun.star.lang.WrappedTargetException e) {
+ log.println("Couldn't change Diagram to 3D");
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't change Diagram to 3D", e);
+ } catch(com.sun.star.lang.IllegalArgumentException e) {
+ log.println("Couldn't change Diagram to 3D");
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't change Diagram to 3D", e);
+ } catch(com.sun.star.beans.PropertyVetoException e) {
+ log.println("Couldn't change Diagram to 3D");
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't change Diagram to 3D", e);
+ } catch(com.sun.star.beans.UnknownPropertyException e) {
+ log.println("Couldn't change Diagram to 3D");
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't change Diagram to 3D", e);
+ }
+
+ XInterface oObj = null;
+
+ XModel aModel = (XModel)
+ UnoRuntime.queryInterface(XModel.class, xChartDoc);
+
+ AccessibilityTools at = new AccessibilityTools();
+
+ XWindow xWindow = at.getCurrentWindow((XMultiServiceFactory)Param.getMSF(), aModel);
+ XAccessible xRoot = at.getAccessibleObject(xWindow);
+
+ at.printAccessibleTree(log, xRoot, Param.getBool(util.PropertyName.DEBUG_IS_ACTIVE));
+
+ XAccessibleContext cont = at.getAccessibleObjectForRole(
+ xRoot, AccessibleRole.SHAPE, "", "AccWall");
+
+ oObj = cont;
+
+ log.println("ImplementationName " + utils.getImplName(oObj));
+ log.println("AccessibleName " + cont.getAccessibleName());
+
+ TestEnvironment tEnv = new TestEnvironment(oObj);
+
+ final XAccessibleComponent acc = (XAccessibleComponent)
+ UnoRuntime.queryInterface(
+ XAccessibleComponent.class,oObj);
+ tEnv.addObjRelation("EventProducer",
+ new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
+ public void fireEvent() {
+ acc.grabFocus();
+ }
+ });
+
+ return tEnv;
+
+ }
+
+ /**
+ * Called while disposing a <code>TestEnvironment</code>.
+ * Disposes text document.
+ * @param tParam test parameters
+ * @param tEnv the environment to cleanup
+ * @param log writer to log information while testing
+ */
+ protected void cleanup( TestParameters Param, PrintWriter log) {
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
+ }
+
+}
diff --git a/qadevOOo/tests/java/mod/_sch/AccessibleDocumentView.java b/qadevOOo/tests/java/mod/_sch/AccessibleDocumentView.java
new file mode 100644
index 000000000000..9031680f93f1
--- /dev/null
+++ b/qadevOOo/tests/java/mod/_sch/AccessibleDocumentView.java
@@ -0,0 +1,133 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+package mod._sch;
+
+import java.io.PrintWriter;
+
+import lib.StatusException;
+import lib.TestCase;
+import lib.TestEnvironment;
+import lib.TestParameters;
+import util.AccessibilityTools;
+import util.SOfficeFactory;
+import util.utils;
+
+import com.sun.star.accessibility.AccessibleRole;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.awt.PosSize;
+import com.sun.star.awt.Rectangle;
+import com.sun.star.awt.XWindow;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.frame.XModel;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.XInterface;
+
+public class AccessibleDocumentView extends TestCase {
+
+ XChartDocument xChartDoc = null;
+
+ protected TestEnvironment createTestEnvironment(
+ TestParameters Param, PrintWriter log) {
+
+ XInterface oObj = null;
+
+ XModel aModel = (XModel)
+ UnoRuntime.queryInterface(XModel.class, xChartDoc);
+
+ AccessibilityTools at = new AccessibilityTools();
+
+ XWindow xWindow = at.getCurrentWindow((XMultiServiceFactory)Param.getMSF(), aModel);
+ XAccessible xRoot = at.getAccessibleObject(xWindow);
+
+ at.getAccessibleObjectForRole(xRoot, AccessibleRole.DOCUMENT);
+
+ oObj = AccessibilityTools.SearchedContext;
+
+ if (oObj == null) {
+ log.println("DocumentView hasn't the role 'Document'");
+ log.println("trying the role 'Shape'");
+ at.getAccessibleObjectForRole(xRoot, AccessibleRole.SHAPE);
+ oObj = AccessibilityTools.SearchedContext;
+ }
+
+ log.println("ImplementationName " + utils.getImplName(oObj));
+
+ TestEnvironment tEnv = new TestEnvironment(oObj);
+
+ final XWindow xDocWin = xWindow;
+ tEnv.addObjRelation("EventProducer",
+ new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
+ public void fireEvent() {
+ Rectangle rect = xDocWin.getPosSize();
+ xDocWin.setPosSize(100,100,100,100,PosSize.POSSIZE);
+ xDocWin.setPosSize(rect.X,rect.Y,rect.Width,rect.Height,
+ PosSize.POSSIZE);
+ }
+ });
+
+ return tEnv;
+
+ }
+
+ /**
+ * Called while disposing a <code>TestEnvironment</code>.
+ * Disposes text document.
+ * @param tParam test parameters
+ * @param tEnv the environment to cleanup
+ * @param log writer to log information while testing
+ */
+ protected void cleanup( TestParameters Param, PrintWriter log) {
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
+ }
+
+ /**
+ * Called while the <code>TestCase</code> initialization.
+ * Creates a chart document.
+ *
+ * @param tParam test parameters
+ * @param log writer to log information while testing
+ *
+ * @see #initializeTestCase()
+ */
+ protected void initialize(TestParameters Param, PrintWriter log) {
+ log.println( "creating a text document" );
+ SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)Param.getMSF());
+ try {
+ log.println( "creating a chartdocument" );
+ xChartDoc = SOF.createChartDoc(null);
+ } catch (com.sun.star.uno.Exception e) {
+ // Some exception occures.FAILED
+ e.printStackTrace( log );
+ throw new StatusException( "Couldn't create document", e );
+ }
+ }
+}
diff --git a/qadevOOo/tests/java/mod/_sch/ChXChartAxis.java b/qadevOOo/tests/java/mod/_sch/ChXChartAxis.java
new file mode 100644
index 000000000000..f796d5530a9c
--- /dev/null
+++ b/qadevOOo/tests/java/mod/_sch/ChXChartAxis.java
@@ -0,0 +1,130 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+package mod._sch;
+
+import java.io.PrintWriter;
+
+import lib.StatusException;
+import lib.TestCase;
+import lib.TestEnvironment;
+import lib.TestParameters;
+import util.SOfficeFactory;
+
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.chart.XAxisYSupplier;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.chart.XDiagram;
+import com.sun.star.drawing.XShape;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
+
+/**
+* Test for object which is represented by service
+* <code>com.sun.star.chart.ChartAxis</code>. <p>
+* Object implements the following interfaces :
+* <ul>
+* <li> <code>com::sun::star::drawing::LineProperties</code></li>
+* <li> <code>com::sun::star::style::CharacterProperties</code></li>
+* <li> <code>com::sun::star::beans::XPropertySet</code></li>
+* <li> <code>com::sun::star::chart::ChartAxis</code></li>
+* </ul>
+* @see com.sun.star.drawing.LineProperties
+* @see com.sun.star.style.CharacterProperties
+* @see com.sun.star.beans.XPropertySet
+* @see com.sun.star.chart.ChartAxis
+* @see ifc.drawing._LineProperties
+* @see ifc.style._CharacterProperties
+* @see ifc.beans._XPropertySet
+* @see ifc.chart._ChartAxis
+*/
+public class ChXChartAxis extends TestCase {
+ XChartDocument xChartDoc = null;
+
+ /**
+ * Creates Chart document.
+ */
+ protected void initialize( TestParameters tParam, PrintWriter log ) {
+ // get a soffice factory object
+ SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)tParam.getMSF());
+
+ try {
+ log.println( "creating a chartdocument" );
+ xChartDoc = SOF.createChartDoc(null);;
+ } catch (com.sun.star.uno.Exception e) {
+ // Some exception occures.FAILED
+ e.printStackTrace( log );
+ throw new StatusException( "Couldn't create document", e );
+ }
+ }
+
+ /**
+ * Disposes Chart document.
+ */
+ protected void cleanup( TestParameters tParam, PrintWriter log ) {
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
+ }
+
+ /**
+ * Creating a Testenvironment for the interfaces to be tested.
+ * Retrieves the diagram of the chart document. Then obtains the properties
+ * of the y-axis of the diagram using the interface
+ * <code>XAxisYSupplier</code>. The obatined property is the instance
+ * of the service <code>com.sun.star.chart.ChartAxis</code>.
+ * @see com.sun.star.chart.XAxisYSupplier
+ * @see com.sun.star.chart.ChartAxis
+ */
+ protected synchronized TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) {
+
+ XPropertySet oObj = null;
+ XShape oDiagram = null;
+
+ // create testobject here
+ // get the Diagram
+ log.println( "getting Diagram" );
+ oDiagram = (XDiagram) xChartDoc.getDiagram();
+
+ // get the Axis
+ log.println( "getting ChartAxis" );
+ XAxisYSupplier oAxisSup = (XAxisYSupplier)
+ UnoRuntime.queryInterface(XAxisYSupplier.class,oDiagram);
+ oObj = (XPropertySet) oAxisSup.getYAxis();
+
+ log.println( "creating a new environment for chartdocument object" );
+ TestEnvironment tEnv = new TestEnvironment( oObj );
+
+ return tEnv;
+ } // finish method getTestEnvironment
+
+
+
+} // finish class ChXChartAxis
+
diff --git a/qadevOOo/tests/java/mod/_sch/ChXChartData.java b/qadevOOo/tests/java/mod/_sch/ChXChartData.java
new file mode 100644
index 000000000000..3236e345b8e6
--- /dev/null
+++ b/qadevOOo/tests/java/mod/_sch/ChXChartData.java
@@ -0,0 +1,102 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+package mod._sch;
+import java.io.PrintWriter;
+
+import lib.StatusException;
+import lib.TestCase;
+import lib.TestEnvironment;
+import lib.TestParameters;
+import util.SOfficeFactory;
+
+import com.sun.star.chart.XChartData;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.lang.XMultiServiceFactory;
+
+/**
+* Test for object which is represented by service
+* <code>com.sun.star.chart.ChartData</code>. <p>
+* Object implements the following interfaces :
+* <ul>
+* <li> <code>com::sun::star::chart::XChartData</code></li>
+* </ul>
+* @see com.sun.star.chart.ChartData
+* @see com.sun.star.chart.XChartData
+* @see ifc.chart._XChartData
+*/
+public class ChXChartData extends TestCase {
+ XChartDocument xChartDoc = null;
+
+ /**
+ * Creates Chart document.
+ */
+ protected void initialize( TestParameters tParam, PrintWriter log ) {
+ // get a soffice factory object
+ SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)tParam.getMSF());
+
+ try {
+ log.println( "creating a chartdocument" );
+ xChartDoc = SOF.createChartDoc(null);;
+ } catch (com.sun.star.uno.Exception e) {
+ // Some exception occures.FAILED
+ e.printStackTrace( log );
+ throw new StatusException( "Couldn't create document", e );
+ }
+ }
+
+ /**
+ * Disposes Chart document.
+ */
+ protected void cleanup( TestParameters tParam, PrintWriter log ) {
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
+ }
+
+ /**
+ * Creating a Testenvironment for the interfaces to be tested.
+ * Retrieves the data source of the chart. This data source is the instance
+ * of the service <code>com.sun.star.chart.ChartData</code>.
+ * @see com.sun.star.chart.ChartData
+ */
+ protected synchronized TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) {
+
+ // get the Data
+ log.println( "getting Data" );
+ XChartData oObj = (XChartData) xChartDoc.getData();
+
+ log.println( "creating a new environment for chartdocument object" );
+ TestEnvironment tEnv = new TestEnvironment( oObj );
+
+ return tEnv;
+ } // finish method getTestEnvironment
+
+} // finish class ChXChartData
+
diff --git a/qadevOOo/tests/java/mod/_sch/ChXChartDataArray.java b/qadevOOo/tests/java/mod/_sch/ChXChartDataArray.java
new file mode 100644
index 000000000000..14caeefff8c1
--- /dev/null
+++ b/qadevOOo/tests/java/mod/_sch/ChXChartDataArray.java
@@ -0,0 +1,106 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+package mod._sch;
+import java.io.PrintWriter;
+
+import lib.StatusException;
+import lib.TestCase;
+import lib.TestEnvironment;
+import lib.TestParameters;
+import util.SOfficeFactory;
+
+import com.sun.star.chart.XChartData;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.lang.XMultiServiceFactory;
+
+/**
+* Test for object which is represented by service
+* <code>com.sun.star.chart.ChartDataArray</code>. <p>
+* Object implements the following interfaces :
+* <ul>
+* <li> <code>com::sun::star::chart::XChartData</code></li>
+* <li> <code>com::sun::star::chart::XChartDataArray</code></li>
+* </ul>
+* @see com.sun.star.chart.ChartDataArray
+* @see com.sun.star.chart.XChartData
+* @see com.sun.star.chart.XChartDataArray
+* @see ifc.chart._XChartData
+* @see ifc.chart._XChartDataArray
+*/
+public class ChXChartDataArray extends TestCase {
+ XChartDocument xChartDoc = null;
+
+ /**
+ * Creates Chart document.
+ */
+ protected void initialize( TestParameters tParam, PrintWriter log ) {
+ // get a soffice factory object
+ SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)tParam.getMSF());
+
+ try {
+ log.println( "creating a chartdocument" );
+ xChartDoc = SOF.createChartDoc(null);;
+ } catch (com.sun.star.uno.Exception e) {
+ // Some exception occures.FAILED
+ e.printStackTrace( log );
+ throw new StatusException( "Couldn't create document", e );
+ }
+ }
+
+ /**
+ * Disposes Chart document.
+ */
+ protected void cleanup( TestParameters tParam, PrintWriter log ) {
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
+ }
+
+ /**
+ * Creating a Testenvironment for the interfaces to be tested.
+ * Retrieves the data source of the chart. This data source is the instance
+ * of the service <code>com.sun.star.chart.ChartDataArray</code>.
+ * <code>com.sun.star.chart.ChartDataArray</code>.
+ * @see com.sun.star.chart.ChartDataArray
+ */
+ protected synchronized TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) {
+
+ // get the Data
+ log.println( "getting Data" );
+ XChartData oObj = (XChartData) xChartDoc.getData();
+
+ log.println( "creating a new environment for chartdocument object" );
+ TestEnvironment tEnv = new TestEnvironment( oObj );
+
+ return tEnv;
+ } // finish method getTestEnvironment
+
+} // finish class ChXChartDataArray
+
diff --git a/qadevOOo/tests/java/mod/_sch/ChXChartDocument.java b/qadevOOo/tests/java/mod/_sch/ChXChartDocument.java
new file mode 100644
index 000000000000..deafa9922043
--- /dev/null
+++ b/qadevOOo/tests/java/mod/_sch/ChXChartDocument.java
@@ -0,0 +1,172 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+package mod._sch;
+
+import com.sun.star.chart.XChartData;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.frame.XController;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.XInterface;
+import com.sun.star.view.XSelectionSupplier;
+
+import java.io.PrintWriter;
+
+import lib.StatusException;
+import lib.TestCase;
+import lib.TestEnvironment;
+import lib.TestParameters;
+
+import util.SOfficeFactory;
+
+
+/**
+* Test for object which is represented by service
+* <code>com.sun.star.chart.ChartDocument</code>. <p>
+* Object implements the following interfaces :
+* <ul>
+* <li> <code>com::sun::star::lang::XComponent</code></li>
+* <li> <code>com::sun::star::frame::XModel</code></li>
+* <li> <code>com::sun::star::chart::XChartDocument</code></li>
+* <li> <code>com::sun::star::beans::XPropertySet</code></li>
+* <li> <code>com::sun::star::chart::ChartTableAddressSupplier</code></li>
+* <li> <code>com::sun::star::chart::ChartDocument</code></li>
+* </ul>
+* @see com.sun.star.lang.XComponent
+* @see com.sun.star.frame.XModel
+* @see com.sun.star.chart.XChartDocument
+* @see com.sun.star.beans.XPropertySet
+* @see com.sun.star.chart.ChartTableAddressSupplier
+* @see com.sun.star.chart.ChartDocument
+* @see ifc.lang._XComponent
+* @see ifc.frame._XModel
+* @see ifc.chart._XChartDocument
+* @see ifc.beans._XPropertySet
+* @see ifc.chart._ChartTableAddressSupplier
+* @see ifc.chart._ChartDocument
+*/
+public class ChXChartDocument extends TestCase {
+ XChartDocument xChartDoc = null;
+ XChartDocument doc2 = null;
+
+ /**
+ * Disposes Chart documents.
+ */
+ protected void cleanup(TestParameters Param, PrintWriter log) {
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
+ if( doc2!=null ) {
+ log.println( " closing xChartDoc2" );
+ util.DesktopTools.closeDoc(doc2);
+ doc2 = null;
+ }
+ }
+
+ /**
+ * Creating a Testenvironment for the interfaces to be tested.
+ * Creates two chart documents and retrieves current controllers from them
+ * using the interface <code>XChartDocument</code>. The created documents
+ * is the instances of the service <code>com.sun.star.chart.ChartDocument</code>.
+ * Obtains the data source of the second created chart and creates
+ * a pie diagram.
+ * Object relations created :
+ * <ul>
+ * <li> <code>'SELSUPP'</code> for
+ * {@link ifc.frame._XModel}(the controller of the first created chart
+ * document)</li>
+ * <li> <code>'TOSELECT'</code> for
+ * {@link ifc.frame._XModel}(the shape of the main title of
+ * the first created chart document)</li>
+ * <li> <code>'CONT2'</code> for
+ * {@link ifc.frame._XModel}(the second created chart document)</li>
+ * <li> <code>'DIAGRAM'</code> for
+ * {@link ifc.chart._XChartDocument}(the created pie diagram)</li>
+ * <li> <code>'CHARTDATA'</code> for
+ * {@link ifc.chart._XChartDocument}(the data source of the second
+ * created chart)</li>
+ * </ul>
+ * @see com.sun.star.chart.XChartData
+ * @see com.sun.star.chart.ChartDocument
+ */
+ protected synchronized TestEnvironment createTestEnvironment(TestParameters tParam,
+ PrintWriter log) {
+ // get a soffice factory object
+ SOfficeFactory SOF = SOfficeFactory.getFactory(
+ (XMultiServiceFactory) tParam.getMSF());
+
+ try {
+ log.println("creating a chartdocument");
+ xChartDoc = SOF.createChartDoc(null);
+ log.println("Waiting before opening second document");
+ doc2 = SOF.createChartDoc(null);
+ } catch (com.sun.star.uno.Exception e) {
+ // Some exception occures.FAILED
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't create document", e);
+ }
+
+
+ // get the chartdocument
+ log.println("getting ChartDocument");
+
+ XInterface oObj = (XChartDocument) xChartDoc;
+
+ XController cont1 = xChartDoc.getCurrentController();
+ XController cont2 = doc2.getCurrentController();
+
+ cont1.getFrame().setName("cont1");
+ cont2.getFrame().setName("cont2");
+
+ XSelectionSupplier sel = (XSelectionSupplier) UnoRuntime.queryInterface(
+ XSelectionSupplier.class, cont1);
+
+ log.println("creating a new environment for chartdocument object");
+
+ TestEnvironment tEnv = new TestEnvironment(oObj);
+
+ log.println("Adding SelectionSupplier and Shape to select for XModel");
+ tEnv.addObjRelation("SELSUPP", sel);
+ tEnv.addObjRelation("TOSELECT", xChartDoc.getTitle());
+
+ log.println("adding Controller as ObjRelation for XModel");
+ tEnv.addObjRelation("CONT2", cont2);
+
+ log.println("adding another Diagram as mod relation to environment");
+ tEnv.addObjRelation("DIAGRAM",
+ SOF.createDiagram(xChartDoc, "PieDiagram"));
+
+ log.println("adding another ChartData as mod relation to environment");
+
+ XChartData ChartData = doc2.getData();
+ tEnv.addObjRelation("CHARTDATA", ChartData);
+
+ return tEnv;
+ } // finish method getTestEnvironment
+} // finish class ChXChartDocument
diff --git a/qadevOOo/tests/java/mod/_sch/ChXChartView.java b/qadevOOo/tests/java/mod/_sch/ChXChartView.java
new file mode 100644
index 000000000000..f5476f2d0643
--- /dev/null
+++ b/qadevOOo/tests/java/mod/_sch/ChXChartView.java
@@ -0,0 +1,147 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+package mod._sch;
+
+import java.io.PrintWriter;
+import java.util.Comparator;
+
+import lib.StatusException;
+import lib.TestCase;
+import lib.TestEnvironment;
+import lib.TestParameters;
+import util.SOfficeFactory;
+
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.drawing.XShapeDescriptor;
+import com.sun.star.frame.XController;
+import com.sun.star.frame.XModel;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
+
+/**
+* Test for object which is represented by service
+* <code>com.sun.star.view.OfficeDocumentView</code>. <p>
+* Object implements the following interfaces :
+* <ul>
+* <li> <code>com::sun::star::view::XViewSettingsSupplier</code></li>
+* <li> <code>com::sun::star::view::XControlAccess</code></li>
+* <li> <code>com::sun::star::view::XSelectionSupplier</code></li>
+* </ul>
+* @see com.sun.star.view.OfficeDocumentView
+* @see com.sun.star.view.XViewSettingsSupplier
+* @see com.sun.star.view.XControlAccess
+* @see com.sun.star.view.XSelectionSupplier
+* @see ifc.view._XViewSettingsSupplier
+* @see ifc.view._XControlAccess
+* @see ifc.view._XSelectionSupplier
+*/
+public class ChXChartView extends TestCase {
+ XChartDocument xChartDoc = null;
+
+ /**
+ * Creates Chart document.
+ */
+ protected void initialize( TestParameters tParam, PrintWriter log ) {
+ // get a soffice factory object
+ SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)tParam.getMSF());
+
+ try {
+ log.println( "creating a chartdocument" );
+ xChartDoc = SOF.createChartDoc(null);;
+ } catch (com.sun.star.uno.Exception e) {
+ // Some exception occures.FAILED
+ e.printStackTrace( log );
+ throw new StatusException( "Couldn't create document", e );
+ }
+ }
+
+ /**
+ * Disposes Chart document.
+ */
+ protected void cleanup( TestParameters tParam, PrintWriter log ) {
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
+ }
+
+ /**
+ * Creating a Testenvironment for the interfaces to be tested.
+ * Retrieves the current controller of the chart document using
+ * the interface <code>XModel</code>.The retrieved controller is the instance
+ * of the service <code>com.sun.star.view.OfficeDocumentView</code>.
+ * Obtains the main title and the legend of the chart document.
+ * Object relations created :
+ * <ul>
+ *
+ * </ul>
+ * @see com.sun.star.frame.XModel
+ */
+ protected synchronized TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) {
+
+ XController oObj = null;
+ XModel oModel = null;
+
+ // get the ChartView
+ log.println( "getting ChartView" );
+ oModel = (XModel)UnoRuntime.queryInterface(XModel.class, xChartDoc);
+ oObj = (XController)oModel.getCurrentController();
+
+ log.println( "creating a new environment for chartdocument object" );
+ TestEnvironment tEnv = new TestEnvironment( oObj );
+
+ tEnv.addObjRelation("Selections", new Object[]
+ {xChartDoc.getArea(), xChartDoc.getDiagram(), xChartDoc.getTitle(),
+ xChartDoc.getLegend()} );
+
+ tEnv.addObjRelation("Comparer", new Comparator() {
+ public int compare(Object o1, Object o2) {
+ XShapeDescriptor descr1 = (XShapeDescriptor)
+ UnoRuntime.queryInterface(XShapeDescriptor.class, o1);
+ XShapeDescriptor descr2 = (XShapeDescriptor)
+ UnoRuntime.queryInterface(XShapeDescriptor.class, o2);
+ if (descr1 == null || descr2 == null) {
+ return -1;
+ }
+ if (descr1.getShapeType().equals(descr2.getShapeType())) {
+ return 0;
+ }
+ return 1;
+ }
+ public boolean equals(Object obj) {
+ return compare(this, obj) == 0;
+ }
+ } );
+
+ return tEnv;
+ } // finish method getTestEnvironment
+
+
+} // finish class ChXChartView
+
diff --git a/qadevOOo/tests/java/mod/_sch/ChXDataPoint.java b/qadevOOo/tests/java/mod/_sch/ChXDataPoint.java
new file mode 100644
index 000000000000..0c1647684c75
--- /dev/null
+++ b/qadevOOo/tests/java/mod/_sch/ChXDataPoint.java
@@ -0,0 +1,162 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+package mod._sch;
+
+import java.io.PrintWriter;
+
+import lib.StatusException;
+import lib.TestCase;
+import lib.TestEnvironment;
+import lib.TestParameters;
+import util.SOfficeFactory;
+import util.utils;
+
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.chart.XDiagram;
+import com.sun.star.lang.XComponent;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
+
+/**
+* Test for object which is represented by service
+* <code>com.sun.star.chart.ChartDataPointProperties</code>. <p>
+* Object implements the following interfaces
+* <ul>
+* <li> <code>com::sun::star::chart::ChartDataPointProperties</code></li>
+* <li> <code>com::sun::star::drawing::FillProperties</code></li>
+* <li> <code>com::sun::star::drawing::LineProperties</code></li>
+* <li> <code>com::sun::star::style::CharacterProperties</code></li>
+* <li> <code>com::sun::star::beans::XPropertySet</code></li>
+* <li> <code>com::sun::star::chart::Chart3DBarProperties</code></li>
+* </ul>
+* The following files used by this test :
+* <ul>
+* <li><b> TransparencyChart.sxs </b> : to load predefined chart
+* document where two 'automatic' transparency styles exists :
+* 'Transparency 1' and 'Transparency 2'.</li>
+* </ul> <p>
+* @see com.sun.star.chart.ChartDataPointProperties
+* @see com.sun.star.drawing.FillProperties
+* @see com.sun.star.drawing.LineProperties
+* @see com.sun.star.style.CharacterProperties
+* @see com.sun.star.beans.XPropertySet
+* @see com.sun.star.chart.Chart3DBarProperties
+* @see ifc.chart._ChartDataPointProperties
+* @see ifc.drawing._FillProperties
+* @see ifc.drawing._LineProperties
+* @see ifc.style._CharacterProperties
+* @see ifc.beans._XPropertySet
+* @see ifc.chart._Chart3DBarProperties
+*/
+public class ChXDataPoint extends TestCase {
+ XChartDocument xChartDoc = null;
+
+ /**
+ * Creates Chart document.
+ */
+ protected void initialize( TestParameters tParam, PrintWriter log ) {
+ // get a soffice factory object
+ SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)tParam.getMSF());
+
+ try {
+ log.println( "creating a chartdocument" );
+ XComponent xComp = SOF.loadDocument(
+ utils.getFullTestURL("TransparencyChart.sxs"));
+ xChartDoc = (XChartDocument)
+ UnoRuntime.queryInterface(XChartDocument.class,xComp);
+ } catch (com.sun.star.uno.Exception e) {
+ // Some exception occures.FAILED
+ e.printStackTrace( log );
+ throw new StatusException( "Couldn't create document", e );
+ }
+ }
+
+ /**
+ * Disposes Chart document.
+ */
+ protected void cleanup( TestParameters tParam, PrintWriter log ) {
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
+ }
+
+ /**
+ * Creating a Testenvironment for the interfaces to be tested.
+ * Retrieves the diagram of the chart document. Obtains the properties of
+ * the specified data point. The obtained properties is the instance of
+ * the service <code>com.sun.star.chart.ChartDataPointProperties</code>.
+ * Creates a XY-diagram and bar-diagram also.
+ * Object relations created :
+ * <ul>
+ * <li> <code>'LINE'</code> for
+ * {@link ifc.chart._ChartDataPointProperties}(the created XY-diagram)</li>
+ * <li> <code>'CHARTDOC'</code> for
+ * {@link ifc.chart._ChartDataPointProperties},
+ * {@link ifc.chart._Chart3DBarProperties}(the chart document)</li>
+ * <li> <code>'BAR'</code> for
+ * {@link ifc.chart._Chart3DBarProperties}(the created bar-diagram)</li>
+ * </ul>
+ */
+ protected synchronized TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) {
+
+ XPropertySet oObj = null;
+ XDiagram oDiagram = null;
+
+ SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)Param.getMSF());
+
+ // get the DataRowPoint_Point
+ try {
+ log.println( "getting ChXDataRowPoint_Point" );
+ oDiagram = (XDiagram) xChartDoc.getDiagram();
+ oObj = (XPropertySet) oDiagram.getDataPointProperties(1,1);
+ } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
+ // Some exception occures.FAILED
+ e.printStackTrace( log );
+ throw new StatusException( "Couldn't get ChXDataRowPoint_Point", e );
+ }
+
+ log.println( "creating a new environment for chartdocument object" );
+ TestEnvironment tEnv = new TestEnvironment( oObj );
+
+ Object line = SOF.createDiagram(xChartDoc,"XYDiagram");
+ tEnv.addObjRelation("LINE",line);
+
+ Object bar = SOF.createDiagram(xChartDoc,"BarDiagram");
+ tEnv.addObjRelation("BAR",bar);
+
+ log.println( "adding ChartDocument as mod relation to environment" );
+ tEnv.addObjRelation("CHARTDOC", xChartDoc);
+
+ return tEnv;
+ } // finish method getTestEnvironment
+
+} // finish class ChXDataPoint
+
diff --git a/qadevOOo/tests/java/mod/_sch/ChXDataRow.java b/qadevOOo/tests/java/mod/_sch/ChXDataRow.java
new file mode 100644
index 000000000000..69139ea5d902
--- /dev/null
+++ b/qadevOOo/tests/java/mod/_sch/ChXDataRow.java
@@ -0,0 +1,169 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+package mod._sch;
+
+import java.io.PrintWriter;
+
+import lib.StatusException;
+import lib.TestCase;
+import lib.TestEnvironment;
+import lib.TestParameters;
+import util.SOfficeFactory;
+import util.utils;
+
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.chart.XDiagram;
+import com.sun.star.lang.XComponent;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
+
+/**
+* Test for object which is represented by service
+* <code>com.sun.star.chart.ChartDataRowProperties</code>. <p>
+* Object implements the following interfaces :
+* <ul>
+* <li> <code>com::sun::star::drawing::FillProperties</code></li>
+* <li> <code>com::sun::star::chart::ChartStatistics</code></li>
+* <li> <code>com::sun::star::chart::ChartDataRowProperties</code></li>
+* <li> <code>com::sun::star::drawing::LineProperties</code></li>
+* <li> <code>com::sun::star::beans::XPropertySet</code></li>
+* <li> <code>com::sun::star::chart::ChartDataPointProperties</code></li>
+* <li> <code>com::sun::star::chart::Chart3DBarProperties</code></li>
+* <li> <code>com::sun::star::style::CharacterProperties</code></li>
+* </ul>
+* The following files used by this test :
+* <ul>
+* <li><b> TransparencyChart.sxs </b> : to load predefined chart
+* document where two 'automatic' transparency styles exists :
+* 'Transparency 1' and 'Transparency 2'.</li>
+* </ul> <p>
+* @see com.sun.star.drawing.FillProperties
+* @see com.sun.star.chart.ChartStatistics
+* @see com.sun.star.chart.ChartDataRowProperties
+* @see com.sun.star.drawing.LineProperties
+* @see com.sun.star.beans.XPropertySet
+* @see com.sun.star.chart.ChartDataPointProperties
+* @see com.sun.star.chart.Chart3DBarProperties
+* @see com.sun.star.style.CharacterProperties
+* @see ifc.drawing._FillProperties
+* @see ifc.chart._ChartStatistics
+* @see ifc.chart._ChartDataRowProperties
+* @see ifc.drawing._LineProperties
+* @see ifc.beans._XPropertySet
+* @see ifc.chart._ChartDataPointProperties
+* @see ifc.chart._Chart3DBarProperties
+* @see ifc.style._CharacterProperties
+*/
+public class ChXDataRow extends TestCase {
+ XChartDocument xChartDoc = null;
+
+ /**
+ * Creates Chart document.
+ */
+ protected void initialize( TestParameters tParam, PrintWriter log ) {
+ // get a soffice factory object
+ SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)tParam.getMSF());
+
+ try {
+ log.println( "creating a chartdocument" );
+ XComponent xComp = SOF.loadDocument(
+ utils.getFullTestURL("TransparencyChart.sxs"));
+ xChartDoc = (XChartDocument)
+ UnoRuntime.queryInterface(XChartDocument.class,xComp);
+ } catch (com.sun.star.uno.Exception e) {
+ // Some exception occures.FAILED
+ e.printStackTrace( log );
+ throw new StatusException( "Couldn't create document", e );
+ }
+ }
+
+ /**
+ * Disposes Chart document.
+ */
+ protected synchronized void cleanup( TestParameters tParam, PrintWriter log ) {
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
+ }
+
+
+ /**
+ * Creating a Testenvironment for the interfaces to be tested.
+ * Retrieves the diagram of the chart document. Obtains the properties of
+ * the specified data row. The obtained properties is the instance of
+ * the service <code>com.sun.star.chart.ChartDataRowProperties</code>.
+ * Creates a XY-diagram and bar-diagram also.
+ * Object relations created :
+ * <ul>
+ * <li> <code>'LINE'</code> for
+ * {@link ifc.chart._ChartDataPointProperties}(the created XY-diagram)</li>
+ * <li> <code>'CHARTDOC'</code> for
+ * {@link ifc.chart._ChartDataPointProperties},
+ * {@link ifc.chart._Chart3DBarProperties}(the chart document)</li>
+ * <li> <code>'BAR'</code> for
+ * {@link ifc.chart._Chart3DBarProperties}(the created bar-diagram)</li>
+ * </ul>
+ */
+ protected TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) {
+
+ XPropertySet oObj = null;
+ XDiagram oDiagram = null;
+ // get the ChXDataRowPoint_Row
+ try {
+ log.println( "getting ChXDataRowPoint_Row" );
+ oDiagram = (XDiagram) xChartDoc.getDiagram();
+ oObj = (XPropertySet) oDiagram.getDataRowProperties(1);
+ } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
+ // Some exception occures.FAILED
+ e.printStackTrace( log );
+ throw new StatusException( "Couldn't get ChXDataRowPoint_Row", e );
+ }
+
+ log.println( "creating a new environment for chartdocument object" );
+ TestEnvironment tEnv = new TestEnvironment( oObj );
+
+ SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)Param.getMSF());
+
+ Object line = SOF.createDiagram(xChartDoc,"XYDiagram");
+ tEnv.addObjRelation("LINE",line);
+
+ Object bar = SOF.createDiagram(xChartDoc,"BarDiagram");
+ tEnv.addObjRelation("BAR",bar);
+
+ log.println( "adding ChartDocument as mod relation to environment" );
+ tEnv.addObjRelation("CHARTDOC", xChartDoc);
+
+ return tEnv;
+ } // finish method getTestEnvironment
+
+
+} // finish class ChXDataRow
+
diff --git a/qadevOOo/tests/java/mod/_sch/ChXDiagram.java b/qadevOOo/tests/java/mod/_sch/ChXDiagram.java
new file mode 100644
index 000000000000..908b947c4898
--- /dev/null
+++ b/qadevOOo/tests/java/mod/_sch/ChXDiagram.java
@@ -0,0 +1,413 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+package mod._sch;
+
+import java.io.PrintWriter;
+
+import lib.StatusException;
+import lib.TestCase;
+import lib.TestEnvironment;
+import lib.TestParameters;
+import util.SOfficeFactory;
+
+import com.sun.star.awt.Rectangle;
+import com.sun.star.chart.XChartDataArray;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.chart.XDiagram;
+import com.sun.star.container.XIndexAccess;
+import com.sun.star.container.XNameAccess;
+import com.sun.star.document.XEmbeddedObjectSupplier;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.sheet.XCellRangeAddressable;
+import com.sun.star.sheet.XSpreadsheet;
+import com.sun.star.sheet.XSpreadsheetDocument;
+import com.sun.star.sheet.XSpreadsheets;
+import com.sun.star.table.CellRangeAddress;
+import com.sun.star.table.XCell;
+import com.sun.star.table.XCellRange;
+import com.sun.star.table.XTableChart;
+import com.sun.star.table.XTableCharts;
+import com.sun.star.table.XTableChartsSupplier;
+import com.sun.star.uno.AnyConverter;
+import com.sun.star.uno.Type;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.XInterface;
+
+/**
+* Test for object which is represented by the following services:
+* <ul>
+* <li> <code>com.sun.star.chart.Dim3DDiagram</code> </li>
+* <li> <code>com.sun.star.chart.StockDiagram</code> </li>
+* <li> <code>com.sun.star.chart.LineDiagram</code> </li>
+* <li> <code>com.sun.star.chart.BarDiagram</code> </li>
+* <li> <code>com.sun.star.chart.StackableDiagram</code> </li>
+* </ul>
+* <p>
+* Object implements the following interfaces :
+* <ul>
+* <li> <code>com::sun::star::chart::XDiagram</code></li>
+* <li> <code>com::sun::star::chart::ChartAxisXSupplier</code></li>
+* <li> <code>com::sun::star::chart::Dim3DDiagram</code></li>
+* <li> <code>com::sun::star::chart::StockDiagram</code></li>
+* <li> <code>com::sun::star::chart::ChartAxisZSupplier</code></li>
+* <li> <code>com::sun::star::chart::XTwoAxisXSupplier</code></li>
+* <li> <code>com::sun::star::chart::LineDiagram</code></li>
+* <li> <code>com::sun::star::chart::BarDiagram</code></li>
+* <li> <code>com::sun::star::chart::XAxisYSupplier</code></li>
+* <li> <code>com::sun::star::chart::Diagram</code></li>
+* <li> <code>com::sun::star::chart::X3DDisplay</code></li>
+* <li> <code>com::sun::star::chart::ChartTwoAxisYSupplier</code></li>
+* <li> <code>com::sun::star::chart::StackableDiagram</code></li>
+* <li> <code>com::sun::star::chart::ChartAxisYSupplier</code></li>
+* <li> <code>com::sun::star::chart::XAxisXSupplier</code></li>
+* <li> <code>com::sun::star::chart::ChartTwoAxisXSupplier</code></li>
+* <li> <code>com::sun::star::drawing::XShape</code></li>
+* <li> <code>com::sun::star::chart::XTwoAxisYSupplier</code></li>
+* <li> <code>com::sun::star::chart::ChartStatistics</code></li>
+* <li> <code>com::sun::star::beans::XPropertySet</code></li>
+* <li> <code>com::sun::star::drawing::XShapeDescriptor</code></li>
+* <li> <code>com::sun::star::chart::XAxisZSupplier</code></li>
+* <li> <code>com::sun::star::chart::XStatisticDisplay</code></li>
+* </ul>
+* @see com.sun.star.chart.XDiagram
+* @see com.sun.star.chart.ChartAxisXSupplier
+* @see com.sun.star.chart.Dim3DDiagram
+* @see com.sun.star.chart.StockDiagram
+* @see com.sun.star.chart.ChartAxisZSupplier
+* @see com.sun.star.chart.XTwoAxisXSupplier
+* @see com.sun.star.chart.LineDiagram
+* @see com.sun.star.chart.BarDiagram
+* @see com.sun.star.chart.XAxisYSupplier
+* @see com.sun.star.chart.Diagram
+* @see com.sun.star.chart.X3DDisplay
+* @see com.sun.star.chart.ChartTwoAxisYSupplier
+* @see com.sun.star.chart.StackableDiagram
+* @see com.sun.star.chart.ChartAxisYSupplier
+* @see com.sun.star.chart.XAxisXSupplier
+* @see com.sun.star.chart.ChartTwoAxisXSupplier
+* @see com.sun.star.drawing.XShape
+* @see com.sun.star.chart.XTwoAxisYSupplier
+* @see com.sun.star.chart.ChartStatistics
+* @see com.sun.star.beans.XPropertySet
+* @see com.sun.star.drawing.XShapeDescriptor
+* @see com.sun.star.chart.XAxisZSupplier
+* @see com.sun.star.chart.XStatisticDisplay
+* @see ifc.chart._XDiagram
+* @see ifc.chart._ChartAxisXSupplier
+* @see ifc.chart._Dim3DDiagram
+* @see ifc.chart._StockDiagram
+* @see ifc.chart._ChartAxisZSupplier
+* @see ifc.chart._XTwoAxisXSupplier
+* @see ifc.chart._LineDiagram
+* @see ifc.chart._BarDiagram
+* @see ifc.chart._XAxisYSupplier
+* @see ifc.chart._Diagram
+* @see ifc.chart._X3DDisplay
+* @see ifc.chart._ChartTwoAxisYSupplier
+* @see ifc.chart._StackableDiagram
+* @see ifc.chart._ChartAxisYSupplier
+* @see ifc.chart._XAxisXSupplier
+* @see ifc.chart._ChartTwoAxisXSupplier
+* @see ifc.drawing._XShape
+* @see ifc.chart._XTwoAxisYSupplier
+* @see ifc.chart._ChartStatistics
+* @see ifc.beans._XPropertySet
+* @see ifc.drawing._XShapeDescriptor
+* @see ifc.chart._XAxisZSupplier
+* @see ifc.chart._XStatisticDisplay
+*/
+public class ChXDiagram extends TestCase {
+ XSpreadsheetDocument xSheetDoc = null;
+
+ /**
+ * Creates Spreadsheet document.
+ */
+ protected void initialize( TestParameters tParam, PrintWriter log ) {
+ // get a soffice factory object
+ SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)tParam.getMSF());
+
+ try {
+ log.println( "creating a sheetdocument" );
+ xSheetDoc = SOF.createCalcDoc(null);;
+ } catch (com.sun.star.uno.Exception e) {
+ // Some exception occures.FAILED
+ e.printStackTrace( log );
+ throw new StatusException( "Couldn't create document", e );
+ }
+ }
+
+ /**
+ * Disposes Spreadsheet document.
+ */
+ protected void cleanup( TestParameters tParam, PrintWriter log ) {
+ log.println( " closing xSheetDoc " );
+ util.DesktopTools.closeDoc(xSheetDoc);
+ }
+
+ /**
+ * Creating a Testenvironment for the interfaces to be tested.
+ * Retrieves a collection of spreadsheets from a document
+ * and takes one of them. Inserts some values into the cells of the some cell
+ * range address. Adds and retrieves the chart that using the data from
+ * the cells of this cell range address. Obtains the chart document which is
+ * embedded into the retrieved chart using the interface
+ * <code>XEmbeddedObjectSupplier</code>. Retrieves the diagram from
+ * the obtained chart document. The retrieved diagram is the instance of
+ * the service <code>com.sun.star.chart.Diagram</code>.
+ * Obtains the data source of the chart from the chart document.
+ * Creates a stock-diagram, a bar-diagram, a XY-diagram and line-diagram
+ * that are the instances of the following services:
+ * <ul>
+ * <li> <code>com.sun.star.chart.StockDiagram</code> </li>
+ * <li> <code>com.sun.star.chart.BarDiagram</code> </li>
+ * <li> <code>com.sun.star.chart.LineDiagram</code> </li>
+ * <li> <code>com.sun.star.chart.StackableDiagram</code> </li>
+ * </ul>.
+ * Object relations created :
+ * <ul>
+ * <li> <code>'CHARTDOC'</code> for
+ * {@link ifc.chart._Dim3DDiagram}, {@link ifc.chart._StockDiagram},
+ * {@link ifc.chart._ChartAxisZSupplier}, {@link _LineDiagram},
+ * {@link ifc.chart._BarDiagram}, {@link ifc.chart._Diagram},
+ * {@link ifc.chart._ChartTwoAxisYSupplier},
+ * {@link ifc.chart._StackableDiagram}, {@link ifc.chart._Diagram},
+ * {@link ifc.chart._ChartAxisYSupplier},
+ * {@link ifc.chart._ChartTwoAxisXSupplier},
+ * {@link ifc.chart._ChartStatistics} (the obtained chart document)</li>
+ * <li> <code>'ROWAMOUNT', 'COLAMOUNT'</code> for
+ * {@link ifc.chart._XDiagram}(the number of chart columns and
+ * the number of chart rows) </li>
+ * <li> <code>'STOCK'</code> for
+ * {@link ifc.chart._StockDiagram}(the created stock-diagram) </li>
+ * <li> <code>'BAR'</code> for
+ * {@link ifc.chart._BarDiagram}, {@link ifc.chart._ChartAxisZSupplier},
+ * {@link ifc.chart._ChartTwoAxisXSupplier},
+ * {@link ifc.chart._ChartTwoAxisYSupplier}(the created bar-diagram)</li>
+ * <li> <code>'LINE'</code> for
+ * {@link ifc.chart._LineDiagram}(the created XY-diagram) </li>
+ * <li> <code>'STACK'</code> for
+ * {@link ifc.chart._StackableDiagram}(the created Line-diagram) </li>
+ * </ul>
+ * @see com.sun.star.document.XEmbeddedObjectSupplier
+ * @see com.sun.star.chart.Diagram
+ * @see com.sun.star.chart.StockDiagram
+ */
+ protected synchronized TestEnvironment createTestEnvironment
+ (TestParameters Param, PrintWriter log) {
+
+ XSpreadsheet oSheet=null;
+ XChartDocument xChartDoc=null;
+ XDiagram oObj = null;
+
+ System.out.println("Getting spreadsheet") ;
+ XSpreadsheets oSheets = xSheetDoc.getSheets() ;
+ XIndexAccess oIndexSheets = (XIndexAccess)
+ UnoRuntime.queryInterface(XIndexAccess.class, oSheets);
+ try {
+ oSheet = (XSpreadsheet) AnyConverter.toObject(
+ new Type(XSpreadsheet.class),oIndexSheets.getByIndex(0));
+ } catch(com.sun.star.lang.WrappedTargetException e) {
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't get sheet", e);
+ } catch(com.sun.star.lang.IndexOutOfBoundsException e) {
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't get sheet", e);
+ } catch(com.sun.star.lang.IllegalArgumentException e) {
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't get sheet", e);
+ }
+
+ log.println("Creating the Header") ;
+
+ insertIntoCell(1,0,"JAN",oSheet,"");
+ insertIntoCell(2,0,"FEB",oSheet,"");
+ insertIntoCell(3,0,"MAR",oSheet,"");
+ insertIntoCell(4,0,"APR",oSheet,"");
+ insertIntoCell(5,0,"MAI",oSheet,"");
+ insertIntoCell(6,0,"JUN",oSheet,"");
+ insertIntoCell(7,0,"JUL",oSheet,"");
+ insertIntoCell(8,0,"AUG",oSheet,"");
+ insertIntoCell(9,0,"SEP",oSheet,"");
+ insertIntoCell(10,0,"OCT",oSheet,"");
+ insertIntoCell(11,0,"NOV",oSheet,"");
+ insertIntoCell(12,0,"DEC",oSheet,"");
+ insertIntoCell(13,0,"SUM",oSheet,"");
+
+ log.println("Fill the lines");
+
+ insertIntoCell(0,1,"Smith",oSheet,"");
+ insertIntoCell(1,1,"42",oSheet,"V");
+ insertIntoCell(2,1,"58.9",oSheet,"V");
+ insertIntoCell(3,1,"-66.5",oSheet,"V");
+ insertIntoCell(4,1,"43.4",oSheet,"V");
+ insertIntoCell(5,1,"44.5",oSheet,"V");
+ insertIntoCell(6,1,"45.3",oSheet,"V");
+ insertIntoCell(7,1,"-67.3",oSheet,"V");
+ insertIntoCell(8,1,"30.5",oSheet,"V");
+ insertIntoCell(9,1,"23.2",oSheet,"V");
+ insertIntoCell(10,1,"-97.3",oSheet,"V");
+ insertIntoCell(11,1,"22.4",oSheet,"V");
+ insertIntoCell(12,1,"23.5",oSheet,"V");
+ insertIntoCell(13,1,"=SUM(B2:M2)",oSheet,"");
+
+ insertIntoCell(0,2,"Jones",oSheet,"");
+ insertIntoCell(1,2,"21",oSheet,"V");
+ insertIntoCell(2,2,"40.9",oSheet,"V");
+ insertIntoCell(3,2,"-57.5",oSheet,"V");
+ insertIntoCell(4,2,"-23.4",oSheet,"V");
+ insertIntoCell(5,2,"34.5",oSheet,"V");
+ insertIntoCell(6,2,"59.3",oSheet,"V");
+ insertIntoCell(7,2,"27.3",oSheet,"V");
+ insertIntoCell(8,2,"-38.5",oSheet,"V");
+ insertIntoCell(9,2,"43.2",oSheet,"V");
+ insertIntoCell(10,2,"57.3",oSheet,"V");
+ insertIntoCell(11,2,"25.4",oSheet,"V");
+ insertIntoCell(12,2,"28.5",oSheet,"V");
+ insertIntoCell(13,2,"=SUM(B3:M3)",oSheet,"");
+
+ insertIntoCell(0,3,"Brown",oSheet,"");
+ insertIntoCell(1,3,"31.45",oSheet,"V");
+ insertIntoCell(2,3,"-20.9",oSheet,"V");
+ insertIntoCell(3,3,"-117.5",oSheet,"V");
+ insertIntoCell(4,3,"23.4",oSheet,"V");
+ insertIntoCell(5,3,"-114.5",oSheet,"V");
+ insertIntoCell(6,3,"115.3",oSheet,"V");
+ insertIntoCell(7,3,"-171.3",oSheet,"V");
+ insertIntoCell(8,3,"89.5",oSheet,"V");
+ insertIntoCell(9,3,"41.2",oSheet,"V");
+ insertIntoCell(10,3,"71.3",oSheet,"V");
+ insertIntoCell(11,3,"25.4",oSheet,"V");
+ insertIntoCell(12,3,"38.5",oSheet,"V");
+ insertIntoCell(13,3,"=SUM(A4:L4)",oSheet,"");
+
+ // insert a chart
+ Rectangle oRect = new Rectangle(500, 3000, 25000, 11000);
+
+ XCellRange oRange = (XCellRange)
+ UnoRuntime.queryInterface(XCellRange.class, oSheet);
+ XCellRange myRange = oRange.getCellRangeByName("A1:N4");
+ XCellRangeAddressable oRangeAddr = (XCellRangeAddressable)
+ UnoRuntime.queryInterface(XCellRangeAddressable.class, myRange);
+ CellRangeAddress myAddr = oRangeAddr.getRangeAddress();
+
+ CellRangeAddress[] oAddr = new CellRangeAddress[1];
+ oAddr[0] = myAddr;
+ XTableChartsSupplier oSupp = (XTableChartsSupplier)
+ UnoRuntime.queryInterface(XTableChartsSupplier.class, oSheet);
+
+ log.println("Insert Chart");
+ XTableCharts oCharts = oSupp.getCharts();
+
+
+ if (!oCharts.hasByName("ChXDiagram")) {
+ oCharts.addNewByName("ChXDiagram", oRect, oAddr, true, true);
+ }
+
+ // get the TableChart
+ XTableChart oChart = null;
+ try {
+ oChart = (XTableChart) AnyConverter.toObject(
+ new Type(XTableChart.class),((XNameAccess)
+ UnoRuntime.queryInterface(
+ XNameAccess.class, oCharts)).getByName("ChXDiagram"));
+ } catch (com.sun.star.lang.WrappedTargetException e) {
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't get TableChart", e);
+ } catch (com.sun.star.container.NoSuchElementException e) {
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't get TableChart", e);
+ } catch (com.sun.star.lang.IllegalArgumentException e) {
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't get TableChart", e);
+ }
+
+ XEmbeddedObjectSupplier oEOS = (XEmbeddedObjectSupplier)
+ UnoRuntime.queryInterface(XEmbeddedObjectSupplier.class, oChart);
+ XInterface oInt = oEOS.getEmbeddedObject();
+ xChartDoc = (XChartDocument)
+ UnoRuntime.queryInterface(XChartDocument.class,oInt);
+ oObj = (XDiagram) xChartDoc.getDiagram();
+
+ log.println( "creating a new environment for chartdocument object" );
+ TestEnvironment tEnv = new TestEnvironment( oObj );
+
+ log.println( "adding ChartDocument as mod relation to environment" );
+ tEnv.addObjRelation("CHARTDOC", xChartDoc);
+
+ XChartDataArray da = (XChartDataArray)
+ UnoRuntime.queryInterface(XChartDataArray.class, xChartDoc.getData());
+ int cols = da.getColumnDescriptions().length;
+ int rows = da.getRowDescriptions().length;
+
+ tEnv.addObjRelation("ROWAMOUNT", new Integer(rows));
+ tEnv.addObjRelation("COLAMOUNT", new Integer(cols));
+
+ SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)Param.getMSF());
+ Object stock = SOF.createDiagram(xChartDoc,"StockDiagram");
+ tEnv.addObjRelation("STOCK",stock);
+
+ Object bar = SOF.createDiagram(xChartDoc,"BarDiagram");
+ tEnv.addObjRelation("BAR",bar);
+
+ Object line = SOF.createDiagram(xChartDoc,"XYDiagram");
+ tEnv.addObjRelation("LINE",line);
+
+ Object stack = SOF.createDiagram(xChartDoc,"LineDiagram");
+ tEnv.addObjRelation("STACK",stack);
+
+ return tEnv;
+ } // finish method getTestEnvironment
+
+ /**
+ * Inserts a value or a formula in the cell of the spreasheet.
+ * @param CellX is the column index of the cell
+ * @param CellY is the row index of the cell
+ * @param theValue string representation of the value
+ * @param TT1 specify the spreadsheet, the interface
+ * <code>com.sun.star.sheet.XSpreadsheet</code>
+ * @param flag if it's equal to <code>'V'</code> then the method inserts
+ * a double-value in the cell else it inserts a formula in the cell
+ */
+ public static void insertIntoCell(
+ int CellX, int CellY, String theValue, XSpreadsheet TT1, String flag) {
+
+ XCell oCell = null;
+
+ try {
+ oCell = TT1.getCellByPosition(CellX, CellY);
+ } catch (com.sun.star.lang.IndexOutOfBoundsException ex) {
+ System.out.println("Could not get Cell");
+ }
+ if (flag.equals("V")) {oCell.setValue((new Float(theValue)).floatValue());}
+ else {oCell.setFormula(theValue);}
+
+ } // end of insertIntoCell
+
+
+} // finish class ChXDiagram
+
diff --git a/qadevOOo/tests/java/mod/_sch/ChartArea.java b/qadevOOo/tests/java/mod/_sch/ChartArea.java
new file mode 100644
index 000000000000..614327f94a1e
--- /dev/null
+++ b/qadevOOo/tests/java/mod/_sch/ChartArea.java
@@ -0,0 +1,122 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+package mod._sch;
+
+import java.io.PrintWriter;
+
+import lib.StatusException;
+import lib.TestCase;
+import lib.TestEnvironment;
+import lib.TestParameters;
+import util.SOfficeFactory;
+import util.utils;
+
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.lang.XComponent;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
+
+/**
+* Test for object which is represented by service
+* <code>com.sun.star.chart.ChartArea</code>. <p>
+* Object implements the following interfaces :
+* <ul>
+* <li> <code>com::sun::star::drawing::FillProperties</code></li>
+* <li> <code>com::sun::star::drawing::LineProperties</code></li>
+* <li> <code>com::sun::star::beans::XPropertySet</code></li>
+* </ul>
+* The following files used by this test :
+* <ul>
+* <li><b> TransparencyChart.sxs </b> : to load predefined chart
+* document where two 'automatic' transparency styles exists :
+* 'Transparency 1' and 'Transparency 2'.</li>
+* </ul> <p>
+* @see com.sun.star.chart.ChartArea
+* @see com.sun.star.drawing.FillProperties
+* @see com.sun.star.drawing.LineProperties
+* @see com.sun.star.beans.XPropertySet
+* @see ifc.drawing._FillProperties
+* @see ifc.drawing._LineProperties
+* @see ifc.beans._XPropertySet
+*/
+public class ChartArea extends TestCase {
+ XChartDocument xChartDoc = null;
+
+ /**
+ * Creates Chart document.
+ */
+ protected void initialize( TestParameters tParam, PrintWriter log ) {
+ // get a soffice factory object
+ SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)tParam.getMSF());
+
+ try {
+ log.println( "creating a chartdocument" );
+ XComponent xComp = SOF.loadDocument(
+ utils.getFullTestURL("TransparencyChart.sxs"));
+ xChartDoc = (XChartDocument)
+ UnoRuntime.queryInterface(XChartDocument.class,xComp);
+ } catch (com.sun.star.uno.Exception e) {
+ // Some exception occures.FAILED
+ e.printStackTrace( log );
+ throw new StatusException( "Couldn't create document", e );
+ }
+ }
+
+ /**
+ * Disposes Chart document.
+ */
+ protected void cleanup( TestParameters tParam, PrintWriter log ) {
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
+ }
+
+ /**
+ * Creating a Testenvironment for the interfaces to be tested.
+ * Retrieved the instance of the service <code>com.sun.star.chart.ChartArea</code>
+ * using the interface <code>XChartDocument</code>.
+ * @see com.sun.star.chart.XChartDocument
+ * @see com.sun.star.chart.ChartArea
+ */
+ protected synchronized TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) {
+
+ // get the Area
+ log.println( "getting Area" );
+ XPropertySet oObj = (XPropertySet) xChartDoc.getArea();
+
+ log.println( "creating a new environment for chartdocument object" );
+ TestEnvironment tEnv = new TestEnvironment( oObj );
+
+ return tEnv;
+ } // finish method getTestEnvironment
+
+} // finish class ChartArea
+
diff --git a/qadevOOo/tests/java/mod/_sch/ChartGrid.java b/qadevOOo/tests/java/mod/_sch/ChartGrid.java
new file mode 100644
index 000000000000..73a44b810436
--- /dev/null
+++ b/qadevOOo/tests/java/mod/_sch/ChartGrid.java
@@ -0,0 +1,122 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+package mod._sch;
+
+import java.io.PrintWriter;
+
+import lib.StatusException;
+import lib.TestCase;
+import lib.TestEnvironment;
+import lib.TestParameters;
+import util.SOfficeFactory;
+
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.chart.XAxisXSupplier;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.chart.XDiagram;
+import com.sun.star.drawing.XShape;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
+
+/**
+* Test for object which is represented by service
+* <code>com.sun.star.chart.ChartGrid</code>. <p>
+* Object implements the following interfaces :
+* <ul>
+* <li> <code>com::sun::star::drawing::LineProperties</code></li>
+* <li> <code>com::sun::star::beans::XPropertySet</code></li>
+* </ul>
+* @see com.sun.star.chart.ChartGrid
+* @see com.sun.star.drawing.LineProperties
+* @see com.sun.star.beans.XPropertySet
+* @see ifc.drawing._LineProperties
+* @see ifc.beans._XPropertySet
+*/
+public class ChartGrid extends TestCase {
+ XChartDocument xChartDoc = null;
+
+ /**
+ * Creates Chart document.
+ */
+ protected void initialize( TestParameters tParam, PrintWriter log ) {
+ // get a soffice factory object
+ SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)tParam.getMSF());
+
+ try {
+ log.println( "creating a chartdocument" );
+ xChartDoc = SOF.createChartDoc(null);;
+ } catch (com.sun.star.uno.Exception e) {
+ // Some exception occures.FAILED
+ e.printStackTrace( log );
+ throw new StatusException( "Couldn't create document", e );
+ }
+ }
+
+ /**
+ * Disposes Chart document.
+ */
+ protected void cleanup( TestParameters tParam, PrintWriter log ) {
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
+ }
+
+ /**
+ * Creating a Testenvironment for the interfaces to be tested.
+ * Retrieves the diagram of the chart document. Then obtains
+ * the properties of the main grid of the x-axis of the diagram
+ * using the interface <code>XAxisXSupplier</code>. This properties is
+ * the instance of the service <code>com.sun.star.chart.ChartGrid</code>.
+ * @see com.sun.star.chart.XAxisXSupplier
+ * @see com.sun.star.chart.ChartGrid
+ */
+ protected synchronized TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) {
+ XPropertySet oObj = null;
+ XShape oDiagram = null;
+
+ // get the Diagram
+ log.println( "getting Diagram" );
+ oDiagram = (XDiagram) xChartDoc.getDiagram();
+
+ // get the Grid
+ log.println( "getting ChartGrid" );
+ XAxisXSupplier oAxisSup = (XAxisXSupplier)
+ UnoRuntime.queryInterface(XAxisXSupplier.class,oDiagram);
+ oObj = (XPropertySet) oAxisSup.getXMainGrid();
+
+ log.println( "creating a new environment for chartdocument object" );
+ TestEnvironment tEnv = new TestEnvironment( oObj );
+
+ return tEnv;
+ } // finish method getTestEnvironment
+
+
+} // finish class ChartGrid
+
diff --git a/qadevOOo/tests/java/mod/_sch/ChartLegend.java b/qadevOOo/tests/java/mod/_sch/ChartLegend.java
new file mode 100644
index 000000000000..a0dd4fe3ec64
--- /dev/null
+++ b/qadevOOo/tests/java/mod/_sch/ChartLegend.java
@@ -0,0 +1,142 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+package mod._sch;
+
+import java.io.PrintWriter;
+
+import lib.StatusException;
+import lib.TestCase;
+import lib.TestEnvironment;
+import lib.TestParameters;
+import util.SOfficeFactory;
+import util.utils;
+
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.drawing.XShape;
+import com.sun.star.lang.XComponent;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
+
+/**
+* Test for object which is represented by service
+* <code>com.sun.star.chart.ChartLegend</code>. <p>
+* Object implements the following interfaces :
+* <ul>
+* <li> <code>com::sun::star::drawing::FillProperties</code></li>
+* <li> <code>com::sun::star::drawing::XShape</code></li>
+* <li> <code>com::sun::star::drawing::Shape</code></li>
+* <li> <code>com::sun::star::chart::ChartLegend</code></li>
+* <li> <code>com::sun::star::drawing::LineProperties</code></li>
+* <li> <code>com::sun::star::beans::XPropertySet</code></li>
+* <li> <code>com::sun::star::style::CharacterProperties</code></li>
+* <li> <code>com::sun::star::drawing::XShapeDescriptor</code></li>
+* <li> <code>com::sun::star::lang::XComponent</code></li>
+* </ul>
+* The following files used by this test :
+* <ul>
+* <li><b> TransparencyChart.sxs </b> : to load predefined chart
+* document where two 'automatic' transparency styles exists :
+* 'Transparency 1' and 'Transparency 2'.</li>
+* </ul> <p>
+* @see com.sun.star.drawing.FillProperties
+* @see com.sun.star.drawing.XShape
+* @see com.sun.star.drawing.Shape
+* @see com.sun.star.chart.ChartLegend
+* @see com.sun.star.drawing.LineProperties
+* @see com.sun.star.beans.XPropertySet
+* @see com.sun.star.style.CharacterProperties
+* @see com.sun.star.drawing.XShapeDescriptor
+* @see com.sun.star.lang.XComponent
+* @see ifc.drawing._FillProperties
+* @see ifc.drawing._XShape
+* @see ifc.drawing._Shape
+* @see ifc.chart._ChartLegend
+* @see ifc.drawing._LineProperties
+* @see ifc.beans._XPropertySet
+* @see ifc.style._CharacterProperties
+* @see ifc.drawing._XShapeDescriptor
+* @see ifc.lang._XComponent
+*/
+public class ChartLegend extends TestCase {
+ XChartDocument xChartDoc = null;
+
+ /**
+ * Creates Chart document.
+ */
+ protected void initialize( TestParameters tParam, PrintWriter log ) {
+ // get a soffice factory object
+ SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)tParam.getMSF());
+
+ try {
+ log.println( "creating a chartdocument" );
+ XComponent xComp = SOF.loadDocument(
+ utils.getFullTestURL("TransparencyChart.sxs"));
+ xChartDoc = (XChartDocument)
+ UnoRuntime.queryInterface(XChartDocument.class,xComp);
+ } catch (com.sun.star.uno.Exception e) {
+ // Some exception occures.FAILED
+ e.printStackTrace( log );
+ throw new StatusException( "Couldn't create document", e );
+ }
+ }
+
+ /**
+ * Disposes Chart document.
+ */
+ protected void cleanup( TestParameters tParam, PrintWriter log ) {
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
+ }
+
+ /**
+ * Creating a Testenvironment for the interfaces to be tested.
+ * Retrieves the diagram of the chart document. The retrieved
+ * diagram is the instance of the service
+ * <code>com.sun.star.chart.ChartLegend</code>.
+ */
+ protected synchronized TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) {
+
+ XShape oObj = null;
+
+ // get the Legend
+ log.println( "getting Legend" );
+ oObj = (XShape) xChartDoc.getLegend();
+
+ log.println( "creating a new environment for chartdocument object" );
+ TestEnvironment tEnv = new TestEnvironment( oObj );
+
+ tEnv.addObjRelation("NoSetSize", "sch.ChartLegend");
+ return tEnv;
+ } // finish method getTestEnvironment
+
+
+} // finish class ChartLegend
+
diff --git a/qadevOOo/tests/java/mod/_sch/ChartLine.java b/qadevOOo/tests/java/mod/_sch/ChartLine.java
new file mode 100644
index 000000000000..950885060f5f
--- /dev/null
+++ b/qadevOOo/tests/java/mod/_sch/ChartLine.java
@@ -0,0 +1,150 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+package mod._sch;
+
+import java.io.PrintWriter;
+
+import lib.StatusException;
+import lib.TestCase;
+import lib.TestEnvironment;
+import lib.TestParameters;
+import util.SOfficeFactory;
+
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.chart.XDiagram;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.AnyConverter;
+import com.sun.star.uno.Type;
+
+/**
+* Test for object which is represented by service
+* <code>com.sun.star.chart.ChartLine</code>. <p>
+* Object implements the following interfaces :
+* <ul>
+* <li> <code>com::sun::star::drawing::LineProperties</code></li>
+* <li> <code>com::sun::star::beans::XPropertySet</code></li>
+* </ul>
+* @see com.sun.star.drawing.LineProperties
+* @see com.sun.star.beans.XPropertySet
+* @see ifc.drawing._LineProperties
+* @see ifc.beans._XPropertySet
+*/
+public class ChartLine extends TestCase {
+ XChartDocument xChartDoc = null;
+
+ /**
+ * Creates Chart document.
+ */
+ protected void initialize( TestParameters tParam, PrintWriter log ) {
+ // get a soffice factory object
+ SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)tParam.getMSF());
+
+ try {
+ log.println( "creating a chartdocument" );
+ xChartDoc = SOF.createChartDoc(null);;
+ } catch (com.sun.star.uno.Exception e) {
+ // Some exception occures.FAILED
+ e.printStackTrace( log );
+ throw new StatusException( "Couldn't create document", e );
+ }
+ }
+
+ /**
+ * Disposes Chart document.
+ */
+ protected void cleanup( TestParameters tParam, PrintWriter log ) {
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
+ }
+
+ /**
+ * Creating a Testenvironment for the interfaces to be tested.
+ * Creates a bar diagram and sets the created diagram for the chart document.
+ * Retrieves the property <code>'DataMeanValueProperties'</code> of
+ * the specified data row. The retrieved property is the instance of
+ * the service <code>com.sun.star.chart.ChartLine</code>.
+ * @see com.sun.star.chart.ChartLine
+ */
+ protected synchronized TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) {
+
+ XPropertySet oObj = null;
+ XDiagram oDiagram = null;
+ SOfficeFactory SOF = null;
+
+ //get LineDiagram
+ SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)Param.getMSF());
+ oDiagram = SOF.createDiagram(xChartDoc, "LineDiagram");
+
+ log.println( "getting Line-Diagram" );
+ xChartDoc.setDiagram(oDiagram);
+
+ // get the Line
+ try {
+ log.println( "getting Line" );
+ XPropertySet RowProps = oDiagram.getDataRowProperties(1);
+ RowProps.setPropertyValue("MeanValue", new Boolean( true ));
+ oObj = (XPropertySet) AnyConverter.toObject(
+ new Type(XPropertySet.class),
+ RowProps.getPropertyValue("DataMeanValueProperties"));
+ } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
+ // Some exception occures.FAILED
+ e.printStackTrace( log );
+ throw new StatusException( "Couldn't get Line", e );
+ } catch (com.sun.star.lang.WrappedTargetException e) {
+ // Some exception occures.FAILED
+ e.printStackTrace( log );
+ throw new StatusException( "Couldn't get Line", e );
+ } catch (com.sun.star.beans.UnknownPropertyException e) {
+ // Some exception occures.FAILED
+ e.printStackTrace( log );
+ throw new StatusException( "Couldn't get Line", e );
+ } catch (com.sun.star.lang.IllegalArgumentException e) {
+ // Some exception occures.FAILED
+ e.printStackTrace( log );
+ throw new StatusException( "Couldn't get Line", e );
+ }
+ catch(com.sun.star.beans.PropertyVetoException e) {
+ // Some exception occures.FAILED
+ e.printStackTrace( log );
+ throw new StatusException( "Couldn't get Line", e );
+ }
+
+ log.println( "creating a new environment for chartdocument object" );
+ TestEnvironment tEnv = new TestEnvironment( oObj );
+
+
+ return tEnv;
+ } // finish method getTestEnvironment
+
+
+} // finish class ChartLine
+
diff --git a/qadevOOo/tests/java/mod/_sch/ChartTitle.java b/qadevOOo/tests/java/mod/_sch/ChartTitle.java
new file mode 100644
index 000000000000..f88c938693bc
--- /dev/null
+++ b/qadevOOo/tests/java/mod/_sch/ChartTitle.java
@@ -0,0 +1,120 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+package mod._sch;
+
+import java.io.PrintWriter;
+
+import lib.StatusException;
+import lib.TestCase;
+import lib.TestEnvironment;
+import lib.TestParameters;
+import util.SOfficeFactory;
+
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.drawing.XShape;
+import com.sun.star.lang.XMultiServiceFactory;
+
+/**
+* Test for object which is represented by service
+* <code>com.sun.star.chart.ChartTitle</code>. <p>
+* Object implements the following interfaces :
+* <ul>
+* <li> <code>com::sun::star::lang::XComponent</code></li>
+* <li> <code>com::sun::star::chart::ChartTitle</code></li>
+* <li> <code>com::sun::star::drawing::XShape</code></li>
+* <li> <code>com::sun::star::drawing::XShapeDescriptor</code></li>
+* <li> <code>com::sun::star::style::CharacterProperties</code></li>
+* <li> <code>com::sun::star::beans::XPropertySet</code></li>
+* <li> <code>com::sun::star::drawing::Shape</code></li>
+* </ul>
+* @see com.sun.star.lang.XComponent
+* @see com.sun.star.chart.ChartTitle
+* @see com.sun.star.drawing.XShape
+* @see com.sun.star.drawing.XShapeDescriptor
+* @see com.sun.star.style.CharacterProperties
+* @see com.sun.star.beans.XPropertySet
+* @see com.sun.star.drawing.Shape
+* @see ifc.lang._XComponent
+* @see ifc.chart._ChartTitle
+* @see ifc.drawing._XShape
+* @see ifc.drawing._XShapeDescriptor
+* @see ifc.style._CharacterProperties
+* @see ifc.beans._XPropertySet
+* @see ifc.drawing._Shape
+*/
+public class ChartTitle extends TestCase {
+ XChartDocument xChartDoc = null;
+
+ /**
+ * Creates Chart document.
+ */
+ protected void initialize( TestParameters tParam, PrintWriter log ) {
+ // get a soffice factory object
+ SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)tParam.getMSF());
+
+ try {
+ log.println( "creating a chartdocument" );
+ xChartDoc = SOF.createChartDoc(null);;
+ } catch (com.sun.star.uno.Exception e) {
+ // Some exception occures.FAILED
+ e.printStackTrace( log );
+ throw new StatusException( "Couldn't create document", e );
+ }
+ }
+
+ /**
+ * Disposes Chart document.
+ */
+ protected void cleanup( TestParameters tParam, PrintWriter log ) {
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
+ }
+
+ /**
+ * Creating a Testenvironment for the interfaces to be tested.
+ * Retrieves the shape of the main title of the chart document.
+ * The retrieved shape is the instance of the service
+ * <code>com.sun.star.chart.ChartTitle</code>.
+ */
+ protected synchronized TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) {
+
+ // get the Title
+ log.println( "getting Title" );
+ XShape oObj = (XShape) xChartDoc.getTitle();
+
+ log.println( "creating a new environment for chartdocument object" );
+ TestEnvironment tEnv = new TestEnvironment( oObj );
+ tEnv.addObjRelation("NoSetSize","sch.ChartTitle");
+ return tEnv;
+ } // finish method getTestEnvironment
+
+} // finish class ChXChartObject_Title
+