summaryrefslogtreecommitdiff
path: root/include/svl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-02-15 14:10:30 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-02-16 00:35:10 +0100
commit7faa218231b7a807412feada3aa1223b43b5626e (patch)
tree08ea7a2e4fc9e88a8158dc0c8392555b94138e27 /include/svl
parente1082e45361a92a31adedcc3ed0a35c704bca543 (diff)
ofz#6311 still problems with SdrEdgeObj listening to same obj at start as end
Change-Id: Ibd80b484788779b73943b28a5f36e51ebcacec30 Reviewed-on: https://gerrit.libreoffice.org/49821 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/svl')
-rw-r--r--include/svl/lstner.hxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/svl/lstner.hxx b/include/svl/lstner.hxx
index ad79698728cb..c9a807fa8d13 100644
--- a/include/svl/lstner.hxx
+++ b/include/svl/lstner.hxx
@@ -25,6 +25,16 @@
class SfxBroadcaster;
class SfxHint;
+//StartListening duplicate handling options
+//Prevent only adds the listener if its not already added
+//Allow allows duplicate listeners
+//Unexpected, the default, is for the usual case where the
+//listener should only be added once and duplicates are
+//unexpected. In dbgutil mode this tracks where the original
+//listener was added from and reports the duplicate addition
+//as an error
+enum class DuplicateHandling { Unexpected, Prevent, Allow };
+
class SVL_DLLPUBLIC SfxListener
{
struct Impl;
@@ -39,7 +49,7 @@ public:
SfxListener( const SfxListener &rCopy );
virtual ~SfxListener() COVERITY_NOEXCEPT_FALSE;
- void StartListening( SfxBroadcaster& rBroadcaster, bool bPreventDuplicates = false );
+ void StartListening(SfxBroadcaster& rBroadcaster, DuplicateHandling eDuplicateHanding = DuplicateHandling::Unexpected);
void EndListening( SfxBroadcaster& rBroadcaster, bool bRemoveAllDuplicates = false );
void EndListeningAll();
bool IsListening( SfxBroadcaster& rBroadcaster ) const;