diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2020-06-18 13:50:15 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2020-06-21 21:02:38 +0200 |
commit | 4e3196ceedc2b79d58bb57dba86f2f0158d32998 (patch) | |
tree | e403030503ba791ed80fc9ecea3049ab632e62c9 /include | |
parent | a641e68077b8c91db8f7520f817da9f7949d0e6d (diff) |
support date and time for PDFium and use it for annotations
PDF annotations have the modification date and time accessible in
the PDF specific format. With PDFium we read the annotation date
and time and convert that to css::utils::DateTime (by converting
to ISO8601 compatible string first).
Add support for modification date and tme for annotations into
ImportPDFUnloaded and when the annotations are inserted into the
document as comments (in Draw document).
Change-Id: I24aacde84b7530365d67ed335b1eefbaee706eca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96759
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/filter/PDFiumLibrary.hxx | 6 | ||||
-rw-r--r-- | include/vcl/pdfread.hxx | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/include/vcl/filter/PDFiumLibrary.hxx b/include/vcl/filter/PDFiumLibrary.hxx index 9deff47e0ab9..2a70c3f89bce 100644 --- a/include/vcl/filter/PDFiumLibrary.hxx +++ b/include/vcl/filter/PDFiumLibrary.hxx @@ -29,7 +29,7 @@ namespace vcl::pdf constexpr char constDictionaryKeyTitle[] = "T"; constexpr char constDictionaryKeyContents[] = "Contents"; constexpr char constDictionaryKeyPopup[] = "Popup"; - +constexpr char constDictionaryKeyModificationDate[] = "M"; class PDFiumDocument; class VCL_DLLPUBLIC PDFium final @@ -121,6 +121,10 @@ struct PDFiumLibrary final : public rtl::StaticWithInit<std::shared_ptr<PDFium>, std::shared_ptr<PDFium> operator()() { return std::make_shared<PDFium>(); } }; +// Tools + +VCL_DLLPUBLIC OUString convertPdfDateToISO8601(OUString const& rInput); + } // namespace vcl::pdf #endif // HAVE_FEATURE_PDFIUM diff --git a/include/vcl/pdfread.hxx b/include/vcl/pdfread.hxx index d79115f40249..f1534c326ee6 100644 --- a/include/vcl/pdfread.hxx +++ b/include/vcl/pdfread.hxx @@ -15,6 +15,7 @@ #include <tools/stream.hxx> #include <vcl/graph.hxx> #include <basegfx/range/b2drectangle.hxx> +#include <com/sun/star/util/DateTime.hpp> namespace com::sun::star::uno { @@ -38,6 +39,7 @@ struct PDFGraphicAnnotation OUString maText; // In HMM basegfx::B2DRectangle maRectangle; + css::util::DateTime maDateTime; }; struct PDFGraphicResult |