LibreOffice Module sc (master) 1
|
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 |
ScVbaEventsHelper & | mrVbaEvents |
uno::Reference< frame::XModel > | mxModel |
ScDocShell * | mpDocShell |
WindowControllerMap | maControllers |
std::multiset< VclPtr< vcl::Window > > | m_PostedWindows |
Maps VCL top windows to their controllers. More... | |
VclPtr< vcl::Window > | mpActiveWindow |
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... | |
Definition at line 120 of file vbaeventshelper.cxx.
|
private |
Definition at line 174 of file vbaeventshelper.cxx.
ScVbaEventListener::ScVbaEventListener | ( | ScVbaEventsHelper & | rVbaEvents, |
const uno::Reference< frame::XModel > & | rxModel, | ||
ScDocShell * | pDocShell | ||
) |
Definition at line 188 of file vbaeventshelper.cxx.
References mxModel, mxModel, startControllerListening(), startModelListening(), and xController.
|
overridevirtual |
Definition at line 338 of file vbaeventshelper.cxx.
References VCLUnoHelper::GetWindow(), maMutex, mbBorderChanged, mbDisposed, mbWindowResized, postWindowResizeEvent(), and xController.
|
overridevirtual |
Definition at line 351 of file vbaeventshelper.cxx.
References ScRangeList::empty(), ScUnoConversion::FillScRange(), maMutex, mbDisposed, mpDocShell, mrVbaEvents, nCount, VbaEventsHelperBase::processVbaEventNoThrow(), and ScRangeList::push_back().
|
private |
Callback link for Application::PostUserEvent().
|
overridevirtual |
Definition at line 403 of file vbaeventshelper.cxx.
References maMutex, mbDisposed, mxModel, stopControllerListening(), stopModelListening(), xController, and xModel.
|
private |
Returns the controller for the passed VCL window.
Definition at line 450 of file vbaeventshelper.cxx.
References maControllers.
Referenced by processWindowActivateEvent().
|
private |
Posts a Workbook_WindowResize user event.
Definition at line 466 of file vbaeventshelper.cxx.
References LINK, m_PostedWindows, maControllers, mbBorderChanged, mbWindowResized, and Application::PostUserEvent().
Referenced by borderWidthsChanged(), and windowResized().
|
private |
Calls the Workbook_Window[Activate|Deactivate] event handler.
Definition at line 456 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().
|
private |
Starts listening to the document model.
Definition at line 426 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().
|
private |
Stops listening to the document model.
Definition at line 438 of file vbaeventshelper.cxx.
References mxModel.
Referenced by disposing().
|
overridevirtual |
Definition at line 277 of file vbaeventshelper.cxx.
References VCLUnoHelper::GetWindow(), maMutex, mbDisposed, mpActiveWindow, and processWindowActivateEvent().
|
overridevirtual |
Definition at line 265 of file vbaeventshelper.cxx.
|
overridevirtual |
Definition at line 261 of file vbaeventshelper.cxx.
|
overridevirtual |
Definition at line 298 of file vbaeventshelper.cxx.
References VCLUnoHelper::GetWindow(), maMutex, mbDisposed, mpActiveWindow, and processWindowActivateEvent().
|
overridevirtual |
Definition at line 334 of file vbaeventshelper.cxx.
|
overridevirtual |
Definition at line 269 of file vbaeventshelper.cxx.
|
overridevirtual |
Definition at line 326 of file vbaeventshelper.cxx.
|
overridevirtual |
Definition at line 273 of file vbaeventshelper.cxx.
|
overridevirtual |
Definition at line 257 of file vbaeventshelper.cxx.
|
overridevirtual |
Definition at line 314 of file vbaeventshelper.cxx.
References VCLUnoHelper::GetWindow(), maMutex, mbBorderChanged, mbDisposed, mbWindowResized, and postWindowResizeEvent().
|
overridevirtual |
Definition at line 330 of file vbaeventshelper.cxx.
|
private |
Maps VCL top windows to their controllers.
Definition at line 181 of file vbaeventshelper.cxx.
Referenced by postWindowResizeEvent().
|
private |
Definition at line 180 of file vbaeventshelper.cxx.
Referenced by getControllerForWindow(), postWindowResizeEvent(), startControllerListening(), and stopControllerListening().
|
private |
Definition at line 176 of file vbaeventshelper.cxx.
Referenced by borderWidthsChanged(), changesOccurred(), disposing(), startControllerListening(), stopControllerListening(), windowActivated(), windowDeactivated(), and windowResized().
|
private |
True = window resize system event processed.
Definition at line 184 of file vbaeventshelper.cxx.
Referenced by borderWidthsChanged(), postWindowResizeEvent(), and windowResized().
|
private |
True = borders changed system event processed.
Definition at line 185 of file vbaeventshelper.cxx.
Referenced by borderWidthsChanged(), changesOccurred(), disposing(), windowActivated(), windowDeactivated(), and windowResized().
|
private |
Currently activated window, to prevent multiple (de)activation.
Definition at line 183 of file vbaeventshelper.cxx.
Referenced by borderWidthsChanged(), postWindowResizeEvent(), and windowResized().
|
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().
|
private |
Definition at line 179 of file vbaeventshelper.cxx.
Referenced by changesOccurred().
|
private |
Definition at line 177 of file vbaeventshelper.cxx.
Referenced by changesOccurred(), and processWindowActivateEvent().
|
private |
Definition at line 178 of file vbaeventshelper.cxx.
Referenced by disposing(), ScVbaEventListener(), startModelListening(), and stopModelListening().