From a7ce722b476c4bb0c9a113ae0c2759181edfe48f Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Fri, 12 May 2023 23:05:33 +0300 Subject: tdf#155232: drop m_aFlatParaList from SwXFlatParagraphIterator There is no need to keep those references. The set was there from the beginning, introduced in commits 677eba2322d2753951024c688d59553182bf2fbd (INTEGRATION: CWS gcframework_DEV300 (1.1.2); FILE ADDED, 2008-02-26) and ba76230f6f677774b0d333da946a7e487acbeb0b (INTEGRATION: CWS gcframework_DEV300 (1.1.2); FILE ADDED, 2008-02-26). Change-Id: Iaf2482adb0aac063ad106c4198baf74577a75bf4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151712 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- sw/source/core/inc/unoflatpara.hxx | 3 --- sw/source/core/unocore/unoflatpara.cxx | 6 ------ 2 files changed, 9 deletions(-) diff --git a/sw/source/core/inc/unoflatpara.hxx b/sw/source/core/inc/unoflatpara.hxx index 1d68a7d1c8db..77e07af399b9 100644 --- a/sw/source/core/inc/unoflatpara.hxx +++ b/sw/source/core/inc/unoflatpara.hxx @@ -124,9 +124,6 @@ private: SwXFlatParagraphIterator( const SwXFlatParagraphIterator & ) = delete; SwXFlatParagraphIterator & operator =(const SwXFlatParagraphIterator & ) = delete; - // container to hold the 'hard' references as long as necessary and valid - std::set< css::uno::Reference< css::text::XFlatParagraph > > m_aFlatParaList; - SwDoc* mpDoc; const sal_Int32 mnType; const bool mbAutomatic; diff --git a/sw/source/core/unocore/unoflatpara.cxx b/sw/source/core/unocore/unoflatpara.cxx index 94adf66e08b6..c5c2ef94e441 100644 --- a/sw/source/core/unocore/unoflatpara.cxx +++ b/sw/source/core/unocore/unoflatpara.cxx @@ -485,8 +485,6 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getNextPara() const OUString& aExpandText = aConversionMap.getViewText(); xRet = new SwXFlatParagraph( *pRet, aExpandText, aConversionMap ); - // keep hard references... - m_aFlatParaList.insert( xRet ); } return xRet; @@ -533,8 +531,6 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaAfter(co const OUString& aExpandText = aConversionMap.getViewText(); xRet = new SwXFlatParagraph( *pNextTextNode, aExpandText, aConversionMap ); - // keep hard references... - m_aFlatParaList.insert( xRet ); } return xRet; @@ -576,8 +572,6 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaBefore(c const OUString& aExpandText = aConversionMap.getViewText(); xRet = new SwXFlatParagraph( *pPrevTextNode, aExpandText, aConversionMap ); - // keep hard references... - m_aFlatParaList.insert( xRet ); } return xRet; -- cgit