diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2020-11-10 21:12:29 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-11-11 08:33:33 +0100 |
commit | 97e9df169c183ce1fb6530e8f3e806036a25bf68 (patch) | |
tree | 4198c1c731f1f6f59ba8b96decaffd6ffc040b2b /include | |
parent | 98076bc83167dca559800ea882c38ef4fca873b7 (diff) |
pdfium: eliminate remaining direct calls to FPDFPageObj_GetType()
And also introduce an enum class for the return type.
Change-Id: I6577c7678889ac5bb8efbf0d0cfeb575aac06e27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105567
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/PDFPageObjectType.hxx | 27 |
2 files changed, 29 insertions, 1 deletions
diff --git a/include/vcl/filter/PDFiumLibrary.hxx b/include/vcl/filter/PDFiumLibrary.hxx index eb5cf3b9c769..0eb2373a4400 100644 --- a/include/vcl/filter/PDFiumLibrary.hxx +++ b/include/vcl/filter/PDFiumLibrary.hxx @@ -28,6 +28,7 @@ #include <vcl/checksum.hxx> #include <vcl/Scanline.hxx> #include <vcl/pdf/PDFAnnotationSubType.hxx> +#include <vcl/pdf/PDFPageObjectType.hxx> #include <fpdf_doc.h> @@ -149,7 +150,7 @@ public: FPDF_PAGEOBJECT getPointer() { return mpPageObject; } - int getType(); + PDFPageObjectType getType(); OUString getText(std::unique_ptr<PDFiumTextPage> const& pTextPage); int getFormObjectCount(); diff --git a/include/vcl/pdf/PDFPageObjectType.hxx b/include/vcl/pdf/PDFPageObjectType.hxx new file mode 100644 index 000000000000..68e763e64b40 --- /dev/null +++ b/include/vcl/pdf/PDFPageObjectType.hxx @@ -0,0 +1,27 @@ +/* -*- 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 + +namespace vcl::pdf +{ +enum class PDFPageObjectType +{ + Unknown = 0, + Text = 1, + Path = 2, + Image = 3, + Shading = 4, + Form = 5 +}; + +} // namespace vcl::pdf + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |