[Libreoffice-commits] core.git: 2 commits - connectivity/source extensions/source filter/source forms/source include/svx include/tools sc/source sd/source shell/source starmath/source svtools/source svx/source sw/source tools/qa tools/source vcl/source
Noel Grandin
noel at peralex.com
Mon Jan 5 02:58:38 PST 2015
connectivity/source/drivers/dbase/DIndex.cxx | 4 +-
connectivity/source/drivers/dbase/DIndexes.cxx | 2 -
connectivity/source/drivers/dbase/DTable.cxx | 8 ++--
extensions/source/scanner/sane.cxx | 2 -
filter/source/graphicfilter/egif/egif.cxx | 2 -
filter/source/graphicfilter/eos2met/eos2met.cxx | 4 +-
filter/source/graphicfilter/epbm/epbm.cxx | 12 ++----
filter/source/graphicfilter/epgm/epgm.cxx | 12 ++----
filter/source/graphicfilter/epict/epict.cxx | 2 -
filter/source/graphicfilter/eppm/eppm.cxx | 12 ++----
filter/source/graphicfilter/eps/eps.cxx | 2 -
filter/source/graphicfilter/eras/eras.cxx | 6 +--
filter/source/graphicfilter/etiff/etiff.cxx | 6 +--
filter/source/graphicfilter/expm/expm.cxx | 6 +--
filter/source/graphicfilter/icgm/cgm.cxx | 2 -
filter/source/graphicfilter/ieps/ieps.cxx | 6 +--
filter/source/graphicfilter/ios2met/ios2met.cxx | 12 ++----
filter/source/graphicfilter/ipbm/ipbm.cxx | 2 -
filter/source/graphicfilter/ipcx/ipcx.cxx | 2 -
filter/source/graphicfilter/ipict/ipict.cxx | 10 ++---
filter/source/graphicfilter/ipsd/ipsd.cxx | 2 -
filter/source/graphicfilter/iras/iras.cxx | 2 -
filter/source/graphicfilter/itga/itga.cxx | 2 -
filter/source/graphicfilter/itiff/itiff.cxx | 11 ++----
filter/source/xmlfilterdetect/filterdetect.cxx | 2 -
forms/source/component/Grid.cxx | 2 -
forms/source/misc/InterfaceContainer.cxx | 2 -
include/svx/svdmodel.hxx | 44 ++++++++++++------------
include/tools/stream.hxx | 20 ++--------
sc/source/filter/excel/xeescher.cxx | 2 -
sc/source/filter/excel/xiescher.cxx | 2 -
sc/source/filter/xcl97/xcl97esc.cxx | 2 -
sc/source/ui/docshell/docsh.cxx | 4 +-
sc/source/ui/inc/impex.hxx | 14 ++++---
sd/source/filter/ppt/propread.cxx | 2 -
shell/source/win32/simplemail/senddoc.cxx | 4 +-
shell/source/win32/workbench/TestSmplMail.cxx | 8 ++--
starmath/source/eqnolefilehdr.cxx | 2 -
starmath/source/mathtype.cxx | 4 +-
svtools/source/misc/imap.cxx | 16 ++++----
svx/source/svdraw/svdmodel.cxx | 4 +-
sw/source/core/edit/edglss.cxx | 4 +-
sw/source/core/unocore/unoobj.cxx | 4 +-
sw/source/filter/ascii/wrtasc.cxx | 3 +
sw/source/filter/ww8/wrtw8esh.cxx | 6 +--
sw/source/filter/ww8/wrtww8.cxx | 6 +--
sw/source/filter/ww8/ww8glsy.cxx | 4 +-
sw/source/filter/ww8/ww8par.cxx | 10 ++---
sw/source/filter/ww8/ww8par4.cxx | 6 +--
sw/source/uibase/dochdl/swdtflvr.cxx | 4 +-
tools/qa/cppunit/test_stream.cxx | 4 +-
tools/source/generic/poly.cxx | 8 ++--
tools/source/stream/stream.cxx | 20 +++++-----
vcl/source/filter/graphicfilter.cxx | 10 ++---
vcl/source/filter/graphicfilter2.cxx | 30 ++++++++--------
vcl/source/filter/igif/gifread.cxx | 6 +--
vcl/source/filter/jpeg/Exif.cxx | 2 -
vcl/source/filter/wmf/wmf.cxx | 12 +++---
vcl/source/filter/wmf/wmfwr.cxx | 2 -
vcl/source/gdi/animate.cxx | 6 +--
vcl/source/gdi/cvtsvm.cxx | 14 +++----
vcl/source/gdi/dibtools.cxx | 12 +++---
vcl/source/gdi/gdimtf.cxx | 14 +++----
vcl/source/gdi/impgraph.cxx | 24 ++++++-------
vcl/source/gdi/pngread.cxx | 8 ++--
vcl/source/gdi/pngwrite.cxx | 6 +--
vcl/source/opengl/OpenGLHelper.cxx | 2 -
67 files changed, 237 insertions(+), 255 deletions(-)
New commits:
commit 8130714148d58dd2bf1ef12dcc6dd6d5838be0d1
Author: Noel Grandin <noel at peralex.com>
Date: Mon Jan 5 08:47:31 2015 +0200
fdo#84938: replace NUMBERFORMAT_INT_ constants with 'enum class'
Change-Id: I9c67de31f5571b282adc132d973b79bccb35fdc9
diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx
index d28fa19..c5f876b 100644
--- a/connectivity/source/drivers/dbase/DIndex.cxx
+++ b/connectivity/source/drivers/dbase/DIndex.cxx
@@ -155,7 +155,7 @@ bool ODbaseIndex::openIndexFile()
m_pFileStream = OFileTable::createStream_simpleError(sFile,STREAM_READ | STREAM_NOCREATE | STREAM_SHARE_DENYNONE);
if(m_pFileStream)
{
- m_pFileStream->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN);
+ m_pFileStream->SetEndian(SvStreamEndian::LITTLE);
m_pFileStream->SetBufferSize(DINDEX_PAGE_SIZE);
(*m_pFileStream) >> *this;
}
@@ -497,7 +497,7 @@ bool ODbaseIndex::CreateImpl()
::dbtools::throwGenericSQLException( sError, *this );
}
- m_pFileStream->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN);
+ m_pFileStream->SetEndian(SvStreamEndian::LITTLE);
m_pFileStream->SetBufferSize(DINDEX_PAGE_SIZE);
// firstly the result must be sorted
diff --git a/connectivity/source/drivers/dbase/DIndexes.cxx b/connectivity/source/drivers/dbase/DIndexes.cxx
index 67625a7..d3f2c87 100644
--- a/connectivity/source/drivers/dbase/DIndexes.cxx
+++ b/connectivity/source/drivers/dbase/DIndexes.cxx
@@ -55,7 +55,7 @@ sdbcx::ObjectType ODbaseIndexes::createObject(const OUString& _rName)
SvStream* pFileStream = ::connectivity::file::OFileTable::createStream_simpleError(sFile,STREAM_READ | STREAM_NOCREATE| STREAM_SHARE_DENYWRITE);
if(pFileStream)
{
- pFileStream->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN);
+ pFileStream->SetEndian(SvStreamEndian::LITTLE);
pFileStream->SetBufferSize(DINDEX_PAGE_SIZE);
ODbaseIndex::NDXHeader aHeader;
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 3abfc03..f8746b9 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -241,7 +241,7 @@ void ODbaseTable::readHeader()
case dBaseIVMemoSQL:
case dBaseIIIMemo:
case FoxProMemo:
- m_pFileStream->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN);
+ m_pFileStream->SetEndian(SvStreamEndian::LITTLE);
if ( m_aHeader.db_frei[17] != 0x00
&& !m_aHeader.db_frei[18] && !m_aHeader.db_frei[19] && getConnection()->isTextEncodingDefaulted() )
{
@@ -283,7 +283,7 @@ void ODbaseTable::readHeader()
}
break;
case dBaseIVMemo:
- m_pFileStream->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN);
+ m_pFileStream->SetEndian(SvStreamEndian::LITTLE);
break;
default:
{
@@ -566,7 +566,7 @@ void ODbaseTable::construct()
bool ODbaseTable::ReadMemoHeader()
{
- m_pMemoStream->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN);
+ m_pMemoStream->SetEndian(SvStreamEndian::LITTLE);
m_pMemoStream->RefreshBuffer(); // make sure that the header information is actually read again
m_pMemoStream->Seek(0L);
@@ -603,7 +603,7 @@ bool ODbaseTable::ReadMemoHeader()
case FoxProMemo:
m_aMemoHeader.db_typ = MemoFoxPro;
m_pMemoStream->Seek(6L);
- m_pMemoStream->SetNumberFormatInt(NUMBERFORMAT_INT_BIGENDIAN);
+ m_pMemoStream->SetEndian(SvStreamEndian::BIG);
(*m_pMemoStream).ReadUInt16( m_aMemoHeader.db_size );
break;
default:
diff --git a/extensions/source/scanner/sane.cxx b/extensions/source/scanner/sane.cxx
index ccc597c..9e14d9b 100644
--- a/extensions/source/scanner/sane.cxx
+++ b/extensions/source/scanner/sane.cxx
@@ -595,7 +595,7 @@ bool Sane::Start( BitmapTransporter& rBitmap )
rBitmap.lock();
SvMemoryStream& aConverter = rBitmap.getStream();
aConverter.Seek( 0 );
- aConverter.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ aConverter.SetEndian( SvStreamEndian::LITTLE );
// write bitmap stream header
aConverter.WriteChar( 'B' ).WriteChar( 'M' );
diff --git a/filter/source/graphicfilter/egif/egif.cxx b/filter/source/graphicfilter/egif/egif.cxx
index 07e2193..4cbbe20 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 36ffc74..18809d5 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 1705cb1..818883f 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 fcd65b8..a2a437d 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 8d67795..4d33b4e 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 7bfde7b..bd42899 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 f3a30e9..ff423e9 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 2bf66db..24d21d2 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 e265c9f..408b48b 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 3b5fd5b..18b0b23 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 fdf2582..d00c40a 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 30e3cd8..db0b165 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 317adee..214e655 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 63a8b09..113b676 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 9622e9b..6bbcc07 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 38e7cde..1022c2f 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 c6bbca3..64b7233 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 91d279b..facca76 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 fb09d58..23f9163 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 1582a11..cd56f63 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 b4d614f..d797a9f 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 );
}
diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx
index 037cf60..bbca710 100644
--- a/include/svx/svdmodel.hxx
+++ b/include/svx/svdmodel.hxx
@@ -181,32 +181,32 @@ protected:
sfx2::LinkManager* pLinkManager; // LinkManager
std::deque<SfxUndoAction*>* pUndoStack;
std::deque<SfxUndoAction*>* pRedoStack;
- SdrUndoGroup* pAktUndoGroup; // for deeper
+ SdrUndoGroup* pAktUndoGroup; // for deeper
sal_uInt16 nUndoLevel; // undo nesting
sal_uInt16 nProgressPercent; // for the ProgressBar-Handler
sal_uInt16 nLoadVersion; // version number of the loaded file
- bool bMyPool:1; // to clean up pMyPool from 303a
- bool bUIOnlyKomma:1; // see eUIUnit
- bool mbUndoEnabled:1; // If false no undo is recorded or we are during the execution of an undo action
- bool bExtColorTable:1; // ne separate ColorTable
- bool mbChanged:1;
- bool bInfoChanged:1;
- bool bPagNumsDirty:1;
- bool bMPgNumsDirty:1;
- bool bPageNotValid:1; // TRUE=Doc is only object container. Page is invalid.
- bool bSavePortable:1; // save metafiles portably
- bool bNoBitmapCaching:1; // cache bitmaps for screen output
- bool bReadOnly:1;
- bool bTransparentTextFrames:1;
- bool bSaveCompressed:1;
- bool bSwapGraphics:1;
- bool bPasteResize:1; // Objects are beingresized due to Paste with different MapMode
- bool bSaveOLEPreview:1; // save preview metafile of OLE objects
- bool bSaveNative:1;
- bool bStarDrawPreviewMode:1;
- bool mbDisableTextEditUsesCommonUndoManager:1;
+ bool bMyPool:1; // to clean up pMyPool from 303a
+ bool bUIOnlyKomma:1; // see eUIUnit
+ bool mbUndoEnabled:1; // If false no undo is recorded or we are during the execution of an undo action
+ bool bExtColorTable:1; // ne separate ColorTable
+ bool mbChanged:1;
+ bool bInfoChanged:1;
+ bool bPagNumsDirty:1;
+ bool bMPgNumsDirty:1;
+ bool bPageNotValid:1; // TRUE=Doc is only object container. Page is invalid.
+ bool bSavePortable:1; // save metafiles portably
+ bool bNoBitmapCaching:1; // cache bitmaps for screen output
+ bool bReadOnly:1;
+ bool bTransparentTextFrames:1;
+ bool bSaveCompressed:1;
+ bool bSwapGraphics:1;
+ bool bPasteResize:1; // Objects are beingresized due to Paste with different MapMode
+ bool bSaveOLEPreview:1; // save preview metafile of OLE objects
+ bool bSaveNative:1;
+ bool bStarDrawPreviewMode:1;
+ bool mbDisableTextEditUsesCommonUndoManager:1;
sal_uInt16 nStreamCompressMode; // write compressedly?
- sal_uInt16 nStreamNumberFormat;
+ SvStreamEndian nStreamNumberFormat;
sal_uInt16 nDefaultTabulator;
sal_uInt32 nMaxUndoCount;
diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx
index 19dae55..dd830ae 100644
--- a/include/tools/stream.hxx
+++ b/include/tools/stream.hxx
@@ -72,8 +72,7 @@ typedef sal_uInt16 StreamMode;
#define STREAM_SEEK_TO_BEGIN 0L
#define STREAM_SEEK_TO_END SAL_MAX_UINT64
-#define NUMBERFORMAT_INT_BIGENDIAN (sal_uInt16)0x0000
-#define NUMBERFORMAT_INT_LITTLEENDIAN (sal_uInt16)0xFFFF
+enum class SvStreamEndian { BIG, LITTLE };
#define COMPRESSMODE_NONE (sal_uInt16)0x0000
#define COMPRESSMODE_ZBITMAP (sal_uInt16)0x0001
@@ -217,7 +216,7 @@ private:
bool bSwap;
bool bIsEof;
sal_uInt32 nError;
- sal_uInt16 nNumberFormatInt;
+ SvStreamEndian nEndian;
sal_uInt16 nCompressMode;
LineEnd eLineDelimiter;
rtl_TextEncoding eStreamCharSet;
@@ -269,10 +268,8 @@ public:
void SetError( sal_uInt32 nErrorCode );
virtual void ResetError();
- void SetNumberFormatInt( sal_uInt16 nNewFormat );
- sal_uInt16 GetNumberFormatInt() const { return nNumberFormatInt; }
- /// Enable/disable swapping of endians, may be needed for Unicode import/export
- inline void SetEndianSwap( bool bVal );
+ void SetEndian( SvStreamEndian SvStreamEndian );
+ SvStreamEndian GetEndian() const { return nEndian; }
/// returns status of endian swap flag
bool IsEndianSwap() const { return bSwap; }
@@ -481,15 +478,6 @@ inline SvStream& operator<<( SvStream& rStr, SvStrPtr f )
return rStr;
}
-inline void SvStream::SetEndianSwap( bool bVal )
-{
-#ifdef OSL_BIGENDIAN
- SetNumberFormatInt( bVal ? NUMBERFORMAT_INT_LITTLEENDIAN : NUMBERFORMAT_INT_BIGENDIAN );
-#else
- SetNumberFormatInt( bVal ? NUMBERFORMAT_INT_BIGENDIAN : NUMBERFORMAT_INT_LITTLEENDIAN );
-#endif
-}
-
TOOLS_DLLPUBLIC SvStream& endl( SvStream& rStr );
/// same as endl() but Unicode
TOOLS_DLLPUBLIC SvStream& endlu( SvStream& rStr );
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index f3cd939..5e5e213 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -1615,7 +1615,7 @@ void XclExpObjectManager::InitStream( bool bTempFile )
if( !mxDffStrm.get() )
mxDffStrm.reset( new SvMemoryStream );
- mxDffStrm->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ mxDffStrm->SetEndian( SvStreamEndian::LITTLE );
}
XclExpEmbeddedObjectManager::XclExpEmbeddedObjectManager(
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index f45a8b5..8bca3fb 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -4018,7 +4018,7 @@ void XclImpDrawing::ReadBmp( Graphic& rGraphic, const XclImpRoot& rRoot, XclImpS
if( (nHdrSize == 12) && (nPlanes == 1) && (nDepth == 32) )
{
rStrm.Ignore( 3 );
- aMemStrm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ aMemStrm.SetEndian( SvStreamEndian::LITTLE );
aMemStrm.WriteUInt32( nHdrSize ).WriteUInt16( nWidth ).WriteUInt16( nHeight ).WriteUInt16( nPlanes ).WriteUInt16( nDepth );
rStrm.CopyToStream( aMemStrm, rStrm.GetRecLeft() );
}
diff --git a/sc/source/filter/xcl97/xcl97esc.cxx b/sc/source/filter/xcl97/xcl97esc.cxx
index 271519a..6bd7448 100644
--- a/sc/source/filter/xcl97/xcl97esc.cxx
+++ b/sc/source/filter/xcl97/xcl97esc.cxx
@@ -87,7 +87,7 @@ SvStream* XclEscherExGlobal::ImplQueryPictureStream()
{
mxPicTempFile->EnableKillingFile();
mxPicStrm.reset( ::utl::UcbStreamHelper::CreateStream( mxPicTempFile->GetURL(), STREAM_STD_READWRITE ) );
- mxPicStrm->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ mxPicStrm->SetEndian( SvStreamEndian::LITTLE );
}
return mxPicStrm.get();
}
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 96c527d..67b5d5d 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -1814,7 +1814,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
rtl_TextEncoding eOldCharSet = rStream.GetStreamCharSet();
rStream.SetStreamCharSet( eCharSet );
- sal_uInt16 nOldNumberFormatInt = rStream.GetNumberFormatInt();
+ SvStreamEndian nOldNumberFormatInt = rStream.GetEndian();
OString aStrDelimEncoded; // only used if not Unicode
OUString aStrDelimDecoded; // only used if context encoding
OString aDelimEncoded;
@@ -2180,7 +2180,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
}
rStream.SetStreamCharSet( eOldCharSet );
- rStream.SetNumberFormatInt( nOldNumberFormatInt );
+ rStream.SetEndian( nOldNumberFormatInt );
}
bool ScDocShell::ConvertTo( SfxMedium &rMed )
diff --git a/sc/source/ui/inc/impex.hxx b/sc/source/ui/inc/impex.hxx
index 22ced95..1d070c1 100644
--- a/sc/source/ui/inc/impex.hxx
+++ b/sc/source/ui/inc/impex.hxx
@@ -166,18 +166,18 @@ public:
inline bool ScImportExport::IsEndianSwap( const SvStream& rStrm )
{
#ifdef OSL_BIGENDIAN
- return rStrm.GetNumberFormatInt() != NUMBERFORMAT_INT_BIGENDIAN;
+ return rStrm.GetEndian() != SvStreamEndian::BIG;
#else
- return rStrm.GetNumberFormatInt() != NUMBERFORMAT_INT_LITTLEENDIAN;
+ return rStrm.GetEndian() != SvStreamEndian::LITTLE;
#endif
}
inline void ScImportExport::SetNoEndianSwap( SvStream& rStrm )
{
#ifdef OSL_BIGENDIAN
- rStrm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
+ rStrm.SetEndian( SvStreamEndian::BIG );
#else
- rStrm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ rStrm.SetEndian( SvStreamEndian::LITTLE );
#endif
}
@@ -190,7 +190,11 @@ public:
rStr.getLength() * sizeof(sal_Unicode), STREAM_READ)
{
SetStreamCharSet( RTL_TEXTENCODING_UNICODE );
- SetEndianSwap( false );
+#ifdef OSL_BIGENDIAN
+ SetEndian(SvStreamEndian::BIG);
+#else
+ SetEndian(SvStreamEndian::LITTLE);
+#endif
}
};
diff --git a/sd/source/filter/ppt/propread.cxx b/sd/source/filter/ppt/propread.cxx
index 69034aa..ec95e40 100644
--- a/sd/source/filter/ppt/propread.cxx
+++ b/sd/source/filter/ppt/propread.cxx
@@ -512,7 +512,7 @@ PropRead::PropRead( SvStorage& rStorage, const OUString& rName ) :
mpSvStream = rStorage.OpenSotStream( rName, STREAM_STD_READ );
if ( mpSvStream )
{
- mpSvStream->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ mpSvStream->SetEndian( SvStreamEndian::LITTLE );
memset( mApplicationCLSID, 0, 16 );
mbStatus = true;
}
diff --git a/starmath/source/eqnolefilehdr.cxx b/starmath/source/eqnolefilehdr.cxx
index 75d180f..d1d7428 100644
--- a/starmath/source/eqnolefilehdr.cxx
+++ b/starmath/source/eqnolefilehdr.cxx
@@ -38,7 +38,7 @@ bool GetMathTypeVersion( SotStorage* pStor, sal_uInt8 &nVersion )
if ( (!xSrc.Is()) || (SVSTREAM_OK != xSrc->GetError()))
return bSuccess;
SvStorageStream *pS = &xSrc;
- pS->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ pS->SetEndian( SvStreamEndian::LITTLE );
EQNOLEFILEHDR aHdr;
aHdr.Read(pS);
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx
index 21800ce..bdbc36e 100644
--- a/starmath/source/mathtype.cxx
+++ b/starmath/source/mathtype.cxx
@@ -560,7 +560,7 @@ int MathType::Parse(SotStorage *pStor)
if ( (!xSrc.Is()) || (SVSTREAM_OK != xSrc->GetError()))
return 0;
pS = &xSrc;
- pS->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ pS->SetEndian( SvStreamEndian::LITTLE );
EQNOLEFILEHDR aHdr;
aHdr.Read(pS);
@@ -1934,7 +1934,7 @@ int MathType::ConvertFromStarMath( SfxMedium& rMedium )
return 0;
pS = &xSrc;
- pS->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ pS->SetEndian( SvStreamEndian::LITTLE );
pS->SeekRel(EQNOLEFILEHDR_SIZE); //Skip 28byte Header and fill it in later
pS->WriteUChar( sal_uInt8(0x03) );
diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx
index 3f687c2..6ff356b 100644
--- a/svtools/source/misc/imap.cxx
+++ b/svtools/source/misc/imap.cxx
@@ -945,11 +945,11 @@ void ImageMap::Write( SvStream& rOStm, const OUString& rBaseURL ) const
{
IMapCompat* pCompat;
OUString aImageName( GetName() );
- sal_uInt16 nOldFormat = rOStm.GetNumberFormatInt();
- sal_uInt16 nCount = (sal_uInt16) GetIMapObjectCount();
+ SvStreamEndian nOldFormat = rOStm.GetEndian();
+ sal_uInt16 nCount = (sal_uInt16) GetIMapObjectCount();
const rtl_TextEncoding eEncoding = osl_getThreadTextEncoding(); //vomit!
- rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ rOStm.SetEndian( SvStreamEndian::LITTLE );
// write MagicCode
rOStm.WriteCharPtr( IMAPMAGIC );
@@ -967,7 +967,7 @@ void ImageMap::Write( SvStream& rOStm, const OUString& rBaseURL ) const
ImpWriteImageMap( rOStm, rBaseURL );
- rOStm.SetNumberFormatInt( nOldFormat );
+ rOStm.SetEndian( nOldFormat );
}
@@ -979,11 +979,11 @@ void ImageMap::Write( SvStream& rOStm, const OUString& rBaseURL ) const
void ImageMap::Read( SvStream& rIStm, const OUString& rBaseURL )
{
- char cMagic[6];
- sal_uInt16 nOldFormat = rIStm.GetNumberFormatInt();
+ char cMagic[6];
+ SvStreamEndian nOldFormat = rIStm.GetEndian();
sal_uInt16 nCount;
- rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ rIStm.SetEndian( SvStreamEndian::LITTLE );
rIStm.Read( cMagic, sizeof( cMagic ) );
if ( !memcmp( cMagic, IMAPMAGIC, sizeof( cMagic ) ) )
@@ -1012,7 +1012,7 @@ void ImageMap::Read( SvStream& rIStm, const OUString& rBaseURL )
else
rIStm.SetError( SVSTREAM_GENERALERROR );
- rIStm.SetNumberFormatInt( nOldFormat );
+ rIStm.SetEndian( nOldFormat );
}
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 5c2db6f..84efe695 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -155,7 +155,7 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe
bNoBitmapCaching=false;
bReadOnly=false;
nStreamCompressMode=COMPRESSMODE_NONE;
- nStreamNumberFormat=NUMBERFORMAT_INT_BIGENDIAN;
+ nStreamNumberFormat=SvStreamEndian::BIG;
nDefaultTabulator=0;
mpNumberFormatter = NULL;
bTransparentTextFrames=false;
@@ -177,7 +177,7 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe
get();
#ifdef OSL_LITENDIAN
- nStreamNumberFormat=NUMBERFORMAT_INT_LITTLEENDIAN;
+ nStreamNumberFormat=SvStreamEndian::LITTLE;
#endif
bExtColorTable=bUseExtColorTable;
diff --git a/sw/source/core/edit/edglss.cxx b/sw/source/core/edit/edglss.cxx
index 9df9e66..f67c3df 100644
--- a/sw/source/core/edit/edglss.cxx
+++ b/sw/source/core/edit/edglss.cxx
@@ -290,9 +290,9 @@ bool SwEditShell::GetSelectedText( OUString &rBuf, int nHndlParaBrk )
{
SvMemoryStream aStream;
#ifdef OSL_BIGENDIAN
- aStream.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
+ aStream.SetEndian( SvStreamEndian::BIG );
#else
- aStream.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ aStream.SetEndian( SvStreamEndian::LITTLE );
#endif
WriterRef xWrt;
SwReaderWriter::GetWriter( OUString(FILTER_TEXT), OUString(), xWrt );
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index da3d5ea..fdaf53d 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -167,9 +167,9 @@ void SwUnoCursorHelper::GetTextFromPam(SwPaM & rPam, OUString & rBuffer)
}
SvMemoryStream aStream;
#ifdef OSL_BIGENDIAN
- aStream.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
+ aStream.SetEndian( SvStreamEndian::BIG );
#else
- aStream.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ aStream.SetEndian( SvStreamEndian::LITTLE );
#endif
WriterRef xWrt;
// TODO/MBA: looks like a BaseURL doesn't make sense here
diff --git a/sw/source/filter/ascii/wrtasc.cxx b/sw/source/filter/ascii/wrtasc.cxx
index e8cae74..66a6716 100644
--- a/sw/source/filter/ascii/wrtasc.cxx
+++ b/sw/source/filter/ascii/wrtasc.cxx
@@ -157,10 +157,11 @@ sal_uLong SwASCWriter::WriteStream()
Strm().WriteUChar( 0xEF ).WriteUChar( 0xBB ).WriteUChar( 0xBF );
break;
case RTL_TEXTENCODING_UCS2:
- Strm().SetEndianSwap(false);
#ifdef OSL_LITENDIAN
+ Strm().SetEndian(SvStreamEndian::LITTLE);
Strm().WriteUChar( 0xFF ).WriteUChar( 0xFE );
#else
+ Strm().SetEndian(SvStreamEndian::BIG);
Strm().WriteUChar( 0xFE ).WriteUChar( 0xFF );
#endif
break;
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 3f2707f..e79dd9d 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -1447,7 +1447,7 @@ void WW8Export::CreateEscher()
{
OSL_ENSURE( !pEscher, "wer hat den Pointer nicht geloescht?" );
SvMemoryStream* pEscherStrm = new SvMemoryStream;
- pEscherStrm->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN);
+ pEscherStrm->SetEndian(SvStreamEndian::LITTLE);
pEscher = new SwEscherEx(pEscherStrm, *this);
}
}
@@ -1495,7 +1495,7 @@ SvStream* SwEscherExGlobal::ImplQueryPictureStream()
{
// this function will be called exactly once
mxPicStrm.reset( new SvMemoryStream );
- mxPicStrm->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN);
+ mxPicStrm->SetEndian(SvStreamEndian::LITTLE);
return mxPicStrm.get();
}
@@ -2113,7 +2113,7 @@ sal_Int32 SwEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType
{
Polygon aPoly = CorrectWordWrapPolygonForExport(*pPolyPoly, pNd);
SvMemoryStream aPolyDump;
- aPolyDump.SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN);
+ aPolyDump.SetEndian(SvStreamEndian::LITTLE);
sal_uInt16 nLen = aPoly.GetSize();
aPolyDump.WriteUInt16( nLen );
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 134b4ae..c45b7e9 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -3151,15 +3151,15 @@ void WW8Export::ExportDocument_Impl()
xDataStrm->SetBufferSize( 32768 ); // for graphics
xTableStrm->SetBufferSize( 16384 ); // for the Font-/Style-Table, etc.
- xTableStrm->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
- xDataStrm->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ xTableStrm->SetEndian( SvStreamEndian::LITTLE );
+ xDataStrm->SetEndian( SvStreamEndian::LITTLE );
}
GetWriter().SetStream( & *xWwStrm );
pTableStrm = &xTableStrm;
pDataStrm = &xDataStrm;
- Strm().SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ Strm().SetEndian( SvStreamEndian::LITTLE );
utl::TempFile aTempMain;
aTempMain.EnableKillingFile();
diff --git a/sw/source/filter/ww8/ww8glsy.cxx b/sw/source/filter/ww8/ww8glsy.cxx
index cb60ebf..680d262 100644
--- a/sw/source/filter/ww8/ww8glsy.cxx
+++ b/sw/source/filter/ww8/ww8glsy.cxx
@@ -37,7 +37,7 @@ WW8Glossary::WW8Glossary(SvStorageStreamRef &refStrm, sal_uInt8 nVersion,
SvStorage *pStg)
: pGlossary(0), rStrm(refStrm), xStg(pStg), nStrings(0)
{
- refStrm->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN);
+ refStrm->SetEndian(SvStreamEndian::LITTLE);
WW8Fib aWwFib(*refStrm, nVersion);
if (aWwFib.nFibBack >= 0x6A) //Word97
@@ -47,7 +47,7 @@ WW8Glossary::WW8Glossary(SvStorageStreamRef &refStrm, sal_uInt8 nVersion,
if (xTableStream.Is() && SVSTREAM_OK == xTableStream->GetError())
{
- xTableStream->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN);
+ xTableStream->SetEndian(SvStreamEndian::LITTLE);
pGlossary =
new WW8GlossaryFib(*refStrm, nVersion, *xTableStream, aWwFib);
}
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index f94ecbd..1d7dcad 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4237,7 +4237,7 @@ SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, SvStorage* pStorage,
, maCurrAttrCP(-1)
, mbOnLoadingMain(false)
{
- pStrm->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ pStrm->SetEndian( SvStreamEndian::LITTLE );
maApos.push_back(false);
}
@@ -4842,13 +4842,13 @@ bool SwWW8ImplReader::ReadGlobalTemplateSettings( const OUString& sCreatedFrom,
lcl_createTemplateToProjectEntry( xPrjNameCache, aURL, aBasicImporter.getProjectName() );
// Read toolbars & menus
SvStorageStreamRef refMainStream = rRoot->OpenSotStream( OUString( "WordDocument" ));
- refMainStream->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN);
+ refMainStream->SetEndian(SvStreamEndian::LITTLE);
WW8Fib aWwFib( *refMainStream, 8 );
SvStorageStreamRef xTableStream = rRoot->OpenSotStream(OUString::createFromAscii( aWwFib.fWhichTblStm ? SL::a1Table : SL::a0Table), STREAM_STD_READ);
if (xTableStream.Is() && SVSTREAM_OK == xTableStream->GetError())
{
- xTableStream->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN);
+ xTableStream->SetEndian(SvStreamEndian::LITTLE);
WW8Customizations aGblCustomisations( xTableStream, aWwFib );
aGblCustomisations.Import( mpDocShell );
}
@@ -5368,7 +5368,7 @@ sal_uLong SwWW8ImplReader::SetSubStreams(SvStorageStreamRef &rTableStream,
STREAM_STD_READ);
pTableStream = &rTableStream;
- pTableStream->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ pTableStream->SetEndian( SvStreamEndian::LITTLE );
rDataStream = pStg->OpenSotStream(OUString(SL::aData),
STREAM_STD_READ | STREAM_NOCREATE );
@@ -5376,7 +5376,7 @@ sal_uLong SwWW8ImplReader::SetSubStreams(SvStorageStreamRef &rTableStream,
if (rDataStream.Is() && SVSTREAM_OK == rDataStream->GetError())
{
pDataStream = &rDataStream;
- pDataStream->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN);
+ pDataStream->SetEndian(SvStreamEndian::LITTLE);
}
else
pDataStream = pStrm;
diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx
index bc48b29..afa5846 100644
--- a/sw/source/filter/ww8/ww8par4.cxx
+++ b/sw/source/filter/ww8/ww8par4.cxx
@@ -85,7 +85,7 @@ static bool SwWw8ReadScaling(long& rX, long& rY, SvStorageRef& rSrc1)
SvStorageStreamRef xSrc3 = rSrc1->OpenSotStream( OUString("\3PIC"),
STREAM_STD_READ | STREAM_NOCREATE);
SvStorageStream* pS = xSrc3;
- pS->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ pS->SetEndian( SvStreamEndian::LITTLE );
pS->Seek( STREAM_SEEK_TO_END );
OSL_ENSURE( pS->Tell() >= 76, "+OLE-PIC-Stream is shorter than 76 Byte" );
@@ -130,7 +130,7 @@ static bool SwWw6ReadMetaStream(GDIMetaFile& rWMF, OLE_MFP* pMfp,
SvStorageStreamRef xSrc2 = rSrc1->OpenSotStream( OUString("\3META"),
STREAM_STD_READ | STREAM_NOCREATE);
SvStorageStream* pSt = xSrc2;
- pSt->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ pSt->SetEndian( SvStreamEndian::LITTLE );
sal_uLong nRead = pSt->Read( pMfp, sizeof(*pMfp ) );
// Mini-Placable-Header lesen
if (nRead != sizeof(*pMfp))
@@ -184,7 +184,7 @@ static bool SwWw6ReadMacPICTStream(Graphic& rGraph, SvStorageRef& rSrc1)
// 03-META-Stream nicht da. Vielleicht ein 03-PICT ?
SvStorageStreamRef xSrc4 = rSrc1->OpenSotStream(OUString("\3PICT"));
SvStorageStream* pStp = xSrc4;
- pStp->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ pStp->SetEndian( SvStreamEndian::LITTLE );
sal_uInt8 aTestA[10]; // Ist der 01Ole-Stream ueberhaupt vorhanden
sal_uLong nReadTst = pStp->Read( aTestA, sizeof( aTestA ) );
if (nReadTst != sizeof(aTestA))
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 41603a2..3ff1a1e 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -1645,9 +1645,9 @@ bool SwTransferable::_PasteFileContent( TransferableDataHelper& rData,
sData.getLength() * sizeof( sal_Unicode ),
STREAM_READ );
#ifdef OSL_BIGENDIAN
- pStream->SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
+ pStream->SetEndian( SvStreamEndian::BIG );
#else
- pStream->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ pStream->SetEndian( SvStreamEndian::LITTLE );
#endif
SwAsciiOptions aAOpt;
diff --git a/tools/qa/cppunit/test_stream.cxx b/tools/qa/cppunit/test_stream.cxx
index 57c30e5..5c9d8fd 100644
--- a/tools/qa/cppunit/test_stream.cxx
+++ b/tools/qa/cppunit/test_stream.cxx
@@ -187,7 +187,7 @@ namespace
CPPUNIT_ASSERT(!aMemStream.bad());
CPPUNIT_ASSERT(aMemStream.eof());
- aMemStream.SetNumberFormatInt(NUMBERFORMAT_INT_BIGENDIAN);
+ aMemStream.SetEndian(SvStreamEndian::BIG);
aMemStream.Seek(0);
foo[0] = 0;
foo[1] = 3;
@@ -197,7 +197,7 @@ namespace
CPPUNIT_ASSERT(!aMemStream.bad());
CPPUNIT_ASSERT(!aMemStream.eof());
- aMemStream.SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN);
+ aMemStream.SetEndian(SvStreamEndian::LITTLE);
aMemStream.Seek(0);
foo[0] = 3;
foo[1] = 0;
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index 5d8f88a..c1eb8b5 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -1560,9 +1560,9 @@ SvStream& ReadPolygon( SvStream& rIStream, Polygon& rPoly )
}
#if (SAL_TYPES_SIZEOFLONG) == 4
#ifdef OSL_BIGENDIAN
- if ( rIStream.GetNumberFormatInt() == NUMBERFORMAT_INT_BIGENDIAN )
+ if ( rIStream.GetEndian() == SvStreamEndian::BIG )
#else
- if ( rIStream.GetNumberFormatInt() == NUMBERFORMAT_INT_LITTLEENDIAN )
+ if ( rIStream.GetEndian() == SvStreamEndian::LITTLE )
#endif
rIStream.Read( rPoly.mpImplPolygon->mpPointAry, nPoints*sizeof(Point) );
else
@@ -1595,9 +1595,9 @@ SvStream& WritePolygon( SvStream& rOStream, const Polygon& rPoly )
// Determine whether we need to write through operators
#if (SAL_TYPES_SIZEOFLONG) == 4
#ifdef OSL_BIGENDIAN
- if ( rOStream.GetNumberFormatInt() == NUMBERFORMAT_INT_BIGENDIAN )
+ if ( rOStream.GetEndian() == SvStreamEndian::BIG )
#else
- if ( rOStream.GetNumberFormatInt() == NUMBERFORMAT_INT_LITTLEENDIAN )
+ if ( rOStream.GetEndian() == SvStreamEndian::LITTLE )
#endif
{
if ( nPoints )
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index 864876f..db4a398 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -388,7 +388,7 @@ void SvStream::ImpInit()
eLineDelimiter = LINEEND_CRLF; // DOS-Format
#endif
- SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ SetEndian( SvStreamEndian::LITTLE );
m_nBufFilePos = 0;
nBufActualPos = 0;
@@ -450,15 +450,15 @@ void SvStream::SetError( sal_uInt32 nErrorCode )
nError = nErrorCode;
}
-void SvStream::SetNumberFormatInt( sal_uInt16 nNewFormat )
+void SvStream::SetEndian( SvStreamEndian nNewFormat )
{
- nNumberFormatInt = nNewFormat;
+ nEndian = nNewFormat;
bSwap = false;
#ifdef OSL_BIGENDIAN
- if( nNumberFormatInt == NUMBERFORMAT_INT_LITTLEENDIAN )
+ if( nEndian == SvStreamEndian::LITTLE )
bSwap = true;
#else
- if( nNumberFormatInt == NUMBERFORMAT_INT_BIGENDIAN )
+ if( nEndian == SvStreamEndian::BIG )
bSwap = true;
#endif
}
@@ -795,11 +795,11 @@ bool SvStream::WriteUniOrByteChar( sal_Unicode ch, rtl_TextEncoding eDestCharSet
bool SvStream::StartWritingUnicodeText()
{
- SetEndianSwap( false ); // write native format
// BOM, Byte Order Mark, U+FEFF, see
// http://www.unicode.org/faq/utf_bom.html#BOM
// Upon read: 0xfeff(-257) => no swap; 0xfffe(-2) => swap
- WriteUInt16( 0xfeff );
+ sal_uInt16 v = 0xfeff;
+ WRITENUMBER_WITHOUT_SWAP(sal_uInt16, v); // write native format
return nError == SVSTREAM_OK;
}
@@ -827,18 +827,18 @@ bool SvStream::StartReadingUnicodeText( rtl_TextEncoding eReadBomCharSet )
if ( eReadBomCharSet == RTL_TEXTENCODING_DONTKNOW ||
eReadBomCharSet == RTL_TEXTENCODING_UNICODE)
{
- SetEndianSwap( !bSwap );
+ SetEndian( nEndian == SvStreamEndian::BIG ? SvStreamEndian::LITTLE : SvStreamEndian::BIG );
nBack = 0;
}
break;
case 0xefbb :
- if (nNumberFormatInt == NUMBERFORMAT_INT_BIGENDIAN &&
+ if (nEndian == SvStreamEndian::BIG &&
(eReadBomCharSet == RTL_TEXTENCODING_DONTKNOW ||
eReadBomCharSet == RTL_TEXTENCODING_UTF8))
bTryUtf8 = true;
break;
case 0xbbef :
- if (nNumberFormatInt == NUMBERFORMAT_INT_LITTLEENDIAN &&
+ if (nEndian == SvStreamEndian::LITTLE &&
(eReadBomCharSet == RTL_TEXTENCODING_DONTKNOW ||
eReadBomCharSet == RTL_TEXTENCODING_UTF8))
bTryUtf8 = true;
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 9ef46c8..cff0fed 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 138b4fc..2752eeb 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 2ed44e0..7b87230 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 1a0f05b..a39c2db 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 3d932f2..21ab4a4 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 e2b4aef..de1c96e 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 c6f2438..9666e0f 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 c8676c0..4e0bb5a 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 af6a78e..054c070 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 20e4c22..1a49cdc 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 bb31b81..2c2a747 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 36e6803..8c30c45 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 c1a73cf..683f6fc 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;
}
commit 54942f0d093e42b06c7a6c10e93d632bfe0c6519
Author: Noel Grandin <noel at peralex.com>
Date: Tue Dec 23 14:39:22 2014 +0200
spelling: attachement -> attachment
Change-Id: I1bb1ad04adec864b594d96711f85b8fcdc1d1ef2
diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx
index a3e727b..78860c8 100644
--- a/forms/source/component/Grid.cxx
+++ b/forms/source/component/Grid.cxx
@@ -912,7 +912,7 @@ void OGridControlModel::read(const Reference<XObjectInputStream>& _rxInStream) t
_rxInStream->skipBytes(nObjLen);
xMark->deleteMark(nMark);
}
- // reading the attachement
+ // reading the attachment
for (sal_Int32 i = 0; i < nLen; i++)
{
InterfaceRef xIfc(m_aItems[i], UNO_QUERY);
diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx
index 0d4ef2d..f0bf92b 100644
--- a/forms/source/misc/InterfaceContainer.cxx
+++ b/forms/source/misc/InterfaceContainer.cxx
@@ -455,7 +455,7 @@ void SAL_CALL OInterfaceContainer::readEvents(const Reference<XObjectInputStream
xMark->deleteMark(nMark);
}
- // Read Attachement
+ // Read Attachment
if ( m_xEventAttacher.is() )
{
OInterfaceArray::const_iterator aAttach = m_aItems.begin();
diff --git a/shell/source/win32/simplemail/senddoc.cxx b/shell/source/win32/simplemail/senddoc.cxx
index 906497b..37c5377 100644
--- a/shell/source/win32/simplemail/senddoc.cxx
+++ b/shell/source/win32/simplemail/senddoc.cxx
@@ -116,7 +116,7 @@ void initRecipientList(MapiRecipientList_t* pMapiRecipientList)
}
/** @internal */
-void initAttachementList(MapiAttachmentList_t* pMapiAttachmentList)
+void initAttachmentList(MapiAttachmentList_t* pMapiAttachmentList)
{
OSL_ASSERT(pMapiAttachmentList->empty());
@@ -276,7 +276,7 @@ int main(int argc, char* argv[])
initMapiOriginator(&mapiOriginator);
initRecipientList(&mapiRecipientList);
- initAttachementList(&mapiAttachmentList);
+ initAttachmentList(&mapiAttachmentList);
initMapiMessage((gFrom.length() ? &mapiOriginator : NULL), mapiRecipientList, mapiAttachmentList, &mapiMsg);
ulRet = mapi.MAPISendMail(hSession, 0, &mapiMsg, gMapiFlags, 0);
diff --git a/shell/source/win32/workbench/TestSmplMail.cxx b/shell/source/win32/workbench/TestSmplMail.cxx
index b964dc4..9067b28 100644
--- a/shell/source/win32/workbench/TestSmplMail.cxx
+++ b/shell/source/win32/workbench/TestSmplMail.cxx
@@ -120,20 +120,20 @@ int SAL_CALL main(int , char*, char* )
xSmplMailMsg->setSubject( OUString("Mapi Test") );
- Sequence< OUString > attachements( 2 );
+ Sequence< OUString > attachments( 2 );
OUString aFile("D:\\Projects\\gsl\\shell\\wntmsci7\\bin\\testprx.exe");
OUString aFileURL;
osl::FileBase::getFileURLFromSystemPath( aFile, aFileURL );
- attachements[0] = aFileURL;
+ attachments[0] = aFileURL;
aFile = "D:\\Projects\\gsl\\shell\\wntmsci7\\bin\\testsyssh.exe";
osl::FileBase::getFileURLFromSystemPath( aFile, aFileURL );
- attachements[1] = aFile;
+ attachments[1] = aFile;
- xSmplMailMsg->setAttachement( attachements );
+ xSmplMailMsg->setAttachement( attachments );
xSmplMailClient->sendSimpleMailMessage( xSmplMailMsg, 0 );
}
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index a30b9ef..ddb0e7c 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -315,7 +315,7 @@ void OpenGLHelper::createFramebuffer(long nWidth, long nHeight, GLuint& nFramebu
glGenFramebuffers(1, &nFramebufferId);
glCheckFramebufferStatus(GL_FRAMEBUFFER);
glBindFramebuffer(GL_FRAMEBUFFER, nFramebufferId);
- // attach a renderbuffer to FBO color attachement point
+ // attach a renderbuffer to FBO color attachment point
glBindRenderbuffer(GL_RENDERBUFFER, nRenderbufferColorId);
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, nRenderbufferColorId);
glCheckFramebufferStatus(GL_FRAMEBUFFER);
More information about the Libreoffice-commits
mailing list