summaryrefslogtreecommitdiff
path: root/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx')
-rw-r--r--chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx22
1 files changed, 9 insertions, 13 deletions
diff --git a/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx b/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx
index ceec42d736e8..8ed2c1d7d650 100644
--- a/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx
+++ b/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx
@@ -21,18 +21,15 @@
#include <res_ErrorBar.hxx>
#include <chartview/ExplicitScaleValues.hxx>
#include <chartview/ExplicitValueProvider.hxx>
-#include <ChartModelHelper.hxx>
#include <ChartModel.hxx>
+#include <ChartView.hxx>
#include <ObjectIdentifier.hxx>
-#include <DiagramHelper.hxx>
#include <Diagram.hxx>
+#include <Axis.hxx>
#include <AxisHelper.hxx>
#include <ObjectNameProvider.hxx>
+#include <DataSeries.hxx>
-#include <com/sun/star/frame/XModel.hpp>
-#include <comphelper/servicehelper.hxx>
-
-using ::com::sun::star::uno::Reference;
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
@@ -67,18 +64,17 @@ void InsertErrorBarsDialog::SetAxisMinorStepWidthForErrorBarDecimals( double fMi
double InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals(
const rtl::Reference<::chart::ChartModel>& xChartModel,
- const Reference< uno::XInterface >& xChartView,
- const OUString& rSelectedObjectCID )
+ const rtl::Reference<::chart::ChartView>& xChartView,
+ std::u16string_view rSelectedObjectCID )
{
double fStepWidth = 0.001;
- ExplicitValueProvider* pExplicitValueProvider( comphelper::getFromUnoTunnel<ExplicitValueProvider>(xChartView) );
+ ExplicitValueProvider* pExplicitValueProvider( xChartView.get() );
if( pExplicitValueProvider )
{
- Reference< XAxis > xAxis;
- rtl::Reference< Diagram > xDiagram( ChartModelHelper::findDiagram( xChartModel ) );
- Reference< XDataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( rSelectedObjectCID, xChartModel );
- xAxis = DiagramHelper::getAttachedAxis( xSeries, xDiagram );
+ rtl::Reference< Diagram > xDiagram( xChartModel->getFirstChartDiagram() );
+ rtl::Reference< DataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( rSelectedObjectCID, xChartModel );
+ rtl::Reference< Axis > xAxis = xDiagram->getAttachedAxis( xSeries );
if(!xAxis.is())
xAxis = AxisHelper::getAxis( 1/*nDimensionIndex*/, true/*bMainAxis*/, xDiagram );
if(xAxis.is())