summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-06-23 14:30:14 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-06-24 08:41:01 +0000
commitc144288abe73262178a8fd94baef895e1744c304 (patch)
tree47d6a0ba287de534708333d81f52b8f5de0f7a88 /comphelper
parent17189e8e63254dbe5e4c9c755a4817664e4ee0d5 (diff)
loplugin:singlevalfields in comphelper
Change-Id: I22711d226a266dc00c32beff54398a55c4c9691a Reviewed-on: https://gerrit.libreoffice.org/26599 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/container/containermultiplexer.cxx10
-rw-r--r--comphelper/source/misc/SelectionMultiplex.cxx21
2 files changed, 4 insertions, 27 deletions
diff --git a/comphelper/source/container/containermultiplexer.cxx b/comphelper/source/container/containermultiplexer.cxx
index c8fd633a0282..b7e3c93becbe 100644
--- a/comphelper/source/container/containermultiplexer.cxx
+++ b/comphelper/source/container/containermultiplexer.cxx
@@ -90,7 +90,6 @@ namespace comphelper
const Reference< XContainer >& _rxContainer)
:m_xContainer(_rxContainer)
,m_pListener(_pListener)
- ,m_nLockCount(0)
{
if (m_pListener)
m_pListener->setAdapter(this);
@@ -138,8 +137,7 @@ namespace comphelper
if (m_pListener)
{
// tell the listener
- if (!locked())
- m_pListener->_disposing(_rSource);
+ m_pListener->_disposing(_rSource);
// disconnect the listener
if ( m_pListener )
m_pListener->setAdapter(nullptr);
@@ -152,21 +150,21 @@ namespace comphelper
void SAL_CALL OContainerListenerAdapter::elementInserted( const ContainerEvent& _rEvent ) throw(RuntimeException, std::exception)
{
- if (m_pListener && !locked())
+ if (m_pListener)
m_pListener->_elementInserted(_rEvent);
}
void SAL_CALL OContainerListenerAdapter::elementRemoved( const ContainerEvent& _rEvent ) throw(RuntimeException, std::exception)
{
- if (m_pListener && !locked())
+ if (m_pListener)
m_pListener->_elementRemoved(_rEvent);
}
void SAL_CALL OContainerListenerAdapter::elementReplaced( const ContainerEvent& _rEvent ) throw(RuntimeException, std::exception)
{
- if (m_pListener && !locked())
+ if (m_pListener)
m_pListener->_elementReplaced(_rEvent);
}
diff --git a/comphelper/source/misc/SelectionMultiplex.cxx b/comphelper/source/misc/SelectionMultiplex.cxx
index 9f853ed28b05..f7122d40b946 100644
--- a/comphelper/source/misc/SelectionMultiplex.cxx
+++ b/comphelper/source/misc/SelectionMultiplex.cxx
@@ -32,8 +32,6 @@ using namespace ::com::sun::star::view;
OSelectionChangeListener::~OSelectionChangeListener()
{
- if (m_pAdapter)
- m_pAdapter->dispose();
}
@@ -65,7 +63,6 @@ OSelectionChangeMultiplexer::OSelectionChangeMultiplexer(OSelectionChangeListene
:m_xSet(_rxSet)
,m_pListener(_pListener)
,m_nLockCount(0)
- ,m_bListening(false)
{
m_pListener->setAdapter(this);
osl_atomic_increment(&m_refCount);
@@ -94,23 +91,6 @@ void OSelectionChangeMultiplexer::unlock()
}
-void OSelectionChangeMultiplexer::dispose()
-{
- if (m_bListening)
- {
- Reference< XSelectionChangeListener> xPreventDelete(this);
-
- m_xSet->removeSelectionChangeListener(xPreventDelete);
-
- m_pListener->setAdapter(nullptr);
-
- m_pListener = nullptr;
- m_bListening = false;
-
- m_xSet = nullptr;
- }
-}
-
// XEventListener
void SAL_CALL OSelectionChangeMultiplexer::disposing( const EventObject& _rSource) throw( RuntimeException, std::exception)
@@ -126,7 +106,6 @@ void SAL_CALL OSelectionChangeMultiplexer::disposing( const EventObject& _rSour
}
m_pListener = nullptr;
- m_bListening = false;
m_xSet = nullptr;
}