diff options
author | Ingrid Halama <iha@openoffice.org> | 2010-05-31 13:44:48 +0200 |
---|---|---|
committer | Ingrid Halama <iha@openoffice.org> | 2010-05-31 13:44:48 +0200 |
commit | 7844f1e00cc847d08783f5eb2089d597fa87ddc8 (patch) | |
tree | 194952b51b1650e61e9767d13b5385ba027e0e41 /qadevOOo/tests | |
parent | 5cbe50652eaa9fb8279d9b1cf90255ff7b1a037b (diff) |
chart47: #i83866# reset to 2D to speed up following tests
Diffstat (limited to 'qadevOOo/tests')
-rw-r--r-- | qadevOOo/tests/java/ifc/chart/_Chart3DBarProperties.java | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/qadevOOo/tests/java/ifc/chart/_Chart3DBarProperties.java b/qadevOOo/tests/java/ifc/chart/_Chart3DBarProperties.java index f289d68983ce..531ec39478ed 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 |