basctl/source/basicide/basicbox.cxx | 12 - basctl/source/basicide/baside2b.cxx | 2 basctl/source/basicide/bastypes.cxx | 2 chart2/source/controller/main/ElementSelector.cxx | 4 cui/source/customize/macropg.cxx | 2 cui/source/dialogs/SpellDialog.cxx | 6 cui/source/dialogs/colorpicker.cxx | 2 cui/source/dialogs/hangulhanjadlg.cxx | 2 cui/source/options/connpooloptions.cxx | 2 cui/source/options/optcolor.cxx | 2 cui/source/options/optpath.cxx | 2 cui/source/options/treeopt.cxx | 2 cui/source/tabpages/autocdlg.cxx | 2 cui/source/tabpages/numfmt.cxx | 2 dbaccess/source/ui/app/AppDetailPageHelper.cxx | 2 dbaccess/source/ui/app/AppView.cxx | 4 dbaccess/source/ui/browser/brwview.cxx | 2 dbaccess/source/ui/browser/dataview.cxx | 8 - dbaccess/source/ui/control/RelationControl.cxx | 4 dbaccess/source/ui/control/TableGrantCtrl.cxx | 4 dbaccess/source/ui/dlg/ConnectionHelper.cxx | 4 dbaccess/source/ui/misc/WTypeSelect.cxx | 4 dbaccess/source/ui/querydesign/JoinTableView.cxx | 6 dbaccess/source/ui/querydesign/QueryDesignView.cxx | 2 dbaccess/source/ui/querydesign/TableWindow.cxx | 4 dbaccess/source/ui/querydesign/TableWindowListBox.cxx | 2 dbaccess/source/ui/querydesign/limitboxcontroller.cxx | 4 dbaccess/source/ui/querydesign/querycontainerwindow.cxx | 2 dbaccess/source/ui/relationdesign/RelationDesignView.cxx | 2 dbaccess/source/ui/tabledesign/TEditControl.cxx | 2 dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx | 2 dbaccess/source/ui/tabledesign/TableDesignView.cxx | 2 dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx | 2 desktop/source/deployment/gui/dp_gui_dialog2.cxx | 4 desktop/source/deployment/gui/dp_gui_extlistbox.cxx | 4 extensions/source/bibliography/bibcont.cxx | 2 extensions/source/bibliography/toolbar.cxx | 4 extensions/source/propctrlr/browserlistbox.cxx | 4 extensions/source/propctrlr/browserview.cxx | 2 extensions/source/propctrlr/commoncontrol.cxx | 2 extensions/source/propctrlr/standardcontrol.cxx | 6 extensions/source/propctrlr/standardcontrol.hxx | 2 extensions/source/propctrlr/usercontrol.cxx | 2 filter/source/xsltdialog/xmlfiltersettingsdialog.cxx | 4 forms/source/richtext/richtextvclcontrol.cxx | 4 formula/source/ui/dlg/formula.cxx | 4 formula/source/ui/dlg/funcpage.cxx | 4 formula/source/ui/dlg/funcutl.cxx | 6 fpicker/source/office/iodlg.cxx | 4 framework/source/uielement/comboboxtoolbarcontroller.cxx | 6 framework/source/uielement/edittoolbarcontroller.cxx | 2 framework/source/uielement/spinfieldtoolbarcontroller.cxx | 2 include/vcl/event.hxx | 51 ++++--- reportdesign/source/ui/dlg/AddField.cxx | 2 reportdesign/source/ui/dlg/CondFormat.cxx | 4 reportdesign/source/ui/report/DesignView.cxx | 2 sc/source/ui/app/inputwin.cxx | 6 sc/source/ui/cctrl/checklistmenu.cxx | 2 sc/source/ui/condformat/condformatdlgentry.cxx | 2 sc/source/ui/miscdlgs/acredlin.cxx | 2 sc/source/ui/miscdlgs/anyrefdg.cxx | 4 sc/source/ui/navipi/navipi.cxx | 8 - sc/source/ui/navipi/scenwnd.cxx | 4 sc/source/ui/pagedlg/tphfedit.cxx | 4 sc/source/ui/view/gridwin.cxx | 10 - sd/source/ui/animations/CustomAnimationDialog.cxx | 4 sd/source/ui/dlg/RemoteDialogClientBox.cxx | 4 sd/source/ui/dlg/docprev.cxx | 2 sd/source/ui/view/viewshel.cxx | 2 sfx2/source/appl/newhelp.cxx | 28 ++-- sfx2/source/control/thumbnailviewitem.cxx | 4 sfx2/source/dialog/backingwindow.cxx | 4 sfx2/source/dialog/basedlgs.cxx | 12 - sfx2/source/dialog/dockwin.cxx | 6 sfx2/source/dialog/partwnd.cxx | 2 sfx2/source/dialog/templdlg.cxx | 4 sfx2/source/sidebar/Deck.cxx | 2 sfx2/source/sidebar/SidebarToolBox.cxx | 2 sfx2/source/view/frame2.cxx | 16 +- sfx2/source/view/printer.cxx | 2 sfx2/source/view/userinputinterception.cxx | 14 +- svtools/source/brwbox/ebbcontrols.cxx | 10 - svtools/source/brwbox/editbrowsebox.cxx | 6 svtools/source/contnr/imivctl1.cxx | 2 svtools/source/contnr/simptabl.cxx | 2 svtools/source/control/calendar.cxx | 2 svtools/source/control/fileurlbox.cxx | 6 svtools/source/control/fmtfield.cxx | 8 - svtools/source/control/inettbc.cxx | 6 svtools/source/control/roadmap.cxx | 2 svtools/source/control/tabbar.cxx | 4 svtools/source/control/urlcontrol.cxx | 4 svtools/source/dialogs/addresstemplate.cxx | 2 svtools/source/dialogs/prnsetup.cxx | 2 svtools/source/dialogs/wizdlg.cxx | 2 svtools/source/edit/editsyntaxhighlighter.cxx | 2 svtools/source/hatchwindow/ipwin.cxx | 4 svtools/source/table/tabledatawindow.cxx | 2 svtools/source/toolpanel/toolpaneldeck.cxx | 2 svx/source/dialog/rubydialog.cxx | 2 svx/source/fmcomp/gridctrl.cxx | 2 svx/source/form/datanavi.cxx | 2 svx/source/form/tabwin.cxx | 2 svx/source/gallery2/galbrws1.cxx | 4 svx/source/sidebar/tools/PopupContainer.cxx | 2 svx/source/tbxctrls/colrctrl.cxx | 2 svx/source/tbxctrls/grafctrl.cxx | 6 svx/source/tbxctrls/itemwin.cxx | 32 ++-- svx/source/tbxctrls/tbcontrl.cxx | 18 +- svx/source/tbxctrls/tbunocontroller.cxx | 4 svx/source/tbxctrls/tbunosearchcontrollers.cxx | 4 sw/source/ui/dbui/createaddresslistdialog.cxx | 2 sw/source/ui/dbui/mmaddressblockpage.cxx | 6 sw/source/ui/fldui/fldvar.cxx | 4 sw/source/ui/index/cnttab.cxx | 2 sw/source/ui/misc/bookmark.cxx | 2 sw/source/uibase/cctrl/actctrl.cxx | 2 sw/source/uibase/ribbar/workctrl.cxx | 4 vcl/inc/window.h | 3 vcl/source/control/button.cxx | 6 vcl/source/control/combobox.cxx | 8 - vcl/source/control/ctrl.cxx | 4 vcl/source/control/field.cxx | 36 ++--- vcl/source/control/field2.cxx | 36 ++--- vcl/source/control/ilstbox.cxx | 6 vcl/source/control/longcurr.cxx | 12 - vcl/source/control/lstbox.cxx | 6 vcl/source/control/scrbar.cxx | 2 vcl/source/control/spinbtn.cxx | 2 vcl/source/control/spinfld.cxx | 6 vcl/source/control/tabctrl.cxx | 4 vcl/source/edit/vclmedit.cxx | 4 vcl/source/window/dialog.cxx | 8 - vcl/source/window/dlgctrl.cxx | 8 - vcl/source/window/dockwin.cxx | 4 vcl/source/window/event.cxx | 32 ++-- vcl/source/window/floatwin.cxx | 2 vcl/source/window/layout.cxx | 2 vcl/source/window/mouse.cxx | 12 - vcl/source/window/scrwnd.cxx | 2 vcl/source/window/splitwin.cxx | 2 vcl/source/window/syswin.cxx | 4 vcl/source/window/toolbox.cxx | 6 vcl/source/window/window.cxx | 14 +- vcl/source/window/winproc.cxx | 92 +++++++------- 145 files changed, 440 insertions(+), 436 deletions(-)
New commits: commit ec8687e1ef75386fdfc113ebfeb7bea517334ed0 Author: Tobias Madl <tobias.madl....@gmail.com> Date: Wed Nov 26 14:53:25 2014 +0000 fdo#84938: replace EVENT_ constants with enum Change-Id: I8275832d8dae43b374bddd48520d11592e9a6a1f diff --git a/basctl/source/basicide/basicbox.cxx b/basctl/source/basicide/basicbox.cxx index 79a60e8..9735c59 100644 --- a/basctl/source/basicide/basicbox.cxx +++ b/basctl/source/basicide/basicbox.cxx @@ -257,7 +257,7 @@ void LibBox::InsertEntries( const ScriptDocument& rDocument, LibraryLocation eLo bool LibBox::PreNotify( NotifyEvent& rNEvt ) { bool nDone = false; - if( rNEvt.GetType() == EVENT_KEYINPUT ) + if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { KeyEvent aKeyEvt = *rNEvt.GetKeyEvent(); sal_uInt16 nKeyCode = aKeyEvt.GetKeyCode().GetCode(); @@ -279,7 +279,7 @@ bool LibBox::PreNotify( NotifyEvent& rNEvt ) break; } } - else if( rNEvt.GetType() == EVENT_GETFOCUS ) + else if( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS ) { if ( bFillBox ) { @@ -287,7 +287,7 @@ bool LibBox::PreNotify( NotifyEvent& rNEvt ) bFillBox = false; } } - else if( rNEvt.GetType() == EVENT_LOSEFOCUS ) + else if( rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS ) { if ( !HasChildPathFocus(true) ) { @@ -475,7 +475,7 @@ void LanguageBox::Select() bool LanguageBox::PreNotify( NotifyEvent& rNEvt ) { bool nDone = false; - if( rNEvt.GetType() == EVENT_KEYINPUT ) + if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { sal_uInt16 nKeyCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode(); switch( nKeyCode ) @@ -495,10 +495,10 @@ bool LanguageBox::PreNotify( NotifyEvent& rNEvt ) break; } } - else if( rNEvt.GetType() == EVENT_GETFOCUS ) + else if( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS ) { } - else if( rNEvt.GetType() == EVENT_LOSEFOCUS ) + else if( rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS ) { } diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 3d68619..e05be73 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -2776,7 +2776,7 @@ void CodeCompleteListBox::KeyInput( const KeyEvent& rKeyEvt ) InsertSelectedEntry(); break; case KEY_UP: case KEY_DOWN: - NotifyEvent nEvt( EVENT_KEYINPUT, NULL, &rKeyEvt ); + NotifyEvent nEvt( MouseNotifyEvent::KEYINPUT, NULL, &rKeyEvt ); PreNotify(nEvt); break; } diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index 169902a..d0b9fe6 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -112,7 +112,7 @@ bool BaseWindow::Notify( NotifyEvent& rNEvt ) { bool nDone = false; - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { KeyEvent aKEvt = *rNEvt.GetKeyEvent(); vcl::KeyCode aCode = aKEvt.GetKeyCode(); diff --git a/chart2/source/controller/main/ElementSelector.cxx b/chart2/source/controller/main/ElementSelector.cxx index df2c602..31073b1 100644 --- a/chart2/source/controller/main/ElementSelector.cxx +++ b/chart2/source/controller/main/ElementSelector.cxx @@ -207,7 +207,7 @@ bool SelectorListBox::Notify( NotifyEvent& rNEvt ) { bool nHandled = false; - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { sal_uInt16 nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode(); @@ -230,7 +230,7 @@ bool SelectorListBox::Notify( NotifyEvent& rNEvt ) break; } } - else if ( EVENT_LOSEFOCUS == rNEvt.GetType() ) + else if ( MouseNotifyEvent::LOSEFOCUS == rNEvt.GetType() ) { if ( !HasFocus() ) SelectEntryPos( GetSavedValue() ); diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx index c2d4451..ca978e5 100644 --- a/cui/source/customize/macropg.cxx +++ b/cui/source/customize/macropg.cxx @@ -120,7 +120,7 @@ bool MacroEventListBox::Notify( NotifyEvent& rNEvt ) { bool nRet = Control::Notify( rNEvt ); - if( rNEvt.GetType() == EVENT_GETFOCUS ) + if( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS ) { if ( rNEvt.GetWindow() != &maListBox ) maListBox.GrabFocus(); diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index cb064d6..2ac388fc 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -988,12 +988,12 @@ bool SpellDialog::Notify( NotifyEvent& rNEvt ) */ if( IsVisible() && !bFocusLocked ) { - if( rNEvt.GetType() == EVENT_GETFOCUS ) + if( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS ) { //notify the child window of the focus change rParent.GetFocus(); } - else if( rNEvt.GetType() == EVENT_LOSEFOCUS ) + else if( rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS ) { //notify the child window of the focus change rParent.LoseFocus(); @@ -1274,7 +1274,7 @@ bool SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt ) { bool bChange = false; const TextCharAttrib* pErrorAttrib = 0; - if(rNEvt.GetType() == EVENT_KEYINPUT) + if(rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) { const KeyEvent& rKeyEvt = *rNEvt.GetKeyEvent(); bChange = TextEngine::DoesKeyChangeText( rKeyEvt ); diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx index f52e724..f5425f3 100644 --- a/cui/source/dialogs/colorpicker.cxx +++ b/cui/source/dialogs/colorpicker.cxx @@ -188,7 +188,7 @@ sal_Int32 HexColorControl::GetColor() bool HexColorControl::PreNotify( NotifyEvent& rNEvt ) { - if ( (rNEvt.GetType() == EVENT_KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) + if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) { if ( ImplProcessKeyInput( *rNEvt.GetKeyEvent() ) ) return true; diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index 1391bd5..7e02bee 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -1365,7 +1365,7 @@ namespace svx bool SuggestionEdit::PreNotify( NotifyEvent& rNEvt ) { bool nHandled = false; - if( rNEvt.GetType() == EVENT_KEYINPUT ) + if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); const vcl::KeyCode& rKeyCode = pKEvt->GetKeyCode(); diff --git a/cui/source/options/connpooloptions.cxx b/cui/source/options/connpooloptions.cxx index 7743d82..3d43269 100644 --- a/cui/source/options/connpooloptions.cxx +++ b/cui/source/options/connpooloptions.cxx @@ -359,7 +359,7 @@ namespace offapp bool ConnectionPoolOptionsPage::Notify( NotifyEvent& _rNEvt ) { - if (EVENT_LOSEFOCUS == _rNEvt.GetType()) + if (MouseNotifyEvent::LOSEFOCUS == _rNEvt.GetType()) if (m_pTimeout->IsWindowOrChild(_rNEvt.GetWindow())) commitTimeoutField(); diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index 67d0890..778b429 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -935,7 +935,7 @@ IMPL_LINK(ColorConfigCtrl_Impl, ScrollHdl, ScrollBar*, pScrollBar) bool ColorConfigCtrl_Impl::PreNotify( NotifyEvent& rNEvt ) { - if(rNEvt.GetType() == EVENT_COMMAND) + if(rNEvt.GetType() == MouseNotifyEvent::COMMAND) { const CommandEvent* pCEvt = rNEvt.GetCommandEvent(); sal_uInt16 nCmd = pCEvt->GetCommand(); diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx index d231aa1..c16535a 100644 --- a/cui/source/options/optpath.cxx +++ b/cui/source/options/optpath.cxx @@ -167,7 +167,7 @@ bool SvxControlFocusHelper::Notify( NotifyEvent& rNEvt ) { bool nRet = Control::Notify( rNEvt ); - if ( m_pFocusCtrl && rNEvt.GetWindow() != m_pFocusCtrl && rNEvt.GetType() == EVENT_GETFOCUS ) + if ( m_pFocusCtrl && rNEvt.GetWindow() != m_pFocusCtrl && rNEvt.GetType() == MouseNotifyEvent::GETFOCUS ) m_pFocusCtrl->GrabFocus(); return nRet; } diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index fd7810c..47dc0ac 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -885,7 +885,7 @@ void OfaTreeOptionsDialog::ActivateLastSelection() bool OfaTreeOptionsDialog::Notify( NotifyEvent& rNEvt ) { - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); const vcl::KeyCode aKeyCode = pKEvt->GetKeyCode(); diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 5cd2da2..8ad8595 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -2323,7 +2323,7 @@ bool OfaAutoCompleteTabPage::AutoCompleteMultiListBox::PreNotify( { bool nHandled = MultiListBox::PreNotify( rNEvt ); - if( !nHandled && EVENT_KEYUP == rNEvt.GetType() ) + if( !nHandled && MouseNotifyEvent::KEYUP == rNEvt.GetType() ) { const vcl::KeyCode& rKeyCode = rNEvt.GetKeyEvent()->GetKeyCode(); switch( rKeyCode.GetModifier() | rKeyCode.GetCode() ) diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 9d86822..ce26ca8 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -1660,7 +1660,7 @@ void SvxNumberFormatTabPage::ChangePreviewText( sal_uInt16 nPos ) bool SvxNumberFormatTabPage::PreNotify( NotifyEvent& rNEvt ) { - if(rNEvt.GetType()==EVENT_LOSEFOCUS) + if(rNEvt.GetType()==MouseNotifyEvent::LOSEFOCUS) { if ( rNEvt.GetWindow() == dynamic_cast< vcl::Window* >( m_pEdComment ) && !m_pEdComment->IsVisible() ) { diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx index 184fb48..559f9be 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx @@ -142,7 +142,7 @@ namespace bool OTablePreviewWindow::Notify( NotifyEvent& rNEvt ) { bool nRet = Window::Notify( rNEvt ); - if ( rNEvt.GetType() == EVENT_INPUTENABLE && IsInputEnabled() ) + if ( rNEvt.GetType() == MouseNotifyEvent::INPUTENABLE && IsInputEnabled() ) PostUserEvent( LINK( this, OTablePreviewWindow, OnDisableInput) ); return nRet; } diff --git a/dbaccess/source/ui/app/AppView.cxx b/dbaccess/source/ui/app/AppView.cxx index 3cc43f8..5737122 100644 --- a/dbaccess/source/ui/app/AppView.cxx +++ b/dbaccess/source/ui/app/AppView.cxx @@ -260,7 +260,7 @@ bool OApplicationView::PreNotify( NotifyEvent& rNEvt ) { switch(rNEvt.GetType()) { - case EVENT_GETFOCUS: + case MouseNotifyEvent::GETFOCUS: if( m_pWin && getPanel() && getPanel()->HasChildPathFocus() ) m_eChildFocus = PANELSWAP; else if ( m_pWin && getDetailView() && getDetailView()->HasChildPathFocus() ) @@ -268,7 +268,7 @@ bool OApplicationView::PreNotify( NotifyEvent& rNEvt ) else m_eChildFocus = NONE; break; - case EVENT_KEYINPUT: + case MouseNotifyEvent::KEYINPUT: { const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent(); // give the pane the chance to intercept mnemonic accelerators diff --git a/dbaccess/source/ui/browser/brwview.cxx b/dbaccess/source/ui/browser/brwview.cxx index 9292887..f41289e 100644 --- a/dbaccess/source/ui/browser/brwview.cxx +++ b/dbaccess/source/ui/browser/brwview.cxx @@ -305,7 +305,7 @@ void UnoDataBrowserView::_disposing( const ::com::sun::star::lang::EventObject& bool UnoDataBrowserView::PreNotify( NotifyEvent& rNEvt ) { bool nDone = false; - if(rNEvt.GetType() == EVENT_KEYINPUT) + if(rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) { bool bGrabAllowed = isGrabVclControlFocusAllowed(this); if ( bGrabAllowed ) diff --git a/dbaccess/source/ui/browser/dataview.cxx b/dbaccess/source/ui/browser/dataview.cxx index b850906..46e87e7 100644 --- a/dbaccess/source/ui/browser/dataview.cxx +++ b/dbaccess/source/ui/browser/dataview.cxx @@ -122,7 +122,7 @@ namespace dbaui bool bHandled = false; switch ( _rNEvt.GetType() ) { - case EVENT_KEYINPUT: + case MouseNotifyEvent::KEYINPUT: { const KeyEvent* pKeyEvent = _rNEvt.GetKeyEvent(); const vcl::KeyCode& aKeyCode = pKeyEvent->GetKeyCode(); @@ -131,9 +131,9 @@ namespace dbaui return true; } // NO break - case EVENT_KEYUP: - case EVENT_MOUSEBUTTONDOWN: - case EVENT_MOUSEBUTTONUP: + case MouseNotifyEvent::KEYUP: + case MouseNotifyEvent::MOUSEBUTTONDOWN: + case MouseNotifyEvent::MOUSEBUTTONUP: bHandled = m_rController.interceptUserInput( _rNEvt ); break; } diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx index 6fd60f5..9c4393e 100644 --- a/dbaccess/source/ui/control/RelationControl.cxx +++ b/dbaccess/source/ui/control/RelationControl.cxx @@ -197,9 +197,9 @@ namespace dbaui bool ORelationControl::PreNotify(NotifyEvent& rNEvt) { - if (rNEvt.GetType() == EVENT_LOSEFOCUS && !HasChildPathFocus() ) + if (rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS && !HasChildPathFocus() ) PostUserEvent(LINK(this, ORelationControl, AsynchDeactivate)); - else if (rNEvt.GetType() == EVENT_GETFOCUS) + else if (rNEvt.GetType() == MouseNotifyEvent::GETFOCUS) PostUserEvent(LINK(this, ORelationControl, AsynchActivate)); return EditBrowseBox::PreNotify(rNEvt); diff --git a/dbaccess/source/ui/control/TableGrantCtrl.cxx b/dbaccess/source/ui/control/TableGrantCtrl.cxx index ced37d6..2fab5c9 100644 --- a/dbaccess/source/ui/control/TableGrantCtrl.cxx +++ b/dbaccess/source/ui/control/TableGrantCtrl.cxx @@ -145,14 +145,14 @@ void OTableGrantControl::Resize() bool OTableGrantControl::PreNotify(NotifyEvent& rNEvt) { - if (rNEvt.GetType() == EVENT_LOSEFOCUS) + if (rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS) if (!HasChildPathFocus()) { if (m_nDeactivateEvent) Application::RemoveUserEvent(m_nDeactivateEvent); m_nDeactivateEvent = Application::PostUserEvent(LINK(this, OTableGrantControl, AsynchDeactivate)); } - if (rNEvt.GetType() == EVENT_GETFOCUS) + if (rNEvt.GetType() == MouseNotifyEvent::GETFOCUS) { if (m_nDeactivateEvent) Application::RemoveUserEvent(m_nDeactivateEvent); diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index 0c404dc..4e61980 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -560,14 +560,14 @@ namespace dbaui { switch (_rNEvt.GetType()) { - case EVENT_GETFOCUS: + case MouseNotifyEvent::GETFOCUS: if (m_pConnectionURL->IsWindowOrChild(_rNEvt.GetWindow()) && m_bUserGrabFocus) { // a descendant of the URL edit field got the focus m_pConnectionURL->SaveValueNoPrefix(); } break; - case EVENT_LOSEFOCUS: + case MouseNotifyEvent::LOSEFOCUS: if (m_pConnectionURL->IsWindowOrChild(_rNEvt.GetWindow()) && m_bUserGrabFocus) { // a descendant of the URL edit field lost the focus if (!commitURL()) diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx index 72e97da..1adeadf 100644 --- a/dbaccess/source/ui/misc/WTypeSelect.cxx +++ b/dbaccess/source/ui/misc/WTypeSelect.cxx @@ -383,14 +383,14 @@ bool OWizTypeSelectList::PreNotify( NotifyEvent& rEvt ) bool nDone = false; switch( rEvt.GetType() ) { - case EVENT_MOUSEBUTTONDOWN: + case MouseNotifyEvent::MOUSEBUTTONDOWN: { const MouseEvent* pMEvt = rEvt.GetMouseEvent(); if(pMEvt->IsRight() && !pMEvt->GetModifier()) nDone = true; } break; - case EVENT_COMMAND: + case MouseNotifyEvent::COMMAND: { if(!IsPrimaryKeyAllowed()) break; diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index 29b64ef..6147881 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -1236,7 +1236,7 @@ bool OJoinTableView::PreNotify(NotifyEvent& rNEvt) bool bHandled = false; switch (rNEvt.GetType()) { - case EVENT_COMMAND: + case MouseNotifyEvent::COMMAND: { const CommandEvent* pCommand = rNEvt.GetCommandEvent(); if (pCommand->GetCommand() == COMMAND_WHEEL) @@ -1253,7 +1253,7 @@ bool OJoinTableView::PreNotify(NotifyEvent& rNEvt) } } break; - case EVENT_KEYINPUT: + case MouseNotifyEvent::KEYINPUT: { if (m_aTableMap.empty()) // no tab wins -> no conns -> no traveling @@ -1386,7 +1386,7 @@ bool OJoinTableView::PreNotify(NotifyEvent& rNEvt) } } break; - case EVENT_GETFOCUS: + case MouseNotifyEvent::GETFOCUS: { if (m_aTableMap.empty()) // no tab wins -> no conns -> no focus change diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index e21cfe7..946f03c 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -2772,7 +2772,7 @@ bool OQueryDesignView::PreNotify(NotifyEvent& rNEvt) { switch (rNEvt.GetType()) { - case EVENT_GETFOCUS: + case MouseNotifyEvent::GETFOCUS: #if OSL_DEBUG_LEVEL > 0 { vcl::Window* pFocus = Application::GetFocusWindow(); diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx index 418d0d1..08155e9 100644 --- a/dbaccess/source/ui/querydesign/TableWindow.cxx +++ b/dbaccess/source/ui/querydesign/TableWindow.cxx @@ -614,7 +614,7 @@ bool OTableWindow::PreNotify(NotifyEvent& rNEvt) bool bHandled = false; switch (rNEvt.GetType()) { - case EVENT_KEYINPUT: + case MouseNotifyEvent::KEYINPUT: { if ( getDesignView()->getController().isReadOnly() ) break; @@ -724,7 +724,7 @@ bool OTableWindow::PreNotify(NotifyEvent& rNEvt) } } break; - case EVENT_KEYUP: + case MouseNotifyEvent::KEYUP: { const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent(); const vcl::KeyCode& rCode = pKeyEvent->GetKeyCode(); diff --git a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx index 636dc9a..35eac4c 100644 --- a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx @@ -132,7 +132,7 @@ bool OTableWindowListBox::PreNotify(NotifyEvent& rNEvt) bool bHandled = false; switch (rNEvt.GetType()) { - case EVENT_KEYINPUT: + case MouseNotifyEvent::KEYINPUT: { const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent(); const vcl::KeyCode& rCode = pKeyEvent->GetKeyCode(); diff --git a/dbaccess/source/ui/querydesign/limitboxcontroller.cxx b/dbaccess/source/ui/querydesign/limitboxcontroller.cxx index dd3e131..5b76764 100644 --- a/dbaccess/source/ui/querydesign/limitboxcontroller.cxx +++ b/dbaccess/source/ui/querydesign/limitboxcontroller.cxx @@ -57,7 +57,7 @@ bool LimitBoxImpl::Notify( NotifyEvent& rNEvt ) bool nHandled = false; switch ( rNEvt.GetType() ) { - case EVENT_LOSEFOCUS: + case MouseNotifyEvent::LOSEFOCUS: { nHandled = LimitBox::Notify( rNEvt ); uno::Sequence< beans::PropertyValue > aArgs( 1 ); @@ -66,7 +66,7 @@ bool LimitBoxImpl::Notify( NotifyEvent& rNEvt ) m_pControl->dispatchCommand( aArgs ); break; } - case EVENT_KEYINPUT: + case MouseNotifyEvent::KEYINPUT: { const sal_uInt16 nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode(); switch ( nCode ) diff --git a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx index 5465148..7afd1c9 100644 --- a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx +++ b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx @@ -160,7 +160,7 @@ namespace dbaui bool bHandled = false; switch (rNEvt.GetType()) { - case EVENT_GETFOCUS: + case MouseNotifyEvent::GETFOCUS: if ( m_pViewSwitch ) { OJoinController& rController = m_pViewSwitch->getDesignView()->getController(); diff --git a/dbaccess/source/ui/relationdesign/RelationDesignView.cxx b/dbaccess/source/ui/relationdesign/RelationDesignView.cxx index 0305b46..a27f4a5 100644 --- a/dbaccess/source/ui/relationdesign/RelationDesignView.cxx +++ b/dbaccess/source/ui/relationdesign/RelationDesignView.cxx @@ -71,7 +71,7 @@ void ORelationDesignView::initialize() bool ORelationDesignView::PreNotify( NotifyEvent& rNEvt ) { bool nDone = false; - if(rNEvt.GetType() == EVENT_GETFOCUS) + if(rNEvt.GetType() == MouseNotifyEvent::GETFOCUS) { if(!m_pTableView->HasChildPathFocus()) { diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index 2b66dc0..a9af7d9 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -1684,7 +1684,7 @@ void OTableEditorCtrl::DeactivateCell(bool bUpdate) bool OTableEditorCtrl::PreNotify( NotifyEvent& rNEvt ) { - if (rNEvt.GetType() == EVENT_GETFOCUS) + if (rNEvt.GetType() == MouseNotifyEvent::GETFOCUS) { if( pHelpTextCell && pHelpTextCell->HasChildPathFocus() ) m_eChildFocus = HELPTEXT; diff --git a/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx b/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx index 5a69fc0..a5f2010 100644 --- a/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx +++ b/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx @@ -64,7 +64,7 @@ void OTableDesignHelpBar::Resize() bool OTableDesignHelpBar::PreNotify( NotifyEvent& rNEvt ) { - if (rNEvt.GetType() == EVENT_LOSEFOCUS) + if (rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS) SetHelpText(OUString()); return TabPage::PreNotify(rNEvt); } diff --git a/dbaccess/source/ui/tabledesign/TableDesignView.cxx b/dbaccess/source/ui/tabledesign/TableDesignView.cxx index b1743c5..16bc2df 100644 --- a/dbaccess/source/ui/tabledesign/TableDesignView.cxx +++ b/dbaccess/source/ui/tabledesign/TableDesignView.cxx @@ -224,7 +224,7 @@ bool OTableDesignView::PreNotify( NotifyEvent& rNEvt ) bool bHandled = false; switch(rNEvt.GetType()) { - case EVENT_GETFOCUS: + case MouseNotifyEvent::GETFOCUS: if( GetDescWin() && GetDescWin()->HasChildPathFocus() ) m_eChildFocus = DESCRIPTION; else if ( GetEditorCtrl() && GetEditorCtrl()->HasChildPathFocus() ) diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx index eef570c..fecf0f34 100644 --- a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx +++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx @@ -269,7 +269,7 @@ bool OTableFieldDescWin::PreNotify( NotifyEvent& rNEvt ) bool bHandled = false; switch(rNEvt.GetType()) { - case EVENT_GETFOCUS: + case MouseNotifyEvent::GETFOCUS: if( getGenPage() && getGenPage()->HasChildPathFocus() ) m_eChildFocus = DESCRIPTION; else diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index 468d4a2e..056f0b1 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -422,7 +422,7 @@ bool ExtBoxWithBtns_Impl::Notify( NotifyEvent& rNEvt ) { bool bHandled = false; - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); vcl::KeyCode aKeyCode = pKEvt->GetKeyCode(); @@ -1109,7 +1109,7 @@ bool ExtMgrDialog::Notify( NotifyEvent& rNEvt ) { bool bHandled = false; - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); vcl::KeyCode aKeyCode = pKEvt->GetKeyCode(); diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx index ab5e049..ce629ed 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx @@ -879,7 +879,7 @@ bool ExtensionBox_Impl::Notify( NotifyEvent& rNEvt ) bool bHandled = false; - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); vcl::KeyCode aKeyCode = pKEvt->GetKeyCode(); @@ -891,7 +891,7 @@ bool ExtensionBox_Impl::Notify( NotifyEvent& rNEvt ) bHandled = HandleCursorKey( nKeyCode ); } - if ( rNEvt.GetType() == EVENT_COMMAND ) + if ( rNEvt.GetType() == MouseNotifyEvent::COMMAND ) { if ( m_bHasScrollBar && ( rNEvt.GetCommandEvent()->GetCommand() == COMMAND_WHEEL ) ) diff --git a/extensions/source/bibliography/bibcont.cxx b/extensions/source/bibliography/bibcont.cxx index 56ed58e..9416003 100644 --- a/extensions/source/bibliography/bibcont.cxx +++ b/extensions/source/bibliography/bibcont.cxx @@ -212,7 +212,7 @@ void BibBookContainer::GetFocus() bool BibBookContainer::PreNotify( NotifyEvent& rNEvt ) { bool nHandled = false; - if( EVENT_KEYINPUT == rNEvt.GetType() ) + if( MouseNotifyEvent::KEYINPUT == rNEvt.GetType() ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); const vcl::KeyCode aKeyCode = pKEvt->GetKeyCode(); diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx index 12010c8..17f5951 100644 --- a/extensions/source/bibliography/toolbar.cxx +++ b/extensions/source/bibliography/toolbar.cxx @@ -426,8 +426,8 @@ bool BibToolBar::PreNotify( NotifyEvent& rNEvt ) { bool nResult = true; - sal_uInt16 nSwitch=rNEvt.GetType(); - if(aEdQuery.HasFocus() && nSwitch==EVENT_KEYINPUT) + MouseNotifyEvent nSwitch=rNEvt.GetType(); + if(aEdQuery.HasFocus() && nSwitch==MouseNotifyEvent::KEYINPUT) { const vcl::KeyCode& aKeyCode=rNEvt.GetKeyEvent()->GetKeyCode(); sal_uInt16 nKey = aKeyCode.GetCode(); diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx index 6666419..c43a058 100644 --- a/extensions/source/propctrlr/browserlistbox.cxx +++ b/extensions/source/propctrlr/browserlistbox.cxx @@ -1205,7 +1205,7 @@ namespace pcr { switch ( _rNEvt.GetType() ) { - case EVENT_KEYINPUT: + case MouseNotifyEvent::KEYINPUT: { const KeyEvent* pKeyEvent = _rNEvt.GetKeyEvent(); if ( ( pKeyEvent->GetKeyCode().GetModifier() != 0 ) @@ -1263,7 +1263,7 @@ namespace pcr { switch ( _rNEvt.GetType() ) { - case EVENT_COMMAND: + case MouseNotifyEvent::COMMAND: { const CommandEvent* pCommand = _rNEvt.GetCommandEvent(); if ( ( COMMAND_WHEEL == pCommand->GetCommand() ) diff --git a/extensions/source/propctrlr/browserview.cxx b/extensions/source/propctrlr/browserview.cxx index f56532c..4179cbe 100644 --- a/extensions/source/propctrlr/browserview.cxx +++ b/extensions/source/propctrlr/browserview.cxx @@ -83,7 +83,7 @@ namespace pcr bool OPropertyBrowserView::Notify( NotifyEvent& _rNEvt ) { - if ( EVENT_KEYINPUT == _rNEvt.GetType() ) + if ( MouseNotifyEvent::KEYINPUT == _rNEvt.GetType() ) { sal_uInt16 nKey = _rNEvt.GetKeyEvent()->GetKeyCode().GetCode(); diff --git a/extensions/source/propctrlr/commoncontrol.cxx b/extensions/source/propctrlr/commoncontrol.cxx index 0e95203..ac33ace 100644 --- a/extensions/source/propctrlr/commoncontrol.cxx +++ b/extensions/source/propctrlr/commoncontrol.cxx @@ -128,7 +128,7 @@ namespace pcr bool ControlHelper::handlePreNotify(NotifyEvent& rNEvt) { - if (EVENT_KEYINPUT == rNEvt.GetType()) + if (MouseNotifyEvent::KEYINPUT == rNEvt.GetType()) { const vcl::KeyCode& aKeyCode = rNEvt.GetKeyEvent()->GetKeyCode(); sal_uInt16 nKey = aKeyCode.GetCode(); diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx index 60d64a9..4e1c600 100644 --- a/extensions/source/propctrlr/standardcontrol.cxx +++ b/extensions/source/propctrlr/standardcontrol.cxx @@ -993,8 +993,8 @@ namespace pcr { bool nResult = true; - sal_uInt16 nSwitch = _rNEvt.GetType(); - if (EVENT_KEYINPUT == nSwitch) + MouseNotifyEvent nSwitch = _rNEvt.GetType(); + if (MouseNotifyEvent::KEYINPUT == nSwitch) { const vcl::KeyCode& aKeyCode = _rNEvt.GetKeyEvent()->GetKeyCode(); sal_uInt16 nKey = aKeyCode.GetCode(); @@ -1099,7 +1099,7 @@ namespace pcr { bool nResult = true; - if (rNEvt.GetType() == EVENT_KEYINPUT) + if (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) { const vcl::KeyCode& aKeyCode = rNEvt.GetKeyEvent()->GetKeyCode(); sal_uInt16 nKey = aKeyCode.GetCode(); diff --git a/extensions/source/propctrlr/standardcontrol.hxx b/extensions/source/propctrlr/standardcontrol.hxx index fdfb1dc..a78b43e 100644 --- a/extensions/source/propctrlr/standardcontrol.hxx +++ b/extensions/source/propctrlr/standardcontrol.hxx @@ -73,7 +73,7 @@ namespace pcr template< class LISTBOX_WINDOW > bool ListLikeControlWithModifyHandler< LISTBOX_WINDOW >::PreNotify( NotifyEvent& _rNEvt ) { - if ( _rNEvt.GetType() == EVENT_KEYINPUT ) + if ( _rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const ::KeyEvent* pKeyEvent = _rNEvt.GetKeyEvent(); if ( ( pKeyEvent->GetKeyCode().GetModifier() == 0 ) diff --git a/extensions/source/propctrlr/usercontrol.cxx b/extensions/source/propctrlr/usercontrol.cxx index f26035c..783e43c 100644 --- a/extensions/source/propctrlr/usercontrol.cxx +++ b/extensions/source/propctrlr/usercontrol.cxx @@ -48,7 +48,7 @@ namespace pcr bool NumberFormatSampleField::PreNotify( NotifyEvent& rNEvt ) { // want to handle two keys myself : Del/Backspace should empty the window (setting my prop to "standard" this way) - if (EVENT_KEYINPUT == rNEvt.GetType()) + if (MouseNotifyEvent::KEYINPUT == rNEvt.GetType()) { sal_uInt16 nKey = rNEvt.GetKeyEvent()->GetKeyCode().GetCode(); diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx index fc0da39..02143c4 100644 --- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx @@ -1004,7 +1004,7 @@ bool XMLFilterSettingsDialog::Notify( NotifyEvent& rNEvt ) bool nRet = ModelessDialog::Notify( rNEvt ); if ( !nRet ) { - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); vcl::KeyCode aKeyCode = pKEvt->GetKeyCode(); @@ -1408,7 +1408,7 @@ bool SvxPathControl::Notify(NotifyEvent& rNEvt) { bool nRet = Window::Notify(rNEvt); - if ( m_pFocusCtrl && rNEvt.GetWindow() != m_pFocusCtrl && rNEvt.GetType() == EVENT_GETFOCUS ) + if ( m_pFocusCtrl && rNEvt.GetWindow() != m_pFocusCtrl && rNEvt.GetType() == MouseNotifyEvent::GETFOCUS ) m_pFocusCtrl->GrabFocus(); return nRet; diff --git a/forms/source/richtext/richtextvclcontrol.cxx b/forms/source/richtext/richtextvclcontrol.cxx index 21c8a51..fe7ffe6 100644 --- a/forms/source/richtext/richtextvclcontrol.cxx +++ b/forms/source/richtext/richtextvclcontrol.cxx @@ -189,7 +189,7 @@ namespace frm { if ( IsWindowOrChild( _rNEvt.GetWindow() ) ) { - if ( EVENT_KEYINPUT == _rNEvt.GetType() ) + if ( MouseNotifyEvent::KEYINPUT == _rNEvt.GetType() ) { const ::KeyEvent* pKeyEvent = _rNEvt.GetKeyEvent(); @@ -281,7 +281,7 @@ namespace frm bool RichTextControl::Notify( NotifyEvent& _rNEvt ) { bool nDone = false; - if ( _rNEvt.GetType() == EVENT_COMMAND ) + if ( _rNEvt.GetType() == MouseNotifyEvent::COMMAND ) { const CommandEvent& rEvent = *_rNEvt.GetCommandEvent(); nDone = m_pImpl->HandleCommand( rEvent ); diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx index 16d96fe..6e39f6e 100644 --- a/formula/source/ui/dlg/formula.cxx +++ b/formula/source/ui/dlg/formula.cxx @@ -388,8 +388,8 @@ void FormulaDlg_Impl::StoreFormEditData(FormEditData* pData) void FormulaDlg_Impl::PreNotify( NotifyEvent& rNEvt ) { - sal_uInt16 nSwitch=rNEvt.GetType(); - if(nSwitch==EVENT_GETFOCUS && !bIsShutDown) + MouseNotifyEvent nSwitch=rNEvt.GetType(); + if(nSwitch==MouseNotifyEvent::GETFOCUS && !bIsShutDown) { vcl::Window* pWin=rNEvt.GetWindow(); if(pWin!=NULL) diff --git a/formula/source/ui/dlg/funcpage.cxx b/formula/source/ui/dlg/funcpage.cxx index e99674f..e44455e 100644 --- a/formula/source/ui/dlg/funcpage.cxx +++ b/formula/source/ui/dlg/funcpage.cxx @@ -49,8 +49,8 @@ bool FormulaListBox::PreNotify( NotifyEvent& rNEvt ) bool nResult = ListBox::PreNotify(rNEvt); - sal_uInt16 nSwitch=aNotifyEvt.GetType(); - if(nSwitch==EVENT_KEYINPUT) + MouseNotifyEvent nSwitch=aNotifyEvt.GetType(); + if(nSwitch==MouseNotifyEvent::KEYINPUT) { KeyInput(*aNotifyEvt.GetKeyEvent()); } diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx index b089718..8a3de8c 100644 --- a/formula/source/ui/dlg/funcutl.cxx +++ b/formula/source/ui/dlg/funcutl.cxx @@ -398,8 +398,8 @@ bool EditBox::PreNotify( NotifyEvent& rNEvt ) if(pMEdit==NULL) return nResult; - sal_uInt16 nSwitch=rNEvt.GetType(); - if(nSwitch==EVENT_KEYINPUT)// || nSwitch==EVENT_KEYUP) + MouseNotifyEvent nSwitch=rNEvt.GetType(); + if(nSwitch==MouseNotifyEvent::KEYINPUT)// || nSwitch==MouseNotifyEvent::KEYUP) { const vcl::KeyCode& aKeyCode=rNEvt.GetKeyEvent()->GetKeyCode(); sal_uInt16 nKey=aKeyCode.GetCode(); @@ -418,7 +418,7 @@ bool EditBox::PreNotify( NotifyEvent& rNEvt ) { nResult=Control::PreNotify(rNEvt); - if(nSwitch==EVENT_MOUSEBUTTONDOWN || nSwitch==EVENT_MOUSEBUTTONUP) + if(nSwitch==MouseNotifyEvent::MOUSEBUTTONDOWN || nSwitch==MouseNotifyEvent::MOUSEBUTTONUP) { bMouseFlag=true; Application::PostUserEvent( LINK( this, EditBox, ChangedHdl ) ); diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index 81ce17e..41c76d3 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -1593,10 +1593,10 @@ bool SvtFileDialog::Notify( NotifyEvent& rNEvt ) */ { - sal_uInt16 nType = rNEvt.GetType(); + MouseNotifyEvent nType = rNEvt.GetType(); bool nRet = false; - if ( EVENT_KEYINPUT == nType && rNEvt.GetKeyEvent() ) + if ( MouseNotifyEvent::KEYINPUT == nType && rNEvt.GetKeyEvent() ) { const vcl::KeyCode& rKeyCode = rNEvt.GetKeyEvent()->GetKeyCode(); sal_uInt16 nCode = rKeyCode.GetCode(); diff --git a/framework/source/uielement/comboboxtoolbarcontroller.cxx b/framework/source/uielement/comboboxtoolbarcontroller.cxx index 6a685cf..2f3cefb 100644 --- a/framework/source/uielement/comboboxtoolbarcontroller.cxx +++ b/framework/source/uielement/comboboxtoolbarcontroller.cxx @@ -222,7 +222,7 @@ bool ComboboxToolbarController::PreNotify( NotifyEvent& rNEvt ) { switch ( rNEvt.GetType() ) { - case EVENT_KEYINPUT : + case MouseNotifyEvent::KEYINPUT : { const ::KeyEvent* pKeyEvent = rNEvt.GetKeyEvent(); const vcl::KeyCode& rKeyCode = pKeyEvent->GetKeyCode(); @@ -235,10 +235,10 @@ bool ComboboxToolbarController::PreNotify( NotifyEvent& rNEvt ) } } break; - case EVENT_GETFOCUS : + case MouseNotifyEvent::GETFOCUS : notifyFocusGet(); break; - case EVENT_LOSEFOCUS : + case MouseNotifyEvent::LOSEFOCUS : notifyFocusLost(); break; default : diff --git a/framework/source/uielement/edittoolbarcontroller.cxx b/framework/source/uielement/edittoolbarcontroller.cxx index c38a2a55..67cdcb1 100644 --- a/framework/source/uielement/edittoolbarcontroller.cxx +++ b/framework/source/uielement/edittoolbarcontroller.cxx @@ -186,7 +186,7 @@ void EditToolbarController::LoseFocus() bool EditToolbarController::PreNotify( NotifyEvent& rNEvt ) { - if( rNEvt.GetType() == EVENT_KEYINPUT ) + if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const ::KeyEvent* pKeyEvent = rNEvt.GetKeyEvent(); const vcl::KeyCode& rKeyCode = pKeyEvent->GetKeyCode(); diff --git a/framework/source/uielement/spinfieldtoolbarcontroller.cxx b/framework/source/uielement/spinfieldtoolbarcontroller.cxx index 83557df..efe6a71 100644 --- a/framework/source/uielement/spinfieldtoolbarcontroller.cxx +++ b/framework/source/uielement/spinfieldtoolbarcontroller.cxx @@ -308,7 +308,7 @@ void SpinfieldToolbarController::DataChanged( const DataChangedEvent& /*rDCEvt*/ bool SpinfieldToolbarController::PreNotify( NotifyEvent& rNEvt ) { - if( rNEvt.GetType() == EVENT_KEYINPUT ) + if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const ::KeyEvent* pKeyEvent = rNEvt.GetKeyEvent(); const vcl::KeyCode& rKeyCode = pKeyEvent->GetKeyCode(); diff --git a/include/vcl/event.hxx b/include/vcl/event.hxx index 14181cc..a73c571 100644 --- a/include/vcl/event.hxx +++ b/include/vcl/event.hxx @@ -389,38 +389,41 @@ inline TrackingEvent::TrackingEvent( const MouseEvent& rMEvt, // - NotifyEvent - - -#define EVENT_MOUSEBUTTONDOWN 1 -#define EVENT_MOUSEBUTTONUP 2 -#define EVENT_MOUSEMOVE 3 -#define EVENT_KEYINPUT 4 -#define EVENT_KEYUP 5 -#define EVENT_GETFOCUS 6 -#define EVENT_LOSEFOCUS 7 -#define EVENT_COMMAND 8 -#define EVENT_DESTROY 9 -#define EVENT_INPUTENABLE 10 -#define EVENT_INPUTDISABLE 11 -#define EVENT_EXECUTEDIALOG 100 -#define EVENT_ENDEXECUTEDIALOG 101 +enum class MouseNotifyEvent +{ + NONE = 0, + MOUSEBUTTONDOWN = 1, + MOUSEBUTTONUP = 2, + MOUSEMOVE = 3, + KEYINPUT = 4, + KEYUP = 5, + GETFOCUS = 6, + LOSEFOCUS = 7, + COMMAND = 8, + DESTROY = 9, + INPUTENABLE = 10, + INPUTDISABLE = 11, + EXECUTEDIALOG = 100, + ENDEXECUTEDIALOG = 101 +}; class VCL_DLLPUBLIC NotifyEvent { private: vcl::Window* mpWindow; void* mpData; - sal_uInt16 mnType; + MouseNotifyEvent mnEventType; long mnRetValue; public: NotifyEvent(); - NotifyEvent( sal_uInt16 nType, + NotifyEvent( MouseNotifyEvent nEventType, vcl::Window* pWindow, const void* pEvent = NULL, long nRet = 0 ); - sal_uInt16 GetType() const { return mnType; } - vcl::Window* GetWindow() const { return mpWindow; } + MouseNotifyEvent GetType() const { return mnEventType; } + vcl::Window* GetWindow() const { return mpWindow; } void* GetData() const { return mpData; } void SetReturnValue( long nRet ) { mnRetValue = nRet; } @@ -435,22 +438,22 @@ inline NotifyEvent::NotifyEvent() { mpWindow = NULL; mpData = NULL; - mnType = 0; + mnEventType = MouseNotifyEvent::NONE; mnRetValue = 0; } -inline NotifyEvent::NotifyEvent( sal_uInt16 nType, vcl::Window* pWindow, +inline NotifyEvent::NotifyEvent( MouseNotifyEvent nEventType, vcl::Window* pWindow, const void* pEvent, long nRet ) { mpWindow = pWindow; mpData = (void*)pEvent; - mnType = nType; + mnEventType = nEventType; mnRetValue = nRet; } inline const KeyEvent* NotifyEvent::GetKeyEvent() const { - if ( (mnType == EVENT_KEYINPUT) || (mnType == EVENT_KEYUP) ) + if ( (mnEventType == MouseNotifyEvent::KEYINPUT) || (mnEventType == MouseNotifyEvent::KEYUP) ) return (const KeyEvent*)mpData; else return NULL; @@ -458,7 +461,7 @@ inline const KeyEvent* NotifyEvent::GetKeyEvent() const inline const MouseEvent* NotifyEvent::GetMouseEvent() const { - if ( (mnType >= EVENT_MOUSEBUTTONDOWN) && (mnType <= EVENT_MOUSEMOVE) ) + if ( (mnEventType >= MouseNotifyEvent::MOUSEBUTTONDOWN) && (mnEventType <= MouseNotifyEvent::MOUSEMOVE) ) return (const MouseEvent*)mpData; else return NULL; @@ -466,7 +469,7 @@ inline const MouseEvent* NotifyEvent::GetMouseEvent() const inline const CommandEvent* NotifyEvent::GetCommandEvent() const { - if ( mnType == EVENT_COMMAND ) + if ( mnEventType == MouseNotifyEvent::COMMAND ) return (const CommandEvent*)mpData; else return NULL; diff --git a/reportdesign/source/ui/dlg/AddField.cxx b/reportdesign/source/ui/dlg/AddField.cxx index c572af9..d1e6460 100644 --- a/reportdesign/source/ui/dlg/AddField.cxx +++ b/reportdesign/source/ui/dlg/AddField.cxx @@ -241,7 +241,7 @@ uno::Sequence< beans::PropertyValue > OAddFieldWindow::getSelectedFieldDescripto bool OAddFieldWindow::PreNotify( NotifyEvent& _rNEvt ) { - if ( EVENT_KEYINPUT == _rNEvt.GetType() ) + if ( MouseNotifyEvent::KEYINPUT == _rNEvt.GetType() ) { const vcl::KeyCode& rKeyCode = _rNEvt.GetKeyEvent()->GetKeyCode(); if ( ( 0 == rKeyCode.GetModifier() ) && ( KEY_RETURN == rKeyCode.GetCode() ) ) diff --git a/reportdesign/source/ui/dlg/CondFormat.cxx b/reportdesign/source/ui/dlg/CondFormat.cxx index fbdd9fc..a4d8c03 100644 --- a/reportdesign/source/ui/dlg/CondFormat.cxx +++ b/reportdesign/source/ui/dlg/CondFormat.cxx @@ -472,7 +472,7 @@ namespace rptui { switch ( _rNEvt.GetType() ) { - case EVENT_KEYINPUT: + case MouseNotifyEvent::KEYINPUT: { const KeyEvent* pKeyEvent( _rNEvt.GetKeyEvent() ); const vcl::KeyCode& rKeyCode = pKeyEvent->GetKeyCode(); @@ -491,7 +491,7 @@ namespace rptui } } break; - case EVENT_GETFOCUS: + case MouseNotifyEvent::GETFOCUS: { if ( m_bDeletingCondition ) break; diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx index fc004be..bca85bc 100644 --- a/reportdesign/source/ui/report/DesignView.cxx +++ b/reportdesign/source/ui/report/DesignView.cxx @@ -181,7 +181,7 @@ bool ODesignView::PreNotify( NotifyEvent& rNEvt ) bool nRet = ODataView::PreNotify(rNEvt); // 1 := has to be handled here switch(rNEvt.GetType()) { - case EVENT_KEYINPUT: + case MouseNotifyEvent::KEYINPUT: if ( (m_pPropWin && m_pPropWin->HasChildPathFocus()) ) return false; if ( (m_pAddField && m_pAddField->HasChildPathFocus()) ) diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 534a921..3563978 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -2452,7 +2452,7 @@ bool ScPosWnd::Notify( NotifyEvent& rNEvt ) switch (rNEvt.GetType()) { - case EVENT_KEYINPUT: + case MouseNotifyEvent::KEYINPUT: { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); @@ -2478,14 +2478,14 @@ bool ScPosWnd::Notify( NotifyEvent& rNEvt ) } } break; - case EVENT_GETFOCUS: + case MouseNotifyEvent::GETFOCUS: { // Select the whole text upon focus. OUString aStr = GetText(); SetSelection(Selection(0, aStr.getLength())); } break; - case EVENT_LOSEFOCUS: + case MouseNotifyEvent::LOSEFOCUS: HideTip(); bHandled = false; break; diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index 9fbcd2c..cbf834e 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -1171,7 +1171,7 @@ bool ScCheckListMenuWindow::Notify(NotifyEvent& rNEvt) { switch (rNEvt.GetType()) { - case EVENT_KEYUP: + case MouseNotifyEvent::KEYUP: { const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent(); const vcl::KeyCode& rCode = pKeyEvent->GetKeyCode(); diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index 10fd33f..81d9076 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -65,7 +65,7 @@ ScCondFrmtEntry::~ScCondFrmtEntry() bool ScCondFrmtEntry::Notify( NotifyEvent& rNEvt ) { - if( rNEvt.GetType() == EVENT_MOUSEBUTTONDOWN ) + if( rNEvt.GetType() == MouseNotifyEvent::MOUSEBUTTONDOWN ) { ImplCallEventListenersAndHandler( VCLEVENT_WINDOW_MOUSEBUTTONDOWN, maClickHdl, this ); } diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx index ccf4543..dff8ae6 100644 --- a/sc/source/ui/miscdlgs/acredlin.cxx +++ b/sc/source/ui/miscdlgs/acredlin.cxx @@ -747,7 +747,7 @@ SvTreeListEntry* ScAcceptChgDlg::InsertChangeActionContent(const ScChangeActionC bool ScAcceptChgDlg::PreNotify( NotifyEvent& rNEvt ) { - if(rNEvt.GetType()==EVENT_GETFOCUS && bNeedsUpdate) + if(rNEvt.GetType()==MouseNotifyEvent::GETFOCUS && bNeedsUpdate) { ClearView(); UpdateView(); diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx index 411b47e..409f138 100644 --- a/sc/source/ui/miscdlgs/anyrefdg.cxx +++ b/sc/source/ui/miscdlgs/anyrefdg.cxx @@ -937,8 +937,8 @@ void ScRefHandler::preNotify(const NotifyEvent& rNEvt, const bool bBindRef) { if( bBindRef || m_bInRefMode ) { - sal_uInt16 nSwitch=rNEvt.GetType(); - if(nSwitch==EVENT_GETFOCUS) + MouseNotifyEvent nSwitch=rNEvt.GetType(); + if(nSwitch==MouseNotifyEvent::GETFOCUS) { pActiveWin=rNEvt.GetWindow(); } diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index a67fc87..221f2b7 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -92,8 +92,8 @@ bool ColumnEdit::Notify( NotifyEvent& rNEvt ) { bool nHandled = SpinField::Notify( rNEvt ); - sal_uInt16 nType = rNEvt.GetType(); - if ( nType == EVENT_KEYINPUT ) + MouseNotifyEvent nType = rNEvt.GetType(); + if ( nType == MouseNotifyEvent::KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); vcl::KeyCode aCode = pKEvt->GetKeyCode(); @@ -112,7 +112,7 @@ bool ColumnEdit::Notify( NotifyEvent& rNEvt ) } } } - else if ( nType == EVENT_LOSEFOCUS ) // LoseFocus not called at VCL + else if ( nType == MouseNotifyEvent::LOSEFOCUS ) // LoseFocus not called at VCL EvalText(); // nCol set return nHandled; @@ -264,7 +264,7 @@ bool RowEdit::Notify( NotifyEvent& rNEvt ) { bool nHandled = NumericField::Notify( rNEvt ); - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); vcl::KeyCode aCode = pKEvt->GetKeyCode(); diff --git a/sc/source/ui/navipi/scenwnd.cxx b/sc/source/ui/navipi/scenwnd.cxx index d72a745..96b37d8 100644 --- a/sc/source/ui/navipi/scenwnd.cxx +++ b/sc/source/ui/navipi/scenwnd.cxx @@ -111,7 +111,7 @@ bool ScScenarioListBox::Notify( NotifyEvent& rNEvt ) { bool bHandled = false; - if( rNEvt.GetType() == EVENT_KEYINPUT ) + if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { vcl::KeyCode aCode = rNEvt.GetKeyEvent()->GetKeyCode(); switch( aCode.GetCode() ) @@ -126,7 +126,7 @@ bool ScScenarioListBox::Notify( NotifyEvent& rNEvt ) break; } } - else if ( rNEvt.GetType() == EVENT_COMMAND && GetSelectEntryCount() ) + else if ( rNEvt.GetType() == MouseNotifyEvent::COMMAND && GetSelectEntryCount() ) { const CommandEvent* pCEvt = rNEvt.GetCommandEvent(); if ( pCEvt && pCEvt->GetCommand() == COMMAND_CONTEXTMENU ) diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx index 9cdcd8b..f3a0f96 100644 --- a/sc/source/ui/pagedlg/tphfedit.cxx +++ b/sc/source/ui/pagedlg/tphfedit.cxx @@ -396,8 +396,8 @@ void ScExtIButton::StartPopup() bool ScExtIButton::PreNotify( NotifyEvent& rNEvt ) { - sal_uInt16 nSwitch=rNEvt.GetType(); - if(nSwitch==EVENT_MOUSEBUTTONUP) + MouseNotifyEvent nSwitch=rNEvt.GetType(); + if(nSwitch==MouseNotifyEvent::MOUSEBUTTONUP) { MouseButtonUp(*rNEvt.GetMouseEvent()); } diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index e8defd1..e8c42f9 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -277,7 +277,7 @@ void ScFilterListBox::LoseFocus() bool ScFilterListBox::PreNotify( NotifyEvent& rNEvt ) { bool nDone = false; - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { KeyEvent aKeyEvt = *rNEvt.GetKeyEvent(); vcl::KeyCode aCode = aKeyEvt.GetKeyCode(); @@ -2653,8 +2653,8 @@ static void lcl_InitMouseEvent( ::com::sun::star::awt::MouseEvent& rEvent, const bool ScGridWindow::PreNotify( NotifyEvent& rNEvt ) { bool bDone = false; - sal_uInt16 nType = rNEvt.GetType(); - if ( nType == EVENT_MOUSEBUTTONUP || nType == EVENT_MOUSEBUTTONDOWN ) + MouseNotifyEvent nType = rNEvt.GetType(); + if ( nType == MouseNotifyEvent::MOUSEBUTTONUP || nType == MouseNotifyEvent::MOUSEBUTTONDOWN ) { vcl::Window* pWindow = rNEvt.GetWindow(); if (pWindow == this && pViewData) @@ -2672,7 +2672,7 @@ bool ScGridWindow::PreNotify( NotifyEvent& rNEvt ) lcl_InitMouseEvent( aEvent, *rNEvt.GetMouseEvent() ); if ( rNEvt.GetWindow() ) aEvent.Source = rNEvt.GetWindow()->GetComponentInterface(); - if ( nType == EVENT_MOUSEBUTTONDOWN) + if ( nType == MouseNotifyEvent::MOUSEBUTTONDOWN) bDone = pImp->MousePressed( aEvent ); else bDone = pImp->MouseReleased( aEvent ); @@ -2683,7 +2683,7 @@ bool ScGridWindow::PreNotify( NotifyEvent& rNEvt ) } if (bDone) // event consumed by a listener { - if ( nType == EVENT_MOUSEBUTTONDOWN ) + if ( nType == MouseNotifyEvent::MOUSEBUTTONDOWN ) { const MouseEvent* pMouseEvent = rNEvt.GetMouseEvent(); if ( pMouseEvent->IsRight() && pMouseEvent->GetClicks() == 1 ) diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx index 2e0272f..97f9559 100644 --- a/sd/source/ui/animations/CustomAnimationDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationDialog.cxx @@ -370,8 +370,8 @@ bool DropdownMenuBox::PreNotify( NotifyEvent& rNEvt ) { bool nResult = true; - sal_uInt16 nSwitch=rNEvt.GetType(); - if (nSwitch==EVENT_KEYINPUT) + MouseNotifyEvent nSwitch=rNEvt.GetType(); + if (nSwitch==MouseNotifyEvent::KEYINPUT) { const vcl::KeyCode& aKeyCode=rNEvt.GetKeyEvent()->GetKeyCode(); sal_uInt16 nKey=aKeyCode.GetCode(); diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.cxx b/sd/source/ui/dlg/RemoteDialogClientBox.cxx index cd99a24..ac27e77 100644 --- a/sd/source/ui/dlg/RemoteDialogClientBox.cxx +++ b/sd/source/ui/dlg/RemoteDialogClientBox.cxx @@ -595,7 +595,7 @@ bool ClientBox::Notify( NotifyEvent& rNEvt ) bool bHandled = false; - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); vcl::KeyCode aKeyCode = pKEvt->GetKeyCode(); @@ -607,7 +607,7 @@ bool ClientBox::Notify( NotifyEvent& rNEvt ) bHandled = HandleCursorKey( nKeyCode ); } - if ( rNEvt.GetType() == EVENT_COMMAND ) + if ( rNEvt.GetType() == MouseNotifyEvent::COMMAND ) { if ( m_bHasScrollBar && ( rNEvt.GetCommandEvent()->GetCommand() == COMMAND_WHEEL ) ) diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx index 32516f9..ec0b4e6 100644 --- a/sd/source/ui/dlg/docprev.cxx +++ b/sd/source/ui/dlg/docprev.cxx @@ -189,7 +189,7 @@ void SdDocPreviewWin::startPreview() bool SdDocPreviewWin::Notify( NotifyEvent& rNEvt ) { - if ( rNEvt.GetType() == EVENT_MOUSEBUTTONDOWN ) + if ( rNEvt.GetType() == MouseNotifyEvent::MOUSEBUTTONDOWN ) { const MouseEvent* pMEvt = rNEvt.GetMouseEvent(); if ( pMEvt->IsLeft() ) diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index da3d6ed..736de76 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -597,7 +597,7 @@ bool ViewShell::Notify(NotifyEvent& rNEvt, ::sd::Window* pWin) { // handle scroll commands when they arrived at child windows bool nRet = false; - if( rNEvt.GetType() == EVENT_COMMAND ) + if( rNEvt.GetType() == MouseNotifyEvent::COMMAND ) { // note: dynamic_cast is not possible as GetData() returns a void* CommandEvent* pCmdEvent = reinterpret_cast< CommandEvent* >(rNEvt.GetData()); diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 01c2429..77265a2 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -397,7 +397,7 @@ void ContentListBox_Impl::RequestingChildren( SvTreeListEntry* pParent ) bool ContentListBox_Impl::Notify( NotifyEvent& rNEvt ) { bool bHandled = false; - if ( rNEvt.GetType() == EVENT_KEYINPUT && + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT && KEY_RETURN == rNEvt.GetKeyEvent()->GetKeyCode().GetCode() ) { GetDoubleClickHdl().Call( NULL ); @@ -491,7 +491,7 @@ void IndexBox_Impl::UserDraw( const UserDrawEvent& rUDEvt ) bool IndexBox_Impl::Notify( NotifyEvent& rNEvt ) { bool bHandled = false; - if ( rNEvt.GetType() == EVENT_KEYINPUT && + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT && KEY_RETURN == rNEvt.GetKeyEvent()->GetKeyCode().GetCode() ) { GetDoubleClickHdl().Call( NULL ); @@ -849,7 +849,7 @@ bool SearchBox_Impl::PreNotify( NotifyEvent& rNEvt ) bool bHandled = false; if ( !IsInDropDown() && rNEvt.GetWindow() == GetSubEdit() && - rNEvt.GetType() == EVENT_KEYINPUT && + rNEvt.GetType() == MouseNotifyEvent::KEYINPUT && KEY_RETURN == rNEvt.GetKeyEvent()->GetKeyCode().GetCode() ) { aSearchLink.Call( NULL ); @@ -883,7 +883,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSearchResultsBox(vcl:: bool SearchResultsBox_Impl::Notify( NotifyEvent& rNEvt ) { bool bHandled = false; - if ( rNEvt.GetType() == EVENT_KEYINPUT && + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT && KEY_RETURN == rNEvt.GetKeyEvent()->GetKeyCode().GetCode() ) { GetDoubleClickHdl().Call( NULL ); @@ -1207,8 +1207,8 @@ void BookmarksBox_Impl::DoAction( sal_uInt16 nAction ) bool BookmarksBox_Impl::Notify( NotifyEvent& rNEvt ) { bool nRet = false; - sal_uInt16 nType = rNEvt.GetType(); - if ( EVENT_KEYINPUT == nType ) + MouseNotifyEvent nType = rNEvt.GetType(); + if ( MouseNotifyEvent::KEYINPUT == nType ) { sal_uInt16 nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode(); if ( KEY_DELETE == nCode && GetEntryCount() > 0 ) @@ -1222,7 +1222,7 @@ bool BookmarksBox_Impl::Notify( NotifyEvent& rNEvt ) nRet = true; } } - else if ( EVENT_COMMAND == nType ) + else if ( MouseNotifyEvent::COMMAND == nType ) { const CommandEvent* pCEvt = rNEvt.GetCommandEvent(); if ( pCEvt->GetCommand() == COMMAND_CONTEXTMENU ) @@ -1589,8 +1589,8 @@ Size SfxHelpIndexWindow_Impl::GetOptimalSize() const bool SfxHelpIndexWindow_Impl::PreNotify(NotifyEvent& rNEvt) { bool nDone = false; - sal_uInt16 nType = rNEvt.GetType(); - if ( EVENT_KEYINPUT == nType && rNEvt.GetKeyEvent() ) + MouseNotifyEvent nType = rNEvt.GetType(); + if ( MouseNotifyEvent::KEYINPUT == nType && rNEvt.GetKeyEvent() ) { const vcl::KeyCode& rKeyCode = rNEvt.GetKeyEvent()->GetKeyCode(); sal_uInt16 nCode = rKeyCode.GetCode(); @@ -1807,7 +1807,7 @@ TextWin_Impl::~TextWin_Impl() bool TextWin_Impl::Notify( NotifyEvent& rNEvt ) { - if( ( rNEvt.GetType() == EVENT_KEYINPUT ) && rNEvt.GetKeyEvent()->GetKeyCode().GetCode() == KEY_TAB ) + if( ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) && rNEvt.GetKeyEvent()->GetKeyCode().GetCode() == KEY_TAB ) return GetParent()->Notify( rNEvt ); else return DockingWindow::Notify( rNEvt ); @@ -2315,8 +2315,8 @@ void SfxHelpTextWindow_Impl::Resize() bool SfxHelpTextWindow_Impl::PreNotify( NotifyEvent& rNEvt ) { bool nDone = false; - sal_uInt16 nType = rNEvt.GetType(); - if ( EVENT_COMMAND == nType && rNEvt.GetCommandEvent() ) + MouseNotifyEvent nType = rNEvt.GetType(); + if ( MouseNotifyEvent::COMMAND == nType && rNEvt.GetCommandEvent() ) { const CommandEvent* pCmdEvt = rNEvt.GetCommandEvent(); vcl::Window* pCmdWin = rNEvt.GetWindow(); @@ -2409,7 +2409,7 @@ bool SfxHelpTextWindow_Impl::PreNotify( NotifyEvent& rNEvt ) nDone = true; } } - else if ( EVENT_KEYINPUT == nType && rNEvt.GetKeyEvent() ) + else if ( MouseNotifyEvent::KEYINPUT == nType && rNEvt.GetKeyEvent() ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); const vcl::KeyCode& rKeyCode = pKEvt->GetKeyCode(); @@ -3001,7 +3001,7 @@ SfxHelpWindow_Impl::~SfxHelpWindow_Impl() bool SfxHelpWindow_Impl::PreNotify( NotifyEvent& rNEvt ) { bool bHandled = false; - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { // Backward == <ALT><LEFT> or <BACKSPACE> Forward == <ALT><RIGHT> const vcl::KeyCode& rKeyCode = rNEvt.GetKeyEvent()->GetKeyCode(); diff --git a/sfx2/source/control/thumbnailviewitem.cxx b/sfx2/source/control/thumbnailviewitem.cxx index ae4fea2..040eb18 100644 --- a/sfx2/source/control/thumbnailviewitem.cxx +++ b/sfx2/source/control/thumbnailviewitem.cxx @@ -75,7 +75,7 @@ ResizableMultiLineEdit::~ResizableMultiLineEdit () bool ResizableMultiLineEdit::PreNotify(NotifyEvent& rNEvt) { bool nDone = false; - if( rNEvt.GetType() == EVENT_KEYINPUT ) + if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent& rKEvt = *rNEvt.GetKeyEvent(); vcl::KeyCode aCode = rKEvt.GetKeyCode(); @@ -92,7 +92,7 @@ bool ResizableMultiLineEdit::PreNotify(NotifyEvent& rNEvt) break; } } - else if ( rNEvt.GetType() == EVENT_LOSEFOCUS && !mbIsInGrabFocus ) + else if ( rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS && !mbIsInGrabFocus ) { mpItem->setTitle( GetText() ); mpItem->setEditTitle(false, false); diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index 02bbb08..95084be 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -374,7 +374,7 @@ void BackingWindow::Paint( const Rectangle& ) bool BackingWindow::PreNotify( NotifyEvent& rNEvt ) { - if( rNEvt.GetType() == EVENT_KEYINPUT ) + if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent* pEvt = rNEvt.GetKeyEvent(); const vcl::KeyCode& rKeyCode(pEvt->GetKeyCode()); @@ -409,7 +409,7 @@ bool BackingWindow::PreNotify( NotifyEvent& rNEvt ) bool BackingWindow::Notify( NotifyEvent& rNEvt ) { - if( rNEvt.GetType() == EVENT_KEYINPUT ) + if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { // try the 'normal' accelerators (so that eg. Ctrl+Q works) if( !mpAccExec ) diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index 0912962..8be4a17 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -329,17 +329,17 @@ void SfxModelessDialog::Init(SfxBindings *pBindinx, SfxChildWindow *pCW) */ bool SfxModelessDialog::Notify( NotifyEvent& rEvt ) { - if ( rEvt.GetType() == EVENT_GETFOCUS ) + if ( rEvt.GetType() == MouseNotifyEvent::GETFOCUS ) { pBindings->SetActiveFrame( pImp->pMgr->GetFrame() ); pImp->pMgr->Activate_Impl(); } - else if ( rEvt.GetType() == EVENT_LOSEFOCUS && !HasChildPathFocus() ) + else if ( rEvt.GetType() == MouseNotifyEvent::LOSEFOCUS && !HasChildPathFocus() ) { pBindings->SetActiveFrame( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > () ); pImp->pMgr->Deactivate_Impl(); } - else if( rEvt.GetType() == EVENT_KEYINPUT ) + else if( rEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { // First, allow KeyInput for Dialog functions ( TAB etc. ) if ( !ModelessDialog::Notify( rEvt ) && SfxViewShell::Current() ) @@ -417,12 +417,12 @@ bool SfxFloatingWindow::Notify( NotifyEvent& rEvt ) */ { - if ( rEvt.GetType() == EVENT_GETFOCUS ) + if ( rEvt.GetType() == MouseNotifyEvent::GETFOCUS ) { pBindings->SetActiveFrame( pImp->pMgr->GetFrame() ); pImp->pMgr->Activate_Impl(); } - else if ( rEvt.GetType() == EVENT_LOSEFOCUS ) + else if ( rEvt.GetType() == MouseNotifyEvent::LOSEFOCUS ) { if ( !HasChildPathFocus() ) { @@ -430,7 +430,7 @@ bool SfxFloatingWindow::Notify( NotifyEvent& rEvt ) pImp->pMgr->Deactivate_Impl(); } } - else if( rEvt.GetType() == EVENT_KEYINPUT ) + else if( rEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { // First, allow KeyInput for Dialog functions if ( !FloatingWindow::Notify( rEvt ) && SfxViewShell::Current() ) diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index f7e4954..b5fabeb 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -1767,7 +1767,7 @@ Size SfxDockingWindow::GetMinOutputSizePixel() const bool SfxDockingWindow::Notify( NotifyEvent& rEvt ) { - if ( rEvt.GetType() == EVENT_GETFOCUS ) + if ( rEvt.GetType() == MouseNotifyEvent::GETFOCUS ) { if (pMgr != NULL) pBindings->SetActiveFrame( pMgr->GetFrame() ); @@ -1783,7 +1783,7 @@ bool SfxDockingWindow::Notify( NotifyEvent& rEvt ) DockingWindow::Notify( rEvt ); return true; } - else if( rEvt.GetType() == EVENT_KEYINPUT ) + else if( rEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { // First, allow KeyInput for Dialog functions if ( !DockingWindow::Notify( rEvt ) && SfxViewShell::Current() ) @@ -1791,7 +1791,7 @@ bool SfxDockingWindow::Notify( NotifyEvent& rEvt ) return SfxViewShell::Current()->GlobalKeyInput_Impl( *rEvt.GetKeyEvent() ); return true; } - else if ( rEvt.GetType() == EVENT_LOSEFOCUS && !HasChildPathFocus() ) + else if ( rEvt.GetType() == MouseNotifyEvent::LOSEFOCUS && !HasChildPathFocus() ) { pBindings->SetActiveFrame( NULL ); if (pMgr != NULL) diff --git a/sfx2/source/dialog/partwnd.cxx b/sfx2/source/dialog/partwnd.cxx index 245dd61..6420558 100644 --- a/sfx2/source/dialog/partwnd.cxx +++ b/sfx2/source/dialog/partwnd.cxx @@ -181,7 +181,7 @@ bool SfxPartDockWnd_Impl::QueryClose() bool SfxPartDockWnd_Impl::Notify( NotifyEvent& rEvt ) { - if( rEvt.GetType() == EVENT_GETFOCUS ) + if( rEvt.GetType() == MouseNotifyEvent::GETFOCUS ) { SfxChildWindow* pChild = GetChildWindow_Impl(); if( pChild ) diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index f29c9e5..fa5c528 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -206,7 +206,7 @@ IMPL_LINK_NOARG(DropListBox_Impl, OnAsyncExecuteDrop) bool DropListBox_Impl::Notify( NotifyEvent& rNEvt ) { bool nRet = false; - if( rNEvt.GetType() == EVENT_KEYINPUT ) + if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const vcl::KeyCode& rKeyCode = rNEvt.GetKeyEvent()->GetKeyCode(); if(!rKeyCode.GetModifier()) @@ -423,7 +423,7 @@ bool StyleTreeListBox_Impl::Notify( NotifyEvent& rNEvt ) // handle <RETURN> as double click bool nRet = false; - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const vcl::KeyCode& rKeyCode = rNEvt.GetKeyEvent()->GetKeyCode(); if ( !rKeyCode.GetModifier() && KEY_RETURN == rKeyCode.GetCode() ) diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx index 6e2f391..534bd30 100644 --- a/sfx2/source/sidebar/Deck.cxx +++ b/sfx2/source/sidebar/Deck.cxx @@ -190,7 +190,7 @@ void Deck::DataChanged (const DataChangedEvent& rEvent) bool Deck::Notify (NotifyEvent& rEvent) { - if (rEvent.GetType() == EVENT_COMMAND) + if (rEvent.GetType() == MouseNotifyEvent::COMMAND) { CommandEvent* pCommandEvent = reinterpret_cast<CommandEvent*>(rEvent.GetData()); if (pCommandEvent != NULL) diff --git a/sfx2/source/sidebar/SidebarToolBox.cxx b/sfx2/source/sidebar/SidebarToolBox.cxx index 0f038a1..506af77 100644 --- a/sfx2/source/sidebar/SidebarToolBox.cxx +++ b/sfx2/source/sidebar/SidebarToolBox.cxx @@ -120,7 +120,7 @@ void SidebarToolBox::Paint (const Rectangle& rRect) bool SidebarToolBox::Notify (NotifyEvent& rEvent) { - if (rEvent.GetType() == EVENT_KEYINPUT) + if (rEvent.GetType() == MouseNotifyEvent::KEYINPUT) { if (rEvent.GetKeyEvent()->GetKeyCode().GetCode() == KEY_TAB) { diff --git a/sfx2/source/view/frame2.cxx b/sfx2/source/view/frame2.cxx index c3d21c7..b370fa3 100644 --- a/sfx2/source/view/frame2.cxx +++ b/sfx2/source/view/frame2.cxx @@ -106,7 +106,7 @@ bool SfxFrameWindow_Impl::Notify( NotifyEvent& rNEvt ) if ( !pView || !pView->GetObjectShell() ) return Window::Notify( rNEvt ); - if ( rNEvt.GetType() == EVENT_GETFOCUS ) + if ( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS ) { if ( pView->GetViewShell() && !pView->GetViewShell()->GetUIActiveIPClient_Impl() && !pFrame->IsInPlace() ) { @@ -119,17 +119,17 @@ bool SfxFrameWindow_Impl::Notify( NotifyEvent& rNEvt ) pView->GetBindings().Invalidate( SID_PASTE_SPECIAL ); return true; } - else if( rNEvt.GetType() == EVENT_KEYINPUT ) + else if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { if ( pView->GetViewShell()->KeyInput( *rNEvt.GetKeyEvent() ) ) return true; } - else if ( rNEvt.GetType() == EVENT_EXECUTEDIALOG /*|| rNEvt.GetType() == EVENT_INPUTDISABLE*/ ) + else if ( rNEvt.GetType() == MouseNotifyEvent::EXECUTEDIALOG /*|| rNEvt.GetType() == MouseNotifyEvent::INPUTDISABLE*/ ) { pView->SetModalMode( true ); return true; } - else if ( rNEvt.GetType() == EVENT_ENDEXECUTEDIALOG /*|| rNEvt.GetType() == EVENT_INPUTENABLE*/ ) + else if ( rNEvt.GetType() == MouseNotifyEvent::ENDEXECUTEDIALOG /*|| rNEvt.GetType() == MouseNotifyEvent::INPUTENABLE*/ ) { pView->SetModalMode( false ); return true; @@ -140,15 +140,15 @@ bool SfxFrameWindow_Impl::Notify( NotifyEvent& rNEvt ) bool SfxFrameWindow_Impl::PreNotify( NotifyEvent& rNEvt ) { - sal_uInt16 nType = rNEvt.GetType(); - if ( nType == EVENT_KEYINPUT || nType == EVENT_KEYUP ) + MouseNotifyEvent nType = rNEvt.GetType(); + if ( nType == MouseNotifyEvent::KEYINPUT || nType == MouseNotifyEvent::KEYUP ) { SfxViewFrame* pView = pFrame->GetCurrentViewFrame(); SfxViewShell* pShell = pView ? pView->GetViewShell() : NULL; if ( pShell && pShell->HasKeyListeners_Impl() && pShell->HandleNotifyEvent_Impl( rNEvt ) ) return true; } - else if ( nType == EVENT_MOUSEBUTTONUP || nType == EVENT_MOUSEBUTTONDOWN ) + else if ( nType == MouseNotifyEvent::MOUSEBUTTONUP || nType == MouseNotifyEvent::MOUSEBUTTONDOWN ) { vcl::Window* pWindow = rNEvt.GetWindow(); SfxViewFrame* pView = pFrame->GetCurrentViewFrame(); @@ -159,7 +159,7 @@ bool SfxFrameWindow_Impl::PreNotify( NotifyEvent& rNEvt ) return true; } - if ( nType == EVENT_MOUSEBUTTONDOWN ) + if ( nType == MouseNotifyEvent::MOUSEBUTTONDOWN ) { vcl::Window* pWindow = rNEvt.GetWindow(); const MouseEvent* pMEvent = rNEvt.GetMouseEvent(); diff --git a/sfx2/source/view/printer.cxx b/sfx2/source/view/printer.cxx index 7ade26d..e5de62c 100644 --- a/sfx2/source/view/printer.cxx +++ b/sfx2/source/view/printer.cxx @@ -253,7 +253,7 @@ short SfxPrintOptionsDialog::Execute() bool SfxPrintOptionsDialog::Notify( NotifyEvent& rNEvt ) { - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { if ( rNEvt.GetKeyEvent()->GetKeyCode().GetCode() == KEY_F1 && pDlgImpl->mbHelpDisabled ) return true; // help disabled -> <F1> does nothing diff --git a/sfx2/source/view/userinputinterception.cxx b/sfx2/source/view/userinputinterception.cxx index 327f40f..a92b575 100644 --- a/sfx2/source/view/userinputinterception.cxx +++ b/sfx2/source/view/userinputinterception.cxx @@ -171,13 +171,13 @@ namespace sfx2 { Reference < XInterface > xHoldAlive( m_pData->m_rControllerImpl ); - sal_uInt16 nType = _rEvent.GetType(); + MouseNotifyEvent nType = _rEvent.GetType(); bool bHandled = false; switch ( nType ) { - case EVENT_KEYINPUT: - case EVENT_KEYUP: + case MouseNotifyEvent::KEYINPUT: + case MouseNotifyEvent::KEYUP: { KeyEvent aEvent; lcl_initKeyEvent( aEvent, *_rEvent.GetKeyEvent() ); @@ -193,7 +193,7 @@ namespace sfx2 try { - if ( nType == EVENT_KEYINPUT ) + if ( nType == MouseNotifyEvent::KEYINPUT ) bHandled = xHandler->keyPressed( aEvent ); else bHandled = xHandler->keyReleased( aEvent ); @@ -214,8 +214,8 @@ namespace sfx2 } break; - case EVENT_MOUSEBUTTONDOWN: - case EVENT_MOUSEBUTTONUP: + case MouseNotifyEvent::MOUSEBUTTONDOWN: + case MouseNotifyEvent::MOUSEBUTTONUP: { MouseEvent aEvent; lcl_initMouseEvent( aEvent, *_rEvent.GetMouseEvent() ); @@ -231,7 +231,7 @@ namespace sfx2 try { - if ( nType == EVENT_MOUSEBUTTONDOWN ) + if ( nType == MouseNotifyEvent::MOUSEBUTTONDOWN ) bHandled = xHandler->mousePressed( aEvent ); else bHandled = xHandler->mouseReleased( aEvent ); diff --git a/svtools/source/brwbox/ebbcontrols.cxx b/svtools/source/brwbox/ebbcontrols.cxx index 2d12692..6314bfa 100644 --- a/svtools/source/brwbox/ebbcontrols.cxx +++ b/svtools/source/brwbox/ebbcontrols.cxx @@ -54,7 +54,7 @@ namespace svt { switch (rNEvt.GetType()) { - case EVENT_KEYINPUT: + case MouseNotifyEvent::KEYINPUT: if (!IsInDropDown()) { const KeyEvent *pEvt = rNEvt.GetKeyEvent(); @@ -162,7 +162,7 @@ namespace svt { switch (rNEvt.GetType()) { - case EVENT_KEYINPUT: + case MouseNotifyEvent::KEYINPUT: if (!IsInDropDown()) { const KeyEvent *pEvt = rNEvt.GetKeyEvent(); @@ -328,10 +328,10 @@ namespace svt { switch (rEvt.GetType()) { - case EVENT_GETFOCUS: + case MouseNotifyEvent::GETFOCUS: ShowFocus(aFocusRect); break; - case EVENT_LOSEFOCUS: + case MouseNotifyEvent::LOSEFOCUS: HideFocus(); } return Control::PreNotify(rEvt); @@ -572,7 +572,7 @@ namespace svt bool MultiLineTextCell::PreNotify( NotifyEvent& rNEvt ) { - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { if ( IsWindowOrChild( rNEvt.GetWindow() ) ) { diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx index e009e82..a95b68b 100644 --- a/svtools/source/brwbox/editbrowsebox.cxx +++ b/svtools/source/brwbox/editbrowsebox.cxx @@ -613,7 +613,7 @@ namespace svt { switch (rEvt.GetType()) { - case EVENT_KEYINPUT: + case MouseNotifyEvent::KEYINPUT: if ( (IsEditing() && Controller()->GetWindow().HasChildPathFocus()) || rEvt.GetWindow() == &GetDataWindow() || (!IsEditing() && HasChildPathFocus()) @@ -738,11 +738,11 @@ namespace svt { switch (rEvt.GetType()) { - case EVENT_GETFOCUS: + case MouseNotifyEvent::GETFOCUS: DetermineFocus( getRealGetFocusFlags( this ) ); break; - case EVENT_LOSEFOCUS: + case MouseNotifyEvent::LOSEFOCUS: DetermineFocus( 0 ); break; } diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index 564f2eb..713b4c9 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -3387,7 +3387,7 @@ void IcnViewEdit_Impl::KeyInput( const KeyEvent& rKEvt ) bool IcnViewEdit_Impl::PreNotify( NotifyEvent& rNEvt ) { - if( rNEvt.GetType() == EVENT_LOSEFOCUS ) + if( rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS ) { if ( !bAlreadyInCallback && ((!Application::GetFocusWindow()) || !IsChild(Application::GetFocusWindow()))) diff --git a/svtools/source/contnr/simptabl.cxx b/svtools/source/contnr/simptabl.cxx index 2422bba..c5d024c 100644 --- a/svtools/source/contnr/simptabl.cxx +++ b/svtools/source/contnr/simptabl.cxx @@ -45,7 +45,7 @@ void SvSimpleTableContainer::SetTable(SvSimpleTable* pTable) bool SvSimpleTableContainer::PreNotify( NotifyEvent& rNEvt ) { bool nResult = true; - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const vcl::KeyCode& aKeyCode = rNEvt.GetKeyEvent()->GetKeyCode(); sal_uInt16 nKey = aKeyCode.GetCode(); diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index 3a27921..5ab89ee 100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -2359,7 +2359,7 @@ void ImplCFieldFloatWin::ArrangeButtons() bool ImplCFieldFloatWin::Notify( NotifyEvent& rNEvt ) { - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); if ( pKEvt->GetKeyCode().GetCode() == KEY_RETURN ) diff --git a/svtools/source/control/fileurlbox.cxx b/svtools/source/control/fileurlbox.cxx index 5ed40d7..8437040 100644 --- a/svtools/source/control/fileurlbox.cxx +++ b/svtools/source/control/fileurlbox.cxx @@ -56,7 +56,7 @@ namespace svt { switch ( _rNEvt.GetType() ) { - case EVENT_KEYINPUT: + case MouseNotifyEvent::KEYINPUT: if ( ( GetSubEdit() == _rNEvt.GetWindow() ) && ( KEY_RETURN == _rNEvt.GetKeyEvent()->GetKeyCode().GetCode() ) && ( IsInDropDown() ) @@ -64,7 +64,7 @@ namespace svt m_sPreservedText = GetURL(); break; - case EVENT_LOSEFOCUS: + case MouseNotifyEvent::LOSEFOCUS: if ( IsWindowOrChild( _rNEvt.GetWindow() ) ) DisplayURL( GetText() ); break; @@ -78,7 +78,7 @@ namespace svt { switch ( _rNEvt.GetType() ) { - case EVENT_KEYINPUT: + case MouseNotifyEvent::KEYINPUT: if ( ( GetSubEdit() == _rNEvt.GetWindow() ) && ( KEY_RETURN == _rNEvt.GetKeyEvent()->GetKeyCode().GetCode() ) && ( IsInDropDown() ) diff --git a/svtools/source/control/fmtfield.cxx b/svtools/source/control/fmtfield.cxx index 3cdd680..37533ab 100644 --- a/svtools/source/control/fmtfield.cxx +++ b/svtools/source/control/fmtfield.cxx @@ -532,7 +532,7 @@ void FormattedField::ImplSetTextImpl(const OUString& rNew, Selection* pNewSel) bool FormattedField::PreNotify(NotifyEvent& rNEvt) { - if (rNEvt.GetType() == EVENT_KEYINPUT) + if (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) m_aLastSelection = GetSelection(); return SpinField::PreNotify(rNEvt); } @@ -763,7 +763,7 @@ void FormattedField::ReFormat() bool FormattedField::Notify(NotifyEvent& rNEvt) { - if ((rNEvt.GetType() == EVENT_KEYINPUT) && !IsReadOnly()) + if ((rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !IsReadOnly()) { const KeyEvent& rKEvt = *rNEvt.GetKeyEvent(); sal_uInt16 nMod = rKEvt.GetKeyCode().GetModifier(); @@ -782,7 +782,7 @@ bool FormattedField::Notify(NotifyEvent& rNEvt) } } - if ((rNEvt.GetType() == EVENT_COMMAND) && !IsReadOnly()) + if ((rNEvt.GetType() == MouseNotifyEvent::COMMAND) && !IsReadOnly()) { const CommandEvent* pCommand = rNEvt.GetCommandEvent(); if (pCommand->GetCommand() == COMMAND_WHEEL) @@ -798,7 +798,7 @@ bool FormattedField::Notify(NotifyEvent& rNEvt) } } - if (rNEvt.GetType() == EVENT_LOSEFOCUS) + if (rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS) { // Sonderbehandlung fuer leere Texte if (GetText().isEmpty()) diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx index 0a11473..d125f3e 100644 --- a/svtools/source/control/inettbc.cxx +++ b/svtools/source/control/inettbc.cxx @@ -1095,7 +1095,7 @@ void SvtURLBox::Modify() bool SvtURLBox::PreNotify( NotifyEvent& rNEvt ) { - if( rNEvt.GetWindow() == GetSubEdit() && rNEvt.GetType() == EVENT_KEYINPUT ) + if( rNEvt.GetWindow() == GetSubEdit() && rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent& rEvent = *rNEvt.GetKeyEvent(); @@ -1135,14 +1135,14 @@ void SvtURLBox::AutoCompleteHandler( Edit* ) bool SvtURLBox::Notify( NotifyEvent &rEvt ) { - if ( EVENT_GETFOCUS == rEvt.GetType() ) + if ( MouseNotifyEvent::GETFOCUS == rEvt.GetType() ) { #ifndef UNX // pb: don't select automatically on unix #93251# SetSelection( Selection( 0, GetText().getLength() ) ); #endif } - else if ( EVENT_LOSEFOCUS == rEvt.GetType() ) + else if ( MouseNotifyEvent::LOSEFOCUS == rEvt.GetType() ) { if( GetText().isEmpty() ) ClearModifyFlag(); diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx index ce70900..0933908 100644 --- a/svtools/source/control/roadmap.cxx +++ b/svtools/source/control/roadmap.cxx @@ -612,7 +612,7 @@ namespace svt bool ORoadmap::PreNotify( NotifyEvent& _rNEvt ) { // capture KeyEvents for taskpane cycling - if ( _rNEvt.GetType() == EVENT_KEYINPUT ) + if ( _rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { vcl::Window* pWindow = _rNEvt.GetWindow(); RoadmapItem* pItem = GetByPointer( pWindow ); diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index 45b2faf..610646c 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -124,7 +124,7 @@ void ImplTabButton::Command( const CommandEvent& rCEvt ) bool ImplTabButton::PreNotify( NotifyEvent& rNEvt ) { - if ( rNEvt.GetType() == EVENT_MOUSEBUTTONDOWN ) + if ( rNEvt.GetType() == MouseNotifyEvent::MOUSEBUTTONDOWN ) { if ( GetParent()->IsInEditMode() ) { @@ -275,7 +275,7 @@ TabBarEdit::TabBarEdit( TabBar* pParent, WinBits nWinStyle ) : bool TabBarEdit::PreNotify( NotifyEvent& rNEvt ) { - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); if ( !pKEvt->GetKeyCode().GetModifier() ) diff --git a/svtools/source/control/urlcontrol.cxx b/svtools/source/control/urlcontrol.cxx index e22b6b3..81a1969 100644 --- a/svtools/source/control/urlcontrol.cxx +++ b/svtools/source/control/urlcontrol.cxx @@ -44,7 +44,7 @@ namespace svt bool OFileURLControl::PreNotify( NotifyEvent& _rNEvt ) { if (GetSubEdit() == _rNEvt.GetWindow()) - if (EVENT_KEYINPUT == _rNEvt.GetType()) + if (MouseNotifyEvent::KEYINPUT == _rNEvt.GetType()) if (KEY_RETURN == _rNEvt.GetKeyEvent()->GetKeyCode().GetCode()) if (IsInDropDown()) m_sPreservedText = GetURL(); @@ -55,7 +55,7 @@ namespace svt bool OFileURLControl::Notify( NotifyEvent& _rNEvt ) { if (GetSubEdit() == _rNEvt.GetWindow()) - if (EVENT_KEYINPUT == _rNEvt.GetType()) + if (MouseNotifyEvent::KEYINPUT == _rNEvt.GetType()) if (KEY_RETURN == _rNEvt.GetKeyEvent()->GetKeyCode().GetCode()) if (IsInDropDown()) { diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx index bfc972a..5fca301 100644 --- a/svtools/source/dialogs/addresstemplate.cxx +++ b/svtools/source/dialogs/addresstemplate.cxx @@ -1230,7 +1230,7 @@ void AssignmentPersistentData::Commit() { switch (_rNEvt.GetType()) { - case EVENT_KEYINPUT: + case MouseNotifyEvent::KEYINPUT: { const KeyEvent* pKeyEvent = _rNEvt.GetKeyEvent(); sal_uInt16 nCode = pKeyEvent->GetKeyCode().GetCode(); diff --git a/svtools/source/dialogs/prnsetup.cxx b/svtools/source/dialogs/prnsetup.cxx index d5fe5fa..ddadba6 100644 --- a/svtools/source/dialogs/prnsetup.cxx +++ b/svtools/source/dialogs/prnsetup.cxx @@ -313,7 +313,7 @@ IMPL_LINK_NOARG(PrinterSetupDialog, ImplChangePrinterHdl) bool PrinterSetupDialog::Notify( NotifyEvent& rNEvt ) { - if ( (rNEvt.GetType() == EVENT_GETFOCUS) && IsReallyVisible() ) + if ( (rNEvt.GetType() == MouseNotifyEvent::GETFOCUS) && IsReallyVisible() ) ImplStatusHdl( &maStatusTimer ); return ModalDialog::Notify( rNEvt ); diff --git a/svtools/source/dialogs/wizdlg.cxx b/svtools/source/dialogs/wizdlg.cxx index 50ea066..eb2e62d 100644 --- a/svtools/source/dialogs/wizdlg.cxx +++ b/svtools/source/dialogs/wizdlg.cxx @@ -429,7 +429,7 @@ void WizardDialog::StateChanged( StateChangedType nType ) bool WizardDialog::Notify( NotifyEvent& rNEvt ) { - if ( (rNEvt.GetType() == EVENT_KEYINPUT) && mpPrevBtn && mpNextBtn ) + if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && mpPrevBtn && mpNextBtn ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); vcl::KeyCode aKeyCode = pKEvt->GetKeyCode(); diff --git a/svtools/source/edit/editsyntaxhighlighter.cxx b/svtools/source/edit/editsyntaxhighlighter.cxx index 1410921..8b8bbb6 100644 --- a/svtools/source/edit/editsyntaxhighlighter.cxx +++ b/svtools/source/edit/editsyntaxhighlighter.cxx @@ -115,7 +115,7 @@ void MultiLineEditSyntaxHighlight::DoBracketHilight(sal_uInt16 nKey) bool MultiLineEditSyntaxHighlight::PreNotify( NotifyEvent& rNEvt ) { - if ( mbDoBracketHilight && (rNEvt.GetType() == EVENT_KEYINPUT) ) + if ( mbDoBracketHilight && (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) ) DoBracketHilight(rNEvt.GetKeyEvent()->GetCharCode()); return MultiLineEdit::PreNotify(rNEvt); diff --git a/svtools/source/hatchwindow/ipwin.cxx b/svtools/source/hatchwindow/ipwin.cxx index 5ddfba3..d347ad4 100644 --- a/svtools/source/hatchwindow/ipwin.cxx +++ b/svtools/source/hatchwindow/ipwin.cxx @@ -619,7 +619,7 @@ void SvResizeWindow::Paint( const Rectangle & /*rRect*/ ) bool SvResizeWindow::PreNotify( NotifyEvent& rEvt ) { - if ( rEvt.GetType() == EVENT_GETFOCUS && !m_bActive ) + if ( rEvt.GetType() == MouseNotifyEvent::GETFOCUS && !m_bActive ) { m_bActive = true; m_pWrapper->Activated(); @@ -630,7 +630,7 @@ bool SvResizeWindow::PreNotify( NotifyEvent& rEvt ) bool SvResizeWindow::Notify( NotifyEvent& rEvt ) { - if ( rEvt.GetType() == EVENT_LOSEFOCUS && m_bActive ) + if ( rEvt.GetType() == MouseNotifyEvent::LOSEFOCUS && m_bActive ) { bool bHasFocus = HasChildPathFocus(true); if ( !bHasFocus ) diff --git a/svtools/source/table/tabledatawindow.cxx b/svtools/source/table/tabledatawindow.cxx index 80a0557..9b5bcc5 100644 --- a/svtools/source/table/tabledatawindow.cxx +++ b/svtools/source/table/tabledatawindow.cxx @@ -213,7 +213,7 @@ namespace svt { namespace table bool TableDataWindow::Notify(NotifyEvent& rNEvt ) { bool nDone = false; - if ( rNEvt.GetType() == EVENT_COMMAND ) + if ( rNEvt.GetType() == MouseNotifyEvent::COMMAND ) { const CommandEvent& rCEvt = *rNEvt.GetCommandEvent(); if ( rCEvt.GetCommand() == COMMAND_WHEEL ) diff --git a/svtools/source/toolpanel/toolpaneldeck.cxx b/svtools/source/toolpanel/toolpaneldeck.cxx index 27dfa51..af00abb 100644 --- a/svtools/source/toolpanel/toolpaneldeck.cxx +++ b/svtools/source/toolpanel/toolpaneldeck.cxx @@ -447,7 +447,7 @@ namespace svt bool ToolPanelDeck::Notify( NotifyEvent& i_rNotifyEvent ) { bool bHandled = false; - if ( i_rNotifyEvent.GetType() == EVENT_KEYINPUT ) + if ( i_rNotifyEvent.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent* pEvent = i_rNotifyEvent.GetKeyEvent(); const vcl::KeyCode& rKeyCode = pEvent->GetKeyCode(); diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index fc8bd10..c44d7b2 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -890,7 +890,7 @@ void RubyEdit::GetFocus() bool RubyEdit::PreNotify( NotifyEvent& rNEvt ) { bool nHandled = false; - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); const vcl::KeyCode& rKeyCode = pKEvt->GetKeyCode(); diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index ddd4680..bf271b3 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -3198,7 +3198,7 @@ bool DbGridControl::PreNotify(NotifyEvent& rEvt) switch (rEvt.GetType()) { - case EVENT_KEYINPUT: + case MouseNotifyEvent::KEYINPUT: { const KeyEvent* pKeyEvent = rEvt.GetKeyEvent(); diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index 8d62776..f468add 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -1019,7 +1019,7 @@ namespace svxform { bool nHandled = false; - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { sal_uInt16 nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode(); diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx index 111ab2b..2fd8ad0 100644 --- a/svx/source/form/tabwin.cxx +++ b/svx/source/form/tabwin.cxx @@ -248,7 +248,7 @@ bool FmFieldWin::createSelectionControls( ) bool FmFieldWin::PreNotify( NotifyEvent& _rNEvt ) { - if ( EVENT_KEYINPUT == _rNEvt.GetType() ) + if ( MouseNotifyEvent::KEYINPUT == _rNEvt.GetType() ) { const vcl::KeyCode& rKeyCode = _rNEvt.GetKeyEvent()->GetKeyCode(); if ( ( 0 == rKeyCode.GetModifier() ) && ( KEY_RETURN == rKeyCode.GetCode() ) ) diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index 91309f5..86f5f07 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -92,14 +92,14 @@ bool GalleryThemeListBox::PreNotify( NotifyEvent& rNEvt ) { bool bDone = false; - if( rNEvt.GetType() == EVENT_COMMAND ) + if( rNEvt.GetType() == MouseNotifyEvent::COMMAND ) { const CommandEvent* pCEvt = rNEvt.GetCommandEvent(); if( pCEvt && pCEvt->GetCommand() == COMMAND_CONTEXTMENU ) static_cast< GalleryBrowser1* >( GetParent() )->ShowContextMenu(); } - else if( rNEvt.GetType() == EVENT_KEYINPUT ) + else if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); diff --git a/svx/source/sidebar/tools/PopupContainer.cxx b/svx/source/sidebar/tools/PopupContainer.cxx index dc29c55..1c37b6c 100644 --- a/svx/source/sidebar/tools/PopupContainer.cxx +++ b/svx/source/sidebar/tools/PopupContainer.cxx @@ -39,7 +39,7 @@ PopupContainer::~PopupContainer (void) bool PopupContainer::Notify (NotifyEvent& rEvent) { - if (rEvent.GetType() == EVENT_LOSEFOCUS) + if (rEvent.GetType() == MouseNotifyEvent::LOSEFOCUS) { if ( ! HasChildPathFocus(true)) { diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx index 4022c80..00df28e 100644 --- a/svx/source/tbxctrls/colrctrl.cxx +++ b/svx/source/tbxctrls/colrctrl.cxx @@ -493,7 +493,7 @@ void SvxColorDockingWindow::GetFocus (void) bool SvxColorDockingWindow::Notify( NotifyEvent& rNEvt ) { bool nRet = false; - if( ( rNEvt.GetType() == EVENT_KEYINPUT ) ) + if( ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) ) { KeyEvent aKeyEvt = *rNEvt.GetKeyEvent(); sal_uInt16 nKeyCode = aKeyEvt.GetKeyCode().GetCode(); diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx index b0a0925..a27b611 100644 --- a/svx/source/tbxctrls/grafctrl.cxx +++ b/svx/source/tbxctrls/grafctrl.cxx @@ -368,9 +368,9 @@ void ImplGrafModeControl::Select() bool ImplGrafModeControl::PreNotify( NotifyEvent& rNEvt ) { - sal_uInt16 nType = rNEvt.GetType(); + MouseNotifyEvent nType = rNEvt.GetType(); - if( EVENT_MOUSEBUTTONDOWN == nType || EVENT_GETFOCUS == nType ) + if( MouseNotifyEvent::MOUSEBUTTONDOWN == nType || MouseNotifyEvent::GETFOCUS == nType ) mnCurPos = GetSelectEntryPos(); return ListBox::PreNotify( rNEvt ); @@ -380,7 +380,7 @@ bool ImplGrafModeControl::Notify( NotifyEvent& rNEvt ) { bool nHandled = ListBox::Notify( rNEvt ); - if( rNEvt.GetType() == EVENT_KEYINPUT ) + if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx index ebc7161..909f737 100644 --- a/svx/source/tbxctrls/itemwin.cxx +++ b/svx/source/tbxctrls/itemwin.cxx @@ -156,18 +156,18 @@ void SvxLineBox::Select() bool SvxLineBox::PreNotify( NotifyEvent& rNEvt ) { - sal_uInt16 nType = rNEvt.GetType(); + MouseNotifyEvent nType = rNEvt.GetType(); switch(nType) { - case EVENT_MOUSEBUTTONDOWN: - case EVENT_GETFOCUS: + case MouseNotifyEvent::MOUSEBUTTONDOWN: + case MouseNotifyEvent::GETFOCUS: nCurPos = GetSelectEntryPos(); break; - case EVENT_LOSEFOCUS: + case MouseNotifyEvent::LOSEFOCUS: SelectEntryPos(nCurPos); break; - case EVENT_KEYINPUT: + case MouseNotifyEvent::KEYINPUT: { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); if( pKEvt->GetKeyCode().GetCode() == KEY_TAB) @@ -187,7 +187,7 @@ bool SvxLineBox::Notify( NotifyEvent& rNEvt ) { bool nHandled = LineLB::Notify( rNEvt ); - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); @@ -354,9 +354,9 @@ void SvxMetricField::RefreshDlgUnit() bool SvxMetricField::PreNotify( NotifyEvent& rNEvt ) { - sal_uInt16 nType = rNEvt.GetType(); + MouseNotifyEvent nType = rNEvt.GetType(); - if ( EVENT_MOUSEBUTTONDOWN == nType || EVENT_GETFOCUS == nType ) + if ( MouseNotifyEvent::MOUSEBUTTONDOWN == nType || MouseNotifyEvent::GETFOCUS == nType ) aCurTxt = GetText(); return MetricField::PreNotify( rNEvt ); @@ -368,7 +368,7 @@ bool SvxMetricField::Notify( NotifyEvent& rNEvt ) { bool nHandled = MetricField::Notify( rNEvt ); - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); const vcl::KeyCode& rKey = pKEvt->GetKeyCode(); @@ -442,11 +442,11 @@ SvxFillTypeBox::~SvxFillTypeBox() bool SvxFillTypeBox::PreNotify( NotifyEvent& rNEvt ) { - sal_uInt16 nType = rNEvt.GetType(); + MouseNotifyEvent nType = rNEvt.GetType(); - if ( EVENT_MOUSEBUTTONDOWN == nType || EVENT_GETFOCUS == nType ) + if ( MouseNotifyEvent::MOUSEBUTTONDOWN == nType || MouseNotifyEvent::GETFOCUS == nType ) nCurPos = GetSelectEntryPos(); - else if ( EVENT_LOSEFOCUS == nType + else if ( MouseNotifyEvent::LOSEFOCUS == nType && Application::GetFocusWindow() && !IsWindowOrChild( Application::GetFocusWindow(), true ) ) { @@ -465,7 +465,7 @@ bool SvxFillTypeBox::Notify( NotifyEvent& rNEvt ) { bool nHandled = FillTypeLB::Notify( rNEvt ); - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); switch ( pKEvt->GetKeyCode().GetCode() ) @@ -529,9 +529,9 @@ SvxFillAttrBox::~SvxFillAttrBox() bool SvxFillAttrBox::PreNotify( NotifyEvent& rNEvt ) { - sal_uInt16 nType = rNEvt.GetType(); + MouseNotifyEvent nType = rNEvt.GetType(); - if ( EVENT_MOUSEBUTTONDOWN == nType || EVENT_GETFOCUS == nType ) + if ( MouseNotifyEvent::MOUSEBUTTONDOWN == nType || MouseNotifyEvent::GETFOCUS == nType ) nCurPos = GetSelectEntryPos(); return FillAttrLB::PreNotify( rNEvt ); @@ -543,7 +543,7 @@ bool SvxFillAttrBox::Notify( NotifyEvent& rNEvt ) { bool nHandled = FillAttrLB::Notify( rNEvt ); - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 8216a9f7..aa3b63eb 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -464,11 +464,11 @@ void SvxStyleBox_Impl::SetFamily( SfxStyleFamily eNewFamily ) bool SvxStyleBox_Impl::PreNotify( NotifyEvent& rNEvt ) { - sal_uInt16 nType = rNEvt.GetType(); + MouseNotifyEvent nType = rNEvt.GetType(); - if ( EVENT_MOUSEBUTTONDOWN == nType || EVENT_GETFOCUS == nType ) + if ( MouseNotifyEvent::MOUSEBUTTONDOWN == nType || MouseNotifyEvent::GETFOCUS == nType ) nCurSel = GetSelectEntryPos(); - else if ( EVENT_LOSEFOCUS == nType ) + else if ( MouseNotifyEvent::LOSEFOCUS == nType ) { // don't handle before our Select() is called if ( !HasFocus() && !HasChildPathFocus() ) @@ -481,7 +481,7 @@ bool SvxStyleBox_Impl::Notify( NotifyEvent& rNEvt ) { bool nHandled = false; - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { sal_uInt16 nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode(); @@ -933,9 +933,9 @@ void SvxFontNameBox_Impl::Update( const SvxFontItem* pFontItem ) bool SvxFontNameBox_Impl::PreNotify( NotifyEvent& rNEvt ) { - sal_uInt16 nType = rNEvt.GetType(); + MouseNotifyEvent nType = rNEvt.GetType(); - if ( EVENT_MOUSEBUTTONDOWN == nType || EVENT_GETFOCUS == nType ) + if ( MouseNotifyEvent::MOUSEBUTTONDOWN == nType || MouseNotifyEvent::GETFOCUS == nType ) { EnableControls_Impl(); FillList(); @@ -947,10 +947,10 @@ bool SvxFontNameBox_Impl::Notify( NotifyEvent& rNEvt ) { bool nHandled = false; mbEndPreview = false; - if ( rNEvt.GetType() == EVENT_KEYUP ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYUP ) mbEndPreview = true; - if ( rNEvt.GetType() == EVENT_KEYINPUT ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { sal_uInt16 nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode(); @@ -974,7 +974,7 @@ bool SvxFontNameBox_Impl::Notify( NotifyEvent& rNEvt ) break; } } ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits