diff options
author | Noel Grandin <noel@peralex.com> | 2012-06-20 16:36:51 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2012-06-20 16:48:03 +0200 |
commit | 1015cd4ff73ee25e55b4da8c8bc55a41e652da87 (patch) | |
tree | 0b91a6dd5e278cda1c582ba122e40d4877920d0d /sw/source/filter/rtf | |
parent | ccfc7bd12dd89f2ec4fd4e9339710ccb4c6532da (diff) |
Convert SV_DECL_PTRARR_DEL of Sw*Fmts to std::vector
- I had to convert SwFrmFmts, SwSpzFrmFmts, SwCharFmts, SwSectionsFmts,
SwTextFormatColl, SwGrfFmtColl all together because of the code that wants
to work with any of them.
- Introduce a pure virtual base class SwFmtsBase, since there are a handful
of methods that want to work with any of the std::vector<Sw*Fmt> types.
- the class SwSpzFrmFmts was dropped, and the code changed to use SwFrmFmts
instead, since the 2 types are identical.
Change-Id: I8c4056b5aedd574a33666e2d649a8b849958441c
Signed-off-by: Fridrich Štrba <fridrich.strba@bluewin.ch>
Diffstat (limited to 'sw/source/filter/rtf')
-rw-r--r-- | sw/source/filter/rtf/swparrtf.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index 2e8553a011fb..5c76ed20333b 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -491,10 +491,10 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( sal_False ).nNode.GetIndex() ) { // Do not delete the paragraph if it has anchored objects: bool bAnchoredObjs = false; - const SwSpzFrmFmts* pFrmFmts = pDoc->GetSpzFrmFmts(); - if ( pFrmFmts && pFrmFmts->Count() ) + const SwFrmFmts* pFrmFmts = pDoc->GetSpzFrmFmts(); + if ( pFrmFmts && !pFrmFmts->empty() ) { - for ( sal_uInt16 nI = pFrmFmts->Count(); nI; --nI ) + for ( sal_uInt16 nI = pFrmFmts->size(); nI; --nI ) { const SwFmtAnchor & rAnchor = (*pFrmFmts)[ nI - 1 ]->GetAnchor(); if ((FLY_AT_PARA == rAnchor.GetAnchorId()) || @@ -2711,7 +2711,7 @@ void SwRTFParser::MakeStyleTab() { // search all outlined collections const SwTxtFmtColls& rColls = *pDoc->GetTxtFmtColls(); - for( sal_uInt16 n = rColls.Count(); n; ) + for( sal_uInt16 n = rColls.size(); n; ) if( rColls[ --n ]->IsAssignedToListLevelOfOutlineStyle()) nValidOutlineLevels |= 1 << rColls[ n ]->GetAssignedOutlineStyleLevel();//<-end,zhaojianwei } |