diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2020-06-04 18:26:58 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2020-07-31 12:47:01 +0200 |
commit | 97d325b3da09182f067c47c48f579663d3d9d534 (patch) | |
tree | 976891fefff289bee01acf8bb7a7712e68b20a20 /include | |
parent | 656c79d0dcc790434308ce519fbdefa269be1996 (diff) |
sd: support match case, match whole word for PDF search
THis adds support for match case and match whole word to the
VectorGraphicSearch + tests.
It uses the new options in PDF seearch in Draw/Impress.
Change-Id: I20a6382c22bf01a5a021c8bae1ff78861419c0ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95530
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit 112d8113388513d9c6b317e828f5d373b4a54330)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95950
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
(cherry picked from commit 456116d97b66703e23055b83ded5d87ed85c728d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99819
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/VectorGraphicSearch.hxx | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/include/vcl/VectorGraphicSearch.hxx b/include/vcl/VectorGraphicSearch.hxx index c9faaa51f1c9..4601a1f5ac1d 100644 --- a/include/vcl/VectorGraphicSearch.hxx +++ b/include/vcl/VectorGraphicSearch.hxx @@ -25,6 +25,28 @@ enum class SearchStartPosition End }; +struct VCL_DLLPUBLIC VectorGraphicSearchOptions final +{ + SearchStartPosition meStartPosition; + bool mbMatchCase; + bool mbMatchWholeWord; + + VectorGraphicSearchOptions() + : meStartPosition(SearchStartPosition::Begin) + , mbMatchCase(false) + , mbMatchWholeWord(false) + { + } + + VectorGraphicSearchOptions(SearchStartPosition eStartPosition, bool bMatchCase, + bool bMatchWholeWord) + : meStartPosition(eStartPosition) + , mbMatchCase(bMatchCase) + , mbMatchWholeWord(bMatchWholeWord) + { + } +}; + class VCL_DLLPUBLIC VectorGraphicSearch final { private: @@ -38,7 +60,7 @@ public: VectorGraphicSearch(Graphic const& rGraphic); ~VectorGraphicSearch(); bool search(OUString const& rSearchString, - SearchStartPosition eStartPosition = SearchStartPosition::Begin); + VectorGraphicSearchOptions const& rOptions = VectorGraphicSearchOptions()); basegfx::B2DSize pageSize(); bool next(); bool previous(); |