summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-12-02 23:58:31 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2018-12-03 01:20:08 +0100
commit6ed52ecfed5781659cd27ff9aea5d0a04be77cd1 (patch)
tree5a8fb0696d7a575646dc6176d87bd57c888a3055 /sw/source/core
parent3abcd34f37b6aba5025631c64a49d4c8c34effd2 (diff)
tdf#120703 PVS: V560 A part of conditional expression is always true/false
Change-Id: Ieff0dde4faee209200b8f4e809e8bb4eb1b8f4a6 Reviewed-on: https://gerrit.libreoffice.org/64433 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/doc/swserv.cxx2
-rw-r--r--sw/source/core/layout/tabfrm.cxx8
2 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/core/doc/swserv.cxx b/sw/source/core/doc/swserv.cxx
index 2428babd9019..8fd23844c09a 100644
--- a/sw/source/core/doc/swserv.cxx
+++ b/sw/source/core/doc/swserv.cxx
@@ -226,7 +226,7 @@ bool SwServerObject::IsLinkInServer( const SwBaseLink* pChkLnk ) const
for( size_t n = rLnks.size(); n; )
{
const ::sfx2::SvBaseLink* pLnk = &(*rLnks[ --n ]);
- if( pLnk && OBJECT_CLIENT_GRF != pLnk->GetObjType() &&
+ if (OBJECT_CLIENT_GRF != pLnk->GetObjType() &&
dynamic_cast<const SwBaseLink*>( pLnk) != nullptr &&
!static_cast<const SwBaseLink*>(pLnk)->IsNoDataFlag() &&
static_cast<const SwBaseLink*>(pLnk)->IsInRange( nSttNd, nEndNd ))
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 59bdea7c35d3..74188bb66954 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -2434,7 +2434,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
}
const bool bSplitError = !Split( nDeadLine, bTryToSplit, ( bTableRowKeep && !(bAllowSplitOfRow || !bEmulateTableKeepFwdMoveAllowed) ) );
- if( !bTryToSplit && !bSplitError && nUnSplitted > 0 )
+ if (!bTryToSplit && !bSplitError)
{
--nUnSplitted;
}
@@ -5197,7 +5197,7 @@ void SwCellFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
}
}
- if ( ( bAttrSetChg && pNew &&
+ if ( ( bAttrSetChg &&
SfxItemState::SET == static_cast<const SwAttrSetChg*>(pNew)->GetChgSet()->GetItemState( RES_PROTECT, false ) ) ||
( pNew && RES_PROTECT == pNew->Which()) )
{
@@ -5206,7 +5206,7 @@ void SwCellFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
pSh->Imp()->InvalidateAccessibleEditableState( true, this );
}
- if ( bAttrSetChg && pNew &&
+ if ( bAttrSetChg &&
SfxItemState::SET == static_cast<const SwAttrSetChg*>(pNew)->GetChgSet()->GetItemState( RES_FRAMEDIR, false, &pItem ) )
{
SetDerivedVert( false );
@@ -5214,7 +5214,7 @@ void SwCellFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
}
// #i29550#
- if ( bAttrSetChg && pNew &&
+ if ( bAttrSetChg &&
SfxItemState::SET == static_cast<const SwAttrSetChg*>(pNew)->GetChgSet()->GetItemState( RES_BOX, false, &pItem ) )
{
SwFrame* pTmpUpper = GetUpper();