diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-03-16 11:05:46 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-03-20 12:57:31 +0000 |
commit | 00f32691bfcbfbecc824e65e60a506b0035f9643 (patch) | |
tree | 51237e187c8bc09ad6ad8ae4db3a8c94bff70167 /svl | |
parent | c3eccfd1c2259ec8394988f900539797e27219fa (diff) |
SfxUINT32s->std::vector
Diffstat (limited to 'svl')
-rw-r--r-- | svl/inc/svl/filerec.hxx | 6 | ||||
-rw-r--r-- | svl/source/filerec/filerec.cxx | 20 |
2 files changed, 8 insertions, 18 deletions
diff --git a/svl/inc/svl/filerec.hxx b/svl/inc/svl/filerec.hxx index 214ff22a41c5..683186e7fa18 100644 --- a/svl/inc/svl/filerec.hxx +++ b/svl/inc/svl/filerec.hxx @@ -34,9 +34,7 @@ #include "svl/svldllapi.h" #include <tools/debug.hxx> #include <tools/stream.hxx> -#include <svl/svarray.hxx> - -SV_DECL_VARARR( SfxUINT32s, sal_uInt32, 8 ) +#include <vector> //------------------------------------------------------------------------ @@ -516,7 +514,7 @@ class SVL_DLLPUBLIC SfxMultiVarRecordWriter: public SfxMultiFixRecordWriter { protected: - SfxUINT32s _aContentOfs; + std::vector<sal_uInt32> _aContentOfs; sal_uInt16 _nContentVer; // nur f"ur SfxMultiMixRecordWriter SfxMultiVarRecordWriter( sal_uInt8 nRecordType, diff --git a/svl/source/filerec/filerec.cxx b/svl/source/filerec/filerec.cxx index b2ebbd0f8b04..df5468e54149 100644 --- a/svl/source/filerec/filerec.cxx +++ b/svl/source/filerec/filerec.cxx @@ -31,10 +31,6 @@ //======================================================================== -SV_IMPL_VARARR( SfxUINT32s, sal_uInt32 ); - -//======================================================================== - /* Die folgenden Makros extrahieren Teilbereiche aus einem sal_uInt32 Wert. Diese sal_uInt32-Werte werden anstelle der einzelnen Werte gestreamt, um Calls zu sparen. @@ -487,9 +483,10 @@ void SfxMultiVarRecordWriter::FlushContent_Impl() { // Versions-Kennung und Positions-Offset des aktuellen Contents merken; // das Positions-Offset ist relativ zur Startposition des ersten Contents - _aContentOfs.Insert( - SFX_REC_CONTENT_HEADER(_nContentVer,_nStartPos,_nContentStartPos), - _nContentCount-1 ); + assert(_aContentOfs.size() == _nContentCount-1); + _aContentOfs.resize(_nContentCount-1); + _aContentOfs.push_back( + SFX_REC_CONTENT_HEADER(_nContentVer,_nStartPos,_nContentStartPos)); } //------------------------------------------------------------------------- @@ -525,13 +522,8 @@ sal_uInt32 SfxMultiVarRecordWriter::Close( bool bSeekToEndOfRec ) // Content-Offset-Tabelle schreiben sal_uInt32 nContentOfsPos = _pStream->Tell(); //! darf man das so einr"ucken? - #if defined(OSL_LITENDIAN) - _pStream->Write( _aContentOfs.GetData(), - sizeof(sal_uInt32)*_nContentCount ); - #else - for ( sal_uInt16 n = 0; n < _nContentCount; ++n ) - *_pStream << sal_uInt32(_aContentOfs[n]); - #endif + for ( sal_uInt16 n = 0; n < _nContentCount; ++n ) + *_pStream << _aContentOfs[n]; // SfxMultiFixRecordWriter::Close() "uberspringen! sal_uInt32 nEndPos = SfxSingleRecordWriter::Close( sal_False ); |