summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2020-06-18 13:50:15 +0200
committerTomaž Vajngerl <quikee@gmail.com>2020-06-29 20:37:14 +0200
commit3289b5f8556c16390f7c2fbba613196ebe52fe2a (patch)
treea3732d7ebe43d7f8fd546159be65edf79364c675 /include
parent0a96c423e0f21d4c59c226f860e7353b17851aea (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> (cherry picked from commit 4e3196ceedc2b79d58bb57dba86f2f0158d32998) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97440 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/vcl/filter/PDFiumLibrary.hxx6
-rw-r--r--include/vcl/pdfread.hxx2
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