summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-12-03 12:07:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-12-04 07:01:53 +0100
commit8d84a0dc8d83cc7dbe77dec0bb4e2f6b9768e1d9 (patch)
tree28dda47bfa85f8e255bd18ac3f2ce2992a2de9ca /chart2
parent60e8941fd581bb06cbf6be62edb8c387e7c07812 (diff)
some std::set->o3tl::sorted_vector
which is much better cache-wise Change-Id: Iacec0df48f043bcdd761ed30c1b1513850a00152 Reviewed-on: https://gerrit.libreoffice.org/84311 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/inc/ChartController.hxx4
-rw-r--r--chart2/source/controller/inc/CommandDispatchContainer.hxx6
-rw-r--r--chart2/source/controller/main/ChartController.cxx4
-rw-r--r--chart2/source/controller/main/CommandDispatchContainer.cxx2
4 files changed, 8 insertions, 8 deletions
diff --git a/chart2/source/controller/inc/ChartController.hxx b/chart2/source/controller/inc/ChartController.hxx
index 6b4d7782be89..adf4a3ad20be 100644
--- a/chart2/source/controller/inc/ChartController.hxx
+++ b/chart2/source/controller/inc/ChartController.hxx
@@ -27,6 +27,7 @@
#include <vcl/timer.hxx>
#include <cppuhelper/implbase.hxx>
+#include <o3tl/sorted_vector.hxx>
#include <salhelper/simplereferenceobject.hxx>
#include <com/sun/star/frame/XDispatchProvider.hpp>
@@ -40,7 +41,6 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <memory>
-#include <set>
namespace com { namespace sun { namespace star { namespace accessibility { class XAccessible; } } } }
namespace com { namespace sun { namespace star { namespace accessibility { class XAccessibleContext; } } } }
@@ -533,7 +533,7 @@ private:
const OUString & rCID, eMoveOrResizeType eType, double fAmountLogicX, double fAmountLogicY );
bool impl_DragDataPoint( const OUString & rCID, double fOffset );
- static const std::set< OUString >& impl_getAvailableCommands();
+ static const o3tl::sorted_vector< OUString >& impl_getAvailableCommands();
/** Creates a helper accessibility class that must be initialized via XInitialization. For
parameters see
diff --git a/chart2/source/controller/inc/CommandDispatchContainer.hxx b/chart2/source/controller/inc/CommandDispatchContainer.hxx
index 9d6cd7e2e97b..bcc79758b545 100644
--- a/chart2/source/controller/inc/CommandDispatchContainer.hxx
+++ b/chart2/source/controller/inc/CommandDispatchContainer.hxx
@@ -20,8 +20,8 @@
#define INCLUDED_CHART2_SOURCE_CONTROLLER_MAIN_COMMANDDISPATCHCONTAINER_HXX
#include <cppuhelper/weakref.hxx>
+#include <o3tl/sorted_vector.hxx>
-#include <set>
#include <map>
#include <vector>
@@ -81,7 +81,7 @@ public:
*/
void setChartDispatch(
const css::uno::Reference< css::frame::XDispatch >& rChartDispatch,
- const std::set< OUString > & rChartCommands );
+ const o3tl::sorted_vector< OUString > & rChartCommands );
/** Returns the dispatch that is able to do the command given in rURL, if
implemented here. If the URL is not implemented here, it should be
@@ -126,7 +126,7 @@ private:
css::uno::WeakReference< css::frame::XModel > m_xModel;
css::uno::Reference< css::frame::XDispatch > m_xChartDispatcher;
- std::set< OUString > m_aChartCommands;
+ o3tl::sorted_vector< OUString > m_aChartCommands;
DrawCommandDispatch* m_pDrawCommandDispatch;
ShapeController* m_pShapeController;
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index 96ec317defa6..8511ad1bfcb6 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -1574,9 +1574,9 @@ void ChartController::impl_initializeAccessible( const uno::Reference< lang::XIn
}
}
-const std::set< OUString >& ChartController::impl_getAvailableCommands()
+const o3tl::sorted_vector< OUString >& ChartController::impl_getAvailableCommands()
{
- static std::set< OUString > s_AvailableCommands {
+ static const o3tl::sorted_vector< OUString > s_AvailableCommands {
// commands for container forward
"AddDirect", "NewDoc", "Open",
"Save", "SaveAs", "SendMail",
diff --git a/chart2/source/controller/main/CommandDispatchContainer.cxx b/chart2/source/controller/main/CommandDispatchContainer.cxx
index 5bc093282b4b..8056dfccecb9 100644
--- a/chart2/source/controller/main/CommandDispatchContainer.cxx
+++ b/chart2/source/controller/main/CommandDispatchContainer.cxx
@@ -58,7 +58,7 @@ void CommandDispatchContainer::setModel(
void CommandDispatchContainer::setChartDispatch(
const Reference< frame::XDispatch >& rChartDispatch,
- const std::set< OUString > & rChartCommands )
+ const o3tl::sorted_vector< OUString > & rChartCommands )
{
OSL_ENSURE(rChartDispatch.is(),"Invalid fall back dispatcher!");
m_xChartDispatcher.set( rChartDispatch );