diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2007-07-06 11:23:04 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2007-07-06 11:23:04 +0000 |
commit | 80781b90b04af9232948ef0ca1b81722aaa480a1 (patch) | |
tree | 5c0ff2b90fd37a9a0d07f11b276ec7bdaba1c278 /framework/source/uiconfiguration/imagemanager.cxx | |
parent | 95e762f76b0804890c2c35954ae97ca4bf6cb3db (diff) |
INTEGRATION: CWS c09tosrc (1.13.10); FILE MERGED
2007/06/18 15:09:19 cd 1.13.10.1: #i78621# Delete stream object after png reader has been destroyed
Diffstat (limited to 'framework/source/uiconfiguration/imagemanager.cxx')
-rw-r--r-- | framework/source/uiconfiguration/imagemanager.cxx | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/framework/source/uiconfiguration/imagemanager.cxx b/framework/source/uiconfiguration/imagemanager.cxx index 5526cc9f4d54..dce09b6095be 100644 --- a/framework/source/uiconfiguration/imagemanager.cxx +++ b/framework/source/uiconfiguration/imagemanager.cxx @@ -4,9 +4,9 @@ * * $RCSfile: imagemanager.cxx,v $ * - * $Revision: 1.13 $ + * $Revision: 1.14 $ * - * last change: $Author: ihi $ $Date: 2007-06-06 14:01:48 $ + * last change: $Author: rt $ $Date: 2007-07-06 12:23:04 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -316,12 +316,12 @@ sal_Bool ImageManager::implts_loadUserImages( if ( xBitmapStream.is() ) { SvStream* pSvStream( 0 ); - BitmapEx aUserBitmap; - { - pSvStream = utl::UcbStreamHelper::CreateStream( xBitmapStream ); - vcl::PNGReader aPngReader( *pSvStream ); - aUserBitmap = aPngReader.Read(); - } + BitmapEx aUserBitmap; + { + pSvStream = utl::UcbStreamHelper::CreateStream( xBitmapStream ); + vcl::PNGReader aPngReader( *pSvStream ); + aUserBitmap = aPngReader.Read(); + } delete pSvStream; // Delete old image list and create a new one from the read bitmap @@ -400,8 +400,10 @@ sal_Bool ImageManager::implts_storeUserImages( if ( xBitmapStream.is() ) { SvStream* pSvStream = utl::UcbStreamHelper::CreateStream( xBitmapStream ); - vcl::PNGWriter aPngWriter( pImageList->GetAsHorizontalStrip() ); - aPngWriter.Write( *pSvStream ); + { + vcl::PNGWriter aPngWriter( pImageList->GetAsHorizontalStrip() ); + aPngWriter.Write( *pSvStream ); + } delete pSvStream; // Commit user bitmaps storage |