summaryrefslogtreecommitdiff
path: root/sw/source/uibase/docvw/edtwin.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-07 15:25:20 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-05-11 12:17:42 +0000
commit82d68f9cbce4073a727c43b4a8e81d39871b71eb (patch)
tree64b3a9e1092586afee46899adfd00070821613b8 /sw/source/uibase/docvw/edtwin.cxx
parent19ea033f380aa196c9c868a3cdb43e967eb42abe (diff)
convert COMMAND_ constants to scoped enum
Change-Id: I88e67f89dbbab0646e8f106dfeb32c6ee1bb0b95 Reviewed-on: https://gerrit.libreoffice.org/15671 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw/source/uibase/docvw/edtwin.cxx')
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx41
1 files changed, 21 insertions, 20 deletions
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);