LibreOffice Module sc (master)  1
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
ScVbaEventListener Class Reference
Inheritance diagram for ScVbaEventListener:
[legend]
Collaboration diagram for ScVbaEventListener:
[legend]

Public Member Functions

 ScVbaEventListener (ScVbaEventsHelper &rVbaEvents, const uno::Reference< frame::XModel > &rxModel, ScDocShell *pDocShell)
 
void startControllerListening (const uno::Reference< frame::XController > &rxController)
 Starts listening to the passed document controller. More...
 
void stopControllerListening (const uno::Reference< frame::XController > &rxController)
 Stops listening to the passed document controller. More...
 
virtual void SAL_CALL windowOpened (const lang::EventObject &rEvent) override
 
virtual void SAL_CALL windowClosing (const lang::EventObject &rEvent) override
 
virtual void SAL_CALL windowClosed (const lang::EventObject &rEvent) override
 
virtual void SAL_CALL windowMinimized (const lang::EventObject &rEvent) override
 
virtual void SAL_CALL windowNormalized (const lang::EventObject &rEvent) override
 
virtual void SAL_CALL windowActivated (const lang::EventObject &rEvent) override
 
virtual void SAL_CALL windowDeactivated (const lang::EventObject &rEvent) override
 
virtual void SAL_CALL windowResized (const awt::WindowEvent &rEvent) override
 
virtual void SAL_CALL windowMoved (const awt::WindowEvent &rEvent) override
 
virtual void SAL_CALL windowShown (const lang::EventObject &rEvent) override
 
virtual void SAL_CALL windowHidden (const lang::EventObject &rEvent) override
 
virtual void SAL_CALL borderWidthsChanged (const uno::Reference< uno::XInterface > &rSource, const frame::BorderWidths &aNewSize) override
 
virtual void SAL_CALL changesOccurred (const util::ChangesEvent &rEvent) override
 
virtual void SAL_CALL disposing (const lang::EventObject &rEvent) override
 

Private Types

typedef ::std::map< VclPtr< vcl::Window >, uno::Reference< frame::XController > > WindowControllerMap
 

Private Member Functions

void startModelListening ()
 Starts listening to the document model. More...
 
void stopModelListening ()
 Stops listening to the document model. More...
 
uno::Reference< frame::XController > getControllerForWindow (vcl::Window *pWindow) const
 Returns the controller for the passed VCL window. More...
 
void processWindowActivateEvent (vcl::Window *pWindow, bool bActivate)
 Calls the Workbook_Window[Activate|Deactivate] event handler. More...
 
void postWindowResizeEvent (vcl::Window *pWindow)
 Posts a Workbook_WindowResize user event. More...
 
 DECL_LINK (processWindowResizeEvent, void *, void)
 Callback link for Application::PostUserEvent(). More...
 

Private Attributes

::osl::Mutex maMutex
 
ScVbaEventsHelpermrVbaEvents
 
uno::Reference< frame::XModel > mxModel
 
ScDocShellmpDocShell
 
WindowControllerMap maControllers
 
std::multiset< VclPtr< vcl::Window > > m_PostedWindows
 Maps VCL top windows to their controllers. More...
 
VclPtr< vcl::WindowmpActiveWindow
 Keeps processWindowResizeEvent windows from being deleted between postWindowResizeEvent and processWindowResizeEvent. More...
 
bool mbWindowResized
 Currently activated window, to prevent multiple (de)activation. More...
 
bool mbBorderChanged
 True = window resize system event processed. More...
 
bool mbDisposed
 True = borders changed system event processed. More...
 

Detailed Description

Definition at line 120 of file vbaeventshelper.cxx.

Member Typedef Documentation

typedef ::std::map< VclPtr<vcl::Window>, uno::Reference< frame::XController > > ScVbaEventListener::WindowControllerMap
private

Definition at line 174 of file vbaeventshelper.cxx.

Constructor & Destructor Documentation

ScVbaEventListener::ScVbaEventListener ( ScVbaEventsHelper rVbaEvents,
const uno::Reference< frame::XModel > &  rxModel,
ScDocShell pDocShell 
)

Member Function Documentation

void SAL_CALL ScVbaEventListener::borderWidthsChanged ( const uno::Reference< uno::XInterface > &  rSource,
const frame::BorderWidths &  aNewSize 
)
overridevirtual
void SAL_CALL ScVbaEventListener::changesOccurred ( const util::ChangesEvent &  rEvent)
overridevirtual
ScVbaEventListener::DECL_LINK ( processWindowResizeEvent  ,
void ,
void   
)
private

Callback link for Application::PostUserEvent().

void SAL_CALL ScVbaEventListener::disposing ( const lang::EventObject &  rEvent)
overridevirtual
uno::Reference< frame::XController > ScVbaEventListener::getControllerForWindow ( vcl::Window pWindow) const
private

Returns the controller for the passed VCL window.

Definition at line 452 of file vbaeventshelper.cxx.

References maControllers.

Referenced by processWindowActivateEvent().

void ScVbaEventListener::postWindowResizeEvent ( vcl::Window pWindow)
private

Posts a Workbook_WindowResize user event.

Definition at line 469 of file vbaeventshelper.cxx.

References LINK, m_PostedWindows, maControllers, mbBorderChanged, mbWindowResized, and Application::PostUserEvent().

Referenced by borderWidthsChanged(), and windowResized().

void ScVbaEventListener::processWindowActivateEvent ( vcl::Window pWindow,
bool  bActivate 
)
private

Calls the Workbook_Window[Activate|Deactivate] event handler.

Definition at line 458 of file vbaeventshelper.cxx.

References getControllerForWindow(), mrVbaEvents, VbaEventsHelperBase::processVbaEventNoThrow(), and xController.

Referenced by windowActivated(), and windowDeactivated().

void ScVbaEventListener::startControllerListening ( const uno::Reference< frame::XController > &  rxController)

Starts listening to the passed document controller.

Definition at line 211 of file vbaeventshelper.cxx.

References VCLUnoHelper::GetWindow(), maControllers, and maMutex.

Referenced by ScVbaEventListener().

void ScVbaEventListener::startModelListening ( )
private

Starts listening to the document model.

Definition at line 428 of file vbaeventshelper.cxx.

References mxModel.

Referenced by ScVbaEventListener().

void ScVbaEventListener::stopControllerListening ( const uno::Reference< frame::XController > &  rxController)

Stops listening to the passed document controller.

Definition at line 233 of file vbaeventshelper.cxx.

References VCLUnoHelper::GetWindow(), maControllers, maMutex, and mpActiveWindow.

Referenced by disposing().

void ScVbaEventListener::stopModelListening ( )
private

Stops listening to the document model.

Definition at line 440 of file vbaeventshelper.cxx.

References mxModel.

Referenced by disposing().

void SAL_CALL ScVbaEventListener::windowActivated ( const lang::EventObject &  rEvent)
overridevirtual
void SAL_CALL ScVbaEventListener::windowClosed ( const lang::EventObject &  rEvent)
overridevirtual

Definition at line 265 of file vbaeventshelper.cxx.

void SAL_CALL ScVbaEventListener::windowClosing ( const lang::EventObject &  rEvent)
overridevirtual

Definition at line 261 of file vbaeventshelper.cxx.

void SAL_CALL ScVbaEventListener::windowDeactivated ( const lang::EventObject &  rEvent)
overridevirtual
void SAL_CALL ScVbaEventListener::windowHidden ( const lang::EventObject &  rEvent)
overridevirtual

Definition at line 334 of file vbaeventshelper.cxx.

void SAL_CALL ScVbaEventListener::windowMinimized ( const lang::EventObject &  rEvent)
overridevirtual

Definition at line 269 of file vbaeventshelper.cxx.

void SAL_CALL ScVbaEventListener::windowMoved ( const awt::WindowEvent &  rEvent)
overridevirtual

Definition at line 326 of file vbaeventshelper.cxx.

void SAL_CALL ScVbaEventListener::windowNormalized ( const lang::EventObject &  rEvent)
overridevirtual

Definition at line 273 of file vbaeventshelper.cxx.

void SAL_CALL ScVbaEventListener::windowOpened ( const lang::EventObject &  rEvent)
overridevirtual

Definition at line 257 of file vbaeventshelper.cxx.

void SAL_CALL ScVbaEventListener::windowResized ( const awt::WindowEvent &  rEvent)
overridevirtual
void SAL_CALL ScVbaEventListener::windowShown ( const lang::EventObject &  rEvent)
overridevirtual

Definition at line 330 of file vbaeventshelper.cxx.

Member Data Documentation

std::multiset< VclPtr<vcl::Window> > ScVbaEventListener::m_PostedWindows
private

Maps VCL top windows to their controllers.

Definition at line 181 of file vbaeventshelper.cxx.

Referenced by postWindowResizeEvent().

WindowControllerMap ScVbaEventListener::maControllers
private
::osl::Mutex ScVbaEventListener::maMutex
private
bool ScVbaEventListener::mbBorderChanged
private

True = window resize system event processed.

Definition at line 184 of file vbaeventshelper.cxx.

Referenced by borderWidthsChanged(), postWindowResizeEvent(), and windowResized().

bool ScVbaEventListener::mbDisposed
private

True = borders changed system event processed.

Definition at line 185 of file vbaeventshelper.cxx.

Referenced by borderWidthsChanged(), changesOccurred(), disposing(), windowActivated(), windowDeactivated(), and windowResized().

bool ScVbaEventListener::mbWindowResized
private

Currently activated window, to prevent multiple (de)activation.

Definition at line 183 of file vbaeventshelper.cxx.

Referenced by borderWidthsChanged(), postWindowResizeEvent(), and windowResized().

VclPtr<vcl::Window> ScVbaEventListener::mpActiveWindow
private

Keeps processWindowResizeEvent windows from being deleted between postWindowResizeEvent and processWindowResizeEvent.

Definition at line 182 of file vbaeventshelper.cxx.

Referenced by stopControllerListening(), windowActivated(), and windowDeactivated().

ScDocShell* ScVbaEventListener::mpDocShell
private

Definition at line 179 of file vbaeventshelper.cxx.

Referenced by changesOccurred().

ScVbaEventsHelper& ScVbaEventListener::mrVbaEvents
private

Definition at line 177 of file vbaeventshelper.cxx.

Referenced by changesOccurred(), and processWindowActivateEvent().

uno::Reference< frame::XModel > ScVbaEventListener::mxModel
private

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