LibreOffice Module dbaccess (master) 1
Public Member Functions | Private Attributes | List of all members
dbaccess::ViewMonitor Class Reference

helper class monitoring the views of a document, and firing appropriate events when views are attached / detached More...

#include <databasedocument.hxx>

Collaboration diagram for dbaccess::ViewMonitor:
[legend]

Public Member Functions

 ViewMonitor (DocumentEventNotifier &_rEventNotifier)
 
 ViewMonitor (const ViewMonitor &)=delete
 
const ViewMonitoroperator= (const ViewMonitor &)=delete
 
void reset ()
 
bool onControllerConnected (const css::uno::Reference< css::frame::XController > &_rxController)
 to be called when a view (aka controller) has been connected to the document More...
 
bool onSetCurrentController (const css::uno::Reference< css::frame::XController > &_rxController)
 to be called when a controller is set as current controller More...
 
void onLoadedDocument ()
 

Private Attributes

DocumentEventNotifierm_rEventNotifier
 
bool m_bIsNewDocument
 
bool m_bEverHadController
 
bool m_bLastIsFirstEverController
 
css::uno::Reference< css::frame::XController > m_xLastConnectedController
 

Detailed Description

helper class monitoring the views of a document, and firing appropriate events when views are attached / detached

Definition at line 82 of file databasedocument.hxx.

Constructor & Destructor Documentation

◆ ViewMonitor() [1/2]

dbaccess::ViewMonitor::ViewMonitor ( DocumentEventNotifier _rEventNotifier)
inlineexplicit

Definition at line 85 of file databasedocument.hxx.

◆ ViewMonitor() [2/2]

dbaccess::ViewMonitor::ViewMonitor ( const ViewMonitor )
delete

Member Function Documentation

◆ onControllerConnected()

bool dbaccess::ViewMonitor::onControllerConnected ( const css::uno::Reference< css::frame::XController > &  _rxController)

to be called when a view (aka controller) has been connected to the document

Returns
<TRUE> if and only if this was the first-ever controller connected to the document

Definition at line 107 of file databasedocument.cxx.

References m_bEverHadController, m_bLastIsFirstEverController, and m_xLastConnectedController.

Referenced by dbaccess::ODatabaseDocument::connectController().

◆ onLoadedDocument()

void dbaccess::ViewMonitor::onLoadedDocument ( )
inline

◆ onSetCurrentController()

bool dbaccess::ViewMonitor::onSetCurrentController ( const css::uno::Reference< css::frame::XController > &  _rxController)

to be called when a controller is set as current controller

Returns
<TRUE> if and only if the controller connection indicates that loading the document is finished. This is the case if the given controller has previously been connected, and it was the first controller ever for which this happened.

Definition at line 118 of file databasedocument.cxx.

References m_bIsNewDocument, m_bLastIsFirstEverController, m_rEventNotifier, m_xLastConnectedController, and dbaccess::DocumentEventNotifier::notifyDocumentEventAsync().

Referenced by dbaccess::ODatabaseDocument::setCurrentController().

◆ operator=()

const ViewMonitor & dbaccess::ViewMonitor::operator= ( const ViewMonitor )
delete

◆ reset()

void dbaccess::ViewMonitor::reset ( )
inline

Member Data Documentation

◆ m_bEverHadController

bool dbaccess::ViewMonitor::m_bEverHadController
private

Definition at line 127 of file databasedocument.hxx.

Referenced by onControllerConnected(), and reset().

◆ m_bIsNewDocument

bool dbaccess::ViewMonitor::m_bIsNewDocument
private

Definition at line 126 of file databasedocument.hxx.

Referenced by onLoadedDocument(), and onSetCurrentController().

◆ m_bLastIsFirstEverController

bool dbaccess::ViewMonitor::m_bLastIsFirstEverController
private

Definition at line 128 of file databasedocument.hxx.

Referenced by onControllerConnected(), onSetCurrentController(), and reset().

◆ m_rEventNotifier

DocumentEventNotifier& dbaccess::ViewMonitor::m_rEventNotifier
private

Definition at line 125 of file databasedocument.hxx.

Referenced by onSetCurrentController().

◆ m_xLastConnectedController

css::uno::Reference< css::frame::XController > dbaccess::ViewMonitor::m_xLastConnectedController
private

Definition at line 130 of file databasedocument.hxx.

Referenced by onControllerConnected(), onSetCurrentController(), and reset().


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