summaryrefslogtreecommitdiffstats
path: root/chart2/source/controller/main/CommandDispatchContainer.cxx
diff options
context:
space:
mode:
authorThomas Benisch <tbe@openoffice.org>2009-06-04 09:55:00 +0000
committerThomas Benisch <tbe@openoffice.org>2009-06-04 09:55:00 +0000
commit36f348fb0bebcbf099be4fddf59380462b39e41a (patch)
tree037e12a09df710641575f9954de72765bfe2954e /chart2/source/controller/main/CommandDispatchContainer.cxx
parent#i12587# Inserting/editing arbitrary text objects in chart (diff)
downloadcore-36f348fb0bebcbf099be4fddf59380462b39e41a.tar.gz
core-36f348fb0bebcbf099be4fddf59380462b39e41a.zip
#i12587# Inserting/editing arbitrary text objects in chart
Diffstat (limited to 'chart2/source/controller/main/CommandDispatchContainer.cxx')
-rw-r--r--chart2/source/controller/main/CommandDispatchContainer.cxx16
1 files changed, 14 insertions, 2 deletions
diff --git a/chart2/source/controller/main/CommandDispatchContainer.cxx b/chart2/source/controller/main/CommandDispatchContainer.cxx
index 8c0f4f1f5c8e..96707ac837a1 100644
--- a/chart2/source/controller/main/CommandDispatchContainer.cxx
+++ b/chart2/source/controller/main/CommandDispatchContainer.cxx
@@ -36,6 +36,7 @@
#include "StatusBarCommandDispatch.hxx"
#include "DisposeHelper.hxx"
#include "macros.hxx"
+#include "ChartController.hxx"
#include "DrawCommandDispatch.hxx"
#include "ShapeController.hxx"
@@ -53,8 +54,9 @@ namespace chart
{
CommandDispatchContainer::CommandDispatchContainer(
- const Reference< uno::XComponentContext > & xContext )
+ const Reference< uno::XComponentContext > & xContext, ChartController* pController )
:m_xContext( xContext )
+ ,m_pChartController( pController )
,m_pDrawCommandDispatch( NULL )
,m_pShapeController( NULL )
{
@@ -97,6 +99,14 @@ Reference< frame::XDispatch > CommandDispatchContainer::getDispatchForURL(
{
Reference< frame::XDispatch > xResult;
+ // #i12587# support for shapes in chart
+ if ( m_pChartController && m_pChartController->isShapeContext() &&
+ rURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "TransformDialog" ) ) )
+ {
+ xResult.set( m_pShapeController );
+ return xResult;
+ }
+
tDispatchMap::const_iterator aIt( m_aCachedDispatches.find( rURL.Complete ));
if( aIt != m_aCachedDispatches.end())
{
@@ -142,7 +152,8 @@ Reference< frame::XDispatch > CommandDispatchContainer::getDispatchForURL(
}
// #i12587# support for shapes in chart
// Note, that the chart dispatcher must be queried first, because
- // the chart dispatcher handles all context sensitive commands.
+ // the chart dispatcher is the default dispatcher for all context
+ // sensitive commands.
else if ( m_pDrawCommandDispatch && m_pDrawCommandDispatch->isFeatureSupported( rURL ) )
{
xResult.set( m_pDrawCommandDispatch );
@@ -179,6 +190,7 @@ void CommandDispatchContainer::DisposeAndClear()
m_aToBeDisposedDispatches.clear();
m_xChartDispatcher.clear();
m_aChartCommands.clear();
+ m_pChartController = NULL;
m_pDrawCommandDispatch = NULL;
m_pShapeController = NULL;
}