diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2020-08-31 07:53:55 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2020-09-06 14:00:47 +0200 |
commit | 962f1bb95fc38cafe56ea2ba134ce19392102601 (patch) | |
tree | 47c9f721807dd03585c0f7130ae7f6b24bd774e2 /include/vcl | |
parent | 11292d1cc405e7c3b9e1f374cc7581a63a54b994 (diff) |
store annotation subtype in PDFGraphicAnnotation, enum for subtype
Change-Id: Ib804f497a6c8f609e4899f9ebcef4c1096f44ce0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102090
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include/vcl')
-rw-r--r-- | include/vcl/filter/PDFiumLibrary.hxx | 3 | ||||
-rw-r--r-- | include/vcl/pdf/PDFAnnotationSubType.hxx | 49 | ||||
-rw-r--r-- | include/vcl/pdfread.hxx | 8 |
3 files changed, 57 insertions, 3 deletions
diff --git a/include/vcl/filter/PDFiumLibrary.hxx b/include/vcl/filter/PDFiumLibrary.hxx index aee470cfd852..6386441b6f39 100644 --- a/include/vcl/filter/PDFiumLibrary.hxx +++ b/include/vcl/filter/PDFiumLibrary.hxx @@ -24,6 +24,7 @@ #include <rtl/ustring.hxx> #include <tools/color.hxx> #include <vcl/checksum.hxx> +#include <vcl/pdf/PDFAnnotationSubType.hxx> #include <fpdf_doc.h> @@ -65,7 +66,7 @@ public: ~PDFiumAnnotation(); FPDF_ANNOTATION getPointer() { return mpAnnotation; } - int getSubType(); + PDFAnnotationSubType getSubType(); basegfx::B2DRectangle getRectangle(); bool hasKey(OString const& rKey); OUString getString(OString const& rKey); diff --git a/include/vcl/pdf/PDFAnnotationSubType.hxx b/include/vcl/pdf/PDFAnnotationSubType.hxx new file mode 100644 index 000000000000..bee1d82cd399 --- /dev/null +++ b/include/vcl/pdf/PDFAnnotationSubType.hxx @@ -0,0 +1,49 @@ +/* -*- 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 PDFAnnotationSubType +{ + Unknown = 0, + Text = 1, + Link = 2, + FreeText = 3, + Line = 4, + Square = 5, + Circle = 6, + Polygon = 7, + Polyline = 8, + Highlight = 9, + Underline = 10, + Squiggly = 11, + Strikeout = 12, + Stamp = 13, + Caret = 14, + Ink = 15, + Popup = 16, + FileAttachment = 17, + Sound = 18, + Movie = 19, + Widget = 20, + Screen = 21, + Printermark = 22, + Trapnet = 23, + Watermark = 24, + Threed = 25, + Richmedia = 26, + XFAWidget = 27 +}; + +} // namespace vcl::pdf + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/vcl/pdfread.hxx b/include/vcl/pdfread.hxx index 4b76d9360f2b..f60ae8ef243f 100644 --- a/include/vcl/pdfread.hxx +++ b/include/vcl/pdfread.hxx @@ -17,6 +17,8 @@ #include <basegfx/range/b2drectangle.hxx> #include <com/sun/star/util/DateTime.hpp> +#include <vcl/pdf/PDFAnnotationSubType.hxx> + namespace com::sun::star::uno { template <typename> class Sequence; @@ -37,9 +39,11 @@ struct PDFGraphicAnnotation { OUString maAuthor; OUString maText; - // In HMM - basegfx::B2DRectangle maRectangle; + + basegfx::B2DRectangle maRectangle; // In HMM css::util::DateTime maDateTime; + + pdf::PDFAnnotationSubType meSubType; }; class PDFGraphicResult |