summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sfx2/source/bastyp/fltfnc.cxx24
1 files changed, 20 insertions, 4 deletions
diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index 2105c666a206..072ded5cf9e3 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -112,7 +112,25 @@ using namespace com::sun::star;
namespace
{
class theSfxFilterListener : public rtl::Static<SfxFilterListener, theSfxFilterListener> {};
- class theSfxFilterArray : public rtl::Static<SfxFilterList_Impl, theSfxFilterArray > {};
+ class SfxFilterArray
+ {
+ SfxFilterList_Impl aList;
+ public:
+ ~SfxFilterArray()
+ {
+ SfxFilterList_Impl::iterator aEnd = aList.end();
+ for (SfxFilterList_Impl::iterator aI = aList.begin(); aI != aEnd; ++aI)
+ {
+ SfxFilter *pFilter = *aI;
+ delete pFilter;
+ }
+ }
+ SfxFilterList_Impl *getList()
+ {
+ return &aList;
+ }
+ };
+ class theSfxFilterArray : public rtl::Static<SfxFilterArray, theSfxFilterArray > {};
}
static SfxFilterList_Impl* pFilterArr = 0;
@@ -120,17 +138,15 @@ static bool bFirstRead = true;
static void CreateFilterArr()
{
- pFilterArr = &theSfxFilterArray::get();
+ pFilterArr = theSfxFilterArray::get().getList();
theSfxFilterListener::get();
}
-
inline OUString ToUpper_Impl( const OUString &rStr )
{
return SvtSysLocale().GetCharClass().uppercase( rStr );
}
-
class SfxFilterContainer_Impl
{
public: