diff options
-rw-r--r-- | compilerplugins/clang/unusedenumconstants.untouched.results | 2 | ||||
-rw-r--r-- | sw/source/uibase/inc/wrtsh.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/wrtsh/wrtsh2.cxx | 14 |
3 files changed, 8 insertions, 10 deletions
diff --git a/compilerplugins/clang/unusedenumconstants.untouched.results b/compilerplugins/clang/unusedenumconstants.untouched.results index e2149c99eb2d..3697556b248a 100644 --- a/compilerplugins/clang/unusedenumconstants.untouched.results +++ b/compilerplugins/clang/unusedenumconstants.untouched.results @@ -512,8 +512,6 @@ sw/source/uibase/inc/tautofmt.hxx:36 enum AutoFormatLine RIGHT_LINE sw/source/uibase/inc/tautofmt.hxx:36 enum AutoFormatLine TOP_LINE -sw/source/uibase/inc/wrtsh.hxx:365 - enum SwWrtShell::FieldDialogPressedButton BTN_EDIT sw/source/uibase/utlui/content.cxx:824 enum STR_CONTEXT_IDX IDX_STR_LINK_REGION sw/source/uibase/utlui/content.cxx:825 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(); |