LibreOffice Module sd (master) 1
|
This singleton observes all registered documents for changes in the used master pages and in turn informs its listeners about it. More...
#include <MasterPageObserver.hxx>
Classes | |
class | Implementation |
Public Types | |
typedef ::std::set< OUString > | MasterPageNameSet |
Public Member Functions | |
void | RegisterDocument (SdDrawDocument &rDocument) |
The master page observer will listen to events of this document and detect changes of the use of master pages. More... | |
void | UnregisterDocument (SdDrawDocument &rDocument) |
The master page observer will stop to listen to events of this document. More... | |
void | AddEventListener (const Link< MasterPageObserverEvent &, void > &rEventListener) |
Add a listener that is informed of master pages that are newly assigned to slides or become unassigned. More... | |
void | RemoveEventListener (const Link< MasterPageObserverEvent &, void > &rEventListener) |
Remove the given listener from the list of listeners. More... | |
Public Member Functions inherited from sd::SdGlobalResource | |
virtual | ~SdGlobalResource () COVERITY_NOEXCEPT_FALSE |
Static Public Member Functions | |
static MasterPageObserver & | Instance () |
Return the single instance of this class. More... | |
Private Member Functions | |
MasterPageObserver () | |
virtual | ~MasterPageObserver () override |
MasterPageObserver (const MasterPageObserver &)=delete | |
MasterPageObserver & | operator= (const MasterPageObserver &)=delete |
Private Attributes | |
::std::unique_ptr< Implementation > | mpImpl |
This singleton observes all registered documents for changes in the used master pages and in turn informs its listeners about it.
One such listener is the master page selector control in the tool panel that shows the recently used master pages.
Definition at line 44 of file MasterPageObserver.hxx.
typedef ::std::set<OUString> sd::MasterPageObserver::MasterPageNameSet |
Definition at line 47 of file MasterPageObserver.hxx.
|
private |
Definition at line 124 of file MasterPageObserver.cxx.
Referenced by Instance().
|
overrideprivatevirtual |
Definition at line 128 of file MasterPageObserver.cxx.
|
privatedelete |
void sd::MasterPageObserver::AddEventListener | ( | const Link< MasterPageObserverEvent &, void > & | rEventListener | ) |
Add a listener that is informed of master pages that are newly assigned to slides or become unassigned.
rEventListener | The event listener to call for future events. Call RemoveEventListener() before the listener is destroyed. |
Definition at line 113 of file MasterPageObserver.cxx.
References mpImpl.
Referenced by sd::sidebar::RecentlyUsedMasterPages::LateInit().
|
static |
Return the single instance of this class.
Definition at line 91 of file MasterPageObserver.cxx.
References sd::SdGlobalResourceContainer::AddResource(), sd::SdGlobalResourceContainer::Instance(), and MasterPageObserver().
Referenced by sd::ImpressViewShellBase::ImpressViewShellBase(), sd::sidebar::RecentlyUsedMasterPages::LateInit(), sd::ImpressViewShellBase::~ImpressViewShellBase(), and sd::sidebar::RecentlyUsedMasterPages::~RecentlyUsedMasterPages().
|
privatedelete |
void sd::MasterPageObserver::RegisterDocument | ( | SdDrawDocument & | rDocument | ) |
The master page observer will listen to events of this document and detect changes of the use of master pages.
Definition at line 103 of file MasterPageObserver.cxx.
References mpImpl.
Referenced by sd::ImpressViewShellBase::ImpressViewShellBase().
void sd::MasterPageObserver::RemoveEventListener | ( | const Link< MasterPageObserverEvent &, void > & | rEventListener | ) |
Remove the given listener from the list of listeners.
rEventListener | After this method returns the given listener is not called back from this object. Passing a listener that has not been registered before is safe and is silently ignored. |
Definition at line 119 of file MasterPageObserver.cxx.
References mpImpl.
Referenced by sd::sidebar::RecentlyUsedMasterPages::~RecentlyUsedMasterPages().
void sd::MasterPageObserver::UnregisterDocument | ( | SdDrawDocument & | rDocument | ) |
The master page observer will stop to listen to events of this document.
Definition at line 108 of file MasterPageObserver.cxx.
References mpImpl.
Referenced by sd::ImpressViewShellBase::~ImpressViewShellBase().
|
private |
Definition at line 81 of file MasterPageObserver.hxx.
Referenced by AddEventListener(), RegisterDocument(), RemoveEventListener(), and UnregisterDocument().