summaryrefslogtreecommitdiff
path: root/glib/poppler-attachment.cc
AgeCommit message (Collapse)AuthorFilesLines
2022-03-11Add readability-braces-around-statementsAlbert Astals Cid1-7/+14
2021-12-15glib: Remove FD-taking functions on windowsChristian Persch1-0/+4
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
2021-12-07glib: Close file descriptors on errorChristian Persch1-0/+1
When fdopen fails, the file descriptor must be closed manually so it doesn't leak.
2021-11-18glib: Add APIs to save to file descriptorChristian Persch1-1/+45
2020-08-21glib: Add accessor functions for PopplerAttachmentJason Crain1-0/+52
Issue #715
2020-08-21glib: Deprecate PopplerAttachment GTime fieldsJason Crain1-6/+46
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
2020-07-03Run clang-formatAlbert Astals Cid1-169/+125
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)
2019-11-29Enable modernize-deprecated-headersAlbert Astals Cid1-1/+1
2019-05-27glib: Don't use the deprecated g_type_class_add_private()Federico Mena Quintero1-8/+11
Use G_DEFINE_TYPE_WITH_PRIVATE() instead. This has been available since glib 2.38, and poppler requires glib 2.41 already.
2019-01-25glib: Fix cast from 'GTime *' (aka 'int *') to 'time_t *' (aka 'long *')Albert Astals Cid1-2/+10
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
2019-01-03all: Use the openFile fopen wrapper from gfile.hChristian Persch1-2/+3
Use the openFile wrapper instead of calling fopen directly in the libraries.
2018-11-11Rename GooString::getCString GooString::c_strOliver Sander1-1/+1
This is the name used by std::string.
2018-11-07NULL -> nullptrAlbert Astals Cid1-1/+1
2018-11-03glib: Fix missing destructor callChristian Persch1-17/+11
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().
2018-10-16Fix crash on missing embedded fileMarek Kasik1-9/+17
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
2018-01-08Run clang-tidy with modernize nullptrAlbert Astals Cid1-6/+6
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
2017-05-12Make Stream incRef/decRef privateAlbert Astals Cid1-11/+4
Object handles it for us Also remove incRef/decRef from OutStream
2017-05-09New Object APIAlbert Astals Cid1-3/+1
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
2012-02-04Fix return value of poppler_attachment_saveHib Eris1-1/+1
Fixes bug #45440.
2011-05-27Make FileSpec a class and move EmbFile from Catalog to FileSpecCarlos Garcia Campos1-14/+19
Qt and cpp frontends adapted by Pino Toscano
2011-02-26glib: Add some more introspection annotationsCarlos Garcia Campos1-1/+1
2010-07-05[glib] docs: add some more introspection annotationsCarlos Garcia Campos1-2/+2
2010-06-30[glib] docs: do not use gtk-doc templatesCarlos Garcia Campos1-0/+6
2009-11-15[glib] Remove PopplerDocument from PopplerAttachmentCarlos Garcia Campos1-12/+1
Since we are duplicating the stream we don't need to hold a reference of PopplerDocument anymore.
2009-04-29PopplerAttachment refers its document.Kouhei Sutou1-6/+35
2009-04-25[glib] Only create checksum string for valid checksumsCarlos Garcia Campos1-2/+3
2009-04-21[glib] Add poppler_date_parse to parse PDF format date stringsCarlos Garcia Campos1-2/+2
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.
2009-02-21glib small doc comment correctionsThomas Viehmann1-1/+1
2008-09-20Remove some warnings and errors when compiling with gcc and -pedanticTomas Are Haavet1-1/+1
2008-08-21[glib] Make sure name and descripction are valid utf8 stringsCarlos Garcia Campos1-2/+2
2007-11-05Fix FSF addressAlbert Astals Cid1-1/+1
2007-07-052007-07-05 Carlos Garcia Campos <carlosgc@gnome.org>Carlos Garcia Campos1-2/+2
* 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.
2007-07-042007-07-04 Carlos Garcia Campos <carlosgc@gnome.org>Carlos Garcia Campos1-2/+23
* 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.
2006-01-24Tue Jan 24 01:19:40 2006 Jonathan Blandford <jrb@redhat.com>Jonathan Blandford1-0/+223
* 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.