diff options
Diffstat (limited to 'sd/source/ui/sidebar')
-rw-r--r-- | sd/source/ui/sidebar/MasterPageContainer.cxx | 44 | ||||
-rw-r--r-- | sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/sidebar/RecentlyUsedMasterPages.hxx | 9 |
3 files changed, 13 insertions, 46 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 ( diff --git a/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx b/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx index 7d52c78540bb..0a0283bee857 100644 --- a/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx +++ b/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx @@ -317,8 +317,7 @@ IMPL_LINK_TYPED(RecentlyUsedMasterPages, MasterPageContainerChangeListener, } void RecentlyUsedMasterPages::AddMasterPage ( - MasterPageContainer::Token aToken, - bool bMakePersistent) + MasterPageContainer::Token aToken) { // For the page to be inserted the token has to be valid and the page // has to have a valid URL. This excludes master pages that do not come @@ -349,8 +348,7 @@ void RecentlyUsedMasterPages::AddMasterPage ( mvMasterPages.pop_back (); } - if (bMakePersistent) - SavePersistentValues (); + SavePersistentValues (); SendEvent(); } } diff --git a/sd/source/ui/sidebar/RecentlyUsedMasterPages.hxx b/sd/source/ui/sidebar/RecentlyUsedMasterPages.hxx index 7c01cc775bc2..f8ad97abfcbd 100644 --- a/sd/source/ui/sidebar/RecentlyUsedMasterPages.hxx +++ b/sd/source/ui/sidebar/RecentlyUsedMasterPages.hxx @@ -110,15 +110,8 @@ private: list of most recently used master pages. When the page is already a member of that list the associated descriptor is moved to the end of the list to make it the most recently used entry. - @param bMakePersistent - When <TRUE/> is given then the new list of recently used master - pages is written back into the configuration to make it - persistent. Giving <FALSE/> to omit this is used while loading - the persistent list from the configuration. */ - void AddMasterPage ( - MasterPageContainer::Token aToken, - bool bMakePersistent = true); + void AddMasterPage(MasterPageContainer::Token aToken); /** Load the list of recently used master pages from the registry where it was saved to make it persistent. |