[Libreoffice-commits] core.git: compilerplugins/clang dbaccess/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Nov 24 06:06:10 UTC 2018


 compilerplugins/clang/unusedenumconstants.untouched.results |    4 ----
 dbaccess/source/core/api/query.cxx                          |    6 +++---
 dbaccess/source/core/api/query.hxx                          |    6 +++---
 dbaccess/source/core/api/querycontainer.cxx                 |    6 +++---
 dbaccess/source/core/inc/querycontainer.hxx                 |    6 +++---
 5 files changed, 12 insertions(+), 16 deletions(-)

New commits:
commit c9d4adb3cf08376ca1b5c7cef88340e294ca168f
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Nov 22 11:11:41 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Nov 24 07:05:49 2018 +0100

    convert AGGREGATE_ACTION to scoped enum
    
    and rename, and drop unused values
    
    Change-Id: I71eebed1c766d1f0044f6f263e3584fc263a8b1e
    Reviewed-on: https://gerrit.libreoffice.org/63906
    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 11c0bae17d1f..2639cbe180bb 100644
--- a/compilerplugins/clang/unusedenumconstants.untouched.results
+++ b/compilerplugins/clang/unusedenumconstants.untouched.results
@@ -14,10 +14,6 @@ cui/source/inc/hldoctp.hxx:56
     enum SvxHyperlinkDocTp::EPathType Type_ExistsDir
 cui/source/inc/hldoctp.hxx:56
     enum SvxHyperlinkDocTp::EPathType Type_Dir
-dbaccess/source/core/api/query.hxx:66
-    enum dbaccess::OQuery::AGGREGATE_ACTION FLUSHING
-dbaccess/source/core/inc/querycontainer.hxx:72
-    enum dbaccess::OQueryContainer::AGGREGATE_ACTION FLUSHING
 drawinglayer/source/tools/emfpbrush.hxx:32
     enum emfplushelper::EmfPlusHatchStyle HatchStyleVertical
 drawinglayer/source/tools/emfpbrush.hxx:33
diff --git a/dbaccess/source/core/api/query.cxx b/dbaccess/source/core/api/query.cxx
index 5ffdde485357..bb15f191e67e 100644
--- a/dbaccess/source/core/api/query.cxx
+++ b/dbaccess/source/core/api/query.cxx
@@ -74,7 +74,7 @@ OQuery::OQuery( const Reference< XPropertySet >& _rxCommandDefinition
     ,m_xCommandDefinition(_rxCommandDefinition)
     ,m_xConnection(_rxConn)
     ,m_pWarnings( nullptr )
-    ,m_eDoingCurrently(NONE)
+    ,m_eDoingCurrently(AggregateAction::NONE)
 {
     registerProperties();
     ODataSettings::registerPropertiesFor(this);
@@ -220,7 +220,7 @@ void SAL_CALL OQuery::propertyChange( const PropertyChangeEvent& _rSource )
         OSL_ENSURE(_rSource.Source.get() == Reference< XInterface >(m_xCommandDefinition, UNO_QUERY).get(),
             "OQuery::propertyChange : where did this call come from ?");
 
-        if (m_eDoingCurrently == SETTING_PROPERTIES)
+        if (m_eDoingCurrently == AggregateAction::SettingProperties)
             // we're setting the property ourself, so we will do the necessary notifications later
             return;
 
@@ -284,7 +284,7 @@ void OQuery::setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle, const Any& _r
         m_xCommandPropInfo->hasPropertyByName(sAggPropName))
     {   // the base class holds the property values itself, but we have to forward this to our CommandDefinition
 
-        m_eDoingCurrently = SETTING_PROPERTIES;
+        m_eDoingCurrently = AggregateAction::SettingProperties;
         OAutoActionReset aAutoReset(*this);
         m_xCommandDefinition->setPropertyValue(sAggPropName, _rValue);
 
diff --git a/dbaccess/source/core/api/query.hxx b/dbaccess/source/core/api/query.hxx
index fc0f499d0bb6..7a7b8c2fcd9f 100644
--- a/dbaccess/source/core/api/query.hxx
+++ b/dbaccess/source/core/api/query.hxx
@@ -63,8 +63,8 @@ protected:
     ::dbtools::WarningsContainer*                             m_pWarnings;
 
     // possible actions on our "aggregate"
-    enum AGGREGATE_ACTION { NONE, SETTING_PROPERTIES, FLUSHING };
-    AGGREGATE_ACTION    m_eDoingCurrently;
+    enum class AggregateAction { NONE, SettingProperties };
+    AggregateAction    m_eDoingCurrently;
 
     /** a class which automatically resets m_eDoingCurrently in its destructor
     */
@@ -75,7 +75,7 @@ protected:
         OQuery&             m_rActor;
     public:
         explicit OAutoActionReset(OQuery& _rActor) : m_rActor(_rActor) { }
-        ~OAutoActionReset() { m_rActor.m_eDoingCurrently = NONE; }
+        ~OAutoActionReset() { m_rActor.m_eDoingCurrently = AggregateAction::NONE; }
     };
 
 protected:
diff --git a/dbaccess/source/core/api/querycontainer.cxx b/dbaccess/source/core/api/querycontainer.cxx
index edf1237070c7..a9536a4e789b 100644
--- a/dbaccess/source/core/api/querycontainer.cxx
+++ b/dbaccess/source/core/api/querycontainer.cxx
@@ -67,7 +67,7 @@ OQueryContainer::OQueryContainer(
     ,m_pWarnings( _pWarnings )
     ,m_xCommandDefinitions(_rxCommandDefinitions)
     ,m_xConnection(_rxConn)
-    ,m_eDoingCurrently(NONE)
+    ,m_eDoingCurrently(AggregateAction::NONE)
 {
 }
 
@@ -180,7 +180,7 @@ void SAL_CALL OQueryContainer::appendByDescriptor( const Reference< XPropertySet
 
     // insert the basic object into the definition container
     {
-        m_eDoingCurrently = INSERTING;
+        m_eDoingCurrently = AggregateAction::Inserting;
         OAutoActionReset aAutoReset(*this);
         m_xCommandDefinitions->insertByName(sNewObjectName, makeAny(xCommandDefinitionPart));
     }
@@ -235,7 +235,7 @@ void SAL_CALL OQueryContainer::elementInserted( const css::container::ContainerE
     _rEvent.Accessor >>= sElementName;
     {
         MutexGuard aGuard(m_aMutex);
-        if (INSERTING == m_eDoingCurrently)
+        if (AggregateAction::Inserting == m_eDoingCurrently)
             // nothing to do, we're inserting via an "appendByDescriptor"
             return;
 
diff --git a/dbaccess/source/core/inc/querycontainer.hxx b/dbaccess/source/core/inc/querycontainer.hxx
index c0621e9c586f..c603cd40dbe6 100644
--- a/dbaccess/source/core/inc/querycontainer.hxx
+++ b/dbaccess/source/core/inc/querycontainer.hxx
@@ -69,8 +69,8 @@ namespace dbaccess
         css::uno::Reference< css::sdbc::XConnection >
                                         m_xConnection;
         // possible actions on our "aggregate"
-        enum AGGREGATE_ACTION { NONE, INSERTING, FLUSHING };
-        AGGREGATE_ACTION        m_eDoingCurrently;
+        enum class AggregateAction { NONE, Inserting };
+        AggregateAction        m_eDoingCurrently;
 
         /** a class which automatically resets m_eDoingCurrently in its destructor
         */
@@ -81,7 +81,7 @@ namespace dbaccess
             OQueryContainer&        m_rActor;
         public:
             OAutoActionReset(OQueryContainer& _rActor) : m_rActor(_rActor) { }
-            ~OAutoActionReset() { m_rActor.m_eDoingCurrently = NONE; }
+            ~OAutoActionReset() { m_rActor.m_eDoingCurrently = AggregateAction::NONE; }
         };
 
         // ODefinitionContainer


More information about the Libreoffice-commits mailing list