diff options
author | Noel Grandin <noel@peralex.com> | 2016-03-23 10:45:31 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-03-24 10:25:39 +0000 |
commit | e3d06146f648faf35b475d536f3a9c6fd55ea188 (patch) | |
tree | 62f61a5446982b44df93ff4435bcfd5dccb7da33 /vcl | |
parent | ceedd3c624873cd5dbdd76456a1540560a128a01 (diff) |
more regressions from commit db17d3c1 "new loplugin: memoryvar"
Change-Id: I611697f2bc818f2f42a704bfb5297637c30060c9
(cherry picked from commit d4163c17ef47fdbc7d45adc5803b9844739b3324)
Reviewed-on: https://gerrit.libreoffice.org/23470
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/gdimtf.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/gfxlink.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/impgraph.cxx | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 581fa5156b86..f14ed8e02807 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -2763,7 +2763,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 f841360b5d79..8d7a503ebe41 100644 --- a/vcl/source/gdi/gfxlink.cxx +++ b/vcl/source/gdi/gfxlink.cxx @@ -261,6 +261,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() ) @@ -293,6 +295,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 d77d1b0e5214..5179afa101c2 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -1447,6 +1447,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 ); @@ -1587,6 +1588,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() ); |