summaryrefslogtreecommitdiff
path: root/filter/source/graphicfilter/eras/eras.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'filter/source/graphicfilter/eras/eras.cxx')
-rw-r--r--filter/source/graphicfilter/eras/eras.cxx70
1 files changed, 35 insertions, 35 deletions
diff --git a/filter/source/graphicfilter/eras/eras.cxx b/filter/source/graphicfilter/eras/eras.cxx
index cb9005fdf0eb..2d44bbaa677b 100644
--- a/filter/source/graphicfilter/eras/eras.cxx
+++ b/filter/source/graphicfilter/eras/eras.cxx
@@ -40,36 +40,36 @@ class RASWriter {
private:
SvStream* mpOStm;
- USHORT mpOStmOldModus;
+ sal_uInt16 mpOStmOldModus;
- BOOL mbStatus;
+ sal_Bool mbStatus;
BitmapReadAccess* mpAcc;
- ULONG mnWidth, mnHeight;
- USHORT mnColors, mnDepth;
+ sal_uLong mnWidth, mnHeight;
+ sal_uInt16 mnColors, mnDepth;
- ULONG mnRepCount;
- BYTE mnRepVal;
+ sal_uLong mnRepCount;
+ sal_uInt8 mnRepVal;
com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator;
- void ImplCallback( ULONG nCurrentYPos );
- BOOL ImplWriteHeader();
+ void ImplCallback( sal_uLong nCurrentYPos );
+ sal_Bool ImplWriteHeader();
void ImplWritePalette();
void ImplWriteBody();
- void ImplPutByte( BYTE ); // RLE decoding
+ void ImplPutByte( sal_uInt8 ); // RLE decoding
public:
RASWriter();
~RASWriter();
- BOOL WriteRAS( const Graphic& rGraphic, SvStream& rRAS, FilterConfigItem* pFilterConfigItem );
+ sal_Bool WriteRAS( const Graphic& rGraphic, SvStream& rRAS, FilterConfigItem* pFilterConfigItem );
};
//=================== Methoden von RASWriter ==============================
RASWriter::RASWriter() :
- mbStatus ( TRUE ),
+ mbStatus ( sal_True ),
mpAcc ( NULL ),
mnRepCount ( 0xffffffff )
{
@@ -83,15 +83,15 @@ RASWriter::~RASWriter()
// ------------------------------------------------------------------------
-void RASWriter::ImplCallback( ULONG nYPos )
+void RASWriter::ImplCallback( sal_uLong nYPos )
{
if ( xStatusIndicator.is() )
- xStatusIndicator->setValue( (USHORT)( ( 100 * nYPos ) / mnHeight ) );
+ xStatusIndicator->setValue( (sal_uInt16)( ( 100 * nYPos ) / mnHeight ) );
}
// ------------------------------------------------------------------------
-BOOL RASWriter::WriteRAS( const Graphic& rGraphic, SvStream& rRAS, FilterConfigItem* pFilterConfigItem)
+sal_Bool RASWriter::WriteRAS( const Graphic& rGraphic, SvStream& rRAS, FilterConfigItem* pFilterConfigItem)
{
Bitmap aBmp;
@@ -133,7 +133,7 @@ BOOL RASWriter::WriteRAS( const Graphic& rGraphic, SvStream& rRAS, FilterConfigI
aBmp.ReleaseAccess( mpAcc );
}
else
- mbStatus = FALSE;
+ mbStatus = sal_False;
mpOStm->SetNumberFormatInt( mpOStmOldModus );
@@ -145,7 +145,7 @@ BOOL RASWriter::WriteRAS( const Graphic& rGraphic, SvStream& rRAS, FilterConfigI
// ------------------------------------------------------------------------
-BOOL RASWriter::ImplWriteHeader()
+sal_Bool RASWriter::ImplWriteHeader()
{
mnWidth = mpAcc->Width();
mnHeight = mpAcc->Height();
@@ -153,24 +153,24 @@ BOOL RASWriter::ImplWriteHeader()
{
mnColors = mpAcc->GetPaletteEntryCount();
if (mnColors == 0)
- mbStatus = FALSE;
+ mbStatus = sal_False;
}
if ( mbStatus && mnWidth && mnHeight && mnDepth )
{
- *mpOStm << (UINT32)0x59a66a95 << (UINT32)mnWidth << (UINT32)mnHeight
- << (UINT32)mnDepth
- << (UINT32)(( ( ( ( mnWidth * mnDepth ) + 15 ) >> 4 ) << 1 ) * mnHeight)
- << (UINT32)2;
+ *mpOStm << (sal_uInt32)0x59a66a95 << (sal_uInt32)mnWidth << (sal_uInt32)mnHeight
+ << (sal_uInt32)mnDepth
+ << (sal_uInt32)(( ( ( ( mnWidth * mnDepth ) + 15 ) >> 4 ) << 1 ) * mnHeight)
+ << (sal_uInt32)2;
if ( mnDepth > 8 )
- *mpOStm << (UINT32)0 << (UINT32)0;
+ *mpOStm << (sal_uInt32)0 << (sal_uInt32)0;
else
{
- *mpOStm << (UINT32)1 << (UINT32)( mnColors * 3 );
+ *mpOStm << (sal_uInt32)1 << (sal_uInt32)( mnColors * 3 );
}
}
- else mbStatus = FALSE;
+ else mbStatus = sal_False;
return mbStatus;
}
@@ -179,7 +179,7 @@ BOOL RASWriter::ImplWriteHeader()
void RASWriter::ImplWritePalette()
{
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < mnColors; *mpOStm << mpAcc->GetPaletteColor( i++ ).GetRed() ) ;
for ( i = 0; i < mnColors; *mpOStm << mpAcc->GetPaletteColor( i++ ).GetGreen() ) ;
@@ -190,7 +190,7 @@ void RASWriter::ImplWritePalette()
void RASWriter::ImplWriteBody()
{
- ULONG x, y;
+ sal_uLong x, y;
if ( mnDepth == 24 )
{
@@ -221,7 +221,7 @@ void RASWriter::ImplWriteBody()
}
else if ( mnDepth == 1 )
{
- BYTE nDat = 0;
+ sal_uInt8 nDat = 0;
for ( y = 0; y < mnHeight; y++ )
{
@@ -233,7 +233,7 @@ void RASWriter::ImplWriteBody()
ImplPutByte( nDat );
}
if ( x & 7 )
- ImplPutByte( sal::static_int_cast< BYTE >(nDat << ( ( ( x & 7 ) ^ 7 ) + 1)) );// write remaining bits
+ ImplPutByte( sal::static_int_cast< sal_uInt8 >(nDat << ( ( ( x & 7 ) ^ 7 ) + 1)) );// write remaining bits
if (!( ( x - 1 ) & 0x8 ) )
ImplPutByte( 0 ); // WORD ALIGNMENT ???
}
@@ -243,7 +243,7 @@ void RASWriter::ImplWriteBody()
// ------------------------------------------------------------------------
-void RASWriter::ImplPutByte( BYTE nPutThis )
+void RASWriter::ImplPutByte( sal_uInt8 nPutThis )
{
if ( mnRepCount == 0xffffffff )
{
@@ -258,15 +258,15 @@ void RASWriter::ImplPutByte( BYTE nPutThis )
{
if ( mnRepCount == 0 )
{
- *mpOStm << (BYTE)mnRepVal;
+ *mpOStm << (sal_uInt8)mnRepVal;
if ( mnRepVal == 0x80 )
- *mpOStm << (BYTE)0;
+ *mpOStm << (sal_uInt8)0;
}
else
{
- *mpOStm << (BYTE)0x80;
- *mpOStm << (BYTE)mnRepCount;
- *mpOStm << (BYTE)mnRepVal;
+ *mpOStm << (sal_uInt8)0x80;
+ *mpOStm << (sal_uInt8)mnRepCount;
+ *mpOStm << (sal_uInt8)mnRepVal;
}
mnRepVal = nPutThis;
mnRepCount = 0;
@@ -280,7 +280,7 @@ void RASWriter::ImplPutByte( BYTE nPutThis )
// - exported function -
// ---------------------
-extern "C" BOOL __LOADONCALLAPI GraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pFilterConfigItem, BOOL )
+extern "C" sal_Bool __LOADONCALLAPI GraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pFilterConfigItem, sal_Bool )
{
RASWriter aRASWriter;