summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-05-11 15:40:42 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-12 09:56:01 +0200
commit389da66dfc96d06c407bff156c4ea21e940c5e06 (patch)
tree2d1ebce6bdb2d952700ed5aaeb808289e9f72a7d /chart2
parenta651dbcfca9e198b5c2561076961504586bc6bea (diff)
remove unused uno::Reference vars
found by temporarily marking Reference as SAL_WARN_UNUSED. Change-Id: I18809b62654467f890016adcc92576980ced393b Reviewed-on: https://gerrit.libreoffice.org/37511 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-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
-rw-r--r--chart2/source/model/main/ChartModel.cxx1
-rw-r--r--chart2/source/tools/AxisHelper.cxx1
-rw-r--r--chart2/source/tools/DiagramHelper.cxx1
-rw-r--r--chart2/source/tools/ExplicitCategoriesProvider.cxx1
-rw-r--r--chart2/source/view/axes/VCartesianAxis.cxx2
-rw-r--r--chart2/source/view/main/VLegendSymbolFactory.cxx3
12 files changed, 11 insertions, 31 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());
diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx
index 1b3e233b5218..48d38e832850 100644
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -1173,7 +1173,6 @@ tServiceNameMap & lcl_getStaticServiceNameMap()
// ____ XMultiServiceFactory ____
Reference< uno::XInterface > SAL_CALL ChartModel::createInstance( const OUString& rServiceSpecifier )
{
- uno::Reference< uno::XInterface > xResult;
tServiceNameMap & rMap = lcl_getStaticServiceNameMap();
tServiceNameMap::const_iterator aIt( rMap.find( rServiceSpecifier ));
diff --git a/chart2/source/tools/AxisHelper.cxx b/chart2/source/tools/AxisHelper.cxx
index 473d1eed8015..26ea1979e991 100644
--- a/chart2/source/tools/AxisHelper.cxx
+++ b/chart2/source/tools/AxisHelper.cxx
@@ -981,7 +981,6 @@ void AxisHelper::getAxisOrGridExcistence( Sequence< sal_Bool >& rExistenceList
if(bAxis)
{
sal_Int32 nN;
- Reference< XAxis > xAxis;
for(nN=0;nN<3;nN++)
rExistenceList[nN] = AxisHelper::isAxisShown( nN, true, xDiagram );
for(nN=3;nN<6;nN++)
diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx
index 3bc8e462a839..d0d29a1c324e 100644
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -769,7 +769,6 @@ std::vector< Reference< XAxis > > lcl_getAxisHoldingCategoriesFromDiagram(
{
std::vector< Reference< XAxis > > aRet;
- Reference< XAxis > xResult;
// return first x-axis as fall-back
Reference< XAxis > xFallBack;
try
diff --git a/chart2/source/tools/ExplicitCategoriesProvider.cxx b/chart2/source/tools/ExplicitCategoriesProvider.cxx
index 925c5e56f72a..9f5998297ff0 100644
--- a/chart2/source/tools/ExplicitCategoriesProvider.cxx
+++ b/chart2/source/tools/ExplicitCategoriesProvider.cxx
@@ -173,7 +173,6 @@ void ExplicitCategoriesProvider::convertCategoryAnysToText( uno::Sequence< OUStr
if(!nCount)
return;
rOutTexts.realloc(nCount);
- Reference< util::XNumberFormats > xNumberFormats( rModel.getNumberFormats() );
sal_Int32 nAxisNumberFormat = 0;
Reference< XCoordinateSystem > xCooSysModel( ChartModelHelper::getFirstCoordinateSystem( rModel ) );
diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx
index 64ada6d2af09..3ff5cd913cfb 100644
--- a/chart2/source/view/axes/VCartesianAxis.cxx
+++ b/chart2/source/view/axes/VCartesianAxis.cxx
@@ -1840,7 +1840,7 @@ void VCartesianAxis::createShapes()
{std::initializer_list<awt::Point>{
{static_cast<sal_Int32>(aStart.getX()), static_cast<sal_Int32>(aStart.getY())},
{static_cast<sal_Int32>(aEnd.getX()), static_cast<sal_Int32>(aEnd.getY())} }}};
- Reference< drawing::XShape > xShape = m_pShapeFactory->createLine2D(
+ m_pShapeFactory->createLine2D(
m_xGroupShape_Shapes, aPoints, &m_aAxisProperties.m_aLineProperties );
}
}
diff --git a/chart2/source/view/main/VLegendSymbolFactory.cxx b/chart2/source/view/main/VLegendSymbolFactory.cxx
index 0ccc53df3dcb..326da900cf8b 100644
--- a/chart2/source/view/main/VLegendSymbolFactory.cxx
+++ b/chart2/source/view/main/VLegendSymbolFactory.cxx
@@ -181,8 +181,7 @@ Reference< drawing::XShape > VLegendSymbolFactory::createSymbol(
getPropNamesAndValues( xLegendEntryProperties, aPropNames, aPropValues,
ePropertyType, awt::Size(0,0) );// PropertyType::FilledSeries
- Reference< drawing::XShape > xShape =
- pShapeFactory->createRectangle( xResultGroup,
+ pShapeFactory->createRectangle( xResultGroup,
rEntryKeyAspectRatio, awt::Point( 0, 0 ),
aPropNames, aPropValues );
}