diff options
author | Armin Le Grand <alg@apache.org> | 2012-06-28 16:30:03 +0000 |
---|---|---|
committer | Armin Le Grand <alg@apache.org> | 2012-06-28 16:30:03 +0000 |
commit | ec1819f218b94bed1556653e1b2b816a65da61ef (patch) | |
tree | b3a7fc1b326989e8754d48d7aacc779b411d157b /sfx2 | |
parent | b69333045a54fb8ac0d5aabbf01b1fd125985e81 (diff) |
#120077# ALG: Reverted r1354011, adapted all usages of SfxStyleSheetIterator and CreateIterator to use boost::shared_ptr
Notes
Notes:
merged as: 858c6610f3476bb47bb7b4e621a7ac48a9e34a75
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/objcont.cxx | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index 78f3ea812092..5529d3951d09 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -759,16 +759,11 @@ sal_Bool SfxObjectShell::Print { SfxStyleSheetBasePool *pStylePool = GetStyleSheetPool(); SetOrganizerSearchMask(pStylePool); - - // memory leak #i120077# - SfxStyleSheetIterator aIter(pStylePool, pStylePool->GetSearchFamily(), pStylePool->GetSearchMask()); - sal_uInt16 nStyles = aIter.Count(); - SfxStyleSheetBase *pStyle = aIter.First(); - + SfxStyleSheetIteratorPtr pIter = pStylePool->CreateIterator( pStylePool->GetSearchFamily(), pStylePool->GetSearchMask() ); + sal_uInt16 nStyles = pIter->Count(); + SfxStyleSheetBase *pStyle = pIter->First(); if ( !pStyle ) - { return sal_True; - } // pepare adaptor for old style StartPage/EndPage printing boost::shared_ptr< Printer > pPrinter( new Printer( rPrt.GetJobSetup() ) ); @@ -867,7 +862,7 @@ sal_Bool SfxObjectShell::Print pPrinter->DrawText(aOutPos, aTmp); aOutPos.Y() += pPrinter->GetTextHeight(); } - pStyle = aIter.Next(); + pStyle = pIter->Next(); } pAdaptor->EndPage(); |