sax/qa/cppunit/xmlimport.cxx               |    3 --
 sax/source/fastparser/fastparser.cxx       |    3 --
 sc/source/core/data/dpfilteredcache.cxx    |    3 --
 sc/source/core/data/drwlayer.cxx           |    3 --
 sc/source/core/tool/address.cxx            |    3 --
 sc/source/core/tool/callform.cxx           |    3 --
 sc/source/core/tool/chartpos.cxx           |    3 --
 sc/source/core/tool/chgtrack.cxx           |    3 --
 sc/source/core/tool/interpr5.cxx           |    6 +----
 sc/source/filter/excel/excform.cxx         |    9 ++-----
 sc/source/filter/excel/excform8.cxx        |    6 +----
 sc/source/filter/excel/xecontent.cxx       |    3 --
 sc/source/filter/excel/xicontent.cxx       |   33 +++++++++--------------------
 sc/source/filter/html/htmlexp.cxx          |    3 --
 sc/source/filter/lotus/tool.cxx            |    3 --
 sc/source/ui/app/inputwin.cxx              |    3 --
 sc/source/ui/dataprovider/dataprovider.cxx |    3 --
 sc/source/ui/dbgui/csvgrid.cxx             |    3 --
 sc/source/ui/docshell/docfunc.cxx          |    3 --
 sc/source/ui/docshell/docsh.cxx            |    2 -
 sc/source/ui/drawfunc/fuconrec.cxx         |    3 --
 sc/source/ui/unoobj/linkuno.cxx            |    3 --
 sc/source/ui/vba/vbafont.cxx               |    3 --
 sc/source/ui/vba/vbainterior.cxx           |    3 --
 sc/source/ui/vba/vbarange.cxx              |    6 +----
 sc/source/ui/vba/vbaworksheets.cxx         |    3 --
 sc/source/ui/view/tabvwshf.cxx             |    6 +----
 27 files changed, 43 insertions(+), 85 deletions(-)

New commits:
commit 185e01c015528cafbddcda5dfdabf816ce8be20e
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Sat Apr 13 21:24:41 2019 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Apr 17 09:29:50 2019 +0200

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

diff --git a/sax/qa/cppunit/xmlimport.cxx b/sax/qa/cppunit/xmlimport.cxx
index 6e011c1e971b..7ab34ed763c9 100644
--- a/sax/qa/cppunit/xmlimport.cxx
+++ b/sax/qa/cppunit/xmlimport.cxx
@@ -370,8 +370,7 @@ void XMLImportTest::setUp()
     namespaceArgs[0] <<= OUString( "registerNamespaces" );
     for (sal_Int32 i = 1; i <= nNamespaceCount; i++ )
     {
-        css::beans::Pair <OUString, sal_Int32> rPair;
-        rPair = css::beans::Pair<OUString, sal_Int32>( 
DummyTokenHandler::namespaceURIs[i - 1], i << 16 );
+        css::beans::Pair<OUString, sal_Int32> rPair( 
DummyTokenHandler::namespaceURIs[i - 1], i << 16 );
         namespaceArgs[i] <<= rPair;
     }
     xInit->initialize( namespaceArgs );
diff --git a/sax/source/fastparser/fastparser.cxx 
b/sax/source/fastparser/fastparser.cxx
index 92a5f7a87b38..f255147f131b 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -806,8 +806,7 @@ void FastSaxParserImpl::parseStream(const InputSource& 
rStructSource)
 
     if (rEntity.mbEnableThreads)
     {
-        rtl::Reference<ParserThread> xParser;
-        xParser = new ParserThread(this);
+        rtl::Reference<ParserThread> xParser = new ParserThread(this);
         xParser->launch();
         aEnsureFree.setThread(xParser);
         bool done = false;
diff --git a/sc/source/core/data/dpfilteredcache.cxx 
b/sc/source/core/data/dpfilteredcache.cxx
index 0763aee3152b..a0fce6afdbbc 100644
--- a/sc/source/core/data/dpfilteredcache.cxx
+++ b/sc/source/core/data/dpfilteredcache.cxx
@@ -308,8 +308,7 @@ void ScDPFilteredCache::filterTable(const 
vector<Criterion>& rCriteria, Sequence
     Sequence<Any> headerRow(nColSize);
     for (SCCOL  nCol = 0; nCol < nColSize; ++nCol)
     {
-        OUString str;
-        str = getFieldName( nCol);
+        OUString str = getFieldName( nCol);
         Any any;
         any <<= str;
         headerRow[nCol] = any;
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 259e76fe08fa..985267b8929d 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -2093,8 +2093,7 @@ void ScDrawLayer::UpdateCellAnchorFromPositionEnd( const 
SdrObject &rObj, ScDraw
     ScDrawObjData* pAnchor = &rAnchor;
     pAnchor->maEnd = aRange.aEnd;
 
-    tools::Rectangle aCellRect;
-    aCellRect = rDoc.GetMMRect( aRange.aEnd.Col(), aRange.aEnd.Row(),
+    tools::Rectangle aCellRect = rDoc.GetMMRect( aRange.aEnd.Col(), 
aRange.aEnd.Row(),
       aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aEnd.Tab() );
     pAnchor->maEndOffset.setY( aObjRect.Bottom()-aCellRect.Top() );
     if (!rDoc.IsNegativePage(nTab))
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index 666e22ad2910..3b3a997050df 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -1087,8 +1087,7 @@ static ScRefFlags lcl_ScRange_Parse_XL_A1( ScRange& r,
         return nFlags;
     }
 
-    p = tmp2;
-    p = lcl_eatWhiteSpace( p+1 );   // after ':'
+    p = lcl_eatWhiteSpace( tmp2+1 );   // after ':'
     tmp1 = lcl_a1_get_col( p, &r.aEnd, &nFlags2, pErrRef);
     if( !tmp1 && aEndTabName.isEmpty() )     // Probably the aEndTabName was 
specified after the first range
     {
diff --git a/sc/source/core/tool/callform.cxx b/sc/source/core/tool/callform.cxx
index 98aa31fe804d..0970dc983d6c 100644
--- a/sc/source/core/tool/callform.cxx
+++ b/sc/source/core/tool/callform.cxx
@@ -169,8 +169,7 @@ bool InitExternalFunc(const OUString& rModuleName)
     if (pTemp)
         return false;
 
-    OUString aNP;
-    aNP = rModuleName;
+    OUString aNP = rModuleName;
 
     std::unique_ptr<osl::Module> pLib(new osl::Module( aNP ));
     if (!pLib->is())
diff --git a/sc/source/core/tool/chartpos.cxx b/sc/source/core/tool/chartpos.cxx
index 1abd84b3b192..6448fa3d8d91 100644
--- a/sc/source/core/tool/chartpos.cxx
+++ b/sc/source/core/tool/chartpos.cxx
@@ -449,10 +449,9 @@ ScChartPositionMap::ScChartPositionMap( SCCOL nChartCols, 
SCROW nChartRows,
 
     ColumnMap::iterator pColIter = rCols.begin();
     RowMap& rCol1 = pColIter->second;
-    RowMap::iterator pPos1Iter;
 
     // row header
-    pPos1Iter = rCol1.begin();
+    auto pPos1Iter = rCol1.begin();
     if ( nRowAdd )
         ++pPos1Iter;
     if ( nColAdd )
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index 4900c4d28b1b..9d9cab039814 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -1442,8 +1442,7 @@ void ScChangeActionContent::GetDescription(
     OUString aTmpStr;
     GetRefString(aTmpStr, pDoc);
 
-    sal_Int32 nPos = 0;
-    nPos = aRsc.indexOf("#1", nPos);
+    sal_Int32 nPos = aRsc.indexOf("#1", 0);
     if (nPos >= 0)
     {
         aRsc = aRsc.replaceAt(nPos, 2, aTmpStr);
diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx
index 1d445563d700..7a02ef58077a 100644
--- a/sc/source/core/tool/interpr5.cxx
+++ b/sc/source/core/tool/interpr5.cxx
@@ -2333,8 +2333,7 @@ void ScInterpreter::CalculateRGPRKP(bool _bRKP)
     else
         pMatX = nullptr;
 
-    ScMatrixRef pMatY;
-    pMatY = GetMatrix();
+    ScMatrixRef pMatY = GetMatrix();
     if (!pMatY)
     {
         PushIllegalParameter();
@@ -2859,8 +2858,7 @@ void ScInterpreter::CalculateTrendGrowth(bool _bGrowth)
     else
         pMatX = nullptr;
 
-    ScMatrixRef pMatY;
-    pMatY = GetMatrix();
+    ScMatrixRef pMatY = GetMatrix();
     if (!pMatY)
     {
         PushIllegalParameter();
diff --git a/sc/source/filter/excel/excform.cxx 
b/sc/source/filter/excel/excform.cxx
index 24843c2001bf..6e3d4ed93362 100644
--- a/sc/source/filter/excel/excform.cxx
+++ b/sc/source/filter/excel/excform.cxx
@@ -372,9 +372,8 @@ ConvErr ExcelToSc::Convert( std::unique_ptr<ScTokenArray>& 
pResult, XclImpStream
             case 0x19: // Special Attribute                     [327 279]
             {
                 sal_uInt16  nData(0), nFactor(0);
-                sal_uInt8   nOpt(0);
 
-                nOpt = aIn.ReaduInt8();
+                sal_uInt8 nOpt = aIn.ReaduInt8();
 
                 if( meBiff == EXC_BIFF2 )
                 {
@@ -957,9 +956,8 @@ ConvErr ExcelToSc::Convert( ScRangeListTabs& rRangeList, 
XclImpStream& aIn, std:
             case 0x19: // Special Attribute                     [327 279]
             {
                 sal_uInt16 nData(0), nFactor(0);
-                sal_uInt8 nOpt(0);
 
-                nOpt = aIn.ReaduInt8();
+                sal_uInt8 nOpt = aIn.ReaduInt8();
 
                 if( meBiff == EXC_BIFF2 )
                 {
@@ -1884,8 +1882,7 @@ void ExcelToSc::ReadExtensionNlr( XclImpStream& aIn )
 
 void ExcelToSc::ReadExtensionMemArea( XclImpStream& aIn )
 {
-    sal_uInt16 nCount(0);
-    nCount = aIn.ReaduInt16();
+    sal_uInt16 nCount = aIn.ReaduInt16();
 
     aIn.Ignore( static_cast<std::size_t>(nCount) * ((GetBiff() == EXC_BIFF8) ? 
8 : 6) ); // drop the ranges
 }
diff --git a/sc/source/filter/excel/excform8.cxx 
b/sc/source/filter/excel/excform8.cxx
index 5984d5292a7b..1aea200bd1c0 100644
--- a/sc/source/filter/excel/excform8.cxx
+++ b/sc/source/filter/excel/excform8.cxx
@@ -367,9 +367,8 @@ ConvErr ExcelToSc8::Convert( std::unique_ptr<ScTokenArray>& 
rpTokArray, XclImpSt
             case 0x19: // Special Attribute                     [327 279]
             {
                 sal_uInt16 nData(0), nFactor(0);
-                sal_uInt8 nOpt(0);
 
-                nOpt = aIn.ReaduInt8();
+                sal_uInt8 nOpt = aIn.ReaduInt8();
                 nData = aIn.ReaduInt16();
                 nFactor = 2;
 
@@ -1009,9 +1008,8 @@ ConvErr ExcelToSc8::Convert( ScRangeListTabs& rRangeList, 
XclImpStream& aIn, std
             case 0x19: // Special Attribute                     [327 279]
             {
                 sal_uInt16 nData(0), nFactor(0);
-                sal_uInt8 nOpt(0);
 
-                nOpt = aIn.ReaduInt8();
+                sal_uInt8 nOpt = aIn.ReaduInt8();
                 nData = aIn.ReaduInt16();
                 nFactor = 2;
 
diff --git a/sc/source/filter/excel/xecontent.cxx 
b/sc/source/filter/excel/xecontent.cxx
index b1b3b9a5d3ca..5d5b4458f762 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -1710,10 +1710,9 @@ XclExpDV::XclExpDV( const XclExpRoot& rRoot, sal_uLong 
nScHandle ) :
 
         // formulas
         XclExpFormulaCompiler& rFmlaComp = GetFormulaCompiler();
-        std::unique_ptr< ScTokenArray > xScTokArr;
 
         // first formula
-        xScTokArr = pValData->CreateFlatCopiedTokenArray( 0 );
+        std::unique_ptr< ScTokenArray > xScTokArr = 
pValData->CreateFlatCopiedTokenArray( 0 );
         if (xScTokArr)
         {
             if( pValData->GetDataMode() == SC_VALID_LIST )
diff --git a/sc/source/filter/excel/xicontent.cxx 
b/sc/source/filter/excel/xicontent.cxx
index 9dec16f865c2..fb2f14235f43 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -124,8 +124,7 @@ void lclAppendString32( OUString& rString, XclImpStream& 
rStrm, bool b16Bit )
 /** Reads 32-bit string length and ignores following 16-bit character array. */
 void lclIgnoreString32( XclImpStream& rStrm )
 {
-    sal_uInt32 nChars(0);
-    nChars = rStrm.ReaduInt32();
+    sal_uInt32 nChars = rStrm.ReaduInt32();
     nChars *= 2;
     rStrm.Ignore( nChars );
 }
@@ -241,8 +240,7 @@ OUString XclImpHyperlink::ReadEmbeddedData( XclImpStream& 
rStrm )
     XclGuid aGuid;
     rStrm >> aGuid;
     rStrm.Ignore( 4 );
-    sal_uInt32 nFlags(0);
-    nFlags = rStrm.ReaduInt32();
+    sal_uInt32 nFlags = rStrm.ReaduInt32();
 
     OSL_ENSURE( aGuid == XclTools::maGuidStdLink, 
"XclImpHyperlink::ReadEmbeddedData - unknown header GUID" );
 
@@ -275,14 +273,12 @@ OUString XclImpHyperlink::ReadEmbeddedData( XclImpStream& 
rStrm )
 
         if( aGuid == XclTools::maGuidFileMoniker )
         {
-            sal_uInt16 nLevel = 0; // counter for level to climb down in path
-            nLevel = rStrm.ReaduInt16();
+            sal_uInt16 nLevel = rStrm.ReaduInt16(); // counter for level to 
climb down in path
             xShortName.reset( new OUString );
             lclAppendString32( *xShortName, rStrm, false );
             rStrm.Ignore( 24 );
 
-            sal_uInt32 nStrLen = 0;
-            nStrLen = rStrm.ReaduInt32();
+            sal_uInt32 nStrLen = rStrm.ReaduInt32();
             if( nStrLen )
             {
                 nStrLen = rStrm.ReaduInt32();
@@ -297,8 +293,7 @@ OUString XclImpHyperlink::ReadEmbeddedData( XclImpStream& 
rStrm )
         }
         else if( aGuid == XclTools::maGuidUrlMoniker )
         {
-            sal_uInt32 nStrLen(0);
-            nStrLen = rStrm.ReaduInt32();
+            sal_uInt32 nStrLen = rStrm.ReaduInt32();
             nStrLen /= 2;       // it's byte count here...
             xLongName.reset( new OUString );
             lclAppendString32( *xLongName, rStrm, nStrLen, true );
@@ -765,8 +760,7 @@ void XclImpValidationManager::ReadDV( XclImpStream& rStrm )
     ExcelToSc& rFmlaConv = rRoot.GetOldFmlaConverter();
 
     // flags
-    sal_uInt32 nFlags(0);
-    nFlags = rStrm.ReaduInt32();
+    sal_uInt32 nFlags = rStrm.ReaduInt32();
 
     // message strings
     /*  Empty strings are single NUL characters in Excel (string length is 1).
@@ -982,8 +976,7 @@ void XclImpWebQuery::ReadWqstring( XclImpStream& rStrm )
 void XclImpWebQuery::ReadWqsettings( XclImpStream& rStrm )
 {
     rStrm.Ignore( 10 );
-    sal_uInt16 nFlags(0);
-    nFlags = rStrm.ReaduInt16();
+    sal_uInt16 nFlags = rStrm.ReaduInt16();
     rStrm.Ignore( 10 );
     mnRefresh = rStrm.ReaduInt16();
 
@@ -1195,8 +1188,7 @@ XclImpDecrypterRef lclReadFilepass8( XclImpStream& rStrm )
 {
     XclImpDecrypterRef xDecr;
 
-    sal_uInt16 nMode(0);
-    nMode = rStrm.ReaduInt16();
+    sal_uInt16 nMode = rStrm.ReaduInt16();
     switch( nMode )
     {
         case EXC_FILEPASS_BIFF5:
@@ -1347,15 +1339,13 @@ void XclImpSheetProtectBuffer::ReadOptions( 
XclImpStream& rStrm, SCTAB nTab )
     // feature data.  If -1 it depends on the feature type imported earlier.
     // For enhanced protection data, the size is always 4.  For the most xls
     // documents out there this value is almost always -1.
-    sal_Int32 nFlagSize(0);
-    nFlagSize = rStrm.ReadInt32();
+    sal_Int32 nFlagSize = rStrm.ReadInt32();
     if (nFlagSize != -1)
         return;
 
     // There are actually 4 bytes to read, but the upper 2 bytes currently
     // don't store any bits.
-    sal_uInt16 nOptions(0);
-    nOptions = rStrm.ReaduInt16();
+    sal_uInt16 nOptions = rStrm.ReaduInt16();
 
     Sheet* pSheet = GetSheetItem(nTab);
     if (pSheet)
@@ -1371,8 +1361,7 @@ void XclImpSheetProtectBuffer::AppendEnhancedProtection( 
const ScEnhancedProtect
 
 void XclImpSheetProtectBuffer::ReadPasswordHash( XclImpStream& rStrm, SCTAB 
nTab )
 {
-    sal_uInt16 nHash(0);
-    nHash = rStrm.ReaduInt16();
+    sal_uInt16 nHash = rStrm.ReaduInt16();
     Sheet* pSheet = GetSheetItem(nTab);
     if (pSheet)
         pSheet->mnPasswordHash = nHash;
diff --git a/sc/source/filter/html/htmlexp.cxx 
b/sc/source/filter/html/htmlexp.cxx
index 9715fa9299ed..ea7ae4c025da 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -276,8 +276,7 @@ sal_uInt16 ScHTMLExport::ToPixel( sal_uInt16 nVal )
 
 Size ScHTMLExport::MMToPixel( const Size& rSize )
 {
-    Size aSize( rSize );
-    aSize = pAppWin->LogicToPixel( rSize, MapMode( MapUnit::Map100thMM ) );
+    Size aSize = pAppWin->LogicToPixel( rSize, MapMode( MapUnit::Map100thMM ) 
);
     // If there's something there should also be a Pixel
     if ( !aSize.Width() && rSize.Width() )
         aSize.setWidth( 1 );
diff --git a/sc/source/filter/lotus/tool.cxx b/sc/source/filter/lotus/tool.cxx
index 2c0a0f7465e9..a3de47cadefa 100644
--- a/sc/source/filter/lotus/tool.cxx
+++ b/sc/source/filter/lotus/tool.cxx
@@ -482,8 +482,7 @@ bool RangeNameBufferWK3::FindAbs( const OUString& rRef, 
sal_uInt16& rIndex )
 {
     if (rRef.isEmpty())
         return false;
-    OUString aTmp(rRef.copy(1));
-    StringHashEntry aRef(aTmp); // search w/o '$'!
+    StringHashEntry aRef(rRef.copy(1)); // search w/o '$'!
 
     std::vector<Entry>::iterator itr = std::find_if(maEntries.begin(), 
maEntries.end(),
         [&aRef](const Entry& rEntry) { return aRef == rEntry.aStrHashEntry; });
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 3267602f8927..e38febfda9f6 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1290,8 +1290,7 @@ ScTextWnd::ScTextWnd(ScInputBarGroup* pParent, 
ScTabViewShell* pViewSh)
     SetPointer(PointerStyle::Text);
     SetFont(aTextFont);
 
-    Size aBorder;
-    aBorder = CalcWindowSize(aBorder);
+    Size aBorder = CalcWindowSize(Size());
     mnBorderHeight = aBorder.Height();
 
     set_id("sc_input_window");
diff --git a/sc/source/ui/dataprovider/dataprovider.cxx 
b/sc/source/ui/dataprovider/dataprovider.cxx
index 3b59f17e5fbc..e0a5571971d2 100644
--- a/sc/source/ui/dataprovider/dataprovider.cxx
+++ b/sc/source/ui/dataprovider/dataprovider.cxx
@@ -34,8 +34,7 @@ std::unique_ptr<SvStream> 
DataProvider::FetchStreamFromURL(const OUString& rURL,
     {
         uno::Reference< ucb::XSimpleFileAccess3 > xFileAccess( 
ucb::SimpleFileAccess::create( comphelper::getProcessComponentContext() ), 
uno::UNO_QUERY );
 
-        uno::Reference< io::XInputStream > xStream;
-        xStream = xFileAccess->openFileRead( rURL );
+        uno::Reference< io::XInputStream > xStream = 
xFileAccess->openFileRead( rURL );
 
         const sal_Int32 BUF_LEN = 8000;
         uno::Sequence< sal_Int8 > buffer( BUF_LEN );
diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx
index bc1979a28084..458d8475b0ac 100644
--- a/sc/source/ui/dbgui/csvgrid.cxx
+++ b/sc/source/ui/dbgui/csvgrid.cxx
@@ -1077,8 +1077,7 @@ void ScCsvGrid::ImplDrawColumnHeader( OutputDevice& 
rOutDev, sal_uInt32 nColInde
 
 void ScCsvGrid::ImplDrawCellText( const Point& rPos, const OUString& rText )
 {
-    OUString aPlainText( rText );
-    aPlainText = aPlainText.replaceAll( "\t", " " );
+    OUString aPlainText = rText.replaceAll( "\t", " " );
     aPlainText = aPlainText.replaceAll( "\n", " " );
     mpEditEngine->SetPaperSize( maEdEngSize );
 
diff --git a/sc/source/ui/docshell/docfunc.cxx 
b/sc/source/ui/docshell/docfunc.cxx
index dc4efe60cf8c..d8c475bc2bc0 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -3403,8 +3403,7 @@ bool ScDocFunc::SetTabBgColor( SCTAB nTab, const Color& 
rColor, bool bRecord, bo
         return false;
     }
 
-    Color aOldTabBgColor;
-    aOldTabBgColor = rDoc.GetTabBgColor(nTab);
+    Color aOldTabBgColor = rDoc.GetTabBgColor(nTab);
 
     bool bSuccess = false;
     rDoc.SetTabBgColor(nTab, rColor);
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 298c8197e6a4..460629541de4 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -1855,7 +1855,7 @@ void lcl_ScDocShell_GetFixedWidthString( OUString& rStr, 
const ScDocument& rDoc,
             case SvxCellHorJustify::Right:
             {
                 OUStringBuffer aTmp;
-                aTmp = comphelper::string::padToLength( aTmp, nBlanks, ' ' );
+                comphelper::string::padToLength( aTmp, nBlanks, ' ' );
                 aString = aTmp.append(aString).makeStringAndClear();
             }
             break;
diff --git a/sc/source/ui/drawfunc/fuconrec.cxx 
b/sc/source/ui/drawfunc/fuconrec.cxx
index 4761c7a01899..becebdb208f6 100644
--- a/sc/source/ui/drawfunc/fuconrec.cxx
+++ b/sc/source/ui/drawfunc/fuconrec.cxx
@@ -234,8 +234,7 @@ void FuConstRectangle::SetLineEnds(SfxItemSet& rAttr, const 
SdrObject& rObj, sal
         ::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/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx
index a9035ce04766..c4493df34536 100644
--- a/sc/source/ui/unoobj/linkuno.cxx
+++ b/sc/source/ui/unoobj/linkuno.cxx
@@ -637,8 +637,7 @@ void ScAreaLinkObj::Modify_Impl( const OUString* pNewFile, 
const OUString* pNewF
         bool bFitBlock = true;          // move, if the size changes with 
update
         if (pNewFile)
         {
-            aFile = *pNewFile;
-            aFile = ScGlobal::GetAbsDocName( aFile, pDocShell );    //! in 
InsertAreaLink?
+            aFile = ScGlobal::GetAbsDocName( *pNewFile, pDocShell );    //! in 
InsertAreaLink?
         }
         if (pNewFilter)
             aFilter = *pNewFilter;
diff --git a/sc/source/ui/vba/vbafont.cxx b/sc/source/ui/vba/vbafont.cxx
index fe269de6953c..09ecf921cc3d 100644
--- a/sc/source/ui/vba/vbafont.cxx
+++ b/sc/source/ui/vba/vbafont.cxx
@@ -297,8 +297,7 @@ uno::Any
 ScVbaFont::getColor()
 {
     // #TODO #FIXME - behave like getXXX above ( wrt. GetDataSet )
-    uno::Any aAny;
-    aAny = OORGBToXLRGB( mxFont->getPropertyValue("CharColor") );
+    uno::Any aAny = OORGBToXLRGB( mxFont->getPropertyValue("CharColor") );
     return aAny;
 }
 
diff --git a/sc/source/ui/vba/vbainterior.cxx b/sc/source/ui/vba/vbainterior.cxx
index 573deeeffeb3..ad7f0e290b1a 100644
--- a/sc/source/ui/vba/vbainterior.cxx
+++ b/sc/source/ui/vba/vbainterior.cxx
@@ -321,8 +321,7 @@ ScVbaInterior::GetBackColor()
     }
     else
     {
-        uno::Any aAny;
-        aAny = OORGBToXLRGB( m_xProps->getPropertyValue( BACKCOLOR ) );
+        uno::Any aAny = OORGBToXLRGB( m_xProps->getPropertyValue( BACKCOLOR ) 
);
         if( aAny >>= nColor )
         {
             nColor = XLRGBToOORGB( nColor );
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 747dbf4b24cd..dbcc2a2f1a7a 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -215,8 +215,7 @@ static double lcl_Round2DecPlaces( double nVal )
     long tmp = static_cast<long>(nVal);
     if ( ( nVal - tmp ) >= 0.5 )
         ++tmp;
-    nVal = tmp;
-    nVal = nVal/100;
+    nVal = double(tmp)/100;
     return nVal;
 }
 
@@ -3420,8 +3419,7 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& 
Order1, const uno::Any&
 
     if ( nOrientation == excel::XlSortOrientation::xlSortRows )
         bIsSortColumns = true;
-    sal_Int16 nHeader = 0;
-    nHeader = aSortParam.nCompatHeader;
+    sal_Int16 nHeader = aSortParam.nCompatHeader;
     bool bContainsHeader = false;
 
     if ( Header.hasValue() )
diff --git a/sc/source/ui/vba/vbaworksheets.cxx 
b/sc/source/ui/vba/vbaworksheets.cxx
index bd4c5e132747..0aaa5f55e252 100644
--- a/sc/source/ui/vba/vbaworksheets.cxx
+++ b/sc/source/ui/vba/vbaworksheets.cxx
@@ -433,8 +433,7 @@ ScVbaWorksheets::Item(const uno::Any& Index, const 
uno::Any& Index2)
     if ( Index.getValueTypeClass() == uno::TypeClass_SEQUENCE )
     {
         const uno::Reference< script::XTypeConverter >& xConverter = 
getTypeConverter(mxContext);
-        uno::Any aConverted;
-        aConverted = xConverter->convertTo( Index, 
cppu::UnoType<uno::Sequence< uno::Any >>::get() );
+        uno::Any aConverted = xConverter->convertTo( Index, 
cppu::UnoType<uno::Sequence< uno::Any >>::get() );
         SheetMap aSheets;
         uno::Sequence< uno::Any > sIndices;
         aConverted >>= sIndices;
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index d614bda2b2f9..03e7e7f51090 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -772,9 +772,8 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
                 {
                     sal_uInt16      nRet    = RET_OK; /// temp
                     bool        bDone   = false; /// temp
-                    Color       aTabBgColor;
 
-                    aTabBgColor = pDoc->GetTabBgColor( nCurrentTab );
+                    Color aTabBgColor = pDoc->GetTabBgColor( nCurrentTab );
                     ScAbstractDialogFactory* pFact = 
ScAbstractDialogFactory::Create();
                     ScopedVclPtr<AbstractScTabBgColorDlg> 
pDlg(pFact->CreateScTabBgColorDlg(
                                                                 GetFrameWeld(),
@@ -971,8 +970,7 @@ void ScTabViewShell::GetStateTable( SfxItemSet& rSet )
 
             case FID_TAB_SET_TAB_BG_COLOR:
                 {
-                    Color aColor;
-                    aColor = pDoc->GetTabBgColor( nTab );
+                    Color aColor = pDoc->GetTabBgColor( nTab );
                     rSet.Put( SvxColorItem( aColor, nWhich ) );
                 }
                 break;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to