bump product version to 7.6.3.2-android
[LibreOffice.git] / include / vcl / VectorGraphicSearch.hxx
blobfe1fcd5d739ac7c805e532eefedae5682f706666
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 */
11 #pragma once
13 #include <vcl/graph.hxx>
14 #include <vcl/vectorgraphicdata.hxx>
15 #include <vcl/dllapi.h>
17 #include <basegfx/range/b2drectangle.hxx>
18 #include <basegfx/vector/b2dsize.hxx>
20 #include <memory>
22 enum class SearchStartPosition
24 Begin,
25 End
28 struct VCL_DLLPUBLIC VectorGraphicSearchOptions final
30 SearchStartPosition meStartPosition;
31 bool mbMatchCase;
32 bool mbMatchWholeWord;
34 VectorGraphicSearchOptions()
35 : meStartPosition(SearchStartPosition::Begin)
36 , mbMatchCase(false)
37 , mbMatchWholeWord(false)
41 VectorGraphicSearchOptions(SearchStartPosition eStartPosition, bool bMatchCase,
42 bool bMatchWholeWord)
43 : meStartPosition(eStartPosition)
44 , mbMatchCase(bMatchCase)
45 , mbMatchWholeWord(bMatchWholeWord)
50 class VCL_DLLPUBLIC VectorGraphicSearch final
52 private:
53 class Implementation;
54 std::unique_ptr<Implementation> mpImplementation;
55 Graphic maGraphic;
57 bool searchPDF(std::shared_ptr<VectorGraphicData> const& rData);
59 public:
60 VectorGraphicSearch(Graphic aGraphic);
61 ~VectorGraphicSearch();
62 bool search(OUString const& rSearchString,
63 VectorGraphicSearchOptions const& rOptions = VectorGraphicSearchOptions());
64 basegfx::B2DSize pageSize();
65 bool next();
66 bool previous();
67 int index();
68 std::vector<basegfx::B2DRectangle> getTextRectangles();
71 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */