summaryrefslogtreecommitdiff
path: root/chart2/source/controller
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/controller')
-rw-r--r--chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx2
-rw-r--r--chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx4
-rw-r--r--chart2/source/controller/main/ChartController_EditData.cxx20
-rw-r--r--chart2/source/controller/main/ChartController_Properties.cxx1
-rw-r--r--chart2/source/controller/main/ChartController_Tools.cxx2
-rw-r--r--chart2/source/controller/sidebar/ChartSeriesPanel.cxx4
6 files changed, 9 insertions, 24 deletions
diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
index abc07cf85942..3d4f789169d7 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
@@ -687,7 +687,6 @@ Reference< drawing::XShape > SAL_CALL ChartDocumentWrapper::getLegend()
if( ! m_xLegend.is())
{
m_xLegend = new LegendWrapper( m_spChart2ModelContact );
- Reference< lang::XComponent > xComp( m_xLegend, uno::UNO_QUERY );
}
return m_xLegend;
@@ -698,7 +697,6 @@ Reference< beans::XPropertySet > SAL_CALL ChartDocumentWrapper::getArea()
if( ! m_xArea.is())
{
m_xArea.set( new AreaWrapper( m_spChart2ModelContact ) );
- Reference< lang::XComponent > xComp( m_xArea, uno::UNO_QUERY );
}
return m_xArea;
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index b62f1705acd4..c1614607ef00 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -687,8 +687,6 @@ Reference<
throw lang::IndexOutOfBoundsException("DataSeries index invalid",
static_cast< ::cppu::OWeakObject * >( this ));
- Reference< chart2::XDataSeries > xSeries;
-
sal_Int32 nNewAPIIndex = lcl_getNewAPIIndexForOldAPIIndex( nRow, m_spChart2ModelContact->getChart2Diagram() );
if( nNewAPIIndex < 0 )
throw lang::IndexOutOfBoundsException("DataSeries index invalid",
@@ -706,8 +704,6 @@ Reference<
throw lang::IndexOutOfBoundsException("DataSeries index invalid",
static_cast< ::cppu::OWeakObject * >( this ));
- Reference< chart2::XDataSeries > xSeries;
-
sal_Int32 nNewAPIIndex = lcl_getNewAPIIndexForOldAPIIndex( nRow, m_spChart2ModelContact->getChart2Diagram() );
if( nNewAPIIndex < 0 )
throw lang::IndexOutOfBoundsException("DataSeries index invalid",
diff --git a/chart2/source/controller/main/ChartController_EditData.cxx b/chart2/source/controller/main/ChartController_EditData.cxx
index 646a27a35cb1..fdff4e769147 100644
--- a/chart2/source/controller/main/ChartController_EditData.cxx
+++ b/chart2/source/controller/main/ChartController_EditData.cxx
@@ -45,18 +45,14 @@ void ChartController::executeDispatch_EditData()
Reference< chart2::XChartDocument > xChartDoc( getModel(), uno::UNO_QUERY );
if( xChartDoc.is())
{
- Reference< css::chart2::data::XDataProvider > xDataProvider( xChartDoc->getDataProvider());
-
- {
- SolarMutexGuard aSolarGuard;
- UndoLiveUpdateGuardWithData aUndoGuard(
- SCH_RESSTR( STR_ACTION_EDIT_CHART_DATA ),
- m_xUndoManager );
- ScopedVclPtrInstance<DataEditor> aDataEditorDialog( nullptr, xChartDoc, m_xCC );
- if (aDataEditorDialog->Execute() == RET_OK)
- aDataEditorDialog->ApplyChangesToModel();
- aUndoGuard.commit();
- }
+ SolarMutexGuard aSolarGuard;
+ UndoLiveUpdateGuardWithData aUndoGuard(
+ SCH_RESSTR( STR_ACTION_EDIT_CHART_DATA ),
+ m_xUndoManager );
+ ScopedVclPtrInstance<DataEditor> aDataEditorDialog( nullptr, xChartDoc, m_xCC );
+ if (aDataEditorDialog->Execute() == RET_OK)
+ aDataEditorDialog->ApplyChangesToModel();
+ aUndoGuard.commit();
}
}
diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx
index b5577ff40f57..795b3b38b08c 100644
--- a/chart2/source/controller/main/ChartController_Properties.cxx
+++ b/chart2/source/controller/main/ChartController_Properties.cxx
@@ -174,7 +174,6 @@ wrapper::ItemConverter* createItemConverter(
pRefSize.reset( new awt::Size( pRefSizeProvider->getPageSize()));
uno::Reference<XDataSeries> xSeries = ObjectIdentifier::getDataSeriesForCID(aObjectCID, xChartModel);
- uno::Reference<XChartType> xChartType = ChartModelHelper::getChartTypeOfSeries(xChartModel, xSeries);
uno::Reference<XDiagram> xDiagram = ChartModelHelper::findDiagram(xChartModel);
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx
index 53b7594e412a..50f0a12b474a 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -859,7 +859,6 @@ void ChartController::executeDispatch_ToggleLegend()
void ChartController::executeDispatch_ToggleGridHorizontal()
{
- Reference< frame::XModel > xModel( getModel() );
UndoGuard aUndoGuard(
SCH_RESSTR( STR_ACTION_TOGGLE_GRID_HORZ ), m_xUndoManager );
Reference< chart2::XDiagram > xDiagram( ChartModelHelper::findDiagram( getModel() ));
@@ -893,7 +892,6 @@ void ChartController::executeDispatch_ToggleGridHorizontal()
void ChartController::executeDispatch_ToggleGridVertical()
{
- Reference< frame::XModel > xModel( getModel() );
UndoGuard aUndoGuard(
SCH_RESSTR( STR_ACTION_TOGGLE_GRID_VERTICAL ), m_xUndoManager );
Reference< chart2::XDiagram > xDiagram( ChartModelHelper::findDiagram( getModel() ));
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
index ca18efbabe77..6eb04776332b 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
@@ -162,9 +162,7 @@ void setTrendlineVisible(const css::uno::Reference<css::frame::XModel>&
if (bVisible)
{
- /* code */
- uno::Reference< chart2::XRegressionCurve > xCurve =
- RegressionCurveHelper::addRegressionCurve(
+ RegressionCurveHelper::addRegressionCurve(
SvxChartRegress::Linear,
xRegressionCurveContainer,
comphelper::getProcessComponentContext());