vcl/source/gdi/gdimtf.cxx | 2 +- vcl/source/gdi/gfxlink.cxx | 4 ++++ vcl/source/gdi/impgraph.cxx | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-)
New commits: commit d4163c17ef47fdbc7d45adc5803b9844739b3324 Author: Noel Grandin <n...@peralex.com> Date: Wed Mar 23 10:45:31 2016 +0200 tdf#98600 and tdf#98622 fix metafile parsing (part2) more regressions from commit db17d3c1 "new loplugin: memoryvar" Change-Id: I611697f2bc818f2f42a704bfb5297637c30060c9 diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 4920f90..54252ab 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -2772,7 +2772,7 @@ SvStream& ReadGDIMetaFile( SvStream& rIStm, GDIMetaFile& rGDIMetaFile ) ReadPair( rIStm, rGDIMetaFile.aPrefSize ); rIStm.ReadUInt32( nCount ); - pCompat.reset(); // needs to be deleted here for the parsing to work correctly + pCompat.reset(); // destructor writes stuff into the header ImplMetaReadData aReadData; aReadData.meActualCharSet = rIStm.GetStreamCharSet(); diff --git a/vcl/source/gdi/gfxlink.cxx b/vcl/source/gdi/gfxlink.cxx index dd3b023..266c8a4 100644 --- a/vcl/source/gdi/gfxlink.cxx +++ b/vcl/source/gdi/gfxlink.cxx @@ -251,6 +251,8 @@ SvStream& WriteGfxLink( SvStream& rOStream, const GfxLink& rGfxLink ) WritePair( rOStream, rGfxLink.GetPrefSize() ); WriteMapMode( rOStream, rGfxLink.GetPrefMapMode() ); + pCompat.reset(); // destructor writes stuff into the header + if( rGfxLink.GetDataSize() ) { if( rGfxLink.IsSwappedOut() ) @@ -283,6 +285,8 @@ SvStream& ReadGfxLink( SvStream& rIStream, GfxLink& rGfxLink) bMapAndSizeValid = true; } + pCompat.reset(); // destructor writes stuff into the header + pBuf = new sal_uInt8[ nSize ]; rIStream.Read( pBuf, nSize ); diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index e6f0f77..7abbb65 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -1454,6 +1454,7 @@ SvStream& ReadImpGraphic( SvStream& rIStm, ImpGraphic& rImpGraphic ) // read compat info std::unique_ptr<VersionCompat> pCompat(new VersionCompat( rIStm, StreamMode::READ )); + pCompat.reset(); // destructor writes stuff into the header ReadGfxLink( rIStm, aLink ); @@ -1594,6 +1595,7 @@ SvStream& WriteImpGraphic( SvStream& rOStm, const ImpGraphic& rImpGraphic ) // write compat info std::unique_ptr<VersionCompat> pCompat(new VersionCompat( rOStm, StreamMode::WRITE, 1 )); + pCompat.reset(); // destructor writes stuff into the header rImpGraphic.mpGfxLink->SetPrefMapMode( rImpGraphic.ImplGetPrefMapMode() ); rImpGraphic.mpGfxLink->SetPrefSize( rImpGraphic.ImplGetPrefSize() ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits