diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-22 11:11:41 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-24 07:05:49 +0100 |
commit | c9d4adb3cf08376ca1b5c7cef88340e294ca168f (patch) | |
tree | d381883411dbf6ae4ebec7574c3c00796c28e793 /dbaccess | |
parent | f359f87d5f56c0d5905a8852cebe8b95bd47d9f3 (diff) |
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@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/query.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/core/api/query.hxx | 6 | ||||
-rw-r--r-- | dbaccess/source/core/api/querycontainer.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/core/inc/querycontainer.hxx | 6 |
4 files changed, 12 insertions, 12 deletions
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 |