[Libreoffice-commits] core.git: 10 commits - sd/source starmath/source svx/source sw/source

Noel Grandin noel at peralex.com
Fri Feb 7 05:34:18 PST 2014


 sd/source/ui/tools/IdleDetection.cxx                 |    3 +--
 starmath/source/mathtype.cxx                         |    5 ++---
 svx/source/accessibility/AccessibleFrameSelector.cxx |    3 +--
 sw/source/core/crsr/crstrvl.cxx                      |    3 +--
 sw/source/core/edit/edtox.cxx                        |    3 +--
 sw/source/core/fields/docufld.cxx                    |    3 +--
 sw/source/core/layout/laycache.cxx                   |   10 +++++-----
 sw/source/core/layout/tabfrm.cxx                     |    2 +-
 sw/source/filter/ww8/ww8graf.cxx                     |    2 +-
 sw/source/filter/ww8/ww8par2.cxx                     |    4 ++--
 10 files changed, 16 insertions(+), 22 deletions(-)

New commits:
commit 50fe91476fed74773f0f0d40261b8e2d4728ef26
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Feb 7 14:58:54 2014 +0200

    coverity#708813 unused pointer value
    
    Change-Id: I723757e470cb2b7e1a412a61a251be954e19d1e9

diff --git a/sd/source/ui/tools/IdleDetection.cxx b/sd/source/ui/tools/IdleDetection.cxx
index ddecd69..073a703 100644
--- a/sd/source/ui/tools/IdleDetection.cxx
+++ b/sd/source/ui/tools/IdleDetection.cxx
@@ -64,8 +64,7 @@ sal_Int32 IdleDetection::CheckSlideShowRunning (void)
     bool bIsSlideShowShowing = false;
 
     // Iterate over all view frames.
-    SfxViewFrame* pViewFrame = SfxViewFrame::GetFirst();
-    for (pViewFrame = SfxViewFrame::GetFirst();
+    for (SfxViewFrame* pViewFrame = SfxViewFrame::GetFirst();
          pViewFrame!=NULL && !bIsSlideShowShowing;
          pViewFrame = SfxViewFrame::GetNext(*pViewFrame))
     {
commit 8d62cd21cba9f08e27f82713dc648341d27f91a3
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Feb 7 14:51:59 2014 +0200

    coverity#708822 unused pointer value
    
    Change-Id: I6797d11a09baa4f86826d8740301bb8d66bb247a

diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx
index 2adc2aa..688a914 100644
--- a/starmath/source/mathtype.cxx
+++ b/starmath/source/mathtype.cxx
@@ -2239,8 +2239,6 @@ sal_uInt8 MathType::HandleCScript(SmNode *pNode,SmNode *pContent,int nLevel,
  */
 void MathType::HandleSubSupScript(SmNode *pNode,int nLevel)
 {
-    SmNode *pTemp;
-
     sal_uInt8 nVariation=0xff;
     if (pNode->GetSubNode(LSUP+1))
     {
@@ -2248,9 +2246,10 @@ void MathType::HandleSubSupScript(SmNode *pNode,int nLevel)
         if (pNode->GetSubNode(LSUB+1))
             nVariation=2;
     }
-    else if (NULL != (pTemp = pNode->GetSubNode(LSUB+1)))
+    else if ( NULL != pNode->GetSubNode(LSUB+1) )
         nVariation=1;
 
+    SmNode *pTemp;
     if (nVariation!=0xff)
     {
         pS->WriteUChar( sal_uInt8(TMPL) ); //Template
commit 2bfcb3c56c2b6ad97318cb722ddb92884c59e41d
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Feb 7 14:48:59 2014 +0200

    coverity#708828 unused pointer value
    
    Change-Id: Iba75551684d7ee51865a7063cba7458594e028da

diff --git a/svx/source/accessibility/AccessibleFrameSelector.cxx b/svx/source/accessibility/AccessibleFrameSelector.cxx
index 9dee0d5..db52be3 100644
--- a/svx/source/accessibility/AccessibleFrameSelector.cxx
+++ b/svx/source/accessibility/AccessibleFrameSelector.cxx
@@ -475,8 +475,7 @@ Any AccFrameSelector::getAccessibleKeyBinding(  ) throw (RuntimeException)
     Any aRet;
     SolarMutexGuard aGuard;
     IsValid();
-    utl::AccessibleRelationSetHelper* pHelper;
-    Reference< XAccessibleRelationSet > xRet = pHelper = new utl::AccessibleRelationSetHelper;
+    Reference< XAccessibleRelationSet > xRet = new utl::AccessibleRelationSetHelper;
     if(meBorder == FRAMEBORDER_NONE)
     {
         Window* pPrev = mpFrameSel->GetWindow( WINDOW_PREV );
commit 429dd477f102b51c4f3cf607dc21d0fe05b5889b
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Feb 7 14:46:36 2014 +0200

    coverity#708838 unused pointer value
    
    Change-Id: I5130f74f9c236b906282f79bde82f2f946b7781a

diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 3b04e76..3b44ea2 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -258,10 +258,9 @@ sal_Bool SwCrsrShell::SetCrsrInHdFt( sal_uInt16 nDescNo, sal_Bool bInHeader )
             if( !pCNd )
                 pCNd = pMyDoc->GetNodes().GoNext( &aIdx );
 
-            const SwFrm* pFrm;
             Point aPt( m_pCurCrsr->GetPtPos() );
 
-            if( pCNd && 0 != ( pFrm = pCNd->getLayoutFrm( GetLayout(), &aPt, 0, sal_False ) ))
+            if( pCNd && 0 != pCNd->getLayoutFrm( GetLayout(), &aPt, 0, sal_False ) )
             {
                 // then we can set the cursor in here
                 SwCallLink aLk( *this ); // watch Crsr-Moves
commit 2b8a32ae0af292f8fafbf30803c9d88495ec3048
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Feb 7 14:43:21 2014 +0200

    coverity#708848 unused pointer value
    
    Change-Id: Ia57203dc63c7b0c26c51b13f7323d5c1c218c267

diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx
index 9282c94..04b0882 100644
--- a/sw/source/core/edit/edtox.cxx
+++ b/sw/source/core/edit/edtox.cxx
@@ -160,8 +160,7 @@ sal_Bool SwEditShell::UpdateTableOf( const SwTOXBase& rTOX, const SfxItemSet* pS
     OSL_ENSURE( rTOX.ISA( SwTOXBaseSection ),  "no TOXBaseSection!" );
     SwTOXBaseSection* pTOX = (SwTOXBaseSection*)&rTOX;
     OSL_ENSURE(pTOX, "no current listing");
-    const SwSectionNode* pSectNd;
-    if( pTOX && 0 != ( pSectNd = pTOX->GetFmt()->GetSectionNode() ) )
+    if( pTOX && 0 != pTOX->GetFmt()->GetSectionNode() )
     {
         SwDoc* pMyDoc = GetDoc();
         SwDocShell* pDocSh = pMyDoc->GetDocShell();
commit a38165fdd4a6ea5695ed16a8bb529e0228cdd695
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Feb 7 14:40:44 2014 +0200

    coverity#708849 unused pointer value
    
    Change-Id: I3d800ca26412537a69bbe0835f518558e37dead6

diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index c2f66d9..d61ecf1 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -2275,7 +2275,6 @@ void SwRefPageGetField::ChangeExpansion( const SwFrm* pFrm,
                                         const SwTxtFld* pFld )
 {
     // only fields in Footer, Header, FootNote, Flys
-    SwTxtNode* pTxtNode = (SwTxtNode*)&pFld->GetTxtNode();
     SwRefPageGetFieldType* pGetType = (SwRefPageGetFieldType*)GetTyp();
     SwDoc* pDoc = pGetType->GetDoc();
     if( pFld->GetTxtNode().StartOfSectionIndex() >
@@ -2293,7 +2292,7 @@ void SwRefPageGetField::ChangeExpansion( const SwFrm* pFrm,
 
     //  create index for determination of the TextNode
     SwPosition aPos( SwNodeIndex( pDoc->GetNodes() ) );
-    pTxtNode = (SwTxtNode*) GetBodyTxtNode( *pDoc, aPos, *pFrm );
+    SwTxtNode* pTxtNode = (SwTxtNode*) GetBodyTxtNode( *pDoc, aPos, *pFrm );
 
     // If no layout exists, ChangeExpansion is called for header and
     // footer lines via layout formatting without existing TxtNode.
commit 4dda036b15bfb528b576c6f6d97cc57903d93451
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Feb 7 14:35:39 2014 +0200

    coverity#708854 unused pointer value
    
    Change-Id: Ide16dee52116d3f437a564b93fad7464382c7213

diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index b97301e..4cf2bd2 100644
--- a/sw/source/core/layout/laycache.cxx
+++ b/sw/source/core/layout/laycache.cxx
@@ -959,17 +959,17 @@ void SwLayHelper::_CheckFlyCache( SwPageFrm* pPage )
         // relative ordnums for the objects on this page.
 
         // skip fly frames from pages before the current page
-        SwFlyCache* pFlyC;
-        while( nFlyIdx < nFlyCount && ( pFlyC = pImpl->
-               GetFlyCache(nFlyIdx) )->nPageNum < nPgNum)
+        while( nFlyIdx < nFlyCount &&
+               pImpl->GetFlyCache(nFlyIdx)->nPageNum < nPgNum )
             ++nFlyIdx;
 
         // sort cached objects on this page by ordnum
         std::set< const SwFlyCache*, FlyCacheCompare > aFlyCacheSet;
         sal_uInt16 nIdx = nFlyIdx;
 
-        while( nIdx < nFlyCount && ( pFlyC = pImpl->
-               GetFlyCache( nIdx ) )->nPageNum == nPgNum )
+        SwFlyCache* pFlyC;
+        while( nIdx < nFlyCount &&
+               ( pFlyC = pImpl->GetFlyCache( nIdx ) )->nPageNum == nPgNum )
         {
             aFlyCacheSet.insert( pFlyC );
             ++nIdx;
commit e4fcf23f3ddae7d0ee1f0e3e20f472c65f568487
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Feb 7 14:31:44 2014 +0200

    coverity#708856 unused pointer value
    
    Change-Id: I9f093e10d222b500079c5b38ea673e9d014b6870

diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index b1f0c96..3971506 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -1751,7 +1751,7 @@ static bool lcl_NoPrev( const SwFrm& rFrm )
     {
         const SwFrm* pSct = rFrm.GetUpper();
         if ( pSct && pSct->IsColBodyFrm() &&
-            (pSct = pSct->GetUpper()->GetUpper())->IsSctFrm() )
+             pSct->GetUpper()->GetUpper()->IsSctFrm() )
         {
             const SwFrm* pPrevCol = rFrm.GetUpper()->GetUpper()->GetPrev();
             if ( pPrevCol )
commit 972f3a812d56abdc171066feaaa9ffa40ce75c3e
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Feb 7 14:26:28 2014 +0200

    coverity#708872 unused pointer value
    
    Change-Id: I8f8598051b1dcb97050831787c7ea9ea3ae85143

diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 3da8df6..69a7d82 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -1015,9 +1015,9 @@ SwFrmFmt* SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj,
                         WW8SprmIter aSprmIter(aDesc.pMemPos, aDesc.nSprmsLen,
                             *mpSprmParser);
 
-                        const sal_uInt8* pParams = aSprmIter.GetAktParams();
                         for( int nLoop = 0; nLoop < 2; ++nLoop )
                         {
+                            const sal_uInt8* pParams;
                             while( aSprmIter.GetSprms()
                                 && (0 != (pParams = aSprmIter.GetAktParams())) )
                             {
commit ea05b89697eaa3c7edcf5edb21cdb53b77e8d351
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Feb 7 14:24:50 2014 +0200

    coverity#708873 unused pointer value
    
    Change-Id: Ib3039e4bbe355a3136730a6dbf9bf516be2c3f62

diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 585f9bd..898afc3 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -1802,10 +1802,10 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
         pPap->GetSprms( &aDesc );
         WW8SprmIter aSprmIter(aDesc.pMemPos, aDesc.nSprmsLen, aSprmParser);
 
-        const sal_uInt8* pParams = aSprmIter.GetAktParams();
         for (int nLoop = 0; nLoop < 2; ++nLoop)
         {
             bool bRepeatedSprm = false;
+            const sal_uInt8* pParams;
             while (aSprmIter.GetSprms() && 0 != (pParams = aSprmIter.GetAktParams()))
             {
                 sal_uInt16 nId = aSprmIter.GetAktId();
@@ -1974,7 +1974,7 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
         }
 
         //Are we still in a table cell
-        pParams = HasTabCellSprm(pPap, bOldVer);
+        const sal_uInt8* pParams = HasTabCellSprm(pPap, bOldVer);
         const sal_uInt8 *pLevel = pPap->HasSprm(0x6649);
         // InTable
         if (!pParams || (1 != *pParams) ||


More information about the Libreoffice-commits mailing list