summaryrefslogtreecommitdiff
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 09:17:22 +0100
commit5a8ea2218a352561a3f494af545d9b978766a513 (patch)
tree39d49e96342fd94374050cfa56e17e0ec623cae5
parent56b96f3cc1f03313afade4f642861efb76d0bb54 (diff)
ofz#6311 still problems with SdrEdgeObj listening to same obj at start as end
Change-Id: Ibd80b484788779b73943b28a5f36e51ebcacec30 Reviewed-on: https://gerrit.libreoffice.org/49824 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--accessibility/source/extended/textwindowaccessibility.cxx2
-rw-r--r--basctl/source/basicide/basides1.cxx4
-rw-r--r--basctl/source/basicide/basidesh.cxx4
-rw-r--r--basic/source/classes/sb.cxx6
-rw-r--r--basic/source/classes/sbxmod.cxx6
-rw-r--r--basic/source/sbx/sbxcoll.cxx2
-rw-r--r--basic/source/sbx/sbxobj.cxx8
-rw-r--r--editeng/source/editeng/impedit5.cxx2
-rw-r--r--include/svl/lstner.hxx12
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocument.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx2
-rw-r--r--sc/source/ui/condformat/condformatdlgentry.cxx4
-rw-r--r--sc/source/ui/view/prevwsh.cxx4
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx6
-rw-r--r--sd/source/ui/view/ViewShellBase.cxx4
-rw-r--r--svl/qa/unit/notify/test_SfxBroadcaster.cxx8
-rw-r--r--svl/source/notify/lstner.cxx8
-rw-r--r--svx/source/gallery2/gallery1.cxx2
-rw-r--r--svx/source/svdraw/svdobj.cxx2
-rw-r--r--svx/source/svdraw/svdotxat.cxx2
-rw-r--r--svx/source/tbxctrls/colrctrl.cxx2
-rw-r--r--sw/source/uibase/uiview/srcview.cxx2
-rw-r--r--sw/source/uibase/uiview/view.cxx4
23 files changed, 54 insertions, 44 deletions
diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx
index c33f9baa4a60..218ba4771c58 100644
--- a/accessibility/source/extended/textwindowaccessibility.cxx
+++ b/accessibility/source/extended/textwindowaccessibility.cxx
@@ -38,7 +38,7 @@ void SfxListenerGuard::startListening(::SfxBroadcaster & rNotifier)
{
assert(m_pNotifier == nullptr && "called more than once");
m_pNotifier = &rNotifier;
- m_rListener.StartListening(*m_pNotifier, true);
+ m_rListener.StartListening(*m_pNotifier, DuplicateHandling::Prevent);
}
void SfxListenerGuard::endListening()
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index db3945369fc8..373dcd53eb67 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -282,7 +282,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) );
- StartListening( *pBasMgr, true /* log on only once */ );
+ StartListening(*pBasMgr, DuplicateHandling::Prevent /* log on only once */);
OUString aLibName( rInfo.GetLib() );
if ( aLibName.isEmpty() )
aLibName = "Standard" ;
@@ -1229,7 +1229,7 @@ VclPtr<ModulWindow> Shell::ShowActiveModuleWindow( StarBASIC const * pBasic )
else
SAL_WARN( "basctl.basicide", "No BASIC!");
if (BasicManager* pBasicMgr = FindBasicManager(pBasic))
- StartListening( *pBasicMgr, true /* log on only once */ );
+ StartListening(*pBasicMgr, DuplicateHandling::Prevent /* log on only once */);
return pWin;
}
return nullptr;
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index 88d9f280645a..2519d39ea845 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -633,7 +633,7 @@ void Shell::UpdateWindows()
++doc
)
{
- StartListening( *doc->getBasicManager(), true /* log on only once */ );
+ StartListening(*doc->getBasicManager(), DuplicateHandling::Prevent /* log on only once */);
// libraries
Sequence< OUString > aLibNames( doc->getLibraryNames() );
@@ -669,7 +669,7 @@ void Shell::UpdateWindows()
{
StarBASIC* pLib = doc->getBasicManager()->GetLib( aLibName );
if ( pLib )
- StartListening( pLib->GetBroadcaster(), true /* log on only once */ );
+ StartListening(pLib->GetBroadcaster(), DuplicateHandling::Prevent /* log on only once */);
try
{
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 294f7ee5744c..2c40a52fc9fa 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -658,7 +658,7 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule )
pNewMethod->pMod = this;
pNewMethod->SetParent( this );
pMethods->PutDirect( pNewMethod, i );
- StartListening( pNewMethod->GetBroadcaster(), true );
+ StartListening(pNewMethod->GetBroadcaster(), DuplicateHandling::Prevent);
}
}
}
@@ -710,7 +710,7 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule )
pNewProp->ResetFlag( SbxFlagBits::NoBroadcast ); // except the Broadcast if it was set
pProcedureProp->SetFlags( nFlags_ );
pProps->PutDirect( pNewProp, i );
- StartListening( pNewProp->GetBroadcaster(), true );
+ StartListening(pNewProp->GetBroadcaster(), DuplicateHandling::Prevent);
}
else
{
@@ -1069,7 +1069,7 @@ void StarBASIC::Insert( SbxVariable* pVar )
{
pModules.emplace_back(static_cast<SbModule*>(pVar));
pVar->SetParent( this );
- StartListening( pVar->GetBroadcaster(), true );
+ StartListening(pVar->GetBroadcaster(), DuplicateHandling::Prevent);
}
else
{
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 85b5a2412653..bebdc0ca1619 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -531,7 +531,7 @@ SbMethod* SbModule::GetMethod( const OUString& rName, SbxDataType t )
pMeth->SetParent( this );
pMeth->SetFlags( SbxFlagBits::Read );
pMethods->Put( pMeth, pMethods->Count() );
- StartListening( pMeth->GetBroadcaster(), true );
+ StartListening(pMeth->GetBroadcaster(), DuplicateHandling::Prevent);
}
// The method is per default valid, because it could be
// created from the compiler (code generator) as well.
@@ -569,7 +569,7 @@ SbProperty* SbModule::GetProperty( const OUString& rName, SbxDataType t )
pProp->SetFlag( SbxFlagBits::ReadWrite );
pProp->SetParent( this );
pProps->Put( pProp, pProps->Count() );
- StartListening( pProp->GetBroadcaster(), true );
+ StartListening(pProp->GetBroadcaster(), DuplicateHandling::Prevent);
}
return pProp;
}
@@ -588,7 +588,7 @@ void SbModule::GetProcedureProperty( const OUString& rName, SbxDataType t )
pProp->SetFlag( SbxFlagBits::ReadWrite );
pProp->SetParent( this );
pProps->Put( pProp, pProps->Count() );
- StartListening( pProp->GetBroadcaster(), true );
+ StartListening(pProp->GetBroadcaster(), DuplicateHandling::Prevent);
}
}
diff --git a/basic/source/sbx/sbxcoll.cxx b/basic/source/sbx/sbxcoll.cxx
index 71da6cc8bee0..d156f536c9b2 100644
--- a/basic/source/sbx/sbxcoll.cxx
+++ b/basic/source/sbx/sbxcoll.cxx
@@ -47,7 +47,7 @@ SbxCollection::SbxCollection()
}
Initialize();
// For Access on itself
- StartListening( GetBroadcaster(), true );
+ StartListening(GetBroadcaster(), DuplicateHandling::Prevent);
}
SbxCollection::SbxCollection( const SbxCollection& rColl )
diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx
index 56bec717b8aa..af06a9980ff5 100644
--- a/basic/source/sbx/sbxobj.cxx
+++ b/basic/source/sbx/sbxobj.cxx
@@ -413,7 +413,7 @@ SbxVariable* SbxObject::Make( const OUString& rName, SbxClassType ct, SbxDataTyp
pArray->Put( pVar, pArray->Count() );
SetModified( true );
// The object listen always
- StartListening( pVar->GetBroadcaster(), true );
+ StartListening(pVar->GetBroadcaster(), DuplicateHandling::Prevent);
Broadcast( SfxHintId::BasicObjectChanged );
return pVar;
}
@@ -451,7 +451,7 @@ void SbxObject::Insert( SbxVariable* pVar )
}
}
}
- StartListening( pVar->GetBroadcaster(), true );
+ StartListening(pVar->GetBroadcaster(), DuplicateHandling::Prevent);
pArray->Put( pVar, nIdx );
if( pVar->GetParent() != this )
{
@@ -496,7 +496,7 @@ void SbxObject::QuickInsert( SbxVariable* pVar )
}
if( pArray )
{
- StartListening( pVar->GetBroadcaster(), true );
+ StartListening(pVar->GetBroadcaster(), DuplicateHandling::Prevent);
pArray->Put( pVar, pArray->Count() );
if( pVar->GetParent() != this )
{
@@ -576,7 +576,7 @@ static bool LoadArray( SvStream& rStrm, SbxObject* pThis, SbxArray* pArray )
if( pVar )
{
pVar->SetParent( pThis );
- pThis->StartListening( pVar->GetBroadcaster(), true );
+ pThis->StartListening(pVar->GetBroadcaster(), DuplicateHandling::Prevent);
}
}
pArray->Merge( p.get() );
diff --git a/editeng/source/editeng/impedit5.cxx b/editeng/source/editeng/impedit5.cxx
index 1983e28c7b64..aaffb9551db9 100644
--- a/editeng/source/editeng/impedit5.cxx
+++ b/editeng/source/editeng/impedit5.cxx
@@ -92,7 +92,7 @@ void ImpEditEngine::SetStyleSheet( sal_Int32 nPara, SfxStyleSheet* pStyle )
EndListening( *pCurStyle );
pNode->SetStyleSheet( pStyle, aStatus.UseCharAttribs() );
if ( pStyle )
- StartListening( *pStyle, true );
+ StartListening(*pStyle, DuplicateHandling::Prevent);
ParaAttribsChanged( pNode );
}
FormatAndUpdate();
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;
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index 09f633545c64..1e6269141a82 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -392,7 +392,7 @@ void ScChildrenShapes::SetDrawBroadcaster()
SfxBroadcaster* pDrawBC = rViewData.GetDocument()->GetDrawBroadcaster();
if (pDrawBC)
{
- StartListening(*pDrawBC, true);
+ StartListening(*pDrawBC, DuplicateHandling::Prevent);
maShapeTreeInfo.SetModelBroadcaster( new ScDrawModelBroadcaster(rViewData.GetDocument()->GetDrawLayer()) );
maShapeTreeInfo.SetSdrView(rViewData.GetScDrawView());
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index 406d40ed972c..4c1c914cb518 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -689,7 +689,7 @@ void ScShapeChildren::SetDrawBroadcaster()
{
SfxBroadcaster* pDrawBC = mpViewShell->GetDocument().GetDrawBroadcaster();
if (pDrawBC)
- StartListening(*pDrawBC, true);
+ StartListening(*pDrawBC, DuplicateHandling::Prevent);
}
}
diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx
index b68e99c1d171..21782c18266e 100644
--- a/sc/source/ui/condformat/condformatdlgentry.cxx
+++ b/sc/source/ui/condformat/condformatdlgentry.cxx
@@ -207,7 +207,7 @@ ScConditionFrmtEntry::ScConditionFrmtEntry(vcl::Window* pParent, ScDocument* pDo
Init(pDialogParent);
- StartListening(*pDoc->GetStyleSheetPool(), true);
+ StartListening(*pDoc->GetStyleSheetPool(), DuplicateHandling::Prevent);
if(pFormatEntry)
{
@@ -1230,7 +1230,7 @@ ScDateFrmtEntry::ScDateFrmtEntry(vcl::Window* pParent, ScDocument* pDoc, const S
Init();
- StartListening(*pDoc->GetStyleSheetPool(), true);
+ StartListening(*pDoc->GetStyleSheetPool(), DuplicateHandling::Prevent);
if(pFormat)
{
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 41b7caa91af7..8fe89c51673b 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -134,8 +134,8 @@ void ScPreviewShell::Construct( vcl::Window* pParent )
SetPool( &SC_MOD()->GetPool() );
SetWindow( pPreview );
- StartListening(*pDocShell,true);
- StartListening(*SfxGetpApp(),true); // #i62045# #i62046# application is needed for Calc's own hints
+ StartListening(*pDocShell, DuplicateHandling::Prevent);
+ StartListening(*SfxGetpApp(), DuplicateHandling::Prevent); // #i62045# #i62046# application is needed for Calc's own hints
SfxBroadcaster* pDrawBC = pDocShell->GetDocument().GetDrawBroadcaster();
if (pDrawBC)
StartListening(*pDrawBC);
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 55caac70a18f..fa883fe71572 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -1451,9 +1451,9 @@ void ScTabViewShell::Construct( TriState nForceDesignMode )
pCurFrameLine = new ::editeng::SvxBorderLine(&aColBlack, 20, SvxBorderLineStyle::SOLID);
pPivotSource = new ScArea;
- StartListening(*GetViewData().GetDocShell(),true);
- StartListening(*GetViewFrame(),true);
- StartListening(*pSfxApp,true); // #i62045# #i62046# application is needed for Calc's own hints
+ StartListening(*GetViewData().GetDocShell(), DuplicateHandling::Prevent);
+ StartListening(*GetViewFrame(), DuplicateHandling::Prevent);
+ StartListening(*pSfxApp, DuplicateHandling::Prevent); // #i62045# #i62046# application is needed for Calc's own hints
SfxViewFrame* pFirst = SfxViewFrame::GetFirst(pDocSh);
bool bFirstView = !pFirst
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index 99dca2efed88..0f39d3393d8e 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -298,8 +298,8 @@ ViewShellBase::~ViewShellBase()
void ViewShellBase::LateInit (const OUString& rsDefaultView)
{
- StartListening(*GetViewFrame(),true);
- StartListening(*GetDocShell(),true);
+ StartListening(*GetViewFrame(), DuplicateHandling::Prevent);
+ StartListening(*GetDocShell(), DuplicateHandling::Prevent);
mpImpl->LateInit();
InitializeFramework();
diff --git a/svl/qa/unit/notify/test_SfxBroadcaster.cxx b/svl/qa/unit/notify/test_SfxBroadcaster.cxx
index 58c8df532590..5d043028c402 100644
--- a/svl/qa/unit/notify/test_SfxBroadcaster.cxx
+++ b/svl/qa/unit/notify/test_SfxBroadcaster.cxx
@@ -62,7 +62,7 @@ SfxBroadcasterTest::AddingListenersIncreasesCount()
CPPUNIT_ASSERT_EQUAL((size_t)0, sb.GetListenerCount());
- sl.StartListening(sb, true);
+ sl.StartListening(sb, DuplicateHandling::Prevent);
CPPUNIT_ASSERT_EQUAL((size_t)1, sb.GetListenerCount());
}
@@ -73,7 +73,7 @@ SfxBroadcasterTest::RemovingListenersDecreasesCount()
MockedSfxListener sl;
CPPUNIT_ASSERT_EQUAL((size_t)0, sb.GetListenerCount());
- sl.StartListening(sb, true);
+ sl.StartListening(sb, DuplicateHandling::Prevent);
CPPUNIT_ASSERT_EQUAL((size_t)1, sb.GetListenerCount());
sl.EndListening(sb, true);
CPPUNIT_ASSERT_EQUAL((size_t)0, sb.GetListenerCount());
@@ -87,8 +87,8 @@ SfxBroadcasterTest::HintsAreNotForwardedToRemovedListeners()
MockedSfxListener sl2;
SfxHint hint;
- sl1.StartListening(sb, true);
- sl2.StartListening(sb, true);
+ sl1.StartListening(sb, DuplicateHandling::Prevent);
+ sl2.StartListening(sb, DuplicateHandling::Prevent);
CPPUNIT_ASSERT_EQUAL_MESSAGE("All listeners were added.", (size_t)2, sb.GetListenerCount());
sl1.EndListening(sb, true);
sb.Forward(sb, hint);
diff --git a/svl/source/notify/lstner.cxx b/svl/source/notify/lstner.cxx
index 9c79da9e5185..5be1e2bdffdf 100644
--- a/svl/source/notify/lstner.cxx
+++ b/svl/source/notify/lstner.cxx
@@ -88,20 +88,20 @@ void SfxListener::RemoveBroadcaster_Impl( SfxBroadcaster& rBroadcaster )
Some code uses duplicates as a kind of ref-counting thing i.e. they add and remove listeners
on different code paths, and they only really stop listening when the last EndListening() is called.
*/
-void SfxListener::StartListening( SfxBroadcaster& rBroadcaster, bool bPreventDuplicates )
+void SfxListener::StartListening(SfxBroadcaster& rBroadcaster, DuplicateHandling eDuplicateHanding)
{
bool bListeningAlready = IsListening( rBroadcaster );
#ifdef DBG_UTIL
- if (bListeningAlready && !bPreventDuplicates)
+ if (bListeningAlready && eDuplicateHanding == DuplicateHandling::Unexpected)
{
auto f = mpImpl->maCallStacks.find( &rBroadcaster );
SAL_WARN("svl", "previous StartListening call came from: " << sal::backtrace_to_string(f->second.get()));
}
#endif
- assert(!(bListeningAlready && !bPreventDuplicates) && "duplicate listener, try building with DBG_UTIL to find the other insert site.");
+ assert(!(bListeningAlready && eDuplicateHanding == DuplicateHandling::Unexpected) && "duplicate listener, try building with DBG_UTIL to find the other insert site.");
- if ( !bListeningAlready || !bPreventDuplicates )
+ if (!bListeningAlready || eDuplicateHanding != DuplicateHandling::Prevent)
{
rBroadcaster.AddListener(*this);
mpImpl->maBCs.push_back( &rBroadcaster );
diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx
index c3d32d6f1971..d89d896946af 100644
--- a/svx/source/gallery2/gallery1.cxx
+++ b/svx/source/gallery2/gallery1.cxx
@@ -763,7 +763,7 @@ GalleryTheme* Gallery::AcquireTheme( const OUString& rThemeName, SfxListener& rL
GalleryThemeEntry* pThemeEntry = ImplGetThemeEntry( rThemeName );
if( pThemeEntry && ( ( pTheme = ImplGetCachedTheme( pThemeEntry ) ) != nullptr ) )
- rListener.StartListening( *pTheme, true );
+ rListener.StartListening(*pTheme, DuplicateHandling::Prevent);
return pTheme;
}
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 4744dd2c1d9b..5c97d855633c 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -589,7 +589,7 @@ void SdrObject::AddListener(SfxListener& rListener)
// SdrEdgeObj may be connected to same SdrObject on both ends so allow it
// to listen twice
SdrEdgeObj const*const pEdge(dynamic_cast<SdrEdgeObj const*>(&rListener));
- rListener.StartListening(*pPlusData->pBroadcast, pEdge != nullptr);
+ rListener.StartListening(*pPlusData->pBroadcast, pEdge ? DuplicateHandling::Allow : DuplicateHandling::Unexpected);
}
void SdrObject::RemoveListener(SfxListener& rListener)
diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx
index f6aa20a83961..70cda2234529 100644
--- a/svx/source/svdraw/svdotxat.cxx
+++ b/svx/source/svdraw/svdotxat.cxx
@@ -383,7 +383,7 @@ void SdrTextObj::ImpSetTextStyleSheetListeners()
for(std::set<SfxStyleSheet*>::const_iterator it = aStyleSheets.begin(); it != aStyleSheets.end(); ++it) {
SfxStyleSheet* pStyle=*it;
// let StartListening see for itself if there's already a listener registered
- StartListening(*pStyle,true);
+ StartListening(*pStyle, DuplicateHandling::Prevent);
}
}
}
diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx
index 6571d3086eb3..3a22aa10863f 100644
--- a/svx/source/tbxctrls/colrctrl.cxx
+++ b/svx/source/tbxctrls/colrctrl.cxx
@@ -230,7 +230,7 @@ SvxColorDockingWindow::SvxColorDockingWindow
SetSize();
aColorSet->Show();
if (_pBindings != nullptr)
- StartListening( *_pBindings, true );
+ StartListening(*_pBindings, DuplicateHandling::Prevent);
}
SvxColorDockingWindow::~SvxColorDockingWindow()
diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx
index 0c0a78b628bd..6eff4bd5a34e 100644
--- a/sw/source/uibase/uiview/srcview.cxx
+++ b/sw/source/uibase/uiview/srcview.cxx
@@ -263,7 +263,7 @@ void SwSrcView::Init()
}
SetNewWindowAllowed( false );
- StartListening(*pDocShell,true);
+ StartListening(*pDocShell, DuplicateHandling::Prevent);
}
SwDocShell* SwSrcView::GetDocShell()
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index 60d34de9fdd9..b48be3a0b2a5 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -866,8 +866,8 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
SfxViewFrame* pViewFrame = GetViewFrame();
- StartListening(*pViewFrame, true);
- StartListening(rDocSh, true);
+ StartListening(*pViewFrame, DuplicateHandling::Prevent);
+ StartListening(rDocSh, DuplicateHandling::Prevent);
// Set Zoom-factor from HRuler
Fraction aZoomFract( aUsrPref.GetZoom(), 100 );