diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-21 14:23:22 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-22 07:36:10 +0100 |
commit | 49d074451c58932f4193169fabcc2256b49977f4 (patch) | |
tree | 0e58cd2d0639df331f81069ea102ca946f878b6a /sw/source | |
parent | 54addc81ded0cc70a8e179b26141834e75be8e8e (diff) |
convert FieldDialogPressedButton to scoped enum
and removed unused EDIT
Change-Id: I1bd4ac135f280e19ffbf51364f406f8068130874
Reviewed-on: https://gerrit.libreoffice.org/63743
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/uibase/inc/wrtsh.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/wrtsh/wrtsh2.cxx | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx index 8e5717e5e045..6697fd01bd03 100644 --- a/sw/source/uibase/inc/wrtsh.hxx +++ b/sw/source/uibase/inc/wrtsh.hxx @@ -362,7 +362,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); enum DoType { UNDO, REDO, REPEAT }; - enum FieldDialogPressedButton { BTN_NONE, BTN_EDIT, BTN_PREV, BTN_NEXT }; + enum class FieldDialogPressedButton { NONE, Previous, Next }; void Do( DoType eDoType, sal_uInt16 nCnt = 1 ); OUString GetDoString( DoType eDoType ) const; diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx index 8d1707761ab6..bff262badbf3 100644 --- a/sw/source/uibase/wrtsh/wrtsh2.cxx +++ b/sw/source/uibase/wrtsh/wrtsh2.cxx @@ -146,7 +146,7 @@ void SwWrtShell::UpdateInputFields( SwInputFieldList* pLst ) bool bCancel = false; size_t nIndex = 0; - FieldDialogPressedButton ePressedButton = BTN_NONE; + FieldDialogPressedButton ePressedButton = FieldDialogPressedButton::NONE; SwField* pField = GetCurField(); if (pField) @@ -179,9 +179,9 @@ void SwWrtShell::UpdateInputFields( SwInputFieldList* pLst ) // Otherwise update error at multi-selection: pTmp->GetField(nIndex)->GetTyp()->UpdateFields(); - if (ePressedButton == BTN_PREV && nIndex > 0) + if (ePressedButton == FieldDialogPressedButton::Previous && nIndex > 0) nIndex--; - else if (ePressedButton == BTN_NEXT && nIndex < nCnt - 1) + else if (ePressedButton == FieldDialogPressedButton::Next && nIndex < nCnt - 1) nIndex++; else bCancel = true; @@ -268,9 +268,9 @@ bool SwWrtShell::StartInputFieldDlg(SwField* pField, bool bPrevButton, bool bNex if (pPressedButton) { if (pDlg->PrevButtonPressed()) - *pPressedButton = BTN_PREV; + *pPressedButton = FieldDialogPressedButton::Previous; else if (pDlg->NextButtonPressed()) - *pPressedButton = BTN_NEXT; + *pPressedButton = FieldDialogPressedButton::Next; } pDlg.disposeAndClear(); @@ -288,9 +288,9 @@ bool SwWrtShell::StartDropDownFieldDlg(SwField* pField, bool bPrevButton, bool b if (pPressedButton) { if (pDlg->PrevButtonPressed()) - *pPressedButton = BTN_PREV; + *pPressedButton = FieldDialogPressedButton::Previous; else if (pDlg->NextButtonPressed()) - *pPressedButton = BTN_NEXT; + *pPressedButton = FieldDialogPressedButton::Next; } pDlg.disposeAndClear(); |