From 858c6610f3476bb47bb7b4e621a7ac48a9e34a75 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Tue, 26 Jun 2012 12:36:31 +0000 Subject: Resolves: #i120077# Memory leak fixed in ScXMLFontAutoStylePool_Impl also checked and fixed memory leaks caused by not deleting SfxStyleSheetIterator instances. Found by: Chao Huang Patch by: Chao Huang Review by: alg (cherry picked from commit aee8221b3fbe64d8e88aa3a1b630214807cd86f0) Conflicts: sc/source/core/data/stlsheet.cxx sc/source/filter/xml/xmlfonte.cxx sfx2/source/doc/objcont.cxx svl/source/items/style.cxx sw/source/core/unocore/unostyle.cxx Resolves: #120077# ALG: Reverted r1354011, adapted all usages of SfxStyleSheetIterator and CreateIterator to use boost::shared_ptr (cherry picked from commit ec1819f218b94bed1556653e1b2b816a65da61ef) Conflicts: sc/source/core/data/stlsheet.cxx sc/source/filter/xml/xmlfonte.cxx sfx2/source/doc/objcont.cxx svl/inc/svl/style.hxx svl/source/items/style.cxx sw/source/core/unocore/unoframe.cxx sw/source/core/unocore/unostyle.cxx 26937d4d65562b14de0aea59a7b01cc4334f73c1 Change-Id: If99bf3ee399292ec269d68b36ee78ed63f033215 --- svl/inc/svl/style.hxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'svl/inc') diff --git a/svl/inc/svl/style.hxx b/svl/inc/svl/style.hxx index 664ca5cb1ec2..af58cbc44327 100644 --- a/svl/inc/svl/style.hxx +++ b/svl/inc/svl/style.hxx @@ -37,10 +37,10 @@ #include #include +#include class SfxItemSet; class SfxItemPool; - class SfxStyleSheetBasePool; class SvStream; @@ -192,6 +192,7 @@ private: friend class SfxStyleSheetBasePool; }; +typedef ::boost::shared_ptr< SfxStyleSheetIterator > SfxStyleSheetIteratorPtr; //========================================================================= class SfxStyleSheetBasePool_Impl; @@ -228,7 +229,7 @@ public: SfxItemPool& GetPool(); const SfxItemPool& GetPool() const; - virtual SfxStyleSheetIterator* CreateIterator(SfxStyleFamily, sal_uInt16 nMask); + virtual SfxStyleSheetIteratorPtr CreateIterator(SfxStyleFamily, sal_uInt16 nMask); virtual sal_uInt16 Count(); virtual SfxStyleSheetBase* operator[](sal_uInt16 nIdx); -- cgit