diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/docstyle.hxx | 3 | ||||
-rw-r--r-- | sw/source/core/unocore/unostyle.cxx | 3 | ||||
-rw-r--r-- | sw/source/ui/app/docstyle.cxx | 5 |
3 files changed, 4 insertions, 7 deletions
diff --git a/sw/inc/docstyle.hxx b/sw/inc/docstyle.hxx index 72ea158d3172..90a049e1ac88 100644 --- a/sw/inc/docstyle.hxx +++ b/sw/inc/docstyle.hxx @@ -208,8 +208,7 @@ public: void SetOrganizerMode( sal_Bool bMode ) { bOrganizer = bMode; } sal_Bool IsOrganizerMode() const { return bOrganizer; } - virtual SfxStyleSheetIterator* CreateIterator( SfxStyleFamily, - sal_uInt16 nMask ); + virtual SfxStyleSheetIteratorPtr CreateIterator( SfxStyleFamily, sal_uInt16 nMask ); SwDoc& GetDoc() const { return rDoc; } diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 49502e0cdc9f..a7d3b1764680 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -785,7 +785,7 @@ uno::Sequence< OUString > SwXStyleFamily::getElementNames(void) throw( uno::Runt uno::Sequence< OUString > aRet; if(pBasePool) { - SfxStyleSheetIterator* pIterator = pBasePool->CreateIterator(eFamily, SFXSTYLEBIT_ALL); + SfxStyleSheetIteratorPtr pIterator = pBasePool->CreateIterator(eFamily, SFXSTYLEBIT_ALL); sal_uInt16 nCount = pIterator->Count(); aRet.realloc(nCount); OUString* pArray = aRet.getArray(); @@ -795,7 +795,6 @@ uno::Sequence< OUString > SwXStyleFamily::getElementNames(void) throw( uno::Runt SwStyleNameMapper::FillProgName((*pIterator)[i]->GetName(), aString, lcl_GetSwEnumFromSfxEnum ( eFamily ), true ); pArray[i] = OUString ( aString ); } - delete pIterator; } else throw uno::RuntimeException(); diff --git a/sw/source/ui/app/docstyle.cxx b/sw/source/ui/app/docstyle.cxx index 2af3322ea944..934f7174b47b 100644 --- a/sw/source/ui/app/docstyle.cxx +++ b/sw/source/ui/app/docstyle.cxx @@ -2179,10 +2179,9 @@ void SwDocStyleSheetPool::Replace( SfxStyleSheetBase& rSource, } } -SfxStyleSheetIterator* SwDocStyleSheetPool::CreateIterator( - SfxStyleFamily eFam, sal_uInt16 _nMask ) +SfxStyleSheetIteratorPtr SwDocStyleSheetPool::CreateIterator( SfxStyleFamily eFam, sal_uInt16 _nMask ) { - return new SwStyleSheetIterator( this, eFam, _nMask ); + return SfxStyleSheetIteratorPtr(new SwStyleSheetIterator( this, eFam, _nMask )); } void SwDocStyleSheetPool::dispose() |