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 <caol...@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 <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@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 <caol...@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 <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@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) ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits