summaryrefslogtreecommitdiff
path: root/qadevOOo/tests/java/ifc/chart
diff options
context:
space:
mode:
Diffstat (limited to 'qadevOOo/tests/java/ifc/chart')
-rw-r--r--qadevOOo/tests/java/ifc/chart/_BarDiagram.java159
-rw-r--r--qadevOOo/tests/java/ifc/chart/_Chart3DBarProperties.java132
-rw-r--r--qadevOOo/tests/java/ifc/chart/_ChartAxis.java196
-rw-r--r--qadevOOo/tests/java/ifc/chart/_ChartAxisXSupplier.java141
-rw-r--r--qadevOOo/tests/java/ifc/chart/_ChartAxisYSupplier.java167
-rw-r--r--qadevOOo/tests/java/ifc/chart/_ChartAxisZSupplier.java204
-rw-r--r--qadevOOo/tests/java/ifc/chart/_ChartDataPointProperties.java115
-rw-r--r--qadevOOo/tests/java/ifc/chart/_ChartDataRowProperties.java63
-rw-r--r--qadevOOo/tests/java/ifc/chart/_ChartDocument.java44
-rw-r--r--qadevOOo/tests/java/ifc/chart/_ChartLegend.java42
-rw-r--r--qadevOOo/tests/java/ifc/chart/_ChartStatistics.java74
-rw-r--r--qadevOOo/tests/java/ifc/chart/_ChartTableAddressSupplier.java67
-rw-r--r--qadevOOo/tests/java/ifc/chart/_ChartTitle.java57
-rw-r--r--qadevOOo/tests/java/ifc/chart/_ChartTwoAxisXSupplier.java108
-rw-r--r--qadevOOo/tests/java/ifc/chart/_ChartTwoAxisYSupplier.java108
-rw-r--r--qadevOOo/tests/java/ifc/chart/_Diagram.java68
-rw-r--r--qadevOOo/tests/java/ifc/chart/_Dim3DDiagram.java67
-rw-r--r--qadevOOo/tests/java/ifc/chart/_LineDiagram.java194
-rw-r--r--qadevOOo/tests/java/ifc/chart/_StackableDiagram.java89
-rw-r--r--qadevOOo/tests/java/ifc/chart/_StockDiagram.java87
-rw-r--r--qadevOOo/tests/java/ifc/chart/_X3DDisplay.java77
-rw-r--r--qadevOOo/tests/java/ifc/chart/_XAxisXSupplier.java106
-rw-r--r--qadevOOo/tests/java/ifc/chart/_XAxisYSupplier.java109
-rw-r--r--qadevOOo/tests/java/ifc/chart/_XAxisZSupplier.java109
-rw-r--r--qadevOOo/tests/java/ifc/chart/_XChartData.java184
-rw-r--r--qadevOOo/tests/java/ifc/chart/_XChartDataArray.java233
-rw-r--r--qadevOOo/tests/java/ifc/chart/_XChartDocument.java164
-rw-r--r--qadevOOo/tests/java/ifc/chart/_XDiagram.java156
-rw-r--r--qadevOOo/tests/java/ifc/chart/_XStatisticDisplay.java91
-rw-r--r--qadevOOo/tests/java/ifc/chart/_XTwoAxisXSupplier.java63
-rw-r--r--qadevOOo/tests/java/ifc/chart/_XTwoAxisYSupplier.java71
31 files changed, 3545 insertions, 0 deletions
diff --git a/qadevOOo/tests/java/ifc/chart/_BarDiagram.java b/qadevOOo/tests/java/ifc/chart/_BarDiagram.java
new file mode 100644
index 000000000000..f22709df85bc
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/chart/_BarDiagram.java
@@ -0,0 +1,159 @@
+/*************************************************************************
+ *
+ * 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 ifc.chart;
+
+import lib.MultiPropertyTest;
+import lib.Status;
+import lib.StatusException;
+
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.chart.XDiagram;
+import com.sun.star.uno.UnoRuntime;
+
+/**
+* Testing <code>com.sun.star.chart.BarDiagram</code>
+* service properties:
+* <ul>
+* <li><code>'Vertical'</code></li>
+* <li><code>'Deep'</code></li>
+* <li><code>'StackedBarsConnected'</code></li>
+* <li><code>'NumberOfLines'</code></li>
+* </ul>
+* Properties testing is automated
+* by <code>lib.MultiPropertyTest</code> except property
+* <code>'NumberOfLines'</code>. <p>
+* This test needs the following object relations :
+* <ul>
+* <li> <code>'CHARTDOC'</code> (of type <code>XChartDocument</code>):
+* to have reference to chart document </li>
+* <li> <code>'BAR'</code> (of type <code>XDiagram</code>):
+* relation that use as parameter for method setDiagram of chart document </li>
+* <ul> <p>
+* @see com.sun.star.chart.BarDiagram
+* @see com.sun.star.chart.XChartDocument
+* @see com.sun.star.chart.XDiagram
+* @see lib.MultiPropertyTest
+*/
+public class _BarDiagram extends MultiPropertyTest {
+
+ XChartDocument doc = null;
+ XDiagram oldDiagram = null;
+
+ /**
+ * Retrieves object relations and prepares a chart document.
+ * @throws StatusException if one of relations not found.
+ */
+ protected void before() {
+ log.println("Setting Diagram type to BarDiagram");
+ doc = (XChartDocument) tEnv.getObjRelation("CHARTDOC");
+ if (doc == null) throw new StatusException(Status.failed
+ ("Relation 'CHARTDOC' not found"));
+
+ XDiagram bar = (XDiagram) tEnv.getObjRelation("BAR");
+ if (bar == null) throw new StatusException(Status.failed
+ ("Relation 'BAR' not found"));
+
+ oldDiagram = doc.getDiagram();
+ doc.setDiagram(bar);
+ oObj = (XPropertySet)
+ UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() );
+ log.println("Set it to 3D");
+ try {
+ oObj.setPropertyValue("Dim3D", new Boolean(true));
+ } catch(com.sun.star.lang.WrappedTargetException e) {
+ log.println("Exception while set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Exception while set property value", e);
+ } catch(com.sun.star.lang.IllegalArgumentException e) {
+ log.println("Exception while set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Exception while set property value", e);
+ } catch(com.sun.star.beans.PropertyVetoException e) {
+ log.println("Exception while set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Exception while set property value", e);
+ } catch(com.sun.star.beans.UnknownPropertyException e) {
+ log.println("Exception while set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Exception while set property value", e);
+ }
+ }
+
+ /**
+ * Sets the old diagram for a chart document.
+ */
+ protected void after() {
+ doc.setDiagram(oldDiagram);
+ }
+
+ protected PropertyTester LineTester = new PropertyTester() {
+ protected Object getNewValue(String propName, Object oldValue)
+ throws java.lang.IllegalArgumentException {
+ int a = 0;
+ int b = 2;
+ if ( ((Integer) oldValue).intValue() == a)
+ return new Integer(b); else
+ return new Integer(a);
+ }
+ } ;
+
+ /**
+ * Tests property 'NumberOfLines'.
+ * This property tests when diagram in 2D-mode only
+ * except all other properties. This property is currently supported by
+ * two dimensional vertical bar charts only.
+ */
+ public void _NumberOfLines() {
+ log.println("Set it to 2D");
+ try {
+ oObj.setPropertyValue("Dim3D", new Boolean(false));
+ oObj.setPropertyValue("Vertical", new Boolean(false));
+ } catch(com.sun.star.lang.WrappedTargetException e) {
+ log.println("Exception while set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Exception while set property value", e);
+ } catch(com.sun.star.lang.IllegalArgumentException e) {
+ log.println("Exception while set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Exception while set property value", e);
+ } catch(com.sun.star.beans.PropertyVetoException e) {
+ log.println("Exception while set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Exception while set property value", e);
+ } catch(com.sun.star.beans.UnknownPropertyException e) {
+ log.println("Exception while set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Exception while set property value", e);
+ }
+
+ log.println("Testing with custom Property tester") ;
+ testProperty("NumberOfLines", LineTester) ;
+ }
+} // EOF BarDiagram
+
diff --git a/qadevOOo/tests/java/ifc/chart/_Chart3DBarProperties.java b/qadevOOo/tests/java/ifc/chart/_Chart3DBarProperties.java
new file mode 100644
index 000000000000..531ec39478ed
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/chart/_Chart3DBarProperties.java
@@ -0,0 +1,132 @@
+/*************************************************************************
+ *
+ * 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 ifc.chart;
+
+import lib.MultiPropertyTest;
+import lib.Status;
+import lib.StatusException;
+
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.chart.XDiagram;
+import com.sun.star.uno.UnoRuntime;
+
+/**
+* Testing <code>com.sun.star.chart.Chart3DBarProperties</code>
+* service properties:
+* <ul>
+* <li><code> SolidType</code></li>
+* </ul> <p>
+* This test needs the following object relations :
+* <ul>
+* <li> <code>'CHARTDOC'</code> (of type <code>XChartDocument</code>):
+* to have reference to chart document </li>
+* <li> <code>'BAR'</code> (of type <code>XDiagram</code>):
+* relation that use as parameter for method setDiagram of chart document </li>
+* <ul> <p>
+* @see com.sun.star.chart.Chart3DBarProperties
+* @see com.sun.star.chart.XChartDocument
+* @see com.sun.star.chart.XDiagram
+*/
+public class _Chart3DBarProperties extends MultiPropertyTest {
+
+ /**
+ * Retrieves object relations and prepares a chart document.
+ * @throws StatusException if one of relations not found.
+ */
+ protected void before() {
+ log.println("Setting Diagram type to BarDiagram");
+ XChartDocument doc = (XChartDocument) tEnv.getObjRelation("CHARTDOC");
+ if (doc == null) throw new StatusException(Status.failed
+ ("Relation 'CHARTDOC' not found"));
+
+ XDiagram bar = (XDiagram) tEnv.getObjRelation("BAR");
+ if (bar == null) throw new StatusException(Status.failed
+ ("Relation 'BAR' not found"));
+
+ doc.setDiagram(bar);
+ log.println("Change Diagram to 3D");
+ oObj = (XPropertySet)
+ UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() );
+ try {
+ oObj.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);
+ }
+ }
+
+ /**
+ * Sets the diagram back to 2D as 2D rendering is much faster for the following tests.
+ */
+ protected void after() {
+ log.println("Setting Diagram back to 2D");
+ XChartDocument doc = (XChartDocument) tEnv.getObjRelation("CHARTDOC");
+ if (doc == null) throw new StatusException(Status.failed
+ ("Relation 'CHARTDOC' not found"));
+
+ log.println("Change Diagram to 3D");
+ oObj = (XPropertySet)
+ UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() );
+ try {
+ oObj.setPropertyValue("Dim3D", new Boolean(false));
+ } catch(com.sun.star.lang.WrappedTargetException e) {
+ log.println("Couldn't change Diagram back to 2D");
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't change Diagram back to 2D", e);
+ } catch(com.sun.star.lang.IllegalArgumentException e) {
+ log.println("Couldn't change Diagram back to 2D");
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't change Diagram back to 2D", e);
+ } catch(com.sun.star.beans.PropertyVetoException e) {
+ log.println("Couldn't change Diagram back to 2D");
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't change Diagram back to 2D", e);
+ } catch(com.sun.star.beans.UnknownPropertyException e) {
+ log.println("Couldn't change Diagram back to 2D");
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't change Diagram back to 2D", e);
+ }
+ }
+
+} // finish class _Chart3DBarProperties
+
+
diff --git a/qadevOOo/tests/java/ifc/chart/_ChartAxis.java b/qadevOOo/tests/java/ifc/chart/_ChartAxis.java
new file mode 100644
index 000000000000..7fad534b1948
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/chart/_ChartAxis.java
@@ -0,0 +1,196 @@
+/*************************************************************************
+ *
+ * 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 ifc.chart;
+
+import lib.MultiPropertyTest;
+import lib.StatusException;
+import util.ValueChanger;
+
+/**
+* Testing <code>com.sun.star.chart.ChartAxis</code>
+* service properties:
+* <ul>
+* <li><code> ArrangeOrder</code></li>
+* <li><code> AutoMax</code></li>
+* <li><code> AutoMin</code></li>
+* <li><code> AutoOrigin</code></li>
+* <li><code> AutoStepHelp</code></li>
+* <li><code> AutoStepMain</code></li>
+* <li><code> DisplayLabels</code></li>
+* <li><code> GapWidth</code></li>
+* <li><code> HelpMarks</code></li>
+* <li><code> Logarithmic</code></li>
+* <li><code> Marks</code></li>
+* <li><code> Max</code></li>
+* <li><code> Min</code></li>
+* <li><code> NumberFormat</code></li>
+* <li><code> Origin</code></li>
+* <li><code> Overlap</code></li>
+* <li><code> StepHelp</code></li>
+* <li><code> StepMain</code></li>
+* <li><code> TextBreak</code></li>
+* <li><code> TextRotation</code></li>
+* <li><code> TextCanOverlap</code></li>
+* </ul> <p>
+* @see com.sun.star.chart.ChartAxis
+*/
+public class _ChartAxis extends MultiPropertyTest {
+
+ /**
+ * Tests property 'Max'.
+ * Property 'AutoOrigin' sets to true and property 'AutoMax'
+ * sets to false before test.
+ */
+ public void _Max() {
+ try {
+ //if AutoOrigin isn't true then this property works only when
+ //current Origin is less then new value of Max
+ oObj.setPropertyValue("AutoOrigin", new Boolean(true));
+ oObj.setPropertyValue("AutoMax",new Boolean(false));
+ } catch(com.sun.star.lang.WrappedTargetException e) {
+ log.println("Couldn't set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't set property value", e);
+ } catch(com.sun.star.lang.IllegalArgumentException e) {
+ log.println("Couldn't set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't set property value", e);
+ } catch(com.sun.star.beans.PropertyVetoException e) {
+ log.println("Couldn't set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't set property value", e);
+ } catch(com.sun.star.beans.UnknownPropertyException e) {
+ log.println("Couldn't set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't set property value", e);
+ }
+
+ testProperty("Max");
+ }
+
+ /**
+ * Tests property 'Min'.
+ * Property 'AutoOrigin' sets to true and property 'AutoMin'
+ * sets to false before test.
+ */
+ public void _Min() {
+ try {
+ //if AutoOrigin isn't true then this property works only when
+ //current Origin is greater then new value of Min
+ oObj.setPropertyValue("AutoOrigin", new Boolean(true));
+ oObj.setPropertyValue("AutoMin", new Boolean(false));
+ } catch(com.sun.star.lang.WrappedTargetException e) {
+ log.println("Couldn't set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't set property value", e);
+ } catch(com.sun.star.lang.IllegalArgumentException e) {
+ log.println("Couldn't set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't set property value", e);
+ } catch(com.sun.star.beans.PropertyVetoException e) {
+ log.println("Couldn't set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't set property value", e);
+ } catch(com.sun.star.beans.UnknownPropertyException e) {
+ log.println("Couldn't set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't set property value", e);
+ }
+
+ testProperty("Min");
+ }
+
+ /**
+ * Tests property 'Origin'.
+ * Property 'Logarithmic' sets to false before test.
+ */
+ public void _Origin() {
+ try {
+ oObj.setPropertyValue("Logarithmic",new Boolean(false));
+ } catch(com.sun.star.lang.WrappedTargetException e) {
+ log.println("Couldn't set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't set property value", e);
+ } catch(com.sun.star.lang.IllegalArgumentException e) {
+ log.println("Couldn't set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't set property value", e);
+ } catch(com.sun.star.beans.PropertyVetoException e) {
+ log.println("Couldn't set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't set property value", e);
+ } catch(com.sun.star.beans.UnknownPropertyException e) {
+ log.println("Couldn't set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't set property value", e);
+ }
+
+ testProperty("Origin");
+ }
+
+ protected PropertyTester StepMainTester = new PropertyTester() {
+ protected Object getNewValue(String propName, Object oldValue)
+ throws java.lang.IllegalArgumentException {
+ Double ValueToSet = (Double) ValueChanger.changePValue(oldValue);
+ double stm = ValueToSet.doubleValue();
+ stm = stm / 5;
+ return new Double(stm);
+ }
+ };
+
+ /**
+ * Tests property 'StepMain'.
+ * Property 'Logarithmic' and 'AutoStepMain' sets
+ * to false before test.
+ */
+ public void _StepMain() {
+ try {
+ oObj.setPropertyValue("AutoStepMain", new Boolean(false));
+ oObj.setPropertyValue("Logarithmic",new Boolean(false));
+ } catch(com.sun.star.lang.WrappedTargetException e) {
+ log.println("Couldn't set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't set property value", e);
+ } catch(com.sun.star.lang.IllegalArgumentException e) {
+ log.println("Couldn't set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't set property value", e);
+ } catch(com.sun.star.beans.PropertyVetoException e) {
+ log.println("Couldn't set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't set property value", e);
+ } catch(com.sun.star.beans.UnknownPropertyException e) {
+ log.println("Couldn't set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't set property value", e);
+ }
+
+ testProperty("StepMain", StepMainTester);
+ }
+} // finish class _ChartAxis
+
diff --git a/qadevOOo/tests/java/ifc/chart/_ChartAxisXSupplier.java b/qadevOOo/tests/java/ifc/chart/_ChartAxisXSupplier.java
new file mode 100644
index 000000000000..daf1ca3cc122
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/chart/_ChartAxisXSupplier.java
@@ -0,0 +1,141 @@
+/*************************************************************************
+ *
+ * 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 ifc.chart;
+
+import lib.MultiPropertyTest;
+
+/**
+* Testing <code>com.sun.star.chart.ChartAxisXSupplier</code>
+* service properties :
+* <ul>
+* <li><code> HasXAxis</code></li>
+* <li><code> HasXAxisDescription</code></li>
+* <li><code> HasXAxisGrid</code></li>
+* <li><code> HasXAxisHelpGrid</code></li>
+* <li><code> HasXAxisTitle</code></li>
+* </ul> <p>
+* @see com.sun.star.chart.ChartAxisXSupplier
+*/
+public class _ChartAxisXSupplier extends MultiPropertyTest {
+ public void _HasXAxis() {
+ try {
+ log.println("Property HasXAxis");
+ boolean res = ((Boolean)oObj.getPropertyValue(
+ "HasXAxis")).booleanValue();
+ if (!res)
+ oObj.setPropertyValue("HasXAxis", Boolean.TRUE);
+ // test connected property HasXAxisDescription
+ if (!((Boolean)oObj.getPropertyValue(
+ "HasXAxisDescription")).booleanValue())
+ oObj.setPropertyValue("HasXAxisDescription", Boolean.TRUE);
+
+ oObj.setPropertyValue("HasXAxis", Boolean.FALSE);
+ boolean setVal = ((Boolean)oObj.getPropertyValue(
+ "HasXAxis")).booleanValue();
+ log.println("Start value: " + setVal);
+ // description should also be false now
+ setVal |= ((Boolean)oObj.getPropertyValue(
+ "HasXAxisDescription")).booleanValue();
+ log.println("Connected value axis description: " + setVal);
+
+ oObj.setPropertyValue("HasXAxis", Boolean.TRUE);
+ setVal |= !((Boolean)oObj.getPropertyValue(
+ "HasXAxis")).booleanValue();
+ log.println("Changed value: " + !setVal);
+
+ // description should be true again
+ setVal |= !((Boolean)oObj.getPropertyValue(
+ "HasXAxisDescription")).booleanValue();
+ log.println("Changed connected value axis description: " + !setVal);
+
+ tRes.tested("HasXAxis", !setVal);
+ // leave axis untouched
+ oObj.setPropertyValue("HasXAxis", new Boolean(res));
+ }
+ catch (com.sun.star.lang.WrappedTargetException e) {
+ log.println(e.getMessage());
+ e.printStackTrace(log);
+ tRes.tested("HasXAxis", false);
+ }
+ catch (com.sun.star.lang.IllegalArgumentException e) {
+ log.println(e.getMessage());
+ e.printStackTrace(log);
+ tRes.tested("HasXAxis", false);
+ }
+ catch (com.sun.star.beans.UnknownPropertyException e) {
+ log.println(e.getMessage());
+ e.printStackTrace(log);
+ tRes.tested("HasXAxis", false);
+ }
+ catch (com.sun.star.beans.PropertyVetoException e) {
+ log.println(e.getMessage());
+ e.printStackTrace(log);
+ tRes.tested("HasXAxis", false);
+ }
+ }
+
+ public void _HasXAxisDescription() {
+ requiredMethod("HasXAxis");
+ try {
+ log.println("Property HasXAxisDescription");
+ if (!((Boolean)oObj.getPropertyValue("HasXAxis")).booleanValue())
+ oObj.setPropertyValue("HasXAxis", Boolean.TRUE);
+
+ boolean res = ((Boolean)oObj.getPropertyValue(
+ "HasXAxisDescription")).booleanValue();
+ log.println("Start value: " + res);
+
+ oObj.setPropertyValue("HasXAxisDescription", new Boolean(!res));
+ boolean setValue = ((Boolean)oObj.getPropertyValue(
+ "HasXAxisDescription")).booleanValue();
+ log.println("Changed value: " + setValue);
+ tRes.tested("HasXAxisDescription", res != setValue);
+ }
+ catch (com.sun.star.lang.WrappedTargetException e) {
+ log.println(e.getMessage());
+ e.printStackTrace(log);
+ tRes.tested("HasXAxisDescription", false);
+ }
+ catch (com.sun.star.lang.IllegalArgumentException e) {
+ log.println(e.getMessage());
+ e.printStackTrace(log);
+ tRes.tested("HasXAxisDescription", false);
+ }
+ catch (com.sun.star.beans.UnknownPropertyException e) {
+ log.println(e.getMessage());
+ e.printStackTrace(log);
+ tRes.tested("HasXAxisDescription", false);
+ }
+ catch (com.sun.star.beans.PropertyVetoException e) {
+ log.println(e.getMessage());
+ e.printStackTrace(log);
+ tRes.tested("HasXAxisDescription", false);
+ }
+ }
+} // EOF ChartAxisXSupplier
+
diff --git a/qadevOOo/tests/java/ifc/chart/_ChartAxisYSupplier.java b/qadevOOo/tests/java/ifc/chart/_ChartAxisYSupplier.java
new file mode 100644
index 000000000000..40f6f1663513
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/chart/_ChartAxisYSupplier.java
@@ -0,0 +1,167 @@
+/*************************************************************************
+ *
+ * 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 ifc.chart;
+
+import lib.MultiPropertyTest;
+import lib.Status;
+import lib.StatusException;
+
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.uno.UnoRuntime;
+
+/**
+* Testing <code>com.sun.star.chart.ChartAxisYSupplier</code>
+* service properties :
+* <ul>
+* <li><code> HasYAxis</code></li>
+* <li><code> HasYAxisDescription</code></li>
+* <li><code> HasYAxisGrid</code></li>
+* <li><code> HasYAxisHelpGrid</code></li>
+* <li><code> HasYAxisTitle</code></li>
+* </ul> <p>
+* This test needs the following object relations :
+* <ul>
+* <li> <code>'CHARTDOC'</code> (of type <code>XChartDocument</code>):
+* to have reference to chart document </li>
+* </ul> <p>
+* @see com.sun.star.chart.ChartAxisYSupplier
+*/
+public class _ChartAxisYSupplier extends MultiPropertyTest {
+
+ /**
+ * Retrieves object relations and prepares a chart document.
+ * @throws StatusException if one of relations not found.
+ */
+ protected void before() {
+ XChartDocument doc = (XChartDocument) tEnv.getObjRelation("CHARTDOC");
+ if (doc == null) throw new StatusException(Status.failed
+ ("Relation 'CHARTDOC' not found"));
+
+ oObj = (XPropertySet)
+ UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() );
+ }
+
+ public void _HasYAxis() {
+ try {
+ log.println("Property HasYAxis");
+ boolean res = ((Boolean)oObj.getPropertyValue(
+ "HasYAxis")).booleanValue();
+ if (!res)
+ oObj.setPropertyValue("HasYAxis", Boolean.TRUE);
+ // test connected property HasYAxisDescription
+ if (!((Boolean)oObj.getPropertyValue(
+ "HasYAxisDescription")).booleanValue())
+ oObj.setPropertyValue("HasYAxisDescription", Boolean.TRUE);
+
+ oObj.setPropertyValue("HasYAxis", Boolean.FALSE);
+ boolean setVal = ((Boolean)oObj.getPropertyValue(
+ "HasYAxis")).booleanValue();
+ log.println("Start value: " + setVal);
+ // description should also be false now
+ setVal |= ((Boolean)oObj.getPropertyValue(
+ "HasYAxisDescription")).booleanValue();
+ log.println("Connected value axis description: " + setVal);
+
+ oObj.setPropertyValue("HasYAxis", Boolean.TRUE);
+ setVal |= !((Boolean)oObj.getPropertyValue(
+ "HasYAxis")).booleanValue();
+ log.println("Changed value: " + !setVal);
+
+ // description should be true again
+ setVal |= !((Boolean)oObj.getPropertyValue(
+ "HasYAxisDescription")).booleanValue();
+ log.println("Changed connected value axis description: "+!setVal);
+
+ tRes.tested("HasYAxis", !setVal);
+ // leave axis untouched
+ oObj.setPropertyValue("HasYAxis", new Boolean(res));
+ }
+ catch (com.sun.star.lang.WrappedTargetException e) {
+ log.println(e.getMessage());
+ e.printStackTrace(log);
+ tRes.tested("HasYAxis", false);
+ }
+ catch (com.sun.star.lang.IllegalArgumentException e) {
+ log.println(e.getMessage());
+ e.printStackTrace(log);
+ tRes.tested("HasYAxis", false);
+ }
+ catch (com.sun.star.beans.UnknownPropertyException e) {
+ log.println(e.getMessage());
+ e.printStackTrace(log);
+ tRes.tested("HasYAxis", false);
+ }
+ catch (com.sun.star.beans.PropertyVetoException e) {
+ log.println(e.getMessage());
+ e.printStackTrace(log);
+ tRes.tested("HasYAxis", false);
+ }
+ }
+
+ public void _HasYAxisDescription() {
+ requiredMethod("HasYAxis");
+ try {
+ log.println("Property HasYAxisDescription");
+ if (!((Boolean)oObj.getPropertyValue("HasYAxis")).booleanValue())
+ oObj.setPropertyValue("HasYAxis", Boolean.TRUE);
+
+ boolean res = ((Boolean)oObj.getPropertyValue(
+ "HasYAxisDescription")).booleanValue();
+ log.println("Start value: " + res);
+
+ oObj.setPropertyValue("HasYAxisDescription", new Boolean(!res));
+ boolean setValue = ((Boolean)oObj.getPropertyValue(
+ "HasYAxisDescription")).booleanValue();
+ log.println("Changed value: " + setValue);
+ tRes.tested("HasYAxisDescription", res != setValue);
+ }
+ catch (com.sun.star.lang.WrappedTargetException e) {
+ log.println(e.getMessage());
+ e.printStackTrace(log);
+ tRes.tested("HasYAxisDescription", false);
+ }
+ catch (com.sun.star.lang.IllegalArgumentException e) {
+ log.println(e.getMessage());
+ e.printStackTrace(log);
+ tRes.tested("HasYAxisDescription", false);
+ }
+ catch (com.sun.star.beans.UnknownPropertyException e) {
+ log.println(e.getMessage());
+ e.printStackTrace(log);
+ tRes.tested("HasYAxisDescription", false);
+ }
+ catch (com.sun.star.beans.PropertyVetoException e) {
+ log.println(e.getMessage());
+ e.printStackTrace(log);
+ tRes.tested("HasYAxisDescription", false);
+ }
+ }
+
+} // EOF ChartAxisYSupplier
+
diff --git a/qadevOOo/tests/java/ifc/chart/_ChartAxisZSupplier.java b/qadevOOo/tests/java/ifc/chart/_ChartAxisZSupplier.java
new file mode 100644
index 000000000000..2de116ddb80a
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/chart/_ChartAxisZSupplier.java
@@ -0,0 +1,204 @@
+/*************************************************************************
+ *
+ * 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 ifc.chart;
+
+import lib.MultiPropertyTest;
+import lib.Status;
+import lib.StatusException;
+
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.chart.XDiagram;
+import com.sun.star.uno.UnoRuntime;
+
+/**
+* Testing <code>com.sun.star.chart.ChartAxisZSupplier</code>
+* service properties :
+* <ul>
+* <li><code> HasZAxis</code></li>
+* <li><code> HasZAxisDescription</code></li>
+* <li><code> HasZAxisGrid</code></li>
+* <li><code> HasZAxisHelpGrid</code></li>
+* <li><code> HasZAxisTitle</code></li>
+* </ul> <p>
+* This test needs the following object relations :
+* <ul>
+* <li> <code>'CHARTDOC'</code> (of type <code>XChartDocument</code>):
+* to have reference to chart document </li>
+* <li> <code>'BAR'</code> (of type <code>XDiagram</code>):
+* relation that use as parameter for method setDiagram of chart document</li>
+* </ul> <p>
+* @see com.sun.star.chart.ChartAxisZSupplier
+*/
+public class _ChartAxisZSupplier extends MultiPropertyTest {
+
+ /**
+ * Retrieves object relations and prepares a chart document.
+ * @throws StatusException if one of relations not found.
+ */
+ protected void before() {
+ log.println("Setting Diagram type to BarDiagram");
+ XChartDocument doc = (XChartDocument) tEnv.getObjRelation("CHARTDOC");
+ if (doc == null) throw new StatusException(Status.failed
+ ("Relation 'CHARTDOC' not found"));
+
+ XDiagram bar = (XDiagram) tEnv.getObjRelation("BAR");
+ if (bar == null) throw new StatusException(Status.failed
+ ("Relation 'BAR' not found"));
+
+ doc.setDiagram(bar);
+ log.println("Set it to 3D");
+ oObj = (XPropertySet)
+ UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() );
+ try {
+ oObj.setPropertyValue("Dim3D", new Boolean(true));
+ } catch(com.sun.star.lang.WrappedTargetException e) {
+ log.println("Exception while set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Exception while set property value", e);
+ } catch(com.sun.star.lang.IllegalArgumentException e) {
+ log.println("Exception while set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Exception while set property value", e);
+ } catch(com.sun.star.beans.PropertyVetoException e) {
+ log.println("Exception while set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Exception while set property value", e);
+ } catch(com.sun.star.beans.UnknownPropertyException e) {
+ log.println("Exception while set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Exception while set property value", e);
+ }
+ }
+
+ public void _HasZAxis() {
+ try {
+ log.println("Property HasZAxis");
+ boolean res = ((Boolean)oObj.getPropertyValue(
+ "HasZAxis")).booleanValue();
+ if (!res)
+ oObj.setPropertyValue("HasZAxis", Boolean.TRUE);
+ // test connected property HasZAxisDescription
+ if (!((Boolean)oObj.getPropertyValue(
+ "HasZAxisDescription")).booleanValue())
+ oObj.setPropertyValue("HasZAxisDescription", Boolean.TRUE);
+
+ oObj.setPropertyValue("HasZAxis", Boolean.FALSE);
+ boolean setVal = ((Boolean)oObj.getPropertyValue(
+ "HasZAxis")).booleanValue();
+ log.println("Start value: " + setVal);
+ // description should also be false now
+ setVal |= ((Boolean)oObj.getPropertyValue(
+ "HasZAxisDescription")).booleanValue();
+ log.println("Connected value axis description: " + setVal);
+
+ oObj.setPropertyValue("HasZAxis", Boolean.TRUE);
+ setVal |= !((Boolean)oObj.getPropertyValue(
+ "HasZAxis")).booleanValue();
+ log.println("Changed value: " + !setVal);
+
+ // description should be true again
+ setVal |= !((Boolean)oObj.getPropertyValue(
+ "HasZAxisDescription")).booleanValue();
+ log.println("Changed connected value axis description: " + !setVal);
+
+ tRes.tested("HasZAxis", !setVal);
+ // leave axis untouched
+ oObj.setPropertyValue("HasZAxis", new Boolean(res));
+ }
+ catch (com.sun.star.lang.WrappedTargetException e) {
+ log.println(e.getMessage());
+ e.printStackTrace(log);
+ tRes.tested("HasZAxis", false);
+ }
+ catch (com.sun.star.lang.IllegalArgumentException e) {
+ log.println(e.getMessage());
+ e.printStackTrace(log);
+ tRes.tested("HasZAxis", false);
+ }
+ catch (com.sun.star.beans.UnknownPropertyException e) {
+ log.println(e.getMessage());
+ e.printStackTrace(log);
+ tRes.tested("HasZAxis", false);
+ }
+ catch (com.sun.star.beans.PropertyVetoException e) {
+ log.println(e.getMessage());
+ e.printStackTrace(log);
+ tRes.tested("HasZAxis", false);
+ }
+ }
+
+ public void _HasZAxisDescription() {
+ requiredMethod("HasZAxis");
+ try {
+ log.println("Property HasZAxisDescription");
+ if (!((Boolean)oObj.getPropertyValue("HasZAxis")).booleanValue())
+ oObj.setPropertyValue("HasZAxis", Boolean.TRUE);
+
+ boolean res = ((Boolean)oObj.getPropertyValue(
+ "HasZAxisDescription")).booleanValue();
+ log.println("Start value: " + res);
+
+ oObj.setPropertyValue("HasZAxisDescription", new Boolean(!res));
+ boolean setValue = ((Boolean)oObj.getPropertyValue(
+ "HasZAxisDescription")).booleanValue();
+ log.println("Changed value: " + setValue);
+ tRes.tested("HasZAxisDescription", res != setValue);
+ }
+ catch (com.sun.star.lang.WrappedTargetException e) {
+ log.println(e.getMessage());
+ e.printStackTrace(log);
+ tRes.tested("HasZAxisDescription", false);
+ }
+ catch (com.sun.star.lang.IllegalArgumentException e) {
+ log.println(e.getMessage());
+ e.printStackTrace(log);
+ tRes.tested("HasZAxisDescription", false);
+ }
+ catch (com.sun.star.beans.UnknownPropertyException e) {
+ log.println(e.getMessage());
+ e.printStackTrace(log);
+ tRes.tested("HasZAxisDescription", false);
+ }
+ catch (com.sun.star.beans.PropertyVetoException e) {
+ log.println(e.getMessage());
+ e.printStackTrace(log);
+ tRes.tested("HasZAxisDescription", false);
+ }
+ }
+
+
+ /**
+ * Forces environment recreation.
+ */
+ protected void after() {
+ disposeEnvironment();
+ }
+
+} // EOF ChartAxisZSupplier
+
diff --git a/qadevOOo/tests/java/ifc/chart/_ChartDataPointProperties.java b/qadevOOo/tests/java/ifc/chart/_ChartDataPointProperties.java
new file mode 100644
index 000000000000..2ae9ac7fa36b
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/chart/_ChartDataPointProperties.java
@@ -0,0 +1,115 @@
+/*************************************************************************
+ *
+ * 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 ifc.chart;
+
+import lib.MultiPropertyTest;
+import lib.Status;
+import lib.StatusException;
+import util.utils;
+
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.chart.XDiagram;
+
+/**
+* Testing <code>com.sun.star.chart.ChartDataPointProperties</code>
+* service properties :
+* <ul>
+* <li><code> DataCaption</code></li>
+* <li><code> SymbolType</code></li>
+* <li><code> SymbolBitmapURL</code></li>
+* </ul> <p>
+* The following predefined files needed to complete the test:
+* <ul>
+* <li> <code>space-metal.jpg</code> :
+* for test of property 'SymbolBitmapURL' </li>
+* <ul> <p>
+* This test needs the following object relations :
+* <ul>
+* <li> <code>'CHARTDOC'</code> (of type <code>XChartDocument</code>):
+* to have reference to chart document </li>
+* <li> <code>'LINE'</code> (of type <code>XDiagram</code>):
+* relation that use as parameter for method setDiagram of chart document </li>
+* </ul> <p>
+* @see com.sun.star.chart.ChartDataPointProperties
+*/
+public class _ChartDataPointProperties extends MultiPropertyTest {
+
+ /**
+ * Retrieves object relations and prepares a chart document.
+ * @throws StatusException if one of relations not found.
+ */
+ protected void before() {
+ log.println("Setting Diagram type to LineDiagram");
+ XChartDocument doc = (XChartDocument) tEnv.getObjRelation("CHARTDOC");
+ if (doc == null) throw new StatusException(Status.failed
+ ("Relation 'CHARTDOC' not found"));
+
+ XDiagram Line = (XDiagram) tEnv.getObjRelation("LINE");
+ if (Line == null) throw new StatusException(Status.failed
+ ("Relation 'LINE' not found"));
+
+ doc.setDiagram(Line);
+ }
+
+ protected PropertyTester URLTester = new PropertyTester() {
+ protected Object getNewValue(String propName, Object oldValue)
+ throws java.lang.IllegalArgumentException {
+ return utils.getFullTestURL("space-metal.jpg");
+ }
+ };
+
+ /**
+ * Tests property 'SymbolBitmapURL' using file <code>polibal.gif</code>.
+ */
+ public void _SymbolBitmapURL() {
+ try {
+ oObj.setPropertyValue(
+ "SymbolType",
+ new Integer(com.sun.star.chart.ChartSymbolType.BITMAPURL) );
+ } catch(com.sun.star.lang.WrappedTargetException e) {
+ log.println("Exception while set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Exception while set property value", e);
+ } catch(com.sun.star.lang.IllegalArgumentException e) {
+ log.println("Exception while set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Exception while set property value", e);
+ } catch(com.sun.star.beans.PropertyVetoException e) {
+ log.println("Exception while set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Exception while set property value", e);
+ } catch(com.sun.star.beans.UnknownPropertyException e) {
+ log.println("Exception while set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Exception while set property value", e);
+ }
+
+ testProperty("SymbolBitmapURL", URLTester);
+ }
+}
+
diff --git a/qadevOOo/tests/java/ifc/chart/_ChartDataRowProperties.java b/qadevOOo/tests/java/ifc/chart/_ChartDataRowProperties.java
new file mode 100644
index 000000000000..82dc477efed1
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/chart/_ChartDataRowProperties.java
@@ -0,0 +1,63 @@
+/*************************************************************************
+ *
+ * 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 ifc.chart;
+
+import lib.MultiPropertyTest;
+
+/**
+* Testing <code>com.sun.star.chart.ChartDataRowProperties</code>
+* service properties :
+* <ul>
+* <li><code> Axis</code></li>
+* <li><code> DataErrorProperties</code></li>
+* <li><code> DataMeanValueProperties</code></li>
+* <li><code> DataRegressionProperties</code></li>
+* </ul> <p>
+* @see com.sun.star.chart.ChartDataRowProperties
+*/
+public class _ChartDataRowProperties extends MultiPropertyTest {
+
+ public void _Axis() {
+ try {
+ Integer axis = (Integer) oObj.getPropertyValue("Axis");
+ int newValue;
+ if (axis.intValue()==2) {
+ newValue = 4;
+ } else {
+ newValue = 2;
+ }
+ oObj.setPropertyValue("Axis", new Integer(newValue));
+ axis = (Integer) oObj.getPropertyValue("Axis");
+ tRes.tested("Axis",axis.intValue()==newValue);
+ } catch (Exception e) {
+ e.printStackTrace(log);
+ tRes.tested("Axis",false);
+ }
+ }
+}
+
diff --git a/qadevOOo/tests/java/ifc/chart/_ChartDocument.java b/qadevOOo/tests/java/ifc/chart/_ChartDocument.java
new file mode 100644
index 000000000000..0bb5c2cf5e2b
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/chart/_ChartDocument.java
@@ -0,0 +1,44 @@
+/*************************************************************************
+ *
+ * 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 ifc.chart;
+
+import lib.MultiPropertyTest;
+
+/**
+* Testing <code>com.sun.star.chart.ChartDocument</code>
+* service properties :
+* <ul>
+* <li><code> HasLegend</code></li>
+* <li><code> HasMainTitle</code></li>
+* <li><code> HasSubTitle</code></li>
+* </ul> <p>
+* @see com.sun.star.chart.ChartDocument
+*/
+public class _ChartDocument extends MultiPropertyTest {
+}
+
diff --git a/qadevOOo/tests/java/ifc/chart/_ChartLegend.java b/qadevOOo/tests/java/ifc/chart/_ChartLegend.java
new file mode 100644
index 000000000000..33f7f9ce7283
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/chart/_ChartLegend.java
@@ -0,0 +1,42 @@
+/*************************************************************************
+ *
+ * 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 ifc.chart;
+
+import lib.MultiPropertyTest;
+
+/**
+* Testing <code>com.sun.star.chart.ChartLegend</code>
+* service properties :
+* <ul>
+* <li><code> Alignment</code></li>
+* </ul> <p>
+* @see com.sun.star.chart.ChartLegend
+*/
+public class _ChartLegend extends MultiPropertyTest {
+}
+
diff --git a/qadevOOo/tests/java/ifc/chart/_ChartStatistics.java b/qadevOOo/tests/java/ifc/chart/_ChartStatistics.java
new file mode 100644
index 000000000000..ca1fe56a8b59
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/chart/_ChartStatistics.java
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * 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 ifc.chart;
+
+import lib.MultiPropertyTest;
+import lib.Status;
+import lib.StatusException;
+
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.uno.UnoRuntime;
+
+/**
+* Testing <code>com.sun.star.chart.ChartStatistics</code>
+* service properties :
+* <ul>
+* <li><code> RegressionCurves</code></li>
+* <li><code> ConstantErrorLow</code></li>
+* <li><code> ConstantErrorHigh</code></li>
+* <li><code> MeanValue</code></li>
+* <li><code> ErrorCategory</code></li>
+* <li><code> PercentageError</code></li>
+* <li><code> ErrorMargin</code></li>
+* <li><code> ErrorIndicator</code></li>
+* </ul> <p>
+* This test needs the following object relations :
+* <ul>
+* <li> <code>'CHARTDOC'</code> (of type <code>XChartDocument</code>):
+* to have reference to chart document </li>
+* </ul> <p>
+* @see com.sun.star.chart.ChartStatistics
+*/
+public class _ChartStatistics extends MultiPropertyTest {
+
+ /**
+ * Retrieves object relations and prepares a chart document.
+ * @throws StatusException if one of relations not found.
+ */
+ protected void before() {
+ log.println("Setting Diagram type to LineDiagram");
+ XChartDocument doc = (XChartDocument) tEnv.getObjRelation("CHARTDOC");
+ if (doc == null) throw new StatusException(Status.failed
+ ("Relation 'CHARTDOC' not found"));
+
+ oObj = (XPropertySet)
+ UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() );
+ }
+}
+
diff --git a/qadevOOo/tests/java/ifc/chart/_ChartTableAddressSupplier.java b/qadevOOo/tests/java/ifc/chart/_ChartTableAddressSupplier.java
new file mode 100644
index 000000000000..a44cb3731d57
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/chart/_ChartTableAddressSupplier.java
@@ -0,0 +1,67 @@
+/*************************************************************************
+ *
+ * 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 ifc.chart;
+
+import lib.MultiPropertyTest;
+
+import com.sun.star.chart.ChartSeriesAddress;
+
+/**
+* Testing <code>com.sun.star.chart.ChartTableAddressSupplier</code>
+* service properties :
+* <ul>
+* <li><code> CategoriesRangeAddress</code></li>
+* <li><code> SeriesAddresses</code></li>
+* <li><code> MainTitleAddress</code></li>
+* <li><code> SubTitleAddress</code></li>
+* </ul> <p>
+* @see com.sun.star.chart.ChartTableAddressSupplier
+*/
+public class _ChartTableAddressSupplier extends MultiPropertyTest {
+
+ /**
+ * Tests property 'SeriesAddresses'.
+ */
+ public void _SeriesAddresses() {
+ testProperty("SeriesAddresses", new PropertyTester() {
+ protected Object getNewValue(String propName, Object oldValue) {
+ ChartSeriesAddress[] addr = (ChartSeriesAddress[]) oldValue ;
+ ChartSeriesAddress[] newAddr = null ;
+ if (addr.length > 1) {
+ newAddr = new ChartSeriesAddress[addr.length - 1] ;
+ System.arraycopy(addr, 0, newAddr, 0, addr.length - 1) ;
+ } else {
+ newAddr = addr ;
+ }
+
+ return newAddr ;
+ }
+ }) ;
+ }
+}
+
diff --git a/qadevOOo/tests/java/ifc/chart/_ChartTitle.java b/qadevOOo/tests/java/ifc/chart/_ChartTitle.java
new file mode 100644
index 000000000000..7c3176eedb65
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/chart/_ChartTitle.java
@@ -0,0 +1,57 @@
+/*************************************************************************
+ *
+ * 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 ifc.chart;
+
+import lib.MultiPropertyTest;
+import util.ValueChanger;
+
+/**
+* Testing <code>com.sun.star.chart.ChartTitle</code>
+* service properties :
+* <ul>
+* <li><code> TextRotation</code></li>
+* <li><code> String</code></li>
+* </ul> <p>
+* @see com.sun.star.chart.ChartTitle
+*/
+public class _ChartTitle extends MultiPropertyTest {
+
+ /**
+ * Tests property 'TextRotation'.
+ */
+ public void _TextRotation() {
+ testProperty("TextRotation", new PropertyTester() {
+ protected Object getNewValue(String propName, Object oldValue) {
+ Object ValueToSet = ValueChanger.changePValue(oldValue);
+ int ro = ((Integer) ValueToSet).intValue() * 100;
+ return new Integer( ro );
+ }
+ } );
+ }
+}
+
diff --git a/qadevOOo/tests/java/ifc/chart/_ChartTwoAxisXSupplier.java b/qadevOOo/tests/java/ifc/chart/_ChartTwoAxisXSupplier.java
new file mode 100644
index 000000000000..a2ec31aa9145
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/chart/_ChartTwoAxisXSupplier.java
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * 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 ifc.chart;
+
+import lib.MultiPropertyTest;
+import lib.Status;
+import lib.StatusException;
+
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.chart.XDiagram;
+import com.sun.star.uno.UnoRuntime;
+
+/**
+* Testing <code>com.sun.star.chart.ChartTwoAxisXSupplier</code>
+* service properties :
+* <ul>
+* <li><code> HasSecondaryXAxis</code></li>
+* <li><code> HasSecondaryXAxisDescription</code></li>
+* </ul> <p>
+* This test needs the following object relations :
+* <ul>
+* <li> <code>'CHARTDOC'</code> (of type <code>XChartDocument</code>):
+* to have reference to chart document </li>
+* <li> <code>'BAR'</code> (of type <code>XDiagram</code>):
+* relation that use as parameter for method setDiagram of chart document </li>
+* </ul> <p>
+* @see com.sun.star.chart.ChartTwoAxisXSupplier
+*/
+public class _ChartTwoAxisXSupplier extends MultiPropertyTest {
+
+ XChartDocument doc = null;
+ XDiagram oldDiagram = null;
+
+ /**
+ * Retrieves object relations and prepares a chart document.
+ * @throws StatusException if one of relations not found.
+ */
+ protected void before() {
+ log.println("Setting Diagram type to BarDiagram");
+ doc = (XChartDocument) tEnv.getObjRelation("CHARTDOC");
+ if (doc == null) throw new StatusException(Status.failed
+ ("Relation 'CHARTDOC' not found"));
+
+ XDiagram bar = (XDiagram) tEnv.getObjRelation("BAR");
+ if (bar == null) throw new StatusException(Status.failed
+ ("Relation 'BAR' not found"));
+
+ oldDiagram = doc.getDiagram();
+
+ doc.setDiagram(bar);
+ log.println("Set it to 3D");
+ oObj = (XPropertySet)
+ UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() );
+ try {
+ oObj.setPropertyValue("Dim3D", new Boolean(true));
+ } catch(com.sun.star.lang.WrappedTargetException e) {
+ log.println("Exception while set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Exception while set property value", e);
+ } catch(com.sun.star.lang.IllegalArgumentException e) {
+ log.println("Exception while set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Exception while set property value", e);
+ } catch(com.sun.star.beans.PropertyVetoException e) {
+ log.println("Exception while set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Exception while set property value", e);
+ } catch(com.sun.star.beans.UnknownPropertyException e) {
+ log.println("Exception while set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Exception while set property value", e);
+ }
+ }
+
+ /**
+ * Sets the old diagram for a chart document.
+ */
+ protected void after() {
+ doc.setDiagram(oldDiagram);
+ }
+} // EOF ChartTwoAxisXSupplier
+
diff --git a/qadevOOo/tests/java/ifc/chart/_ChartTwoAxisYSupplier.java b/qadevOOo/tests/java/ifc/chart/_ChartTwoAxisYSupplier.java
new file mode 100644
index 000000000000..fa29c50d9b20
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/chart/_ChartTwoAxisYSupplier.java
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * 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 ifc.chart;
+
+import lib.MultiPropertyTest;
+import lib.Status;
+import lib.StatusException;
+
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.chart.XDiagram;
+import com.sun.star.uno.UnoRuntime;
+
+/**
+* Testing <code>com.sun.star.chart.ChartTwoAxisYSupplier</code>
+* service properties :
+* <ul>
+* <li><code> HasSecondaryYAxis</code></li>
+* <li><code> HasSecondaryYAxisDescription</code></li>
+* </ul> <p>
+* This test needs the following object relations :
+* <ul>
+* <li> <code>'CHARTDOC'</code> (of type <code>XChartDocument</code>):
+* to have reference to chart document </li>
+* <li> <code>'BAR'</code> (of type <code>XDiagram</code>):
+* relation that use as parameter for method setDiagram of chart document </li>
+* </ul> <p>
+* @see com.sun.star.chart.ChartTwoAxisYSupplier
+*/
+public class _ChartTwoAxisYSupplier extends MultiPropertyTest {
+
+ XChartDocument doc = null;
+ XDiagram oldDiagram = null;
+
+ /**
+ * Retrieves object relations and prepares a chart document.
+ * @throws StatusException if one of relations not found.
+ */
+ protected void before() {
+ log.println("Setting Diagram type to BarDiagram");
+ doc = (XChartDocument) tEnv.getObjRelation("CHARTDOC");
+ if (doc == null) throw new StatusException(Status.failed
+ ("Relation 'CHARTDOC' not found"));
+
+ XDiagram bar = (XDiagram) tEnv.getObjRelation("BAR");
+ if (bar == null) throw new StatusException(Status.failed
+ ("Relation 'BAR' not found"));
+
+ oldDiagram = doc.getDiagram();
+
+ doc.setDiagram(bar);
+ log.println("Set it to 3D");
+ oObj = (XPropertySet)
+ UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() );
+ try {
+ oObj.setPropertyValue("Dim3D", new Boolean(true));
+ } catch(com.sun.star.lang.WrappedTargetException e) {
+ log.println("Exception while set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Exception while set property value", e);
+ } catch(com.sun.star.lang.IllegalArgumentException e) {
+ log.println("Exception while set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Exception while set property value", e);
+ } catch(com.sun.star.beans.PropertyVetoException e) {
+ log.println("Exception while set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Exception while set property value", e);
+ } catch(com.sun.star.beans.UnknownPropertyException e) {
+ log.println("Exception while set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Exception while set property value", e);
+ }
+ }
+
+ /**
+ * Sets the old diagram for a chart document.
+ */
+ protected void after() {
+ doc.setDiagram(oldDiagram);
+ }
+} // EOF ChartTwoAxisYSupplier
+
diff --git a/qadevOOo/tests/java/ifc/chart/_Diagram.java b/qadevOOo/tests/java/ifc/chart/_Diagram.java
new file mode 100644
index 000000000000..a5bc75a98792
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/chart/_Diagram.java
@@ -0,0 +1,68 @@
+/*************************************************************************
+ *
+ * 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 ifc.chart;
+
+import lib.MultiPropertyTest;
+import lib.Status;
+import lib.StatusException;
+
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.uno.UnoRuntime;
+
+/**
+* Testing <code>com.sun.star.chart.Diagram</code>
+* service properties :
+* <ul>
+* <li><code> DataCaption</code></li>
+* <li><code> DataRowSource</code></li>
+* </ul> <p>
+* This test needs the following object relations :
+* <ul>
+* <li> <code>'CHARTDOC'</code> (of type <code>XChartDocument</code>):
+* to have reference to chart document </li>
+* </ul> <p>
+* @see com.sun.star.chart.Diagram
+*/
+public class _Diagram extends MultiPropertyTest {
+
+ /**
+ * Retrieves object relations and prepares a chart document.
+ * @throws StatusException if one of relations not found.
+ */
+ protected void before() {
+ log.println("Setting Diagram type to LineDiagram");
+ XChartDocument doc = (XChartDocument) tEnv.getObjRelation("CHARTDOC");
+ if (doc == null) throw new StatusException(Status.failed
+ ("Relation 'CHARTDOC' not found"));
+
+ oObj = (XPropertySet)
+ UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() );
+ }
+}
+
diff --git a/qadevOOo/tests/java/ifc/chart/_Dim3DDiagram.java b/qadevOOo/tests/java/ifc/chart/_Dim3DDiagram.java
new file mode 100644
index 000000000000..a28cf52a48fb
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/chart/_Dim3DDiagram.java
@@ -0,0 +1,67 @@
+/*************************************************************************
+ *
+ * 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 ifc.chart;
+
+import lib.MultiPropertyTest;
+import lib.Status;
+import lib.StatusException;
+
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.uno.UnoRuntime;
+
+/**
+* Testing <code>com.sun.star.chart.Dim3DDiagram</code>
+* service properties :
+* <ul>
+* <li><code> Dim3D</code></li>
+* </ul> <p>
+* This test needs the following object relations :
+* <ul>
+* <li> <code>'CHARTDOC'</code> (of type <code>XChartDocument</code>):
+* to have reference to chart document </li>
+* </ul> <p>
+* @see com.sun.star.chart.Dim3DDiagram
+*/
+public class _Dim3DDiagram extends MultiPropertyTest {
+
+ /**
+ * Retrieves object relations and prepares a chart document.
+ * @throws StatusException if one of relations not found.
+ */
+ protected void before() {
+ log.println("Setting Diagram type to LineDiagram");
+ XChartDocument doc = (XChartDocument) tEnv.getObjRelation("CHARTDOC");
+ if (doc == null) throw new StatusException(Status.failed
+ ("Relation 'CHARTDOC' not found"));
+
+ oObj = (XPropertySet)
+ UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() );
+ }
+} // EOF Dim3DDiagram
+
diff --git a/qadevOOo/tests/java/ifc/chart/_LineDiagram.java b/qadevOOo/tests/java/ifc/chart/_LineDiagram.java
new file mode 100644
index 000000000000..a2555ea26f69
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/chart/_LineDiagram.java
@@ -0,0 +1,194 @@
+/*************************************************************************
+ *
+ * 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 ifc.chart;
+
+import lib.MultiPropertyTest;
+import lib.Status;
+import lib.StatusException;
+
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.chart.XDiagram;
+import com.sun.star.uno.UnoRuntime;
+
+/**
+* Testing <code>com.sun.star.chart.LineDiagram</code>
+* service properties :
+* <ul>
+* <li><code> SymbolType</code></li>
+* <li><code> SymbolSize</code></li>
+* <li><code> SymbolBitmapURL</code></li>
+* <li><code> Lines</code></li>
+* <li><code> SplineType</code></li>
+* </ul> <p>
+* The following predefined files needed to complete the test:
+* <ul>
+* <li> <code>space-metal.jpg</code> :
+* for test of property 'SymbolBitmapURL' </li>
+* <li> <code>crazy-blue.jpg</code> :
+* for test of property 'SymbolBitmapURL' </li>
+* <ul> <p>
+* This test needs the following object relations :
+* <ul>
+* <li> <code>'CHARTDOC'</code> (of type <code>XChartDocument</code>):
+* to have reference to chart document </li>
+* <li> <code>'LINE'</code> (of type <code>XDiagram</code>):
+* relation that use as parameter for method setDiagram of chart document </li>
+* </ul> <p>
+* @see com.sun.star.chart.LineDiagram
+*/
+public class _LineDiagram extends MultiPropertyTest {
+
+ XChartDocument doc = null;
+ XDiagram oldDiagram = null;
+
+ /**
+ * Retrieves object relations.
+ * @throws StatusException If one of relations not found.
+ */
+ protected void before() {
+ log.println("Setting Diagram type to LineDiagram");
+ doc = (XChartDocument) tEnv.getObjRelation("CHARTDOC");
+ if (doc == null) throw new StatusException(Status.failed
+ ("Relation 'CHARTDOC' not found"));
+
+ XDiagram Line = (XDiagram) tEnv.getObjRelation("LINE");
+ if (Line == null) throw new StatusException(Status.failed
+ ("Relation 'LINE' not found"));
+
+ oldDiagram = doc.getDiagram();
+ doc.setDiagram(Line);
+ oObj = (XPropertySet)
+ UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() );
+ }
+
+ /**
+ * Sets the old diagram for a chart document.
+ */
+ protected void after() {
+ doc.setDiagram(oldDiagram);
+ }
+
+ protected PropertyTester URLTester = new PropertyTester() {
+ protected Object getNewValue(String propName, Object oldValue)
+ throws java.lang.IllegalArgumentException {
+ if (oldValue.equals(util.utils.getFullTestURL("space-metal.jpg")))
+ return util.utils.getFullTestURL("crazy-blue.jpg"); else
+ return util.utils.getFullTestURL("space-metal.jpg");
+ }
+ } ;
+
+ protected PropertyTester SymbolTester = new PropertyTester() {
+ protected Object getNewValue(String propName, Object oldValue)
+ throws java.lang.IllegalArgumentException {
+
+ int a = com.sun.star.chart.ChartSymbolType.AUTO;
+ int b = com.sun.star.chart.ChartSymbolType.NONE;
+ if ( ((Integer) oldValue).intValue() == a)
+ return new Integer(b); else
+ return new Integer(a);
+ }
+ } ;
+
+ protected PropertyTester SplineTester = new PropertyTester() {
+ protected Object getNewValue(String propName, Object oldValue)
+ throws java.lang.IllegalArgumentException {
+
+ int a = 0;
+ int b = 2;
+ if ( ((Integer) oldValue).intValue() == a)
+ return new Integer(b); else
+ return new Integer(a);
+ }
+ } ;
+
+ /**
+ * Tests property 'SymbolType'.
+ */
+ public void _SymbolType() {
+ log.println("Testing with custom Property tester") ;
+ testProperty("SymbolType", SymbolTester) ;
+ try {
+ oObj.setPropertyValue("SymbolType",new Integer(-2));
+ } catch(com.sun.star.lang.WrappedTargetException e) {
+ log.println("Exception while set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Exception while set property value", e);
+ } catch(com.sun.star.lang.IllegalArgumentException e) {
+ log.println("Exception while set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Exception while set property value", e);
+ } catch(com.sun.star.beans.PropertyVetoException e) {
+ log.println("Exception while set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Exception while set property value", e);
+ } catch(com.sun.star.beans.UnknownPropertyException e) {
+ log.println("Exception while set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Exception while set property value", e);
+ }
+ }
+
+ /**
+ * Tests property 'SplineType'.
+ */
+ public void _SplineType() {
+ log.println("Testing with custom Property tester") ;
+ testProperty("SplineType", SplineTester) ;
+ }
+
+ /**
+ * Tests property 'SymbolBitmapURL'.
+ */
+ public void _SymbolBitmapURL() {
+ log.println("Testing with custom Property tester") ;
+ try {
+ oObj.setPropertyValue("SymbolType",
+ new Integer(com.sun.star.chart.ChartSymbolType.BITMAPURL));
+ } catch(com.sun.star.lang.WrappedTargetException e) {
+ log.println("Exception while set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Exception while set property value", e);
+ } catch(com.sun.star.lang.IllegalArgumentException e) {
+ log.println("Exception while set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Exception while set property value", e);
+ } catch(com.sun.star.beans.PropertyVetoException e) {
+ log.println("Exception while set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Exception while set property value", e);
+ } catch(com.sun.star.beans.UnknownPropertyException e) {
+ log.println("Exception while set property value");
+ e.printStackTrace(log);
+ throw new StatusException("Exception while set property value", e);
+ }
+
+ testProperty("SymbolBitmapURL", URLTester) ;
+ }
+} // EOF LineDiagram
+
diff --git a/qadevOOo/tests/java/ifc/chart/_StackableDiagram.java b/qadevOOo/tests/java/ifc/chart/_StackableDiagram.java
new file mode 100644
index 000000000000..a6bca2a0b131
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/chart/_StackableDiagram.java
@@ -0,0 +1,89 @@
+/*************************************************************************
+ *
+ * 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 ifc.chart;
+
+import lib.MultiPropertyTest;
+import lib.Status;
+import lib.StatusException;
+
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.chart.XDiagram;
+import com.sun.star.uno.UnoRuntime;
+
+/**
+* Testing <code>com.sun.star.chart.StackableDiagram</code>
+* service properties :
+* <ul>
+* <li><code> Percent</code></li>
+* <li><code> Stacked</code></li>
+* </ul> <p>
+* This test needs the following object relations :
+* <ul>
+* <li> <code>'CHARTDOC'</code> (of type <code>XChartDocument</code>):
+* to have reference to chart document </li>
+* <li> <code>'STACK'</code> (of type <code>XDiagram</code>):
+* relation that use as parameter for method setDiagram of chart document </li>
+* </ul> <p>
+* @see com.sun.star.chart.StackableDiagram
+*/
+public class _StackableDiagram extends MultiPropertyTest {
+
+ XChartDocument doc = null;
+ XDiagram oldDiagram = null;
+
+ /**
+ * Retrieves object relations and prepares a chart document.
+ * @throws StatusException if one of relations not found.
+ */
+ protected void before() {
+ log.println("Setting Diagram type to LineDiagram");
+ doc = (XChartDocument) tEnv.getObjRelation("CHARTDOC");
+ if (doc == null) throw new StatusException(Status.failed
+ ("Relation 'CHARTDOC' not found"));
+
+ XDiagram stack = (XDiagram) tEnv.getObjRelation("STACK");
+ if (stack == null) throw new StatusException(Status.failed
+ ("Relation 'STACK' not found"));
+
+ oldDiagram = doc.getDiagram();
+
+ doc.setDiagram(stack);
+ oObj = (XPropertySet)
+ UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() );
+ }
+
+ /**
+ * Sets the old diagram for a chart document.
+ */
+ protected void after() {
+ doc.setDiagram(oldDiagram);
+ }
+
+} // EOF StackableDiagram
+
diff --git a/qadevOOo/tests/java/ifc/chart/_StockDiagram.java b/qadevOOo/tests/java/ifc/chart/_StockDiagram.java
new file mode 100644
index 000000000000..d76875fe017c
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/chart/_StockDiagram.java
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * 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 ifc.chart;
+
+import lib.MultiPropertyTest;
+import lib.Status;
+import lib.StatusException;
+
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.chart.XDiagram;
+import com.sun.star.uno.UnoRuntime;
+
+/**
+* Testing <code>com.sun.star.chart.StockDiagram</code>
+* service properties :
+* <ul>
+* <li><code> Volume</code></li>
+* <li><code> UpDown</code></li>
+* </ul> <p>
+* This test needs the following object relations :
+* <ul>
+* <li> <code>'CHARTDOC'</code> (of type <code>XChartDocument</code>):
+* to have reference to chart document </li>
+* <li> <code>'STOCK'</code> (of type <code>XDiagram</code>):
+* relation that use as parameter for method setDiagram of chart document </li>
+* </ul> <p>
+* @see com.sun.star.chart.StockDiagram
+*/
+public class _StockDiagram extends MultiPropertyTest {
+
+ XDiagram oldDiagram = null;
+ XChartDocument doc = null;
+
+ /**
+ * Retrieves object relations and prepares a chart document.
+ * @throws StatusException if one of relations not found.
+ */
+ protected void before() {
+ log.println("Setting Diagram type to StockDiagram");
+ doc = (XChartDocument) tEnv.getObjRelation("CHARTDOC");
+ if (doc == null) throw new StatusException(Status.failed
+ ("Relation 'CHARTDOC' not found"));
+
+ XDiagram stock = (XDiagram) tEnv.getObjRelation("STOCK");
+ if (stock == null) throw new StatusException(Status.failed
+ ("Relation 'STOCK' not found"));
+
+ oldDiagram = doc.getDiagram();
+ doc.setDiagram(stock);
+ oObj = (XPropertySet)
+ UnoRuntime.queryInterface(XPropertySet.class, doc.getDiagram());
+ }
+
+ /**
+ * Sets the old diagram for a chart document.
+ */
+ protected void after() {
+ doc.setDiagram(oldDiagram);
+ }
+}
+
diff --git a/qadevOOo/tests/java/ifc/chart/_X3DDisplay.java b/qadevOOo/tests/java/ifc/chart/_X3DDisplay.java
new file mode 100644
index 000000000000..16553df61ad9
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/chart/_X3DDisplay.java
@@ -0,0 +1,77 @@
+/*************************************************************************
+ *
+ * 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 ifc.chart;
+
+import lib.MultiMethodTest;
+
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.chart.X3DDisplay;
+
+/**
+* Testing <code>com.sun.star.chart.X3DDisplay</code>
+* interface methods :
+* <ul>
+* <li><code> getWall()</code></li>
+* <li><code> getFloor()</code></li>
+* </ul> <p>
+* @see com.sun.star.chart.X3DDisplay
+*/
+public class _X3DDisplay extends MultiMethodTest {
+
+ public X3DDisplay oObj = null;
+ boolean result = true;
+
+ /**
+ * Test calls the method and checks returned value. <p>
+ * Has <b> OK </b> status if returned value that isn't null. <p>
+ */
+ public void _getWall() {
+ result = true;
+
+ XPropertySet Wall = oObj.getWall();
+ result = (Wall != null);
+
+ tRes.tested("getWall()", result);
+ }
+
+ /**
+ * Test calls the method and checks returned value. <p>
+ * Has <b> OK </b> status if returned value that isn't null. <p>
+ */
+ public void _getFloor() {
+ result = true;
+
+ XPropertySet Floor = oObj.getWall();
+ result = (Floor != null);
+
+ tRes.tested("getFloor()", result);
+ }
+
+} // EOF X3DDisplay
+
+
diff --git a/qadevOOo/tests/java/ifc/chart/_XAxisXSupplier.java b/qadevOOo/tests/java/ifc/chart/_XAxisXSupplier.java
new file mode 100644
index 000000000000..6e318e0acebc
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/chart/_XAxisXSupplier.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 ifc.chart;
+
+import lib.MultiMethodTest;
+
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.chart.XAxisXSupplier;
+import com.sun.star.drawing.XShape;
+
+/**
+* Testing <code>com.sun.star.chart.XAxisXSupplier</code>
+* interface methods :
+* <ul>
+* <li><code> getXMainGrid()</code></li>
+* <li><code> getXAxisTitle()</code></li>
+* <li><code> getXAxis()</code></li>
+* <li><code> getXHelpGrid()</code></li>
+* </ul> <p>
+* @see com.sun.star.chart.XAxisXSupplier
+*/
+public class _XAxisXSupplier extends MultiMethodTest {
+
+ public XAxisXSupplier oObj = null;
+ boolean result = true;
+
+ /**
+ * Test calls the method and checks returned value. <p>
+ * Has <b> OK </b> status if returned value that isn't null. <p>
+ */
+ public void _getXMainGrid() {
+ result = true;
+
+ XPropertySet MGrid = oObj.getXMainGrid();
+ result = (MGrid != null);
+
+ tRes.tested("getXMainGrid()", result);
+ }
+
+ /**
+ * Test calls the method and checks returned value. <p>
+ * Has <b> OK </b> status if returned value that isn't null. <p>
+ */
+ public void _getXAxisTitle() {
+ result = true;
+
+ XShape title = oObj.getXAxisTitle();
+ result = (title != null);
+
+ tRes.tested("getXAxisTitle()", result);
+ }
+
+ /**
+ * Test calls the method and checks returned value. <p>
+ * Has <b> OK </b> status if returned value that isn't null. <p>
+ */
+ public void _getXAxis() {
+ result = true;
+
+ XPropertySet axis = oObj.getXAxis();
+ result = (axis != null);
+
+ tRes.tested("getXAxis()", result);
+ }
+
+ /**
+ * Test calls the method and checks returned value. <p>
+ * Has <b> OK </b> status if returned value that isn't null. <p>
+ */
+ public void _getXHelpGrid() {
+ result = true;
+
+ XPropertySet HGrid = oObj.getXHelpGrid();
+ result = (HGrid != null);
+
+ tRes.tested("getXHelpGrid()", result);
+ }
+
+}
+
+
diff --git a/qadevOOo/tests/java/ifc/chart/_XAxisYSupplier.java b/qadevOOo/tests/java/ifc/chart/_XAxisYSupplier.java
new file mode 100644
index 000000000000..d5e75fa27131
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/chart/_XAxisYSupplier.java
@@ -0,0 +1,109 @@
+/*************************************************************************
+ *
+ * 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 ifc.chart;
+
+import lib.MultiMethodTest;
+
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.chart.XAxisYSupplier;
+import com.sun.star.drawing.XShape;
+
+/**
+* Testing <code>com.sun.star.chart.XAxisYSupplier</code>
+* interface methods :
+* <ul>
+* <li><code> getYMainGrid()</code></li>
+* <li><code> getYAxisTitle()</code></li>
+* <li><code> getYAxis()</code></li>
+* <li><code> getYHelpGrid()</code></li>
+* </ul> <p>
+* @see com.sun.star.chart.XAxisYSupplier
+*/
+public class _XAxisYSupplier extends MultiMethodTest {
+
+ public XAxisYSupplier oObj = null;
+ boolean result = true;
+
+ /**
+ * Test calls the method and checks returned value. <p>
+ * Has <b> OK </b> status if the method returns
+ * value that isn't null. <p>
+ */
+ public void _getYMainGrid() {
+ result = true;
+
+ XPropertySet MGrid = oObj.getYMainGrid();
+ result = (MGrid != null);
+
+ tRes.tested("getYMainGrid()", result);
+ }
+
+ /**
+ * Test calls the method and checks returned value. <p>
+ * Has <b> OK </b> status if the method returns
+ * value that isn't null. <p>
+ */
+ public void _getYAxisTitle() {
+ result = true;
+
+ XShape title = oObj.getYAxisTitle();
+ result = (title != null);
+
+ tRes.tested("getYAxisTitle()", result);
+ }
+
+ /**
+ * Test calls the method and checks returned value. <p>
+ * Has <b> OK </b> status if the method returns
+ * value that isn't null. <p>
+ */
+ public void _getYAxis() {
+ result = true;
+
+ XPropertySet axis = oObj.getYAxis();
+ result = (axis != null);
+
+ tRes.tested("getYAxis()", result);
+ }
+
+ /**
+ * Test calls the method and checks returned value. <p>
+ * Has <b> OK </b> status if the method returns
+ * value that isn't null. <p>
+ */
+ public void _getYHelpGrid() {
+ result = true;
+
+ XPropertySet HGrid = oObj.getYHelpGrid();
+ result = (HGrid != null);
+
+ tRes.tested("getYHelpGrid()", result);
+ }
+} // EOF XAxisYSupplier
+
+
diff --git a/qadevOOo/tests/java/ifc/chart/_XAxisZSupplier.java b/qadevOOo/tests/java/ifc/chart/_XAxisZSupplier.java
new file mode 100644
index 000000000000..9e7fd3212c53
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/chart/_XAxisZSupplier.java
@@ -0,0 +1,109 @@
+/*************************************************************************
+ *
+ * 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 ifc.chart;
+
+import lib.MultiMethodTest;
+
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.chart.XAxisZSupplier;
+import com.sun.star.drawing.XShape;
+
+/**
+* Testing <code>com.sun.star.chart.XAxisZSupplier</code>
+* interface methods :
+* <ul>
+* <li><code> getZMainGrid()</code></li>
+* <li><code> getZAxisTitle()</code></li>
+* <li><code> getZAxis()</code></li>
+* <li><code> getZHelpGrid()</code></li>
+* </ul> <p>
+* @see com.sun.star.chart.XAxisZSupplier
+*/
+public class _XAxisZSupplier extends MultiMethodTest {
+ public XAxisZSupplier oObj = null;
+ boolean result = true;
+
+ /**
+ * Test calls the method and checks returned value. <p>
+ * Has <b> OK </b> status if the method returns
+ * value that isn't null. <p>
+ */
+ public void _getZMainGrid() {
+ result = true;
+
+ XPropertySet MGrid = oObj.getZMainGrid();
+ result = (MGrid != null);
+
+ tRes.tested("getZMainGrid()", result);
+ }
+
+ /**
+ * Test calls the method and checks returned value. <p>
+ * Has <b> OK </b> status if the method returns
+ * value that isn't null. <p>
+ */
+ public void _getZAxisTitle() {
+ result = true;
+
+ XShape title = oObj.getZAxisTitle();
+ result = (title != null);
+
+ tRes.tested("getZAxisTitle()", result);
+ }
+
+ /**
+ * Test calls the method and checks returned value. <p>
+ * Has <b> OK </b> status if the method returns
+ * value that isn't null. <p>
+ */
+ public void _getZAxis() {
+ result = true;
+
+ XPropertySet axis = oObj.getZAxis();
+ result = (axis != null);
+
+ tRes.tested("getZAxis()", result);
+ }
+
+ /**
+ * Test calls the method and checks returned value. <p>
+ * Has <b> OK </b> status if the method returns
+ * value that isn't null. <p>
+ */
+ public void _getZHelpGrid() {
+ result = true;
+
+ XPropertySet HGrid = oObj.getZHelpGrid();
+ result = (HGrid != null);
+
+ tRes.tested("getZHelpGrid()", result);
+ }
+
+} // EOF XAxisZSupplier
+
+
diff --git a/qadevOOo/tests/java/ifc/chart/_XChartData.java b/qadevOOo/tests/java/ifc/chart/_XChartData.java
new file mode 100644
index 000000000000..98dad0741509
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/chart/_XChartData.java
@@ -0,0 +1,184 @@
+/*************************************************************************
+ *
+ * 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 ifc.chart;
+
+import com.sun.star.chart.ChartDataChangeEvent;
+import com.sun.star.chart.XChartData;
+import com.sun.star.chart.XChartDataArray;
+import com.sun.star.chart.XChartDataChangeEventListener;
+import com.sun.star.lang.EventObject;
+import com.sun.star.uno.UnoRuntime;
+
+import lib.MultiMethodTest;
+
+
+/**
+* Testing <code>com.sun.star.chart.XChartData</code>
+* interface methods :
+* <ul>
+* <li><code> addChartDataChangeEventListener()</code></li>
+* <li><code> removeChartDataChangeEventListener()</code></li>
+* <li><code> getNotANumber()</code></li>
+* <li><code> isNotANumber()</code></li>
+* </ul> <p>
+* @see com.sun.star.chart.XChartData
+*/
+public class _XChartData extends MultiMethodTest {
+ public XChartData oObj = null;
+ boolean result = true;
+ double nan = 0;
+ XChartDataArray dataArray = null;
+ boolean[] dataChanged = new boolean[2];
+ XChartDataChangeEventListener listener1 = new MyEventListener();
+ XChartDataChangeEventListener listener2 = new MyEventListener2();
+
+ /**
+ * Test calls the method adding two listeners and then changes data. <p>
+ * Has <b> OK </b> status if after data were changed
+ * listeners were called. <p>
+ */
+ public void _addChartDataChangeEventListener() {
+ dataChanged[0] = false;
+ dataChanged[1] = false;
+
+ oObj.addChartDataChangeEventListener(listener1);
+ oObj.addChartDataChangeEventListener(listener2);
+
+ dataArray = (XChartDataArray) UnoRuntime.queryInterface(
+ XChartDataArray.class, oObj);
+
+ double[][] data = dataArray.getData();
+ data[0][0] += 0.1;
+ dataArray.setData(data);
+
+ if (!dataChanged[0]) {
+ log.println("ChartDataChangeEventListener1 " +
+ "isn't called after changing data");
+ }
+
+ if (!dataChanged[1]) {
+ log.println("ChartDataChangeEventListener2 " +
+ "isn't called after changing data");
+ }
+
+ tRes.tested("addChartDataChangeEventListener()",
+ dataChanged[0] && dataChanged[1]);
+ }
+
+ /**
+ * Test calls the method for one listener, changes data,
+ * calls the method for other listener and again changes data. <p>
+ * Has <b> OK </b> status if listener is not called after removing. <p>
+ * The following method tests are to be completed successfully before :
+ * <ul>
+ * <li> <code>addChartDataChangeEventListener</code> : to have listeners
+ * that must be removed by the method </li>
+ * </ul>
+ */
+ public void _removeChartDataChangeEventListener() {
+ requiredMethod("addChartDataChangeEventListener()");
+
+ dataChanged[0] = false;
+ dataChanged[1] = false;
+
+ oObj.removeChartDataChangeEventListener(listener1);
+ dataArray = (XChartDataArray) UnoRuntime.queryInterface(
+ XChartDataArray.class, oObj);
+
+ double[][] data = dataArray.getData();
+ data[0][0] += 0.1;
+ dataArray.setData(data);
+ oObj.removeChartDataChangeEventListener(listener2);
+
+ if (dataChanged[0]) {
+ log.println("ChartDataChangeEventListener1 is " +
+ "called after removing listener");
+ }
+
+ tRes.tested("removeChartDataChangeEventListener()",
+ ((!dataChanged[0]) && (dataChanged[1])));
+ }
+
+ /**
+ * Test calls the method and checks returned value. <p>
+ * Has <b> OK </b> status if the return value isn't equal to 1. <p>
+ */
+ public void _getNotANumber() {
+ result = true;
+
+ nan = oObj.getNotANumber();
+ log.println("Current NotANumber is " + nan);
+ result = nan != 1;
+
+ tRes.tested("getNotANumber()", result);
+ }
+
+ /**
+ * Test calls the method with NAN value and with non NAN value. <p>
+ * Has <b> OK </b> status if the method returns true for NAN value and
+ * returns false for other value<p>
+ * The following method tests are to be completed successfully before :
+ * <ul>
+ * <li> <code>getNotANumber</code> : to have the current NAN value </li>
+ * </ul>
+ */
+ public void _isNotANumber() {
+ requiredMethod("getNotANumber()");
+ result = true;
+
+ result = (oObj.isNotANumber(nan) && !oObj.isNotANumber(nan + 1));
+
+ tRes.tested("isNotANumber()", result);
+ }
+
+ /**
+ * Forces environment recreation.
+ */
+ protected void after() {
+ disposeEnvironment();
+ }
+
+ class MyEventListener implements XChartDataChangeEventListener {
+ public void disposing(EventObject oEvent) {
+ System.out.println("Listener1 disposed");
+ }
+
+ public void chartDataChanged(ChartDataChangeEvent ev) {
+ dataChanged[0] = true;
+ }
+ }
+
+ class MyEventListener2 implements XChartDataChangeEventListener {
+ public void disposing(EventObject oEvent) {
+ System.out.println("Listener2 disposed");
+ }
+
+ public void chartDataChanged(ChartDataChangeEvent ev) {
+ dataChanged[1] = true;
+ }
+ }
+} \ No newline at end of file
diff --git a/qadevOOo/tests/java/ifc/chart/_XChartDataArray.java b/qadevOOo/tests/java/ifc/chart/_XChartDataArray.java
new file mode 100644
index 000000000000..1c6b9b8a10f7
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/chart/_XChartDataArray.java
@@ -0,0 +1,233 @@
+/*************************************************************************
+ *
+ * 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 ifc.chart;
+
+import com.sun.star.beans.XPropertySet;
+import lib.MultiMethodTest;
+import lib.Status;
+import lib.StatusException;
+
+import com.sun.star.chart.XChartDataArray;
+import com.sun.star.uno.UnoRuntime;
+
+/**
+* Testing <code>com.sun.star.chart.XChartDataArray</code>
+* interface methods :
+* <ul>
+* <li><code> getColumnDescriptions()</code></li>
+* <li><code> getData()</code></li>
+* <li><code> getRowDescriptions()</code></li>
+* <li><code> setColumnDescriptions()</code></li>
+* <li><code> setData()</code></li>
+* <li><code> setRowDescriptions()</code></li>
+* </ul> <p>
+* @see com.sun.star.chart.XChartDataArray
+*/
+public class _XChartDataArray extends MultiMethodTest {
+
+ public XChartDataArray oObj = null;
+ boolean bResult = true;
+ String[] colDscs = new String[3];
+ String[] rowDscs = new String[3];
+ double[][] data = null;
+ private boolean mbExcludeSetRowAndSetColumn = false;
+ private String msExcludeMessage;
+
+ protected void before() {
+ Object o = tEnv.getObjRelation("CRDESC");
+ if (o != null) {
+ mbExcludeSetRowAndSetColumn = true;
+ msExcludeMessage = (String)o;
+ }
+ if (!mbExcludeSetRowAndSetColumn) {
+ XPropertySet xProp = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, oObj);
+ if(xProp != null) {
+ try {
+ boolean columnAsLabel = ((Boolean)xProp.getPropertyValue("ChartColumnAsLabel")).booleanValue();
+ boolean rowAsLabel = ((Boolean)xProp.getPropertyValue("ChartRowAsLabel")).booleanValue();
+ if (!columnAsLabel) {
+ xProp.setPropertyValue("ChartColumnAsLabel", Boolean.TRUE);
+ }
+ if (!rowAsLabel) {
+ xProp.setPropertyValue("ChartRowAsLabel", Boolean.TRUE);
+ }
+ }
+ catch(Exception e) {
+ // ignore
+ }
+ }
+ }
+ }
+
+ /**
+ * Test calls the method and restores new values. <p>
+ * Has <b> OK </b> status if the method successfully returns. <p>
+ */
+ public void _setColumnDescriptions() {
+ bResult = true;
+
+ colDscs = oObj.getColumnDescriptions();
+ if (mbExcludeSetRowAndSetColumn) {
+ log.println(msExcludeMessage);
+ throw new StatusException(Status.skipped(true));
+ }
+ for (int i = 0; i < colDscs.length; i++) {
+ colDscs[i] = "Col" + i;
+ }
+ oObj.setColumnDescriptions(colDscs);
+
+ tRes.tested("setColumnDescriptions()", bResult);
+ }
+
+ /**
+ * Test calls the method and restores new values. <p>
+ * Has <b> OK </b> status if the method successfully returns. <p>
+ * The following method tests are to be completed successfully before :
+ * <ul>
+ * <li> <code> setColumnDescriptions </code></li>
+ * </ul>
+ */
+ public void _setRowDescriptions() {
+ bResult = true;
+
+ rowDscs = oObj.getRowDescriptions();
+ if (mbExcludeSetRowAndSetColumn) {
+ log.println(msExcludeMessage);
+ throw new StatusException(Status.skipped(true));
+ }
+ for (int i = 0; i < rowDscs.length; i++) {
+ rowDscs[i] = "Row" + i;
+ }
+ oObj.setRowDescriptions(rowDscs);
+
+ tRes.tested("setRowDescriptions()", bResult);
+ }
+
+ /**
+ * Test calls the method and restores new values. <p>
+ * Has <b> OK </b> status if the method successfully returns. <p>
+ * The following method tests are to be completed successfully before :
+ * <ul>
+ * <li> <code> setRowDescriptions </code></li>
+ * </ul>
+ */
+ public void _setData() {
+ rowDscs = oObj.getRowDescriptions();
+ colDscs = oObj.getColumnDescriptions();
+
+ bResult = true;
+ double[][] _data = oObj.getData();
+ data = _data;
+
+ for (int i = 0; i < rowDscs.length; i++) {
+ for (int j = 0; j < colDscs.length; j++)
+ data[i][j] = i * (j + 1);
+ }
+ oObj.setData(data);
+
+ tRes.tested("setData()", bResult);
+ }
+
+ /**
+ * Test calls the method and compare returned values with values restored
+ * after method <code>setColumnDescriptions</code>. <p>
+ * Has <b> OK </b> status if the returned values equils to restored values. <p>
+ * The following method tests are to be completed successfully before :
+ * <ul>
+ * <li> <code> setData </code> : to set and restore new values </li>
+ * </ul>
+ */
+ public void _getColumnDescriptions() {
+ requiredMethod("setColumnDescriptions()");
+ bResult = true;
+
+ String[] dscs = oObj.getColumnDescriptions();
+ bResult &= dscs.length == colDscs.length;
+ if (bResult) {
+ for (int i = 0; i < dscs.length; i++) {
+ bResult &= dscs[i].equals(colDscs[i]);
+ }
+ }
+
+ tRes.tested("getColumnDescriptions()", bResult);
+ }
+
+ /**
+ * Test calls the method and compare returned values with values restored
+ * after method <code>setRowDescriptions</code>. <p>
+ * Has <b> OK </b> status if the returned values equils to restored values. <p>
+ * The following method tests are to be completed successfully before :
+ * <ul>
+ * <li> <code> setData </code> : to set and restore new values </li>
+ * </ul>
+ */
+ public void _getRowDescriptions() {
+ requiredMethod("setRowDescriptions()");
+ bResult = true;
+
+ String[] dscs = oObj.getRowDescriptions();
+ bResult &= dscs.length == rowDscs.length;
+ if (bResult) {
+ for (int i = 0; i < dscs.length; i++) {
+ bResult &= dscs[i].equals(rowDscs[i]);
+ }
+ }
+
+ tRes.tested("getRowDescriptions()", bResult);
+ }
+
+ /**
+ * Test calls the method and compare returned values with values restored
+ * after method <code>setData</code>. <p>
+ * Has <b> OK </b> status if the returned values equils to restored values. <p>
+ * The following method tests are to be completed successfully before :
+ * <ul>
+ * <li> <code> setData </code> : to set and restore new values </li>
+ * </ul>
+ */
+ public void _getData() {
+ requiredMethod("setData()");
+ bResult = true;
+
+ double[][] _data = oObj.getData();
+ data = _data;
+ for (int i = 0; i < rowDscs.length; i++) {
+ for (int j = 0; j < colDscs.length; j++) {
+ bResult &= data[i][j] == _data[i][j];
+ }
+ }
+
+ tRes.tested("getData()", bResult);
+ }
+
+ protected void after() {
+ disposeEnvironment();
+ }
+}
+
+
diff --git a/qadevOOo/tests/java/ifc/chart/_XChartDocument.java b/qadevOOo/tests/java/ifc/chart/_XChartDocument.java
new file mode 100644
index 000000000000..1ce64a0b5ab0
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/chart/_XChartDocument.java
@@ -0,0 +1,164 @@
+/*************************************************************************
+ *
+ * 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 ifc.chart;
+
+import lib.MultiMethodTest;
+
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.chart.XChartData;
+import com.sun.star.chart.XChartDocument;
+import com.sun.star.chart.XDiagram;
+import com.sun.star.drawing.XShape;
+
+/**
+* Testing <code>com.sun.star.chart.XChartDocument</code>
+* interface methods :
+* <ul>
+* <li><code> getTitle()</code></li>
+* <li><code> getSubTitle()</code></li>
+* <li><code> getLegend()</code></li>
+* <li><code> getArea()</code></li>
+* <li><code> getDiagram()</code></li>
+* <li><code> setDiagram()</code></li>
+* <li><code> getData()</code></li>
+* <li><code> attachData()</code></li>
+* </ul> <p>
+*
+* This test needs the following object relations :
+* <ul>
+* <li> <code>'DIAGRAM'</code> (of type <code>XDiagram</code>):
+* is used as parameter for method <code>setDiagram</code> </li>
+* <li> <code>'CHARTDATA'</code> (of type <code>XChartData</code>):
+* is used as parameter for method <code>attachData</code> </li>
+* </ul>
+*
+* @see com.sun.star.chart.XChartDocument
+*/
+public class _XChartDocument extends MultiMethodTest {
+
+ public XChartDocument oObj = null;
+ boolean result = true;
+ XDiagram diagram = null;
+ XChartData ChartData = null;
+
+ /**
+ * Test calls the method and checks returned value. <p>
+ * Has <b> OK </b> status if returned value isn't null. <p>
+ */
+ public void _getTitle() {
+ XShape title = oObj.getTitle();
+ tRes.tested("getTitle()", title != null);
+ }
+
+ /**
+ * Test calls the method and checks returned value. <p>
+ * Has <b> OK </b> status if returned value isn't null. <p>
+ */
+ public void _getSubTitle() {
+ XShape subtitle = oObj.getSubTitle();
+ tRes.tested("getSubTitle()", subtitle != null);
+ }
+
+ /**
+ * Test calls the method and checks returned value. <p>
+ * Has <b> OK </b> status if returned value isn't null. <p>
+ */
+ public void _getLegend() {
+ XShape legend = oObj.getLegend();
+ tRes.tested("getLegend()", legend != null);
+ }
+
+ /**
+ * Test calls the method and checks returned value. <p>
+ * Has <b> OK </b> status if returned value isn't null. <p>
+ */
+ public void _getArea() {
+ XPropertySet area = oObj.getArea();
+ tRes.tested("getArea()", area != null);
+ }
+
+ /**
+ * Test calls the method and checks returned value. <p>
+ * Has <b> OK </b> status if returned value isn't null. <p>
+ */
+ public void _getDiagram() {
+ diagram = oObj.getDiagram();
+ tRes.tested("getDiagram()", diagram != null);
+ }
+
+ /**
+ * Test compares type of diagram before method call and after.<p>
+ * Has <b> OK </b> status if diagram types are not equal. <p>
+ *
+ * The following method tests are to be completed successfully before :
+ * <ul>
+ * <li> <code> getDiagram </code> : to have diagram before method call</li>
+ * </ul>
+ *
+ * @see com.sun.star.chart.XDiagram
+ */
+ public void _setDiagram() {
+ requiredMethod("getDiagram()");
+ String oldType = diagram.getDiagramType();
+ XDiagram diag = (XDiagram)tEnv.getObjRelation("DIAGRAM");
+ oObj.setDiagram(diag);
+ String newType = oObj.getDiagram().getDiagramType();
+ tRes.tested("setDiagram()", !(oldType.equals(newType)));
+ }
+
+ /**
+ * Test calls the method and checks returned value. <p>
+ * Has <b> OK </b> status if returned value isn't null. <p>
+ */
+ public void _getData() {
+ ChartData = oObj.getData();
+ tRes.tested("getData()", ChartData != null);
+ }
+
+ /**
+ * Test compares data before method call and after. <p>
+ * Has <b> OK </b> status if the data before method call and
+ * after are not equal. <p>
+ * The following method tests are to be completed successfully before :
+ * <ul>
+ * <li> <code> getData </code> : to have data before method call </li>
+ * </ul>
+ * @see com.sun.star.chart.XChartData
+ */
+ public void _attachData() {
+ requiredMethod("getData()");
+ XChartData data = (XChartData)tEnv.getObjRelation("CHARTDATA");
+ oObj.attachData(data);
+ XChartData newdata = oObj.getData();
+
+ tRes.tested("attachData()", !(newdata.equals(ChartData)));
+ }
+
+}
+
+
diff --git a/qadevOOo/tests/java/ifc/chart/_XDiagram.java b/qadevOOo/tests/java/ifc/chart/_XDiagram.java
new file mode 100644
index 000000000000..e91ba14cd61c
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/chart/_XDiagram.java
@@ -0,0 +1,156 @@
+/*************************************************************************
+ *
+ * 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 ifc.chart;
+
+import lib.MultiMethodTest;
+import lib.Status;
+import lib.StatusException;
+
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.chart.XDiagram;
+
+/**
+* Testing <code>com.sun.star.chart.XDiagram</code>
+* interface methods :
+* <ul>
+* <li><code> getDiagramType()</code></li>
+* <li><code> getDataRowProperties()</code></li>
+* <li><code> getDataPointProperties()</code></li>
+* </ul> <p>
+* This test needs the following object relations :
+* <ul>
+* <li> <code>'ROWAMOUNT'</code> (of type <code>Integer</code>):
+* to have amount of rows </li>
+* <li> <code>'COLAMOUNT'</code> (of type <code>Integer</code>):
+* to have amount of columns </li>
+* <ul> <p>
+* @see com.sun.star.chart.XDiagram
+*/
+public class _XDiagram extends MultiMethodTest {
+
+ public XDiagram oObj = null;
+ boolean result = true;
+ Integer rowamount = null;
+ Integer colamount = null;
+
+ /**
+ * Retrieves object relations.
+ * @throws StatusException If one of relations not found.
+ */
+ public void before() {
+ rowamount = (Integer)tEnv.getObjRelation("ROWAMOUNT");
+ if (rowamount == null) throw new StatusException(Status.failed
+ ("Relation 'ROWAMOUNT' not found"));
+
+ colamount = (Integer)tEnv.getObjRelation("COLAMOUNT");
+ if (colamount == null) throw new StatusException(Status.failed
+ ("Relation 'COLAMOUNT' not found"));
+ }
+
+ /**
+ * Test calls the method and checks returned value. <p>
+ * Has <b> OK </b> status if returned value start from 'com.sun.star.chart.' <p>
+ */
+ public void _getDiagramType() {
+ result = true;
+
+ String stype = oObj.getDiagramType();
+ log.println("Current Diagram Type is " + stype);
+ result = (stype.startsWith("com.sun.star.chart."));
+
+ tRes.tested("getDiagramType()", result);
+ }
+
+ /**
+ * Test calls the method for every row and checks returned value. <p>
+ * Has <b> OK </b> status if returned value for every row isn't null and
+ * no exceptions were thrown. <p>
+ */
+ public void _getDataRowProperties() {
+ result = true;
+
+ int rows = rowamount.intValue();
+ rows -= 1;
+ XPropertySet props = null;
+
+ log.println("There are " + rows + " rows.");
+ try {
+ for (int i = 0; i < rows; i++) {
+ props = oObj.getDataRowProperties(i);
+ if (props != null) {
+ log.println("Row " + i + " - OK");
+ } else {
+ log.println("Row " + i + " - FAILED");
+ result = false;
+ }
+ }
+ } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
+ log.println("Exception while get data row properties");
+ e.printStackTrace(log);
+ result = false;
+ }
+
+ tRes.tested("getDataRowProperties()", result);
+ }
+
+ /**
+ * Test calls the method for every point and checks returned value. <p>
+ * Has <b> OK </b> status if returned value for every point isn't null and
+ * no exceptions were thrown. <p>
+ */
+ public void _getDataPointProperties() {
+ result = true;
+
+ int rows = rowamount.intValue();
+ int cols = colamount.intValue();
+ XPropertySet props = null;
+
+ log.println("There are " + rows + " rows and " + cols + " cols.");
+
+ try {
+ for (int i = 0; i < rows; i++)
+ for (int j = 0; j < cols; j++) {
+ props = oObj.getDataPointProperties(i, j);
+ if (props != null) {
+ log.println("Row " + i + " Col " + j + " - OK");
+ } else {
+ log.println("Row " + i + " Col " + j + " - FAILED");
+ result = false;
+ }
+ }
+ } catch(com.sun.star.lang.IndexOutOfBoundsException e) {
+ log.println("Exception while get data point properties");
+ e.printStackTrace(log);
+ result = false;
+ }
+
+ tRes.tested("getDataPointProperties()", result);
+ }
+}
+
+
diff --git a/qadevOOo/tests/java/ifc/chart/_XStatisticDisplay.java b/qadevOOo/tests/java/ifc/chart/_XStatisticDisplay.java
new file mode 100644
index 000000000000..984838a65ae8
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/chart/_XStatisticDisplay.java
@@ -0,0 +1,91 @@
+/*************************************************************************
+ *
+ * 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 ifc.chart;
+
+import lib.MultiMethodTest;
+
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.chart.XStatisticDisplay;
+
+/**
+* Testing <code>com.sun.star.chart.XStatisticDisplay</code>
+* interface methods :
+* <ul>
+* <li><code> getMinMaxLine()</code></li>
+* <li><code> getUpBar()</code></li>
+* <li><code> getDownBar()</code></li>
+* </ul> <p>
+* @see com.sun.star.chart.XStatisticDisplay
+*/
+public class _XStatisticDisplay extends MultiMethodTest {
+
+ public XStatisticDisplay oObj = null;
+ boolean result = true;
+
+ /**
+ * Test calls the method and checks returned value. <p>
+ * Has <b> OK </b> status if returned value isn't null. <p>
+ */
+ public void _getMinMaxLine() {
+ result = true;
+
+ XPropertySet MinMaxLine = oObj.getMinMaxLine();
+ result = (MinMaxLine != null);
+
+ tRes.tested("getMinMaxLine()", result);
+ }
+
+ /**
+ * Test calls the method and checks returned value. <p>
+ * Has <b> OK </b> status if returned value isn't null. <p>
+ */
+ public void _getUpBar() {
+ result = true;
+
+ XPropertySet UpBar = oObj.getUpBar();
+ result = (UpBar != null);
+
+ tRes.tested("getUpBar()", result);
+ }
+
+ /**
+ * Test calls the method and checks returned value. <p>
+ * Has <b> OK </b> status if returned value isn't null. <p>
+ */
+ public void _getDownBar() {
+ result = true;
+
+ XPropertySet DownBar = oObj.getDownBar();
+ result = (DownBar != null);
+
+ tRes.tested("getDownBar()", result);
+ }
+
+} // EOF XStatisticDisplay
+
+
diff --git a/qadevOOo/tests/java/ifc/chart/_XTwoAxisXSupplier.java b/qadevOOo/tests/java/ifc/chart/_XTwoAxisXSupplier.java
new file mode 100644
index 000000000000..3455f51c95d1
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/chart/_XTwoAxisXSupplier.java
@@ -0,0 +1,63 @@
+/*************************************************************************
+ *
+ * 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 ifc.chart;
+
+import lib.MultiMethodTest;
+
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.chart.XTwoAxisXSupplier;
+
+/**
+* Testing <code>com.sun.star.chart.XTwoAxisXSupplier</code>
+* interface methods :
+* <ul>
+* <li><code> getSecondaryXAxis()</code></li>
+* </ul> <p>
+* @see com.sun.star.chart.XTwoAxisXSupplier
+*/
+public class _XTwoAxisXSupplier extends MultiMethodTest {
+
+ public XTwoAxisXSupplier oObj = null;
+ boolean result = true;
+
+ /**
+ * Test calls the method and checks returned value. <p>
+ * Has <b> OK </b> status if returned value isn't null. <p>
+ */
+ public void _getSecondaryXAxis() {
+ result = true;
+
+ XPropertySet SecXAxis = oObj.getSecondaryXAxis();
+ result = (SecXAxis != null);
+
+ tRes.tested("getSecondaryXAxis()", result);
+ }
+
+} // EOF XTwoAxisXSupplier
+
+
diff --git a/qadevOOo/tests/java/ifc/chart/_XTwoAxisYSupplier.java b/qadevOOo/tests/java/ifc/chart/_XTwoAxisYSupplier.java
new file mode 100644
index 000000000000..5786da65c2d1
--- /dev/null
+++ b/qadevOOo/tests/java/ifc/chart/_XTwoAxisYSupplier.java
@@ -0,0 +1,71 @@
+/*************************************************************************
+ *
+ * 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 ifc.chart;
+
+import lib.MultiMethodTest;
+
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.chart.XTwoAxisYSupplier;
+
+/**
+* Testing <code>com.sun.star.chart.XTwoAxisYSupplier</code>
+* interface methods :
+* <ul>
+* <li><code> getSecondaryYAxis()</code></li>
+* </ul> <p>
+* After test completion object environment has to be recreated.
+* @see com.sun.star.chart.XTwoAxisYSupplier
+*/
+public class _XTwoAxisYSupplier extends MultiMethodTest {
+
+ public XTwoAxisYSupplier oObj = null;
+ boolean result = true;
+
+ /**
+ * Test calls the method and checks returned value. <p>
+ * Has <b> OK </b> status if returned value isn't null. <p>
+ */
+ public void _getSecondaryYAxis() {
+ result = true;
+
+ XPropertySet SecYAxis = oObj.getSecondaryYAxis();
+ result = (SecYAxis != null);
+
+ tRes.tested("getSecondaryYAxis()", result);
+ }
+
+ /**
+ * Forces object environment recreation.
+ */
+ protected void after() {
+ disposeEnvironment();
+ }
+
+} // EOF XTwoAxisYSupplier
+
+