summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/filter/graphicfilter.cxx10
-rw-r--r--vcl/source/filter/graphicfilter2.cxx30
-rw-r--r--vcl/source/filter/igif/gifread.cxx6
-rw-r--r--vcl/source/filter/jpeg/Exif.cxx2
-rw-r--r--vcl/source/filter/wmf/wmf.cxx12
-rw-r--r--vcl/source/filter/wmf/wmfwr.cxx2
-rw-r--r--vcl/source/gdi/animate.cxx6
-rw-r--r--vcl/source/gdi/cvtsvm.cxx14
-rw-r--r--vcl/source/gdi/dibtools.cxx12
-rw-r--r--vcl/source/gdi/gdimtf.cxx14
-rw-r--r--vcl/source/gdi/impgraph.cxx24
-rw-r--r--vcl/source/gdi/pngread.cxx8
-rw-r--r--vcl/source/gdi/pngwrite.cxx6
13 files changed, 73 insertions, 73 deletions
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 9ef46c8d423e..cff0fed318ba 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -193,7 +193,7 @@ bool isPCT(SvStream& rStream, sal_uLong nStreamPos, sal_uLong nStreamLen)
{
sal_uInt8 sBuf[3];
// store number format
- sal_uInt16 oldNumberFormat = rStream.GetNumberFormatInt();
+ SvStreamEndian oldNumberFormat = rStream.GetEndian();
sal_uInt32 nOffset; // in MS documents the pict format is used without the first 512 bytes
for ( nOffset = 0; ( nOffset <= 512 ) && ( ( nStreamPos + nOffset + 14 ) <= nStreamLen ); nOffset += 512 )
{
@@ -204,9 +204,9 @@ bool isPCT(SvStream& rStream, sal_uLong nStreamPos, sal_uLong nStreamLen)
// size of the pict in version 1 pict ( 2bytes) : ignored
rStream.SeekRel(2);
// bounding box (bytes 2 -> 9)
- rStream.SetNumberFormatInt(NUMBERFORMAT_INT_BIGENDIAN);
+ rStream.SetEndian(SvStreamEndian::BIG);
rStream.ReadInt16( y1 ).ReadInt16( x1 ).ReadInt16( y2 ).ReadInt16( x2 );
- rStream.SetNumberFormatInt(oldNumberFormat); // reset format
+ rStream.SetEndian(oldNumberFormat); // reset format
if (x1 > x2 || y1 > y2 || // bad bdbox
(x1 == x2 && y1 == y2) || // 1 pixel picture
@@ -318,7 +318,7 @@ static bool ImpPeekGraphicFormat( SvStream& rStream, OUString& rFormatExtension,
bSomethingTested=true;
if( sFirstBytes[2] == 0xd3 )
{
- rStream.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
+ rStream.SetEndian( SvStreamEndian::BIG );
rStream.Seek( nStreamPos );
sal_uInt16 nFieldSize;
sal_uInt8 nMagic;
@@ -331,7 +331,7 @@ static bool ImpPeekGraphicFormat( SvStream& rStream, OUString& rFormatExtension,
rStream.ReadUInt16( nFieldSize ).ReadUChar( nMagic );
if (nMagic!=0xd3) { bOK=false; break; }
}
- rStream.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ rStream.SetEndian( SvStreamEndian::LITTLE );
if (bOK && !rStream.GetError()) {
rFormatExtension = "MET";
return true;
diff --git a/vcl/source/filter/graphicfilter2.cxx b/vcl/source/filter/graphicfilter2.cxx
index 138b4fc47fb1..2752eebb1ba3 100644
--- a/vcl/source/filter/graphicfilter2.cxx
+++ b/vcl/source/filter/graphicfilter2.cxx
@@ -60,8 +60,8 @@ bool GraphicDescriptor::Detect( bool bExtendedInfo )
bool bRet = false;
if ( pFileStm && !pFileStm->GetError() )
{
- SvStream& rStm = *pFileStm;
- sal_uInt16 nOldFormat = rStm.GetNumberFormatInt();
+ SvStream& rStm = *pFileStm;
+ SvStreamEndian nOldFormat = rStm.GetEndian();
if ( ImpDetectGIF( rStm, bExtendedInfo ) ) bRet = true;
else if ( ImpDetectJPG( rStm, bExtendedInfo ) ) bRet = true;
@@ -89,7 +89,7 @@ bool GraphicDescriptor::Detect( bool bExtendedInfo )
else if ( ImpDetectEPS( rStm, bExtendedInfo ) ) bRet = true;
else if ( ImpDetectPCD( rStm, bExtendedInfo ) ) bRet = true;
- rStm.SetNumberFormatInt( nOldFormat );
+ rStm.SetEndian( nOldFormat );
}
return bRet;
}
@@ -108,7 +108,7 @@ bool GraphicDescriptor::ImpDetectBMP( SvStream& rStm, bool bExtendedInfo )
bool bRet = false;
sal_Int32 nStmPos = rStm.Tell();
- rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ rStm.SetEndian( SvStreamEndian::LITTLE );
rStm.ReadUInt16( nTemp16 );
// OS/2-BitmapArray
@@ -183,7 +183,7 @@ bool GraphicDescriptor::ImpDetectGIF( SvStream& rStm, bool bExtendedInfo )
sal_uInt8 cByte = 0;
sal_Int32 nStmPos = rStm.Tell();
- rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ rStm.SetEndian( SvStreamEndian::LITTLE );
rStm.ReadUInt32( n32 );
if ( n32 == 0x38464947 )
@@ -249,7 +249,7 @@ bool GraphicDescriptor::ImpDetectJPG( SvStream& rStm, bool bExtendedInfo )
sal_Int32 nStmPos = rStm.Tell();
- rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
+ rStm.SetEndian( SvStreamEndian::BIG );
rStm.ReadUInt32( nTemp32 );
// compare upper 24 bits
@@ -404,7 +404,7 @@ bool GraphicDescriptor::ImpDetectPCD( SvStream& rStm, bool )
bool bRet = false;
sal_Int32 nStmPos = rStm.Tell();
- rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ rStm.SetEndian( SvStreamEndian::LITTLE );
sal_uInt32 nTemp32 = 0;
sal_uInt16 nTemp16 = 0;
@@ -438,7 +438,7 @@ bool GraphicDescriptor::ImpDetectPCX( SvStream& rStm, bool bExtendedInfo )
sal_uInt8 cByte = 0;
sal_Int32 nStmPos = rStm.Tell();
- rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ rStm.SetEndian( SvStreamEndian::LITTLE );
rStm.ReadUChar( cByte );
if ( cByte == 0x0a )
@@ -515,7 +515,7 @@ bool GraphicDescriptor::ImpDetectPNG( SvStream& rStm, bool bExtendedInfo )
bool bRet = false;
sal_Int32 nStmPos = rStm.Tell();
- rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
+ rStm.SetEndian( SvStreamEndian::BIG );
rStm.ReadUInt32( nTemp32 );
if ( nTemp32 == 0x89504e47 )
@@ -618,12 +618,12 @@ bool GraphicDescriptor::ImpDetectTIF( SvStream& rStm, bool bExtendedInfo )
{
if ( cByte1 == 0x49 )
{
- rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ rStm.SetEndian( SvStreamEndian::LITTLE );
bDetectOk = true;
}
else if ( cByte1 == 0x4d )
{
- rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
+ rStm.SetEndian( SvStreamEndian::BIG );
bDetectOk = true;
}
@@ -825,7 +825,7 @@ bool GraphicDescriptor::ImpDetectRAS( SvStream& rStm, bool )
sal_uInt32 nMagicNumber = 0;
bool bRet = false;
sal_Int32 nStmPos = rStm.Tell();
- rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
+ rStm.SetEndian( SvStreamEndian::BIG );
rStm.ReadUInt32( nMagicNumber );
if ( nMagicNumber == 0x59a66a95 )
{
@@ -851,7 +851,7 @@ bool GraphicDescriptor::ImpDetectPSD( SvStream& rStm, bool bExtendedInfo )
sal_uInt32 nMagicNumber = 0;
sal_Int32 nStmPos = rStm.Tell();
- rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
+ rStm.SetEndian( SvStreamEndian::BIG );
rStm.ReadUInt32( nMagicNumber );
if ( nMagicNumber == 0x38425053 )
{
@@ -907,7 +907,7 @@ bool GraphicDescriptor::ImpDetectEPS( SvStream& rStm, bool )
memset(nFirstBytes, 0, sizeof (nFirstBytes));
sal_Int32 nStmPos = rStm.Tell();
- rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
+ rStm.SetEndian( SvStreamEndian::BIG );
rStm.ReadUInt32( nFirstLong );
rStm.SeekRel( -4 );
rStm.Read( &nFirstBytes, 20 );
@@ -1002,7 +1002,7 @@ bool GraphicDescriptor::ImpDetectSVM( SvStream& rStm, bool bExtendedInfo )
sal_uInt8 cByte = 0;
sal_Int32 nStmPos = rStm.Tell();
- rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ rStm.SetEndian( SvStreamEndian::LITTLE );
rStm.ReadUInt32( n32 );
if ( n32 == 0x44475653 )
{
diff --git a/vcl/source/filter/igif/gifread.cxx b/vcl/source/filter/igif/gifread.cxx
index 2ed44e0834a3..7b87230ced2c 100644
--- a/vcl/source/filter/igif/gifread.cxx
+++ b/vcl/source/filter/igif/gifread.cxx
@@ -805,11 +805,11 @@ ReadState GIFReader::ReadGIF( Graphic& rGraphic )
bool ImportGIF( SvStream & rStm, Graphic& rGraphic )
{
GIFReader* pGIFReader = static_cast<GIFReader*>(rGraphic.GetContext());
- sal_uInt16 nOldFormat = rStm.GetNumberFormatInt();
+ SvStreamEndian nOldFormat = rStm.GetEndian();
ReadState eReadState;
bool bRet = true;
- rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ rStm.SetEndian( SvStreamEndian::LITTLE );
if( !pGIFReader )
pGIFReader = new GIFReader( rStm );
@@ -830,7 +830,7 @@ bool ImportGIF( SvStream & rStm, Graphic& rGraphic )
rGraphic.SetContext( pGIFReader );
}
- rStm.SetNumberFormatInt( nOldFormat );
+ rStm.SetEndian( nOldFormat );
return bRet;
}
diff --git a/vcl/source/filter/jpeg/Exif.cxx b/vcl/source/filter/jpeg/Exif.cxx
index 1a0f05b7471e..a39c2dbda9fc 100644
--- a/vcl/source/filter/jpeg/Exif.cxx
+++ b/vcl/source/filter/jpeg/Exif.cxx
@@ -93,7 +93,7 @@ bool Exif::processJpeg(SvStream& rStream, bool bSetValue)
sal_uInt32 aSize = rStream.Tell();
rStream.Seek(STREAM_SEEK_TO_BEGIN);
- rStream.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
+ rStream.SetEndian( SvStreamEndian::BIG );
rStream.ReadUInt16( aMagic16 );
// Compare JPEG magic bytes
diff --git a/vcl/source/filter/wmf/wmf.cxx b/vcl/source/filter/wmf/wmf.cxx
index 3d932f2c445a..21ab4a46c8be 100644
--- a/vcl/source/filter/wmf/wmf.cxx
+++ b/vcl/source/filter/wmf/wmf.cxx
@@ -28,8 +28,8 @@ bool ConvertWMFToGDIMetaFile( SvStream & rStreamWMF, GDIMetaFile & rGDIMetaFile,
{
sal_uInt32 nMetaType;
sal_uInt32 nOrgPos = rStreamWMF.Tell();
- sal_uInt16 nOrigNumberFormat = rStreamWMF.GetNumberFormatInt();
- rStreamWMF.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ SvStreamEndian nOrigNumberFormat = rStreamWMF.GetEndian();
+ rStreamWMF.SetEndian( SvStreamEndian::LITTLE );
rStreamWMF.Seek( 0x28 );
rStreamWMF.ReadUInt32( nMetaType );
rStreamWMF.Seek( nOrgPos );
@@ -49,7 +49,7 @@ bool ConvertWMFToGDIMetaFile( SvStream & rStreamWMF, GDIMetaFile & rGDIMetaFile,
SAL_INFO("vcl.emf", "\t\t\tsize: " << rGDIMetaFile.GetSizeBytes());
#endif
- rStreamWMF.SetNumberFormatInt( nOrigNumberFormat );
+ rStreamWMF.SetEndian( nOrigNumberFormat );
return !rStreamWMF.GetError();
}
@@ -58,11 +58,11 @@ bool ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigItem*
sal_uInt32 nMetaType(0);
sal_uInt32 nOrgPos = rStream.Tell();
- sal_uInt16 nOrigNumberFormat = rStream.GetNumberFormatInt();
- rStream.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ SvStreamEndian nOrigNumberFormat = rStream.GetEndian();
+ rStream.SetEndian( SvStreamEndian::LITTLE );
//exception-safe reset nOrigNumberFormat at end of scope
const ::comphelper::ScopeGuard aScopeGuard(
- boost::bind(&SvStream::SetNumberFormatInt, ::boost::ref(rStream),
+ boost::bind(&SvStream::SetEndian, ::boost::ref(rStream),
nOrigNumberFormat));
rStream.Seek( 0x28 );
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index e2b4aef85535..de1c96e934bd 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -1722,7 +1722,7 @@ bool WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream,
nLastPercent=0;
pWMF=&rTargetStream;
- pWMF->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN);
+ pWMF->SetEndian(SvStreamEndian::LITTLE);
nMaxRecordSize=0;
diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx
index c6f24388b214..9666e0f49101 100644
--- a/vcl/source/gdi/animate.cxx
+++ b/vcl/source/gdi/animate.cxx
@@ -740,10 +740,10 @@ SvStream& ReadAnimation( SvStream& rIStm, Animation& rAnimation )
Bitmap aBmp;
sal_uLong nStmPos = rIStm.Tell();
sal_uInt32 nAnimMagic1, nAnimMagic2;
- sal_uInt16 nOldFormat = rIStm.GetNumberFormatInt();
+ SvStreamEndian nOldFormat = rIStm.GetEndian();
bool bReadAnimations = false;
- rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ rIStm.SetEndian( SvStreamEndian::LITTLE );
nStmPos = rIStm.Tell();
rIStm.ReadUInt32( nAnimMagic1 ).ReadUInt32( nAnimMagic2 );
@@ -799,7 +799,7 @@ SvStream& ReadAnimation( SvStream& rIStm, Animation& rAnimation )
rAnimation.ResetLoopCount();
}
- rIStm.SetNumberFormatInt( nOldFormat );
+ rIStm.SetEndian( nOldFormat );
return rIStm;
}
diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx
index c8676c04ac3f..4e0bb5a0d5a0 100644
--- a/vcl/source/gdi/cvtsvm.cxx
+++ b/vcl/source/gdi/cvtsvm.cxx
@@ -447,9 +447,9 @@ SVMConverter::SVMConverter( SvStream& rStm, GDIMetaFile& rMtf, sal_uLong nConver
void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
const sal_uLong nPos = rIStm.Tell();
- const sal_uInt16 nOldFormat = rIStm.GetNumberFormatInt();
+ const SvStreamEndian nOldFormat = rIStm.GetEndian();
- rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ rIStm.SetEndian( SvStreamEndian::LITTLE );
char aCode[ 5 ];
Size aPrefSz;
@@ -472,7 +472,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
|| ( nVersion != 200 ) )
{
rIStm.SetError( SVSTREAM_FILEFORMAT_ERROR );
- rIStm.SetNumberFormatInt( nOldFormat );
+ rIStm.SetEndian( nOldFormat );
rIStm.Seek( nPos );
return;
}
@@ -1344,14 +1344,14 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
aLIStack.pop();
}
- rIStm.SetNumberFormatInt( nOldFormat );
+ rIStm.SetEndian( nOldFormat );
}
void SVMConverter::ImplConvertToSVM1( SvStream& rOStm, GDIMetaFile& rMtf )
{
sal_uLong nCountPos;
vcl::Font aSaveFont;
- const sal_uInt16 nOldFormat = rOStm.GetNumberFormatInt();
+ const SvStreamEndian nOldFormat = rOStm.GetEndian();
rtl_TextEncoding eActualCharSet = osl_getThreadTextEncoding();
const Size aPrefSize( rMtf.GetPrefSize() );
bool bRop_0_1 = false;
@@ -1359,7 +1359,7 @@ void SVMConverter::ImplConvertToSVM1( SvStream& rOStm, GDIMetaFile& rMtf )
Color aLineCol( COL_BLACK );
::std::stack< Color* > aLineColStack;
- rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ rOStm.SetEndian( SvStreamEndian::LITTLE );
// Write MagicCode
rOStm.WriteCharPtr( "SVGDI" ); // Identifier
@@ -1379,7 +1379,7 @@ void SVMConverter::ImplConvertToSVM1( SvStream& rOStm, GDIMetaFile& rMtf )
rOStm.Seek( nCountPos );
rOStm.WriteInt32( nActCount );
rOStm.Seek( nActPos );
- rOStm.SetNumberFormatInt( nOldFormat );
+ rOStm.SetEndian( nOldFormat );
// cleanup push-pop stack if necessary
while ( !aLineColStack.empty() )
diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index af6a78ebb222..054c070264cd 100644
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -1414,12 +1414,12 @@ bool ImplReadDIB(
SvStream& rIStm,
bool bFileHeader)
{
- const sal_uInt16 nOldFormat(rIStm.GetNumberFormatInt());
+ const SvStreamEndian nOldFormat(rIStm.GetEndian());
const sal_uLong nOldPos(rIStm.Tell());
sal_uLong nOffset(0UL);
bool bRet(false);
- rIStm.SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN);
+ rIStm.SetEndian(SvStreamEndian::LITTLE);
if(bFileHeader)
{
@@ -1443,7 +1443,7 @@ bool ImplReadDIB(
rIStm.Seek(nOldPos);
}
- rIStm.SetNumberFormatInt(nOldFormat);
+ rIStm.SetEndian(nOldFormat);
return bRet;
}
@@ -1462,7 +1462,7 @@ bool ImplWriteDIB(
{
BitmapReadAccess* pAcc = const_cast< Bitmap& >(rSource).AcquireReadAccess();
BitmapReadAccess* pAccAlpha = 0;
- const sal_uInt16 nOldFormat(rOStm.GetNumberFormatInt());
+ const SvStreamEndian nOldFormat(rOStm.GetEndian());
const sal_uLong nOldPos(rOStm.Tell());
if(pSourceAlpha)
@@ -1479,7 +1479,7 @@ bool ImplWriteDIB(
}
}
- rOStm.SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN);
+ rOStm.SetEndian(SvStreamEndian::LITTLE);
if(pAcc)
{
@@ -1509,7 +1509,7 @@ bool ImplWriteDIB(
rOStm.Seek(nOldPos);
}
- rOStm.SetNumberFormatInt(nOldFormat);
+ rOStm.SetEndian(nOldFormat);
}
return bRet;
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 20e4c2251315..1a49cdcd6892 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -2746,10 +2746,10 @@ SvStream& ReadGDIMetaFile( SvStream& rIStm, GDIMetaFile& rGDIMetaFile )
if( !rIStm.GetError() )
{
char aId[ 7 ];
- sal_uLong nStmPos = rIStm.Tell();
- sal_uInt16 nOldFormat = rIStm.GetNumberFormatInt();
+ sal_uLong nStmPos = rIStm.Tell();
+ SvStreamEndian nOldFormat = rIStm.GetEndian();
- rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ rIStm.SetEndian( SvStreamEndian::LITTLE );
aId[ 0 ] = 0;
aId[ 6 ] = 0;
@@ -2805,7 +2805,7 @@ SvStream& ReadGDIMetaFile( SvStream& rIStm, GDIMetaFile& rGDIMetaFile )
rIStm.Seek( nStmPos );
}
- rIStm.SetNumberFormatInt( nOldFormat );
+ rIStm.SetEndian( nOldFormat );
}
else
{
@@ -2857,9 +2857,9 @@ SvStream& GDIMetaFile::Write( SvStream& rOStm )
{
VersionCompat* pCompat;
const sal_uInt32 nStmCompressMode = rOStm.GetCompressMode();
- sal_uInt16 nOldFormat = rOStm.GetNumberFormatInt();
+ SvStreamEndian nOldFormat = rOStm.GetEndian();
- rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ rOStm.SetEndian( SvStreamEndian::LITTLE );
rOStm.Write( "VCLMTF", 6 );
pCompat = new VersionCompat( rOStm, STREAM_WRITE, 1 );
@@ -2882,7 +2882,7 @@ SvStream& GDIMetaFile::Write( SvStream& rOStm )
pAct = (MetaAction*)NextAction();
}
- rOStm.SetNumberFormatInt( nOldFormat );
+ rOStm.SetEndian( nOldFormat );
return rOStm;
}
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index bb31b81b1227..2c2a7473298f 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -948,10 +948,10 @@ bool ImpGraphic::ImplReadEmbedded( SvStream& rIStm )
sal_uInt32 nId;
sal_Int32 nType;
sal_Int32 nLen;
- const sal_uInt16 nOldFormat = rIStm.GetNumberFormatInt();
+ const SvStreamEndian nOldFormat = rIStm.GetEndian();
bool bRet = false;
- rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ rIStm.SetEndian( SvStreamEndian::LITTLE );
rIStm.ReadUInt32( nId );
// check version
@@ -1069,7 +1069,7 @@ bool ImpGraphic::ImplReadEmbedded( SvStream& rIStm )
else
bRet = true;
- rIStm.SetNumberFormatInt( nOldFormat );
+ rIStm.SetEndian( nOldFormat );
return bRet;
}
@@ -1082,10 +1082,10 @@ bool ImpGraphic::ImplWriteEmbedded( SvStream& rOStm )
{
const MapMode aMapMode( ImplGetPrefMapMode() );
const Size aSize( ImplGetPrefSize() );
- const sal_uInt16 nOldFormat = rOStm.GetNumberFormatInt();
+ const SvStreamEndian nOldFormat = rOStm.GetEndian();
sal_uLong nDataFieldPos;
- rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ rOStm.SetEndian( SvStreamEndian::LITTLE );
// write correct version ( old style/new style header )
if( rOStm.GetVersion() >= SOFFICE_FILEFORMAT_50 )
@@ -1144,7 +1144,7 @@ bool ImpGraphic::ImplWriteEmbedded( SvStream& rOStm )
}
}
- rOStm.SetNumberFormatInt( nOldFormat );
+ rOStm.SetEndian( nOldFormat );
}
return bRet;
@@ -1484,10 +1484,10 @@ SvStream& ReadImpGraphic( SvStream& rIStm, ImpGraphic& rImpGraphic )
else
{
BitmapEx aBmpEx;
- const sal_uInt16 nOldFormat = rIStm.GetNumberFormatInt();
+ const SvStreamEndian nOldFormat = rIStm.GetEndian();
rIStm.SeekRel( -4 );
- rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ rIStm.SetEndian( SvStreamEndian::LITTLE );
ReadDIBBitmapEx(aBmpEx, rIStm);
if( !rIStm.GetError() )
@@ -1565,7 +1565,7 @@ SvStream& ReadImpGraphic( SvStream& rIStm, ImpGraphic& rImpGraphic )
}
}
- rIStm.SetNumberFormatInt( nOldFormat );
+ rIStm.SetEndian( nOldFormat );
}
}
}
@@ -1599,8 +1599,8 @@ SvStream& WriteImpGraphic( SvStream& rOStm, const ImpGraphic& rImpGraphic )
else
{
// own format
- const sal_uInt16 nOldFormat = rOStm.GetNumberFormatInt();
- rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ const SvStreamEndian nOldFormat = rOStm.GetEndian();
+ rOStm.SetEndian( SvStreamEndian::LITTLE );
switch( rImpGraphic.ImplGetType() )
{
@@ -1643,7 +1643,7 @@ SvStream& WriteImpGraphic( SvStream& rOStm, const ImpGraphic& rImpGraphic )
break;
}
- rOStm.SetNumberFormatInt( nOldFormat );
+ rOStm.SetEndian( nOldFormat );
}
}
else
diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx
index 36e6803e8e71..8c30c45e2d89 100644
--- a/vcl/source/gdi/pngread.cxx
+++ b/vcl/source/gdi/pngread.cxx
@@ -67,7 +67,7 @@ class PNGReaderImpl
{
private:
SvStream& mrPNGStream;
- sal_uInt16 mnOrigStreamMode;
+ SvStreamEndian mnOrigStreamMode;
std::vector< vcl::PNGReader::ChunkData > maChunkSeq;
std::vector< vcl::PNGReader::ChunkData >::iterator maChunkIter;
@@ -211,8 +211,8 @@ PNGReaderImpl::PNGReaderImpl( SvStream& rPNGStream )
mpScanlineAlpha(0)
{
// prepare the PNG data stream
- mnOrigStreamMode = mrPNGStream.GetNumberFormatInt();
- mrPNGStream.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
+ mnOrigStreamMode = mrPNGStream.GetEndian();
+ mrPNGStream.SetEndian( SvStreamEndian::BIG );
// prepare the chunk reader
maChunkSeq.reserve( 16 );
@@ -237,7 +237,7 @@ PNGReaderImpl::PNGReaderImpl( SvStream& rPNGStream )
PNGReaderImpl::~PNGReaderImpl()
{
- mrPNGStream.SetNumberFormatInt( mnOrigStreamMode );
+ mrPNGStream.SetEndian( mnOrigStreamMode );
if ( mbzCodecInUse )
mpZCodec.EndCompression();
diff --git a/vcl/source/gdi/pngwrite.cxx b/vcl/source/gdi/pngwrite.cxx
index c1a73cf7df6e..683f6fc887db 100644
--- a/vcl/source/gdi/pngwrite.cxx
+++ b/vcl/source/gdi/pngwrite.cxx
@@ -241,8 +241,8 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
bool PNGWriterImpl::Write( SvStream& rOStm )
{
/* png signature is always an array of 8 bytes */
- sal_uInt16 nOldMode = rOStm.GetNumberFormatInt();
- rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
+ SvStreamEndian nOldMode = rOStm.GetEndian();
+ rOStm.SetEndian( SvStreamEndian::BIG );
rOStm.WriteUInt32( 0x89504e47 );
rOStm.WriteUInt32( 0x0d0a1a0a );
@@ -265,7 +265,7 @@ bool PNGWriterImpl::Write( SvStream& rOStm )
rOStm.WriteUInt32( nCRC );
++aBeg;
}
- rOStm.SetNumberFormatInt( nOldMode );
+ rOStm.SetEndian( nOldMode );
return mbStatus;
}