[Libreoffice-commits] core.git: chart2/source compilerplugins/clang connectivity/source framework/source linguistic/source oox/source sal/osl sc/source sd/source setup_native/source sfx2/source shell/source slideshow/source stoc/source svtools/source svx/source sw/source ucb/source vcl/unx xmlhelp/source xmloff/source

Noel Grandin noelgrandin at gmail.com
Mon Jun 15 05:07:30 PDT 2015


 chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx |    1 
 compilerplugins/clang/rendercontext.cxx                           |    6 -
 connectivity/source/drivers/dbase/DTable.cxx                      |   37 +++-------
 framework/source/uifactory/menubarfactory.cxx                     |    2 
 linguistic/source/convdicxml.cxx                                  |    4 -
 oox/source/ppt/pptimport.cxx                                      |    2 
 sal/osl/unx/nlsupport.cxx                                         |    1 
 sc/source/core/tool/interpr4.cxx                                  |    2 
 sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx              |    3 
 sc/source/ui/view/dbfunc.cxx                                      |    1 
 sc/source/ui/view/gridwin4.cxx                                    |    1 
 sd/source/core/drawdoc3.cxx                                       |    4 -
 sd/source/ui/dlg/RemoteDialogClientBox.cxx                        |    1 
 setup_native/source/win32/wintools/makecab/makecab.c              |    1 
 setup_native/source/win32/wintools/msidb/msidb.c                  |    2 
 sfx2/source/doc/objstor.cxx                                       |    2 
 sfx2/source/view/viewsh.cxx                                       |    5 -
 shell/source/win32/shlxthandler/util/iso8601_converter.cxx        |    1 
 slideshow/source/engine/slide/targetpropertiescreator.cxx         |    3 
 stoc/source/implementationregistration/implreg.cxx                |    1 
 svtools/source/uno/unoevent.cxx                                   |    3 
 svx/source/customshapes/EnhancedCustomShape2d.cxx                 |    2 
 sw/source/core/text/itradj.cxx                                    |    3 
 sw/source/ui/index/cnttab.cxx                                     |    1 
 sw/source/ui/vba/vbarangehelper.cxx                               |    1 
 sw/source/uibase/dbui/dbmgr.cxx                                   |    4 -
 sw/source/uibase/wrtsh/wrtsh1.cxx                                 |    2 
 ucb/source/ucp/webdav/webdavcontent.cxx                           |    3 
 vcl/unx/generic/dtrans/X11_selection.cxx                          |    6 -
 vcl/unx/generic/dtrans/X11_transferable.cxx                       |    2 
 vcl/unx/gtk/window/gtksalframe.cxx                                |    4 -
 xmlhelp/source/cxxhelp/qe/DocGenerator.cxx                        |    1 
 xmloff/source/style/numehelp.cxx                                  |    2 
 33 files changed, 32 insertions(+), 82 deletions(-)

New commits:
commit dcf6abfcdf3f4b7aec5796c9f6c806889328135f
Author: Noel Grandin <noelgrandin at gmail.com>
Date:   Sat Jun 13 10:16:56 2015 +0200

    cppcheck:unreadVariable
    
    Change-Id: I03981ceba67280e8ed98a9add7f24b3bd958d522

diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
index 74e1bad..d89abcc 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
@@ -1428,7 +1428,6 @@ uno::Reference< uno::XInterface > SAL_CALL ChartDocumentWrapper::createInstance(
                 if( xAddIn.is() )
                 {
                     xResult = xAddIn;
-                    bServiceFound = true;
                 }
             }
         }
diff --git a/compilerplugins/clang/rendercontext.cxx b/compilerplugins/clang/rendercontext.cxx
index cc2a945..037c7bb 100644
--- a/compilerplugins/clang/rendercontext.cxx
+++ b/compilerplugins/clang/rendercontext.cxx
@@ -93,9 +93,7 @@ bool RenderContext::VisitCXXMemberCallExpr(const CXXMemberCallExpr* pCXXMemberCa
     }
     // for calling through a pointer
     const ImplicitCastExpr *pImplicitCastExpr = dyn_cast<ImplicitCastExpr>(pCXXMemberCallExpr->getImplicitObjectArgument());
-    std::string x = "0"; // for debugging
     if (pImplicitCastExpr) {
-        x += "1";
         QualType aType = pImplicitCastExpr->getSubExpr()->getType();
         if (aType->isPointerType())
             aType = aType->getPointeeType();
@@ -106,7 +104,6 @@ bool RenderContext::VisitCXXMemberCallExpr(const CXXMemberCallExpr* pCXXMemberCa
     // for calling through a reference
     const DeclRefExpr *pDeclRefExpr = dyn_cast<DeclRefExpr>(pCXXMemberCallExpr->getImplicitObjectArgument());
     if (pDeclRefExpr) {
-        x += "2";
         QualType aType = pDeclRefExpr->getType();
         std::string t2 = aType.getAsString();
         if (t2 == "vcl::RenderContext" || t2 == "const vcl::RenderContext")
@@ -115,18 +112,15 @@ bool RenderContext::VisitCXXMemberCallExpr(const CXXMemberCallExpr* pCXXMemberCa
     // for calling through a chain of methods
     const CXXMemberCallExpr *pMemberExpr = dyn_cast<CXXMemberCallExpr>(pCXXMemberCallExpr->getImplicitObjectArgument());
     if (pMemberExpr) {
-        x += "3";
         QualType aType = pMemberExpr->getType();
         if (aType->isPointerType())
             aType = aType->getPointeeType();
         std::string t2 = aType.getAsString();
-        x += t2;
         if (t2 == "vcl::RenderContext" || t2 == "const vcl::RenderContext")
             return true;
     }
     report(
         DiagnosticsEngine::Warning,
-        //  + x + pCXXMemberCallExpr->getImplicitObjectArgument()->getStmtClassName()
         "Should be calling OutputDevice method through RenderContext.",
         pCXXMemberCallExpr->getLocStart())
             << pCXXMemberCallExpr->getSourceRange();
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index c937eae..ced7ca5 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -2423,34 +2423,21 @@ void ODbaseTable::addColumn(const Reference< XPropertySet >& _xNewColumn)
         ::dbtools::throwGenericSQLException( sError, *this );
     }
 
-    bool bAlreadyDroped = false;
-    try
+    pNewTable->construct();
+    // copy the data
+    copyData(pNewTable,pNewTable->m_pColumns->getCount());
+    // drop the old table
+    if(DropImpl())
     {
-        pNewTable->construct();
-        // copy the data
-        copyData(pNewTable,pNewTable->m_pColumns->getCount());
-        // drop the old table
-        if(DropImpl())
-        {
-            bAlreadyDroped = true;
-            pNewTable->renameImpl(m_Name);
-            // release the temp file
-        }
-        xHold = pNewTable = NULL;
-
-        FileClose();
-        construct();
-        if(m_pColumns)
-            m_pColumns->refresh();
+        pNewTable->renameImpl(m_Name);
+        // release the temp file
     }
-    catch(const SQLException&)
-    {
-        // here we know that the old table wasn't dropped before
-        if(!bAlreadyDroped)
-            xHold = pNewTable = NULL;
+    xHold = pNewTable = NULL;
 
-        throw;
-    }
+    FileClose();
+    construct();
+    if(m_pColumns)
+        m_pColumns->refresh();
 }
 
 void ODbaseTable::dropColumn(sal_Int32 _nPos)
diff --git a/framework/source/uifactory/menubarfactory.cxx b/framework/source/uifactory/menubarfactory.cxx
index 55afe31..cb29ca6 100644
--- a/framework/source/uifactory/menubarfactory.cxx
+++ b/framework/source/uifactory/menubarfactory.cxx
@@ -124,7 +124,7 @@ void MenuBarFactory::CreateUIElement(const OUString& ResourceURL
                 Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier =
                     theModuleUIConfigurationManagerSupplier::get( _rxContext );
                 xCfgMgr = xModuleCfgSupplier->getUIConfigurationManager( aModuleIdentifier );
-                bHasSettings = xCfgMgr->hasSettings( aResourceURL );
+                xCfgMgr->hasSettings( aResourceURL );
             }
         }
     }
diff --git a/linguistic/source/convdicxml.cxx b/linguistic/source/convdicxml.cxx
index bf31bfd..bbb8304 100644
--- a/linguistic/source/convdicxml.cxx
+++ b/linguistic/source/convdicxml.cxx
@@ -291,14 +291,12 @@ void ConvDicXMLRightTextContext_Impl::EndElement()
 
 bool ConvDicXMLExport::Export()
 {
-    bool bRet = false;
-
     uno::Reference< document::XExporter > xExporter( this );
     uno::Reference< document::XFilter > xFilter( xExporter, UNO_QUERY );
     uno::Sequence< beans::PropertyValue > aProps(0);
     xFilter->filter( aProps );      // calls exportDoc implicitly
 
-    return bRet = bSuccess;
+    return bSuccess;
 }
 
 
diff --git a/oox/source/ppt/pptimport.cxx b/oox/source/ppt/pptimport.cxx
index 27d8317..e755f68 100644
--- a/oox/source/ppt/pptimport.cxx
+++ b/oox/source/ppt/pptimport.cxx
@@ -115,7 +115,7 @@ sal_Int32 PowerPointImport::getSchemeColor( sal_Int32 nToken ) const
             {
                 pClrMapPtr = pMasterPersist->getClrMap();
                 if ( pClrMapPtr )
-                    bColorMapped = pClrMapPtr->getColorMap( nToken );
+                    pClrMapPtr->getColorMap( nToken );
             }
         }
         oox::drawingml::ClrSchemePtr pClrSchemePtr( mpActualSlidePersist->getClrScheme() );
diff --git a/sal/osl/unx/nlsupport.cxx b/sal/osl/unx/nlsupport.cxx
index 1fb6e02..0f6d28c 100644
--- a/sal/osl/unx/nlsupport.cxx
+++ b/sal/osl/unx/nlsupport.cxx
@@ -147,7 +147,6 @@ static char * _compose_locale( rtl_Locale * pLocale, char * buffer, size_t n )
             if( offset + pVariant->length + 1 < n )
             {
                 strcpy( buffer + offset, pVariant->buffer );
-                offset += pVariant->length;
             }
 
             rtl_string_release( pVariant );
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 2e8ae00..c8bdc22 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -3438,7 +3438,7 @@ bool ScInterpreter::SetSbxVariable( SbxVariable* pVar, const ScAddress& rPos )
                     if (aCell.mpFormula->IsValue())
                     {
                         nVal = aCell.mpFormula->GetValue();
-                        pVar->PutDouble(aCell.mpFormula->GetValue());
+                        pVar->PutDouble( nVal );
                     }
                     else
                         pVar->PutString(aCell.mpFormula->GetString().getString());
diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
index 4a2b4e8..fd790c3 100644
--- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
+++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
@@ -129,7 +129,7 @@ ScMyAddress ScAccessibleSpreadsheet::CalcScAddressFromRangeList(ScRangeList *pMa
     return ScMyAddress(0,0,maActiveCell.Tab());
 }
 
-bool ScAccessibleSpreadsheet::CalcScRangeDifferenceMax(ScRange *pSrc,ScRange *pDest,int nMax,VEC_MYADDR &vecRet,int &nSize)
+bool ScAccessibleSpreadsheet::CalcScRangeDifferenceMax(ScRange *pSrc, ScRange *pDest, int nMax, VEC_MYADDR &vecRet, int &nSize)
 {
     //Src Must be :Src > Dest
     if (pDest->In(*pSrc))
@@ -147,7 +147,6 @@ bool ScAccessibleSpreadsheet::CalcScRangeDifferenceMax(ScRange *pSrc,ScRange *pD
         }
         else if(nCellCount > 0)
         {
-            nCellCount +=nSize;
             for (sal_Int32 row = pDest->aStart.Row(); row <=  pDest->aEnd.Row();++row)
             {
                 for (sal_uInt16 col = pDest->aStart.Col(); col <=  pDest->aEnd.Col();++col)
diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx
index 2b05d3c..2821c20 100644
--- a/sc/source/ui/view/dbfunc.cxx
+++ b/sc/source/ui/view/dbfunc.cxx
@@ -360,7 +360,6 @@ void ScDBFunc::ToggleAutoFilter()
                     )->Execute() == RET_YES )
                 {
                     pDBData->SetHeader( true );     //! Undo ??
-                    bHeader = true;
                 }
             }
 
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index a5042cd..1457d9f 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -455,7 +455,6 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
         SCCOL nHdlX = aAutoMarkPos.Col();
         SCROW nHdlY = aAutoMarkPos.Row();
         rDoc.ExtendMerge( nHdlX, nHdlY, nHdlX, nHdlY, nTab );
-        bCurVis = ( nHdlX+1 >= nX1 && nHdlX <= nX2 && nHdlY+1 >= nY1 && nHdlY <= nY2 );
         // left and top is unaffected
 
         //! AutoFill-Anfasser alleine (ohne Cursor) zeichnen ???
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index cdd094c..3383060 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -383,7 +383,6 @@ bool SdDrawDocument::InsertBookmarkAsPage(
     bool bMergeMasterPages,
     bool bPreservePageNames)
 {
-    bool bOK = true;
     bool bContinue = true;
     bool bScaleObjects = false;
     sal_uInt16 nReplacedStandardPages = 0;
@@ -416,8 +415,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
 
     if (nSdPageCount==0 || nBMSdPageCount==0 || nMPageCount==0)
     {
-        bContinue = bOK = false;
-        return bContinue;
+        return false;
     }
 
     // Store the size and some other properties of the first page and notes
diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.cxx b/sd/source/ui/dlg/RemoteDialogClientBox.cxx
index 06ac9c3..7a052ad 100644
--- a/sd/source/ui/dlg/RemoteDialogClientBox.cxx
+++ b/sd/source/ui/dlg/RemoteDialogClientBox.cxx
@@ -331,7 +331,6 @@ void ClientBox::DrawRow(vcl::RenderContext& rRenderContext, const Rectangle& rRe
         aTitleWidth = nMaxTitleWidth - (aTextHeight / 3);
         OUString aShortTitle = rRenderContext.GetEllipsisString(rEntry->m_pClientInfo->mName, aTitleWidth );
         rRenderContext.DrawText(aPos, aShortTitle);
-        aTitleWidth += (aTextHeight / 3);
     }
     else
         rRenderContext.DrawText(aPos, rEntry->m_pClientInfo->mName);
diff --git a/setup_native/source/win32/wintools/makecab/makecab.c b/setup_native/source/win32/wintools/makecab/makecab.c
index 91cfa38..4acdc9f 100644
--- a/setup_native/source/win32/wintools/makecab/makecab.c
+++ b/setup_native/source/win32/wintools/makecab/makecab.c
@@ -295,7 +295,6 @@ int main(int argc, char *argv[])
     CCAB ddfVars;
     DDFSRCFILE *srcList = NULL;
     DDFSRCFILE *srcListCurr = NULL;
-    HFCI fci = NULL;
     char * cmd = NULL;
     unsigned int cmdSize = 0;
 
diff --git a/setup_native/source/win32/wintools/msidb/msidb.c b/setup_native/source/win32/wintools/msidb/msidb.c
index 2ad3347..ea1c5ba 100644
--- a/setup_native/source/win32/wintools/msidb/msidb.c
+++ b/setup_native/source/win32/wintools/msidb/msidb.c
@@ -126,7 +126,7 @@ static BOOL msidbExportStorage(LPCWSTR dbfile, LPCWSTR wdir, LPWSTR storageName)
     r = MsiViewFetch(view, &rec);
     if (r != ERROR_SUCCESS) return FALSE;
 
-    if ((r = MsiRecordReadStream(rec, 2, 0, &dataLen)) != ERROR_SUCCESS)
+    if (MsiRecordReadStream(rec, 2, 0, &dataLen) != ERROR_SUCCESS)
     {
         return FALSE;
     }
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 2c16494..ae51fb7 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -3454,7 +3454,7 @@ bool SfxObjectShell::CopyStoragesOfUnknownMediaType( const uno::Reference< embed
                     }
 
                     uno::Reference< beans::XPropertySet > xProps( xSubStorage, uno::UNO_QUERY_THROW );
-                    bGotMediaType = ( xProps->getPropertyValue( aMediaTypePropName ) >>= aMediaType );
+                    xProps->getPropertyValue( aMediaTypePropName ) >>= aMediaType;
                 }
 
                 // TODO/LATER: there should be a way to detect whether an object with such a MediaType can exist
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index d41ae37..055d5f3 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -838,8 +838,8 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet )
             case SID_SETUPPRINTER:
             case SID_PRINTER_NAME:
             {
-                bool bEnabled = pImp->m_bCanPrint && !pImp->m_nPrinterLocks;
-                bEnabled = bEnabled  && !Application::GetSettings().GetMiscSettings().GetDisablePrinting();
+                bool bEnabled = pImp->m_bCanPrint && !pImp->m_nPrinterLocks
+                              && !Application::GetSettings().GetMiscSettings().GetDisablePrinting();
                 if ( bEnabled )
                 {
                     SfxPrinter *pPrinter = GetPrinter(false);
@@ -866,7 +866,6 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet )
                             rSet.Put( SfxStringItem( SID_PRINTDOCDIRECT, aBuffer.makeStringAndClear() ) );
                         }
                     }
-                    bEnabled = !pPrinter || !pPrinter->IsPrinting();
                 }
                 break;
             }
diff --git a/shell/source/win32/shlxthandler/util/iso8601_converter.cxx b/shell/source/win32/shlxthandler/util/iso8601_converter.cxx
index 537ca8d..a033978 100644
--- a/shell/source/win32/shlxthandler/util/iso8601_converter.cxx
+++ b/shell/source/win32/shlxthandler/util/iso8601_converter.cxx
@@ -34,7 +34,6 @@
 */
 std::wstring iso8601_date_to_local_date(const std::wstring& isoDate )
 {
-    const std::wstring CONST_SPACE(L" ");
     ::std::wstring ws8601DateTime(isoDate);
 
     if ( ws8601DateTime.length() == 19 )
diff --git a/slideshow/source/engine/slide/targetpropertiescreator.cxx b/slideshow/source/engine/slide/targetpropertiescreator.cxx
index deef54f..d1877c6 100644
--- a/slideshow/source/engine/slide/targetpropertiescreator.cxx
+++ b/slideshow/source/engine/slide/targetpropertiescreator.cxx
@@ -251,8 +251,7 @@ namespace internal
                         // check whether we already have an entry for
                         // this target (we only take the first set
                         // effect for every shape)
-                        XShapeHash::const_iterator aIter;
-                        if( (aIter=mrShapeHash.find( aTarget )) != mrShapeHash.end() )
+                        if( mrShapeHash.find( aTarget ) != mrShapeHash.end() )
                             break; // already an entry in existence for given XShape
 
                         // if this is an appear effect, hide shape
diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx
index 7acd149..e7d904e 100644
--- a/stoc/source/implementationregistration/implreg.cxx
+++ b/stoc/source/implementationregistration/implreg.cxx
@@ -565,7 +565,6 @@ static void deleteUserLink(const Reference < XRegistryKey >& xRootKey,
             if (hasNoImplementations)
             {
                 bClean = true;
-                hasNoImplementations = false;
                 OUString path(xOldKey->getKeyName());
                 xOldKey->closeKey();
                 xRootKey->deleteKey(path);
diff --git a/svtools/source/uno/unoevent.cxx b/svtools/source/uno/unoevent.cxx
index b1baf3e..45046d6 100644
--- a/svtools/source/uno/unoevent.cxx
+++ b/svtools/source/uno/unoevent.cxx
@@ -246,7 +246,7 @@ void SvBaseEventDescriptor::getAnyFromMacro(Any& rAny,
                 rAny <<= aSequence;
                 bRetValueOK = true;
                 break;
-                        }
+            }
             case JAVASCRIPT:
             default:
                 OSL_FAIL("not implemented");
@@ -268,7 +268,6 @@ void SvBaseEventDescriptor::getAnyFromMacro(Any& rAny,
         aSequence[0] = aKindValue;
 
         rAny <<= aSequence;
-        bRetValueOK = true;
     }
 }
 
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index a463eb8..d94e2c7 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -2080,8 +2080,6 @@ void CorrectCalloutArrows( MSO_SPT eSpType, sal_uInt32 nLineObjectCount, std::ve
 
         case mso_sptAccentCallout3 :
         case mso_sptAccentBorderCallout3 :
-            bAccent = false;
-            //fall-through
         case mso_sptCallout3 :
         case mso_sptBorderCallout3 :
         {
diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx
index 1e74bda..1ad212b 100644
--- a/sw/source/core/text/itradj.cxx
+++ b/sw/source/core/text/itradj.cxx
@@ -490,7 +490,6 @@ SwTwips SwTextAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
     sal_uInt16 nCompress = ( pCurrent->GetKanaComp() )[ nKanaIdx ];
     pPos = pCurrent->GetPortion();
     long nDecompress = 0;
-    nKanaDiffSum = 0;
 
     while( pPos )
     {
@@ -505,7 +504,6 @@ SwTwips SwTextAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
             // check, if information is stored under other key
             if ( !nMaxWidthDiff && pPos == pCurrent->GetFirstPortion() )
                 nMaxWidthDiff = GetInfo().GetMaxWidthDiff( pCurrent );
-            nKanaDiffSum += nMaxWidthDiff;
             pPos->Width( nMinWidth +
                        ( ( 10000 - nCompress ) * nMaxWidthDiff ) / 10000 );
             nDecompress += pPos->Width() - nMinWidth;
@@ -521,7 +519,6 @@ SwTwips SwTextAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
             if ( ++nKanaIdx < pCurrent->GetKanaComp().size() )
                 nCompress = ( pCurrent->GetKanaComp() )[ nKanaIdx ];
 
-            nKanaDiffSum = 0;
             nDecompress = 0;
         }
         pPos = pPos->GetPortion();
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 49664e5..7948ccd 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -2851,7 +2851,6 @@ void SwTokenWindow::SetForm(SwForm& rForm, sal_uInt16 nL)
         }
         if(!bLastWasText)
         {
-            bLastWasText = true;
             SwFormToken aTemp(TOKEN_TEXT);
             Control* pCtrl = InsertItem(aEmptyOUStr, aTemp);
             if(!pSetActiveControl)
diff --git a/sw/source/ui/vba/vbarangehelper.cxx b/sw/source/ui/vba/vbarangehelper.cxx
index e4e1b92..d5d5b70 100644
--- a/sw/source/ui/vba/vbarangehelper.cxx
+++ b/sw/source/ui/vba/vbarangehelper.cxx
@@ -124,7 +124,6 @@ uno::Reference< text::XTextCursor > SwVbaRangeHelper::initCursor( const uno::Ref
         try
         {
             xTextCursor = rText->createTextCursor();
-            bGotTextCursor = true;
         }
         catch (const uno::Exception& e)
         {
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 2321dcc..bc86274 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -2018,11 +2018,9 @@ bool SwDBManager::GetColumnCnt(const OUString& rSourceName, const OUString& rTab
         if ( nOldRow != static_cast<sal_Int32>(nAbsRecordId) )
             bMove = lcl_MoveAbsolute(pFound, nAbsRecordId);
         if(bMove)
-        {
             bRet = lcl_GetColumnCnt(pFound, rColumnName, nLanguage, rResult, pNumber);
-        }
         if ( nOldRow != static_cast<sal_Int32>(nAbsRecordId) )
-            bMove = lcl_MoveAbsolute(pFound, nOldRow);
+            lcl_MoveAbsolute(pFound, nOldRow);
     }
     return bRet;
 }
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 31315ec..9a691ad 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -829,7 +829,7 @@ void SwWrtShell::ConnectObj( svt::EmbeddedObjectRef& xObj, const SwRect &rPrt,
 {
     SfxInPlaceClient* pCli = GetView().FindIPClient( xObj.GetObject(), &GetView().GetEditWin());
     if ( !pCli )
-        pCli = new SwOleClient( &GetView(), &GetView().GetEditWin(), xObj );
+        new SwOleClient( &GetView(), &GetView().GetEditWin(), xObj );
     CalcAndSetScale( xObj, &rPrt, &rFrm );
 }
 
diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx
index d74cc7c..861b175 100644
--- a/ucb/source/ucp/webdav/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav/webdavcontent.cxx
@@ -1557,8 +1557,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
 
                         if ( bError )
                         {
-                            if ( !(bNetworkAccessAllowed
-                                    = shouldAccessNetworkAfterException( aLastException )) )
+                            if ( !shouldAccessNetworkAfterException( aLastException ) )
                             {
                                 cancelCommandExecution( aLastException, xEnv );
                                 // unreachable
diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx
index b603a8e..f188527 100644
--- a/vcl/unx/generic/dtrans/X11_selection.cxx
+++ b/vcl/unx/generic/dtrans/X11_selection.cxx
@@ -693,8 +693,7 @@ const OUString& SelectionManager::getString( Atom aAtom )
 {
     osl::MutexGuard aGuard(m_aMutex);
 
-    std::unordered_map< Atom, OUString >::const_iterator it;
-    if( ( it = m_aAtomToString.find( aAtom ) ) == m_aAtomToString.end() )
+    if( m_aAtomToString.find( aAtom ) == m_aAtomToString.end() )
     {
         static OUString aEmpty;
         char* pAtom = m_pDisplay ? XGetAtomName( m_pDisplay, aAtom ) : NULL;
@@ -712,8 +711,7 @@ Atom SelectionManager::getAtom( const OUString& rString )
 {
     osl::MutexGuard aGuard(m_aMutex);
 
-    std::unordered_map< OUString, Atom, OUStringHash >::const_iterator it;
-    if( ( it = m_aStringToAtom.find( rString ) ) == m_aStringToAtom.end() )
+    if( m_aStringToAtom.find( rString ) == m_aStringToAtom.end() )
     {
         static Atom nNoDisplayAtoms = 1;
         Atom aAtom = m_pDisplay ? XInternAtom( m_pDisplay, OUStringToOString( rString, RTL_TEXTENCODING_ISO_8859_1 ).getStr(), False ) : nNoDisplayAtoms++;
diff --git a/vcl/unx/generic/dtrans/X11_transferable.cxx b/vcl/unx/generic/dtrans/X11_transferable.cxx
index 092165a..45a38cd 100644
--- a/vcl/unx/generic/dtrans/X11_transferable.cxx
+++ b/vcl/unx/generic/dtrans/X11_transferable.cxx
@@ -76,7 +76,7 @@ Sequence< DataFlavor > SAL_CALL X11Transferable::getTransferDataFlavors()
     Sequence< DataFlavor > aFlavorList;
     bool bSuccess = m_rManager.getPasteDataTypes( m_aSelection ? m_aSelection : XA_PRIMARY, aFlavorList );
     if( ! bSuccess && m_aSelection == 0 )
-        bSuccess = m_rManager.getPasteDataTypes( m_rManager.getAtom( OUString("CLIPBOARD") ), aFlavorList );
+        m_rManager.getPasteDataTypes( m_rManager.getAtom( OUString("CLIPBOARD") ), aFlavorList );
 
     return aFlavorList;
 }
diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx
index 4a658cb..e39e7682 100644
--- a/vcl/unx/gtk/window/gtksalframe.cxx
+++ b/vcl/unx/gtk/window/gtksalframe.cxx
@@ -475,7 +475,7 @@ void GtkSalFrame::doKeyCallback( guint state,
     if( bDown )
     {
         bool bHandled = CallCallback( SALEVENT_KEYINPUT, &aEvent );
-        // #i46889# copy AlternatKeyCode handling from generic plugin
+        // #i46889# copy AlternateKeyCode handling from generic plugin
         if( ! bHandled )
         {
             KeyAlternate aAlternate = GetAlternateKeyCode( aEvent.mnCode );
@@ -484,7 +484,7 @@ void GtkSalFrame::doKeyCallback( guint state,
                 aEvent.mnCode = aAlternate.nKeyCode;
                 if( aAlternate.nCharCode )
                     aEvent.mnCharCode = aAlternate.nCharCode;
-                bHandled = CallCallback( SALEVENT_KEYINPUT, &aEvent );
+                CallCallback( SALEVENT_KEYINPUT, &aEvent );
             }
         }
         if( bSendRelease && ! aDel.isDeleted() )
diff --git a/xmlhelp/source/cxxhelp/qe/DocGenerator.cxx b/xmlhelp/source/cxxhelp/qe/DocGenerator.cxx
index b96319f..874a67e 100644
--- a/xmlhelp/source/cxxhelp/qe/DocGenerator.cxx
+++ b/xmlhelp/source/cxxhelp/qe/DocGenerator.cxx
@@ -37,7 +37,6 @@ RoleFiller::RoleFiller()
 
 RoleFiller::~RoleFiller()
 {
-
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/style/numehelp.cxx b/xmloff/source/style/numehelp.cxx
index 482857f..4a8de1d 100644
--- a/xmloff/source/style/numehelp.cxx
+++ b/xmloff/source/style/numehelp.cxx
@@ -218,7 +218,6 @@ void XMLNumberFormatAttributesExportHelper::WriteAttributes(SvXMLExport& rXMLExp
             if (!bWasSetTypeAttribute)
             {
                 rXMLExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, XML_FLOAT);
-                bWasSetTypeAttribute = true;
                 if (bExportValue)
                 {
                     OUString sValue( ::rtl::math::doubleToUString( rValue,
@@ -502,7 +501,6 @@ void XMLNumberFormatAttributesExportHelper::WriteAttributes(
             if (!bWasSetTypeAttribute)
             {
                 pExport->AddAttribute(sAttrValType, XML_FLOAT);
-                bWasSetTypeAttribute = true;
                 if (bExportValue)
                 {
                     OUString sValue( ::rtl::math::doubleToUString( rValue,


More information about the Libreoffice-commits mailing list