diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2021-02-03 21:00:58 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-02-04 09:11:14 +0100 |
commit | 71c32c31dab86fe9c6d5893eee6821beaa3a3f43 (patch) | |
tree | ca58250646f93ebed913a8b8ded91fe71a2122b8 /include | |
parent | fd6e736c20f54d253921123e5baeb75da8d248f0 (diff) |
pdfium: add PDFFindFlags wrapper
So that vcl::pdf::PDFiumTextPage::findStart() can be called without
including fpdf_text.h.
Change-Id: I6a765be6176ec77ca24f592e2e2210654debe075
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110391
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/filter/PDFiumLibrary.hxx | 3 | ||||
-rw-r--r-- | include/vcl/pdf/PDFFindFlags.hxx | 34 |
2 files changed, 36 insertions, 1 deletions
diff --git a/include/vcl/filter/PDFiumLibrary.hxx b/include/vcl/filter/PDFiumLibrary.hxx index 667fa614da70..ab0b5db7e608 100644 --- a/include/vcl/filter/PDFiumLibrary.hxx +++ b/include/vcl/filter/PDFiumLibrary.hxx @@ -36,6 +36,7 @@ #include <vcl/pdf/PDFObjectType.hxx> #include <vcl/pdf/PDFTextRenderMode.hxx> #include <vcl/pdf/PDFFillMode.hxx> +#include <vcl/pdf/PDFFindFlags.hxx> #include <fpdf_doc.h> @@ -180,7 +181,7 @@ public: int countChars(); unsigned int getUnicode(int index); - std::unique_ptr<PDFiumSearchHandle> findStart(const OUString& rFindWhat, sal_uInt64 nFlags, + std::unique_ptr<PDFiumSearchHandle> findStart(const OUString& rFindWhat, PDFFindFlags nFlags, sal_Int32 nStartIndex); }; diff --git a/include/vcl/pdf/PDFFindFlags.hxx b/include/vcl/pdf/PDFFindFlags.hxx new file mode 100644 index 000000000000..f43efc7a6f7d --- /dev/null +++ b/include/vcl/pdf/PDFFindFlags.hxx @@ -0,0 +1,34 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + */ + +#pragma once + +#include <o3tl/typed_flags_set.hxx> + +namespace vcl::pdf +{ +enum class PDFFindFlags : sal_uInt32 +{ + MatchCase = 0x00000001, + MatchWholeWord = 0x00000002, + Consecutive = 0x00000004, +}; + +} // namespace vcl::pdf + +namespace o3tl +{ +template <> +struct typed_flags<vcl::pdf::PDFFindFlags> : is_typed_flags<vcl::pdf::PDFFindFlags, 0x00000007> +{ +}; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |