[Libreoffice-commits] core.git: 24 commits - filter/source framework/source lotuswordpro/source sc/source sd/source sfx2/source svx/source sw/source
Noel Grandin
noel at peralex.com
Mon Feb 17 13:06:32 CET 2014
filter/source/pdf/impdialog.cxx | 4
framework/source/uielement/toolbarmanager.cxx | 2
lotuswordpro/source/filter/lwptablelayout.cxx | 7 -
sc/source/core/data/documen2.cxx | 2
sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx | 13 +-
sd/source/ui/view/drviews6.cxx | 2
sfx2/source/control/bindings.cxx | 2
svx/source/table/svdotable.cxx | 2
svx/source/unodraw/UnoNamespaceMap.cxx | 2
sw/source/core/access/accmap.cxx | 2
sw/source/core/access/acctextframe.cxx | 23 ++---
sw/source/core/access/acctextframe.hxx | 2
sw/source/core/doc/docfmt.cxx | 2
sw/source/core/doc/poolfmt.cxx | 50 +++--------
sw/source/core/layout/hffrm.cxx | 2
sw/source/core/layout/paintfrm.cxx | 2
sw/source/core/unocore/unochart.cxx | 5 -
sw/source/filter/ww8/ww8graf.cxx | 2
sw/source/ui/app/docsh.cxx | 7 -
sw/source/ui/dbui/selectdbtabledialog.cxx | 2
sw/source/ui/misc/redlndlg.cxx | 3
sw/source/ui/shells/basesh.cxx | 3
sw/source/ui/uno/unotxdoc.cxx | 4
23 files changed, 58 insertions(+), 87 deletions(-)
New commits:
commit 0beb64bfcdd02c17938396448f861b9fb55f20a3
Author: Noel Grandin <noel at peralex.com>
Date: Mon Feb 17 11:41:34 2014 +0200
cid#736789 dereference before null check
Change-Id: I657880e7ed37f9933efcfc110daae8b4c4791497
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index 8083bfc..6145fcf 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -1171,15 +1171,12 @@ SdrPage* ScShapeChildren::GetDrawPage() const
{
SCTAB nTab( mpViewShell->GetLocationData().GetPrintTab() );
SdrPage* pDrawPage = NULL;
- if (mpViewShell)
+ ScDocument* pDoc = mpViewShell->GetDocument();
+ if (pDoc && pDoc->GetDrawLayer())
{
- ScDocument* pDoc = mpViewShell->GetDocument();
- if (pDoc && pDoc->GetDrawLayer())
- {
- ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
- if (pDrawLayer->HasObjects() && (pDrawLayer->GetPageCount() > nTab))
- pDrawPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(static_cast<sal_Int16>(nTab)));
- }
+ ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
+ if (pDrawLayer->HasObjects() && (pDrawLayer->GetPageCount() > nTab))
+ pDrawPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(static_cast<sal_Int16>(nTab)));
}
return pDrawPage;
}
commit 4d15e903bf7d49a2bb2fa532037eb84429012a42
Author: Noel Grandin <noel at peralex.com>
Date: Mon Feb 17 11:37:23 2014 +0200
cid#736786 dereference before null check
Change-Id: I9cf201148c7cf90e95c88b7bf53e07f1ada9e229
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index e1f6ab5..2997993 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -1029,7 +1029,7 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
if ( bVbaEnabled )
{
- SfxObjectShell* pSrcShell = pSrcDoc ? pSrcDoc->GetDocumentShell() : NULL;
+ SfxObjectShell* pSrcShell = pSrcDoc->GetDocumentShell();
if ( pSrcShell )
{
OUString aLibName("Standard");
commit 796b51a763d956e58e38af5643854ba3b49bc76a
Author: Noel Grandin <noel at peralex.com>
Date: Mon Feb 17 11:34:58 2014 +0200
cid#736782 dereference before null check
and reduce scope of some variables
Change-Id: I1aada9af15090ff2083354ea9b265b9e3d4e5c02
diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx b/lotuswordpro/source/filter/lwptablelayout.cxx
index b8193b4..209c2ac 100644
--- a/lotuswordpro/source/filter/lwptablelayout.cxx
+++ b/lotuswordpro/source/filter/lwptablelayout.cxx
@@ -1184,7 +1184,6 @@ void LwpTableLayout::PostProcessParagraph(XFCell *pCell, sal_uInt16 nRowID, sal_
pXFPara = static_cast<XFParagraph*>(pCell->FindFirstContent(enumXFContentPara));
if (!pXFPara)
return;
- XFColor aColor;
XFColor aNullColor = XFColor();
if ( pXFPara)
@@ -1196,8 +1195,8 @@ void LwpTableLayout::PostProcessParagraph(XFCell *pCell, sal_uInt16 nRowID, sal_
if (!sNumfmt.isEmpty())
{
pNumStyle = (XFNumberStyle*)pXFStyleManager->FindStyle( sNumfmt);
- aColor = pNumStyle->GetColor();
- if ( pNumStyle && aColor != aNullColor )
+ XFColor aColor = pNumStyle->GetColor();
+ if ( aColor != aNullColor )
bColorMod = sal_True;//end
}
@@ -1213,7 +1212,7 @@ void LwpTableLayout::PostProcessParagraph(XFCell *pCell, sal_uInt16 nRowID, sal_
if (bColorMod)
{
XFFont* pFont = pOverStyle->GetFont();
- aColor = pFont->GetColor();
+ XFColor aColor = pFont->GetColor();
if ( aColor == aNullColor )
{
XFFont* pNewFont = new XFFont;
commit 2b3b3373eb13e12204180d634de5063add6b4f8e
Author: Noel Grandin <noel at peralex.com>
Date: Mon Feb 17 11:26:15 2014 +0200
cid#736778 dereference before null check
Change-Id: I2d26b5447e06e0b0d08e45452ef5507b75a4d3ff
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 49bb973..f4a599a 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -926,7 +926,7 @@ void ToolBarManager::CreateControllers()
if (( aCommandURL == aLoadURL ) && ( !m_pToolBar->IsItemVisible(nId)))
bCreate = sal_False;
- if ( !xController.is() && m_pToolBar && bCreate )
+ if ( !xController.is() && bCreate )
{
pController = CreateToolBoxController( m_xFrame, m_pToolBar, nId, aCommandURL );
if ( !pController )
commit d22d2fb1dee46973d8608dd935d476bce2c2ad82
Author: Noel Grandin <noel at peralex.com>
Date: Mon Feb 17 11:24:01 2014 +0200
cid#736777 dereference before null check
Change-Id: I40faf8a98d6e71361f952c61a8c8d6b5e25c41be
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 71b9bb9..17e03cb 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -1194,7 +1194,7 @@ void ImpPDFTabSecurityPage::SetFilterConfigItem( const ImpPDFTabDialog* paParen
// set the status of this windows, according to the PDFA selection
enablePermissionControls();
- ImpPDFTabGeneralPage* pGeneralPage = paParent ? paParent->getGeneralPage() : NULL;
+ ImpPDFTabGeneralPage* pGeneralPage = paParent->getGeneralPage();
if (pGeneralPage)
ImplPDFASecurityControl(!pGeneralPage->IsPdfaSelected());
commit 939e23d18d8060a155bd9b3a38b66b0d20b8c034
Author: Noel Grandin <noel at peralex.com>
Date: Fri Feb 14 15:20:36 2014 +0200
cid#705877 dereference before null check
Change-Id: I78d51802fa5709d1aaccb3a73929b39bf75b4219
diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx
index b013128..723bb2d 100644
--- a/sd/source/ui/view/drviews6.cxx
+++ b/sd/source/ui/view/drviews6.cxx
@@ -72,7 +72,7 @@ void DrawViewShell::ExecFormText(SfxRequest& rReq)
const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
if ( rMarkList.GetMarkCount() == 1 && rReq.GetArgs() &&
- mpDrawView && !mpDrawView->IsPresObjSelected() )
+ !mpDrawView->IsPresObjSelected() )
{
const SfxItemSet& rSet = *rReq.GetArgs();
commit 4f430d7a925b8e3bdd24c284e398628e2b929098
Author: Noel Grandin <noel at peralex.com>
Date: Fri Feb 14 15:18:52 2014 +0200
cid#705884 dereference before null check
Change-Id: I55258bb30034b95f53134a9747088fc488796564
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index a441dfa..a847477 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -1126,7 +1126,7 @@ const SfxPoolItem* SfxBindings::Execute_Impl( sal_uInt16 nId, const SfxPoolItem*
pCache->GetSlotServer( rDispatcher, pImp->xProv );
}
- if ( pCache && pCache->GetDispatch().is() )
+ if ( pCache->GetDispatch().is() )
{
DBG_ASSERT( !ppInternalArgs, "Internal args get lost when dispatched!" );
commit a02ec9ebef8608c4f69e8e674a894d09add68dba
Author: Noel Grandin <noel at peralex.com>
Date: Fri Feb 14 15:16:47 2014 +0200
cid#705907 dereference before null check
Change-Id: I51f0331830fc6d6eaae1ca33c7387e76390ec1cb
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index f667c0b..3db8206 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -2187,7 +2187,7 @@ void SdrTableObj::AddToHdlList(SdrHdlList& rHdlList) const
}
// now add visible edges to row and column handles
- if( mpImpl && mpImpl->mpLayouter )
+ if( mpImpl->mpLayouter )
{
TableLayouter& rLayouter = *mpImpl->mpLayouter;
commit c31644d4953ab57b65daafaed090fab89b8ff267
Author: Noel Grandin <noel at peralex.com>
Date: Fri Feb 14 15:14:33 2014 +0200
cid#705910 dereference before null check
Change-Id: Ide631270e603c2efa258aa443c1c4ed9cc1c5cbe
diff --git a/svx/source/unodraw/UnoNamespaceMap.cxx b/svx/source/unodraw/UnoNamespaceMap.cxx
index 361596d..65c0315 100644
--- a/svx/source/unodraw/UnoNamespaceMap.cxx
+++ b/svx/source/unodraw/UnoNamespaceMap.cxx
@@ -158,7 +158,7 @@ sal_Bool NamespaceIteratorImpl::next( OUString& rPrefix, OUString& rURL )
if( 0 != *mpWhichId )
{
mnItem = 0;
- mnItemCount = (mpWhichId && (0 != *mpWhichId) && mpPool) ? mpPool->GetItemCount2( *mpWhichId ) : 0;
+ mnItemCount = mpPool ? mpPool->GetItemCount2( *mpWhichId ) : 0;
return next( rPrefix, rURL );
}
commit d232910d0234a9d2b4755b3e5a8c30f3e67c2322
Author: Noel Grandin <noel at peralex.com>
Date: Fri Feb 14 15:01:37 2014 +0200
cid#705912 dereference before null check
Change-Id: Ica32fb0af274f69f5aa716e271d0537c134aec6b
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 0b40ef6..f08569d 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -1886,7 +1886,7 @@ uno::Reference< XAccessible> SwAccessibleMap::GetContext( const SwFrm *pFrm,
pAcc = new SwAccessibleEmbeddedObject( this, pFlyFrm );
break;
default:
- pAcc = new SwAccessibleTextFrame( this, pFlyFrm );
+ pAcc = new SwAccessibleTextFrame( this, *pFlyFrm );
break;
}
}
diff --git a/sw/source/core/access/acctextframe.cxx b/sw/source/core/access/acctextframe.cxx
index 53befa8..4cd0fc6 100644
--- a/sw/source/core/access/acctextframe.cxx
+++ b/sw/source/core/access/acctextframe.cxx
@@ -46,23 +46,20 @@ using ::com::sun::star::accessibility::XAccessibleContext;
SwAccessibleTextFrame::SwAccessibleTextFrame(
SwAccessibleMap* pInitMap,
- const SwFlyFrm* pFlyFrm ) :
- SwAccessibleFrameBase( pInitMap, AccessibleRole::TEXT_FRAME, pFlyFrm ),
+ const SwFlyFrm& rFlyFrm ) :
+ SwAccessibleFrameBase( pInitMap, AccessibleRole::TEXT_FRAME, &rFlyFrm ),
msTitle(),
msDesc()
{
- if ( pFlyFrm )
- {
- const SwFlyFrmFmt* pFlyFrmFmt =
- dynamic_cast<const SwFlyFrmFmt*>( pFlyFrm->GetFmt() );
- msTitle = pFlyFrmFmt->GetObjTitle();
+ const SwFlyFrmFmt* pFlyFrmFmt =
+ dynamic_cast<const SwFlyFrmFmt*>( rFlyFrm.GetFmt() );
+ msTitle = pFlyFrmFmt->GetObjTitle();
- msDesc = pFlyFrmFmt->GetObjDescription();
- if ( msDesc.isEmpty() &&
- msTitle != GetName() )
- {
- msDesc = msTitle;
- }
+ msDesc = pFlyFrmFmt->GetObjDescription();
+ if ( msDesc.isEmpty() &&
+ msTitle != GetName() )
+ {
+ msDesc = msTitle;
}
}
diff --git a/sw/source/core/access/acctextframe.hxx b/sw/source/core/access/acctextframe.hxx
index 6db706c..297c2aa 100644
--- a/sw/source/core/access/acctextframe.hxx
+++ b/sw/source/core/access/acctextframe.hxx
@@ -43,7 +43,7 @@ protected:
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
public:
- SwAccessibleTextFrame( SwAccessibleMap* pInitMap, const SwFlyFrm* pFlyFrm );
+ SwAccessibleTextFrame( SwAccessibleMap* pInitMap, const SwFlyFrm& rFlyFrm );
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
::com::sun::star::uno::Type const & rType )
commit 24a1e29d6c0a5196da72f7eda31596ef34a0b5f8
Author: Noel Grandin <noel at peralex.com>
Date: Fri Feb 14 14:24:11 2014 +0200
cid#705915 dereference before null check
Change-Id: I1bd65e4beb99ff816be958d8ee345ee9937f6488
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index 8040a84..3e67f03 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -1695,7 +1695,7 @@ static bool lcl_SetTxtFmtColl( const SwNodePtr& rpNode, void* pArgs )
SwTxtFmtColl* pFmt = static_cast<SwTxtFmtColl*>(pPara->pFmtColl);
if ( pPara->bReset )
{
- if( pFmt->GetAttrOutlineLevel() == 0 && pPara )
+ if( pFmt->GetAttrOutlineLevel() == 0 )
pPara->bKeepOutlineLevelAttr = true;
lcl_RstAttr( pCNd, pPara );
commit 2e6ba083bf188478c7033bcf5831727c0d97b3d5
Author: Noel Grandin <noel at peralex.com>
Date: Fri Feb 14 14:21:10 2014 +0200
cid#705917 dereference before null check
Change-Id: Ibceeb719ddd0967fc4b8776dd29da88db89302d6
diff --git a/sw/source/core/doc/poolfmt.cxx b/sw/source/core/doc/poolfmt.cxx
index 8ea3789..736abcb 100644
--- a/sw/source/core/doc/poolfmt.cxx
+++ b/sw/source/core/doc/poolfmt.cxx
@@ -1509,8 +1509,7 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
{
aSet.Put( aLR );
aSet.Put( aUL );
- if( pNewPgDsc )
- pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL | nsUseOnPage::PD_FIRSTSHARE );
+ pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL | nsUseOnPage::PD_FIRSTSHARE );
}
break;
@@ -1520,12 +1519,9 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
lcl_PutStdPageSizeIntoItemSet( this, aSet );
aSet.Put( aLR );
aSet.Put( aUL );
- if( pNewPgDsc )
- {
- pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL );
- if( RES_POOLPAGE_FIRST == nId )
- pNewPgDsc->SetFollow( GetPageDescFromPool( RES_POOLPAGE_STANDARD ));
- }
+ pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL );
+ if( RES_POOLPAGE_FIRST == nId )
+ pNewPgDsc->SetFollow( GetPageDescFromPool( RES_POOLPAGE_STANDARD ));
}
break;
@@ -1535,13 +1531,10 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
aSet.Put( aLR );
aSet.Put( aUL );
bSetLeft = false;
- if( pNewPgDsc )
- {
- pNewPgDsc->SetUseOn( nsUseOnPage::PD_LEFT );
- // this relies on GetPageDescFromPool() not going into infinite recursion
- // (by this point RES_POOLPAGE_LEFT will not reach this place again)
- pNewPgDsc->SetFollow( GetPageDescFromPool( RES_POOLPAGE_RIGHT ));
- }
+ pNewPgDsc->SetUseOn( nsUseOnPage::PD_LEFT );
+ // this relies on GetPageDescFromPool() not going into infinite recursion
+ // (by this point RES_POOLPAGE_LEFT will not reach this place again)
+ pNewPgDsc->SetFollow( GetPageDescFromPool( RES_POOLPAGE_RIGHT ));
}
break;
case RES_POOLPAGE_RIGHT: // "Right Page"
@@ -1550,11 +1543,8 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
aSet.Put( aLR );
aSet.Put( aUL );
bSetLeft = false;
- if( pNewPgDsc )
- {
- pNewPgDsc->SetUseOn( nsUseOnPage::PD_RIGHT );
- pNewPgDsc->SetFollow( GetPageDescFromPool( RES_POOLPAGE_LEFT ));
- }
+ pNewPgDsc->SetUseOn( nsUseOnPage::PD_RIGHT );
+ pNewPgDsc->SetFollow( GetPageDescFromPool( RES_POOLPAGE_LEFT ));
}
break;
@@ -1568,11 +1558,8 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
aSet.Put( aLR );
aSet.Put( aUL );
- if( pNewPgDsc )
- {
- pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL );
- pNewPgDsc->SetLandscape( sal_True );
- }
+ pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL );
+ pNewPgDsc->SetLandscape( sal_True );
}
break;
@@ -1585,8 +1572,7 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
aSet.Put( aLR );
aSet.Put( aUL );
- if( pNewPgDsc )
- pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL );
+ pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL );
}
break;
@@ -1596,8 +1582,7 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
lcl_PutStdPageSizeIntoItemSet( this, aSet );
aSet.Put( aLR );
aSet.Put( aUL );
- if( pNewPgDsc )
- pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL );
+ pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL );
SwPageFtnInfo aInf( pNewPgDsc->GetFtnInfo() );
aInf.SetLineWidth( 0 );
aInf.SetTopDist( 0 );
@@ -1619,11 +1604,8 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
aSet.Put( aFrmSz );
aSet.Put( aLR );
aSet.Put( aUL );
- if( pNewPgDsc )
- {
- pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL );
- pNewPgDsc->SetLandscape( sal_True );
- }
+ pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL );
+ pNewPgDsc->SetLandscape( sal_True );
}
break;
commit 7881de6d9f8b9d9d42d0032099ab75542cd8cec6
Author: Noel Grandin <noel at peralex.com>
Date: Fri Feb 14 13:52:06 2014 +0200
cid#705924 dereference before null check
Change-Id: I5f3256351ea806e902477d2ccd5cc9dfbc18fdb1
diff --git a/sw/source/core/layout/hffrm.cxx b/sw/source/core/layout/hffrm.cxx
index b8b95a4..116650f 100644
--- a/sw/source/core/layout/hffrm.cxx
+++ b/sw/source/core/layout/hffrm.cxx
@@ -741,7 +741,7 @@ void SwPageFrm::PrepareFooter()
if ( GetUpper() )
::RegistFlys( this, pF );
}
- else if ( pLay && pLay->IsFooterFrm() )
+ else if ( pLay->IsFooterFrm() )
{ // Remove footer if already present
::DelFlys( pLay, this );
SwViewShell *pShell;
commit e5810bb2bb7f6a28fe95189edd939a3bbccee842
Author: Noel Grandin <noel at peralex.com>
Date: Fri Feb 14 13:50:02 2014 +0200
cid#705925 dereference before null check
Change-Id: Ib4369e00f4d6ce2beca9e2ec51e3fb52677d2fe6
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 777a1d4..3d6aa4f 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -2822,7 +2822,7 @@ void SwTabFrmPainter::Insert( SwLineEntry& rNew, bool bHori )
}
SwLineEntrySetIter aIter = pLineSet->begin();
- while ( pLineSet && aIter != pLineSet->end() && rNew.mnStartPos < rNew.mnEndPos )
+ while ( aIter != pLineSet->end() && rNew.mnStartPos < rNew.mnEndPos )
{
const SwLineEntry& rOld = *aIter;
const SwLineEntry::OverlapType nOverlapType = rOld.Overlaps( rNew );
commit ec40733b5f5715a566dcbc2d79339edbc304b2f0
Author: Noel Grandin <noel at peralex.com>
Date: Fri Feb 14 13:33:14 2014 +0200
cid#705932 dereference before null check
Change-Id: I29f407effb4381e3f8505e487b2a4e9d7bd6828e
diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx
index b964cc9..fc4df47 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -397,11 +397,10 @@ static void GetFormatAndCreateCursorFromRangeRep(
// is the correct table format already provided?
if (*ppTblFmt != NULL && (*ppTblFmt)->GetName() == aTblName)
pTblFmt = *ppTblFmt;
- else if (ppTblFmt)
+ else
GetTableByName( *pDoc, aTblName, &pTblFmt, NULL );
- if (ppTblFmt)
- *ppTblFmt = pTblFmt;
+ *ppTblFmt = pTblFmt;
if (ppUnoCrsr != NULL)
{
commit 64e40e166f07e58b3f19f62ff674933e57500aae
Author: Noel Grandin <noel at peralex.com>
Date: Fri Feb 14 13:31:07 2014 +0200
cid#705937 dereference before null check
Change-Id: I844583f704afde8d563e3947cb6fabeb7fe83bdf
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 69a7d82..81d62dc 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -3065,7 +3065,7 @@ void SwWW8ImplReader::GrafikCtor() // Fuer SVDraw und VCControls und Escher
pFormImpl = new SwMSConvertControls(mpDocShell, pPaM);
pWWZOrder = new wwZOrderer(sw::util::SetLayer(rDoc), pDrawPg,
- pMSDffManager ? pMSDffManager->GetShapeOrders() : 0);
+ pMSDffManager->GetShapeOrders());
}
}
commit 24057a7823c15bac4ec5f4229c20cf61f660c6a0
Author: Noel Grandin <noel at peralex.com>
Date: Fri Feb 14 13:24:54 2014 +0200
cid#705944 dereference before null check
Change-Id: If6e70f97ec1862dfda01f55ecac06b4b2492d9ec
diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index c5e99d4..e6294d3 100644
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -269,8 +269,7 @@ sal_Bool SwDocShell::ConvertFrom( SfxMedium& rMedium )
// Maybe put away one old Doc
if ( pDoc != pRdr->GetDoc() )
{
- if( pDoc )
- RemoveLink();
+ RemoveLink();
pDoc = pRdr->GetDoc();
AddLink();
commit 40dcb18c5fe6dc9e7f904e5919e23869bbff1ac0
Author: Noel Grandin <noel at peralex.com>
Date: Fri Feb 14 13:23:16 2014 +0200
cid#705945 dereference before null check
Change-Id: Iff5c84f8c01b21645a529e299856505e90f86679
diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index cbdd920..c5e99d4 100644
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -431,7 +431,7 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
CalcLayoutForOLEObjects(); // format for OLE objets
// #i62875#
// reset compatibility flag <DoNotCaptureDrawObjsOnPage>, if possible
- if ( pWrtShell && pDoc &&
+ if ( pWrtShell &&
pDoc->get(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE) &&
docfunc::AllDrawObjsOnPage( *pDoc ) )
{
commit d12f6c6f3c3f89442876c98e3d7a7d50901d36cb
Author: Noel Grandin <noel at peralex.com>
Date: Fri Feb 14 13:18:35 2014 +0200
cid#705946 dereference before null check
Change-Id: Icd2899ffa289189e753a22c40d6556f57266dcdb
diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index 1f60704..cbdd920 100644
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -608,7 +608,7 @@ sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium )
CalcLayoutForOLEObjects(); // format for OLE objets
// #i62875#
// reset compatibility flag <DoNotCaptureDrawObjsOnPage>, if possible
- if ( pWrtShell && pDoc &&
+ if ( pWrtShell &&
pDoc->get(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE) &&
docfunc::AllDrawObjsOnPage( *pDoc ) )
{
commit b008100d42913a23a631aa474904d9b3db03797e
Author: Noel Grandin <noel at peralex.com>
Date: Fri Feb 14 13:16:32 2014 +0200
cid#705949 dereference before null check
Change-Id: Ia240bc89011e5e23eb6461ba1cac212036df545c
diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx
index 927533e8..0ea22ff 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.cxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.cxx
@@ -171,7 +171,7 @@ OUString SwSelectDBTableDialog::GetSelectedTable(bool& bIsTable)
{
SvTreeListEntry* pEntry = m_aTableLB.FirstSelected();
bIsTable = pEntry->GetUserData() ? false : true;
- return pEntry ? m_aTableLB.GetEntryText(pEntry, 0) : OUString();
+ return m_aTableLB.GetEntryText(pEntry, 0);
}
void SwSelectDBTableDialog::SetSelectedTable(const OUString& rTable, bool bIsTable)
commit 10ca3906500732085a3b055cb8a72bf13de5cae4
Author: Noel Grandin <noel at peralex.com>
Date: Fri Feb 14 12:47:10 2014 +0200
cid#705954 dereference before null check
Change-Id: I87ea36fc21b0595b6e4d7b94d89c03e3124dd736
diff --git a/sw/source/ui/misc/redlndlg.cxx b/sw/source/ui/misc/redlndlg.cxx
index 6f863f4..c263865 100644
--- a/sw/source/ui/misc/redlndlg.cxx
+++ b/sw/source/ui/misc/redlndlg.cxx
@@ -413,8 +413,7 @@ void SwRedlineAcceptDlg::Activate()
return;
continue;
}
- if (pBackupData)
- pBackupData = pBackupData->pNext;
+ pBackupData = pBackupData->pNext;
pRedlineData = pRedlineData->Next();
}
}
commit 28ac14c05bb6da292d287f8800929731121004f6
Author: Noel Grandin <noel at peralex.com>
Date: Fri Feb 14 12:44:45 2014 +0200
cid#705957 dereference before null check
Change-Id: I8beffc4b7c877894699cc32ce1d05ba310e48ad1
diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx
index ebc90e1..cab5e14 100644
--- a/sw/source/ui/shells/basesh.cxx
+++ b/sw/source/ui/shells/basesh.cxx
@@ -1880,8 +1880,7 @@ void SwBaseShell::SetFrmMode(FlyMode eMode, SwWrtShell *pSh )
eFrameMode = eMode;
SfxBindings &rBnd = pSh->GetView().GetViewFrame()->GetBindings();
- if( eMode == FLY_DRAG ||
- (pSh && (pSh->IsFrmSelected() || pSh->IsObjSelected())) )
+ if( eMode == FLY_DRAG || pSh->IsFrmSelected() || pSh->IsObjSelected() )
{
const SfxPointItem aTmp1( SID_ATTR_POSITION, pSh->GetAnchorObjDiff());
const SvxSizeItem aTmp2( SID_ATTR_SIZE, pSh->GetObjSize());
commit 112554741039eda3fbeef3f89b22c348b3718655
Author: Noel Grandin <noel at peralex.com>
Date: Fri Feb 14 12:41:29 2014 +0200
cid#705962 dereference before null check
Change-Id: Id31913ea90c32f869677a54d522a8bc089c7290c
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index 9e3ca6b..f6af086 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -3046,10 +3046,10 @@ void SAL_CALL SwXTextDocument::render(
{
// #i96167# haggai: delete ViewOptionsAdjust here because it makes use
// of the shell, which might get destroyed in lcl_DisposeView!
- if (m_pRenderData && m_pRenderData->IsViewOptionAdjust())
+ if (m_pRenderData->IsViewOptionAdjust())
m_pRenderData->ViewOptionAdjustStop();
- if (m_pRenderData && m_pRenderData->HasPostItData())
+ if (m_pRenderData->HasPostItData())
m_pRenderData->DeletePostItData();
if (m_pHiddenViewFrame)
{
commit 29e1d1988e286e0dff39994d41f8e6bda6d81ed4
Author: Noel Grandin <noel at peralex.com>
Date: Fri Feb 14 12:39:10 2014 +0200
cid#736775 dereference before null check
Change-Id: I3539146b3ab126c939e5805e5bb4e013d9f93857
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 03e3057..71b9bb9 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -1343,7 +1343,7 @@ void ImpPDFTabLinksPage::GetFilterConfigItem( ImpPDFTabDialog* paParent )
paParent->mbExportRelativeFsysLinks = m_pCbExportRelativeFsysLinks->IsChecked();
bool bIsPDFASel = false;
- ImpPDFTabGeneralPage* pGeneralPage = paParent ? paParent->getGeneralPage() : NULL;
+ ImpPDFTabGeneralPage* pGeneralPage = paParent->getGeneralPage();
if (pGeneralPage)
bIsPDFASel = pGeneralPage->IsPdfaSelected();
// if PDF/A-1 was not selected while exiting dialog...
More information about the Libreoffice-commits
mailing list