Kaydet (Commit) 49d07445 authored tarafından Noel Grandin's avatar Noel Grandin

convert FieldDialogPressedButton to scoped enum

and removed unused EDIT

Change-Id: I1bd4ac135f280e19ffbf51364f406f8068130874
Reviewed-on: https://gerrit.libreoffice.org/63743
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 54addc81
......@@ -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
......
......@@ -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;
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment