diff options
author | Rob Snelders <programming@ertai.nl> | 2012-04-03 00:04:00 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2012-04-03 14:49:08 +0200 |
commit | 58d5e3032274b5a15ccc0bf2c9788cd18a5a63d4 (patch) | |
tree | 908b04cb5d55e3a35cf5731f984bde4065bd17c4 /sd/source/ui | |
parent | 5ff6bf59c90cf3a55acffcb64e63f1da6dd5dec2 (diff) |
SlsRequestQueue updated
Diffstat (limited to 'sd/source/ui')
-rw-r--r-- | sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx | 21 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx | 4 |
2 files changed, 10 insertions, 15 deletions
diff --git a/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx b/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx index 966c5d22bb5f..a79ddaf4aa94 100644 --- a/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx +++ b/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx @@ -31,10 +31,6 @@ #include <set> - -#undef VERBOSE -//#define VERBOSE - namespace sd { namespace slidesorter { namespace cache { /** This class extends the actual request data with additional information @@ -118,7 +114,7 @@ void RequestQueue::AddRequest ( // If the request is already a member of the queue then remove it so // that the following insertion will use the new prioritization. -#ifdef VERBOSE +#if OSL_DEBUG_LEVEL >=2 bool bRemoved = #endif RemoveRequest(aKey); @@ -130,13 +126,12 @@ void RequestQueue::AddRequest ( Request aRequest (aKey, nPriority, eRequestClass); mpRequestQueue->insert(aRequest); - SSCD_SET_REQUEST_CLASS(rRequestData.GetPage(),eRequestClass); + SSCD_SET_REQUEST_CLASS(aKey,eRequestClass); -#ifdef VERBOSE - OSL_TRACE("%s request for page %d with priority class %d", - bRemoved?"replaced":"added", - (rRequestData.GetPage()->GetPageNum()-1)/2, - eRequestClass); +#if OSL_DEBUG_LEVEL >=2 + SAL_INFO("sd.sls", OSL_THIS_FUNC << ": " << (bRemoved?"replaced":"added") + << " request for page " << ((aKey->GetPageNum()-1)/2) + << " with priority class " << static_cast<int>(eRequestClass)); #endif } @@ -166,7 +161,7 @@ bool RequestQueue::RemoveRequest ( if (bRequestWasRemoved) { - SSCD_SET_STATUS(rRequest.GetPage(),NONE); + SSCD_SET_STATUS(aKey,NONE); } } else @@ -195,7 +190,7 @@ void RequestQueue::ChangeClass ( if (iRequest!=mpRequestQueue->end() && iRequest->meClass!=eNewRequestClass) { AddRequest(aKey, eNewRequestClass, true); - SSCD_SET_REQUEST_CLASS(rRequestData.GetPage(),eNewRequestClass); + SSCD_SET_REQUEST_CLASS(aKey,eNewRequestClass); } } diff --git a/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx b/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx index e59f7e3ab3bd..9fe0dda49f55 100644 --- a/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx +++ b/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx @@ -52,7 +52,7 @@ public: /** Insert a request with highest or lowest priority in its priority class. When the request is already present then it is first removed. This effect is then a re-prioritization. - @param rRequestData + @param aKey The request. @param eRequestClass The priority class in which to insert the request with highest @@ -68,7 +68,7 @@ public: bool bInsertWithHighestPriority = false); /** Remove the specified request from the queue. - @param rRequestData + @param aKey It is OK when the specified request is not a member of the queue. @return |