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 /sc | |
parent | 54942f0d093e42b06c7a6c10e93d632bfe0c6519 (diff) |
fdo#84938: replace NUMBERFORMAT_INT_ constants with 'enum class'
Change-Id: I9c67de31f5571b282adc132d973b79bccb35fdc9
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/excel/xeescher.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xiescher.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xcl97/xcl97esc.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/inc/impex.hxx | 14 |
5 files changed, 14 insertions, 10 deletions
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx index f3cd939ff3d2..5e5e213abc92 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 f45a8b534c7e..8bca3fb69d93 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 271519abcc50..6bd7448a780e 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 96c527df0d4d..67b5d5d4a31c 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 22ced95b5e4f..1d070c142568 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 } }; |