To copy a sheet between to files, i use the sheet.link api it works but if the source files contains named ranges, the process is 10 times more slow. attached 2 files - sourceSample.ods : the source file containing named ranges. we will copy the first sheet - macroToTestNamedRanges.ods : Some macros that will copy the first sheet of the source to a new file edit the macro and change the working path containing sourceSample.ods (marked with a XXX comment). this is the only thing to modify can be used in 2 modes depending on the response on the question (copy with and without named Ranges in source)
Created attachment 44502 [details] the macro to test
Created attachment 44503 [details] the sample source file
Reproduced with libreoffice 3.3.1 SLED 11 sp1. Send it to Noel have a review.
I can take a look at this. Laurent and I have talked about this on IRC.
The content of attachment 44503 [details] has been deleted by Tollef Fog Heen <tfheen@err.no> who provided the following reason: IM conversation with mmeeks The token used to delete this attachment was generated at 2011-07-11 05:33:45 PDT.
Created attachment 48970 [details] the GOOD source sample file the previous is no more valid
Created attachment 49157 [details] a patch that refactor SetNamedRanges
with the patch, the test case shows a drop of 5.78 seconds to 0.93 seconds for sheet.link the file with 1211 named ranges potentially also improves normal load of files containing lots of namedRanges
Laurent's patch has been reviewed and pushed to the -3-4 branch and to master. This will be fixed in 3.4.3 and later.