I have created a Calc document where I place a button (Form Control) encharged of refreshing all existing DataPilots in all existing sheets.
So I associate a macro to the action event of the button. The macro does something like the following:
sheet = thisComponent.Sheets.getByName("Sheet1")
dp = sheet.DataPilotTables.getByIndex(0)
In fact, I do I couple of For Loops, where I get all sheets and all DataPilots by their indexes. But it's not important for this.
The thing is that the dp.refresh() does nothing on LibreOffice 3.4 RC2. I have tried this code on OpenOffice 3.3 and it works nicely. So, apparently something has been broken on the latest builds.
I hope this helps.
Any workaround is wellcome. Thanks in advance.
I forgot to add that I tried it on a x86 machine on Windows XP SP3.
RC2 is bit by bit identical with release version, so separate items in the version picker are useless. Changes have been discussed with Michael Meeks.
Yes, the problem persist on 3.4.1 rcX. Is there any chance for a workaround until an official fix is done? I have several spreadsheets making use of this function.
I've seen that DataPilots in 3.4.x have been renamed to PivotTables but I don't know if that have been also done for macros, invalidating the sheet.DataPilotTables entry. I mean, is sheet.PivotTables.getByIndex(0) going to work as a replacement to shhet.DataPilotTables.getByIndex(0)? Because that would break the compatibility with older LO and OO versions.
Thanks in advance.
Let me take a look at this for 3.4.2 if I can make it. If not, for the next minor release.
Created attachment 49106 [details]
small test document to demonstrate the bug.
I just created this small sample document just to make it easier for us to test.
The fix is pushed to master libreoffice-3-4 and will be in 3.4.2 final.
Thanks ! :-)
Thank you very much for the fix. You're great.