[Libreoffice-commits] core.git: 8 commits - sc/source sd/source sw/source

Noel Grandin noel at peralex.com
Wed Feb 19 08:44:10 CET 2014


 sc/source/ui/vba/vbarange.cxx     |    2 +-
 sc/source/ui/view/cellsh1.cxx     |    2 --
 sc/source/ui/view/viewfun3.cxx    |    4 ++--
 sd/source/core/drawdoc3.cxx       |    2 +-
 sd/source/ui/app/sdxfer.cxx       |    2 +-
 sw/source/core/fields/docufld.cxx |    2 +-
 sw/source/filter/ww8/ww8graf.cxx  |    2 +-
 7 files changed, 7 insertions(+), 9 deletions(-)

New commits:
commit c1c7eeb4859bd436e711a0225ca1247fc1863110
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Feb 18 11:43:55 2014 +0200

    cid#736857 Dereference before null check
    
    Change-Id: I805e0873a51bcfe291647550992480e8cc8a03d6

diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 81d62dc..2788732 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -2032,7 +2032,7 @@ SwWW8ImplReader::SetAttributesAtGrfNode(SvxMSDffImportRec const*const pRecord,
             pGrfNd->SetAttr( aCrop );
         }
 
-        if (pRecord && pRecord->pObj)
+        if (pRecord->pObj)
         {
             const SfxItemSet& rOldSet = pRecord->pObj->GetMergedItemSet();
             //contrast
commit 1f6449fdeb95d27e3e4d9efb8076cbd12ee18964
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Feb 18 11:41:52 2014 +0200

    cid#736845 Dereference before null check
    
    Change-Id: Ied41eb5cad029200fd868eaaa129d8f052f3c436

diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index c66d143..5e6016c 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -2311,7 +2311,7 @@ void SwRefPageGetField::ChangeExpansion( const SwFrm* pFrm,
     const SwRefPageSetField* pSetFld =
                         (SwRefPageSetField*)pRefTxtFld->GetFmtFld().GetField();
     Point aPt;
-    const SwCntntFrm* pRefFrm = pRefTxtFld ? pRefTxtFld->GetTxtNode().getLayoutFrm( pFrm->getRootFrm(), &aPt, 0, sal_False ) : 0;
+    const SwCntntFrm* pRefFrm = pRefTxtFld->GetTxtNode().getLayoutFrm( pFrm->getRootFrm(), &aPt, 0, sal_False );
     if( pSetFld->IsOn() && pRefFrm )
     {
         // determine the correct offset
commit 814f6e4f199f7e900bfd0f8b4ccb2da963a93ce4
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Feb 18 11:29:07 2014 +0200

    cid#736800 dereference before null check
    
    Change-Id: I51eb6331d74c1484cf12a2a1810485dd8b927a32

diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx
index addf661..359da9f 100644
--- a/sd/source/ui/app/sdxfer.cxx
+++ b/sd/source/ui/app/sdxfer.cxx
@@ -695,7 +695,7 @@ void SdTransferable::SetPageBookmarks( const std::vector<OUString> &rPageBookmar
             maPageBookmarks = rPageBookmarks;
         }
 
-        if( mpSdViewIntern && mpSdDrawDocument )
+        if( mpSdViewIntern )
         {
             SdPage* pPage = mpSdDrawDocument->GetSdPage( 0, PK_STANDARD );
 
commit 14829a84ff4f77091767cf4503db0c8a6624f036
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Feb 18 11:17:41 2014 +0200

    cid#736797 dereference before null check
    
    Change-Id: Ib279f66fcc349c75d7b3d26ba80356eea1697295

diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index 6735414..caab663 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -808,7 +808,7 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage(
         sal_uInt16 nSdPageStart = (nInsertPos - 1) / 2;
         sal_uInt16 nSdPageEnd = GetSdPageCount(PK_STANDARD) - nSdPageCount +
                             nSdPageStart - 1;
-        const bool bRemoveEmptyPresObj = pBookmarkDoc &&
+        const bool bRemoveEmptyPresObj =
                 (pBookmarkDoc->GetDocumentType() == DOCUMENT_TYPE_IMPRESS) &&
                 (GetDocumentType() == DOCUMENT_TYPE_DRAW);
 
commit adefb376c68692d0063b75e5946565e71c7cfcce
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Feb 18 11:01:18 2014 +0200

    cid#736794 dereference before null check
    
    Change-Id: Ic7838b753757fd86fc2316475d38cbd3b4529de5

diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index e77b304..5b915c7 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -1383,7 +1383,7 @@ bool ScViewFunc::PasteFromClip( sal_uInt16 nFlags, ScDocument* pClipDoc,
 
     if ( nFlags & IDF_OBJECTS )
     {
-        ScModelObj* pModelObj = ( pDocSh ? ScModelObj::getImplementation( pDocSh->GetModel() ) : NULL );
+        ScModelObj* pModelObj = ScModelObj::getImplementation( pDocSh->GetModel() );
         if ( pPage && pModelObj )
         {
             bool bSameDoc = ( rClipParam.getSourceDocID() == pDoc->GetDocumentID() );
commit 5a3290af0b4d0390190bbb00312824c0b9495cec
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Feb 18 10:59:46 2014 +0200

    cid#736793 dereference before null check
    
    Change-Id: I389b758cb2ec0ab71706e165d0d382dd08396c3b

diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 20f12c4..e77b304 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -1384,7 +1384,7 @@ bool ScViewFunc::PasteFromClip( sal_uInt16 nFlags, ScDocument* pClipDoc,
     if ( nFlags & IDF_OBJECTS )
     {
         ScModelObj* pModelObj = ( pDocSh ? ScModelObj::getImplementation( pDocSh->GetModel() ) : NULL );
-        if ( pDoc && pPage && pModelObj )
+        if ( pPage && pModelObj )
         {
             bool bSameDoc = ( rClipParam.getSourceDocID() == pDoc->GetDocumentID() );
             const ScRangeListVector& rProtectedChartRangesVector( rClipParam.maProtectedChartRangesVector );
commit de2270ffc13239b41bb21ccb266181b42e82be71
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Feb 18 10:56:36 2014 +0200

    cid#736791 dereference before null check
    
    Change-Id: Ied773c6d4feaf75c04a4e1f2abda14b4cba38e2c

diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 513828d..f11be50 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2720,8 +2720,6 @@ void ScCellShell::ExecuteSubtotals(SfxRequest& rReq)
         pDBData->GetArea(aDataRange);
         pTabViewShell->MarkRange(aDataRange, false);
     }
-    if (!pDBData)
-        return;
 
     pDBData->GetSubTotalParam( aSubTotalParam );
     aSubTotalParam.bRemoveOnly = false;
commit 6c294a62942c3fd9b4d5ee131fcf37acd69fc056
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Feb 17 15:42:01 2014 +0200

    cid#736790 dereference before null check
    
    Change-Id: Ic35477fdccd33199dbb826caa21ada8e9b934c37

diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index ab0c63e..45163a2 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -1206,7 +1206,7 @@ bool getScRangeListForAddress( const OUString& sName, ScDocShell* pDocSh, ScRang
         // if a local name ( on the active sheet ) exists this will
         // take precedence over a global with the same name
         bool bLocalName = false;
-        if ( !xNameAccess->hasByName( sAddress ) && pDocSh )
+        if ( !xNameAccess->hasByName( sAddress ) )
         {
             // try a local name
             ScDocument* pDoc = pDocSh->GetDocument();


More information about the Libreoffice-commits mailing list