summaryrefslogtreecommitdiff
path: root/goodies
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2006-10-12 14:38:37 +0000
committerOliver Bolte <obo@openoffice.org>2006-10-12 14:38:37 +0000
commit37f651c55cdc27b97271985f6009a4db6a15146d (patch)
tree85d27f306c6a994e47b9dba7f05779adc7b55ad3 /goodies
parentb0c38ebe352e2b66aba3ed92f0d79d7f2020cf02 (diff)
INTEGRATION: CWS sb59 (1.6.18); FILE MERGED
2006/08/07 14:31:12 sb 1.6.18.1: #i67487# Made code warning-free (wntmsci10).
Diffstat (limited to 'goodies')
-rw-r--r--goodies/source/filter.vcl/itga/itga.cxx50
1 files changed, 27 insertions, 23 deletions
diff --git a/goodies/source/filter.vcl/itga/itga.cxx b/goodies/source/filter.vcl/itga/itga.cxx
index fdb7ad33448b..b34e216433b7 100644
--- a/goodies/source/filter.vcl/itga/itga.cxx
+++ b/goodies/source/filter.vcl/itga/itga.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: itga.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: obo $ $Date: 2006-09-17 15:52:50 $
+ * last change: $Author: obo $ $Date: 2006-10-12 15:38:37 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -177,27 +177,31 @@ BOOL TGAReader::ReadTGA( SvStream & rTGA, Graphic & rGraphic, PFilterCallback pc
// Kopf einlesen:
- if ( !mpTGA->GetError() && ( mbStatus = ImplReadHeader() ) )
+ if ( !mpTGA->GetError() )
{
- Bitmap aBitmap;
-
- aBitmap = Bitmap( Size( mpFileHeader->nImageWidth, mpFileHeader->nImageHeight ), mnDestBitDepth );
- mpAcc = aBitmap.AcquireWriteAccess();
- if ( mpAcc )
+ mbStatus = ImplReadHeader();
+ if ( mbStatus )
{
- if ( mbIndexing )
- mbStatus = ImplReadPalette();
- if ( mbStatus )
- mbStatus = ImplReadBody();
- }
- else
- mbStatus = FALSE;
+ Bitmap aBitmap;
- if ( mpAcc )
- aBitmap.ReleaseAccess ( mpAcc), mpAcc = NULL;
+ aBitmap = Bitmap( Size( mpFileHeader->nImageWidth, mpFileHeader->nImageHeight ), mnDestBitDepth );
+ mpAcc = aBitmap.AcquireWriteAccess();
+ if ( mpAcc )
+ {
+ if ( mbIndexing )
+ mbStatus = ImplReadPalette();
+ if ( mbStatus )
+ mbStatus = ImplReadBody();
+ }
+ else
+ mbStatus = FALSE;
- if ( mbStatus )
- rGraphic = aBitmap;
+ if ( mpAcc )
+ aBitmap.ReleaseAccess ( mpAcc), mpAcc = NULL;
+
+ if ( mbStatus )
+ rGraphic = aBitmap;
+ }
}
return mbStatus;
}
@@ -234,10 +238,10 @@ BOOL TGAReader::ImplReadHeader()
mpFileFooter->nSignature[3] >> mpFileFooter->nPadByte >> mpFileFooter->nStringTerminator;
// check for TRUE, VISI, ON-X, FILE in the signatures
- if ( mpFileFooter->nSignature[ 0 ] == 'T'<<24|'R'<<16|'U'<<8|'E' &&
- mpFileFooter->nSignature[ 1 ] == 'V'<<24|'I'<<16|'S'<<8|'I' &&
- mpFileFooter->nSignature[ 2 ] == 'O'<<24|'N'<<16|'-'<<8|'X' &&
- mpFileFooter->nSignature[ 3 ] == 'F'<<24|'I'<<16|'L'<<8|'E' )
+ if ( mpFileFooter->nSignature[ 0 ] == (('T'<<24)|('R'<<16)|('U'<<8)|'E') &&
+ mpFileFooter->nSignature[ 1 ] == (('V'<<24)|('I'<<16)|('S'<<8)|'I') &&
+ mpFileFooter->nSignature[ 2 ] == (('O'<<24)|('N'<<16)|('-'<<8)|'X') &&
+ mpFileFooter->nSignature[ 3 ] == (('F'<<24)|('I'<<16)|('L'<<8)|'E') )
{
mpExtension = new TGAExtension;
if ( mpExtension )