Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
They don't compile, and are not useful on windows anyway. Remove the
functions completely, not just stub out their implementation, since
otherwise the API contract of consuming the FD would be violated.
https://gitlab.freedesktop.org/poppler/poppler/-/issues/1180
|
|
When fdopen fails, the file descriptor must be closed manually so it
doesn't leak.
|
|
|
|
Issue #715
|
|
GTime was deprecated in glib 2.62 and will overflow in 2038.
The PopplerAttachment struct publicly uses GTime for the 'mtime' and
'ctime' fields. Deprecate these two fields and add accessor functions,
poppler_attachment_get_ctime and poppler_attachment_get_mtime, which
retun GDateTime* instead.
Fixes #765, Related to #715
|
|
find . \( -name "*.cpp" -or -name "*.h" -or -name "*.c" -or -name "*.cc" \) -exec clang-format -i {} \;
If you reached this file doing a git blame, please see README.contributors (instructions added 2 commits in the future to this one)
|
|
|
|
Use G_DEFINE_TYPE_WITH_PRIVATE() instead. This has been available
since glib 2.38, and poppler requires glib 2.41 already.
|
|
Sounds rather scary since we're storing a bigger value than what really
fits.
Fixed by the suggestion of https://developer.gnome.org/glib/stable/glib-Date-and-Time-Functions.html#GTime
Changing the type of _PopplerAttachment ctime/mtime would change the
structure size, thus break the BC, so leaving that for the future for
now
|
|
Use the openFile wrapper instead of calling fopen directly
in the libraries.
|
|
This is the name used by std::string.
|
|
|
|
PopplerAttachmentPrivate has a Object member which
was never destructed, only set to an empty Object()
on dispose. While there is no memory leak (currently!),
this is still not correct.
Fix this by making PopplerAttachmentPrivate a C++ class,
constructed in place of the gobject instance private in
init(), and call the destructor explicitly in finalize().
|
|
Check whether an embedded file is actually present in the PDF
and show warning in that case.
https://bugs.freedesktop.org/show_bug.cgi?id=106137
https://gitlab.freedesktop.org/poppler/poppler/issues/236
|
|
Also add two enum values in the qt5 frontend to representate no flags
Also mark glib/gtk/cairo system includes so that gcc doesn't report the issues in those headers
|
|
Object handles it for us
Also remove incRef/decRef from OutStream
|
|
Implement the move operators and copy construtor
Almost all the init() functions are gone and we just have simple
constructors now
Also made free() public since you're not supposed to call it anymore,
unless you're being evil and malloc'ing Objects like Array/Dict/XRef
This has a huge reaction chain, most importantly we
don't get objects by passing a pointer Object parameter, we
just get the object as a return value, which is a much clearer API
- aobj->copy(&obj);
+ obj = aobj->copy();
before I was never sure what was being copied into what
Comes with a huge diff, I probably made some mistake in the porting
since there was lots of copy & paste involved
|
|
Fixes bug #45440.
|
|
Qt and cpp frontends adapted by Pino Toscano
|
|
|
|
|
|
|
|
Since we are duplicating the stream we don't need to hold a reference of
PopplerDocument anymore.
|
|
|
|
|
|
We need to make this public because the field M in the Annot dictionary
might be a Date string (in PDF date format) or a text string. According
to the PDF spec: "The preferred format is a date string as described in
Section 3.8.3, “Dates,” but viewer applications should be prepared to
accept and display a string in any format". The only way to know whether
it's a PDF date string or not, is by trying to parse it. For this reason
poppler_annot_get_modified() returns a gchar * instead of a time_t. So,
viewers should try to parse the string in order to convert it to a
time_t, and if it fails to parse, use the date string as provided by the
document.
|
|
|
|
|
|
|
|
|
|
* glib/poppler-attachment.cc:
* glib/poppler-attachment.h:
* glib/test-poppler-glib.c: Rename cdate and mdate again to ctime
and mtime, since they are public attributes and we don't want to
break the API.
|
|
* glib/poppler-attachment.cc:
* glib/poppler-attachment.h: Add size, creation and modification
date and checksum properties to attachments. Fix memory leaks.
* glib/test-poppler-glib.c:
* glib/poppler.h:
* glib/poppler-private.h:
* glib/poppler-document.cc: Add a function to convert a pdf date
into a GTime that is used by attachments and document
properties. Fix memory leak in attachments.
|
|
* glib/Makefile.am:
* glib/poppler-attachment.cc:
* glib/poppler-attachment.h:
* glib/poppler-document.cc:
* glib/poppler-document.h:
* glib/poppler-page.cc:
* glib/poppler-private.h:
* glib/poppler.h:
* glib/test-poppler-glib.c:
* glib/reference/tmpl/poppler-enums.sgml:
* glib/reference/tmpl/poppler-unused.sgml: glib bindings for the
embedded file support. It doesn't support mtime and ctime yet,
but the rest works.
|