diff options
author | Muhammet Kara <muhammet.kara@collabora.com> | 2019-06-13 18:32:27 +0300 |
---|---|---|
committer | Muhammet Kara <muhammet.kara@collabora.com> | 2019-06-14 20:14:44 +0200 |
commit | f8a325eff30b40fdd3f76d82d10b5eed8659afd2 (patch) | |
tree | 93205caaca554af56ce2365953de9264aa40df84 /sfx2/inc | |
parent | b5323c72ff7e5bcde34089e49fe98e589dcc5acb (diff) |
Use utl::TextSearch in the auto redaction process
* Add support for:
* Case sensitive and insensitive text search
* Regex search (always case sensitive) regarless of the choice
* Multiple occurences of the same target on a single TEXTARRAY
Change-Id: I580059f77286e8c4226cafdd1eb9472f8e1a9a9d
Reviewed-on: https://gerrit.libreoffice.org/74049
Tested-by: Jenkins
Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
Diffstat (limited to 'sfx2/inc')
-rw-r--r-- | sfx2/inc/SfxRedactionHelper.hxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sfx2/inc/SfxRedactionHelper.hxx b/sfx2/inc/SfxRedactionHelper.hxx index 9be54ca8ac22..2f470386d2dc 100644 --- a/sfx2/inc/SfxRedactionHelper.hxx +++ b/sfx2/inc/SfxRedactionHelper.hxx @@ -33,6 +33,11 @@ class DocumentToGraphicRenderer; class SfxViewFrame; struct RedactionTarget; +namespace i18nutil +{ +struct SearchOptions2; +} + struct PageMargins { // Page margins in mm100th @@ -92,7 +97,7 @@ public: * */ static PageMargins getPageMarginsForCalc(css::uno::Reference<css::frame::XModel>& xModel); - static void searchInMetaFile(const OUString& sSearchTerm, const GDIMetaFile& rMtf, + static void searchInMetaFile(const RedactionTarget* pRedactionTarget, const GDIMetaFile& rMtf, std::vector<tools::Rectangle>& aRedactionRectangles, uno::Reference<XComponent>& xComponent); @@ -111,6 +116,10 @@ public: const GDIMetaFile& rGDIMetaFile, uno::Reference<drawing::XDrawPage>& xPage, uno::Reference<XComponent>& xComponent); + + /// Fill the search options based on the given redaction target + static void fillSearchOptions(i18nutil::SearchOptions2& rSearchOpt, + const RedactionTarget* pTarget); }; #endif // INCLUDED_CUI_SOURCE_INC_SFXREDACTIONHELPER_HXX |