diff options
author | Noel Grandin <noel@peralex.com> | 2016-03-01 15:13:33 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-03-02 07:57:37 +0200 |
commit | e65506968f98340522df9af1a2bfa7ab736bdc45 (patch) | |
tree | d3a21b4263d3bdd1960250c23f447fc8b176a08e /sd/source/ui/sidebar/MasterPageContainer.cxx | |
parent | a8aafaee134eb82e033175a820096d72205ce5e5 (diff) |
loplugin:unuseddefaultparam in sd
Change-Id: Ic1bb6903a7e4d4aae44b0a2a21a46590d5b4027f
Diffstat (limited to 'sd/source/ui/sidebar/MasterPageContainer.cxx')
-rw-r--r-- | sd/source/ui/sidebar/MasterPageContainer.cxx | 44 |
1 files changed, 10 insertions, 34 deletions
diff --git a/sd/source/ui/sidebar/MasterPageContainer.cxx b/sd/source/ui/sidebar/MasterPageContainer.cxx index a75743aa2da9..728bf786f85c 100644 --- a/sd/source/ui/sidebar/MasterPageContainer.cxx +++ b/sd/source/ui/sidebar/MasterPageContainer.cxx @@ -104,8 +104,7 @@ public: void FireContainerChange ( MasterPageContainerChangeEvent::EventType eType, - Token aToken, - bool bNotifyAsynchronously = false); + Token aToken); virtual bool UpdateDescriptor ( const SharedMasterPageDescriptor& rpDescriptor, @@ -170,7 +169,6 @@ private: bool mbContainerCleaningPending; typedef ::std::pair<MasterPageContainerChangeEvent::EventType,Token> EventData; - DECL_LINK_TYPED(AsynchronousNotifyCallback, void*, void); Image GetPreviewSubstitution (sal_uInt16 nId, PreviewSize ePreviewSize); @@ -617,18 +615,6 @@ Size MasterPageContainer::Implementation::GetPreviewSizePixel (PreviewSize eSize return maLargePreviewSizePixel; } -IMPL_LINK_TYPED(MasterPageContainer::Implementation,AsynchronousNotifyCallback, void*, p, void) -{ - EventData* pData = static_cast<EventData*>(p); - const ::osl::MutexGuard aGuard (maMutex); - - if (pData != nullptr) - { - FireContainerChange(pData->first, pData->second); - delete pData; - } -} - MasterPageContainer::Token MasterPageContainer::Implementation::PutMasterPage ( const SharedMasterPageDescriptor& rpDescriptor) { @@ -945,25 +931,15 @@ void MasterPageContainer::Implementation::CleanContainer() void MasterPageContainer::Implementation::FireContainerChange ( MasterPageContainerChangeEvent::EventType eType, - Token aToken, - bool bNotifyAsynchronously) -{ - if (bNotifyAsynchronously) - { - Application::PostUserEvent( - LINK(this,Implementation,AsynchronousNotifyCallback), - new EventData(eType,aToken)); - } - else - { - ::std::vector<Link<MasterPageContainerChangeEvent&,void>> aCopy(maChangeListeners.begin(),maChangeListeners.end()); - ::std::vector<Link<MasterPageContainerChangeEvent&,void>>::iterator iListener; - MasterPageContainerChangeEvent aEvent; - aEvent.meEventType = eType; - aEvent.maChildToken = aToken; - for (iListener=aCopy.begin(); iListener!=aCopy.end(); ++iListener) - iListener->Call(aEvent); - } + Token aToken) +{ + ::std::vector<Link<MasterPageContainerChangeEvent&,void>> aCopy(maChangeListeners.begin(),maChangeListeners.end()); + ::std::vector<Link<MasterPageContainerChangeEvent&,void>>::iterator iListener; + MasterPageContainerChangeEvent aEvent; + aEvent.meEventType = eType; + aEvent.maChildToken = aToken; + for (iListener=aCopy.begin(); iListener!=aCopy.end(); ++iListener) + iListener->Call(aEvent); } bool MasterPageContainer::Implementation::UpdateDescriptor ( |