[Libreoffice-commits] core.git: dbaccess/source sw/source ucb/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sun Nov 11 21:24:24 UTC 2018
dbaccess/source/ui/browser/brwctrlr.cxx | 2 +-
sw/source/core/attr/calbck.cxx | 3 ++-
sw/source/core/layout/calcmove.cxx | 4 +++-
ucb/source/cacher/cachedcontentresultset.cxx | 2 +-
4 files changed, 7 insertions(+), 4 deletions(-)
New commits:
commit 7eebdd24ee72a8deef869eca53103094632aeb59
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Sun Nov 11 23:02:05 2018 +0300
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Sun Nov 11 22:24:02 2018 +0100
tdf#120703 PVS: V560 A part of conditional expression is always true/false
Change-Id: I08ea67c1b51ee04258ce7769bfe9d97a1cb46b22
Reviewed-on: https://gerrit.libreoffice.org/63268
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index 4fab483376e6..5db15ad643a6 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -1479,7 +1479,7 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const
aReturn.bEnabled = m_aCurrentFrame.isActive() && !bIsReadOnly;
if(aReturn.bEnabled)
{
- aReturn.bEnabled = aReturn.bEnabled && IsFormatSupported( m_aSystemClipboard.GetDataFlavorExVector(), SotClipboardFormatId::STRING );
+ aReturn.bEnabled = IsFormatSupported( m_aSystemClipboard.GetDataFlavorExVector(), SotClipboardFormatId::STRING );
}
break;
}
diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx
index d0ce0d84f1e2..62ce749b8223 100644
--- a/sw/source/core/attr/calbck.cxx
+++ b/sw/source/core/attr/calbck.cxx
@@ -82,8 +82,9 @@ std::unique_ptr<sw::ModifyChangedHint> SwClient::CheckRegistration( const SfxPoo
if( !pOld || pOld->Which() != RES_OBJECTDYING )
return nullptr;
+ assert(dynamic_cast<const SwPtrMsgPoolItem*>(pOld));
const SwPtrMsgPoolItem* pDead = static_cast<const SwPtrMsgPoolItem*>(pOld);
- if(!pDead || pDead->pObject != m_pRegisteredIn)
+ if(pDead->pObject != m_pRegisteredIn)
{
// we should only care received death notes from objects we are following
return nullptr;
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index 9594b91ab536..72d74ed63974 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -1701,6 +1701,8 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
nullptr != GetNextCellLeaf() )
bDontMoveMe = false;
+ assert(bMoveable);
+
if ( bDontMoveMe && aRectFnSet.GetHeight(getFrameArea()) >
aRectFnSet.GetHeight(GetUpper()->getFramePrintArea()) )
{
@@ -1725,7 +1727,7 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
* Exception: If we sit in FormatWidthCols, we must not ignore
* the attributes.
*/
- else if ( !bFootnote && bMoveable &&
+ else if ( !bFootnote &&
( !bFly || !FindFlyFrame()->IsColLocked() ) &&
( !bSct || !FindSctFrame()->IsColLocked() ) )
bMoveOrFit = true;
diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx
index a1788a201649..93db8c575688 100644
--- a/ucb/source/cacher/cachedcontentresultset.cxx
+++ b/ucb/source/cacher/cachedcontentresultset.cxx
@@ -1522,7 +1522,7 @@ sal_Bool SAL_CALL CachedContentResultSet
aGuard.reset();
m_nRow = nNewRow;
- m_bAfterLast = !bValid && nNewRow > 0;
+ m_bAfterLast = !bValid; // only nNewRow > 0 possible here
return bValid;
}
}
More information about the Libreoffice-commits
mailing list