filter/source/msfilter/svdfppt.cxx | 4 ++-- sw/source/core/doc/docbm.cxx | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-)
New commits: commit f9b5dad09dbdd56ff064096695a946b03e9e2914 Author: Caolán McNamara <[email protected]> AuthorDate: Sat Aug 24 10:59:01 2024 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Sat Aug 24 20:10:10 2024 +0200 cid#1608301 silence Overflowed constant Change-Id: I7cca8a62307b434b34781d8b1ba3ee312cafde0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172351 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Jenkins diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index b4b1f6f76d28..ce1b211c3c3f 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -5292,7 +5292,8 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, const DffRecordHeader& rTextHe } } - if ( !aString.isEmpty() ) + const sal_uInt32 nStringLen = aString.getLength(); + if (nStringLen) { sal_uInt32 nCharCount; bool bTextPropAtom = false; @@ -5304,7 +5305,6 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, const DffRecordHeader& rTextHe sal_uInt32 nCurrentPara = 0; size_t i = 1; // points to the next element to process sal_uInt32 nCurrentSpecMarker = aSpecMarkerList.empty() ? 0 : aSpecMarkerList[0]; - sal_uInt32 nStringLen = aString.getLength(); while ( nCharReadCnt < nStringLen ) { commit 20bd1ab3bfcc2d89d36b5dc284df200ece76f885 Author: Caolán McNamara <[email protected]> AuthorDate: Thu Aug 22 09:05:26 2024 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Sat Aug 24 20:09:57 2024 +0200 cid#1616072 Different smart pointers managing same raw pointer Change-Id: Ia6e1a911b9d5af906fedfe01225e95396f34dd99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172349 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index b12e12228915..d1259cde3dbc 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -1261,6 +1261,7 @@ namespace sw::mark m_vFieldmarks.erase(ppFieldmark); ret.reset(new LazyFieldmarkDeleter(static_cast<Fieldmark*>(pMark), m_rDoc, isMoveNodes)); + pMark = nullptr; } else { @@ -1293,14 +1294,14 @@ namespace sw::mark if (pDdeBookmark) { ret.reset(new LazyDdeBookmarkDeleter(pDdeBookmark, m_rDoc)); + pMark = nullptr; } m_vAllMarks.erase(aI); - // If we don't have a lazy deleter - if (!ret) - // delete after we remove from the list, because the destructor can - // recursively call into this method. - delete pMark; + // delete after we remove from the list, because the destructor can + // recursively call into this method. + delete pMark; // If we have a lazy deleter, pMark was null-ed + return ret; }
