Re: Setting data in Writer chart from Basic

2016-02-01 Thread sos
Did you tran Sent from my Samsung Galaxy smartphone.Did you translate the solution into basic code? Hi Fernand, thanks for the ideas. Sadly nothing you or anybody else posted helped. Finally I found this hack (here xChart has type Reference< XTextContent > xChart):   Reference < XEmbeddedObjec

Re: Setting data in Writer chart from Basic

2016-01-31 Thread Jan Rheinländer
Hi, something like this: set doc = thisComponent set ctrl = thisComponent.CurrentController xChart = ctrl.getModel().getEmbeddedObjects.getByName("Objekt2") xChart.ExtendedControlOverEmbeddedObject.changeState(0) xChart.ExtendedControlOverEmbeddedObject.changeState(1) x

Re: Setting data in Writer chart from Basic

2016-01-30 Thread Jan Rheinländer
Hi Fernand, thanks for the ideas. Sadly nothing you or anybody else posted helped. Finally I found this hack (here xChart has type Reference< XTextContent > xChart): Reference < XEmbeddedObjectSupplier2 >xEOS2(xChart, UNO_QUERY_THROW); Reference < XEmbeddedObject > xEmbObj(xEOS2->getExtendedC

Re: Setting data in Writer chart from Basic

2016-01-24 Thread Fernand Vanrie
Jan, please find some code who works fine for me, maybe its locking and unlocking whor provoke the refresh or its becuase i change some more things after setting the data ? oChart.lockControllers() oChart.Data.setData(DataArray()) oChart.Data.setrowDescriptions(LabelsArray()) dim co

Re: Setting data in Writer chart from Basic

2016-01-24 Thread Regina Henschel
Hi Jan, it might work for you as oXCOEO = xChart.ExtendedControlOverEmbeddedObject oXCOEO.update() If you sent me a document including the macro and the chart, I can try it. Or you try it with event, as described here https://forum.openoffice.org/en/forum/viewtopic.php?f=45&t=28327 It is a t

Setting data in Writer chart from Basic

2016-01-24 Thread Jan Rheinländer
Hi, with this code I can change the data in a Writer chart: set doc = thisComponent set ctrl = thisComponent.CurrentController xChart = ctrl.getModel().getEmbeddedObjects.getByName("Objekt1") set cDoc = xChart.getEmbeddedObject set cDataArray = cDoc.getDataProvider data =