diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2020-06-04 18:26:58 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2020-06-04 22:48:58 +0200 |
commit | 112d8113388513d9c6b317e828f5d373b4a54330 (patch) | |
tree | 849068d25f39c0d49ec24ba5858235b99ee03df0 /include | |
parent | 40c577f57fb16d24d5a2f76c3a5126073fff6a98 (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>
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(); |