diff options
author | Nigel Hawkins <n.hawkins@gmx.com> | 2011-07-25 17:07:22 +0100 |
---|---|---|
committer | Nigel Hawkins <n.hawkins@gmx.com> | 2011-07-25 17:07:22 +0100 |
commit | 3bbc37dc5494ef3e8e77d0b42f94995e8c69d556 (patch) | |
tree | 3b9c9281eece9449e999c4b72242819fc6e76d51 /sw | |
parent | f7ee8949f23b5106efe16444040dfaa677ccbd26 (diff) |
Replace SvUShorts with vector in redline.hxx and docredln.cxx
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/redline.hxx | 5 | ||||
-rw-r--r-- | sw/source/core/doc/docredln.cxx | 16 |
2 files changed, 11 insertions, 10 deletions
diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx index 5602d101ef62..2ca506b7c3e5 100644 --- a/sw/inc/redline.hxx +++ b/sw/inc/redline.hxx @@ -31,13 +31,12 @@ #include <tools/datetime.hxx> #include <tools/string.hxx> -#define _SVSTDARR_USHORTS -#include <svl/svstdarr.hxx> #include <pam.hxx> #include <IDocumentRedlineAccess.hxx> #include <svl/smplhint.hxx> +#include <vector> class SfxItemSet; class SwView; @@ -77,7 +76,7 @@ public: class SwRedlineExtraData_Format : public SwRedlineExtraData { - SvUShorts aWhichIds; + std::vector<sal_uInt16> aWhichIds; SwRedlineExtraData_Format( const SwRedlineExtraData_Format& rCpy ); diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index 075d106e71b0..efd31bb6c8df 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -2949,7 +2949,7 @@ SwRedlineExtraData_Format::SwRedlineExtraData_Format( const SfxItemSet& rSet ) const SfxPoolItem* pItem = aIter.FirstItem(); while( sal_True ) { - aWhichIds.Insert( pItem->Which(), aWhichIds.Count() ); + aWhichIds.push_back( pItem->Which() ); if( aIter.IsAtEnd() ) break; pItem = aIter.NextItem(); @@ -2958,9 +2958,9 @@ SwRedlineExtraData_Format::SwRedlineExtraData_Format( const SfxItemSet& rSet ) SwRedlineExtraData_Format::SwRedlineExtraData_Format( const SwRedlineExtraData_Format& rCpy ) - : SwRedlineExtraData(), aWhichIds( (sal_uInt8)rCpy.aWhichIds.Count() ) + : SwRedlineExtraData() { - aWhichIds.Insert( &rCpy.aWhichIds, 0 ); + aWhichIds.insert( aWhichIds.begin(), rCpy.aWhichIds.begin(), rCpy.aWhichIds.end() ); } SwRedlineExtraData_Format::~SwRedlineExtraData_Format() @@ -2980,9 +2980,10 @@ void SwRedlineExtraData_Format::Reject( SwPaM& rPam ) const pDoc->SetRedlineMode_intern((RedlineMode_t)(eOld & ~(nsRedlineMode_t::REDLINE_ON | nsRedlineMode_t::REDLINE_IGNORE))); // eigentlich muesste hier das Attribut zurueck gesetzt werden!!! - for( sal_uInt16 n = 0, nEnd = aWhichIds.Count(); n < nEnd; ++n ) + std::vector<sal_uInt16>::const_iterator it; + for( it = aWhichIds.begin(); it != aWhichIds.end(); ++it ) { - pDoc->InsertPoolItem( rPam, *GetDfltAttr( aWhichIds[ n ] ), + pDoc->InsertPoolItem( rPam, *GetDfltAttr( *it ), nsSetAttrMode::SETATTR_DONTEXPAND ); } @@ -2992,8 +2993,9 @@ void SwRedlineExtraData_Format::Reject( SwPaM& rPam ) const int SwRedlineExtraData_Format::operator == ( const SwRedlineExtraData& rCmp ) const { int nRet = 1; - sal_uInt16 n = 0, nEnd = aWhichIds.Count(); - if( nEnd != ((SwRedlineExtraData_Format&)rCmp).aWhichIds.Count() ) + size_t n = 0; + size_t nEnd = aWhichIds.size(); + if( nEnd != ((SwRedlineExtraData_Format&)rCmp).aWhichIds.size() ) nRet = 0; else for( ; n < nEnd; ++n ) |