diff options
author | Noel Grandin <noel@peralex.com> | 2012-06-25 14:44:56 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-07-04 23:23:20 +0200 |
commit | 457a537bdb24ff67a9bfc3d7426678ac6829d821 (patch) | |
tree | d346faecdbf017b9dfc1549b2ffc3079d642fe89 /sw | |
parent | df436372344ffa8ae12a64606cde54d4b4ea7a6a (diff) |
Convert Svptrarr to std::vector<SvGlobalName*>
Change-Id: Iafd2dc1d4bf4bf3dd875a33a37ea9038f3e083fe
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/bastyp/init.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/doc/docdesc.cxx | 11 |
2 files changed, 8 insertions, 11 deletions
diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx index 4213cbfe1320..1bfd1940f802 100644 --- a/sw/source/core/bastyp/init.cxx +++ b/sw/source/core/bastyp/init.cxx @@ -434,7 +434,7 @@ const sal_Char* pMarkToOutline = "outline"; const sal_Char* pMarkToGraphic = "graphic"; const sal_Char* pMarkToOLE = "ole"; -SvPtrarr *pGlobalOLEExcludeList = 0; +std::vector<SvGlobalName*> *pGlobalOLEExcludeList = 0; SwAutoCompleteWord* SwDoc::pACmpltWords = 0; @@ -715,7 +715,7 @@ void _InitCore() SwSelPaintRects::pMapMode = new MapMode; SwFntObj::pPixMap = new MapMode; - pGlobalOLEExcludeList = new SvPtrarr; + pGlobalOLEExcludeList = new std::vector<SvGlobalName*>; const SvxSwAutoFmtFlags& rAFlags = SvxAutoCorrCfg::Get().GetAutoCorrect()->GetSwFlags(); SwDoc::pACmpltWords = new SwAutoCompleteWord( rAFlags.nAutoCmpltListLen, @@ -803,8 +803,8 @@ void _FinitCore() delete[] SwAttrPool::pVersionMap5; delete[] SwAttrPool::pVersionMap6; - for ( sal_uInt16 i = 0; i < pGlobalOLEExcludeList->Count(); ++i ) - delete (SvGlobalName*)(*pGlobalOLEExcludeList)[i]; + for ( sal_uInt16 i = 0; i < pGlobalOLEExcludeList->size(); ++i ) + delete (*pGlobalOLEExcludeList)[i]; delete pGlobalOLEExcludeList; } diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx index cc1be24b95d8..7fefd9ab9732 100644 --- a/sw/source/core/doc/docdesc.cxx +++ b/sw/source/core/doc/docdesc.cxx @@ -675,7 +675,7 @@ void SwDoc::PrtDataChanged() // about printer changes. Thereby saving loading a lot of objects (luckily all foreign // objects are mapped to one ID). // Initialisation and deinitialisation can be found in init.cxx -extern SvPtrarr *pGlobalOLEExcludeList; +extern std::vector<SvGlobalName*> *pGlobalOLEExcludeList; void SwDoc::PrtOLENotify( sal_Bool bAll ) { @@ -738,11 +738,10 @@ void SwDoc::PrtOLENotify( sal_Bool bAll ) sal_Bool bFound = sal_False; for ( sal_uInt16 j = 0; - j < pGlobalOLEExcludeList->Count() && !bFound; + j < pGlobalOLEExcludeList->size() && !bFound; ++j ) { - bFound = *(SvGlobalName*)(*pGlobalOLEExcludeList)[j] == - aName; + bFound = *(*pGlobalOLEExcludeList)[j] == aName; } if ( bFound ) continue; @@ -751,9 +750,7 @@ void SwDoc::PrtOLENotify( sal_Bool bAll ) // If it doesn't want to be informed if ( xObj.is() ) { - pGlobalOLEExcludeList->Insert( - new SvGlobalName( aName ), - pGlobalOLEExcludeList->Count() ); + pGlobalOLEExcludeList->push_back( new SvGlobalName( aName ) ); } } delete pNodes; |