[Libreoffice-commits] core.git: 6 commits - cui/source sd/source sw/source tools/source

Noel Grandin noel at peralex.com
Fri Feb 7 02:15:05 PST 2014


 cui/source/options/optdict.cxx   |    2 --
 sd/source/filter/eppt/epptso.cxx |    7 +++----
 sw/source/core/doc/docnum.cxx    |    7 +++----
 sw/source/ui/shells/frmsh.cxx    |    8 ++++----
 sw/source/ui/shells/tabsh.cxx    |   12 ++++++------
 tools/source/stream/strmunx.cxx  |    2 +-
 6 files changed, 17 insertions(+), 21 deletions(-)

New commits:
commit 160cc0f6a5718bb7267b4a214c10c34eb5e08ee7
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Feb 7 12:12:38 2014 +0200

    4 related coverity issues, unused pointer value
    
    coverity#708881, coverity#708882, coverity#708883,
    coverity#708884
    
    Change-Id: I8ddcb2f7b2b70dc92b8d0d5f66bf944edc57157e

diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx
index 3b8deb3..5467a6f 100644
--- a/sw/source/ui/shells/frmsh.cxx
+++ b/sw/source/ui/shells/frmsh.cxx
@@ -1018,13 +1018,13 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
                     aBoxItem = aNewBox;
                     SvxBorderLine aDestBorderLine;
 
-                    if ((pBorderLine = aBoxItem.GetTop()) != NULL)
+                    if( aBoxItem.GetTop() != NULL )
                         aBoxItem.SetLine(&aBorderLine, BOX_LINE_TOP);
-                    if ((pBorderLine = aBoxItem.GetBottom()) != NULL)
+                    if( aBoxItem.GetBottom() != NULL )
                         aBoxItem.SetLine(&aBorderLine, BOX_LINE_BOTTOM);
-                    if ((pBorderLine = aBoxItem.GetLeft()) != NULL)
+                    if( aBoxItem.GetLeft() != NULL )
                         aBoxItem.SetLine(&aBorderLine, BOX_LINE_LEFT);
-                    if ((pBorderLine = aBoxItem.GetRight()) != NULL)
+                    if( aBoxItem.GetRight() != NULL )
                         aBoxItem.SetLine(&aBorderLine, BOX_LINE_RIGHT);
                 }
             }
commit 7f2e336217ae98673dda5504a72891ad6834e81d
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Feb 7 12:07:53 2014 +0200

    6 related coverity issues, unused pointer value
    
    coverity#708890,coverity#708886,coverity#708888,
    coverity#708887,coverity#708885,coverity#708889
    
    Change-Id: I4aeedea2d73614f4af935c58776605f49824374d

diff --git a/sw/source/ui/shells/tabsh.cxx b/sw/source/ui/shells/tabsh.cxx
index 3ac93a1..f94e044 100644
--- a/sw/source/ui/shells/tabsh.cxx
+++ b/sw/source/ui/shells/tabsh.cxx
@@ -521,17 +521,17 @@ void SwTableShell::Execute(SfxRequest &rReq)
             }
 
             sal_Bool bLine = sal_False;
-            if ( (pBorderLine = aBox.GetTop()) != NULL)
+            if( aBox.GetTop() != NULL )
                 aBox.SetLine(&aBorderLine, BOX_LINE_TOP), bLine |= sal_True;
-            if ((pBorderLine = aBox.GetBottom()) != NULL)
+            if( aBox.GetBottom() != NULL )
                 aBox.SetLine(&aBorderLine, BOX_LINE_BOTTOM), bLine |= sal_True;
-            if ((pBorderLine = aBox.GetLeft()) != NULL)
+            if( aBox.GetLeft() != NULL )
                 aBox.SetLine(&aBorderLine, BOX_LINE_LEFT), bLine |= sal_True;
-            if ((pBorderLine = aBox.GetRight()) != NULL)
+            if( aBox.GetRight() != NULL )
                 aBox.SetLine(&aBorderLine, BOX_LINE_RIGHT), bLine |= sal_True;
-            if ((pBorderLine = aInfo.GetHori()) != NULL)
+            if( aInfo.GetHori() != NULL )
                 aInfo.SetLine(&aBorderLine, BOXINFO_LINE_HORI), bLine |= sal_True;
-            if ((pBorderLine = aInfo.GetVert()) != NULL)
+            if( aInfo.GetVert() != NULL )
                 aInfo.SetLine(&aBorderLine, BOXINFO_LINE_VERT), bLine |= sal_True;
 
             aCoreSet.Put( aBox  );
commit e5dd09caafcc1e55797959a8b4373a39c42a3f18
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Feb 7 12:01:49 2014 +0200

    coverity#708893 unused pointer value
    
    Change-Id: Ib029e08f7dc29330b1a0b5d93c1c0a356dbd59dd

diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx
index cf9fa9d..89cc16c 100644
--- a/tools/source/stream/strmunx.cxx
+++ b/tools/source/stream/strmunx.cxx
@@ -156,7 +156,7 @@ bool InternalStreamLock::LockFile( sal_Size nStart, sal_Size nEnd, SvFileStream*
         }
     }
     // hint: new InternalStreamLock() adds the entry to the global list
-    pLock  = new InternalStreamLock( nStart, nEnd, pStream );
+    new InternalStreamLock( nStart, nEnd, pStream );
     return true;
 }
 
commit c668efa5d9a90b814778f267758c7d7d55960017
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Feb 7 11:58:35 2014 +0200

    coverity#738955 unused pointer value
    
    Change-Id: I5e17afe36422d546249dfc849a2d948a6ef5030b

diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx
index af00987..3f65a6b 100644
--- a/cui/source/options/optdict.cxx
+++ b/cui/source/options/optdict.cxx
@@ -184,8 +184,6 @@ IMPL_LINK_NOARG(SvxNewDictionaryDialog, OKHdl_Impl)
         //! dictionaries may have been added/removed elsewhere too.
         aDics = xDicList->getDictionaries();
     }
-    pDic = aDics.getConstArray();
-    nCount = (sal_uInt16) aDics.getLength();
 
 
     EndDialog( RET_OK );
commit 6f984c03da002da2b4c347c5421ee9cdc6aab084
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Feb 7 11:53:28 2014 +0200

    coverity#738965 unused pointer value
    
    Change-Id: Ie00a0ec0cbe5e3ec9c8e0e54f93153e799b621af

diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index 0f2c74b3..354a20a 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -1360,17 +1360,16 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u
         {
             if ( aTextObj.ParagraphCount() )
             {
-                ParagraphObj* pBulletPara = aTextObj.GetParagraph(0);
-                sal_uInt32  nBulletFlags = 0;
                 sal_uInt32  nNumberingType = 0, nPos2 = rExtBuStr.Tell();
 
                 rExtBuStr.WriteUInt32( (sal_uInt32)( EPP_PST_ExtendedParagraphAtom << 16 ) ).WriteUInt32( (sal_uInt32)0 );
 
                 for ( sal_uInt32 i = 0; i < aTextObj.ParagraphCount(); ++i )
                 {
-                    pBulletPara = aTextObj.GetParagraph(i);
-                    nBulletFlags = 0;
+                    ParagraphObj* pBulletPara = aTextObj.GetParagraph(i);
+                    sal_uInt32  nBulletFlags = 0;
                     sal_uInt16 nBulletId = pBulletPara->nBulletId;
+
                     if ( pBulletPara->bExtendedBulletsUsed )
                     {
                         nBulletFlags = 0x800000;
commit bfc8f4071f73396584679c56c99f81ae03453e92
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Feb 7 11:42:06 2014 +0200

    coverity#984422 unused pointer value
    
    Change-Id: I2200462b2a963820e2ca66094ded653f5597abff

diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index 0ded256..b907831 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -1420,8 +1420,7 @@ static bool lcl_GotoNextPrevNum( SwPosition& rPos, bool bNext,
                             bool bOverUpper, sal_uInt8* pUpper, sal_uInt8* pLower )
 {
     const SwTxtNode* pNd = rPos.nNode.GetNode().GetTxtNode();
-    const SwNumRule* pRule;
-    if( !pNd || 0 == ( pRule = pNd->GetNumRule()))
+    if( !pNd || 0 == pNd->GetNumRule() )
         return false;
 
     sal_uInt8 nSrchNum = static_cast<sal_uInt8>(pNd->GetActualListLevel());
@@ -1436,7 +1435,7 @@ static bool lcl_GotoNextPrevNum( SwPosition& rPos, bool bNext,
             if( aIdx.GetNode().IsTxtNode() )
             {
                 pNd = aIdx.GetNode().GetTxtNode();
-                pRule = pNd->GetNumRule();
+                const SwNumRule* pRule = pNd->GetNumRule();
 
                 sal_uInt8 nTmpNum;
 
@@ -1473,7 +1472,7 @@ static bool lcl_GotoNextPrevNum( SwPosition& rPos, bool bNext,
         if( aIdx.GetNode().IsTxtNode() )
         {
             pNd = aIdx.GetNode().GetTxtNode();
-            pRule = pNd->GetNumRule();
+            const SwNumRule* pRule = pNd->GetNumRule();
             if( pRule )
             {
                 if( ::lcl_IsNumOk( nSrchNum, nLower, nUpper, bOverUpper,


More information about the Libreoffice-commits mailing list