diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2011-01-14 07:48:54 -0600 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2011-01-14 07:48:54 -0600 |
commit | 8f9c63dc92d086750a1d07eb14821782bdacc012 (patch) | |
tree | 6b128d391b4dcb02265ff65e186b6ae41037b332 /svl | |
parent | 16752e0ac995a3cc8829abaa723392d653055775 (diff) |
remove a debug-only 3-state confusing pseudo-boolean...
Diffstat (limited to 'svl')
-rw-r--r-- | svl/inc/svl/filerec.hxx | 19 | ||||
-rw-r--r-- | svl/source/filerec/filerec.cxx | 19 |
2 files changed, 8 insertions, 30 deletions
diff --git a/svl/inc/svl/filerec.hxx b/svl/inc/svl/filerec.hxx index 78f1e5933c05..a551caebb027 100644 --- a/svl/inc/svl/filerec.hxx +++ b/svl/inc/svl/filerec.hxx @@ -40,8 +40,6 @@ SV_DECL_VARARR( SfxUINT32s, UINT32, 8, 8 ) //------------------------------------------------------------------------ -#define SFX_BOOL_DONTCARE BOOL(2) // Don't-Care-Wert f"ur BOOLs - #define SFX_REC_PRETAG_EXT BYTE(0x00) // Pre-Tag f"ur Extended-Records #define SFX_REC_PRETAG_EOR BYTE(0xFF) // Pre-Tag f"ur End-Of-Records @@ -224,10 +222,7 @@ class SVL_DLLPUBLIC SfxMiniRecordWriter protected: SvStream* _pStream; // <SvStream>, in dem der Record liegt UINT32 _nStartPos; // Start-Position des Gesamt-Records im Stream - bool _bHeaderOk; /* TRUE, wenn der Header schon geschrieben ist; - bei DBG_UTIL wird SFX_BOOL_DONTCARE ver- - wendet, um die Gr"o\se von Fix-Sized-Records - zu pr"ufen. */ + bool _bHeaderOk; /* TRUE, wenn der Header schon geschrieben ist; */ BYTE _nPreTag; // in den Header zu schreibendes 'Pre-Tag' public: @@ -709,7 +704,7 @@ inline SfxMiniRecordWriter::SfxMiniRecordWriter : _pStream( pStream ), _nStartPos( pStream->Tell() ), - _bHeaderOk(FALSE), + _bHeaderOk(false), _nPreTag( nTag ) { DBG_ASSERT( _nPreTag != 0xFF, "invalid Tag" ); @@ -736,7 +731,7 @@ inline SfxMiniRecordWriter::SfxMiniRecordWriter : _pStream( pStream ), // _nTag( uninitialized ), // _nStarPos( uninitialized ), - _bHeaderOk(SFX_BOOL_DONTCARE) + _bHeaderOk(true) { DBG_ASSERT( nTag != 0 && nTag != 0xFF, "invalid Tag" ); DBG(_nStartPos = pStream->Tell()); @@ -758,7 +753,7 @@ inline SfxMiniRecordWriter::~SfxMiniRecordWriter() { // wurde der Header noch nicht geschrieben oder mu\s er gepr"uft werden - if ( !_bHeaderOk DBG(||TRUE) ) + if ( !_bHeaderOk ) Close(); } @@ -782,7 +777,7 @@ inline SvStream& SfxMiniRecordWriter::operator*() const inline void SfxMiniRecordWriter::Reset() { _pStream->Seek( _nStartPos + SFX_REC_HEADERSIZE_MINI ); - _bHeaderOk = FALSE; + _bHeaderOk = false; } //========================================================================= @@ -901,7 +896,7 @@ inline void SfxSingleRecordWriter::Reset() { _pStream->Seek( _nStartPos + SFX_REC_HEADERSIZE_MINI + SFX_REC_HEADERSIZE_SINGLE ); - _bHeaderOk = FALSE; + _bHeaderOk = false; } //========================================================================= @@ -1022,7 +1017,7 @@ inline void SfxMultiFixRecordWriter::Reset() _pStream->Seek( _nStartPos + SFX_REC_HEADERSIZE_MINI + SFX_REC_HEADERSIZE_SINGLE + SFX_REC_HEADERSIZE_MULTI ); - _bHeaderOk = FALSE; + _bHeaderOk = false; } //========================================================================= diff --git a/svl/source/filerec/filerec.cxx b/svl/source/filerec/filerec.cxx index c11c7eae8e7b..e8f4b05603ad 100644 --- a/svl/source/filerec/filerec.cxx +++ b/svl/source/filerec/filerec.cxx @@ -119,26 +119,9 @@ UINT32 SfxMiniRecordWriter::Close _pStream->Seek( nEndPos ); // Header wurde JETZT geschrieben - _bHeaderOk = TRUE; + _bHeaderOk = true; return nEndPos; } -#ifdef DBG_UTIL - // mu\s Fix-Size-Record gepr"uft werden? - else if ( SFX_BOOL_DONTCARE == _bHeaderOk ) - { - // Header auslesen, um Soll-Gr"o\se zu bestimmen - UINT32 nEndPos = _pStream->Tell(); - _pStream->Seek( _nStartPos ); - UINT32 nHeader; - *_pStream >> nHeader; - _pStream->Seek( nEndPos ); - - // Soll-Gr"o\se mit Ist-Gr"o\se vergleichen - DBG_ASSERT( nEndPos - SFX_REC_OFS(nHeader) == _nStartPos + sizeof(UINT32), - "fixed record size incorrect" ); - DbgOutf( "SfxFileRec: written record until %ul", nEndPos ); - } -#endif // Record war bereits geschlossen return 0; |