chart2/qa/extras/PivotChartTest.cxx                     |   30 +++++-----------
 chart2/qa/extras/chart2export.cxx                       |    4 --
 chart2/source/controller/main/ChartController_Tools.cxx |    3 -
 chart2/source/view/charttypes/BubbleChart.cxx           |    3 -
 chart2/source/view/diagram/VDiagram.cxx                 |    3 -
 chart2/source/view/main/VDataSeries.cxx                 |    8 +---
 chart2/source/view/main/VLegend.cxx                     |    3 -
 7 files changed, 17 insertions(+), 37 deletions(-)

New commits:
commit f7d8e3318044bb70647424a1eea354bc59e4ced5
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Fri Apr 12 13:54:38 2019 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Apr 12 20:30:46 2019 +0200

    loplugin:sequentialassign in chart2
    
    Change-Id: I211114140afc3f5b32b8b034e63e8d52f78be36a
    Reviewed-on: https://gerrit.libreoffice.org/70659
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/chart2/qa/extras/PivotChartTest.cxx 
b/chart2/qa/extras/PivotChartTest.cxx
index 086c4e91bcdb..d5d348c89df5 100644
--- a/chart2/qa/extras/PivotChartTest.cxx
+++ b/chart2/qa/extras/PivotChartTest.cxx
@@ -544,11 +544,9 @@ void PivotChartTest::testPivotChartWithOneColumnField()
 
     table::CellRangeAddress sCellRangeAdress = lclCreateTestData(xSheetDoc);
 
-    uno::Reference<sheet::XDataPilotTables> xDataPilotTables;
-    xDataPilotTables = lclGetDataPilotTables(0, xSheetDoc);
+    uno::Reference<sheet::XDataPilotTables> xDataPilotTables = 
lclGetDataPilotTables(0, xSheetDoc);
 
-    uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor;
-    xDataPilotDescriptor = xDataPilotTables->createDataPilotDescriptor();
+    uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor = 
xDataPilotTables->createDataPilotDescriptor();
     xDataPilotDescriptor->setSourceRange(sCellRangeAdress);
 
     lclModifyOrientation(xDataPilotDescriptor, "Country", 
sheet::DataPilotFieldOrientation_COLUMN);
@@ -631,11 +629,9 @@ void PivotChartTest::testPivotChartWithOneRowField()
 
     table::CellRangeAddress sCellRangeAdress = lclCreateTestData(xSheetDoc);
 
-    uno::Reference<sheet::XDataPilotTables> xDataPilotTables;
-    xDataPilotTables = lclGetDataPilotTables(0, xSheetDoc);
+    uno::Reference<sheet::XDataPilotTables> xDataPilotTables = 
lclGetDataPilotTables(0, xSheetDoc);
 
-    uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor;
-    xDataPilotDescriptor = xDataPilotTables->createDataPilotDescriptor();
+    uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor = 
xDataPilotTables->createDataPilotDescriptor();
     xDataPilotDescriptor->setSourceRange(sCellRangeAdress);
 
     lclModifyOrientation(xDataPilotDescriptor, "Country", 
sheet::DataPilotFieldOrientation_ROW);
@@ -694,11 +690,9 @@ void 
PivotChartTest::testPivotTableDataProvider_PivotTableFields()
 
     table::CellRangeAddress sCellRangeAdress = lclCreateTestData(xSheetDoc);
 
-    uno::Reference<sheet::XDataPilotTables> xDataPilotTables;
-    xDataPilotTables = lclGetDataPilotTables(0, xSheetDoc);
+    uno::Reference<sheet::XDataPilotTables> xDataPilotTables = 
lclGetDataPilotTables(0, xSheetDoc);
 
-    uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor;
-    xDataPilotDescriptor = xDataPilotTables->createDataPilotDescriptor();
+    uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor = 
xDataPilotTables->createDataPilotDescriptor();
     xDataPilotDescriptor->setSourceRange(sCellRangeAdress);
 
     lclModifyOrientation(xDataPilotDescriptor, "City", 
sheet::DataPilotFieldOrientation_ROW);
@@ -804,11 +798,9 @@ void PivotChartTest::testPivotChartRowFieldInOutlineMode()
 
     table::CellRangeAddress sCellRangeAdress = lclCreateTestData(xSheetDoc);
 
-    uno::Reference<sheet::XDataPilotTables> xDataPilotTables;
-    xDataPilotTables = lclGetDataPilotTables(0, xSheetDoc);
+    uno::Reference<sheet::XDataPilotTables> xDataPilotTables = 
lclGetDataPilotTables(0, xSheetDoc);
 
-    uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor;
-    xDataPilotDescriptor = xDataPilotTables->createDataPilotDescriptor();
+    uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor = 
xDataPilotTables->createDataPilotDescriptor();
     xDataPilotDescriptor->setSourceRange(sCellRangeAdress);
 
     lclModifyOrientation(xDataPilotDescriptor, "Country", 
sheet::DataPilotFieldOrientation_ROW);
@@ -940,11 +932,9 @@ void PivotChartTest::testPivotChartWithDateRowField()
 
     table::CellRangeAddress sCellRangeAdress = lclCreateTestData(xSheetDoc);
 
-    uno::Reference<sheet::XDataPilotTables> xDataPilotTables;
-    xDataPilotTables = lclGetDataPilotTables(0, xSheetDoc);
+    uno::Reference<sheet::XDataPilotTables> xDataPilotTables = 
lclGetDataPilotTables(0, xSheetDoc);
 
-    uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor;
-    xDataPilotDescriptor = xDataPilotTables->createDataPilotDescriptor();
+    uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor = 
xDataPilotTables->createDataPilotDescriptor();
     xDataPilotDescriptor->setSourceRange(sCellRangeAdress);
 
     lclModifyOrientation(xDataPilotDescriptor, "Date", 
sheet::DataPilotFieldOrientation_ROW);
diff --git a/chart2/qa/extras/chart2export.cxx 
b/chart2/qa/extras/chart2export.cxx
index b0cca5802f22..6dd8d7d9e9c1 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -1205,9 +1205,7 @@ void Chart2ExportTest::testShapeFollowedByChart()
     CPPUNIT_ASSERT(pXmlDoc);
 
     OUString aValueOfFirstDocPR = getXPath(pXmlDoc, 
"/w:document/w:body/w:p[3]/w:r[1]/w:drawing[1]/wp:inline[1]/wp:docPr[1]", "id");
-    OUString aValueOfSecondDocPR;
-
-    aValueOfSecondDocPR = getXPath(pXmlDoc, 
"/w:document/w:body/w:p[3]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/wp:docPr[1]",
 "id");
+    OUString aValueOfSecondDocPR = getXPath(pXmlDoc, 
"/w:document/w:body/w:p[3]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/wp:docPr[1]",
 "id");
 
     CPPUNIT_ASSERT( aValueOfFirstDocPR != aValueOfSecondDocPR );
 }
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx 
b/chart2/source/controller/main/ChartController_Tools.cxx
index 6896cd4f208c..ff44fc36f224 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -255,8 +255,7 @@ void ChartController::executeDispatch_Paste()
     {
         Graphic aGraphic;
         // paste location: center of window
-        Point aPos;
-        aPos = pChartWindow->PixelToLogic( tools::Rectangle( aPos, 
pChartWindow->GetSizePixel()).Center());
+        Point aPos = pChartWindow->PixelToLogic( tools::Rectangle( aPos, 
pChartWindow->GetSizePixel()).Center());
 
         // handle different formats
         TransferableDataHelper aDataHelper( 
TransferableDataHelper::CreateFromSystemClipboard( pChartWindow ));
diff --git a/chart2/source/view/charttypes/BubbleChart.cxx 
b/chart2/source/view/charttypes/BubbleChart.cxx
index ddc9e039b3ae..2a029f7b89a8 100644
--- a/chart2/source/view/charttypes/BubbleChart.cxx
+++ b/chart2/source/view/charttypes/BubbleChart.cxx
@@ -269,8 +269,7 @@ void BubbleChart::createShapes()
 
                         //create data point
                         drawing::Direction3D aSymbolSize = 
transformToScreenBubbleSize( fBubbleSize );
-                        uno::Reference<drawing::XShape> xShape;
-                        xShape = m_pShapeFactory->createCircle2D( 
xPointGroupShape_Shapes
+                        uno::Reference<drawing::XShape> xShape = 
m_pShapeFactory->createCircle2D( xPointGroupShape_Shapes
                                 , aScenePosition, aSymbolSize );
 
                         setMappedProperties( xShape
diff --git a/chart2/source/view/diagram/VDiagram.cxx 
b/chart2/source/view/diagram/VDiagram.cxx
index feb839be8de2..6069296d7271 100644
--- a/chart2/source/view/diagram/VDiagram.cxx
+++ b/chart2/source/view/diagram/VDiagram.cxx
@@ -466,8 +466,7 @@ void VDiagram::createShapes_3d()
     //create shape
     m_xOuterGroupShape.set( m_pShapeFactory->createGroup3D( m_xTarget, 
"PlotAreaExcludingAxes" ), uno::UNO_QUERY);
 
-    uno::Reference< drawing::XShapes > xOuterGroup_Shapes =
-            uno::Reference<drawing::XShapes>( m_xOuterGroupShape, 
uno::UNO_QUERY );
+    uno::Reference< drawing::XShapes > xOuterGroup_Shapes( m_xOuterGroupShape, 
uno::UNO_QUERY );
 
     //create additional group to manipulate the aspect ratio of the whole 
diagram:
     xOuterGroup_Shapes = m_pShapeFactory->createGroup3D( xOuterGroup_Shapes );
diff --git a/chart2/source/view/main/VDataSeries.cxx 
b/chart2/source/view/main/VDataSeries.cxx
index 92abdbaee240..6d9b7d11196c 100644
--- a/chart2/source/view/main/VDataSeries.cxx
+++ b/chart2/source/view/main/VDataSeries.cxx
@@ -374,16 +374,12 @@ OUString VDataSeries::getLabelsCID() const
 }
 OUString VDataSeries::getDataCurveCID( sal_Int32 nCurveIndex, bool 
bAverageLine ) const
 {
-    OUString aRet;
-    aRet = ObjectIdentifier::createDataCurveCID( m_aSeriesParticle, 
nCurveIndex, bAverageLine );
-    return aRet;
+    return ObjectIdentifier::createDataCurveCID( m_aSeriesParticle, 
nCurveIndex, bAverageLine );
 }
 
 OUString VDataSeries::getDataCurveEquationCID( sal_Int32 nCurveIndex ) const
 {
-    OUString aRet;
-    aRet = ObjectIdentifier::createDataCurveEquationCID( m_aSeriesParticle, 
nCurveIndex );
-    return aRet;
+    return ObjectIdentifier::createDataCurveEquationCID( m_aSeriesParticle, 
nCurveIndex );
 }
 void VDataSeries::setPageReferenceSize( const awt::Size & rPageRefSize )
 {
diff --git a/chart2/source/view/main/VLegend.cxx 
b/chart2/source/view/main/VLegend.cxx
index dd534f3b6023..bbb0707f7a0f 100644
--- a/chart2/source/view/main/VLegend.cxx
+++ b/chart2/source/view/main/VLegend.cxx
@@ -967,8 +967,7 @@ void VLegend::createShapes(
                                                 eLegendPosition != 
LegendPosition_PAGE_END &&
                                                 eExpansion != 
css::chart::ChartLegendExpansion_WIDE);
 
-                std::vector<std::shared_ptr<VButton>> aButtons;
-                aButtons = lcl_createButtons(xLegendContainer, 
m_xShapeFactory, mrModel, bPlaceButtonsVertically, nUsedButtonHeight);
+                std::vector<std::shared_ptr<VButton>> aButtons = 
lcl_createButtons(xLegendContainer, m_xShapeFactory, mrModel, 
bPlaceButtonsVertically, nUsedButtonHeight);
 
                 // A custom size includes the size we used for buttons 
already, so we need to
                 // subtract that from the size that is available for the legend
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to