summaryrefslogtreecommitdiff
path: root/chart2/qa
diff options
context:
space:
mode:
authorBjörn Milcke <bm@openoffice.org>2003-10-15 14:55:48 +0000
committerBjörn Milcke <bm@openoffice.org>2003-10-15 14:55:48 +0000
commitf80d44892621d669c6c04d199b57069f9a602c96 (patch)
tree003e19711582c7996cf8911cbd693894ec12fc73 /chart2/qa
parent5893e7ca2f2dfa01a5361a14bb84a2830cc23d3f (diff)
+test for legend
Diffstat (limited to 'chart2/qa')
-rw-r--r--chart2/qa/TestCaseOldAPI.java30
1 files changed, 29 insertions, 1 deletions
diff --git a/chart2/qa/TestCaseOldAPI.java b/chart2/qa/TestCaseOldAPI.java
index 50ca7cf43904..8f1b5e5b5b98 100644
--- a/chart2/qa/TestCaseOldAPI.java
+++ b/chart2/qa/TestCaseOldAPI.java
@@ -60,7 +60,8 @@ public class TestCaseOldAPI extends ComplexTestCase {
"testTitle",
"testSubTitle",
"testDiagram",
- "testAxis"
+ "testAxis",
+ "testLegend"
};
}
@@ -295,6 +296,33 @@ public class TestCaseOldAPI extends ComplexTestCase {
}
}
+ // ------------
+
+ public void testLegend()
+ {
+ XShape xLegend = mxOldDoc.getLegend();
+ assure( "No Legend returned", xLegend != null );
+
+ XPropertySet xLegendProp = (XPropertySet) UnoRuntime.queryInterface(
+ XPropertySet.class, xLegend );
+ assure( "Legend is no property set", xLegendProp != null );
+
+ try
+ {
+ ChartLegendPosition eNewPos = ChartLegendPosition.BOTTOM;
+ xLegendProp.setPropertyValue( "Alignment", eNewPos );
+ assure( "Property Alignment",
+ AnyConverter.toObject(
+ new Type( ChartLegendPosition.class ),
+ xLegendProp.getPropertyValue( "Alignment" )) == eNewPos );
+ }
+ catch( Exception ex )
+ {
+ failed( ex.getMessage() );
+ ex.printStackTrace( (PrintWriter)log );
+ }
+ }
+
// ================================================================================
private XModel mxChartModel;