basic/source/uno/dlgcont.cxx | 8 ++++++++ include/sfx2/tabdlg.hxx | 1 + sfx2/source/dialog/tabdlg.cxx | 3 ++- 3 files changed, 11 insertions(+), 1 deletion(-)
New commits: commit a68c96f63be186a3319b8266318e21c9b9f73b9c Author: Noel Grandin <[email protected]> AuthorDate: Mon May 24 13:01:07 2021 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Mon May 24 14:20:37 2021 +0200 fix leak in SfxTabDialogController Change-Id: I98a459d0b6173d367bbe596bcbf25501612ff032 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116051 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx index 6053d22496bb..e6aee128f4bf 100644 --- a/include/sfx2/tabdlg.hxx +++ b/include/sfx2/tabdlg.hxx @@ -78,6 +78,7 @@ private: std::unique_ptr<sal_uInt16[]> m_pRanges; OString m_sAppPageId; bool m_bStandardPushed; + std::unique_ptr<SfxAllItemSet> m_xItemSet; DECL_DLLPRIVATE_LINK(ActivatePageHdl, const OString&, void); DECL_DLLPRIVATE_LINK(DeactivatePageHdl, const OString&, bool); diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index 47fa332390db..02c46e96ecb3 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -897,7 +897,8 @@ void SfxTabDialogController::AddTabPage(const OString &rName, const OUString& rR SfxItemSet* SfxTabDialogController::CreateInputItemSet(const OString&) { SAL_WARN( "sfx.dialog", "CreateInputItemSet not implemented" ); - return new SfxAllItemSet(SfxGetpApp()->GetPool()); + m_xItemSet = std::make_unique<SfxAllItemSet>(SfxGetpApp()->GetPool()); + return m_xItemSet.get(); } void SfxTabDialogController::CreatePages() commit 004ddb8fdb7baca7cd2e43ebd21bc7c957f35895 Author: Noel Grandin <[email protected]> AuthorDate: Mon May 24 13:00:53 2021 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Mon May 24 14:20:28 2021 +0200 fix leak in dbaccess when loading form controls Change-Id: Ifa731ca1c7bc16579ce03d256691a50ccfbeb82b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116050 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx index cc03680f4cb6..5a125444dfc9 100644 --- a/basic/source/uno/dlgcont.cxx +++ b/basic/source/uno/dlgcont.cxx @@ -248,6 +248,9 @@ void SfxDialogLibraryContainer::storeLibrariesToStorage( const uno::Reference< e } } } + Reference< XComponent > xDialogModelComp(xDialogModel, UNO_QUERY); + if (xDialogModelComp) + xDialogModelComp->dispose(); } } } @@ -327,6 +330,11 @@ Any SfxDialogLibraryContainer::importLibraryElement // to avoid creating the DialogModel here! Reference< XInputStreamProvider > xISP = ::xmlscript::exportDialogModel( xDialogModel, mxContext, mxOwnerDocument ); aRetAny <<= xISP; + + Reference< XComponent > xDialogModelComp(xDialogModel, UNO_QUERY); + if (xDialogModelComp) + xDialogModelComp->dispose(); + return aRetAny; } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
