1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
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>
22 enum class SearchStartPosition
28 struct VCL_DLLPUBLIC VectorGraphicSearchOptions final
30 SearchStartPosition meStartPosition
;
32 bool mbMatchWholeWord
;
34 VectorGraphicSearchOptions()
35 : meStartPosition(SearchStartPosition::Begin
)
37 , mbMatchWholeWord(false)
41 VectorGraphicSearchOptions(SearchStartPosition eStartPosition
, bool bMatchCase
,
43 : meStartPosition(eStartPosition
)
44 , mbMatchCase(bMatchCase
)
45 , mbMatchWholeWord(bMatchWholeWord
)
50 class VCL_DLLPUBLIC VectorGraphicSearch final
54 std::unique_ptr
<Implementation
> mpImplementation
;
57 bool searchPDF(std::shared_ptr
<VectorGraphicData
> const& rData
);
60 VectorGraphicSearch(Graphic aGraphic
);
61 ~VectorGraphicSearch();
62 bool search(OUString
const& rSearchString
,
63 VectorGraphicSearchOptions
const& rOptions
= VectorGraphicSearchOptions());
64 basegfx::B2DSize
pageSize();
68 std::vector
<basegfx::B2DRectangle
> getTextRectangles();
71 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */