diff options
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/docvw/SidebarTxtControl.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/docvw/edtdd.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/docvw/edtwin.cxx | 41 | ||||
-rw-r--r-- | sw/source/uibase/docvw/srcedtw.cxx | 14 | ||||
-rw-r--r-- | sw/source/uibase/misc/redlndlg.cxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/uiview/pview.cxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewport.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/utlui/bookctrl.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/utlui/tmplctrl.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/utlui/unotools.cxx | 8 |
10 files changed, 44 insertions, 42 deletions
diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx index 96ccdfef97b6..5807f27cfdca 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.cxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx @@ -342,7 +342,7 @@ IMPL_LINK( SidebarTxtControl, Select, Menu*, pSelMenu ) void SidebarTxtControl::Command( const CommandEvent& rCEvt ) { - if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU ) + if ( rCEvt.GetCommand() == CommandEventId::ContextMenu ) { if ( !mrSidebarWin.IsProtected() && GetTextView() && @@ -380,7 +380,7 @@ void SidebarTxtControl::Command( const CommandEvent& rCEvt ) } } else - if (rCEvt.GetCommand() == COMMAND_WHEEL) + if (rCEvt.GetCommand() == CommandEventId::Wheel) { if (mrSidebarWin.IsScrollbarVisible()) { diff --git a/sw/source/uibase/docvw/edtdd.cxx b/sw/source/uibase/docvw/edtdd.cxx index 72dea948881c..e0dd4aa90448 100644 --- a/sw/source/uibase/docvw/edtdd.cxx +++ b/sw/source/uibase/docvw/edtdd.cxx @@ -71,7 +71,7 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel ) SwWrtShell &rSh = m_rView.GetWrtShell(); if( rSh.GetDrawView() ) { - CommandEvent aDragEvent( rPosPixel, COMMAND_STARTDRAG, true ); + CommandEvent aDragEvent( rPosPixel, CommandEventId::StartDrag, true ); if( rSh.GetDrawView()->Command( aDragEvent, this ) ) { m_rView.GetViewFrame()->GetBindings().InvalidateAll(false); diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index ed45693a154c..a0475d67056c 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -5109,7 +5109,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) // windows and code on the stack. SfxInPlaceClient* pIPClient = rSh.GetSfxViewShell()->GetIPClient(); bool bIsOleActive = ( pIPClient && pIPClient->IsObjectInPlaceActive() ); - if ( bIsOleActive && ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU )) + if ( bIsOleActive && ( rCEvt.GetCommand() == CommandEventId::ContextMenu )) { rSh.FinishOLEObj(); return; @@ -5119,8 +5119,8 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) switch ( rCEvt.GetCommand() ) { - case COMMAND_CONTEXTMENU: - { + case CommandEventId::ContextMenu: + { const sal_uInt16 nId = SwInputChild::GetChildWindowId(); SwInputChild* pChildWin = static_cast<SwInputChild*>(GetView().GetViewFrame()-> GetChildWindow( nId )); @@ -5193,18 +5193,18 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) rSh.Do(SwWrtShell::UNDO); bCallBase = false; } - } - break; + } + break; - case COMMAND_WHEEL: - case COMMAND_STARTAUTOSCROLL: - case COMMAND_AUTOSCROLL: + case CommandEventId::Wheel: + case CommandEventId::StartAutoScroll: + case CommandEventId::AutoScroll: if( m_pShadCrsr ) delete m_pShadCrsr, m_pShadCrsr = 0; bCallBase = !m_rView.HandleWheelCommands( rCEvt ); break; - case COMMAND_STARTEXTTEXTINPUT: + case CommandEventId::StartExtTextInput: { bool bIsDocReadOnly = m_rView.GetDocShell()->IsReadOnly() && rSh.IsCrsrReadonly(); @@ -5227,7 +5227,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) } break; } - case COMMAND_ENDEXTTEXTINPUT: + case CommandEventId::EndExtTextInput: { bool bIsDocReadOnly = m_rView.GetDocShell()->IsReadOnly() && rSh.IsCrsrReadonly(); @@ -5278,7 +5278,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) } } break; - case COMMAND_EXTTEXTINPUT: + case CommandEventId::ExtTextInput: { bool bIsDocReadOnly = m_rView.GetDocShell()->IsReadOnly() && rSh.IsCrsrReadonly(); @@ -5323,11 +5323,11 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) } } break; - case COMMAND_CURSORPOS: + case CommandEventId::CursorPos: // will be handled by the base class break; - case COMMAND_PASTESELECTION: + case CommandEventId::PasteSelection: if( !m_rView.GetDocShell()->IsReadOnly() ) { TransferableDataHelper aDataHelper( @@ -5357,7 +5357,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) } } break; - case COMMAND_MODKEYCHANGE : + case CommandEventId::ModKeyChange : { const CommandModKeyData* pCommandData = rCEvt.GetModKeyData(); if (pCommandData->IsMod1() && !pCommandData->IsMod2()) @@ -5372,15 +5372,15 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) } } break; - case COMMAND_HANGUL_HANJA_CONVERSION : + case CommandEventId::HangulHanjaConversion : GetView().GetViewFrame()->GetDispatcher()->Execute(SID_HANGUL_HANJA_CONVERSION); break; - case COMMAND_INPUTLANGUAGECHANGE : + case CommandEventId::InputLanguageChange : // i#42732 - update state of fontname if input language changes g_bInputLanguageSwitched = true; SetUseInputLanguage( true ); break; - case COMMAND_SELECTIONCHANGE: + case CommandEventId::SelectionChange: { const CommandSelectionChangeData *pData = rCEvt.GetSelectionChangeData(); rSh.SttCrsrMove(); @@ -5391,7 +5391,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) rSh.EndCrsrMove( true ); } break; - case COMMAND_PREPARERECONVERSION: + case CommandEventId::PrepareReconversion: if( rSh.HasSelection() ) { SwPaM *pCrsr = rSh.GetCrsr(); @@ -5450,7 +5450,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) } } break; - case COMMAND_QUERYCHARPOSITION: + case CommandEventId::QueryCharPosition: { bool bVertical = rSh.IsInVerticalText(); const SwPosition& rPos = *rSh.GetCrsr()->GetPoint(); @@ -5492,10 +5492,11 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) bCallBase = false; } break; -#if OSL_DEBUG_LEVEL > 0 default: +#if OSL_DEBUG_LEVEL > 0 OSL_ENSURE( false, "unknown command." ); #endif + break; } if (bCallBase) Window::Command(rCEvt); diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx index 695019e5db0c..12fe31cac62c 100644 --- a/sw/source/uibase/docvw/srcedtw.cxx +++ b/sw/source/uibase/docvw/srcedtw.cxx @@ -417,12 +417,12 @@ void TextViewOutWin::Command( const CommandEvent& rCEvt ) { switch(rCEvt.GetCommand()) { - case COMMAND_CONTEXTMENU: + case CommandEventId::ContextMenu: SfxDispatcher::ExecutePopup(); break; - case COMMAND_WHEEL: - case COMMAND_STARTAUTOSCROLL: - case COMMAND_AUTOSCROLL: + case CommandEventId::Wheel: + case CommandEventId::StartAutoScroll: + case CommandEventId::AutoScroll: { const CommandWheelData* pWData = rCEvt.GetWheelData(); if( !pWData || CommandWheelMode::ZOOM != pWData->GetMode() ) @@ -763,9 +763,9 @@ void SwSrcEditWindow::Command( const CommandEvent& rCEvt ) { switch(rCEvt.GetCommand()) { - case COMMAND_WHEEL: - case COMMAND_STARTAUTOSCROLL: - case COMMAND_AUTOSCROLL: + case CommandEventId::Wheel: + case CommandEventId::StartAutoScroll: + case CommandEventId::AutoScroll: { const CommandWheelData* pWData = rCEvt.GetWheelData(); if( !pWData || CommandWheelMode::ZOOM != pWData->GetMode() ) diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx index b8cac8b31b33..fcefbb95523a 100644 --- a/sw/source/uibase/misc/redlndlg.cxx +++ b/sw/source/uibase/misc/redlndlg.cxx @@ -1026,7 +1026,7 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, CommandHdl) switch ( aCEvt.GetCommand() ) { - case COMMAND_CONTEXTMENU: + case CommandEventId::ContextMenu: { SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr(); SvTreeListEntry* pEntry = pTable->FirstSelected(); @@ -1183,6 +1183,7 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, CommandHdl) } } break; + default: break; } return 0; diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index 373026005082..04d43c4acb68 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -458,14 +458,14 @@ void SwPagePreviewWin::Command( const CommandEvent& rCEvt ) bool bCallBase = true; switch( rCEvt.GetCommand() ) { - case COMMAND_CONTEXTMENU: + case CommandEventId::ContextMenu: SfxDispatcher::ExecutePopup(); bCallBase = false; break; - case COMMAND_WHEEL: - case COMMAND_STARTAUTOSCROLL: - case COMMAND_AUTOSCROLL: + case CommandEventId::Wheel: + case CommandEventId::StartAutoScroll: + case CommandEventId::AutoScroll: { const CommandWheelData* pData = rCEvt.GetWheelData(); if( pData ) diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx index d803103f0692..1fa6a1721d7f 100644 --- a/sw/source/uibase/uiview/viewport.cxx +++ b/sw/source/uibase/uiview/viewport.cxx @@ -1241,7 +1241,7 @@ bool SwView::HandleWheelCommands( const CommandEvent& rCEvt ) // scrolling the deltaX deltaY Point deltaPoint( deltaX, deltaY ); CommandWheelData cmd( 0, 0, 0, CommandWheelMode::SCROLL, 0, false, true); - CommandEvent event(deltaPoint , COMMAND_WHEEL, true, &cmd ); + CommandEvent event(deltaPoint , CommandEventId::Wheel, true, &cmd ); m_pEditWin->HandleScrollCommand(event, m_pHScrollbar, m_pVScrollbar); } diff --git a/sw/source/uibase/utlui/bookctrl.cxx b/sw/source/uibase/utlui/bookctrl.cxx index bffd651de112..db8bcb838963 100644 --- a/sw/source/uibase/utlui/bookctrl.cxx +++ b/sw/source/uibase/utlui/bookctrl.cxx @@ -98,7 +98,7 @@ void SwBookmarkControl::Paint( const UserDrawEvent& ) void SwBookmarkControl::Command( const CommandEvent& rCEvt ) { - if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU && + if ( rCEvt.GetCommand() == CommandEventId::ContextMenu && !GetStatusBar().GetItemText( GetId() ).isEmpty() ) { BookmarkPopup_Impl aPop; diff --git a/sw/source/uibase/utlui/tmplctrl.cxx b/sw/source/uibase/utlui/tmplctrl.cxx index 7c7f960e11d5..d226e20310f2 100644 --- a/sw/source/uibase/utlui/tmplctrl.cxx +++ b/sw/source/uibase/utlui/tmplctrl.cxx @@ -90,7 +90,7 @@ void SwTemplateControl::Paint( const UserDrawEvent& ) void SwTemplateControl::Command( const CommandEvent& rCEvt ) { - if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU && + if ( rCEvt.GetCommand() == CommandEventId::ContextMenu && !GetStatusBar().GetItemText( GetId() ).isEmpty() ) { SwTemplatePopup_Impl aPop; diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx index d71b4c50fb35..6d870cfabed9 100644 --- a/sw/source/uibase/utlui/unotools.cxx +++ b/sw/source/uibase/utlui/unotools.cxx @@ -525,16 +525,16 @@ void SwFrmCtrlWindow::Command( const CommandEvent& rCEvt ) { switch ( rCEvt.GetCommand() ) { - case COMMAND_CONTEXTMENU: + case CommandEventId::ContextMenu: { //#125881# quickly clicking crashes because the control is not fully initialized if(pExampleFrame->GetController().is()) pExampleFrame->CreatePopup(rCEvt.GetMousePosPixel()); } break; - case COMMAND_WHEEL: - case COMMAND_STARTAUTOSCROLL: - case COMMAND_AUTOSCROLL: + case CommandEventId::Wheel: + case CommandEventId::StartAutoScroll: + case CommandEventId::AutoScroll: break; default:; } |