28#include <com/sun/star/frame/XDispatchProvider.hpp>
29#include <com/sun/star/view/XSelectionSupplier.hpp>
30#include <osl/diagnose.h>
37using ::com::sun::star::uno::Reference;
38using ::com::sun::star::uno::Sequence;
46 ,m_pDrawCommandDispatch( nullptr )
47 ,m_pShapeController( nullptr )
65 OSL_ENSURE(rChartDispatch.is(),
"Invalid fall back dispatcher!");
72 const util::URL & rURL )
75 "AddDirect",
"NewDoc",
"Open",
76 "Save",
"SaveAs",
"SendMail",
77 "EditDoc",
"ExportDirectToPDF",
"PrintDefault"};
83 xResult.set( (*aIt).second );
89 if(
xModel.is() && ( rURL.Path ==
"Undo" || rURL.Path ==
"Redo" ||
90 rURL.Path ==
"GetUndoStrings" || rURL.Path ==
"GetRedoStrings" ) )
93 xResult.set( pDispatch );
94 pDispatch->initialize();
101 else if(
xModel.is() && ( rURL.Path ==
"Context" || rURL.Path ==
"ModifiedStatus" ) )
105 xResult.set( pDispatch );
106 pDispatch->initialize();
112 (s_aContainerDocumentCommands.find( rURL.Path ) != s_aContainerDocumentCommands.end()) )
146 sal_Int32
nCount = aDescriptors.getLength();
148 auto aRetRange = asNonConstRange(aRet);
152 if ( aDescriptors[
nPos ].FrameName ==
"_self" )
171 const util::URL & rURL )
174 if( xChartController.is())
181 xResult.set( xDispProv->queryDispatch( rURL,
"_self", 0 ));
Reference< uno::XComponentContext > m_xContext
void setModel(const rtl::Reference<::chart::ChartModel > &xModel)
void setDrawCommandDispatch(DrawCommandDispatch *pDispatch)
DrawCommandDispatch * m_pDrawCommandDispatch
css::uno::Reference< css::frame::XDispatch > getDispatchForURL(const css::util::URL &rURL)
Returns the dispatch that is able to do the command given in rURL, if implemented here.
css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > getDispatchesForURLs(const css::uno::Sequence< css::frame::DispatchDescriptor > &aDescriptors)
css::uno::Reference< css::frame::XDispatch > m_xChartDispatcher
css::uno::Reference< css::uno::XComponentContext > m_xContext
CommandDispatchContainer(const css::uno::Reference< css::uno::XComponentContext > &xContext)
static css::uno::Reference< css::frame::XDispatch > getContainerDispatchForURL(const css::uno::Reference< css::frame::XController > &xChartController, const css::util::URL &rURL)
ShapeController * m_pShapeController
o3tl::sorted_vector< OUString > m_aChartCommands
void setShapeController(ShapeController *pController)
tDispatchMap m_aCachedDispatches
tDisposeVector m_aToBeDisposedDispatches
void setChartDispatch(const css::uno::Reference< css::frame::XDispatch > &rChartDispatch, o3tl::sorted_vector< OUString > &&rChartCommands)
Set a chart dispatcher that is used for all commands contained in rChartCommands.
unotools::WeakReference< ::chart::ChartModel > m_xModel
This is a CommandDispatch implementation for drawing objects.
virtual bool isFeatureSupported(const OUString &rCommandURL) override
virtual bool isFeatureSupported(const OUString &rCommandURL)
This is a CommandDispatch implementation for shapes.
This is a CommandDispatch implementation for Undo and Redo.
const_iterator find(const Value &x) const
const_iterator end() const
void DisposeAllElements(Container &rContainer)
Reference< XFrame > xFrame
Reference< XModel > xModel