[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang sw/source toolkit/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Nov 22 06:36:24 UTC 2018


 compilerplugins/clang/unusedenumconstants.untouched.results |    8 ------
 sw/source/uibase/inc/wrtsh.hxx                              |    2 -
 sw/source/uibase/wrtsh/wrtsh2.cxx                           |   14 ++++++------
 toolkit/source/controls/grid/defaultgriddatamodel.cxx       |    2 -
 4 files changed, 8 insertions(+), 18 deletions(-)

New commits:
commit 49d074451c58932f4193169fabcc2256b49977f4
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Nov 21 14:23:22 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Nov 22 07:36:10 2018 +0100

    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 at collabora.co.uk>

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();
commit 54addc81ded0cc70a8e179b26141834e75be8e8e
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Nov 21 13:59:06 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Nov 22 07:35:57 2018 +0100

    remove unused broadcast_type enum
    
    Change-Id: I2939928e393ef2e306e840488053ca50957c10ce
    Reviewed-on: https://gerrit.libreoffice.org/63742
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/compilerplugins/clang/unusedenumconstants.untouched.results b/compilerplugins/clang/unusedenumconstants.untouched.results
index 4cd99c3ed3e9..e2149c99eb2d 100644
--- a/compilerplugins/clang/unusedenumconstants.untouched.results
+++ b/compilerplugins/clang/unusedenumconstants.untouched.results
@@ -526,12 +526,6 @@ sw/source/uibase/utlui/glbltree.cxx:147
     enum GLOBAL_CONTEXT_IDX IDX_STR_UPDATE_LINK
 sw/source/uibase/utlui/glbltree.cxx:148
     enum GLOBAL_CONTEXT_IDX IDX_STR_UPDATE_ALL
-toolkit/source/controls/grid/defaultgriddatamodel.cxx:45
-    enum (anonymous namespace)::broadcast_type row_added
-toolkit/source/controls/grid/defaultgriddatamodel.cxx:45
-    enum (anonymous namespace)::broadcast_type data_changed
-toolkit/source/controls/grid/defaultgriddatamodel.cxx:45
-    enum (anonymous namespace)::broadcast_type row_removed
 ucb/source/ucp/webdav-neon/DAVTypes.hxx:195
     enum webdav_ucp::Depth DAVINFINITY
 ucbhelper/source/client/proxydecider.cxx:119
diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.cxx b/toolkit/source/controls/grid/defaultgriddatamodel.cxx
index 35252453c2cc..892685fd74f9 100644
--- a/toolkit/source/controls/grid/defaultgriddatamodel.cxx
+++ b/toolkit/source/controls/grid/defaultgriddatamodel.cxx
@@ -42,8 +42,6 @@ using namespace ::com::sun::star::lang;
 
 namespace {
 
-enum broadcast_type { row_added, row_removed, data_changed};
-
 typedef ::cppu::WeakComponentImplHelper    <   XMutableGridDataModel
                                             ,   XServiceInfo
                                             >   DefaultGridDataModel_Base;


More information about the Libreoffice-commits mailing list