starmath/source/dialog.cxx                                    |    3 -
 stoc/source/implementationregistration/implreg.cxx            |    4 --
 store/source/storbase.hxx                                     |    6 +--
 store/source/storbios.cxx                                     |    6 +--
 store/source/stordata.hxx                                     |   18 +++-------
 store/source/stortree.hxx                                     |    6 +--
 svgio/source/svgreader/svgsvgnode.cxx                         |    3 -
 svl/source/fsstor/fsfactory.cxx                               |    4 --
 svl/source/fsstor/fsstorage.cxx                               |    3 -
 svl/source/fsstor/ostreamcontainer.cxx                        |    4 --
 svl/source/items/itempool.cxx                                 |    3 -
 svl/source/misc/documentlockfile.cxx                          |    4 --
 svtools/source/contnr/contentenumeration.cxx                  |    3 -
 svtools/source/contnr/imivctl1.cxx                            |    3 -
 svtools/source/control/inettbc.cxx                            |   16 ++------
 svtools/source/control/ruler.cxx                              |    3 -
 svtools/source/control/tabbar.cxx                             |    3 -
 svtools/source/filter/SvFilterOptionsDialog.cxx               |    3 -
 svtools/source/misc/embedtransfer.cxx                         |    3 -
 svtools/source/uno/unoiface.cxx                               |    3 -
 svx/source/accessibility/AccessibleShape.cxx                  |    3 -
 svx/source/accessibility/svxpixelctlaccessiblecontext.cxx     |    3 -
 svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx |    4 --
 svx/source/dialog/hdft.cxx                                    |    3 -
 svx/source/fmcomp/dbaexchange.cxx                             |    3 -
 svx/source/fmcomp/fmgridif.cxx                                |   15 ++------
 svx/source/form/fmundo.cxx                                    |    4 --
 svx/source/sidebar/nbdtmg.cxx                                 |    6 +--
 svx/source/svdraw/polypolygoneditor.cxx                       |    3 -
 svx/source/tbxctrls/tbxcolorupdate.cxx                        |    3 -
 svx/source/xml/xmlxtexp.cxx                                   |    3 -
 svx/source/xml/xmlxtimp.cxx                                   |    3 -
 sw/qa/extras/htmlimport/htmlimport.cxx                        |    3 -
 sw/qa/extras/inc/bordertest.hxx                               |    3 -
 sw/qa/extras/odfimport/odfimport.cxx                          |    3 -
 sw/qa/extras/ooxmlexport/ooxmlexport12.cxx                    |    3 -
 sw/qa/extras/rtfexport/rtfexport5.cxx                         |    4 +-
 sw/qa/extras/uiwriter/uiwriter.cxx                            |    3 -
 sw/qa/extras/ww8export/ww8export3.cxx                         |    3 -
 sw/source/core/access/acchyperlink.cxx                        |    3 -
 sw/source/core/access/accmap.cxx                              |    4 --
 sw/source/core/doc/dbgoutsw.cxx                               |    5 --
 sw/source/core/doc/docnum.cxx                                 |    4 --
 sw/source/core/fields/docufld.cxx                             |    3 -
 sw/source/core/fields/expfld.cxx                              |    3 -
 sw/source/core/frmedt/feshview.cxx                            |    3 -
 sw/source/core/frmedt/tblsel.cxx                              |    6 +--
 sw/source/core/layout/anchoredobject.cxx                      |    8 +---
 sw/source/core/layout/fly.cxx                                 |    3 -
 sw/source/core/layout/objectformatterlayfrm.cxx               |    4 --
 sw/source/core/text/txthyph.cxx                               |    3 -
 sw/source/core/txtnode/ndtxt.cxx                              |    8 +---
 sw/source/core/txtnode/txtedt.cxx                             |    3 -
 sw/source/core/undo/SwRewriter.cxx                            |    4 --
 sw/source/core/undo/unredln.cxx                               |    3 -
 sw/source/core/unocore/unoframe.cxx                           |    6 +--
 sw/source/core/unocore/unotbl.cxx                             |    6 +--
 sw/source/filter/ww8/docxattributeoutput.cxx                  |    4 --
 sw/source/filter/ww8/docxsdrexport.cxx                        |    3 -
 sw/source/filter/ww8/wrtw8nds.cxx                             |    3 -
 sw/source/filter/ww8/ww8atr.cxx                               |    3 -
 sw/source/filter/ww8/ww8par.cxx                               |    6 +--
 sw/source/filter/ww8/ww8par3.cxx                              |    4 --
 sw/source/filter/ww8/ww8par5.cxx                              |    3 -
 sw/source/filter/xml/xmltext.cxx                              |    4 --
 sw/source/ui/fldui/fldvar.cxx                                 |    4 --
 sw/source/ui/frmdlg/frmpage.cxx                               |    6 +--
 sw/source/uibase/docvw/edtwin.cxx                             |    3 -
 sw/source/uibase/shells/langhelper.cxx                        |    3 -
 sw/source/uibase/uiview/view2.cxx                             |    3 -
 sw/source/uibase/uiview/viewport.cxx                          |    3 -
 sw/source/uibase/uno/unotxdoc.cxx                             |    3 -
 sw/source/uibase/utlui/condedit.cxx                           |    3 -
 sw/source/uibase/wrtsh/wrtsh1.cxx                             |    3 -
 74 files changed, 99 insertions(+), 217 deletions(-)

New commits:
commit 1123a47c9771e0f4a680316c034e9878919a85d5
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Sat Apr 13 21:28:29 2019 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sun Apr 14 08:29:22 2019 +0200

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

diff --git a/sw/qa/extras/htmlimport/htmlimport.cxx 
b/sw/qa/extras/htmlimport/htmlimport.cxx
index 52a6a7145bc4..db046ad6c556 100644
--- a/sw/qa/extras/htmlimport/htmlimport.cxx
+++ b/sw/qa/extras/htmlimport/htmlimport.cxx
@@ -84,8 +84,7 @@ DECLARE_HTMLIMPORT_TEST(testInlinedImage, 
"inlined_image.html")
     uno::Reference<container::XNamed> const xNamed(xShape, 
uno::UNO_QUERY_THROW);
     CPPUNIT_ASSERT_EQUAL(OUString("Image1"), xNamed->getName());
 
-    uno::Reference<graphic::XGraphic> xGraphic;
-    xGraphic = getProperty< uno::Reference<graphic::XGraphic> >(xShape, 
"Graphic");
+    uno::Reference<graphic::XGraphic> xGraphic = getProperty< 
uno::Reference<graphic::XGraphic> >(xShape, "Graphic");
     CPPUNIT_ASSERT(xGraphic.is());
     CPPUNIT_ASSERT(xGraphic->getType() != graphic::GraphicType::EMPTY);
 
diff --git a/sw/qa/extras/inc/bordertest.hxx b/sw/qa/extras/inc/bordertest.hxx
index 3e95af91f441..160ddbd5db67 100644
--- a/sw/qa/extras/inc/bordertest.hxx
+++ b/sw/qa/extras/inc/bordertest.hxx
@@ -165,8 +165,7 @@ public:
                 if(currentTable == sal_Int32(7))
                     tempMap = &map7;
 
-                BorderLineMap::iterator it;
-                it = tempMap->begin();
+                BorderLineMap::iterator it = tempMap->begin();
 
                 for (sal_Int32 i = 0; i < nLength; ++i)
                 {
diff --git a/sw/qa/extras/odfimport/odfimport.cxx 
b/sw/qa/extras/odfimport/odfimport.cxx
index 3065d64c4935..b9e4f604a960 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -165,8 +165,7 @@ DECLARE_ODFIMPORT_TEST(testOdtBorders, "borders_ooo33.odt")
                 uno::Sequence<OUString> const cells = 
xTextTable->getCellNames();
                 sal_Int32 nLength = cells.getLength();
 
-                AllBordersMap::iterator it;
-                it = map.begin();
+                AllBordersMap::iterator it = map.begin();
 
                 for (sal_Int32 i = 0; i < nLength; ++i)
                 {
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
index 797c2d1e8884..3008ab8186a1 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
@@ -727,8 +727,7 @@ DECLARE_OOXMLEXPORT_TEST(testObjectCrossReference, 
"object_cross_reference.odt")
 DECLARE_OOXMLEXPORT_TEST(testTdf79435_legacyInputFields, 
"tdf79435_legacyInputFields.doc")
 {
     //using .doc input file to verify cross-format compatibility.
-    uno::Reference<text::XFormField> xFormField;
-    xFormField
+    uno::Reference<text::XFormField> xFormField
         = 
getProperty<uno::Reference<text::XFormField>>(getRun(getParagraph(5), 3), 
"Bookmark");
     uno::Reference<container::XNameContainer> 
xParameters(xFormField->getParameters());
 
diff --git a/sw/qa/extras/rtfexport/rtfexport5.cxx 
b/sw/qa/extras/rtfexport/rtfexport5.cxx
index b2b898738d1d..8e73fa5e2747 100644
--- a/sw/qa/extras/rtfexport/rtfexport5.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport5.cxx
@@ -989,8 +989,8 @@ DECLARE_RTFEXPORT_TEST(testClassificatonPasteLevels, 
"classification-confidentia
 DECLARE_RTFEXPORT_TEST(testTdf95707, "tdf95707.rtf")
 {
     // Graphic was replaced with a "Read-Error" placeholder.
-    uno::Reference<graphic::XGraphic> xGraphic;
-    xGraphic = getProperty<uno::Reference<graphic::XGraphic>>(getShape(1), 
"Graphic");
+    uno::Reference<graphic::XGraphic> xGraphic
+        = getProperty<uno::Reference<graphic::XGraphic>>(getShape(1), 
"Graphic");
     CPPUNIT_ASSERT(xGraphic.is());
     CPPUNIT_ASSERT(xGraphic->getType() != graphic::GraphicType::EMPTY);
 }
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index 9a50ff1d5819..74fd2b147d76 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -6559,8 +6559,7 @@ void SwUiWriterTest::testHtmlCopyImages()
     SwDoc* pDoc = createDoc("image.odt");
 
     // Trigger the copy part of HTML copy&paste.
-    WriterRef xWrt;
-    xWrt = new SwHTMLWriter( /*rBaseURL=*/OUString() );
+    WriterRef xWrt = new SwHTMLWriter( /*rBaseURL=*/OUString() );
     CPPUNIT_ASSERT(xWrt.is());
 
     xWrt->m_bWriteClipboardDoc = true;
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx 
b/sw/qa/extras/ww8export/ww8export3.cxx
index 5afb7b187d80..b016bb5f3e04 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -88,8 +88,7 @@ DECLARE_WW8EXPORT_TEST(testFdo53985, "fdo53985.doc")
 DECLARE_WW8EXPORT_TEST(testTdf79435_legacyInputFields, 
"tdf79435_legacyInputFields.docx")
 {
     //using .docx input file to verify cross-format compatibility.
-    uno::Reference<text::XFormField> xFormField;
-    xFormField = getProperty< uno::Reference<text::XFormField> 
>(getRun(getParagraph(5), 3), "Bookmark");
+    uno::Reference<text::XFormField> xFormField = getProperty< 
uno::Reference<text::XFormField> >(getRun(getParagraph(5), 3), "Bookmark");
     uno::Reference<container::XNameContainer> 
xParameters(xFormField->getParameters());
 
     OUString sTmp;
diff --git a/sw/source/core/access/acchyperlink.cxx 
b/sw/source/core/access/acchyperlink.cxx
index da8200e39844..fc3859ff02d7 100644
--- a/sw/source/core/access/acchyperlink.cxx
+++ b/sw/source/core/access/acchyperlink.cxx
@@ -200,8 +200,7 @@ sal_Bool SAL_CALL SwAccessibleHyperlink::isValid(  )
                     uno::UNO_QUERY );
                 if( !xDesktop.is() )
                     return false;
-                uno::Reference< lang::XComponent > xComp;
-                xComp = xDesktop->getCurrentComponent();
+                uno::Reference< lang::XComponent > xComp = 
xDesktop->getCurrentComponent();
                 if( !xComp.is() )
                     return false;
                 uno::Reference< css::document::XLinkTargetSupplier >  
xLTS(xComp, uno::UNO_QUERY);
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 4248784bb983..24769f8bc837 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -3026,9 +3026,7 @@ Point SwAccessibleMap::LogicToPixel( const Point& rPoint 
) const
     MapMode aSrc( MapUnit::Map100thMM );
     MapMode aDest( MapUnit::MapTwip );
 
-    Point aPoint = rPoint;
-
-    aPoint = OutputDevice::LogicToLogic( aPoint, aSrc, aDest );
+    Point aPoint = OutputDevice::LogicToLogic( rPoint, aSrc, aDest );
     vcl::Window *pWin = GetShell()->GetWin();
     if( pWin )
     {
diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx
index d69e1cb0308d..7f5339a7206d 100644
--- a/sw/source/core/doc/dbgoutsw.cxx
+++ b/sw/source/core/doc/dbgoutsw.cxx
@@ -718,10 +718,7 @@ const char * dbg_out( SwOutlineNodes const & rNodes)
 
 static OUString lcl_dbg_out(const SvxNumberFormat & rFormat)
 {
-    OUString aResult;
-
-    aResult = lcl_dbg_out_NumType(rFormat.GetNumberingType());
-
+    OUString aResult = lcl_dbg_out_NumType(rFormat.GetNumberingType());
     return aResult;
 }
 
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index f248472ecce2..ad013e8c5744 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -2422,9 +2422,7 @@ sal_uInt16 SwDoc::FindNumRule( const OUString& rName ) 
const
 
 SwNumRule* SwDoc::FindNumRulePtr( const OUString& rName ) const
 {
-    SwNumRule * pResult = nullptr;
-
-    pResult = maNumRuleMap[rName];
+    SwNumRule * pResult = maNumRuleMap[rName];
 
     if ( !pResult )
     {
diff --git a/sw/source/core/fields/docufld.cxx 
b/sw/source/core/fields/docufld.cxx
index ec14fd1be535..04b4f1c9657f 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -911,8 +911,7 @@ OUString SwDocInfoFieldType::Expand( sal_uInt16 nSub, 
sal_uInt32 nFormat,
                 aAny = xSet->getPropertyValue( rName );
 
                 uno::Reference < script::XTypeConverter > xConverter( 
script::Converter::create(comphelper::getProcessComponentContext()) );
-                uno::Any aNew;
-                aNew = xConverter->convertToSimpleType( aAny, 
uno::TypeClass_STRING );
+                uno::Any aNew = xConverter->convertToSimpleType( aAny, 
uno::TypeClass_STRING );
                 aNew >>= sVal;
             }
             catch (uno::Exception&) {}
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index 7bcfd443c027..62a31891396e 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -1190,8 +1190,7 @@ bool SwSetExpField::QueryValue( uno::Any& rAny, 
sal_uInt16 nWhichId ) const
         break;
     case FIELD_PROP_SUBTYPE:
         {
-            sal_Int16 nRet = 0;
-            nRet = lcl_SubTypeToAPI(GetSubType() & 0xff);
+            sal_Int16 nRet = lcl_SubTypeToAPI(GetSubType() & 0xff);
             rAny <<= nRet;
         }
         break;
diff --git a/sw/source/core/frmedt/feshview.cxx 
b/sw/source/core/frmedt/feshview.cxx
index 2b35ad3ffe7e..84d5bbb8bc1f 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -946,8 +946,7 @@ void SwFEShell::SetLineEnds(SfxItemSet& rAttr, SdrObject 
const & rObj, sal_uInt1
     ::basegfx::B2DPolyPolygon aCircle( getPolygon( RID_SVXSTR_CIRCLE, rModel ) 
);
     if( !aCircle.count() )
     {
-        ::basegfx::B2DPolygon aNewCircle;
-        aNewCircle = 
::basegfx::utils::createPolygonFromEllipse(::basegfx::B2DPoint(0.0, 0.0), 
250.0, 250.0);
+        ::basegfx::B2DPolygon aNewCircle = 
::basegfx::utils::createPolygonFromEllipse(::basegfx::B2DPoint(0.0, 0.0), 
250.0, 250.0);
         aNewCircle.setClosed(true);
         aCircle.append(aNewCircle);
     }
diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx
index fd1f59a150b0..11c516b9b0b6 100644
--- a/sw/source/core/frmedt/tblsel.cxx
+++ b/sw/source/core/frmedt/tblsel.cxx
@@ -1714,8 +1714,7 @@ static void lcl_FindStartEndCol( const SwLayoutFrame 
*&rpStart,
     // If necessary we should search backwards again
     while ( rpStart->GetFormat()->GetProtect().IsContentProtected() )
     {
-        const SwLayoutFrame *pTmpLeaf = rpStart;
-        pTmpLeaf = pTmpLeaf->GetNextLayoutLeaf();
+        const SwLayoutFrame *pTmpLeaf = rpStart->GetNextLayoutLeaf();
         while ( pTmpLeaf && aRectFnSet.GetLeft(pTmpLeaf->getFrameArea()) > nEX 
) // first skip line
             pTmpLeaf = pTmpLeaf->GetNextLayoutLeaf();
         while ( pTmpLeaf && aRectFnSet.GetLeft(pTmpLeaf->getFrameArea()) < nSX 
&&
@@ -1736,8 +1735,7 @@ static void lcl_FindStartEndCol( const SwLayoutFrame 
*&rpStart,
     }
     while ( rpEnd->GetFormat()->GetProtect().IsContentProtected() )
     {
-        const SwLayoutFrame *pTmpLeaf = rpEnd;
-        pTmpLeaf = pTmpLeaf->GetPrevLayoutLeaf();
+        const SwLayoutFrame *pTmpLeaf = rpEnd->GetPrevLayoutLeaf();
         while ( pTmpLeaf && aRectFnSet.GetLeft(pTmpLeaf->getFrameArea()) < nEX 
) // skip the line for now
             pTmpLeaf = pTmpLeaf->GetPrevLayoutLeaf();
         while ( pTmpLeaf && aRectFnSet.GetLeft(pTmpLeaf->getFrameArea()) > nEX 
)
diff --git a/sw/source/core/layout/anchoredobject.cxx 
b/sw/source/core/layout/anchoredobject.cxx
index 57dd72bfb904..0914fad4d1c7 100644
--- a/sw/source/core/layout/anchoredobject.cxx
+++ b/sw/source/core/layout/anchoredobject.cxx
@@ -878,9 +878,7 @@ Point SwAnchoredObject::GetRelPosToPageFrame( const bool 
_bFollowTextFlow,
 */
 Point SwAnchoredObject::GetRelPosToChar() const
 {
-    Point aRelPos;
-
-    aRelPos = GetObjRect().Pos();
+    Point aRelPos = GetObjRect().Pos();
     aRelPos -= GetLastCharRect().Pos();
 
     return aRelPos;
@@ -894,9 +892,7 @@ Point SwAnchoredObject::GetRelPosToChar() const
 */
 Point SwAnchoredObject::GetRelPosToLine() const
 {
-    Point aRelPos;
-
-    aRelPos = GetObjRect().Pos();
+    Point aRelPos = GetObjRect().Pos();
     aRelPos.AdjustY( -(GetLastTopOfLine()) );
 
     return aRelPos;
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index ee82f15ff86b..d364ccf655b8 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -1725,8 +1725,7 @@ void SwFlyFrame::MakeContentPos( const SwBorderAttrs 
&rAttrs )
     if( IsMinHeight() )
         nMinHeight = aRectFnSet.IsVert() ? aRelSize.Width() : 
aRelSize.Height();
 
-    Point aNewContentPos;
-    aNewContentPos = getFramePrintArea().Pos();
+    Point aNewContentPos = getFramePrintArea().Pos();
     const SdrTextVertAdjust nAdjust = 
GetFormat()->GetTextVertAdjust().GetValue();
 
     if( nAdjust != SDRTEXTVERTADJUST_TOP )
diff --git a/sw/source/core/layout/objectformatterlayfrm.cxx 
b/sw/source/core/layout/objectformatterlayfrm.cxx
index fa017f7b765e..cc9f332167b4 100644
--- a/sw/source/core/layout/objectformatterlayfrm.cxx
+++ b/sw/source/core/layout/objectformatterlayfrm.cxx
@@ -82,9 +82,7 @@ bool SwObjectFormatterLayFrame::DoFormatObj( 
SwAnchoredObject& _rAnchoredObj,
 
 bool SwObjectFormatterLayFrame::DoFormatObjs()
 {
-    bool bSuccess( true );
-
-    bSuccess = FormatObjsAtFrame_();
+    bool bSuccess = FormatObjsAtFrame_();
 
     if ( bSuccess && GetAnchorFrame().IsPageFrame() )
     {
diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx
index eb6e4d40b8ef..d2edb6a9ffa6 100644
--- a/sw/source/core/text/txthyph.cxx
+++ b/sw/source/core/text/txthyph.cxx
@@ -271,8 +271,7 @@ bool SwTextPortion::CreateHyphen( SwTextFormatInfo &rInf, 
SwTextGuess const &rGu
     // first case: hyphenated word has alternative spelling
     if ( xHyphWord->isAlternativeSpelling() )
     {
-        SvxAlternativeSpelling aAltSpell;
-        aAltSpell = SvxGetAltSpelling( xHyphWord );
+        SvxAlternativeSpelling aAltSpell = SvxGetAltSpelling( xHyphWord );
         OSL_ENSURE( aAltSpell.bIsAltSpelling, "no alternative spelling" );
 
         OUString aAltText = aAltSpell.aReplacement;
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 05135a9868cf..63b8971f55a8 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1745,9 +1745,7 @@ SwTextNode::GetTextAttrAt(sal_Int32 const nIndex, 
sal_uInt16 const nWhich,
 
 const SwTextInputField* SwTextNode::GetOverlappingInputField( const 
SwTextAttr& rTextAttr ) const
 {
-    const SwTextInputField* pTextInputField = nullptr;
-
-    pTextInputField = dynamic_cast<const SwTextInputField*>(GetTextAttrAt( 
rTextAttr.GetStart(), RES_TXTATR_INPUTFIELD, PARENT ));
+    const SwTextInputField* pTextInputField = dynamic_cast<const 
SwTextInputField*>(GetTextAttrAt( rTextAttr.GetStart(), RES_TXTATR_INPUTFIELD, 
PARENT ));
 
     if ( pTextInputField == nullptr && rTextAttr.End() != nullptr )
     {
@@ -1776,9 +1774,7 @@ SwTextField* SwTextNode::GetFieldTextAttrAt(
     const sal_Int32 nIndex,
     const bool bIncludeInputFieldAtStart ) const
 {
-    SwTextField* pTextField = nullptr;
-
-    pTextField = dynamic_cast<SwTextField*>(GetTextAttrForCharAt( nIndex, 
RES_TXTATR_FIELD ));
+    SwTextField* pTextField = dynamic_cast<SwTextField*>(GetTextAttrForCharAt( 
nIndex, RES_TXTATR_FIELD ));
     if ( pTextField == nullptr )
     {
         pTextField = dynamic_cast<SwTextField*>(GetTextAttrForCharAt( nIndex, 
RES_TXTATR_ANNOTATION ));
diff --git a/sw/source/core/txtnode/txtedt.cxx 
b/sw/source/core/txtnode/txtedt.cxx
index 39ca6f1a85a1..54dbe392e349 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -1846,8 +1846,7 @@ void SwTextNode::TransliterateText(
                     aChanges.push_back( aChgData );
                 }
 
-                Boundary aFirstWordBndry;
-                aFirstWordBndry = g_pBreakIt->GetBreakIter()->nextWord(
+                Boundary aFirstWordBndry = 
g_pBreakIt->GetBreakIter()->nextWord(
                         GetText(), nCurrentEnd,
                         g_pBreakIt->GetLocale( GetLang( nCurrentEnd ) ),
                         nWordType);
diff --git a/sw/source/core/undo/SwRewriter.cxx 
b/sw/source/core/undo/SwRewriter.cxx
index 22105f0a2aa8..da3df123c41f 100644
--- a/sw/source/core/undo/SwRewriter.cxx
+++ b/sw/source/core/undo/SwRewriter.cxx
@@ -30,9 +30,7 @@ void SwRewriter::AddRule(SwUndoArg eWhat, const OUString & 
rWith)
 {
     SwRewriteRule aRule(eWhat, rWith);
 
-    vector<SwRewriteRule>::iterator aIt;
-
-    aIt = find_if(
+    vector<SwRewriteRule>::iterator aIt = find_if(
         mRules.begin(), mRules.end(),
         [&aRule](SwRewriteRule const & a) { return a.first == aRule.first; });
 
diff --git a/sw/source/core/undo/unredln.cxx b/sw/source/core/undo/unredln.cxx
index 7aa18cabc1f4..e5b48e5fa363 100644
--- a/sw/source/core/undo/unredln.cxx
+++ b/sw/source/core/undo/unredln.cxx
@@ -180,8 +180,7 @@ SwUndoRedlineDelete::SwUndoRedlineDelete( const SwPaM& 
rRange, SwUndoId nUsrId )
 SwRewriter SwUndoRedlineDelete::GetRewriter() const
 {
     SwRewriter aResult;
-    OUString aStr = m_sRedlineText;
-    aStr = DenoteSpecialCharacters(aStr);
+    OUString aStr = DenoteSpecialCharacters(m_sRedlineText);
     aStr = ShortenString(aStr, nUndoStringLength, SwResId(STR_LDOTS));
     SwRewriter aRewriter;
     aRewriter.AddRule(UndoArg1, aStr);
diff --git a/sw/source/core/unocore/unoframe.cxx 
b/sw/source/core/unocore/unoframe.cxx
index c3be78ddf981..dc6db2ab7438 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -1610,8 +1610,7 @@ void SwXFrame::setPropertyValue(const OUString& 
rPropertyName, const ::uno::Any&
             }
             else if (aValue.has<uno::Reference<graphic::XGraphic>>())
             {
-                uno::Reference<graphic::XGraphic> xGraphic;
-                xGraphic = aValue.get<uno::Reference<graphic::XGraphic>>();
+                uno::Reference<graphic::XGraphic> xGraphic = 
aValue.get<uno::Reference<graphic::XGraphic>>();
                 if (xGraphic.is())
                 {
                     aGraphic = Graphic(xGraphic);
@@ -1647,8 +1646,7 @@ void SwXFrame::setPropertyValue(const OUString& 
rPropertyName, const ::uno::Any&
             }
             else if (aValue.has<uno::Reference<graphic::XGraphic>>())
             {
-                uno::Reference<graphic::XGraphic> xGraphic;
-                xGraphic = aValue.get<uno::Reference<graphic::XGraphic>>();
+                uno::Reference<graphic::XGraphic> xGraphic = 
aValue.get<uno::Reference<graphic::XGraphic>>();
                 if (xGraphic.is())
                 {
                     aGraphic = Graphic(xGraphic);
diff --git a/sw/source/core/unocore/unotbl.cxx 
b/sw/source/core/unocore/unotbl.cxx
index d7abd42dea4a..26f6dab13353 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -999,8 +999,7 @@ void SwXCell::setPropertyValue(const OUString& 
rPropertyName, const uno::Any& aV
     else if(rPropertyName == "TableRedlineParams")
     {
         // Get the table row properties
-        uno::Sequence<beans::PropertyValue> tableCellProperties;
-        tableCellProperties = aValue.get< uno::Sequence< beans::PropertyValue 
> >();
+        uno::Sequence<beans::PropertyValue> tableCellProperties = aValue.get< 
uno::Sequence< beans::PropertyValue > >();
         comphelper::SequenceAsHashMap aPropMap(tableCellProperties);
         OUString sRedlineType;
         if(!(aPropMap.getValue("RedlineType") >>= sRedlineType))
@@ -1297,8 +1296,7 @@ void SwXTextTableRow::setPropertyValue(const OUString& 
rPropertyName, const uno:
         if  ( rPropertyName == "TableRedlineParams" )
         {
             // Get the table row properties
-            uno::Sequence< beans::PropertyValue > tableRowProperties;
-            tableRowProperties = aValue.get< uno::Sequence< 
beans::PropertyValue > >();
+            uno::Sequence< beans::PropertyValue > tableRowProperties = 
aValue.get< uno::Sequence< beans::PropertyValue > >();
             comphelper::SequenceAsHashMap aPropMap( tableRowProperties );
             OUString sRedlineType;
             if( !(aPropMap.getValue("RedlineType") >>= sRedlineType) )
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 7e621fa52948..e7c2f3510da3 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -6941,9 +6941,7 @@ void DocxAttributeOutput::CharCaseMap( const 
SvxCaseMapItem& rCaseMap )
 void DocxAttributeOutput::CharColor( const SvxColorItem& rColor )
 {
     const Color aColor( rColor.GetValue() );
-    OString aColorString;
-
-    aColorString = msfilter::util::ConvertColor( aColor );
+    OString aColorString = msfilter::util::ConvertColor( aColor );
 
     const char* pExistingValue(nullptr);
     if (m_pColorAttrList.is() && m_pColorAttrList->getAsChar(FSNS(XML_w, 
XML_val), pExistingValue))
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx 
b/sw/source/filter/ww8/docxsdrexport.cxx
index d28c3c9b21a6..e8024024dd9a 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -1346,8 +1346,7 @@ void DocxSdrExport::writeDMLTextFrame(ww8::Frame const* 
pParentFrame, int nAncho
                 OUString sCheckForBrokenChains = rEntry.first;
 
                 //follow the chain and assign the same id, and incremental 
sequence numbers.
-                std::map<OUString, 
MSWordExportBase::LinkedTextboxInfo>::iterator followChainIter;
-                followChainIter
+                auto followChainIter
                     = 
m_pImpl->getExport().m_aLinkedTextboxesHelper.find(rEntry.second.sNextChain);
                 while (followChainIter != 
m_pImpl->getExport().m_aLinkedTextboxesHelper.end())
                 {
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx 
b/sw/source/filter/ww8/wrtw8nds.cxx
index 41d8dc3072d6..e89563655fd7 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -602,8 +602,7 @@ FlyProcessingState SwWW8AttrIter::OutFlys(sal_Int32 nSwPos)
                 //there are many discarded duplicates in documents - no 
duplicates allowed in the list, so try to find the real one.
                 //if this LinkDisplayName/ChainName already exists on a 
different shape...
                 //  the earlier processed duplicates are thrown out unless 
this one can be proved as bad. (last processed duplicate usually is stored)
-                
std::map<OUString,MSWordExportBase::LinkedTextboxInfo>::iterator linkFinder;
-                linkFinder = 
m_rExport.m_aLinkedTextboxesHelper.find(sLinkChainName);
+                auto linkFinder = 
m_rExport.m_aLinkedTextboxesHelper.find(sLinkChainName);
                 if( linkFinder != m_rExport.m_aLinkedTextboxesHelper.end() )
                 {
                     //If my NEXT/PREV targets have already been discovered, 
but don't match me, then assume I'm an abandoned remnant
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 889e6ce17d9d..2100a9b5b52f 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -3226,8 +3226,7 @@ void AttributeOutputBase::TextFlyContent( const 
SwFormatFlyCnt& rFlyContent )
 {
     if ( auto pTextNd = dynamic_cast< const SwContentNode *>( 
GetExport().m_pOutFormatNode )  )
     {
-        Point aLayPos;
-        aLayPos = pTextNd->FindLayoutRect( false, &aLayPos ).Pos();
+        Point aLayPos = pTextNd->FindLayoutRect( false, &aLayPos ).Pos();
 
         SwPosition aPos( *pTextNd );
         ww8::Frame aFrame( *rFlyContent.GetFrameFormat(), aPos );
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 0cc938391fab..060fcd09c6cb 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -5091,8 +5091,7 @@ ErrCode SwWW8ImplReader::CoreLoad(WW8Glossary const 
*pGloss)
             FTNNUM_DOC, FTNNUM_CHAPTER, FTNNUM_PAGE, FTNNUM_DOC
         };
 
-        SwFootnoteInfo aInfo;
-        aInfo = m_rDoc.GetFootnoteInfo(); // Copy-Ctor private
+        SwFootnoteInfo aInfo = m_rDoc.GetFootnoteInfo(); // Copy-Ctor private
 
         aInfo.ePos = FTNPOS_PAGE;
         aInfo.eNum = eNumA[m_xWDop->rncFootnote];
@@ -5104,8 +5103,7 @@ ErrCode SwWW8ImplReader::CoreLoad(WW8Glossary const 
*pGloss)
     }
     if (m_xSBase->AreThereEndnotes())
     {
-        SwEndNoteInfo aInfo;
-        aInfo = m_rDoc.GetEndNoteInfo(); // Same as for Footnote
+        SwEndNoteInfo aInfo = m_rDoc.GetEndNoteInfo(); // Same as for Footnote
         sal_uInt16 nfcEdnRef = m_xWDop->nfcEdnRef & 0xF;
         aInfo.aFormat.SetNumberingType( eNumTA[nfcEdnRef] );
         if( m_xWDop->nEdn )
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index b970f29ac677..9724fbffb0cd 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -575,9 +575,7 @@ bool WW8ListManager::ReadLVL(SwNumFormat& rNumFormat, 
std::unique_ptr<SfxItemSet
         if (aLVL.nLenGrpprlPapx != rSt.ReadBytes(&aGrpprlPapx, 
aLVL.nLenGrpprlPapx))
             return false;
         // "sprmPDxaLeft"  pap.dxaLeft;dxa;word;
-        SprmResult aSprm;
-
-        aSprm = GrpprlHasSprm(0x840F,aGrpprlPapx[0],aLVL.nLenGrpprlPapx);
+        SprmResult aSprm = 
GrpprlHasSprm(0x840F,aGrpprlPapx[0],aLVL.nLenGrpprlPapx);
         if (!aSprm.pSprm)
             aSprm = GrpprlHasSprm(0x845E,aGrpprlPapx[0],aLVL.nLenGrpprlPapx);
 
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 7858a11e183d..9b0ffaf3b602 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -273,8 +273,7 @@ long SwWW8ImplReader::Read_FactoidBook(WW8PLCFManResult*)
 /// at the same time, double backslashes are converted into single ones
 OUString SwWW8ImplReader::ConvertFFileName(const OUString& rOrg)
 {
-    OUString aName = rOrg;
-    aName = aName.replaceAll("\\\\", "\\");
+    OUString aName = rOrg.replaceAll("\\\\", "\\");
     aName = aName.replaceAll("%20", " ");
 
     // remove attached quotation marks
diff --git a/sw/source/filter/xml/xmltext.cxx b/sw/source/filter/xml/xmltext.cxx
index 3f2d2076beee..be51bf82ed68 100644
--- a/sw/source/filter/xml/xmltext.cxx
+++ b/sw/source/filter/xml/xmltext.cxx
@@ -51,9 +51,7 @@ SvXMLImportContextRef 
SwXMLBodyContentContext_Impl::CreateChildContext(
         sal_uInt16 nPrefix, const OUString& rLocalName,
         const Reference< xml::sax::XAttributeList > & xAttrList )
 {
-    SvXMLImportContext *pContext = nullptr;
-
-    pContext = GetSwImport().GetTextImport()->CreateTextChildContext(
+    SvXMLImportContext *pContext = 
GetSwImport().GetTextImport()->CreateTextChildContext(
             GetImport(), nPrefix, rLocalName, xAttrList,
                XMLTextType::Body );
     if( !pContext )
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index fbba8bf35e20..9d152e0d6bfa 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -394,9 +394,7 @@ void SwFieldVarPage::SubTypeHdl(const weld::TreeView* pBox)
             {
                 bValue = bNumFormat = true;
 
-                OUString sName;
-
-                sName = m_xSelectionLB->get_selected_text();
+                OUString sName = m_xSelectionLB->get_selected_text();
                 m_xNameED->set_text( sName );
 
                 // User- or SetField ?
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index d5512ffd698c..1f9e5d3aea8f 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -1416,11 +1416,9 @@ void SwFramePage::FillRelLB(const FrameMap* _pMap,
                     {
                         if (nLBRelations & rCharMap.nLBRelation)
                         {
-                            SvxSwFramePosString::StringId sStrId1 = 
rCharMap.eStrId;
-
                             // --> OD 2009-08-31 #mongolianlayout#
-                            sStrId1 =
-                                lcl_ChangeResIdToVerticalOrRTL( sStrId1,
+                            SvxSwFramePosString::StringId sStrId1 =
+                                lcl_ChangeResIdToVerticalOrRTL( 
rCharMap.eStrId,
                                                                 
m_bIsVerticalFrame,
                                                                 
m_bIsVerticalL2R,
                                                                 
m_bIsInRightToLeft);
diff --git a/sw/source/uibase/docvw/edtwin.cxx 
b/sw/source/uibase/docvw/edtwin.cxx
index 3bca4e2b739d..69a9b025f694 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -5948,8 +5948,7 @@ void QuickHelpData::FillStrArr( SwWrtShell const & rSh, 
const OUString& rWord )
         else
         {
             // First character is not lower case i.e. assume upper or title 
case
-            OUString sWordSentence = sWordLower;
-            sWordSentence = sWordSentence.replaceAt( 0, 1, OUString(rWord[0]) 
);
+            OUString sWordSentence = sWordLower.replaceAt( 0, 1, 
OUString(rWord[0]) );
             if ( rWord == sWordSentence )
                 aWordCase = CASE_SENTENCE;
             else
diff --git a/sw/source/uibase/shells/langhelper.cxx 
b/sw/source/uibase/shells/langhelper.cxx
index e302a01a845c..1245d83195a7 100644
--- a/sw/source/uibase/shells/langhelper.cxx
+++ b/sw/source/uibase/shells/langhelper.cxx
@@ -546,10 +546,9 @@ namespace SwLangHelper
     OUString GetTextForLanguageGuessing(EditEngine const * rEditEngine, const 
ESelection& rDocSelection)
     {
         // string for guessing language
-        OUString aText;
 
         // get the full text of the paragraph that the end of selection is in
-        aText = rEditEngine->GetText(rDocSelection.nEndPos);
+        OUString aText = rEditEngine->GetText(rDocSelection.nEndPos);
         if (!aText.isEmpty())
         {
             sal_Int32 nStt = 0;
diff --git a/sw/source/uibase/uiview/view2.cxx 
b/sw/source/uibase/uiview/view2.cxx
index eebc6eee42d1..5213a01de635 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -1096,8 +1096,7 @@ void SwView::Execute(SfxRequest &rReq)
                 SwDBManager* pDBManager = rSh.GetDBManager();
                 if (pDBManager)
                 {
-                    SwDBData aData;
-                    aData = rSh.GetDBData();
+                    SwDBData aData = rSh.GetDBData();
                     rSh.EnterStdMode(); // force change in text shell; 
necessary for mixing DB fields
                     AttrChangedNotify( &rSh );
 
diff --git a/sw/source/uibase/uiview/viewport.cxx 
b/sw/source/uibase/uiview/viewport.cxx
index 09697b2c96ed..94edaba41a3f 100644
--- a/sw/source/uibase/uiview/viewport.cxx
+++ b/sw/source/uibase/uiview/viewport.cxx
@@ -302,8 +302,7 @@ void SwView::SetVisArea( const Point &rPt, bool 
bUpdateScrollbar )
     // align is not possible (better idea?!?!)
     // (fix: Bild.de, 200%) It does not work completely without alignment
     // Let's see how far we get with half BrushSize.
-    Point aPt( rPt );
-    aPt = GetEditWin().LogicToPixel( aPt );
+    Point aPt = GetEditWin().LogicToPixel( rPt );
 #if HAVE_FEATURE_DESKTOP
     const long nTmp = GetWrtShell().IsFrameView() ? 4 : 8;
     aPt.AdjustX( -(aPt.X() % nTmp) );
diff --git a/sw/source/uibase/uno/unotxdoc.cxx 
b/sw/source/uibase/uno/unotxdoc.cxx
index 0cd8e2f0d52b..4a1c0b9da073 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -947,8 +947,7 @@ Reference< XIndexAccess >
     auto pResultCursor(FindAny(xDesc, xCursor, true, nResult, xTmp));
     if(!pResultCursor)
         throw RuntimeException("No result cursor");
-    Reference< XIndexAccess >  xRet;
-    xRet = SwXTextRanges::Create( nResult ? &(*pResultCursor) : nullptr );
+    Reference< XIndexAccess >  xRet = SwXTextRanges::Create( nResult ? 
&(*pResultCursor) : nullptr );
     return xRet;
 }
 
diff --git a/sw/source/uibase/utlui/condedit.cxx 
b/sw/source/uibase/utlui/condedit.cxx
index 84de7d82c99a..231a43cb74f8 100644
--- a/sw/source/uibase/utlui/condedit.cxx
+++ b/sw/source/uibase/utlui/condedit.cxx
@@ -64,8 +64,7 @@ sal_Int8 ConditionEditDropTarget::ExecuteDrop( const 
ExecuteDropEvent& rEvt )
             bool bBrackets = m_rEdit.GetBrackets();
             if (bBrackets)
                 sDBName += "[";
-            OUString sTmp;
-            sTmp = aColDesc.getDataSource();
+            OUString sTmp = aColDesc.getDataSource();
             sDBName += sTmp;
             sDBName += ".";
 
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx 
b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 1e721a638f9a..73c553c11709 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -595,9 +595,8 @@ void SwWrtShell::LaunchOLEObj( long nVerb )
     {
         svt::EmbeddedObjectRef& xRef = GetOLEObject();
         OSL_ENSURE( xRef.is(), "OLE not found" );
-        SfxInPlaceClient* pCli=nullptr;
 
-        pCli = GetView().FindIPClient( xRef.GetObject(), 
&GetView().GetEditWin() );
+        SfxInPlaceClient* pCli = GetView().FindIPClient( xRef.GetObject(), 
&GetView().GetEditWin() );
         if ( !pCli )
             pCli = new SwOleClient( &GetView(), &GetView().GetEditWin(), xRef 
);
 
commit 42204a80aa7d4ce778596fa6ccab7d144c04e9b1
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Sat Apr 13 21:28:19 2019 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sun Apr 14 08:29:15 2019 +0200

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

diff --git a/svtools/source/contnr/contentenumeration.cxx 
b/svtools/source/contnr/contentenumeration.cxx
index 106181eef50b..c3fff23b4a2f 100644
--- a/svtools/source/contnr/contentenumeration.cxx
+++ b/svtools/source/contnr/contentenumeration.cxx
@@ -174,8 +174,7 @@ namespace svt
                     }
                 }
 
-                Reference< XDynamicResultSet > xDynResultSet;
-                xDynResultSet = aFolder.aContent.createDynamicCursor( aProps, 
INCLUDE_FOLDERS_AND_DOCUMENTS );
+                Reference< XDynamicResultSet > xDynResultSet = 
aFolder.aContent.createDynamicCursor( aProps, INCLUDE_FOLDERS_AND_DOCUMENTS );
 
                 if ( xDynResultSet.is() )
                     xResultSet = xDynResultSet->getStaticResultSet();
diff --git a/svtools/source/contnr/imivctl1.cxx 
b/svtools/source/contnr/imivctl1.cxx
index ad9a4dd035f1..a27e6ad64d6f 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -1678,8 +1678,7 @@ tools::Rectangle SvxIconChoiceCtrl_Impl::CalcTextRect( 
SvxIconChoiceCtrlEntry* p
     if( pEntryPos )
         aBound.SetPos( *pEntryPos );
 
-    tools::Rectangle aTextRect( aMaxTextRect );
-    aTextRect = pView->GetTextRect( aTextRect, aEntryText, nCurTextDrawFlags );
+    tools::Rectangle aTextRect = pView->GetTextRect( aMaxTextRect, aEntryText, 
nCurTextDrawFlags );
 
     Size aTextSize( aTextRect.GetSize() );
 
diff --git a/svtools/source/control/inettbc.cxx 
b/svtools/source/control/inettbc.cxx
index 9058d44f0826..79442ac9d18e 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -408,8 +408,7 @@ void SvtMatchContext_Impl::ReadFolder( const OUString& rURL,
             pInfo[ 1 ].ColumnIndex = 1;
             pInfo[ 1 ].Ascending   = true;
 
-            uno::Reference< XDynamicResultSet > xDynamicResultSet;
-            xDynamicResultSet =
+            uno::Reference< XDynamicResultSet > xDynamicResultSet =
                 xSRSFac->createSortedDynamicResultSet( xDynResultSet, 
aSortInfo, xCompare );
 
             if ( xDynamicResultSet.is() )
@@ -699,9 +698,7 @@ void MatchContext_Impl::ReadFolder( const OUString& rURL,
 
         try
         {
-            uno::Reference< XDynamicResultSet > xDynResultSet;
-
-            xDynResultSet = aCnt.createDynamicCursor( aProps, 
INCLUDE_FOLDERS_AND_DOCUMENTS );
+            uno::Reference< XDynamicResultSet > xDynResultSet = 
aCnt.createDynamicCursor( aProps, INCLUDE_FOLDERS_AND_DOCUMENTS );
 
             uno::Reference < XAnyCompareFactory > xCompare;
             uno::Reference < XSortedDynamicResultSetFactory > xSRSFac =
@@ -714,8 +711,7 @@ void MatchContext_Impl::ReadFolder( const OUString& rURL,
             pInfo[ 1 ].ColumnIndex = 1;
             pInfo[ 1 ].Ascending   = true;
 
-            uno::Reference< XDynamicResultSet > xDynamicResultSet;
-            xDynamicResultSet =
+            uno::Reference< XDynamicResultSet > xDynamicResultSet =
                 xSRSFac->createSortedDynamicResultSet( xDynResultSet, 
aSortInfo, xCompare );
 
             if ( xDynamicResultSet.is() )
@@ -1530,8 +1526,7 @@ void SvtURLBox::UpdatePicklistForSmartProtocol_Impl()
                     bool bFound = aURL.endsWith("/");
                     if ( !bFound )
                     {
-                        OUString aUpperURL( aURL );
-                        aUpperURL = aUpperURL.toAsciiUpperCase();
+                        OUString aUpperURL = aURL.toAsciiUpperCase();
 
                         bFound = ::std::any_of(pImpl->m_aFilters.begin(),
                                                pImpl->m_aFilters.end(),
@@ -2104,8 +2099,7 @@ void URLBox::UpdatePicklistForSmartProtocol_Impl()
                     bool bFound = aURL.endsWith("/");
                     if ( !bFound )
                     {
-                        OUString aUpperURL( aURL );
-                        aUpperURL = aUpperURL.toAsciiUpperCase();
+                        OUString aUpperURL = aURL.toAsciiUpperCase();
 
                         bFound = ::std::any_of(pImpl->m_aFilters.begin(),
                                                pImpl->m_aFilters.end(),
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index 0792cd61bf7a..8e39fe9beb8b 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -1852,8 +1852,7 @@ void Ruler::ImplDrag( const Point& rPos )
         {
             // reset the data
             mbDragCanceled = true;
-            ImplRulerData aTempData;
-            aTempData = *mpDragData;
+            ImplRulerData aTempData = *mpDragData;
             *mpDragData = *mpSaveData;
             mbCalc = true;
             mbFormat = true;
diff --git a/svtools/source/control/tabbar.cxx 
b/svtools/source/control/tabbar.cxx
index f183954abf3c..fdc313415dd6 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -609,8 +609,7 @@ void TabBar::ImplInitSettings( bool bFont, bool bBackground 
)
 
     if (bFont)
     {
-        vcl::Font aToolFont;
-        aToolFont = rStyleSettings.GetToolFont();
+        vcl::Font aToolFont = rStyleSettings.GetToolFont();
         aToolFont.SetWeight( WEIGHT_BOLD );
         ApplyControlFont(*this, aToolFont);
 
diff --git a/svtools/source/filter/SvFilterOptionsDialog.cxx 
b/svtools/source/filter/SvFilterOptionsDialog.cxx
index 2145603892cb..fb630a824b12 100644
--- a/svtools/source/filter/SvFilterOptionsDialog.cxx
+++ b/svtools/source/filter/SvFilterOptionsDialog.cxx
@@ -210,8 +210,7 @@ sal_Int16 SvFilterOptionsDialog::execute()
         {
             OUString aStr;
             maMediaDescriptor[ j ].Value >>= aStr;
-            aInternalFilterName = aStr;
-            aInternalFilterName = aInternalFilterName.replaceFirst( "draw_", 
"" );
+            aInternalFilterName = aStr.replaceFirst( "draw_", "" );
             aInternalFilterName = aInternalFilterName.replaceFirst( 
"impress_", "" );
             aInternalFilterName = aInternalFilterName.replaceFirst( "calc_", 
"" );
             aInternalFilterName = aInternalFilterName.replaceFirst( "writer_", 
"" );
diff --git a/svtools/source/misc/embedtransfer.cxx 
b/svtools/source/misc/embedtransfer.cxx
index 02cd9fe547ff..cf242c0efbe5 100644
--- a/svtools/source/misc/embedtransfer.cxx
+++ b/svtools/source/misc/embedtransfer.cxx
@@ -230,8 +230,7 @@ void 
SvEmbedTransferHelper::FillTransferableObjectDescriptor( TransferableObject
     {
         try
         {
-            awt::Size aSz;
-            aSz = xObj->getVisualAreaSize( rDesc.mnViewAspect );
+            awt::Size aSz = xObj->getVisualAreaSize( rDesc.mnViewAspect );
             aSize = Size( aSz.Width, aSz.Height );
         }
         catch( embed::NoVisualAreaSizeException& )
diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx
index 46a53d2c0fc1..00a8df04ed9d 100644
--- a/svtools/source/uno/unoiface.cxx
+++ b/svtools/source/uno/unoiface.cxx
@@ -1442,8 +1442,7 @@ void SVTXRoadmap::propertyChange( const 
css::beans::PropertyChangeEvent& evt )
     if ( !pField )
         return;
 
-    css::uno::Reference< css::uno::XInterface > xRoadmapItem;
-    xRoadmapItem = evt.Source;
+    css::uno::Reference< css::uno::XInterface > xRoadmapItem = evt.Source;
     sal_Int32 nID = 0;
     css::uno::Reference< css::beans::XPropertySet > xPropertySet( 
xRoadmapItem, css::uno::UNO_QUERY );
     css::uno::Any aValue = xPropertySet->getPropertyValue("ID");
diff --git a/svx/source/accessibility/AccessibleShape.cxx 
b/svx/source/accessibility/AccessibleShape.cxx
index 387be5f27d2a..5789e2315076 100644
--- a/svx/source/accessibility/AccessibleShape.cxx
+++ b/svx/source/accessibility/AccessibleShape.cxx
@@ -1231,10 +1231,9 @@ void AccessibleShape::UpdateNameAndDescription()
     try
     {
         Reference<beans::XPropertySet> xSet (mxShape, uno::UNO_QUERY_THROW);
-        OUString sString;
 
         // Get the accessible name.
-        sString = GetOptionalProperty(xSet, "Title");
+        OUString sString = GetOptionalProperty(xSet, "Title");
         if (!sString.isEmpty())
         {
             SetAccessibleName(sString, AccessibleContextBase::FromShape);
diff --git a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx 
b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
index eb4d1e95fffe..2b180cf9a8ae 100644
--- a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
+++ b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
@@ -292,8 +292,7 @@ uno::Reference<XAccessible> 
SvxPixelCtlAccessible::CreateChild (long nIndex,Poin
 {
     bool bPixelColorOrBG = mpPixelCtl->GetBitmapPixel(sal_uInt16(nIndex)) != 0;
     Size size(mpPixelCtl->GetWidth() / SvxPixelCtl::GetLineCount(), 
mpPixelCtl->GetHeight() / SvxPixelCtl::GetLineCount());
-    uno::Reference<XAccessible> xChild;
-    xChild = new SvxPixelCtlAccessibleChild(*mpPixelCtl,
+    uno::Reference<XAccessible> xChild = new 
SvxPixelCtlAccessibleChild(*mpPixelCtl,
                 bPixelColorOrBG,
                 tools::Rectangle(mPoint,size),
                 this,
diff --git a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx 
b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
index ee38c9d9d16b..363287dabcf9 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
@@ -1129,11 +1129,9 @@ std::shared_ptr<ExpressionNode> const & 
FunctionParser::parseFunction( const OUS
     StringIteratorT aStart( rAsciiFunction.getStr() );
     StringIteratorT aEnd( rAsciiFunction.getStr()+rAsciiFunction.getLength() );
 
-    ParserContextSharedPtr pContext;
-
     // static parser context, because the actual
     // Spirit parser is also a static object
-    pContext = getParserContext();
+    ParserContextSharedPtr pContext = getParserContext();
     pContext->mpCustoShape = &rCustoShape;
 
     ExpressionGrammar aExpressionGrammer( pContext );
diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx
index 120aa86dbd72..147987127d16 100644
--- a/svx/source/dialog/hdft.cxx
+++ b/svx/source/dialog/hdft.cxx
@@ -435,8 +435,7 @@ void SvxHFPage::Reset( const SfxItemSet* rSet )
         ( nullptr != (pShell = SfxObjectShell::Current()) &&
                     nullptr != (pItem = pShell->GetItem(SID_HTML_MODE))))
     {
-        sal_uInt16 nHtmlMode = 0;
-        nHtmlMode = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
+        sal_uInt16 nHtmlMode = static_cast<const 
SfxUInt16Item*>(pItem)->GetValue();
         if (nHtmlMode & HTMLMODE_ON)
         {
             m_xCntSharedBox->hide();
diff --git a/svx/source/fmcomp/dbaexchange.cxx 
b/svx/source/fmcomp/dbaexchange.cxx
index 0e52f13f10d0..3f15265b9a79 100644
--- a/svx/source/fmcomp/dbaexchange.cxx
+++ b/svx/source/fmcomp/dbaexchange.cxx
@@ -520,8 +520,7 @@ namespace svx
 
         // extract the single values from the sequence
 
-        OUString sObjectName;
-        sObjectName = _rCommand;
+        OUString sObjectName = _rCommand;
 
         // for compatibility: create a string which can be used for the 
SotClipboardFormatId::SBA_DATAEXCHANGE format
 
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index cf061a1697a8..a764497b189d 100644
--- a/svx/source/fmcomp/fmgridif.cxx
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -133,8 +133,7 @@ FmXModifyMultiplexer::FmXModifyMultiplexer( 
::cppu::OWeakObject& rSource, ::osl:
 
 Any SAL_CALL FmXModifyMultiplexer::queryInterface(const Type& _rType)
 {
-    Any aReturn;
-    aReturn = ::cppu::queryInterface(_rType,
+    Any aReturn = ::cppu::queryInterface(_rType,
         static_cast< css::util::XModifyListener*>(this),
         static_cast< XEventListener*>(this)
     );
@@ -167,8 +166,7 @@ FmXUpdateMultiplexer::FmXUpdateMultiplexer( 
::cppu::OWeakObject& rSource, ::osl:
 
 Any SAL_CALL FmXUpdateMultiplexer::queryInterface(const Type& _rType)
 {
-    Any aReturn;
-    aReturn = ::cppu::queryInterface(_rType,
+    Any aReturn = ::cppu::queryInterface(_rType,
         static_cast< XUpdateListener*>(this),
         static_cast< XEventListener*>(this)
     );
@@ -218,8 +216,7 @@ FmXSelectionMultiplexer::FmXSelectionMultiplexer( 
::cppu::OWeakObject& rSource,
 
 Any SAL_CALL FmXSelectionMultiplexer::queryInterface(const Type& _rType)
 {
-    Any aReturn;
-    aReturn = ::cppu::queryInterface(_rType,
+    Any aReturn = ::cppu::queryInterface(_rType,
         static_cast< XSelectionChangeListener*>(this),
         static_cast< XEventListener*>(this)
     );
@@ -252,8 +249,7 @@ FmXContainerMultiplexer::FmXContainerMultiplexer( 
::cppu::OWeakObject& rSource,
 
 Any SAL_CALL FmXContainerMultiplexer::queryInterface(const Type& _rType)
 {
-    Any aReturn;
-    aReturn = ::cppu::queryInterface(_rType,
+    Any aReturn = ::cppu::queryInterface(_rType,
         static_cast< XContainerListener*>(this),
         static_cast< XEventListener*>(this)
     );
@@ -301,8 +297,7 @@ FmXGridControlMultiplexer::FmXGridControlMultiplexer( 
::cppu::OWeakObject& rSour
 
 Any SAL_CALL FmXGridControlMultiplexer::queryInterface(const Type& _rType)
 {
-    Any aReturn;
-    aReturn = ::cppu::queryInterface( _rType,
+    Any aReturn = ::cppu::queryInterface( _rType,
         static_cast< XGridControlListener*>(this)
     );
 
diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx
index 8ff98b08fb9b..d89243c6da9e 100644
--- a/svx/source/form/fmundo.cxx
+++ b/svx/source/form/fmundo.cxx
@@ -1015,9 +1015,7 @@ void FmUndoPropertyAction::Redo()
 
 OUString FmUndoPropertyAction::GetComment() const
 {
-    OUString aStr(static_STR_UNDO_PROPERTY);
-
-    aStr = aStr.replaceFirst( "#", aPropertyName );
+    OUString aStr = static_STR_UNDO_PROPERTY.replaceFirst( "#", aPropertyName 
);
     return aStr;
 }
 
diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index e414b91d4b62..2cbc608a9948 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -536,8 +536,7 @@ void NumberingTypeMgr::ApplyNumRule(SvxNumRule& aNum, 
sal_uInt16 nIndex, sal_uIn
 OUString NumberingTypeMgr::GetDescription(sal_uInt16 nIndex, bool isDefault)
 {
     OUString sRet;
-    sal_uInt16 nLength = 0;
-    nLength = maNumberSettingsArr.size();
+    sal_uInt16 nLength = maNumberSettingsArr.size();
 
     if ( nIndex >= nLength )
         return sRet;
@@ -551,8 +550,7 @@ OUString NumberingTypeMgr::GetDescription(sal_uInt16 
nIndex, bool isDefault)
 bool NumberingTypeMgr::IsCustomized(sal_uInt16 nIndex)
 {
     bool bRet = false;
-    sal_uInt16 nLength = 0;
-    nLength = maNumberSettingsArr.size();
+    sal_uInt16 nLength = maNumberSettingsArr.size();
 
     if ( nIndex >= nLength )
         bRet = false;
diff --git a/svx/source/svdraw/polypolygoneditor.cxx 
b/svx/source/svdraw/polypolygoneditor.cxx
index e9d9ee6d58cb..1f82f0436544 100644
--- a/svx/source/svdraw/polypolygoneditor.cxx
+++ b/svx/source/svdraw/polypolygoneditor.cxx
@@ -137,8 +137,7 @@ bool PolyPolygonEditor::SetPointsSmooth( 
basegfx::B2VectorContinuity eFlags, con
             basegfx::B2DPolygon 
aCandidate(maPolyPolygon.getB2DPolygon(nPolyNum));
 
             // set continuity in point, make sure there is a curve
-            bool bPolygonChanged(false);
-            bPolygonChanged = basegfx::utils::expandToCurveInPoint(aCandidate, 
nPntNum);
+            bool bPolygonChanged = 
basegfx::utils::expandToCurveInPoint(aCandidate, nPntNum);
             bPolygonChanged |= 
basegfx::utils::setContinuityInPoint(aCandidate, nPntNum, eFlags);
 
             if(bPolygonChanged)
diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx 
b/svx/source/tbxctrls/tbxcolorupdate.cxx
index 7bbeea79c346..2069f61395f8 100644
--- a/svx/source/tbxctrls/tbxcolorupdate.cxx
+++ b/svx/source/tbxctrls/tbxcolorupdate.cxx
@@ -78,8 +78,7 @@ namespace svx
         if (!mbWideButton)
         {
             // Also show the current color as QuickHelpText
-            OUString colorSuffix = " (%1)";
-            colorSuffix = colorSuffix.replaceFirst("%1", rNamedColor.second);
+            OUString colorSuffix = OUString(" (%1)").replaceFirst("%1", 
rNamedColor.second);
             OUString colorHelpText = maCommandLabel + colorSuffix;
 
             mpTbx->SetQuickHelpText(mnBtnId, colorHelpText);
diff --git a/svx/source/xml/xmlxtexp.cxx b/svx/source/xml/xmlxtexp.cxx
index 23d1305c0b2b..40dfb6cfdd9c 100644
--- a/svx/source/xml/xmlxtexp.cxx
+++ b/svx/source/xml/xmlxtexp.cxx
@@ -182,8 +182,7 @@ static void createStorageStream( uno::Reference < 
io::XOutputStream > *xOut,
                                  rtl::Reference<SvXMLGraphicHelper>&   
rxGraphicHelper,
                                  const uno::Reference < embed::XStorage >& 
xSubStorage )
 {
-    uno::Reference < io::XStream > xStream;
-    xStream = xSubStorage->openStreamElement(
+    uno::Reference < io::XStream > xStream = xSubStorage->openStreamElement(
                         "Content.xml",
                         embed::ElementModes::WRITE );
     rxGraphicHelper = SvXMLGraphicHelper::Create( xSubStorage, 
SvXMLGraphicHelperMode::Write );
diff --git a/svx/source/xml/xmlxtimp.cxx b/svx/source/xml/xmlxtimp.cxx
index bb24ae7d189a..5f2f1dcc4f1a 100644
--- a/svx/source/xml/xmlxtimp.cxx
+++ b/svx/source/xml/xmlxtimp.cxx
@@ -377,8 +377,7 @@ bool SvxXMLXTableImport::load( const OUString &rPath, const 
OUString &rReferer,
                 openStorageStream( &aParserInput, xGraphicHelper, xSubStorage 
);
             else
             {
-                css::uno::Reference< css::io::XStream > xStream;
-                xStream = comphelper::OStorageHelper::GetStreamAtPath(
+                css::uno::Reference< css::io::XStream > xStream = 
comphelper::OStorageHelper::GetStreamAtPath(
                         xStorage, rPath, embed::ElementModes::READ, aNasty );
                 if( !xStream.is() )
                     return false;
commit 8f59317223e0b8e1e5e6e4145b6ee457fe9e15f3
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Sat Apr 13 21:27:47 2019 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sun Apr 14 08:29:08 2019 +0200

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

diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 5fdaeda48636..fd7d7f4061cb 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -1808,8 +1808,7 @@ bool SmSymDefineDialog::SelectSymbolSet(weld::ComboBox& 
rComboBox,
     assert((&rComboBox == m_xOldSymbolSets.get() || &rComboBox == 
m_xSymbolSets.get()) && "Sm : wrong ComboBox");
 
     // trim SymbolName (no leading and trailing blanks)
-    OUString  aNormName (rSymbolSetName);
-    aNormName = comphelper::string::stripStart(aNormName, ' ');
+    OUString aNormName = comphelper::string::stripStart(rSymbolSetName, ' ');
     aNormName = comphelper::string::stripEnd(aNormName, ' ');
     // and remove possible deviations within the input
     rComboBox.set_entry_text(aNormName);
diff --git a/stoc/source/implementationregistration/implreg.cxx 
b/stoc/source/implementationregistration/implreg.cxx
index e463097bb5e6..0fb17520df9f 100644
--- a/stoc/source/implementationregistration/implreg.cxx
+++ b/stoc/source/implementationregistration/implreg.cxx
@@ -396,9 +396,7 @@ void prepareUserLink(const Reference < XSimpleRegistry >& 
xDest,
                                 const OUString& linkTarget,
                                 const OUString& implName)
 {
-    Reference < XRegistryKey > xRootKey;
-
-    xRootKey = xDest->getRootKey();
+    Reference < XRegistryKey > xRootKey = xDest->getRootKey();
 
     if (xRootKey->getKeyType(linkName) == RegistryKeyType_LINK)
     {
diff --git a/store/source/storbase.hxx b/store/source/storbase.hxx
index 5ced6d255c4e..0c21acbb3ad3 100644
--- a/store/source/storbase.hxx
+++ b/store/source/storbase.hxx
@@ -366,8 +366,7 @@ struct PageData
      */
     void guard (sal_uInt32 nAddr)
     {
-        sal_uInt32 nCRC32 = 0;
-        nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
+        sal_uInt32 nCRC32 = rtl_crc32 (0, &m_aGuard.m_nMagic, 
sizeof(sal_uInt32));
         m_aDescr.m_nAddr = store::htonl(nAddr);
         nCRC32 = rtl_crc32 (nCRC32, &m_aDescr, static_cast<sal_uInt32>(theSize 
- sizeof(G)));
         m_aGuard.m_nCRC32 = store::htonl(nCRC32);
@@ -377,8 +376,7 @@ struct PageData
      */
     storeError verify (sal_uInt32 nAddr) const
     {
-        sal_uInt32 nCRC32 = 0;
-        nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
+        sal_uInt32 nCRC32 = rtl_crc32 (0, &m_aGuard.m_nMagic, 
sizeof(sal_uInt32));
         nCRC32 = rtl_crc32 (nCRC32, &m_aDescr, static_cast<sal_uInt32>(theSize 
- sizeof(G)));
         if (m_aGuard.m_nCRC32 != store::htonl(nCRC32))
             return store_E_InvalidChecksum;
diff --git a/store/source/storbios.cxx b/store/source/storbios.cxx
index b1bac9852938..93e47d700841 100644
--- a/store/source/storbios.cxx
+++ b/store/source/storbios.cxx
@@ -117,8 +117,7 @@ struct OStoreSuperBlock
      */
     void guard()
     {
-        sal_uInt32 nCRC32 = 0;
-        nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
+        sal_uInt32 nCRC32 = rtl_crc32 (0, &m_aGuard.m_nMagic, 
sizeof(sal_uInt32));
         nCRC32 = rtl_crc32 (nCRC32, &m_aDescr, static_cast<sal_uInt32>(theSize 
- sizeof(G)));
         m_aGuard.m_nCRC32 = store::htonl(nCRC32);
     }
@@ -131,8 +130,7 @@ struct OStoreSuperBlock
         if (nMagic != STORE_MAGIC_SUPERBLOCK)
             return store_E_WrongFormat;
 
-        sal_uInt32 nCRC32 = 0;
-        nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
+        sal_uInt32 nCRC32 = rtl_crc32 (0, &m_aGuard.m_nMagic, 
sizeof(sal_uInt32));
         nCRC32 = rtl_crc32 (nCRC32, &m_aDescr, static_cast<sal_uInt32>(theSize 
- sizeof(G)));
         if (m_aGuard.m_nCRC32 != store::htonl(nCRC32))
             return store_E_InvalidChecksum;
diff --git a/store/source/stordata.hxx b/store/source/stordata.hxx
index 35fe20c0729a..4e4741d509d7 100644
--- a/store/source/stordata.hxx
+++ b/store/source/stordata.hxx
@@ -172,8 +172,7 @@ struct OStoreIndirectionPageData : public store::PageData
     */
     void guard()
     {
-        sal_uInt32 nCRC32 = 0;
-        nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
+        sal_uInt32 nCRC32 = rtl_crc32 (0, &m_aGuard.m_nMagic, 
sizeof(sal_uInt32));
         nCRC32 = rtl_crc32 (nCRC32, m_pData, capacity());
         m_aGuard.m_nCRC32 = store::htonl(nCRC32);
     }
@@ -182,8 +181,7 @@ struct OStoreIndirectionPageData : public store::PageData
     */
     storeError verify() const
     {
-        sal_uInt32 nCRC32 = 0;
-        nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
+        sal_uInt32 nCRC32 = rtl_crc32 (0, &m_aGuard.m_nMagic, 
sizeof(sal_uInt32));
         nCRC32 = rtl_crc32 (nCRC32, m_pData, capacity());
         if (m_aGuard.m_nCRC32 != store::htonl(nCRC32))
             return store_E_InvalidChecksum;
@@ -299,8 +297,7 @@ struct OStorePageNameBlock
     */
     void guard()
     {
-        sal_uInt32 nCRC32 = 0;
-        nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
+        sal_uInt32 nCRC32 = rtl_crc32 (0, &m_aGuard.m_nMagic, 
sizeof(sal_uInt32));
         nCRC32 = rtl_crc32 (nCRC32, &m_aKey, static_cast<sal_uInt32>(theSize - 
sizeof(G)));
         m_aGuard.m_nCRC32 = store::htonl(nCRC32);
     }
@@ -309,8 +306,7 @@ struct OStorePageNameBlock
     */
     storeError verify() const
     {
-        sal_uInt32 nCRC32 = 0;
-        nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
+        sal_uInt32 nCRC32 = rtl_crc32 (0, &m_aGuard.m_nMagic, 
sizeof(sal_uInt32));
         nCRC32 = rtl_crc32 (nCRC32, &m_aKey, static_cast<sal_uInt32>(theSize - 
sizeof(G)));
         if (m_aGuard.m_nCRC32 != store::htonl(nCRC32))
             return store_E_InvalidChecksum;
@@ -398,8 +394,7 @@ struct OStoreDirectoryDataBlock
     */
     void guard()
     {
-        sal_uInt32 nCRC32 = 0;
-        nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
+        sal_uInt32 nCRC32 = rtl_crc32 (0, &m_aGuard.m_nMagic, 
sizeof(sal_uInt32));
         nCRC32 = rtl_crc32 (nCRC32, &m_aTable, static_cast<sal_uInt32>(theSize 
- sizeof(G)));
         m_aGuard.m_nCRC32 = store::htonl(nCRC32);
     }
@@ -408,8 +403,7 @@ struct OStoreDirectoryDataBlock
     */
     storeError verify() const
     {
-        sal_uInt32 nCRC32 = 0;
-        nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
+        sal_uInt32 nCRC32 = rtl_crc32 (0, &m_aGuard.m_nMagic, 
sizeof(sal_uInt32));
         nCRC32 = rtl_crc32 (nCRC32, &m_aTable, static_cast<sal_uInt32>(theSize 
- sizeof(G)));
         if (m_aGuard.m_nCRC32 != store::htonl(nCRC32))
             return store_E_InvalidChecksum;
diff --git a/store/source/stortree.hxx b/store/source/stortree.hxx
index 547f548c3a95..9eb02b1329f1 100644
--- a/store/source/stortree.hxx
+++ b/store/source/stortree.hxx
@@ -142,8 +142,7 @@ struct OStoreBTreeNodeData : public store::PageData
     */
     void guard()
     {
-        sal_uInt32 nCRC32 = 0;
-        nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
+        sal_uInt32 nCRC32 = rtl_crc32 (0, &m_aGuard.m_nMagic, 
sizeof(sal_uInt32));
         nCRC32 = rtl_crc32 (nCRC32, m_pData, capacity());
         m_aGuard.m_nCRC32 = store::htonl(nCRC32);
     }
@@ -152,8 +151,7 @@ struct OStoreBTreeNodeData : public store::PageData
     */
     storeError verify() const
     {
-        sal_uInt32 nCRC32 = 0;
-        nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
+        sal_uInt32 nCRC32 = rtl_crc32 (0, &m_aGuard.m_nMagic, 
sizeof(sal_uInt32));
         nCRC32 = rtl_crc32 (nCRC32, m_pData, capacity());
         if (m_aGuard.m_nCRC32 != store::htonl(nCRC32))
             return store_E_InvalidChecksum;
diff --git a/svgio/source/svgreader/svgsvgnode.cxx 
b/svgio/source/svgreader/svgsvgnode.cxx
index 72775f16b9a4..f438da41ef0e 100644
--- a/svgio/source/svgreader/svgsvgnode.cxx
+++ b/svgio/source/svgreader/svgsvgnode.cxx
@@ -567,8 +567,7 @@ namespace svgio
                                     SvgAspectRatio 
aRatioDefault(Align_xMidYMid,true);
                                     const SvgAspectRatio& rRatio = 
getSvgAspectRatio().isSet()? getSvgAspectRatio() : aRatioDefault;
 
-                                    basegfx::B2DHomMatrix aViewBoxMapping;
-                                    aViewBoxMapping = 
rRatio.createMapping(aSvgCanvasRange, *pBox);
+                                    basegfx::B2DHomMatrix aViewBoxMapping = 
rRatio.createMapping(aSvgCanvasRange, *pBox);
                                     // no need to check ratio here for slice, 
the outermost Svg will
                                     // be clipped anyways (see below)
 
diff --git a/svl/source/fsstor/fsfactory.cxx b/svl/source/fsstor/fsfactory.cxx
index 816de07b201c..31fd68bd54a6 100644
--- a/svl/source/fsstor/fsfactory.cxx
+++ b/svl/source/fsstor/fsfactory.cxx
@@ -58,9 +58,7 @@ uno::Reference< uno::XInterface > SAL_CALL 
FSStorageFactory::impl_staticCreateSe
 
 uno::Reference< uno::XInterface > SAL_CALL FSStorageFactory::createInstance()
 {
-    OUString aTempURL;
-
-    aTempURL = ::utl::TempFile( nullptr, true ).GetURL();
+    OUString aTempURL = ::utl::TempFile( nullptr, true ).GetURL();
 
     if ( aTempURL.isEmpty() )
         throw uno::RuntimeException(); // TODO: can not create tempfile
diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx
index 54b09af60142..199c438c7ae9 100644
--- a/svl/source/fsstor/fsstorage.cxx
+++ b/svl/source/fsstor/fsstorage.cxx
@@ -223,8 +223,7 @@ void 
FSStorage::CopyContentToStorage_Impl(ucbhelper::Content& rContent,
 
 uno::Any SAL_CALL FSStorage::queryInterface( const uno::Type& rType )
 {
-    uno::Any aReturn;
-    aReturn = ::cppu::queryInterface
+    uno::Any aReturn = ::cppu::queryInterface
                 (   rType
                 ,   static_cast<lang::XTypeProvider*> ( this )
                 ,   static_cast<embed::XStorage*> ( this )
diff --git a/svl/source/fsstor/ostreamcontainer.cxx 
b/svl/source/fsstor/ostreamcontainer.cxx
index 85a919df2b7c..d13beb4509d7 100644
--- a/svl/source/fsstor/ostreamcontainer.cxx
+++ b/svl/source/fsstor/ostreamcontainer.cxx
@@ -60,9 +60,7 @@ OFSStreamContainer::~OFSStreamContainer()
 // XInterface
 uno::Any SAL_CALL OFSStreamContainer::queryInterface( const uno::Type& rType )
 {
-    uno::Any aReturn;
-
-    aReturn = ::cppu::queryInterface
+    uno::Any aReturn = ::cppu::queryInterface
                 (   rType
                     ,   static_cast<lang::XTypeProvider*> ( this )
                     ,   static_cast<io::XStream*> ( this )
diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx
index 4ac7eb7cd60d..00bc517e0c85 100644
--- a/svl/source/items/itempool.cxx
+++ b/svl/source/items/itempool.cxx
@@ -637,8 +637,7 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& 
rItem, sal_uInt16 nWhich
         // if is already in a pool, then it is worth checking if it is in this 
one.
         if ( IsPooledItem(&rItem) )
         {
-            SfxPoolItemArray_Impl::PoolItemPtrToIndexMap::const_iterator it;
-            it = pItemArr->maPtrToIndex.find(const_cast<SfxPoolItem 
*>(&rItem));
+            auto it = pItemArr->maPtrToIndex.find(const_cast<SfxPoolItem 
*>(&rItem));
 
             // 1. search for an identical pointer in the pool
             if (it != pItemArr->maPtrToIndex.cend())
diff --git a/svl/source/misc/documentlockfile.cxx 
b/svl/source/misc/documentlockfile.cxx
index 3233852e6355..fe567d295f3f 100644
--- a/svl/source/misc/documentlockfile.cxx
+++ b/svl/source/misc/documentlockfile.cxx
@@ -214,9 +214,7 @@ LockFileEntry DocumentLockFile::GetLockData()
     const sal_Int32 nBufLen = 32000;
     uno::Sequence< sal_Int8 > aBuffer( nBufLen );
 
-    sal_Int32 nRead = 0;
-
-    nRead = xInput->readBytes( aBuffer, nBufLen );
+    sal_Int32 nRead = xInput->readBytes( aBuffer, nBufLen );
     xInput->closeInput();
 
     if ( nRead == nBufLen )
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to