To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=42576
------- Additional comments from [EMAIL PROTECTED] Fri Feb 11 08:33:24 -0800 2005 ------- In the following I will try to give a short overview how the previews are stored and used by the master page controls. The MasterPageContainer (sd/source/ui/toolpanel/controls/MasterPageContainer.cxx) stores the data known about each master page, among that the previews, in vector of MasterPageDescriptor objects. The previews are loaded by MasterPageContainer::Implementation::LoadPreviewFromURL() from the PNG thumbnails from template documents. This method is called (indirectly) from the Fill() method of the AllMasterPagesSelector class (the third of the master page controls in the task pane). When later a master page is assigned to the Impress document then the associated template document is loaded. In this case the first master page of that document is rendered into a bitmap and stored in the container instead of the PNG thumbnail (initiated in GetPageObjectForToken()). Previews are stored in the original size of the PNG thumbnails and are scaled to requested sizes on demand. The reason for this is that the master page controls can switch between two different preview sizes and we don't want to loose image quality. When one of the master page controls wants to show a preview it calls MasterPageContainer::GetPreviewForToken(). Tokens are used to identify master pages on the classes interface (internally they are abstracted indices into the vector of the container.) There are two implementations that differ in the way they react when the requested preview is not yet present (either because the PNG thumbnail has not yet been loaded or a prior attempt to load it failed). They both provide substitutions for missing previews or scale existing ones to the requested size. In case of the AllMasterPagesSelector the usual procedure of the Fill() method is as follows: It iterates over all entries of the MasterPageContainer and calls MasterPagesSelector::AddItemForToken() for each of them. That method then calls MasterPageContainer::GetPreviewForToken(). It provides a callback function as argument so that the MasterPageConainer can load the PNG thumbnail asynchonous in a timer controlled loop. Eventually the MasterPageContainer::Implementation::DelayedPreviewCreation() method calls LoadPreviewFromURL() and then calls the callback to tell the AllMasterPagesSelector object that the preview is available. The selector finally calls MasterPageContainer::GetPreviewForToken() to retrieve the preview and puts it via SetItemImage into the valueset controls that is used for the actual display of the master pages. --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
