summaryrefslogtreecommitdiff
path: root/chart2/source
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source')
-rw-r--r--chart2/source/controller/inc/CommandDispatchContainer.hxx2
-rw-r--r--chart2/source/controller/main/CommandDispatchContainer.cxx11
2 files changed, 6 insertions, 7 deletions
diff --git a/chart2/source/controller/inc/CommandDispatchContainer.hxx b/chart2/source/controller/inc/CommandDispatchContainer.hxx
index 08e3c55f6f4d..41adb4f19c7c 100644
--- a/chart2/source/controller/inc/CommandDispatchContainer.hxx
+++ b/chart2/source/controller/inc/CommandDispatchContainer.hxx
@@ -126,8 +126,6 @@ private:
css::uno::Reference< css::frame::XDispatch > m_xChartDispatcher;
::std::set< OUString > m_aChartCommands;
- ::std::set< OUString > m_aContainerDocumentCommands;
-
ChartController* m_pChartController;
DrawCommandDispatch* m_pDrawCommandDispatch;
ShapeController* m_pShapeController;
diff --git a/chart2/source/controller/main/CommandDispatchContainer.cxx b/chart2/source/controller/main/CommandDispatchContainer.cxx
index 1e9c84860b9c..e8b659895623 100644
--- a/chart2/source/controller/main/CommandDispatchContainer.cxx
+++ b/chart2/source/controller/main/CommandDispatchContainer.cxx
@@ -43,10 +43,6 @@ CommandDispatchContainer::CommandDispatchContainer(
,m_pDrawCommandDispatch( nullptr )
,m_pShapeController( nullptr )
{
- m_aContainerDocumentCommands.insert({
- "AddDirect", "NewDoc", "Open",
- "Save", "SaveAs", "SendMail",
- "EditDoc", "ExportDirectToPDF", "PrintDefault"});
}
void CommandDispatchContainer::setModel(
@@ -72,6 +68,11 @@ void CommandDispatchContainer::setChartDispatch(
Reference< frame::XDispatch > CommandDispatchContainer::getDispatchForURL(
const util::URL & rURL )
{
+ static const std::set< OUString > s_aContainerDocumentCommands {
+ "AddDirect", "NewDoc", "Open",
+ "Save", "SaveAs", "SendMail",
+ "EditDoc", "ExportDirectToPDF", "PrintDefault"};
+
Reference< frame::XDispatch > xResult;
tDispatchMap::const_iterator aIt( m_aCachedDispatches.find( rURL.Complete ));
if( aIt != m_aCachedDispatches.end())
@@ -102,7 +103,7 @@ Reference< frame::XDispatch > CommandDispatchContainer::getDispatchForURL(
m_aToBeDisposedDispatches.push_back( xResult );
}
else if( xModel.is() &&
- (m_aContainerDocumentCommands.find( rURL.Path ) != m_aContainerDocumentCommands.end()) )
+ (s_aContainerDocumentCommands.find( rURL.Path ) != s_aContainerDocumentCommands.end()) )
{
xResult.set( getContainerDispatchForURL( xModel->getCurrentController(), rURL ));
// ToDo: can those dispatches be cached?