summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorobo <obo@openoffice.org>2010-06-15 10:46:01 +0200
committerobo <obo@openoffice.org>2010-06-15 10:46:01 +0200
commit71beddb5de268ce4665dbf7f650e1c6154567bd7 (patch)
tree6eb380b5ee3f50fe4f7d28f1312378cf1e590d4d
parent8c02cee3d6df728224604ec91327881bed9adf2c (diff)
parent930f28183c856f9f3f71e8b15e044e0b5bf23579 (diff)
CWS-TOOLING: integrate CWS chart47ooo/DEV300_m83
-rw-r--r--qadevOOo/runner/lib/MultiPropertyTest.java22
-rw-r--r--qadevOOo/tests/java/ifc/beans/_XPropertySet.java488
-rw-r--r--qadevOOo/tests/java/ifc/chart/_Chart3DBarProperties.java34
-rw-r--r--qadevOOo/tests/java/ifc/chart/_ChartDataPointProperties.java4
-rw-r--r--qadevOOo/tests/java/ifc/chart/_LineDiagram.java6
-rw-r--r--qadevOOo/tests/java/ifc/drawing/_LineProperties.java16
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccArea.java8
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccAxis.java8
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccDataPoint.java8
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccDataSeries.java8
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccDiagram.java8
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccFloor.java8
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccGrid.java8
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccLegend.java8
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccLegendEntry.java8
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccStatisticsObject.java8
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccTitle.java8
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccWall.java8
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccessibleDocumentView.java7
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChXChartAxis.java7
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChXChartData.java7
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChXChartDataArray.java7
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChXChartDocument.java14
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChXChartView.java7
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChXDataPoint.java7
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChXDataRow.java7
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChartArea.java7
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChartGrid.java7
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChartLegend.java7
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChartLine.java7
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChartTitle.java7
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentExporter.java9
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentImporter.java12
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Chart/XMLExporter.java9
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Chart/XMLImporter.java12
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesExporter.java9
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesImporter.java14
37 files changed, 504 insertions, 325 deletions
diff --git a/qadevOOo/runner/lib/MultiPropertyTest.java b/qadevOOo/runner/lib/MultiPropertyTest.java
index b81b13af0..e766d13a4 100644
--- a/qadevOOo/runner/lib/MultiPropertyTest.java
+++ b/qadevOOo/runner/lib/MultiPropertyTest.java
@@ -41,6 +41,7 @@ import java.lang.reflect.Method;
import util.ValueChanger;
import util.ValueComparer;
+import util.utils;
import com.sun.star.uno.Any;
import com.sun.star.uno.AnyConverter;
@@ -178,7 +179,26 @@ public class MultiPropertyTest extends MultiMethodTest
try
{
Object oldValue = oObj.getPropertyValue(propName);
-
+
+ if( (oldValue==null) || utils.isVoid(oldValue) )
+ {
+ // #i111560# method getNewValue() does not work with an empty oldValue
+ Property prop = info.getPropertyByName(propName);
+ if( (prop.Attributes & PropertyAttribute.MAYBEVOID) != 0 )
+ {
+ // todo: implement a new test independent from method getNewValue()
+ log.println("changing initially empty MAYBEVOID properties is not supported by the test framework so far - skip test of property: " + propName);
+ tRes.tested(propName, true);
+ return;
+ }
+ else
+ {
+ log.println( "property '"+propName+"' is not set but is not MAYBEVOID");
+ tRes.tested(propName, false);
+ return;
+ }
+ }
+
Object newValue;
// trying to create new value
diff --git a/qadevOOo/tests/java/ifc/beans/_XPropertySet.java b/qadevOOo/tests/java/ifc/beans/_XPropertySet.java
index 62ddba474..3b06cce03 100644
--- a/qadevOOo/tests/java/ifc/beans/_XPropertySet.java
+++ b/qadevOOo/tests/java/ifc/beans/_XPropertySet.java
@@ -27,8 +27,7 @@
package ifc.beans;
-import java.util.Random;
-import java.util.StringTokenizer;
+import java.util.Vector;
import lib.MultiMethodTest;
import util.ValueChanger;
@@ -102,13 +101,13 @@ public class _XPropertySet extends MultiMethodTest {
private final XVetoableChangeListener VClistener = new MyVetoListener();
/**
- * Structure that collects three properties of each type to test :
+ * Structure that collects the properties of different types to test :
* Constrained, Bound and Normal.
*/
private final class PropsToTest {
- String constrained = null;
- String bound = null;
- String normal = null;
+ Vector< String > constrained = new Vector< String >();
+ Vector< String > bound = new Vector< String >();
+ Vector< String > normal = new Vector< String >();
}
private final PropsToTest PTT = new PropsToTest();
@@ -133,9 +132,12 @@ public class _XPropertySet extends MultiMethodTest {
log.println("getPropertySetInfo() method returned null");
tRes.tested("getPropertySetInfo()", true) ;
String[] ptt = (String[]) tEnv.getObjRelation("PTT");
- PTT.normal=ptt[0];
- PTT.bound=ptt[1];
- PTT.constrained=ptt[2];
+ PTT.normal.clear();
+ PTT.bound.clear();
+ PTT.constrained.clear();
+ PTT.normal.add( ptt[0] );
+ PTT.bound.add( ptt[1] );
+ PTT.constrained.add( ptt[2] );
} else {
tRes.tested("getPropertySetInfo()", true );
getPropsToTest(propertySetInfo);
@@ -160,43 +162,48 @@ public class _XPropertySet extends MultiMethodTest {
public void _addPropertyChangeListener() {
requiredMethod("getPropertySetInfo()");
-
- propertyChanged = false;
-
-
- if ( PTT.bound.equals("none") ) {
+
+ int count = PTT.bound.size();
+ if ( count==0 || PTT.bound.get(0).equals("none") ) {
log.println("*** No bound properties found ***");
tRes.tested("addPropertyChangeListener()", true) ;
} else {
- try {
- oObj.addPropertyChangeListener(PTT.bound,PClistener);
- Object gValue = oObj.getPropertyValue(PTT.bound);
- oObj.setPropertyValue(PTT.bound,
- ValueChanger.changePValue(gValue));
- } catch (com.sun.star.beans.PropertyVetoException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.bound+"'");
- e.printStackTrace(log);
- } catch (com.sun.star.lang.IllegalArgumentException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.bound+"'");
- e.printStackTrace(log);
- } catch (com.sun.star.beans.UnknownPropertyException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.bound+"'");
- e.printStackTrace(log);
- } catch (com.sun.star.lang.WrappedTargetException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.bound+"'");
- e.printStackTrace(log);
- } // end of try-catch
- tRes.tested("addPropertyChangeListener()", propertyChanged);
- if (!propertyChanged) {
- log.println("propertyChangeListener wasn't called for '"+
- PTT.bound+"'");
+ boolean error = false;
+ for (int i = 0; i < count; i++) {
+ String propertyName = PTT.bound.get(i);
+ propertyChanged = false;
+ try {
+ oObj.addPropertyChangeListener(propertyName,PClistener);
+ Object gValue = oObj.getPropertyValue(propertyName);
+ log.println("Check bound property: " + propertyName );
+ oObj.setPropertyValue(propertyName,
+ ValueChanger.changePValue(gValue));
+ } catch (com.sun.star.beans.PropertyVetoException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } catch (com.sun.star.lang.IllegalArgumentException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } catch (com.sun.star.beans.UnknownPropertyException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } catch (com.sun.star.lang.WrappedTargetException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } // end of try-catch
+ error = error || !propertyChanged;
+ if (!propertyChanged) {
+ log.println("propertyChangeListener wasn't called for '"+
+ propertyName+"'");
+ }
}
- } //endif
-
+ tRes.tested("addPropertyChangeListener()", !error);
+ }
+
return;
} // end of addPropertyChangeListener()
@@ -217,40 +224,45 @@ public class _XPropertySet extends MultiMethodTest {
requiredMethod("getPropertySetInfo()");
- vetoableChanged = false;
-
- if ( PTT.constrained.equals("none") ) {
+ int count = PTT.constrained.size();
+ if ( count==0 || PTT.constrained.get(0).equals("none") ) {
log.println("*** No constrained properties found ***");
tRes.tested("addVetoableChangeListener()", true) ;
} else {
- try {
- oObj.addVetoableChangeListener(PTT.constrained,VClistener);
- Object gValue = oObj.getPropertyValue(PTT.constrained);
- oObj.setPropertyValue(PTT.constrained,
- ValueChanger.changePValue(gValue));
- } catch (com.sun.star.beans.PropertyVetoException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.constrained+"'");
- e.printStackTrace(log);
- } catch (com.sun.star.lang.IllegalArgumentException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.constrained+"'");
- e.printStackTrace(log);
- } catch (com.sun.star.beans.UnknownPropertyException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.constrained+"'");
- e.printStackTrace(log);
- } catch (com.sun.star.lang.WrappedTargetException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.constrained+"'");
- e.printStackTrace(log);
- } // end of try-catch
- tRes.tested("addVetoableChangeListener()",vetoableChanged);
- if (!vetoableChanged) {
- log.println("vetoableChangeListener wasn't called for '"+
- PTT.constrained+"'");
+ boolean error = false;
+ for (int i = 0; i < count; i++) {
+ String propertyName = PTT.constrained.get(i);
+ vetoableChanged = false;
+ try {
+ oObj.addVetoableChangeListener(propertyName,VClistener);
+ Object gValue = oObj.getPropertyValue(propertyName);
+ oObj.setPropertyValue(propertyName,
+ ValueChanger.changePValue(gValue));
+ } catch (com.sun.star.beans.PropertyVetoException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } catch (com.sun.star.lang.IllegalArgumentException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } catch (com.sun.star.beans.UnknownPropertyException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } catch (com.sun.star.lang.WrappedTargetException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } // end of try-catch
+ error = error || !vetoableChanged;
+ if (!vetoableChanged) {
+ log.println("vetoableChangeListener wasn't called for '"+
+ propertyName+"'");
+ }
}
- } //endif
+ tRes.tested("addVetoableChangeListener()",!error);
+ }
return;
@@ -276,34 +288,44 @@ public class _XPropertySet extends MultiMethodTest {
Object gValue = null;
Object sValue = null;
- if ( PTT.normal.equals("none") ) {
+ int count = PTT.normal.size();
+ if ( count==0 || PTT.normal.get(0).equals("none") ) {
log.println("*** No changeable properties found ***");
tRes.tested("setPropertyValue()", true) ;
} else {
- try {
- log.println("try to cheange value of property '" + PTT.normal + "'" );
- gValue = oObj.getPropertyValue(PTT.normal);
- sValue = ValueChanger.changePValue(gValue);
- oObj.setPropertyValue(PTT.normal, sValue);
- sValue = oObj.getPropertyValue(PTT.normal);
- } catch (com.sun.star.beans.PropertyVetoException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.normal+"'");
- e.printStackTrace(log);
- } catch (com.sun.star.lang.IllegalArgumentException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.normal+"'");
- e.printStackTrace(log);
- } catch (com.sun.star.beans.UnknownPropertyException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.normal+"'");
- e.printStackTrace(log);
- } catch (com.sun.star.lang.WrappedTargetException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.normal+"'");
- e.printStackTrace(log);
- } // end of try-catch
- tRes.tested("setPropertyValue()",(! gValue.equals(sValue)));
+ boolean error = false;
+ for (int i = 0; i < count; i++) {
+ String propertyName = PTT.normal.get(i);
+ try {
+ log.println("try to change value of property '" + propertyName + "'" );
+ gValue = oObj.getPropertyValue(propertyName);
+ sValue = ValueChanger.changePValue(gValue);
+ oObj.setPropertyValue(propertyName, sValue);
+ sValue = oObj.getPropertyValue(propertyName);
+ } catch (com.sun.star.beans.PropertyVetoException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } catch (com.sun.star.lang.IllegalArgumentException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } catch (com.sun.star.beans.UnknownPropertyException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } catch (com.sun.star.lang.WrappedTargetException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } // end of try-catch
+ if( gValue.equals(sValue) )
+ {
+ log.println("setting property '"+ propertyName+"' failed");
+ error = true;
+ }
+ }
+ tRes.tested("setPropertyValue()",!error);
} //endif
return;
@@ -311,6 +333,28 @@ public class _XPropertySet extends MultiMethodTest {
} // end of setPropertyValue()
/**
+ * Tests <code>getPropertyValue</code> method for the given property.
+ * Returns true if no exceptions occured
+ */
+ private boolean getSinglePropertyValue( String propertyName )
+ {
+ boolean runOk = false;
+ try {
+ oObj.getPropertyValue(propertyName);
+ runOk = true;
+ } catch (com.sun.star.beans.UnknownPropertyException e) {
+ log.println("Exception occured while trying to get property '"+
+ propertyName+"'");
+ e.printStackTrace(log);
+ } catch (com.sun.star.lang.WrappedTargetException e) {
+ log.println("Exception occured while trying to get property '"+
+ propertyName+"'");
+ e.printStackTrace(log);
+ }
+ return runOk;
+ }
+
+ /**
* Tests <code>getPropertyValue</code> method.
* Just call this method and checks for no exceptions <p>
* Method tests to be successfully completed before :
@@ -325,29 +369,33 @@ public class _XPropertySet extends MultiMethodTest {
requiredMethod("getPropertySetInfo()");
- String toCheck = PTT.normal;
-
- if ( PTT.normal.equals("none") ) {
- toCheck = oObj.getPropertySetInfo().getProperties()[0].Name;
- log.println("All properties are Read Only");
- log.println("Using: "+toCheck);
+ int count = PTT.normal.size();
+ if ( count==0 || PTT.normal.get(0).equals("none") ) {
+ Property[] properties = oObj.getPropertySetInfo().getProperties();
+ if( properties.length > 0 ) {
+ String propertyName = properties[0].Name;
+ log.println("All properties are Read Only");
+ log.println("Using: "+propertyName);
+ tRes.tested("getPropertyValue()", getSinglePropertyValue( propertyName ) );
+ }
+ else {
+ log.println("*** No properties found ***");
+ tRes.tested("getPropertyValue()", true) ;
+ }
+ } else {
+ boolean error = false;
+ for (int i = 0; i < count; i++) {
+ String propertyName = PTT.normal.get(i);
+ boolean runOk = getSinglePropertyValue( propertyName );
+ if( !runOk )
+ {
+ error = true;
+ log.println("getPropertyValue() failed for property '"+propertyName+"'");
+ }
+ }
+ tRes.tested("getPropertyValue()", !error) ;
}
- try {
- oObj.getPropertyValue(toCheck);
- tRes.tested("getPropertyValue()",true);
- } catch (com.sun.star.beans.UnknownPropertyException e) {
- log.println("Exception occured while trying to get property '"+
- PTT.normal+"'");
- e.printStackTrace(log);
- tRes.tested("getPropertyValue()",false);
- } catch (com.sun.star.lang.WrappedTargetException e) {
- log.println("Exception occured while trying to get property '"+
- PTT.normal+"'");
- e.printStackTrace(log);
- tRes.tested("getPropertyValue()",false);
- } // end of try-catch
-
return;
}
@@ -367,42 +415,60 @@ public class _XPropertySet extends MultiMethodTest {
requiredMethod("addPropertyChangeListener()");
- propertyChanged = false;
-
- if ( PTT.bound.equals("none") ) {
+ int count = PTT.bound.size();
+ if ( count==0 || PTT.bound.get(0).equals("none") ) {
log.println("*** No bound properties found ***");
tRes.tested("removePropertyChangeListener()", true) ;
} else {
- try {
- propertyChanged = false;
- oObj.removePropertyChangeListener(PTT.bound,PClistener);
- Object gValue = oObj.getPropertyValue(PTT.bound);
- oObj.setPropertyValue(PTT.bound,
- ValueChanger.changePValue(gValue));
- } catch (com.sun.star.beans.PropertyVetoException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.bound+"'");
- e.printStackTrace(log);
- } catch (com.sun.star.lang.IllegalArgumentException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.bound+"'");
- e.printStackTrace(log);
- } catch (com.sun.star.beans.UnknownPropertyException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.bound+"'");
- e.printStackTrace(log);
- } catch (com.sun.star.lang.WrappedTargetException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.bound+"'");
- e.printStackTrace(log);
- } // end of try-catch
-
- tRes.tested("removePropertyChangeListener()",!propertyChanged);
- if (propertyChanged) {
- log.println("propertyChangeListener was called after removing"+
- " for '"+PTT.bound+"'");
+
+ //remove all listeners first
+ for (int i = 0; i < count; i++) {
+ String propertyName = PTT.bound.get(i);
+ try {
+ oObj.removePropertyChangeListener(propertyName,PClistener);
+ } catch (Exception e) {
+ log.println("Exception occured while removing change listener from"+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ }
}
- } //endif
+
+ boolean error = false;
+ for (int i = 0; i < count; i++) {
+ String propertyName = PTT.bound.get(i);
+ try {
+ propertyChanged = false;
+ oObj.addPropertyChangeListener(propertyName,PClistener);
+ oObj.removePropertyChangeListener(propertyName,PClistener);
+ Object gValue = oObj.getPropertyValue(propertyName);
+ oObj.setPropertyValue(propertyName,
+ ValueChanger.changePValue(gValue));
+ } catch (com.sun.star.beans.PropertyVetoException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } catch (com.sun.star.lang.IllegalArgumentException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } catch (com.sun.star.beans.UnknownPropertyException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } catch (com.sun.star.lang.WrappedTargetException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } // end of try-catch
+
+ error = error || propertyChanged;
+ if (propertyChanged) {
+ log.println("propertyChangeListener was called after removing"+
+ " for '"+propertyName+"'");
+ }
+ }
+ tRes.tested("removePropertyChangeListener()",!error);
+ }
return;
@@ -425,47 +491,64 @@ public class _XPropertySet extends MultiMethodTest {
requiredMethod("addVetoableChangeListener()");
- vetoableChanged = false;
-
- if ( PTT.constrained.equals("none") ) {
+ int count = PTT.constrained.size();
+ if ( count==0 || PTT.constrained.get(0).equals("none") ) {
log.println("*** No constrained properties found ***");
tRes.tested("removeVetoableChangeListener()", true) ;
} else {
- try {
- oObj.removeVetoableChangeListener(PTT.constrained,VClistener);
- Object gValue = oObj.getPropertyValue(PTT.constrained);
- oObj.setPropertyValue(PTT.constrained,
- ValueChanger.changePValue(gValue));
- } catch (com.sun.star.beans.PropertyVetoException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.constrained+"'");
- e.printStackTrace(log);
- } catch (com.sun.star.lang.IllegalArgumentException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.constrained+"'");
- e.printStackTrace(log);
- } catch (com.sun.star.beans.UnknownPropertyException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.constrained+"'");
- e.printStackTrace(log);
- } catch (com.sun.star.lang.WrappedTargetException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.constrained+"'");
- e.printStackTrace(log);
- } // end of try-catch
-
- tRes.tested("removeVetoableChangeListener()",!vetoableChanged);
- if (vetoableChanged) {
- log.println("vetoableChangeListener was called after "+
- "removing for '"+PTT.constrained+"'");
+
+ //remove all listeners first
+ for (int i = 0; i < count; i++) {
+ String propertyName = PTT.constrained.get(i);
+ try {
+ oObj.removeVetoableChangeListener(propertyName,VClistener);
+ } catch (Exception e) {
+ log.println("Exception occured while removing veto listener from"+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ }
}
- } //endif
+
+ boolean error = false;
+ for (int i = 0; i < count; i++) {
+ String propertyName = PTT.constrained.get(i);
+ vetoableChanged = false;
+ try {
+ oObj.addVetoableChangeListener(propertyName,VClistener);
+ oObj.removeVetoableChangeListener(propertyName,VClistener);
+ Object gValue = oObj.getPropertyValue(propertyName);
+ oObj.setPropertyValue(propertyName,
+ ValueChanger.changePValue(gValue));
+ } catch (com.sun.star.beans.PropertyVetoException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } catch (com.sun.star.lang.IllegalArgumentException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } catch (com.sun.star.beans.UnknownPropertyException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } catch (com.sun.star.lang.WrappedTargetException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } // end of try-catch
+ error = error || vetoableChanged;
+ if (vetoableChanged) {
+ log.println("vetoableChangeListener was called after "+
+ "removing for '"+propertyName+"'");
+ }
+ }
+ tRes.tested("removeVetoableChangeListener()",!error);
+ }
return;
} // end of removeVetoableChangeListener()
-
/**
* Gets the properties being tested. Searches and stores by one
* property of each kind (Bound, Vetoable, Normal).
@@ -473,9 +556,6 @@ public class _XPropertySet extends MultiMethodTest {
public void getPropsToTest(XPropertySetInfo xPSI) {
Property[] properties = xPSI.getProperties();
- String bound = "";
- String constrained = "";
- String normal = "";
// some properties should not be changed in a unspecific way
String[] skip = {"PrinterName", "CharRelief", "IsLayerMode"};
@@ -522,47 +602,19 @@ public class _XPropertySet extends MultiMethodTest {
if ( isWritable && isNotNull ) canChange = isChangeable(name);
if ( isWritable && isNotNull && isBound && canChange) {
- bound+=name+";";
+ PTT.bound.add(name);
}
if ( isWritable && isNotNull && isConstr && canChange) {
- constrained+=name+";";
+ PTT.constrained.add(name);
}
- if ( isWritable && isNotNull && canChange) normal+=name+";";
+ if ( isWritable && isNotNull && canChange) {
+ PTT.normal.add(name);
+ }
} // endfor
-
- //get a random bound property
- PTT.bound=getRandomString(bound);
- log.println("Bound: "+PTT.bound);
-
- //get a random constrained property
- PTT.constrained=getRandomString(constrained);
- log.println("Constrained: "+PTT.constrained);
-
- //get a random normal property
- PTT.normal=getRandomString(normal);
- }
-
- /**
- * Retrieves one random property name from list (property names separated
- * by ';') of property names.
- */
- public String getRandomString(String str) {
-
- String gRS = "none";
- Random rnd = new Random();
-
- if (str.equals("")) str = "none";
- StringTokenizer ST=new StringTokenizer(str,";");
- int nr = rnd.nextInt(ST.countTokens());
- if (nr < 1) nr+=1;
- for (int i=1; i<nr+1; i++) gRS = ST.nextToken();
-
- return gRS;
-
}
public boolean isChangeable(String name) {
diff --git a/qadevOOo/tests/java/ifc/chart/_Chart3DBarProperties.java b/qadevOOo/tests/java/ifc/chart/_Chart3DBarProperties.java
index 08b4af8c7..9b1e19c47 100644
--- a/qadevOOo/tests/java/ifc/chart/_Chart3DBarProperties.java
+++ b/qadevOOo/tests/java/ifc/chart/_Chart3DBarProperties.java
@@ -93,6 +93,40 @@ public class _Chart3DBarProperties extends MultiPropertyTest {
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/_ChartDataPointProperties.java b/qadevOOo/tests/java/ifc/chart/_ChartDataPointProperties.java
index c3d94e747..7307326cf 100644
--- a/qadevOOo/tests/java/ifc/chart/_ChartDataPointProperties.java
+++ b/qadevOOo/tests/java/ifc/chart/_ChartDataPointProperties.java
@@ -45,7 +45,7 @@ import com.sun.star.chart.XDiagram;
* </ul> <p>
* The following predefined files needed to complete the test:
* <ul>
-* <li> <code>poliball.gif</code> :
+* <li> <code>space-metal.jpg</code> :
* for test of property 'SymbolBitmapURL' </li>
* <ul> <p>
* This test needs the following object relations :
@@ -79,7 +79,7 @@ public class _ChartDataPointProperties extends MultiPropertyTest {
protected PropertyTester URLTester = new PropertyTester() {
protected Object getNewValue(String propName, Object oldValue)
throws java.lang.IllegalArgumentException {
- return utils.getFullTestURL("poliball.gif");
+ return utils.getFullTestURL("space-metal.jpg");
}
};
diff --git a/qadevOOo/tests/java/ifc/chart/_LineDiagram.java b/qadevOOo/tests/java/ifc/chart/_LineDiagram.java
index 34e628a60..6296be6dd 100644
--- a/qadevOOo/tests/java/ifc/chart/_LineDiagram.java
+++ b/qadevOOo/tests/java/ifc/chart/_LineDiagram.java
@@ -48,7 +48,7 @@ import com.sun.star.uno.UnoRuntime;
* </ul> <p>
* The following predefined files needed to complete the test:
* <ul>
-* <li> <code>poliball.gif</code> :
+* <li> <code>space-metal.jpg</code> :
* for test of property 'SymbolBitmapURL' </li>
* <li> <code>crazy-blue.jpg</code> :
* for test of property 'SymbolBitmapURL' </li>
@@ -97,9 +97,9 @@ public class _LineDiagram extends MultiPropertyTest {
protected PropertyTester URLTester = new PropertyTester() {
protected Object getNewValue(String propName, Object oldValue)
throws java.lang.IllegalArgumentException {
- if (oldValue.equals(util.utils.getFullTestURL("poliball.gif")))
+ if (oldValue.equals(util.utils.getFullTestURL("space-metal.jpg")))
return util.utils.getFullTestURL("crazy-blue.jpg"); else
- return util.utils.getFullTestURL("poliball.gif");
+ return util.utils.getFullTestURL("space-metal.jpg");
}
} ;
diff --git a/qadevOOo/tests/java/ifc/drawing/_LineProperties.java b/qadevOOo/tests/java/ifc/drawing/_LineProperties.java
index e7d748519..34aa8e4fa 100644
--- a/qadevOOo/tests/java/ifc/drawing/_LineProperties.java
+++ b/qadevOOo/tests/java/ifc/drawing/_LineProperties.java
@@ -80,21 +80,7 @@ public class _LineProperties extends MultiPropertyTest {
LineDash aLineDash2 = new LineDash();
aLineDash.DashLen = 5;
aLineDash2.DashLen = 1;
- PropertyValue[] firstValue = new PropertyValue[2];
- firstValue[0] = new PropertyValue();
- firstValue[0].Name = "Name";
- firstValue[0].Value = "Name1";
- firstValue[1] = new PropertyValue();
- firstValue[1].Name = "LineDash";
- firstValue[1].Value = aLineDash;
- PropertyValue[] secondValue = new PropertyValue[2];
- secondValue[0] = new PropertyValue();
- secondValue[0].Name = "Name";
- secondValue[0].Value = "Name2";
- secondValue[1] = new PropertyValue();
- secondValue[1].Name = "LineDash";
- secondValue[1].Value = aLineDash2;
- testProperty("LineDash",firstValue,secondValue);
+ testProperty("LineDash",aLineDash,aLineDash2);
}
}
diff --git a/qadevOOo/tests/java/mod/_sch/AccArea.java b/qadevOOo/tests/java/mod/_sch/AccArea.java
index d8d618dd4..3c2a0553b 100644
--- a/qadevOOo/tests/java/mod/_sch/AccArea.java
+++ b/qadevOOo/tests/java/mod/_sch/AccArea.java
@@ -111,9 +111,11 @@ public class AccArea extends TestCase {
* @param log writer to log information while testing
*/
protected void cleanup( TestParameters Param, PrintWriter log) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
-
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
}
diff --git a/qadevOOo/tests/java/mod/_sch/AccAxis.java b/qadevOOo/tests/java/mod/_sch/AccAxis.java
index 3e92e3ed1..f566c2178 100644
--- a/qadevOOo/tests/java/mod/_sch/AccAxis.java
+++ b/qadevOOo/tests/java/mod/_sch/AccAxis.java
@@ -109,9 +109,11 @@ public class AccAxis extends TestCase {
* @param log writer to log information while testing
*/
protected void cleanup( TestParameters Param, PrintWriter log) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
-
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
}
diff --git a/qadevOOo/tests/java/mod/_sch/AccDataPoint.java b/qadevOOo/tests/java/mod/_sch/AccDataPoint.java
index 70153a265..2be986c8d 100644
--- a/qadevOOo/tests/java/mod/_sch/AccDataPoint.java
+++ b/qadevOOo/tests/java/mod/_sch/AccDataPoint.java
@@ -110,9 +110,11 @@ public class AccDataPoint extends TestCase {
* @param log writer to log information while testing
*/
protected void cleanup( TestParameters Param, PrintWriter log) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
-
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
}
diff --git a/qadevOOo/tests/java/mod/_sch/AccDataSeries.java b/qadevOOo/tests/java/mod/_sch/AccDataSeries.java
index ca6c09ac5..7d0869150 100644
--- a/qadevOOo/tests/java/mod/_sch/AccDataSeries.java
+++ b/qadevOOo/tests/java/mod/_sch/AccDataSeries.java
@@ -110,9 +110,11 @@ public class AccDataSeries extends TestCase {
* @param log writer to log information while testing
*/
protected void cleanup( TestParameters Param, PrintWriter log) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
-
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
}
diff --git a/qadevOOo/tests/java/mod/_sch/AccDiagram.java b/qadevOOo/tests/java/mod/_sch/AccDiagram.java
index 7aa43a104..cafb821be 100644
--- a/qadevOOo/tests/java/mod/_sch/AccDiagram.java
+++ b/qadevOOo/tests/java/mod/_sch/AccDiagram.java
@@ -110,9 +110,11 @@ public class AccDiagram extends TestCase {
* @param log writer to log information while testing
*/
protected void cleanup( TestParameters Param, PrintWriter log) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
-
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
}
diff --git a/qadevOOo/tests/java/mod/_sch/AccFloor.java b/qadevOOo/tests/java/mod/_sch/AccFloor.java
index 91b9bbe58..d41d88a73 100644
--- a/qadevOOo/tests/java/mod/_sch/AccFloor.java
+++ b/qadevOOo/tests/java/mod/_sch/AccFloor.java
@@ -135,9 +135,11 @@ public class AccFloor extends TestCase {
* @param log writer to log information while testing
*/
protected void cleanup( TestParameters Param, PrintWriter log) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
-
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
}
diff --git a/qadevOOo/tests/java/mod/_sch/AccGrid.java b/qadevOOo/tests/java/mod/_sch/AccGrid.java
index 4028c10ca..0cf1cbb2e 100644
--- a/qadevOOo/tests/java/mod/_sch/AccGrid.java
+++ b/qadevOOo/tests/java/mod/_sch/AccGrid.java
@@ -111,9 +111,11 @@ public class AccGrid extends TestCase {
* @param log writer to log information while testing
*/
protected void cleanup( TestParameters Param, PrintWriter log) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
-
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
}
diff --git a/qadevOOo/tests/java/mod/_sch/AccLegend.java b/qadevOOo/tests/java/mod/_sch/AccLegend.java
index f76f2d962..f04b8f891 100644
--- a/qadevOOo/tests/java/mod/_sch/AccLegend.java
+++ b/qadevOOo/tests/java/mod/_sch/AccLegend.java
@@ -109,9 +109,11 @@ public class AccLegend extends TestCase {
* @param log writer to log information while testing
*/
protected void cleanup( TestParameters Param, PrintWriter log) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
-
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
}
diff --git a/qadevOOo/tests/java/mod/_sch/AccLegendEntry.java b/qadevOOo/tests/java/mod/_sch/AccLegendEntry.java
index 00495ccab..89f5adf86 100644
--- a/qadevOOo/tests/java/mod/_sch/AccLegendEntry.java
+++ b/qadevOOo/tests/java/mod/_sch/AccLegendEntry.java
@@ -109,9 +109,11 @@ public class AccLegendEntry extends TestCase {
* @param log writer to log information while testing
*/
protected void cleanup( TestParameters Param, PrintWriter log) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
-
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
}
diff --git a/qadevOOo/tests/java/mod/_sch/AccStatisticsObject.java b/qadevOOo/tests/java/mod/_sch/AccStatisticsObject.java
index b8ccf7b06..79c820d74 100644
--- a/qadevOOo/tests/java/mod/_sch/AccStatisticsObject.java
+++ b/qadevOOo/tests/java/mod/_sch/AccStatisticsObject.java
@@ -114,9 +114,11 @@ public class AccStatisticsObject extends TestCase {
* @param log writer to log information while testing
*/
protected void cleanup( TestParameters Param, PrintWriter log) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
-
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
}
diff --git a/qadevOOo/tests/java/mod/_sch/AccTitle.java b/qadevOOo/tests/java/mod/_sch/AccTitle.java
index 613a64c9b..17ad8808d 100644
--- a/qadevOOo/tests/java/mod/_sch/AccTitle.java
+++ b/qadevOOo/tests/java/mod/_sch/AccTitle.java
@@ -109,9 +109,11 @@ public class AccTitle extends TestCase {
* @param log writer to log information while testing
*/
protected void cleanup( TestParameters Param, PrintWriter log) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
-
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
}
diff --git a/qadevOOo/tests/java/mod/_sch/AccWall.java b/qadevOOo/tests/java/mod/_sch/AccWall.java
index fae375f02..96b2aed3c 100644
--- a/qadevOOo/tests/java/mod/_sch/AccWall.java
+++ b/qadevOOo/tests/java/mod/_sch/AccWall.java
@@ -134,9 +134,11 @@ public class AccWall extends TestCase {
* @param log writer to log information while testing
*/
protected void cleanup( TestParameters Param, PrintWriter log) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
-
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
}
diff --git a/qadevOOo/tests/java/mod/_sch/AccessibleDocumentView.java b/qadevOOo/tests/java/mod/_sch/AccessibleDocumentView.java
index d40e3348b..d52e5a37f 100644
--- a/qadevOOo/tests/java/mod/_sch/AccessibleDocumentView.java
+++ b/qadevOOo/tests/java/mod/_sch/AccessibleDocumentView.java
@@ -102,8 +102,11 @@ public class AccessibleDocumentView extends TestCase {
* @param log writer to log information while testing
*/
protected void cleanup( TestParameters Param, PrintWriter log) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_sch/ChXChartAxis.java b/qadevOOo/tests/java/mod/_sch/ChXChartAxis.java
index d6af788b4..786456d27 100644
--- a/qadevOOo/tests/java/mod/_sch/ChXChartAxis.java
+++ b/qadevOOo/tests/java/mod/_sch/ChXChartAxis.java
@@ -86,8 +86,11 @@ public class ChXChartAxis extends TestCase {
* Disposes Chart document.
*/
protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_sch/ChXChartData.java b/qadevOOo/tests/java/mod/_sch/ChXChartData.java
index 09146dd9c..861cd2b80 100644
--- a/qadevOOo/tests/java/mod/_sch/ChXChartData.java
+++ b/qadevOOo/tests/java/mod/_sch/ChXChartData.java
@@ -73,8 +73,11 @@ public class ChXChartData extends TestCase {
* Disposes Chart document.
*/
protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_sch/ChXChartDataArray.java b/qadevOOo/tests/java/mod/_sch/ChXChartDataArray.java
index 93a5b842e..b9db27d44 100644
--- a/qadevOOo/tests/java/mod/_sch/ChXChartDataArray.java
+++ b/qadevOOo/tests/java/mod/_sch/ChXChartDataArray.java
@@ -76,8 +76,11 @@ public class ChXChartDataArray extends TestCase {
* Disposes Chart document.
*/
protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_sch/ChXChartDocument.java b/qadevOOo/tests/java/mod/_sch/ChXChartDocument.java
index 707531d16..423a9f473 100644
--- a/qadevOOo/tests/java/mod/_sch/ChXChartDocument.java
+++ b/qadevOOo/tests/java/mod/_sch/ChXChartDocument.java
@@ -77,10 +77,16 @@ public class ChXChartDocument extends TestCase {
* Disposes Chart documents.
*/
protected void cleanup(TestParameters Param, PrintWriter log) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
- log.println( " closing xChartDoc2 " );
- util.DesktopTools.closeDoc(doc2);
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
+ if( doc2!=null ) {
+ log.println( " closing xChartDoc2" );
+ util.DesktopTools.closeDoc(doc2);
+ doc2 = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_sch/ChXChartView.java b/qadevOOo/tests/java/mod/_sch/ChXChartView.java
index fce7ec643..9a8ada525 100644
--- a/qadevOOo/tests/java/mod/_sch/ChXChartView.java
+++ b/qadevOOo/tests/java/mod/_sch/ChXChartView.java
@@ -84,8 +84,11 @@ public class ChXChartView extends TestCase {
* Disposes Chart document.
*/
protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_sch/ChXDataPoint.java b/qadevOOo/tests/java/mod/_sch/ChXDataPoint.java
index 16c5855fd..078571d5d 100644
--- a/qadevOOo/tests/java/mod/_sch/ChXDataPoint.java
+++ b/qadevOOo/tests/java/mod/_sch/ChXDataPoint.java
@@ -101,8 +101,11 @@ public class ChXDataPoint extends TestCase {
* Disposes Chart document.
*/
protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_sch/ChXDataRow.java b/qadevOOo/tests/java/mod/_sch/ChXDataRow.java
index 9b23e1774..5bb8d83ac 100644
--- a/qadevOOo/tests/java/mod/_sch/ChXDataRow.java
+++ b/qadevOOo/tests/java/mod/_sch/ChXDataRow.java
@@ -107,8 +107,11 @@ public class ChXDataRow extends TestCase {
* Disposes Chart document.
*/
protected synchronized void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
diff --git a/qadevOOo/tests/java/mod/_sch/ChartArea.java b/qadevOOo/tests/java/mod/_sch/ChartArea.java
index 7381313c7..017a1be8a 100644
--- a/qadevOOo/tests/java/mod/_sch/ChartArea.java
+++ b/qadevOOo/tests/java/mod/_sch/ChartArea.java
@@ -92,8 +92,11 @@ public class ChartArea extends TestCase {
* Disposes Chart document.
*/
protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_sch/ChartGrid.java b/qadevOOo/tests/java/mod/_sch/ChartGrid.java
index 07056cd35..f863d134b 100644
--- a/qadevOOo/tests/java/mod/_sch/ChartGrid.java
+++ b/qadevOOo/tests/java/mod/_sch/ChartGrid.java
@@ -81,8 +81,11 @@ public class ChartGrid extends TestCase {
* Disposes Chart document.
*/
protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_sch/ChartLegend.java b/qadevOOo/tests/java/mod/_sch/ChartLegend.java
index 4a1a6c9dd..429e30d32 100644
--- a/qadevOOo/tests/java/mod/_sch/ChartLegend.java
+++ b/qadevOOo/tests/java/mod/_sch/ChartLegend.java
@@ -109,8 +109,11 @@ public class ChartLegend extends TestCase {
* Disposes Chart document.
*/
protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_sch/ChartLine.java b/qadevOOo/tests/java/mod/_sch/ChartLine.java
index 095c28320..495bda11c 100644
--- a/qadevOOo/tests/java/mod/_sch/ChartLine.java
+++ b/qadevOOo/tests/java/mod/_sch/ChartLine.java
@@ -79,8 +79,11 @@ public class ChartLine extends TestCase {
* Disposes Chart document.
*/
protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_sch/ChartTitle.java b/qadevOOo/tests/java/mod/_sch/ChartTitle.java
index c05f52edf..004599065 100644
--- a/qadevOOo/tests/java/mod/_sch/ChartTitle.java
+++ b/qadevOOo/tests/java/mod/_sch/ChartTitle.java
@@ -91,8 +91,11 @@ public class ChartTitle extends TestCase {
* Disposes Chart document.
*/
protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentExporter.java b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentExporter.java
index 464fe26c1..93d9de99b 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentExporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentExporter.java
@@ -91,11 +91,14 @@ public class XMLContentExporter extends TestCase {
}
/**
- * Document disposed here.
+ * Close document
*/
protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " disposing xChartDoc " );
- xChartDoc.dispose();
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentImporter.java b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentImporter.java
index 4b53968fd..4801b2a4c 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentImporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentImporter.java
@@ -91,11 +91,15 @@ public class XMLContentImporter extends TestCase {
}
/**
- * Disposes document.
- */
+ * Close document
+ */
protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " disposing document " );
- comp.dispose();
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ comp = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLExporter.java b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLExporter.java
index 3b5d2c01c..ccea9da56 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLExporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLExporter.java
@@ -92,11 +92,14 @@ public class XMLExporter extends TestCase {
}
/**
- * Document disposed here.
+ * Close document
*/
protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " close xChartDoc " );
- DesktopTools.closeDoc(xChartDoc);
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLImporter.java b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLImporter.java
index ef4749e6c..52b3b3ce0 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLImporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLImporter.java
@@ -91,11 +91,15 @@ public class XMLImporter extends TestCase {
}
/**
- * Disposes document.
- */
+ * Close document
+ */
protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " disposing document " );
- comp.dispose();
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ comp = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesExporter.java b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesExporter.java
index 677b2152a..ce399da29 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesExporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesExporter.java
@@ -90,11 +90,14 @@ public class XMLStylesExporter extends TestCase {
}
/**
- * Document disposed here.
+ * Close document
*/
protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " disposing xChartDoc " );
- xChartDoc.dispose();
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesImporter.java b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesImporter.java
index 20fd6427f..01f89d61a 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesImporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesImporter.java
@@ -88,12 +88,16 @@ public class XMLStylesImporter extends TestCase {
comp = xChartDoc;
}
- /**
- * Disposes document.
- */
+ /**
+ * Close document
+ */
protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " disposing document " );
- comp.dispose();
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ comp = null;
+ }
}
/**