Hi,Sven Jacobi Thanks for your reply!
----- Original Message ----- > Hi, > > 蒋东进 wrote: > > Hi,all > > > > I have implemented delay load slide page in impress these days. Now I > > can import a BIG .ppt file in several seconds. > > Here is my way: I modify func ** sal_Bool ImplSdPPTImport::Import() **, > > only complete load several pages( start 4-6 pages ) at import phase, for > > other pages I only import their notepage, but leave their masterpage and > > slidepage for delay loading when those pages are realy needed,eg display or > > operate. > > A delay load slide page mechanism might be a good thing for a PPT > viewer, but in case you are editing the file you will not save any time > rather it is leading to many difficulties as it is required that the > original file is always available and you have to determine if edited > slides have to be loaded from the original PPT document or from > something else. Additionally import errors will occur at a very late > time, you might get the error if you are just showing your presentation. > Yes, we should make the original file available always. But we do not need pay more attention to it, we can get it from DrawDocShell easily( by GetMedium() ). What we should do is to make sure it is openned if we need import something from it, and to clode it if we do not need it anymore. What is your meaning of \"Additionally import errors\", under slide show mode I get a refresh error what I have said in question 1, some errors else? > > > > Everything is ok but 2 questions: > > > > 1. Under slide show mode, if the previous/next page is not imported, I > > call my import func to import its masterpage and slidepage in func ** void > > SlideshowImpl::slideChange() **. My import func is executed well but the > > page still display blank, only if I forward or backward some times, the > > page is updated well. So I want to know how I can update the page > > immediately after call my import func? > > Under source code base 1.04, I put my import func at the frant of ** > > void FuSlideShow::PrepareForPage( SdPage* pPage, BOOL bInitAnimObjs ) **,it > > works well. Now I change my source code base to 680m104, I get the problem. > > > > Sorry, I don\'t know what\'s wrong here. I have resolved the problem.In code base 680, there is a new module -- slideshow, it is responsible for showing the presentation. I found in func ** bool Presentation_Impl::prefetchSlide( sal_Int32 nPage ) **, they use bufferd mechanism( buffered 3 pages, previouse,current and next page ), so I import 3 pages a time if they are unimportted in func ** void SlideshowImpl::slideChange() **. > > > 2. When I open a .ppt file, change something and save it, I must call > > my import func to import all those unimported pages before export it. So > > even we can import a BIG .ppt file in several seconds, but it will take > > more time( the same as import the whole .ppt file completely ) to wait the > > file be saved. I found ** sal_Bool PPTWriter::ImplCreateSlide( sal_uInt32 > > nPageNum ) ** is the func to export a slidepage, I want to know how I can > > only export those imported pages, for those unimported pages only copy > > their bytes from old file medium( inputstream ) to new file medium( > > outputstream )? In this way the export process will fast. > > In my opinion the import of a PPT file is not finished as long as the > original PPT document is needed. There exist the possibility to store > changed slides only, but this requires deep knowledge of the PPT format > and it leads to the fact that you resides on the PPT format, and this is > something that nobody really wants. > Yes, but the PPT filter is reside on the PPT format of couse. We just only modify some codes in class PPTWriter and will not bring some side effects. But I am not familiar with PPT format :) ---- tsmail is a mail solution, please visit http://www.linuxts.com
