diff options
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/framework/configuration/ChangeRequestQueue.hxx | 4 | ||||
-rw-r--r-- | sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/sd/source/ui/framework/configuration/ChangeRequestQueue.hxx b/sd/source/ui/framework/configuration/ChangeRequestQueue.hxx index 402774412274..d63a64822c49 100644 --- a/sd/source/ui/framework/configuration/ChangeRequestQueue.hxx +++ b/sd/source/ui/framework/configuration/ChangeRequestQueue.hxx @@ -22,7 +22,7 @@ #include <com/sun/star/uno/Reference.hxx> -#include <list> +#include <queue> namespace com { namespace sun { namespace star { namespace drawing { namespace framework { class XConfigurationChangeRequest; } } } } } @@ -33,7 +33,7 @@ namespace sd { namespace framework { ChangeRequestQueueProcessor to process these requests. */ class ChangeRequestQueue - : public ::std::list<css::uno::Reference< css::drawing::framework::XConfigurationChangeRequest> > + : public ::std::queue<css::uno::Reference< css::drawing::framework::XConfigurationChangeRequest> > { public: /** Create an empty queue. diff --git a/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx b/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx index 7ac69647522c..7934b5dd5e8b 100644 --- a/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx +++ b/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx @@ -91,7 +91,7 @@ void ChangeRequestQueueProcessor::AddRequest ( TraceRequest(rxRequest); #endif - maQueue.push_back(rxRequest); + maQueue.push(rxRequest); StartProcessing(); } @@ -135,7 +135,7 @@ void ChangeRequestQueueProcessor::ProcessOneEvent() // Get and remove the first entry from the queue. Reference<XConfigurationChangeRequest> xRequest (maQueue.front()); - maQueue.pop_front(); + maQueue.pop(); // Execute the change request. if (xRequest.is()) @@ -176,7 +176,8 @@ void ChangeRequestQueueProcessor::ProcessUntilEmpty() void ChangeRequestQueueProcessor::Clear() { ::osl::MutexGuard aGuard (maMutex); - maQueue.clear(); + ChangeRequestQueue aEmpty; + maQueue.swap(aEmpty); } } } // end of namespace sd::framework::configuration |