sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx | 17 +++++++++++++++-- sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx | 7 ++++++- 2 files changed, 21 insertions(+), 3 deletions(-)
New commits: commit 6b60390a9c3cd9eb6198260f3ab8ab600279396a Author: himajin100000 <himajin100...@gmail.com> Date: Thu Mar 29 01:56:29 2018 +0900 RequestQueue::RemoveRequest should return bool if dbglevel >= 2 Change-Id: Ie6120abf9c96cf4ba53111650a86fbf33418ac13 Reviewed-on: https://gerrit.libreoffice.org/52161 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx b/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx index 809fbf46ca01..a17f181dd9f2 100644 --- a/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx +++ b/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx @@ -140,11 +140,18 @@ void RequestQueue::PageInDestruction(const SdrPage& rPage) RemoveRequest(&rPage); } -void RequestQueue::RemoveRequest ( +#if OSL_DEBUG_LEVEL >=2 +bool +#else +void +#endif +RequestQueue::RemoveRequest( CacheKey aKey) { ::osl::MutexGuard aGuard (maMutex); - +#if OSL_DEBUG_LEVEL >=2 + bool bIsRemoved = false; +#endif while(true) { Container::const_iterator aRequestIterator = ::std::find_if ( @@ -161,10 +168,16 @@ void RequestQueue::RemoveRequest ( SdrPage *pPage = const_cast<SdrPage*>(aRequestIterator->maKey); pPage->RemovePageUser(*this); mpRequestQueue->erase(aRequestIterator); +#if OSL_DEBUG_LEVEL >=2 + bIsRemoved = true; +#endif } else break; } +#if OSL_DEBUG_LEVEL >=2 + return bIsRemoved; +#endif } diff --git a/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx b/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx index ba83e1657bfa..2470ffe1720b 100644 --- a/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx +++ b/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx @@ -61,7 +61,12 @@ public: It is OK when the specified request is not a member of the queue. */ - void RemoveRequest (CacheKey aKey); +#if OSL_DEBUG_LEVEL >=2 +bool +#else +void +#endif + RemoveRequest (CacheKey aKey); /** Change the priority class of the specified request. */ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits