diff options
author | Noel Grandin <noel@peralex.com> | 2015-01-05 08:47:31 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-01-05 12:57:18 +0200 |
commit | 8130714148d58dd2bf1ef12dcc6dd6d5838be0d1 (patch) | |
tree | bf8cf91d9837b9d03e1e3e336be7eb35667d4de9 /filter/source | |
parent | spelling: attachement -> attachment (diff) | |
download | core-8130714148d58dd2bf1ef12dcc6dd6d5838be0d1.tar.gz core-8130714148d58dd2bf1ef12dcc6dd6d5838be0d1.zip |
fdo#84938: replace NUMBERFORMAT_INT_ constants with 'enum class'
Change-Id: I9c67de31f5571b282adc132d973b79bccb35fdc9
Diffstat (limited to 'filter/source')
21 files changed, 53 insertions, 64 deletions
diff --git a/filter/source/graphicfilter/egif/egif.cxx b/filter/source/graphicfilter/egif/egif.cxx index 07e2193174a8..4cbbe2092955 100644 --- a/filter/source/graphicfilter/egif/egif.cxx +++ b/filter/source/graphicfilter/egif/egif.cxx @@ -116,7 +116,7 @@ bool GIFWriter::WriteGIF(const Graphic& rGraphic, FilterConfigItem* pFilterConfi if ( pFilterConfigItem ) nInterlaced = pFilterConfigItem->ReadInt32( "Interlaced", 0 ); - m_rGIF.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); + m_rGIF.SetEndian( SvStreamEndian::LITTLE ); if( rGraphic.IsAnimated() ) { diff --git a/filter/source/graphicfilter/eos2met/eos2met.cxx b/filter/source/graphicfilter/eos2met/eos2met.cxx index 36ffc74ffb27..18809d526dfa 100644 --- a/filter/source/graphicfilter/eos2met/eos2met.cxx +++ b/filter/source/graphicfilter/eos2met/eos2met.cxx @@ -581,7 +581,7 @@ void METWriter::WriteImageObject(const Bitmap & rBitmap) WriteDIB(rBitmap, aTemp, false, true); // read header of the Windows-BMP file: - aTemp.SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN); + aTemp.SetEndian(SvStreamEndian::LITTLE); aTemp.Seek(18); aTemp.ReadUInt32( nWidth ).ReadUInt32( nHeight ); aTemp.SeekRel(2); @@ -2510,7 +2510,7 @@ bool METWriter::WriteMET( const GDIMetaFile& rMTF, SvStream& rTargetStream, Filt nLastPercent=0; pMET=&rTargetStream; - pMET->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN); + pMET->SetEndian(SvStreamEndian::LITTLE); aPictureRect = Rectangle( Point(), rMTF.GetPrefSize() ); aTargetMapMode = aPictureMapMode = rMTF.GetPrefMapMode(); diff --git a/filter/source/graphicfilter/epbm/epbm.cxx b/filter/source/graphicfilter/epbm/epbm.cxx index 1705cb131e58..818883fef505 100644 --- a/filter/source/graphicfilter/epbm/epbm.cxx +++ b/filter/source/graphicfilter/epbm/epbm.cxx @@ -33,14 +33,13 @@ class PBMWriter { private: SvStream& m_rOStm; // the output PBM file - sal_uInt16 mpOStmOldModus; - bool mbStatus; + bool mbStatus; sal_Int32 mnMode; // 0 -> raw, 1-> ascii BitmapReadAccess* mpAcc; sal_uLong mnWidth, mnHeight; // size in pixel - bool ImplWriteHeader(); + bool ImplWriteHeader(); void ImplWriteBody(); void ImplWriteNumber( sal_Int32 ); @@ -57,7 +56,6 @@ public: PBMWriter::PBMWriter(SvStream &rPBM) : m_rOStm(rPBM) - , mpOStmOldModus(0) , mbStatus(true) , mnMode(0) , mpAcc(NULL) @@ -92,8 +90,8 @@ bool PBMWriter::WritePBM( const Graphic& rGraphic, FilterConfigItem* pFilterConf Bitmap aBmp = aBmpEx.GetBitmap(); aBmp.Convert( BMP_CONVERSION_1BIT_THRESHOLD ); - mpOStmOldModus = m_rOStm.GetNumberFormatInt(); - m_rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); + SvStreamEndian aOStmOldModus = m_rOStm.GetEndian(); + m_rOStm.SetEndian( SvStreamEndian::BIG ); mpAcc = aBmp.AcquireReadAccess(); if( mpAcc ) @@ -106,7 +104,7 @@ bool PBMWriter::WritePBM( const Graphic& rGraphic, FilterConfigItem* pFilterConf else mbStatus = false; - m_rOStm.SetNumberFormatInt( mpOStmOldModus ); + m_rOStm.SetEndian( aOStmOldModus ); if ( xStatusIndicator.is() ) xStatusIndicator->end(); diff --git a/filter/source/graphicfilter/epgm/epgm.cxx b/filter/source/graphicfilter/epgm/epgm.cxx index fcd65b891ed4..a2a437d58e5f 100644 --- a/filter/source/graphicfilter/epgm/epgm.cxx +++ b/filter/source/graphicfilter/epgm/epgm.cxx @@ -33,14 +33,13 @@ class PGMWriter { private: SvStream& m_rOStm; // the output PGM file - sal_uInt16 mpOStmOldModus; - bool mbStatus; + bool mbStatus; sal_uInt32 mnMode; BitmapReadAccess* mpAcc; sal_uLong mnWidth, mnHeight; // image size in pixeln - bool ImplWriteHeader(); + bool ImplWriteHeader(); void ImplWriteBody(); void ImplWriteNumber( sal_Int32 ); @@ -56,7 +55,6 @@ public: //=================== Methoden von PGMWriter ============================== PGMWriter::PGMWriter(SvStream &rStream) : m_rOStm(rStream) - , mpOStmOldModus(0) , mbStatus(true) , mnMode(0) , mpAcc(NULL) @@ -87,8 +85,8 @@ bool PGMWriter::WritePGM( const Graphic& rGraphic, FilterConfigItem* pFilterConf Bitmap aBmp = aBmpEx.GetBitmap(); aBmp.Convert( BMP_CONVERSION_8BIT_GREYS ); - mpOStmOldModus = m_rOStm.GetNumberFormatInt(); - m_rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); + SvStreamEndian aOStmOldModus = m_rOStm.GetEndian(); + m_rOStm.SetEndian( SvStreamEndian::BIG ); mpAcc = aBmp.AcquireReadAccess(); if( mpAcc ) @@ -102,7 +100,7 @@ bool PGMWriter::WritePGM( const Graphic& rGraphic, FilterConfigItem* pFilterConf else mbStatus = false; - m_rOStm.SetNumberFormatInt( mpOStmOldModus ); + m_rOStm.SetEndian( aOStmOldModus ); if ( xStatusIndicator.is() ) xStatusIndicator->end(); diff --git a/filter/source/graphicfilter/epict/epict.cxx b/filter/source/graphicfilter/epict/epict.cxx index 8d67795820c7..4d33b4e8663e 100644 --- a/filter/source/graphicfilter/epict/epict.cxx +++ b/filter/source/graphicfilter/epict/epict.cxx @@ -2204,7 +2204,7 @@ bool PictWriter::WritePict(const GDIMetaFile & rMTF, SvStream & rTargetStream, F } pPict=&rTargetStream; - pPict->SetNumberFormatInt(NUMBERFORMAT_INT_BIGENDIAN); + pPict->SetEndian(SvStreamEndian::BIG); aLineColor=Color( COL_BLACK ); aFillColor=Color( COL_WHITE ); diff --git a/filter/source/graphicfilter/eppm/eppm.cxx b/filter/source/graphicfilter/eppm/eppm.cxx index 7bfde7bdd4b4..bd4289961f66 100644 --- a/filter/source/graphicfilter/eppm/eppm.cxx +++ b/filter/source/graphicfilter/eppm/eppm.cxx @@ -32,13 +32,12 @@ class PPMWriter { private: - SvStream& m_rOStm; // Die auszugebende PPM-Datei - sal_uInt16 mpOStmOldModus; + SvStream& m_rOStm; // Die auszugebende PPM-Datei bool mbStatus; sal_Int32 mnMode; BitmapReadAccess* mpAcc; - sal_uLong mnWidth, mnHeight; // Bildausmass in Pixeln + sal_uLong mnWidth, mnHeight; // Bildausmass in Pixeln bool ImplWriteHeader(); void ImplWriteBody(); @@ -56,7 +55,6 @@ public: //=================== Methods of PPMWriter ============================== PPMWriter::PPMWriter(SvStream &rStrm) : m_rOStm(rStrm) - , mpOStmOldModus(0) , mbStatus(true) , mnMode(0) , mpAcc(NULL) @@ -89,8 +87,8 @@ bool PPMWriter::WritePPM( const Graphic& rGraphic, FilterConfigItem* pFilterConf Bitmap aBmp = aBmpEx.GetBitmap(); aBmp.Convert( BMP_CONVERSION_24BIT ); - mpOStmOldModus = m_rOStm.GetNumberFormatInt(); - m_rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); + SvStreamEndian aOStmOldModus = m_rOStm.GetEndian(); + m_rOStm.SetEndian( SvStreamEndian::BIG ); mpAcc = aBmp.AcquireReadAccess(); if( mpAcc ) @@ -104,7 +102,7 @@ bool PPMWriter::WritePPM( const Graphic& rGraphic, FilterConfigItem* pFilterConf else mbStatus = false; - m_rOStm.SetNumberFormatInt( mpOStmOldModus ); + m_rOStm.SetEndian( aOStmOldModus ); if ( xStatusIndicator.is() ) xStatusIndicator->end(); diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx index f3a30e96f670..ff423e97a97e 100644 --- a/filter/source/graphicfilter/eps/eps.cxx +++ b/filter/source/graphicfilter/eps/eps.cxx @@ -328,7 +328,7 @@ bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter } mpPS = &rTargetStream; - mpPS->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); + mpPS->SetEndian( SvStreamEndian::LITTLE ); // default values for the dialog options mnLevel = 2; diff --git a/filter/source/graphicfilter/eras/eras.cxx b/filter/source/graphicfilter/eras/eras.cxx index 2bf66dbf1bca..24d21d28b6de 100644 --- a/filter/source/graphicfilter/eras/eras.cxx +++ b/filter/source/graphicfilter/eras/eras.cxx @@ -111,8 +111,8 @@ bool RASWriter::WriteRAS( const Graphic& rGraphic, FilterConfigItem* pFilterConf mpAcc = aBmp.AcquireReadAccess(); if ( mpAcc ) { - sal_uInt16 nOStmOldModus = m_rOStm.GetNumberFormatInt(); - m_rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); + SvStreamEndian nOStmOldModus = m_rOStm.GetEndian(); + m_rOStm.SetEndian( SvStreamEndian::BIG ); if ( ImplWriteHeader() ) { @@ -121,7 +121,7 @@ bool RASWriter::WriteRAS( const Graphic& rGraphic, FilterConfigItem* pFilterConf ImplWriteBody(); } - m_rOStm.SetNumberFormatInt( nOStmOldModus ); + m_rOStm.SetEndian( nOStmOldModus ); aBmp.ReleaseAccess( mpAcc ); } diff --git a/filter/source/graphicfilter/etiff/etiff.cxx b/filter/source/graphicfilter/etiff/etiff.cxx index e265c9f2e4a0..408b48bbf61a 100644 --- a/filter/source/graphicfilter/etiff/etiff.cxx +++ b/filter/source/graphicfilter/etiff/etiff.cxx @@ -163,12 +163,12 @@ bool TIFFWriter::WriteTIFF( const Graphic& rGraphic, FilterConfigItem* pFilterCo } } - const sal_uInt16 nOldFormat = m_rOStm.GetNumberFormatInt(); + const SvStreamEndian nOldFormat = m_rOStm.GetEndian(); mnStreamOfs = m_rOStm.Tell(); // we will use the BIG Endian Mode // TIFF header - m_rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); + m_rOStm.SetEndian( SvStreamEndian::BIG ); m_rOStm.WriteUInt32( 0x4d4d002a ); // TIFF identifier mnLatestIfdPos = m_rOStm.Tell(); m_rOStm.WriteUInt32( 0 ); @@ -230,7 +230,7 @@ bool TIFFWriter::WriteTIFF( const Graphic& rGraphic, FilterConfigItem* pFilterCo mbStatus = false; } } - m_rOStm.SetNumberFormatInt( nOldFormat ); + m_rOStm.SetEndian( nOldFormat ); if ( xStatusIndicator.is() ) xStatusIndicator->end(); diff --git a/filter/source/graphicfilter/expm/expm.cxx b/filter/source/graphicfilter/expm/expm.cxx index 3b5fd5bd1c33..18b0b2389112 100644 --- a/filter/source/graphicfilter/expm/expm.cxx +++ b/filter/source/graphicfilter/expm/expm.cxx @@ -119,8 +119,8 @@ bool XPMWriter::WriteXPM( const Graphic& rGraphic, FilterConfigItem* pFilterConf mpAcc = aBmp.AcquireReadAccess(); if ( mpAcc ) { - sal_uInt16 nOStmOldModus = m_rOStm.GetNumberFormatInt(); - m_rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); + SvStreamEndian nOStmOldModus = m_rOStm.GetEndian(); + m_rOStm.SetEndian( SvStreamEndian::BIG ); mnColors = mpAcc->GetPaletteEntryCount(); if ( ImplWriteHeader() ) @@ -130,7 +130,7 @@ bool XPMWriter::WriteXPM( const Graphic& rGraphic, FilterConfigItem* pFilterConf m_rOStm.WriteCharPtr( "\x22XPMENDEXT\x22\x0a};" ); } - m_rOStm.SetNumberFormatInt(nOStmOldModus); + m_rOStm.SetEndian(nOStmOldModus); aBmp.ReleaseAccess( mpAcc ); } diff --git a/filter/source/graphicfilter/icgm/cgm.cxx b/filter/source/graphicfilter/icgm/cgm.cxx index fdf2582bf09f..d00c40a6a5ce 100644 --- a/filter/source/graphicfilter/icgm/cgm.cxx +++ b/filter/source/graphicfilter/icgm/cgm.cxx @@ -727,7 +727,7 @@ ImportCGM( OUString const & rFileName, uno::Reference< frame::XModel > const & r boost::scoped_ptr<SvStream> pIn(::utl::UcbStreamHelper::CreateStream( rFileName, STREAM_READ )); if ( pIn ) { - pIn->SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); + pIn->SetEndian( SvStreamEndian::BIG ); sal_uInt64 const nInSize = pIn->remainingSize(); pIn->Seek( 0 ); diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx index 30e3cd8c0dfe..db0b1654d033 100644 --- a/filter/source/graphicfilter/ieps/ieps.cxx +++ b/filter/source/graphicfilter/ieps/ieps.cxx @@ -545,8 +545,8 @@ GraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* ) sal_uInt32 nSizeTIFF = 0; sal_uInt32 nPosTIFF = 0; sal_uInt32 nOrigPos = nPSStreamPos = rStream.Tell(); - sal_uInt16 nOldFormat = rStream.GetNumberFormatInt(); - rStream.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); + SvStreamEndian nOldFormat = rStream.GetEndian(); + rStream.SetEndian( SvStreamEndian::LITTLE ); rStream.ReadUInt32( nSignature ); if ( nSignature == 0xc6d3d0c5 ) { @@ -755,7 +755,7 @@ GraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* ) delete[] pBuf; } delete[] pHeader; - rStream.SetNumberFormatInt(nOldFormat); + rStream.SetEndian(nOldFormat); rStream.Seek( nOrigPos ); return ( bRetValue ); } diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx index 317adee72cca..214e655a6e15 100644 --- a/filter/source/graphicfilter/ios2met/ios2met.cxx +++ b/filter/source/graphicfilter/ios2met/ios2met.cxx @@ -349,7 +349,6 @@ private: // While doing this a recording in the GDIMetaFile // will take place. sal_uLong nOrigPos; // initial position in pOS2MET - sal_uInt16 nOrigNumberFormat; // initial number format of pOS2MET Rectangle aBoundingRect; // bounding rectangle as stored in the file Rectangle aCalcBndRect; // bounding rectangle calculated on our own MapMode aGlobMapMode; // resolution of the picture @@ -444,7 +443,6 @@ OS2METReader::OS2METReader() , pOS2MET(NULL) , pVirDev(NULL) , nOrigPos(0) - , nOrigNumberFormat(0) , aBoundingRect() , aCalcBndRect() , aGlobMapMode() @@ -2204,7 +2202,7 @@ void OS2METReader::ReadImageData(sal_uInt16 nDataID, sal_uInt16 nDataLen) // inside this file we need the header and the palette. if (p->pBMP==NULL) { p->pBMP=new SvMemoryStream(); - p->pBMP->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN); + p->pBMP->SetEndian(SvStreamEndian::LITTLE); if (p->nWidth==0 || p->nHeight==0 || p->nBitsPerPixel==0) { pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR); ErrorCode=3; @@ -2543,7 +2541,7 @@ void OS2METReader::ReadField(sal_uInt16 nFieldType, sal_uInt16 nFieldSize) case DatGrfObjMagic: { if (pOrdFile==NULL) { pOrdFile = new SvMemoryStream; - pOrdFile->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN); + pOrdFile->SetEndian(SvStreamEndian::LITTLE); } boost::scoped_array<sal_uInt8> pBuf(new sal_uInt8[nFieldSize]); pOS2MET->Read(pBuf.get(),nFieldSize); @@ -2567,7 +2565,7 @@ void OS2METReader::ReadOS2MET( SvStream & rStreamOS2MET, GDIMetaFile & rGDIMetaF pOS2MET = &rStreamOS2MET; nOrigPos = pOS2MET->Tell(); - nOrigNumberFormat = pOS2MET->GetNumberFormatInt(); + SvStreamEndian nOrigNumberFormat = pOS2MET->GetEndian(); bCoord32 = true; pPaletteStack=NULL; @@ -2623,7 +2621,7 @@ void OS2METReader::ReadOS2MET( SvStream & rStreamOS2MET, GDIMetaFile & rGDIMetaF pVirDev->EnableOutput(false); rGDIMetaFile.Record(pVirDev); - pOS2MET->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN); + pOS2MET->SetEndian(SvStreamEndian::LITTLE); sal_uInt64 const nStartPos = pOS2MET->Tell(); sal_uInt64 const nRemaining = pOS2MET->remainingSize(); @@ -2736,7 +2734,7 @@ void OS2METReader::ReadOS2MET( SvStream & rStreamOS2MET, GDIMetaFile & rGDIMetaF delete p; } - pOS2MET->SetNumberFormatInt(nOrigNumberFormat); + pOS2MET->SetEndian(nOrigNumberFormat); if (pOS2MET->GetError()) { SAL_INFO("filter.os2met","Error code: " << ErrorCode); diff --git a/filter/source/graphicfilter/ipbm/ipbm.cxx b/filter/source/graphicfilter/ipbm/ipbm.cxx index 63a8b094633c..113b67629bb8 100644 --- a/filter/source/graphicfilter/ipbm/ipbm.cxx +++ b/filter/source/graphicfilter/ipbm/ipbm.cxx @@ -92,7 +92,7 @@ bool PBMReader::ReadPBM(Graphic & rGraphic ) if ( mrPBM.GetError() ) return false; - mrPBM.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); + mrPBM.SetEndian( SvStreamEndian::LITTLE ); // read header: diff --git a/filter/source/graphicfilter/ipcx/ipcx.cxx b/filter/source/graphicfilter/ipcx/ipcx.cxx index 9622e9b9843c..6bbcc07f4577 100644 --- a/filter/source/graphicfilter/ipcx/ipcx.cxx +++ b/filter/source/graphicfilter/ipcx/ipcx.cxx @@ -93,7 +93,7 @@ bool PCXReader::ReadPCX(Graphic & rGraphic) if ( m_rPCX.GetError() ) return false; - m_rPCX.SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN); + m_rPCX.SetEndian(SvStreamEndian::LITTLE); // read header: diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx index 38e7cde58b09..1022c2ff076e 100644 --- a/filter/source/graphicfilter/ipict/ipict.cxx +++ b/filter/source/graphicfilter/ipict/ipict.cxx @@ -149,8 +149,7 @@ private: // A recording into the GDIMetaFile will take place. sal_uLong nOrigPos; // Initial position in pPict. - sal_uInt16 nOrigNumberFormat; // Initial number format von pPict. - bool IsVersion2; // If it is a version 2 Pictfile. + bool IsVersion2; // If it is a version 2 Pictfile. Rectangle aBoundingRect; // Min/Max-Rectangle for the whole drawing. Point aPenPosition; @@ -248,7 +247,6 @@ public: : pPict(NULL) , pVirDev(NULL) , nOrigPos(0) - , nOrigNumberFormat(0) , IsVersion2(false) , eActROP(ROP_OVERPAINT) , eActMethod(PDM_UNDEFINED) @@ -1873,7 +1871,7 @@ void PictReader::ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile ) pPict = &rStreamPict; nOrigPos = pPict->Tell(); - nOrigNumberFormat = pPict->GetNumberFormatInt(); + SvStreamEndian nOrigNumberFormat = pPict->GetEndian(); aActForeColor = Color(COL_BLACK); aActBackColor = Color(COL_WHITE); @@ -1893,7 +1891,7 @@ void PictReader::ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile ) pVirDev->EnableOutput(false); rGDIMetaFile.Record(pVirDev); - pPict->SetNumberFormatInt(NUMBERFORMAT_INT_BIGENDIAN); + pPict->SetEndian(SvStreamEndian::BIG); sal_uInt64 const nStartPos=pPict->Tell(); sal_uInt64 const nRemaining = pPict->remainingSize(); @@ -1956,7 +1954,7 @@ void PictReader::ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile ) rGDIMetaFile.SetPrefMapMode( MapMode( MAP_INCH, Point(), aHRes, aVRes ) ); rGDIMetaFile.SetPrefSize( aBoundingRect.GetSize() ); - pPict->SetNumberFormatInt(nOrigNumberFormat); + pPict->SetEndian(nOrigNumberFormat); if (pPict->GetError()) pPict->Seek(nOrigPos); } diff --git a/filter/source/graphicfilter/ipsd/ipsd.cxx b/filter/source/graphicfilter/ipsd/ipsd.cxx index c6bbca3dc62a..64b7233a9384 100644 --- a/filter/source/graphicfilter/ipsd/ipsd.cxx +++ b/filter/source/graphicfilter/ipsd/ipsd.cxx @@ -111,7 +111,7 @@ bool PSDReader::ReadPSD(Graphic & rGraphic ) if (m_rPSD.GetError()) return false; - m_rPSD.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); + m_rPSD.SetEndian( SvStreamEndian::BIG ); // read header: diff --git a/filter/source/graphicfilter/iras/iras.cxx b/filter/source/graphicfilter/iras/iras.cxx index 91d279bc78c7..facca761af63 100644 --- a/filter/source/graphicfilter/iras/iras.cxx +++ b/filter/source/graphicfilter/iras/iras.cxx @@ -95,7 +95,7 @@ bool RASReader::ReadRAS(Graphic & rGraphic) if ( m_rRAS.GetError() ) return false; - m_rRAS.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); + m_rRAS.SetEndian( SvStreamEndian::BIG ); m_rRAS.ReadUInt32( nMagicNumber ); if ( nMagicNumber != SUNRASTER_MAGICNUMBER ) return false; diff --git a/filter/source/graphicfilter/itga/itga.cxx b/filter/source/graphicfilter/itga/itga.cxx index fb09d58730fc..23f9163873d5 100644 --- a/filter/source/graphicfilter/itga/itga.cxx +++ b/filter/source/graphicfilter/itga/itga.cxx @@ -137,7 +137,7 @@ bool TGAReader::ReadTGA(Graphic & rGraphic) if ( m_rTGA.GetError() ) return false; - m_rTGA.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); + m_rTGA.SetEndian( SvStreamEndian::LITTLE ); // Kopf einlesen: diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx index 1582a11773b7..cd56f63af437 100644 --- a/filter/source/graphicfilter/itiff/itiff.cxx +++ b/filter/source/graphicfilter/itiff/itiff.cxx @@ -57,7 +57,6 @@ private: BitmapWriteAccess* pMaskAcc; sal_uLong nOrigPos; // start position in pTIFF - sal_uInt16 nOrigNumberFormat; // number format of pTIFF at the beginning sal_uInt16 nDataType; @@ -134,7 +133,6 @@ public: , pAlphaMask(NULL) , pMaskAcc(NULL) , nOrigPos(0) - , nOrigNumberFormat(0) , nDataType(0) , bByteSwap(false) , nNewSubFile(0) @@ -1141,9 +1139,9 @@ void TIFFReader::ReadHeader() pTIFF->ReadUChar( nbyte1 ); if ( nbyte1 == 'I' ) - pTIFF->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); + pTIFF->SetEndian( SvStreamEndian::LITTLE ); else - pTIFF->SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); + pTIFF->SetEndian( SvStreamEndian::BIG ); pTIFF->ReadUChar( nbyte2 ).ReadUInt16( nushort ); if ( nbyte1 != nbyte2 || ( nbyte1 != 'I' && nbyte1 != 'M' ) || nushort != 0x002a ) @@ -1176,7 +1174,8 @@ bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic ) pTIFF = &rTIFF; nMaxPos = nOrigPos = pTIFF->Tell(); - nOrigNumberFormat = pTIFF->GetNumberFormatInt(); + // number format of pTIFF at the beginning + SvStreamEndian nOrigNumberFormat = pTIFF->GetEndian(); MayCallback( 0 ); @@ -1399,7 +1398,7 @@ bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic ) } // seek to end of TIFF if succeeded - pTIFF->SetNumberFormatInt( nOrigNumberFormat ); + pTIFF->SetEndian( nOrigNumberFormat ); pTIFF->Seek( bStatus ? nMaxPos : nOrigPos ); if ( aAnimation.Count() ) diff --git a/filter/source/xmlfilterdetect/filterdetect.cxx b/filter/source/xmlfilterdetect/filterdetect.cxx index b4d614f172cc..d797a9fca61d 100644 --- a/filter/source/xmlfilterdetect/filterdetect.cxx +++ b/filter/source/xmlfilterdetect/filterdetect.cxx @@ -109,7 +109,7 @@ OUString SAL_CALL FilterDetect::detect( com::sun::star::uno::Sequence< com::sun: else if ( nHeader == 0x3C00 ) { bTryUtf16 = true; - pInStream->SetEndianSwap( !pInStream->IsEndianSwap() ); + pInStream->SetEndian( pInStream->GetEndian() == SvStreamEndian::LITTLE ? SvStreamEndian::BIG : SvStreamEndian::LITTLE ); } pInStream->Seek( STREAM_SEEK_TO_BEGIN ); } |