summaryrefslogtreecommitdiff
path: root/sfx2/inc
diff options
context:
space:
mode:
authorMuhammet Kara <muhammet.kara@collabora.com>2019-06-13 18:32:27 +0300
committerMuhammet Kara <muhammet.kara@collabora.com>2019-06-17 23:31:15 +0200
commit9c11b37f6c00cf3f52902089b4af151233879354 (patch)
treea519716c6585b01bb3d83e7f8cd2f830b71b2dbe /sfx2/inc
parent85f00a0fed27b551290a51688f630587bb43fd98 (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> Reviewed-on: https://gerrit.libreoffice.org/74232 Tested-by: Muhammet Kara <muhammet.kara@collabora.com>
Diffstat (limited to 'sfx2/inc')
-rw-r--r--sfx2/inc/SfxRedactionHelper.hxx11
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