summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorhimajin100000 <himajin100000@gmail.com>2018-03-29 01:56:29 +0900
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-03-31 10:59:57 +0200
commit6b60390a9c3cd9eb6198260f3ab8ab600279396a (patch)
treefd4bd30a3453fdea2d9c37cc6da06ecad939c2da /sd
parentbf330b7f20ad6e7992bb6bc387e12183acdb3082 (diff)
RequestQueue::RemoveRequest should return bool if dbglevel >= 2
Change-Id: Ie6120abf9c96cf4ba53111650a86fbf33418ac13 Reviewed-on: https://gerrit.libreoffice.org/52161 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx17
-rw-r--r--sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx7
2 files changed, 21 insertions, 3 deletions
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.
*/