[Libreoffice-commits] core.git: 2 commits - sw/source
Caolán McNamara
caolanm at redhat.com
Mon Jun 11 10:24:25 UTC 2018
sw/source/core/text/guess.cxx | 2 +-
sw/source/core/text/txtfrm.cxx | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)
New commits:
commit a3395c8ada141f6e7cccc7b55ab1dfa963ef8019
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 11 09:27:39 2018 +0100
coverity#1436013 Unintended sign extension
Change-Id: Ic8dd5523d774f84627cd13ad53508386071f92e9
Reviewed-on: https://gerrit.libreoffice.org/55606
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx
index 14b1de671f54..6b37ce710dc4 100644
--- a/sw/source/core/text/guess.cxx
+++ b/sw/source/core/text/guess.cxx
@@ -149,7 +149,7 @@ bool SwTextGuess::Guess( const SwTextPortion& rPor, SwTextFormatInfo &rInf,
.getIDocumentSettingAccess().get(DocumentSettingId::UNBREAKABLE_NUMBERINGS);
// first check if everything fits to line
- if ( ( long ( nLineWidth ) * 2 > sal_Int32(nMaxLen) * nPorHeight ) ||
+ if ( ( nLineWidth * 2 > SwTwips(nMaxLen) * nPorHeight ) ||
( bUnbreakableNumberings && rPor.IsNumberPortion() ) )
{
// call GetTextSize with maximum compression (for kanas)
commit 2196c770d55eb4362277ea361f506be8c682fe4c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 11 09:17:34 2018 +0100
coverity#1436018 Dereference after null check
Change-Id: Id6a8ebdde5a08d9581c165a85f067ffaef490cab
Reviewed-on: https://gerrit.libreoffice.org/55604
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 9ea7968f402a..27f02f554370 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -1981,9 +1981,11 @@ void SwTextFrame::SwClientNotify(SwModify const& rModify, SfxHint const& rHint)
InvalidatePrt_();
}
- if (nClear || (m_pMergedPara &&
+ const bool bMergeModify = (m_pMergedPara &&
(m_pMergedPara->pParaPropsNode != &rModify ||
- m_pMergedPara->pFirstNode != &rModify)))
+ m_pMergedPara->pFirstNode != &rModify));
+ const bool bHasOldNew = pOld && pNew;
+ if ((nClear || bMergeModify) && bHasOldNew)
{
SwAttrSetChg aOldSet( *static_cast<const SwAttrSetChg*>(pOld) );
SwAttrSetChg aNewSet( *static_cast<const SwAttrSetChg*>(pNew) );
More information about the Libreoffice-commits
mailing list