Apache OpenOffice (AOO) Bugzilla – Issue 79698
unknown chart property SolidType
Last modified: 2013-02-24 21:08:25 UTC
The SDK example ChartInDraw creates a 3D diagram and in the test method testThreeD the property "SolidType" is set to ChartSolidType.CYLINDER. On the tested version m221 an UnkonwPropertyException is thrown.
This still holds true for the released OOo 2.3.0. Unfortunately, this breaks programs that employ the "SolidType" property. On 2.3.0 the following services are reported: ------------------- cut here ---------------- UNO_SERVICE|com.sun.star.chart.Diagram+ com.sun.star.xml.UserDefinedAttributeSupplier+ com.sun.star.chart.StackableDiagram+ com.sun.star.chart.ChartAxisXSupplier+ com.sun.star.chart.ChartAxisYSupplier+ com.sun.star.chart.ChartAxisZSupplier+ com.sun.star.chart.ChartTwoAxisXSupplier+ com.sun.star.chart.ChartTwoAxisYSupplier |com.sun.star.comp.chart.Diagram ------------------- cut here ---------------- "SolidType" is a property defined for "Chart3DBarProperties", cf. <http://api.openoffice.org/docs/common/ref/com/sun/star/chart/Chart3DBarProperties.html#SolidType>. The SDK-example pointing to the usage of "SolidType" can be found here: <http://api.openoffice.org/docs/DevelopersGuide/Charts/Charts.xhtml#1_3_3_2_2_3-D_Charts>. HTH, ---rony
The property "SolidType" is only missing at the diagram. It exists for data series and data points. The property at the diagram serves as default setting for the data series, and obviously slipped through.
@bm: thank you for your statement! So can we expect it to be "back" in the next release to allow the programs that take advantage of it to run again? (Otherwise, what would be your recommended/"best" workaround?)
As stated before, it works for data series. So, when you want to change a "box"-chart into a "cone"-chart, you can set the SolidType to CONE for all data series.
@bm: Obviously I have not been able to express myself sufficiently clear so far, hence another attempt. There are programs which used to work, but do not so anymore in 2.3.0. They bomb where the property "SolidType" gets set. Here's the snippet in ooRexx (which uses the Java-interfaces to OOo, the tilde ~ is the message operator; left of the tilde is the receiving object, right of it the interface or the method name): ------------------ cut here ------------------ /* xTableCharts is a SUBCLASS of XNameAccess ! */ xChart = xTableCharts~getByName("FirstChart")~XTableChart /* get the embedded Object */ xComponent = xChart~XEmbeddedObjectSupplier~getEmbeddedObject /* get the Diagram from the ChartDocument */ xDiagram = xComponent~XChartDocument~getDiagram /* set the properties */ xPropsChart = xDiagram~XPropertySet xPropsChart~setPropertyValue("Dim3D", box("bool", .true)) xPropsChart~setPropertyValue("Deep", box("bool", .true)) type=bsf.getConstant("com.sun.star.chart.ChartSolidType", "CYLINDER") /* the next statement bombs on 2.3.0, but used to work in earlier versions ! */ xPropsChart~setPropertyValue("SolidType", box("INT", type)) ------------------ cut here ------------------ So this looks like a bug in 2.3.0. The question would be: if this is a bug, will it get removed in the next version ? ---rony
ronyf: Well, you asked for a work-around, that was what I replied to. Of course this will be fixed, otherwise I would have closed this issue. The target also makes clear that it is planned for OOo 2.4.
@bm: Thank you very much (I had hoped so) and also thanks for your workaround, which I will explore then! ---rony
Fixed in CWS chart15.
Created attachment 50119 [details] Example document with a little Basic code testing SolidType
Please verify this issue on CWS chart15. For convenience there is also a document attached where you can run a macro that checks the property.
verified on cws chart15
close