summaryrefslogtreecommitdiff
path: root/sd/source/ui/framework
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2019-05-09 20:10:09 +0200
committerJulien Nabet <serval2412@yahoo.fr>2019-05-10 07:06:44 +0200
commit28bd55310896deda96ee7d30828239fa5ed03747 (patch)
tree9a9efedd1911b03e83c65bf57b12ba5cfd88493f /sd/source/ui/framework
parent7dda93787a7b55d185f31081394fb6e4f83d3f77 (diff)
Use std::queue instead of list for ChangeRequestQueueProcessor (sd)
Change-Id: I2520efb92e4aef399b684262e0b7daa72d212598 Reviewed-on: https://gerrit.libreoffice.org/72073 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'sd/source/ui/framework')
-rw-r--r--sd/source/ui/framework/configuration/ChangeRequestQueue.hxx4
-rw-r--r--sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx7
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