/** The queue stores and processes all requests from a MasterPageContainer forthecreationofpreviews. Theorderofrequestprocessinganditstimingiscontrolledbya heuristicthatusesvaluesgivenwitheachrequestandwhichis controlledbyvariousparametersthataredescribedbelow.
*/ class MasterPageContainerQueue final
{ public: class ContainerAdapter { public: virtualbool UpdateDescriptor ( const SharedMasterPageDescriptor& rpDescriptor, bool bForcePageObject, bool bForcePreview, bool bSendEvents) = 0;
/** This method is typically called for entries in the container for whichGetPreviewState()returnsOS_CREATABLE.Thecreationofthe previewisthenscheduledtobeexecutedasynchronouslyatalater pointintime.Whenthepreviewisavailablethechangelisteners willbenotified.
*/ bool RequestPreview (const SharedMasterPageDescriptor& rDescriptor);
/** Return <TRUE/> when there is a request currently in the queue for thegiventoken.
*/ bool HasRequest (MasterPageContainer::Token aToken) const;
/** Return <TRUE/> when there is at least one request in the queue.
*/ bool IsEmpty() const;
/** After this call the queue does not wait anymore for requests with higherprioritywhenonlyasmallnumberofrequestswithlower priorityarepresent.Thismethodshouldbecalledwhenall templatesareinsertedintotheMasterPageContainer.
*/ void ProcessAllRequests();
private:
std::weak_ptr<ContainerAdapter> mpWeakContainer; class PreviewCreationRequest; class RequestQueue;
std::unique_ptr<RequestQueue> mpRequestQueue;
Timer maDelayedPreviewCreationTimer;
sal_uInt32 mnRequestsServedCount;
// There are a couple of values that define various aspects of the // heuristic that defines the order and timing in which requests for // preview creation are processed.
/** The time to wait (in milliseconds) between the creation of previews.
*/ staticconst sal_Int32 snDelayedCreationTimeout;
/** The time to wait when the system is not idle.
*/ staticconst sal_Int32 snDelayedCreationTimeoutWhenNotIdle;
/** Requests for previews of master pages in a document have their priorityincreasedbythisvalue.
*/ staticconst sal_Int32 snMasterPagePriorityBoost;
/** When only requests which a priority lower than this threshold exist andnotmanyrequestshavebeenmadeyetthenwaitwithprocessing themuntilmorerequestsarepresent.
*/ staticconst sal_Int32 snWaitForMoreRequestsPriorityThreshold;
/** When only requests which a priority lower than a threshold exist andnotmorerequeststhanthisnumberhavebeenmadeoralready processedthenwaitwithprocessingthemuntilmorerequestsare present.
*/ static sal_uInt32 snWaitForMoreRequestsCount;
/** Calculate the priority that defines the order in which requests areprocessed.
*/ static sal_Int32 CalculatePriority (const SharedMasterPageDescriptor& rDescriptor);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.