diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/app/inputhdl.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/app/inputwin.cxx | 20 | ||||
-rw-r--r-- | sc/source/ui/dbgui/csvgrid.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/fupoor.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/acredlin.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/navipi/content.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/navipi/scenwnd.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 28 | ||||
-rw-r--r-- | sc/source/ui/view/hdrcont.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/view/preview.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/view/tabcont.cxx | 32 |
11 files changed, 56 insertions, 59 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index fdfe240a0044..d15a66153f6a 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -3268,9 +3268,9 @@ bool ScInputHandler::InputCommand( const CommandEvent& rCEvt, bool bForce ) { bool bUsed = false; - if ( rCEvt.GetCommand() == COMMAND_CURSORPOS ) + if ( rCEvt.GetCommand() == CommandEventId::CursorPos ) { - // For COMMAND_CURSORPOS, do as little as possible, because + // For CommandEventId::CursorPos, do as little as possible, because // with remote VCL, even a ShowCursor will generate another event. if ( eMode != SC_INPUT_NONE ) { @@ -3285,7 +3285,7 @@ bool ScInputHandler::InputCommand( const CommandEvent& rCEvt, bool bForce ) } } } - else if ( rCEvt.GetCommand() == COMMAND_QUERYCHARPOSITION ) + else if ( rCEvt.GetCommand() == CommandEventId::QueryCharPosition ) { if ( eMode != SC_INPUT_NONE ) { @@ -3358,7 +3358,7 @@ bool ScInputHandler::InputCommand( const CommandEvent& rCEvt, bool bForce ) bUsed = true; - if ( rCEvt.GetCommand() == COMMAND_ENDEXTTEXTINPUT ) + if ( rCEvt.GetCommand() == CommandEventId::EndExtTextInput ) { // AutoInput after ext text input diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 7f57d9879d25..8b84cc632116 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -1595,8 +1595,8 @@ void ScTextWnd::MouseButtonUp( const MouseEvent& rMEvt ) void ScTextWnd::Command( const CommandEvent& rCEvt ) { bInputMode = true; - sal_uInt16 nCommand = rCEvt.GetCommand(); - if ( pEditView /* && nCommand == COMMAND_STARTDRAG */ ) + CommandEventId nCommand = rCEvt.GetCommand(); + if ( pEditView /* && nCommand == CommandEventId::StartDrag */ ) { ScModule* pScMod = SC_MOD(); ScTabViewShell* pStartViewSh = ScTabViewShell::GetActiveViewShell(); @@ -1609,11 +1609,11 @@ void ScTextWnd::Command( const CommandEvent& rCEvt ) pEditView->Command( rCEvt ); pScMod->SetInEditCommand( false ); - // COMMAND_STARTDRAG does not mean by far that the content was actually changed, + // CommandEventId::StartDrag does not mean by far that the content was actually changed, // so don't trigger an InputChanged. //! Detect if dragged with Move or forbid Drag&Move somehow - if ( nCommand == COMMAND_STARTDRAG ) + if ( nCommand == CommandEventId::StartDrag ) { // Is dragged onto another View? ScTabViewShell* pEndViewSh = ScTabViewShell::GetActiveViewShell(); @@ -1628,11 +1628,11 @@ void ScTextWnd::Command( const CommandEvent& rCEvt ) } } } - else if ( nCommand == COMMAND_CURSORPOS ) + else if ( nCommand == CommandEventId::CursorPos ) { - // don't call InputChanged for COMMAND_CURSORPOS + // don't call InputChanged for CommandEventId::CursorPos } - else if ( nCommand == COMMAND_INPUTLANGUAGECHANGE ) + else if ( nCommand == CommandEventId::InputLanguageChange ) { // #i55929# Font and font size state depends on input language if nothing is selected, // so the slots have to be invalidated when the input language is changed. @@ -1645,9 +1645,9 @@ void ScTextWnd::Command( const CommandEvent& rCEvt ) rBindings.Invalidate( SID_ATTR_CHAR_FONTHEIGHT ); } } - else if ( nCommand == COMMAND_WHEEL ) + else if ( nCommand == CommandEventId::Wheel ) { - //don't call InputChanged for COMMAND_WHEEL + //don't call InputChanged for CommandEventId::Wheel } else SC_MOD()->InputChanged( pEditView ); @@ -1662,7 +1662,7 @@ void ScTextWnd::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel ) { if ( pEditView ) { - CommandEvent aDragEvent( rPosPixel, COMMAND_STARTDRAG, true ); + CommandEvent aDragEvent( rPosPixel, CommandEventId::StartDrag, true ); pEditView->Command( aDragEvent ); // handling of d&d to different view (CancelHandler) can't be done here, diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx index 766ab71cd62d..8d29dc1b9349 100644 --- a/sc/source/ui/dbgui/csvgrid.cxx +++ b/sc/source/ui/dbgui/csvgrid.cxx @@ -949,7 +949,7 @@ void ScCsvGrid::Command( const CommandEvent& rCEvt ) { switch( rCEvt.GetCommand() ) { - case COMMAND_CONTEXTMENU: + case CommandEventId::ContextMenu: { if( rCEvt.IsMouseEvent() ) { @@ -973,7 +973,7 @@ void ScCsvGrid::Command( const CommandEvent& rCEvt ) } } break; - case COMMAND_WHEEL: + case CommandEventId::Wheel: { Point aPoint; Rectangle aRect( aPoint, maWinSize ); diff --git a/sc/source/ui/drawfunc/fupoor.cxx b/sc/source/ui/drawfunc/fupoor.cxx index 7f1a01bd40a5..b9e4eae8a67b 100644 --- a/sc/source/ui/drawfunc/fupoor.cxx +++ b/sc/source/ui/drawfunc/fupoor.cxx @@ -177,7 +177,7 @@ bool FuPoor::KeyInput(const KeyEvent& /* rKEvt */) sal_uInt8 FuPoor::Command(const CommandEvent& rCEvt) { - if ( COMMAND_STARTDRAG == rCEvt.GetCommand() ) + if ( CommandEventId::StartDrag == rCEvt.GetCommand() ) { //!!! sollte Joe eigentlich machen: // nur, wenn im Outliner was selektiert ist, darf diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx index d7854dd9e1c0..32bcda49cf46 100644 --- a/sc/source/ui/miscdlgs/acredlin.cxx +++ b/sc/source/ui/miscdlgs/acredlin.cxx @@ -1697,7 +1697,7 @@ IMPL_LINK_NOARG(ScAcceptChgDlg, CommandHdl) const CommandEvent aCEvt(pTheView->GetCommandEvent()); - if(aCEvt.GetCommand()==COMMAND_CONTEXTMENU) + if(aCEvt.GetCommand()==CommandEventId::ContextMenu) { ScPopupMenu aPopup(ScResId(RID_POPUP_CHANGES)); diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index 2e131c804bb4..30ebd411df31 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -567,7 +567,7 @@ void ScContentTree::Command( const CommandEvent& rCEvt ) switch ( rCEvt.GetCommand() ) { - case COMMAND_STARTDRAG: + case CommandEventId::StartDrag: // Aus dem ExecuteDrag heraus kann der Navigator geloescht werden // (beim Umschalten auf einen anderen Dokument-Typ), das wuerde aber // den StarView MouseMove-Handler, der Command() aufruft, umbringen. @@ -578,7 +578,7 @@ void ScContentTree::Command( const CommandEvent& rCEvt ) bDone = true; break; - case COMMAND_CONTEXTMENU: + case CommandEventId::ContextMenu: { // Drag-Drop Modus @@ -648,6 +648,7 @@ void ScContentTree::Command( const CommandEvent& rCEvt ) } } break; + default: break; } if (!bDone) diff --git a/sc/source/ui/navipi/scenwnd.cxx b/sc/source/ui/navipi/scenwnd.cxx index 70ca0bd45fbb..22ebb99c5eca 100644 --- a/sc/source/ui/navipi/scenwnd.cxx +++ b/sc/source/ui/navipi/scenwnd.cxx @@ -129,7 +129,7 @@ bool ScScenarioListBox::Notify( NotifyEvent& rNEvt ) else if ( rNEvt.GetType() == MouseNotifyEvent::COMMAND && GetSelectEntryCount() ) { const CommandEvent* pCEvt = rNEvt.GetCommandEvent(); - if ( pCEvt && pCEvt->GetCommand() == COMMAND_CONTEXTMENU ) + if ( pCEvt && pCEvt->GetCommand() == CommandEventId::ContextMenu ) { if( const ScenarioEntry* pEntry = GetSelectedEntry() ) { diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index be2ff5e4775a..e59acb922793 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -2918,7 +2918,7 @@ void ScGridWindow::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel ) HideNoteMarker(); - CommandEvent aDragEvent( rPosPixel, COMMAND_STARTDRAG, true ); + CommandEvent aDragEvent( rPosPixel, CommandEventId::StartDrag, true ); if (bEEMouse && pViewData->HasEditView( eWhich )) { @@ -2969,25 +2969,25 @@ void ScGridWindow::Command( const CommandEvent& rCEvt ) // menu from an inplace client is closed. Now we have the chance to // deactivate the inplace client without any problem regarding parent // windows and code on the stack. - sal_uInt16 nCmd = rCEvt.GetCommand(); + CommandEventId nCmd = rCEvt.GetCommand(); ScTabViewShell* pTabViewSh = pViewData->GetViewShell(); SfxInPlaceClient* pClient = pTabViewSh->GetIPClient(); if ( pClient && pClient->IsObjectInPlaceActive() && - nCmd == COMMAND_CONTEXTMENU ) + nCmd == CommandEventId::ContextMenu ) { pTabViewSh->DeactivateOle(); return; } ScModule* pScMod = SC_MOD(); - OSL_ENSURE( nCmd != COMMAND_STARTDRAG, "ScGridWindow::Command called with COMMAND_STARTDRAG" ); + OSL_ENSURE( nCmd != CommandEventId::StartDrag, "ScGridWindow::Command called with CommandEventId::StartDrag" ); - if ( nCmd == COMMAND_STARTEXTTEXTINPUT || - nCmd == COMMAND_ENDEXTTEXTINPUT || - nCmd == COMMAND_EXTTEXTINPUT || - nCmd == COMMAND_CURSORPOS || - nCmd == COMMAND_QUERYCHARPOSITION ) + if ( nCmd == CommandEventId::StartExtTextInput || + nCmd == CommandEventId::EndExtTextInput || + nCmd == CommandEventId::ExtTextInput || + nCmd == CommandEventId::CursorPos || + nCmd == CommandEventId::QueryCharPosition ) { bool bEditView = pViewData->HasEditView( eWhich ); if (!bEditView) @@ -3005,7 +3005,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt ) } } - if ( nCmd == COMMAND_CURSORPOS && !bEditView ) + if ( nCmd == CommandEventId::CursorPos && !bEditView ) { // CURSORPOS may be called without following text input, // to set the input method window position @@ -3027,7 +3027,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt ) return; } - if ( nCmd == COMMAND_PASTESELECTION ) + if ( nCmd == CommandEventId::PasteSelection ) { if ( bEEMouse ) { @@ -3041,7 +3041,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt ) return; } - if ( nCmd == COMMAND_INPUTLANGUAGECHANGE ) + if ( nCmd == CommandEventId::InputLanguageChange ) { // #i55929# Font and font size state depends on input language if nothing is selected, // so the slots have to be invalidated when the input language is changed. @@ -3052,7 +3052,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt ) return; } - if ( nCmd == COMMAND_WHEEL || nCmd == COMMAND_STARTAUTOSCROLL || nCmd == COMMAND_AUTOSCROLL ) + if ( nCmd == CommandEventId::Wheel || nCmd == CommandEventId::StartAutoScroll || nCmd == CommandEventId::AutoScroll ) { bool bDone = pViewData->GetView()->ScrollCommand( rCEvt, eWhich ); if (!bDone) @@ -3065,7 +3065,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt ) if (bDisable) return; - if ( nCmd == COMMAND_CONTEXTMENU && !SC_MOD()->GetIsWaterCan() ) + if ( nCmd == CommandEventId::ContextMenu && !SC_MOD()->GetIsWaterCan() ) { bool bMouse = rCEvt.IsMouseEvent(); if ( bMouse && nMouseStatus == SC_GM_IGNORE ) diff --git a/sc/source/ui/view/hdrcont.cxx b/sc/source/ui/view/hdrcont.cxx index 77e1ce12cab6..15407ea88133 100644 --- a/sc/source/ui/view/hdrcont.cxx +++ b/sc/source/ui/view/hdrcont.cxx @@ -811,8 +811,8 @@ void ScHeaderControl::Tracking( const TrackingEvent& rTEvt ) void ScHeaderControl::Command( const CommandEvent& rCEvt ) { - sal_uInt16 nCmd = rCEvt.GetCommand(); - if ( nCmd == COMMAND_CONTEXTMENU ) + CommandEventId nCmd = rCEvt.GetCommand(); + if ( nCmd == CommandEventId::ContextMenu ) { StopMarking(); // finish selection / dragging @@ -861,7 +861,7 @@ void ScHeaderControl::Command( const CommandEvent& rCEvt ) pViewSh->GetDispatcher()->ExecutePopup( aResId ); } } - else if ( nCmd == COMMAND_STARTDRAG ) + else if ( nCmd == CommandEventId::StartDrag ) { pSelEngine->Command( rCEvt ); } diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx index b5448cbc64bd..0feb97d64502 100644 --- a/sc/source/ui/view/preview.cxx +++ b/sc/source/ui/view/preview.cxx @@ -639,14 +639,14 @@ void ScPreview::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& void ScPreview::Command( const CommandEvent& rCEvt ) { - sal_uInt16 nCmd = rCEvt.GetCommand(); - if ( nCmd == COMMAND_WHEEL || nCmd == COMMAND_STARTAUTOSCROLL || nCmd == COMMAND_AUTOSCROLL ) + CommandEventId nCmd = rCEvt.GetCommand(); + if ( nCmd == CommandEventId::Wheel || nCmd == CommandEventId::StartAutoScroll || nCmd == CommandEventId::AutoScroll ) { bool bDone = pViewShell->ScrollCommand( rCEvt ); if (!bDone) Window::Command(rCEvt); } - else if ( nCmd == COMMAND_CONTEXTMENU ) + else if ( nCmd == CommandEventId::ContextMenu ) SfxDispatcher::ExecutePopup(); else Window::Command( rCEvt ); diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx index 98156a8f2382..7801b719c08b 100644 --- a/sc/source/ui/view/tabcont.cxx +++ b/sc/source/ui/view/tabcont.cxx @@ -425,24 +425,20 @@ void ScTabControl::Command( const CommandEvent& rCEvt ) // ViewFrame erstmal aktivieren (Bug 19493): pViewSh->SetActive(); - sal_uInt16 nCmd = rCEvt.GetCommand(); - if ( nCmd == COMMAND_CONTEXTMENU ) + if ( rCEvt.GetCommand() == CommandEventId::ContextMenu && !bDisable) { - if (!bDisable) - { - // #i18735# select the page that is under the mouse cursor - // if multiple tables are selected and the one under the cursor - // is not part of them then unselect them - sal_uInt16 nId = GetPageId( rCEvt.GetMousePosPixel() ); - SwitchToPageId(nId); - - // #i52073# OLE inplace editing has to be stopped before showing the sheet tab context menu - pViewSh->DeactivateOle(); - - // Popup-Menu: - // get Dispatcher from ViewData (ViewFrame) instead of Shell (Frame), so it can't be null - pViewData->GetDispatcher().ExecutePopup( ScResId(RID_POPUP_TAB) ); - } + // #i18735# select the page that is under the mouse cursor + // if multiple tables are selected and the one under the cursor + // is not part of them then unselect them + sal_uInt16 nId = GetPageId( rCEvt.GetMousePosPixel() ); + SwitchToPageId(nId); + + // #i52073# OLE inplace editing has to be stopped before showing the sheet tab context menu + pViewSh->DeactivateOle(); + + // Popup-Menu: + // get Dispatcher from ViewData (ViewFrame) instead of Shell (Frame), so it can't be null + pViewData->GetDispatcher().ExecutePopup( ScResId(RID_POPUP_TAB) ); } } @@ -454,7 +450,7 @@ void ScTabControl::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel ) if (!bDisable) { vcl::Region aRegion( Rectangle(0,0,0,0) ); - CommandEvent aCEvt( rPosPixel, COMMAND_STARTDRAG, true ); // needed for StartDrag + CommandEvent aCEvt( rPosPixel, CommandEventId::StartDrag, true ); // needed for StartDrag if (TabBar::StartDrag( aCEvt, aRegion )) DoDrag( aRegion ); } |