summaryrefslogtreecommitdiff
path: root/chart2/source/controller/main/ChartController.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/controller/main/ChartController.cxx')
-rw-r--r--chart2/source/controller/main/ChartController.cxx27
1 files changed, 25 insertions, 2 deletions
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index f50fab660acf..a6662e2a023e 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -64,6 +64,7 @@
#include <com/sun/star/chart2/XChartTypeContainer.hpp>
#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
#include <com/sun/star/chart2/XDataProviderAccess.hpp>
+#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <sal/log.hxx>
#include <tools/debug.hxx>
@@ -72,6 +73,7 @@
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>
#include <osl/mutex.hxx>
+#include <comphelper/lok.hxx>
#include <sfx2/sidebar/SidebarController.hxx>
@@ -403,7 +405,7 @@ void SAL_CALL ChartController::attachFrame(
{
auto pSidebar = dynamic_cast<sfx2::sidebar::SidebarController*>(xSidebar.get());
assert(pSidebar);
- sfx2::sidebar::SidebarController::registerSidebarForFrame(pSidebar, this);
+ pSidebar->registerSidebarForFrame(this);
pSidebar->updateModel(getModel());
css::lang::EventObject aEvent;
mpSelectionChangeHandler->selectionChanged(aEvent);
@@ -716,7 +718,20 @@ void ChartController::impl_createDrawViewController()
{
if( m_pDrawModelWrapper )
{
+ bool bLokCalcGlobalRTL = false;
+ if(comphelper::LibreOfficeKit::isActive() && AllSettings::GetLayoutRTL())
+ {
+ uno::Reference< XChartDocument > xChartDoc(getModel(), uno::UNO_QUERY);
+ if (xChartDoc.is())
+ {
+ ChartModel& rModel = dynamic_cast<ChartModel&>(*xChartDoc);
+ uno::Reference<css::sheet::XSpreadsheetDocument> xSSDoc(rModel.getParent(), uno::UNO_QUERY);
+ if (xSSDoc.is())
+ bLokCalcGlobalRTL = true;
+ }
+ }
m_pDrawViewWrapper.reset( new DrawViewWrapper(m_pDrawModelWrapper->getSdrModel(),GetChartWindow()->GetOutDev()) );
+ m_pDrawViewWrapper->SetNegativeX(bLokCalcGlobalRTL);
m_pDrawViewWrapper->attachParentReferenceDevice( getModel() );
}
}
@@ -747,7 +762,7 @@ void SAL_CALL ChartController::dispose()
uno::Reference<ui::XSidebar> xSidebar = getSidebarFromModel(getModel());
if (sfx2::sidebar::SidebarController* pSidebar = dynamic_cast<sfx2::sidebar::SidebarController*>(xSidebar.get()))
{
- sfx2::sidebar::SidebarController::unregisterSidebarForFrame(pSidebar, this);
+ pSidebar->unregisterSidebarForFrame(this);
}
}
@@ -1172,6 +1187,8 @@ void SAL_CALL ChartController::dispatch(
this->executeDispatch_InsertErrorBars(false);
else if( aCommand == "InsertMenuYErrorBars" )
this->executeDispatch_InsertErrorBars(true);
+ else if( aCommand == "InsertMenuDataTable" )
+ this->executeDispatch_OpenInsertDataTableDialog();
else if( aCommand == "InsertSymbol" )
this->executeDispatch_InsertSpecialCharacter();
else if( aCommand == "InsertTrendline" )
@@ -1226,6 +1243,10 @@ void SAL_CALL ChartController::dispatch(
this->executeDispatch_DeleteMajorGrid();
else if( aCommand == "DeleteMinorGrid" )
this->executeDispatch_DeleteMinorGrid();
+ else if( aCommand == "InsertDataTable" )
+ this->executeDispatch_InsertDataTable();
+ else if( aCommand == "DeleteDataTable" )
+ this->executeDispatch_DeleteDataTable();
//format objects
else if( aCommand == "FormatSelection" )
this->executeDispatch_ObjectProperties();
@@ -1625,6 +1646,8 @@ const o3tl::sorted_vector< OUString >& ChartController::impl_getAvailableCommand
"DeleteTrendline", "DeleteMeanValue", "DeleteTrendlineEquation",
"DeleteXErrorBars", "DeleteYErrorBars",
"DeleteDataLabels", "DeleteDataLabel",
+ "InsertMenuDataTable",
+ "InsertDataTable", "DeleteDataTable",
//format objects
"FormatSelection", "TransformDialog",
"DiagramType", "View3D",