diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-26 10:42:18 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-26 15:17:49 +0200 |
commit | 085c97c986336bc622d6b3d72e6a587e1ae4b844 (patch) | |
tree | 89ab351934468cb5857fe27b95a641478f270d21 /sfx2/inc | |
parent | 90da191bc937eedd2a7fda4ac41fbe6a53356842 (diff) |
fix leak in SfxAutoRedactDialog
Change-Id: I5ebfe5eba77de3380e991ced26f396821613b7f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116189
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/inc')
-rw-r--r-- | sfx2/inc/SfxRedactionHelper.hxx | 8 | ||||
-rw-r--r-- | sfx2/inc/autoredactdialog.hxx | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sfx2/inc/SfxRedactionHelper.hxx b/sfx2/inc/SfxRedactionHelper.hxx index c6631a053566..07e752d173ad 100644 --- a/sfx2/inc/SfxRedactionHelper.hxx +++ b/sfx2/inc/SfxRedactionHelper.hxx @@ -76,7 +76,7 @@ public: addPagesToDraw(const uno::Reference<XComponent>& xComponent, sal_Int32 nPages, const std::vector<GDIMetaFile>& aMetaFiles, const std::vector<::Size>& aPageSizes, const PageMargins& aPageMargins, - const std::vector<std::pair<RedactionTarget*, OUString>>& r_aTableTargets, + const std::vector<std::pair<RedactionTarget, OUString>>& r_aTableTargets, bool bIsAutoRedact); /* * Makes the Redaction toolbar visible to the user. @@ -102,7 +102,7 @@ public: * Used to find the text portions to be redacted. Returns a list of rectangles to cover those * areas to be redacted. Probably the most crucial part of the auto-redaction process. * */ - static void searchInMetaFile(const RedactionTarget* pRedactionTarget, const GDIMetaFile& rMtf, + static void searchInMetaFile(const RedactionTarget& rRedactionTarget, const GDIMetaFile& rMtf, std::vector<tools::Rectangle>& aRedactionRectangles, const uno::Reference<XComponent>& xComponent); @@ -117,14 +117,14 @@ public: * Search for the given term through the gdimetafile, which has the whole content of a draw page, * and draw redaction rectangles to the appropriate positions with suitable sizes. * */ - static void autoRedactPage(const RedactionTarget* pRedactionTarget, + static void autoRedactPage(const RedactionTarget& rRedactionTarget, const GDIMetaFile& rGDIMetaFile, const uno::Reference<drawing::XDrawPage>& xPage, const uno::Reference<XComponent>& xComponent); /// Fill the search options based on the given redaction target static void fillSearchOptions(i18nutil::SearchOptions2& rSearchOpt, - const RedactionTarget* pTarget); + const RedactionTarget& rTarget); private: static constexpr std::u16string_view m_aPredefinedTargets[6] = { diff --git a/sfx2/inc/autoredactdialog.hxx b/sfx2/inc/autoredactdialog.hxx index eef638538e80..657881979df2 100644 --- a/sfx2/inc/autoredactdialog.hxx +++ b/sfx2/inc/autoredactdialog.hxx @@ -132,7 +132,7 @@ public: * Does a shallow copy. * Returns true if successful. */ - bool getTargets(std::vector<std::pair<RedactionTarget*, OUString>>& r_aTargets); + bool getTargets(std::vector<std::pair<RedactionTarget, OUString>>& r_aTargets); }; class SfxAddTargetDialog final : public weld::GenericDialogController |