vcl/source/treelist/imap.cxx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
New commits: commit 9487783d4598507c6539555a61b6da28f2f39003 Author: Noel Grandin <[email protected]> AuthorDate: Wed Feb 25 14:00:08 2026 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Fri Feb 27 06:53:57 2026 +0100 no need to allocate this on the heap Change-Id: Id3b66fe3fb4105fe93592be3b11a23683e4de49c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200313 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/vcl/source/treelist/imap.cxx b/vcl/source/treelist/imap.cxx index dcd09942b861..a9b37df475c7 100644 --- a/vcl/source/treelist/imap.cxx +++ b/vcl/source/treelist/imap.cxx @@ -914,7 +914,6 @@ void ImageMap::ImpReadImageMap( SvStream& rIStm, size_t nCount ) void ImageMap::Write( SvStream& rOStm ) const { - IMapCompat* pCompat; OUString aImageName( GetName() ); SvStreamEndian nOldFormat = rOStm.GetEndian(); sal_uInt16 nCount = static_cast<sal_uInt16>(GetIMapObjectCount()); @@ -930,11 +929,10 @@ void ImageMap::Write( SvStream& rOStm ) const rOStm.WriteUInt16( nCount ); write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStm, aImageName, eEncoding); - pCompat = new IMapCompat( rOStm, StreamMode::WRITE ); - - // here one can insert in newer versions - - delete pCompat; + { + IMapCompat aCompat( rOStm, StreamMode::WRITE ); + // here one can insert in newer versions + } ImpWriteImageMap( rOStm );
