LibreOffice Module sd (master) 1
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
sd::MasterPageObserver Class Referencefinal

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>

Inheritance diagram for sd::MasterPageObserver:
[legend]
Collaboration diagram for sd::MasterPageObserver:
[legend]

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 MasterPageObserverInstance ()
 Return the single instance of this class. More...
 

Private Member Functions

 MasterPageObserver ()
 
virtual ~MasterPageObserver () override
 
 MasterPageObserver (const MasterPageObserver &)=delete
 
MasterPageObserveroperator= (const MasterPageObserver &)=delete
 

Private Attributes

::std::unique_ptr< ImplementationmpImpl
 

Detailed Description

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.

Member Typedef Documentation

◆ MasterPageNameSet

Definition at line 47 of file MasterPageObserver.hxx.

Constructor & Destructor Documentation

◆ MasterPageObserver() [1/2]

sd::MasterPageObserver::MasterPageObserver ( )
private

Definition at line 124 of file MasterPageObserver.cxx.

Referenced by Instance().

◆ ~MasterPageObserver()

sd::MasterPageObserver::~MasterPageObserver ( )
overrideprivatevirtual

Definition at line 128 of file MasterPageObserver.cxx.

◆ MasterPageObserver() [2/2]

sd::MasterPageObserver::MasterPageObserver ( const MasterPageObserver )
privatedelete

Member Function Documentation

◆ AddEventListener()

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.

Parameters
rEventListenerThe 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().

◆ Instance()

MasterPageObserver & sd::MasterPageObserver::Instance ( )
static

◆ operator=()

MasterPageObserver & sd::MasterPageObserver::operator= ( const MasterPageObserver )
privatedelete

◆ RegisterDocument()

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().

◆ RemoveEventListener()

void sd::MasterPageObserver::RemoveEventListener ( const Link< MasterPageObserverEvent &, void > &  rEventListener)

Remove the given listener from the list of listeners.

Parameters
rEventListenerAfter 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().

◆ UnregisterDocument()

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().

Member Data Documentation

◆ mpImpl

::std::unique_ptr<Implementation> sd::MasterPageObserver::mpImpl
private

The documentation for this class was generated from the following files: