[Libreoffice-commits] core.git: 7 commits - dbaccess/source sc/source sw/source test/source ucb/workben vcl/source

Thomas Arnhold thomas at arnhold.org
Sat May 24 12:28:11 PDT 2014


 dbaccess/source/ui/dlg/tablespage.cxx                |    3 ---
 sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx |    2 +-
 sw/source/core/uibase/utlui/glbltree.cxx             |    2 --
 test/source/mtfxmldump.cxx                           |    4 ----
 ucb/workben/ucb/ucbdemo.cxx                          |   16 ----------------
 vcl/source/gdi/bitmap.cxx                            |    9 +++------
 vcl/source/window/splitwin.cxx                       |    8 --------
 7 files changed, 4 insertions(+), 40 deletions(-)

New commits:
commit d582da903e5cb22bf777aca4ff7d2cdb63673550
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Sat May 24 17:08:02 2014 +0200

    cppcheck: unreadVariable
    
    Change-Id: I5d897d968ca2640d1d127e799937cc6c3eabaf36

diff --git a/sw/source/core/uibase/utlui/glbltree.cxx b/sw/source/core/uibase/utlui/glbltree.cxx
index b9ade13..eefa791 100644
--- a/sw/source/core/uibase/utlui/glbltree.cxx
+++ b/sw/source/core/uibase/utlui/glbltree.cxx
@@ -994,8 +994,6 @@ void    SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry
         Display();
     if ( bDeleteContentCopy )
         delete pContCopy;
-    else
-        bDeleteContentCopy = true;
 }
 
 IMPL_LINK_NOARG(SwGlobalTree, Timeout)
commit 3d385fefb9013f31ba3f7b909623afd5fa6b6cdc
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Sat May 24 17:06:47 2014 +0200

    cppcheck: unreadVariable
    
    Change-Id: If3d480bf3032ec2bd2edc62bb73dd93b00c2cbe7

diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index b288220..be04473 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -634,14 +634,6 @@ static void ImplCalcSet( ImplSplitSet* pSet,
             }
         }
     }
-    else
-    {
-        for ( i = 0; i < nItems; i++ )
-        {
-            if ( !(pItems[i].mnBits & SWIB_INVISIBLE) )
-                nCurSize += pItems[i].mnPixSize;
-        }
-    }
 
     // calculate maximum size
     if ( bRows )
commit e4f7907c0a69a450c13031b3c9539191643c9491
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Sat May 24 17:01:46 2014 +0200

    cppcheck: unreadVariable
    
    Change-Id: Iedb0eaa740943964b9f6242f7908099a92077413

diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx
index a12bf47..9f1a4a7 100644
--- a/dbaccess/source/ui/dlg/tablespage.cxx
+++ b/dbaccess/source/ui/dlg/tablespage.cxx
@@ -356,9 +356,6 @@ namespace dbaui
             }
         }
 
-        bValid = bValid && m_xCurrentConnection.is();
-        bReadonly = bReadonly || !bValid;
-
         // get the current table filter
         SFX_ITEMSET_GET(_rSet, pTableFilter, OStringListItem, DSID_TABLEFILTER, true);
         Sequence< OUString > aTableFilter;
commit 94bc78d2d4d51bb56cce0ea3af3cedd2f26cdd8d
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Sat May 24 16:59:40 2014 +0200

    cppcheck: unreadVariable
    
    Change-Id: Ifbcae35c0cf3bdb9ba5c680b1627117c47d6c9a0

diff --git a/test/source/mtfxmldump.cxx b/test/source/mtfxmldump.cxx
index 95bdba4..e1a6abd 100644
--- a/test/source/mtfxmldump.cxx
+++ b/test/source/mtfxmldump.cxx
@@ -162,8 +162,6 @@ void MetafileXmlDump::filterNoneActionTypes()
 
 void MetafileXmlDump::dump(GDIMetaFile& rMetaFile)
 {
-    std::vector<bool> usedIds(512, false);
-
     xmlOutputBufferPtr xmlOutBuffer = xmlOutputBufferCreateIO(lclWriteCallback, lclCloseCallback, &mrStream, NULL);
     xmlTextWriterPtr xmlWriter = xmlNewTextWriter( xmlOutBuffer );
     xmlTextWriterSetIndent( xmlWriter, 1 );
@@ -178,8 +176,6 @@ void MetafileXmlDump::dump(GDIMetaFile& rMetaFile)
         if (maFilter[nActionType])
             continue;
 
-        usedIds[nActionType] = true;
-
         switch (nActionType)
         {
             case META_LINE_ACTION:
commit c2518d1ffb1d8eafa3385e4c9451a56584806b16
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Sat May 24 16:55:15 2014 +0200

    cppcheck: variableScope
    
    Change-Id: I36c0d491bc27ff93c13b1c497e450646d7151df4

diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx
index dbdc6d2..52af3eb 100644
--- a/vcl/source/gdi/bitmap.cxx
+++ b/vcl/source/gdi/bitmap.cxx
@@ -724,8 +724,6 @@ bool Bitmap::Rotate( long nAngle10, const Color& rFillColor )
                     long                nY;
                     long                nRotX;
                     long                nRotY;
-                    long                nSinY;
-                    long                nCosY;
                     boost::scoped_array<long> pCosX(new long[ nNewWidth ]);
                     boost::scoped_array<long> pSinX(new long[ nNewWidth ]);
                     boost::scoped_array<long> pCosY(new long[ nNewHeight ]);
@@ -749,8 +747,8 @@ bool Bitmap::Rotate( long nAngle10, const Color& rFillColor )
 
                     for( nY = 0L; nY < nNewHeight; nY++ )
                     {
-                        nSinY = pSinY[ nY ];
-                        nCosY = pCosY[ nY ];
+                        long nSinY = pSinY[ nY ];
+                        long nCosY = pCosY[ nY ];
 
                         for( nX = 0L; nX < nNewWidth; nX++ )
                         {
@@ -869,13 +867,12 @@ bool Bitmap::CopyPixel( const Rectangle& rRectDst,
                     {
                         const long      nSrcCount = pDstAcc->GetPaletteEntryCount();
                         const long      nDstCount = 1 << nDstBitCount;
-                        bool            bFound;
 
                         for( long i = 0L; ( i < nSrcCount ) && ( nNextIndex < nSrcCount ); i++ )
                         {
                             const BitmapColor& rSrcCol = pSrcAcc->GetPaletteColor( (sal_uInt16) i );
 
-                            bFound = false;
+                            bool bFound = false;
 
                             for( long j = 0L; j < nDstCount; j++ )
                             {
commit 66e4c16f138e0b1c2c0f06613f6f23d834104343
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Sat May 24 16:49:18 2014 +0200

    cppcheck: catchExceptionByValue
    
    Change-Id: Idbb7a68a9517270325fd9ec34c14d663573318ac

diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
index 6d26093..4e3c8db 100644
--- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
+++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
@@ -1002,7 +1002,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleSpreadsheet::getAccessibleAtP
             try{
             xAccessible = getAccessibleCellAt(nY, nX);
             }
-            catch( ::com::sun::star::lang::IndexOutOfBoundsException e)
+            catch(const ::com::sun::star::lang::IndexOutOfBoundsException &)
             {
                 return NULL;
             }
commit 9d0b6931572362c1771aac98fae5cc50ef901bb2
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Sat May 24 16:02:51 2014 +0200

    cppcheck: unusedPrivateFunction
    
    Change-Id: Id9634d47b009c4208169cf7f3793ba927ce95a64

diff --git a/ucb/workben/ucb/ucbdemo.cxx b/ucb/workben/ucb/ucbdemo.cxx
index 9ecffc2..953a9d0 100644
--- a/ucb/workben/ucb/ucbdemo.cxx
+++ b/ucb/workben/ucb/ucbdemo.cxx
@@ -352,8 +352,6 @@ private:
     OUString m_aConfigurationKey2;
     sal_Bool m_bInited : 1;
 
-    static OUString getUnoURL();
-
 public:
     Ucb( uno::Reference< lang::XMultiServiceFactory >& rxFactory,
          OUString const & rConfigurationKey1,
@@ -377,20 +375,6 @@ public:
 OUString Ucb::m_aProtocol;
 
 
-// static
-OUString Ucb::getUnoURL()
-{
-    OUString aUnoURL(
-                         "uno:socket,host=localhost,port=8121;");
-    if (m_aProtocol.getLength() == 0)
-        aUnoURL += "urp";
-    else
-        aUnoURL += m_aProtocol;
-    aUnoURL += ";UCB.Factory";
-    return aUnoURL;
-}
-
-
 Ucb::Ucb( uno::Reference< lang::XMultiServiceFactory >& rxFactory,
           OUString const & rConfigurationKey1,
           OUString const & rConfigurationKey2 )


More information about the Libreoffice-commits mailing list