diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2003-11-07 14:22:11 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2003-11-07 14:22:11 +0000 |
commit | 5c419f39d4b3f70b355c0fabeb5465898b1ed46e (patch) | |
tree | 162267bb5a8641eb5d7b8354561cc8ce8fc0bff5 /starmath | |
parent | 7acec1a4291c9611c6caf05a360b84caec4c4e64 (diff) |
INTEGRATION: CWS tlapi1 (1.28.74); FILE MERGED
2003/10/17 11:12:18 tl 1.28.74.3: #i15169# enabled drag scrolling for Command windows scroll bars
2003/10/16 09:11:17 tl 1.28.74.2: #i15169# enable use of scroll mouse for SmEditWindow
2003/10/07 08:29:34 tl 1.28.74.1: #112565# crash when activating embedded formula object fixed
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/edit.cxx | 56 |
1 files changed, 45 insertions, 11 deletions
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index 7ee5504dbe96..79d8e361cf37 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -2,9 +2,9 @@ * * $RCSfile: edit.cxx,v $ * - * $Revision: 1.28 $ + * $Revision: 1.29 $ * - * last change: $Author: vg $ $Date: 2003-04-24 17:29:52 $ + * last change: $Author: hr $ $Date: 2003-11-07 15:22:11 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -202,6 +202,15 @@ SmEditWindow::~SmEditWindow() aCursorMoveTimer.Stop(); aModifyTimer.Stop(); + + // #112565# clean up of classes used for accessibility + // must be done before EditView (and thus EditEngine) is no longer + // available for those classes. + if (pAccessible) + pAccessible->ClearWin(); // make Accessible defunctional + // Note: memory for pAccessible will be freed when the reference + // xAccessible is released. + if (pEditView) { EditEngine *pEditEngine = pEditView->GetEditEngine(); @@ -215,11 +224,6 @@ SmEditWindow::~SmEditWindow() delete pHScrollBar; delete pVScrollBar; delete pScrollBox; - - if (pAccessible) - pAccessible->ClearWin(); // make Accessible defunctional - // Note: memory for pAccessible will be freed when the reference - // xAccessible is released. } @@ -413,6 +417,7 @@ void SmEditWindow::MouseButtonDown(const MouseEvent &rEvt) void SmEditWindow::Command(const CommandEvent& rCEvt) { + BOOL bForwardEvt = TRUE; if (rCEvt.GetCommand() == COMMAND_CONTEXTMENU) { GetParent()->ToTop(); @@ -439,13 +444,40 @@ void SmEditWindow::Command(const CommandEvent& rCEvt) pPopupMenu->Execute( this, aPoint ); delete pPopupMenu; + bForwardEvt = FALSE; + } + else if (rCEvt.GetCommand() == COMMAND_WHEEL) + bForwardEvt = !HandleWheelCommands( rCEvt ); + + if (bForwardEvt) + { + if (pEditView) + pEditView->Command( rCEvt ); + else + Window::Command (rCEvt); } - else if (pEditView) - pEditView->Command( rCEvt ); - else - Window::Command (rCEvt); } + +BOOL SmEditWindow::HandleWheelCommands( const CommandEvent &rCEvt ) +{ + BOOL bCommandHandled = FALSE; // true if the CommandEvent needs not + // to be passed on (because it has fully + // been taken care of). + + const CommandWheelData* pWData = rCEvt.GetWheelData(); + if (pWData) + { + if (COMMAND_WHEEL_ZOOM == pWData->GetMode()) + bCommandHandled = TRUE; // no zooming in Command window + else + bCommandHandled = HandleScrollCommand( rCEvt, pHScrollBar, pVScrollBar); + } + + return bCommandHandled; +} + + IMPL_LINK_INLINE_START( SmEditWindow, MenuSelectHdl, Menu *, pMenu ) { SmViewShell *pViewSh = rCmdBox.GetView(); @@ -546,6 +578,8 @@ void SmEditWindow::CreateEditView() pScrollBox = new ScrollBarBox(this); pVScrollBar->SetScrollHdl(LINK(this, SmEditWindow, ScrollHdl)); pHScrollBar->SetScrollHdl(LINK(this, SmEditWindow, ScrollHdl)); + pVScrollBar->EnableDrag( TRUE ); + pHScrollBar->EnableDrag( TRUE ); pEditView->SetOutputArea(AdjustScrollBars()); |