OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Impress and chartdata: not refreshing (using pyuno) [SOLVED]

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
cpina
General User
General User


Joined: 21 Mar 2005
Posts: 24

PostPosted: Wed Mar 21, 2007 5:39 am    Post subject: Impress and chartdata: not refreshing (using pyuno) [SOLVED] Reply with quote

Hello,

Yesterday I managed to change the data associated to a graphic chart in Impress (see the thread http://www.oooforum.org/forum/viewtopic.phtml?t=54586)

But there is a problem: if I change the data, the graphic is not refreshed! Only if I add columns, then is correctly refreshed. When is not refreshed, I check the data values in Impress are really changed.

I paste a piece of code:
Code:
#Change graphic
modelData=GetByName(target,"grafic").getPropertyValue("Model").getData()

data=modelData.getData()
lstData=[]

for row in data:
    lstRow=list(row)
    lstRow[0]=float(44.24) #or random.uniform(10), or...
   
    #for value in row:
        #lstRow.append(value*2)
   
    lstData.append(tuple(lstRow))

modelData.setData(tuple(lstData))

I don't understand why. I have checked in OO version 2.0.4 (Debian) and 2.1 (downloaded from openoffice.org)
If I uncomment the for lines, then graphic is refreshed (new columns added, etc.)

Any idea, suggestion, link, etc.?

Thank you very much,

PS: is not refreshed in slide in normal view either in presentation page (see comments in last thread about it)


Last edited by cpina on Wed Mar 21, 2007 2:35 pm; edited 1 time in total
Back to top
View user's profile Send private message
cpina
General User
General User


Joined: 21 Mar 2005
Posts: 24

PostPosted: Wed Mar 21, 2007 10:02 am    Post subject: Reply with quote

If I do it:

Code:
modelData.setData(tuple([]))
modelData.setData(tuple(lstData))

Where lstData is the new data with same structure (columns, rows). Then it works.

It looks like a bug in OpenOffice? Some trigger is not triggered when there is changes only in values, not in structure.

This is, of course, a workaround. But better than nothing.

Carles
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group