[Libreoffice-commits] core.git: chart2/source
Noel Grandin
noel at peralex.com
Mon Apr 25 07:18:44 UTC 2016
chart2/source/controller/inc/ChartController.hxx | 2 +-
chart2/source/controller/main/ChartController.cxx | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
New commits:
commit b2e2400736cbc5fc7e21edbe968f888566de9237
Author: Noel Grandin <noel at peralex.com>
Date: Mon Apr 25 09:18:12 2016 +0200
no need to copy the list of available commands on every call
Change-Id: I131f34a94c998f3dd9fd7a457fb213778040c771
diff --git a/chart2/source/controller/inc/ChartController.hxx b/chart2/source/controller/inc/ChartController.hxx
index 1a226bb..dbe081f 100644
--- a/chart2/source/controller/inc/ChartController.hxx
+++ b/chart2/source/controller/inc/ChartController.hxx
@@ -577,7 +577,7 @@ private:
const OUString & rCID, eMoveOrResizeType eType, double fAmountLogicX, double fAmountLogicY );
bool impl_DragDataPoint( const OUString & rCID, double fOffset );
- static std::set< OUString > impl_getAvailableCommands();
+ static const std::set< OUString >& impl_getAvailableCommands();
/** Creates a helper accessibility class that must be initialized via XInitialization. For
parameters see
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index 609c397..252698e 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -1570,9 +1570,9 @@ void ChartController::impl_initializeAccessible( const uno::Reference< lang::XIn
}
}
-::std::set< OUString > ChartController::impl_getAvailableCommands()
+const ::std::set< OUString >& ChartController::impl_getAvailableCommands()
{
- return {
+ static ::std::set< OUString > s_AvailableCommands {
// commands for container forward
"AddDirect", "NewDoc", "Open",
"Save", "SaveAs", "SendMail",
@@ -1635,6 +1635,7 @@ void ChartController::impl_initializeAccessible( const uno::Reference< lang::XIn
"ArrangeRow",
"StatusBarVisible",
"ChartElementSelector"};
+ return s_AvailableCommands;
}
ViewElementListProvider ChartController::getViewElementListProvider()
More information about the Libreoffice-commits
mailing list