23#include <config_wasm_strip.h>
26#include <servicenames.hxx>
49#if !ENABLE_WASM_STRIP_ACCESSIBILITY
61#include <com/sun/star/awt/XVclWindowPeer.hpp>
62#include <com/sun/star/frame/XController2.hpp>
63#include <com/sun/star/util/CloseVetoException.hpp>
64#include <com/sun/star/util/XModeChangeBroadcaster.hpp>
65#include <com/sun/star/frame/LayoutManagerEvents.hpp>
66#include <com/sun/star/frame/XLayoutManagerEventBroadcaster.hpp>
67#include <com/sun/star/ui/XSidebar.hpp>
68#include <com/sun/star/chart2/XDataProviderAccess.hpp>
69#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
78#include <osl/mutex.hxx>
83#include <com/sun/star/frame/XLayoutManager.hpp>
93#define TEST_ENABLE_MODIFY_LISTENER
101using ::com::sun::star::uno::Reference;
102using ::com::sun::star::uno::Sequence;
105 m_aLifeTimeManager(
nullptr ),
106 m_bSuspended(
false ),
107 m_xCC(std::move(xContext)),
108 m_aModel(
nullptr, m_aModelMutex ),
109 m_eDragMode(SdrDragMode::Move),
110 m_aDoubleClickTimer(
"chart2 ChartController m_aDoubleClickTimer"),
111 m_bWaitingForDoubleClick(
false),
112 m_bWaitingForMouseUp(
false),
113 m_bFieldButtonDown(
false),
114 m_bConnectingToView(
false),
116 m_aDispatchContainer( m_xCC ),
119 [
this]() {
return this->GetContextName(); },
122 m_aDoubleClickTimer.SetInvokeHandler(
LINK(
this, ChartController, DoubleClickWaitingHdl ) );
150 static_cast<util::XCloseListener*
>(pController) );
158 static_cast<util::XCloseListener*
>(pController) );
178 m_bOwnership =
false;
180 catch(
const util::CloseVetoException& )
185 SAL_WARN_IF( m_bOwnership,
"chart2.main",
"a well known owner has caught a CloseVetoException after calling close(true)");
186 m_bOwnership =
false;
192 catch(
const uno::Exception&)
199 m_rModelMutex(rMutex)
201 osl::Guard< osl::Mutex > aGuard( m_rModelMutex );
202 m_xTheModel = pTheModel;
205 m_rModelMutex(rMutex)
212 osl::Guard< osl::Mutex > aGuard( m_rModelMutex );
213 m_xTheModel = pTheModel;
218 osl::Guard< osl::Mutex > aGuard( m_rModelMutex );
219 m_xTheModel = rTheModel.operator->();
224 osl::Guard< osl::Mutex > aGuard( m_rModelMutex );
229 return m_xTheModel.is();
240 const std::vector< rtl::Reference< BaseCoordinateSystem > > & xCooSysSequence( xDiagram->getBaseCoordinateSystems());
241 if (xCooSysSequence.empty())
244 return xCooSysSequence[0]->getChartTypes2()[0];
280 if (xChartType.is() && xChartType->getChartType() ==
"com.sun.star.chart2.PieChartType")
281 return "ChartElements";
303 OSL_FAIL(
"This Controller is suspended" );
325 "com.sun.star.frame.Controller"
347 if (!xSidebarProvider.is())
350 return xSidebarProvider->getSidebar();
368 OSL_FAIL(
"there is already a frame attached to the controller" );
383 pSidebar->registerSidebarForFrame(
this);
385 css::lang::EventObject
aEvent;
404 if (xContainerWindow)
405 xContainerWindow->setVisible(
true);
413 pChartWindow->SetBackground();
414 m_xViewWindow.set( pChartWindow->GetComponentInterface(), uno::UNO_QUERY );
415 pChartWindow->Show();
430 xPropSet->getPropertyValue(
"LayoutManager" ) >>= xLayoutManager;
431 if ( xLayoutManager.is() )
433 xLayoutManager->lock();
434 xLayoutManager->requestElement(
"private:resource/menubar/menubar" );
436 xLayoutManager->createElement(
"private:resource/toolbar/standardbar" );
437 xLayoutManager->requestElement(
"private:resource/toolbar/standardbar" );
439 xLayoutManager->createElement(
"private:resource/toolbar/toolbar" );
440 xLayoutManager->requestElement(
"private:resource/toolbar/toolbar" );
443 xLayoutManager->createElement(
"private:resource/toolbar/drawbar" );
444 xLayoutManager->requestElement(
"private:resource/toolbar/drawbar" );
446 xLayoutManager->requestElement(
"private:resource/statusbar/statusbar" );
447 xLayoutManager->unlock();
455 catch(
const uno::Exception & )
470 if( rEvent.NewMode ==
"dirty" )
474 pChartWindow->ForceInvalidate();
476 else if( rEvent.NewMode ==
"invalid" )
515 pChartWindow->Invalidate();
537 ::chart::ChartModel* pChartModel =
dynamic_cast<::chart::ChartModel*
>(
xModel.get());
538 assert(!
xModel || pChartModel);
545 if( aOldModelRef.
is() )
552 #ifdef TEST_ENABLE_MODIFY_LISTENER
554 aOldModelRef->
getModel()->removeModifyListener(
this );
565 pDispatch->initialize();
573 pDrawDispatch->initialize();
577 pShapeController->initialize();
581#ifdef TEST_ENABLE_MODIFY_LISTENER
583 aNewModelRef->
getModel()->addModifyListener(
this );
603 pChartWindow->Invalidate();
686 OSL_FAIL(
"new suspend mode equals old suspend mode" );
720 bool bLokCalcGlobalRTL =
false;
724 if (xChartModel.is())
728 bLokCalcGlobalRTL =
true;
764 pSidebar->unregisterSidebarForFrame(
this);
788 if( xDataReceiver.is() )
789 xSelectionChangeListener.set( xDataReceiver->getRangeHighlighter(), uno::UNO_QUERY );
790 if( xSelectionChangeListener.is() )
794 xSelectionChangeListener->disposing(
aEvent );
836#ifdef TEST_ENABLE_MODIFY_LISTENER
840 aModelRef->
getModel()->removeModifyListener(
this );
842 catch(
const uno::Exception & )
856 catch(
const uno::Exception & )
888 const lang::EventObject& rSource,
895 if( !aModelRef.
is() )
900 OSL_FAIL(
"queryClosing was called on a controller from an unknown source" );
908 const lang::EventObject& rSource )
922 if( xFrameCloseable.is())
926 xFrameCloseable->close(
false );
929 catch(
const util::CloseVetoException & )
939 bool bReleaseModel =
false;
946 bReleaseModel =
true;
954 return bReleaseModel;
959 const lang::EventObject& rSource )
969 const lang::EventObject& aSource,
970 sal_Int16 eLayoutEvent,
973 if( eLayoutEvent == frame::LayoutManagerEvents::MERGEDMENUBAR )
978 xLM->createElement(
"private:resource/statusbar/statusbar" );
979 xLM->requestElement(
"private:resource/statusbar/statusbar" );
989bool lcl_isFormatObjectCommand( std::u16string_view aCommand )
1033 ||
aCommand ==
u"FormatTrendlineEquation"
1042uno::Reference<frame::XDispatch> SAL_CALL
1044 const util::URL& rURL,
1045 const OUString& rTargetFrameName,
1052 if( !rTargetFrameName.isEmpty() && rTargetFrameName ==
"_self" )
1074 const util::URL& rURL,
1079 if(
aCommand ==
"LOKSetTextSelection")
1081 if (rArgs.getLength() == 3)
1083 sal_Int32
nType = -1;
1084 rArgs[0].Value >>=
nType;
1086 rArgs[1].Value >>= nX;
1088 rArgs[2].Value >>= nY;
1092 else if (
aCommand ==
"LOKTransform")
1094 if (rArgs[0].
Name ==
"Action")
1097 if ((rArgs[0].
Value >>= sAction) && sAction ==
"PieSegmentDragging")
1099 if (rArgs[1].
Name ==
"Offset")
1102 if (rArgs[1].
Value >>= nOffset)
1116 if (rArgs.getLength() > 0)
1119 if (rArgs[0].
Value >>= nColor)
1125 if (rArgs.getLength() > 0)
1127 sal_Int32 nColor = -1;
1128 rArgs[0].Value >>= nColor;
1134 if (rArgs.getLength() > 0)
1136 sal_Int32 nWidth = -1;
1137 rArgs[0].Value >>= nWidth;
1141 else if(
aCommand.startsWith(
"FillGradient"))
1147 else if(aCommand ==
"Copy" )
1149 else if(aCommand ==
"Cut" )
1151 else if(aCommand ==
"DataRanges" )
1153 else if(aCommand ==
"Update" )
1159 pChartWindow->Invalidate();
1161 else if(
aCommand ==
"DiagramData" )
1164 else if( aCommand ==
"InsertTitles"
1167 else if( aCommand ==
"InsertMenuLegend" )
1169 else if( aCommand ==
"InsertLegend" )
1171 else if( aCommand ==
"DeleteLegend" )
1173 else if( aCommand ==
"InsertMenuDataLabels" )
1175 else if( aCommand ==
"InsertMenuAxes"
1176 ||
aCommand ==
"InsertRemoveAxes" )
1178 else if( aCommand ==
"InsertMenuGrids" )
1180 else if( aCommand ==
"InsertMenuTrendlines" )
1182 else if( aCommand ==
"InsertMenuMeanValues" )
1184 else if( aCommand ==
"InsertMenuXErrorBars" )
1186 else if( aCommand ==
"InsertMenuYErrorBars" )
1188 else if( aCommand ==
"InsertMenuDataTable" )
1190 else if( aCommand ==
"InsertSymbol" )
1192 else if( aCommand ==
"InsertTrendline" )
1194 else if( aCommand ==
"DeleteTrendline" )
1196 else if( aCommand ==
"InsertMeanValue" )
1198 else if( aCommand ==
"DeleteMeanValue" )
1200 else if( aCommand ==
"InsertXErrorBars" )
1202 else if( aCommand ==
"InsertYErrorBars" )
1204 else if( aCommand ==
"DeleteXErrorBars" )
1206 else if( aCommand ==
"DeleteYErrorBars" )
1208 else if( aCommand ==
"InsertTrendlineEquation" )
1210 else if( aCommand ==
"DeleteTrendlineEquation" )
1212 else if( aCommand ==
"InsertTrendlineEquationAndR2" )
1214 else if( aCommand ==
"InsertR2Value" )
1216 else if( aCommand ==
"DeleteR2Value")
1218 else if( aCommand ==
"InsertDataLabels" )
1220 else if( aCommand ==
"InsertDataLabel" )
1222 else if( aCommand ==
"DeleteDataLabels")
1224 else if( aCommand ==
"DeleteDataLabel" )
1226 else if( aCommand ==
"ResetAllDataPoints" )
1228 else if( aCommand ==
"ResetDataPoint" )
1230 else if( aCommand ==
"InsertAxis" )
1232 else if( aCommand ==
"InsertMajorGrid" )
1234 else if( aCommand ==
"InsertMinorGrid" )
1236 else if( aCommand ==
"InsertAxisTitle" )
1238 else if( aCommand ==
"DeleteAxis" )
1240 else if( aCommand ==
"DeleteMajorGrid")
1242 else if( aCommand ==
"DeleteMinorGrid" )
1244 else if( aCommand ==
"InsertDataTable" )
1246 else if( aCommand ==
"DeleteDataTable" )
1249 else if( aCommand ==
"FormatSelection" )
1251 else if( aCommand ==
"TransformDialog" )
1262 else if( lcl_isFormatObjectCommand(
aCommand) )
1265 else if(
aCommand ==
"DiagramType" )
1267 else if( aCommand ==
"View3D" )
1269 else if ( aCommand ==
"Forward" )
1280 else if ( aCommand ==
"Backward" )
1291 else if( aCommand ==
"NewArrangement")
1293 else if( aCommand ==
"ToggleLegend" )
1295 else if( aCommand ==
"ToggleGridHorizontal" )
1297 else if( aCommand ==
"ToggleGridVertical" )
1299 else if( aCommand ==
"ScaleText" )
1301 else if( aCommand ==
"StatusBarVisible" )
1308 xPropSet->getPropertyValue(
"LayoutManager" ) >>= xLayoutManager;
1309 if ( xLayoutManager.is() )
1311 bool bIsVisible( xLayoutManager->isElementVisible(
"private:resource/statusbar/statusbar" ));
1314 xLayoutManager->hideElement(
"private:resource/statusbar/statusbar" );
1315 xLayoutManager->destroyElement(
"private:resource/statusbar/statusbar" );
1319 xLayoutManager->createElement(
"private:resource/statusbar/statusbar" );
1320 xLayoutManager->showElement(
"private:resource/statusbar/statusbar" );
1377 OSL_ENSURE( xChartDoc.is(),
"Invalid XChartDocument" );
1378 if( !xChartDoc.is() )
1383 ChartModel& rModel = *xChartDoc;
1384 if ( rModel.hasInternalDataProvider() )
1387 css::uno::Reference< com::sun::star::chart2::XDataProviderAccess > xCreatorDoc(
1388 rModel.getParent(), uno::UNO_QUERY);
1389 if (!xCreatorDoc.is())
1395 VclMessageType::Question, VclButtonsType::YesNo,
SchResId(STR_DLG_REMOVE_DATA_TABLE)));
1397 if (xQueryBox->run() ==
RET_NO)
1401 rModel.removeDataProviders();
1406 SAL_WARN_IF( !xDataProvider.is(),
"chart2.main",
"Data provider was not created" );
1407 if (xDataProvider.is())
1409 rModel.attachDataProvider(xDataProvider);
1440 bool bChanged =
getFirstDiagram()->moveSeries( xGivenDataSeries, bForward );
1454#if !ENABLE_WASM_STRIP_ACCESSIBILITY
1458 (void)aServiceSpecifier;
1466 const OUString& ServiceSpecifier,
1482 const lang::EventObject& )
1494 if ( !aObjectCID.isEmpty() )
1502 xUndoManager->addUndoAction( xAction );
1504 catch(
const uno::Exception& )
1573#if !ENABLE_WASM_STRIP_ACCESSIBILITY
1614 vcl::Window* pParentWin( pChartWindow->GetAccessibleParentWindow());
1616 xParent.set( pParentWin->GetAccessible());
1619 uno::Sequence< uno::Any >
aArguments{
uno::Any(uno::Reference<view::XSelectionSupplier>(
this)),
1625 xInit->initialize(aArguments);
1632 "AddDirect",
"NewDoc",
"Open",
1633 "Save",
"SaveAs",
"SendMail",
1634 "EditDoc",
"ExportDirectToPDF",
"PrintDefault",
1637 "Cut",
"Copy",
"Paste",
1638 "DataRanges",
"DiagramData",
1640 "InsertMenuTitles",
"InsertTitles",
1641 "InsertMenuLegend",
"InsertLegend",
"DeleteLegend",
1642 "InsertMenuDataLabels",
1643 "InsertMenuAxes",
"InsertRemoveAxes",
"InsertMenuGrids",
1645 "InsertTrendlineEquation",
"InsertTrendlineEquationAndR2",
1646 "InsertR2Value",
"DeleteR2Value",
1647 "InsertMenuTrendlines",
"InsertTrendline",
1648 "InsertMenuMeanValues",
"InsertMeanValue",
1649 "InsertMenuXErrorBars",
"InsertXErrorBars",
1650 "InsertMenuYErrorBars",
"InsertYErrorBars",
1651 "InsertDataLabels",
"InsertDataLabel",
1652 "DeleteTrendline",
"DeleteMeanValue",
"DeleteTrendlineEquation",
1653 "DeleteXErrorBars",
"DeleteYErrorBars",
1654 "DeleteDataLabels",
"DeleteDataLabel",
1655 "InsertMenuDataTable",
1656 "InsertDataTable",
"DeleteDataTable",
1658 "FormatSelection",
"TransformDialog",
1659 "DiagramType",
"View3D",
1660 "Forward",
"Backward",
1661 "MainTitle",
"SubTitle",
1662 "XTitle",
"YTitle",
"ZTitle",
1663 "SecondaryXTitle",
"SecondaryYTitle",
1664 "AllTitles",
"Legend",
1665 "DiagramAxisX",
"DiagramAxisY",
"DiagramAxisZ",
1666 "DiagramAxisA",
"DiagramAxisB",
"DiagramAxisAll",
1667 "DiagramGridXMain",
"DiagramGridYMain",
"DiagramGridZMain",
1668 "DiagramGridXHelp",
"DiagramGridYHelp",
"DiagramGridZHelp",
1670 "DiagramWall",
"DiagramFloor",
"DiagramArea",
1673 "FormatWall",
"FormatFloor",
"FormatChartArea",
1676 "FormatAxis",
"FormatTitle",
1677 "FormatDataSeries",
"FormatDataPoint",
1678 "ResetAllDataPoints",
"ResetDataPoint",
1679 "FormatDataLabels",
"FormatDataLabel",
1680 "FormatMeanValue",
"FormatTrendline",
"FormatTrendlineEquation",
1681 "FormatXErrorBars",
"FormatYErrorBars",
1682 "FormatStockLoss",
"FormatStockGain",
1684 "FormatMajorGrid",
"InsertMajorGrid",
"DeleteMajorGrid",
1685 "FormatMinorGrid",
"InsertMinorGrid",
"DeleteMinorGrid",
1686 "InsertAxis",
"DeleteAxis",
"InsertAxisTitle",
1689 "ToggleGridHorizontal",
"ToggleGridVertical",
"ToggleLegend",
"ScaleText",
1690 "NewArrangement",
"Update",
1691 "DefaultColors",
"BarWidth",
"NumberOfLines",
1694 "ChartElementSelector"};
1695 return s_AvailableCommands;
1705extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
1707 css::uno::Sequence<css::uno::Any>
const &)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_chart2_ChartController_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)
static OUString createDescription(ActionType eActionType, std::u16string_view rObjectName)
static bool GetLayoutRTL()
static weld::Window * GetFrameWeld(const css::uno::Reference< css::awt::XWindow > &rWindow)
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
static vcl::Window * GetWindow(const css::uno::Reference< css::awt::XWindow > &rxWindow)
static VclPtr< reference_type > Create(Arg &&... arg)
rtl::Reference< TheModel > m_xTheModel
TheModelRef(TheModel *pTheModel, ::osl::Mutex &rMutex)
TheModelRef & operator=(ChartController::TheModel *pTheModel)
::osl::Mutex & m_rModelMutex
const rtl::Reference<::chart::ChartModel > & getModel() const
TheModel(rtl::Reference<::chart::ChartModel > xModel)
virtual ~TheModel() override
void removeListener(ChartController *pController)
void addListener(ChartController *pController)
virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL queryDispatches(const css::uno::Sequence< css::frame::DispatchDescriptor > &xDescripts) override
virtual sal_Bool SAL_CALL suspend(sal_Bool bSuspend) override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
void executeDispatch_ChartType()
void executeDispatch_LineColor(sal_uInt32 nColor)
void executeDispatch_DeleteErrorBars(bool bYError)
void executeDispatch_View3D()
rtl::Reference<::chart::ChartModel > getChartModel()
css::uno::Reference< css::accessibility::XAccessible > CreateAccessible()
virtual void SAL_CALL restoreViewData(const css::uno::Any &rValue) override
void executeDispatch_InsertMeanValue()
virtual css::uno::Any SAL_CALL getViewData() override
void executeDispatch_NewArrangement()
void executeDispatch_InsertDataLabel()
void executeDispatch_MoveSeries(bool bForward)
void executeDispatch_DeleteDataLabels()
virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch(const css::util::URL &rURL, const OUString &rTargetFrameName, sal_Int32 nSearchFlags) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
void executeDispatch_ObjectProperties()
virtual css::uno::Reference< css::awt::XWindow > SAL_CALL getComponentWindow() override
void executeDispatch_FillGradient(std::u16string_view sJSONGradient)
std::unique_ptr< DrawViewWrapper > m_pDrawViewWrapper
void executeDispatch_OpenLegendDialog()
css::uno::Reference< css::awt::XWindow > m_xViewWindow
css::uno::Reference< css::document::XUndoManager > m_xUndoManager
void executeDispatch_DeleteLegend()
void executeDispatch_LOKPieSegmentDragging(int nOffset)
virtual void SAL_CALL dispatch(const css::util::URL &aURL, const css::uno::Sequence< css::beans::PropertyValue > &aArgs) override
void executeDispatch_ToggleGridVertical()
void executeDispatch_FillColor(sal_uInt32 nColor)
void executeDispatch_ScaleText()
DrawViewWrapper * GetDrawViewWrapper()
std::unique_ptr< DropTargetHelper > m_apDropTargetHelper
bool isAdditionalShapeSelected() const
void executeDispatch_LOKSetTextSelection(int nType, int nX, int nY)
ChartWindow * GetChartWindow() const
bool impl_isDisposedOrSuspended() const
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArguments(const OUString &ServiceSpecifier, const css::uno::Sequence< css::uno::Any > &Arguments) override
virtual css::uno::Reference< css::ui::XSidebarProvider > SAL_CALL getSidebar() override
void executeDispatch_InsertMajorGrid()
virtual void SAL_CALL removeStatusListener(const css::uno::Reference< css::frame::XStatusListener > &xControl, const css::util::URL &aURL) override
void executeDispatch_DeleteR2Value()
std::shared_ptr< DrawModelWrapper > m_pDrawModelWrapper
void executeDispatch_EditData()
mutable::osl::Mutex m_aModelMutex
void executeDispatch_InsertTitles()
virtual void SAL_CALL modeChanged(const css::util::ModeChangeEvent &_rSource) override
OUString GetContextName()
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
void executeDispatch_Cut()
void stopDoubleClickWaiting()
rtl::Reference<::chart::ChartView > m_xChartView
void executeDispatch_InsertAxes()
void executeDispatch_SourceData()
bool impl_releaseThisModel(const css::uno::Reference< css::uno::XInterface > &xModel)
void executeDispatch_InsertMenu_Trendlines()
virtual sal_Bool SAL_CALL attachModel(const css::uno::Reference< css::frame::XModel > &xModel) override
weld::Window * GetChartFrame()
void executeDispatch_OpenInsertDataTableDialog()
virtual void SAL_CALL registerContextMenuInterceptor(const css::uno::Reference< css::ui::XContextMenuInterceptor > &xInterceptor) override
void executeDispatch_InsertMenu_DataLabels()
void executeDispatch_InsertTrendline()
virtual void SAL_CALL queryClosing(const css::lang::EventObject &Source, sal_Bool GetsOwnership) override
void executeDispatch_InsertAxisTitle()
void executeDispatch_InsertMenu_MeanValues()
virtual OUString SAL_CALL getViewControllerName() override
virtual void SAL_CALL notifyClosing(const css::lang::EventObject &Source) override
void executeDispatch_DeleteAxis()
virtual css::uno::Any SAL_CALL getSelection() override
void impl_initializeAccessible()
void executeDispatch_DeleteMinorGrid()
void executeDispatch_Copy()
virtual void SAL_CALL layoutEvent(const css::lang::EventObject &aSource, ::sal_Int16 eLayoutEvent, const css::uno::Any &aInfo) override
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance(const OUString &aServiceSpecifier) override
void impl_createDrawViewController()
mutable::apphelper::LifeTimeManager m_aLifeTimeManager
virtual void SAL_CALL dispose() override
void executeDispatch_ResetAllDataPoints()
void executeDispatch_DeleteDataLabel()
DrawModelWrapper * GetDrawModelWrapper()
virtual css::uno::Reference< css::frame::XFrame > SAL_CALL getFrame() override
virtual void SAL_CALL modified(const css::lang::EventObject &aEvent) override
void executeDispatch_InsertLegend()
void SetAndApplySelection(const css::uno::Reference< css::drawing::XShape > &rxShape)
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCreationArguments() override
css::uno::Reference< css::accessibility::XAccessibleContext > impl_createAccessibleTextContext()
Creates a helper accessibility class that must be initialized via XInitialization.
css::uno::Reference< css::frame::XFrame > m_xFrame
void executeDispatch_DeleteMeanValue()
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
void executeDispatch_DeleteDataTable()
Delete a data table from the chart.
CommandDispatchContainer m_aDispatchContainer
void impl_selectObjectAndNotiy()
void executeDispatch_LineWidth(sal_uInt32 nWidth)
void executeDispatch_DeleteMajorGrid()
void executeDispatch_ResetDataPoint()
void impl_deleteDrawViewController()
void executeDispatch_Paste()
rtl::Reference<::chart::Diagram > getFirstDiagram()
void executeDispatch_DeleteTrendline()
void executeDispatch_PositionAndSize(const ::css::uno::Sequence< ::css::beans::PropertyValue > *pArgs=nullptr)
rtl::Reference< svx::sidebar::SelectionChangeHandler > mpSelectionChangeHandler
virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames() override
static const o3tl::sorted_vector< OUString > & impl_getAvailableCommands()
void impl_ShapeControllerDispatch(const css::util::URL &rURL, const css::uno::Sequence< css::beans::PropertyValue > &rArgs)
virtual OUString SAL_CALL getImplementationName() override
virtual void SAL_CALL attachFrame(const css::uno::Reference< css::frame::XFrame > &xFrame) override
void executeDispatch_InsertSpecialCharacter()
css::uno::Reference< css::frame::XLayoutManagerEventBroadcaster > m_xLayoutManagerEventBroadcaster
void executeDispatch_DeleteTrendlineEquation()
void executeDispatch_ToggleGridHorizontal()
bool isShapeContext() const
void executeDispatch_FormatObject(std::u16string_view rDispatchCommand)
virtual css::uno::Reference< css::frame::XModel > SAL_CALL getModel() override
virtual ~ChartController() override
void executeDispatch_InsertR2Value()
void executeDispatch_InsertDataTable()
Create and insert a data table to the chart.
virtual void SAL_CALL releaseContextMenuInterceptor(const css::uno::Reference< css::ui::XContextMenuInterceptor > &xInterceptor) override
void executeDispatch_InsertAxis()
void NotifyUndoActionHdl(std::unique_ptr< SdrUndoAction >)
css::uno::Reference< css::uno::XComponentContext > m_xCC
void executeDispatch_InsertErrorBars(bool bYError)
void impl_adaptDataSeriesAutoResize()
virtual void SAL_CALL addStatusListener(const css::uno::Reference< css::frame::XStatusListener > &xControl, const css::util::URL &aURL) override
void executeDispatch_ToggleLegend()
void executeDispatch_InsertTrendlineEquation(bool bInsertR2=false)
void executeDispatch_InsertMinorGrid()
void impl_invalidateAccessible()
void executeDispatch_InsertGrid()
void executeDispatch_InsertDataLabels()
ViewElementListProvider getViewElementListProvider()
static void triggerRangeHighlighting(const rtl::Reference<::chart::ChartModel > &xModel)
static void setViewToDirtyState(const rtl::Reference<::chart::ChartModel > &xChartModel)
The ChartView is responsible to manage the generation of Drawing Objects for visualization on a given...
The ChartWindow collects events from the window and forwards them the to the controller thus the cont...
void setModel(const rtl::Reference<::chart::ChartModel > &xModel)
void setDrawCommandDispatch(DrawCommandDispatch *pDispatch)
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)
void setShapeController(ShapeController *pController)
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.
This class is a CommandDispatch that is responsible for all commands that the ChartController support...
This guard calls lockControllers at the given Model in the CTOR and unlockControllers in the DTOR.
virtual short run() override
This is a CommandDispatch implementation for drawing objects.
static rtl::Reference< ::chart::DataSeries > getDataSeriesForCID(std::u16string_view rObjectCID, const rtl::Reference<::chart::ChartModel > &xChartModel)
static OUString getMovedSeriesCID(std::u16string_view rObjectCID, bool bForward)
ObjectType getObjectType() const
bool hasSelection() const
bool isAdditionalShapeSelected() const
OUString const & getSelectedCID() const
void applySelection(DrawViewWrapper *pDrawViewWrapper)
bool setSelection(const OUString &rCID)
This is a CommandDispatch implementation for shapes.
A guard which, in its destructor, restores the model state it found in the constructor.
#define DBG_TESTSOLARMUTEX()
#define DBG_UNHANDLED_EXCEPTION(...)
#define ENSURE_OR_RETURN_VOID(c, m)
Reference< frame::XModel > m_xModel
Sequence< OUString > aServiceNames
Sequence< PropertyValue > aArguments
#define LINK(Instance, Class, Member)
#define SAL_WARN_IF(condition, area, stream)
@ OBJECTTYPE_DATA_ERRORS_X
@ OBJECTTYPE_DATA_ERRORS_Y
@ OBJECTTYPE_DATA_AVERAGE_LINE
@ OBJECTTYPE_DATA_ERRORS_Z
OUString OOO_DLLPUBLIC_CHARTTOOLS SchResId(TranslateId aId)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
constexpr OUStringLiteral CHART_VIEW_SERVICE_NAME
constexpr OUStringLiteral CHART_CONTROLLER_SERVICE_NAME
constexpr OUStringLiteral CHART_ACCESSIBLE_TEXT_SERVICE_NAME
constexpr OUStringLiteral CHART_CONTROLLER_SERVICE_IMPLEMENTATION_NAME
Reference< XController > xController
Reference< XFrame > xFrame
Reference< XModel > xModel