Age | Commit message (Collapse) | Author |
|
Make fz_link reference counting threadsafe.
Remember to free dests of GOTO links. Accordingly, ensure that XPS
does not create links with uninitialised dests.
|
|
A far cry from the full Unicode Line Breaking Algorithm, but it solves
the main issues with CJK line breaking.
|
|
|
|
The current code never looks for /Root objects in dictionaries
as it parses them. This means that 'New style' files end up
without any Roots after repair.
The new code therefore updates pdf_repair_obj to look for Root
objects in the same way it looks for encrypt and id objects.
These go into the list of found roots.
The Root object almost certainly has indirections within it, so
it is vital that the 'doc' pointer gets set. This means we have
to make a slight adjustment to pdf_repair_obj so that the dict
is parsed with a doc pointer. In turn this means we need to
manually ensure that none of the other information read from
the dict during the repair operation will cause indirections
to be resolved. This is achieved by checking for
!pdf_is_indirect at various points.
|
|
In fz_add_line_dot, if the flatness is too low, we can end
up with dots being 1 dimensional. Ensure that we always
use at least 3 vertexes to approximate a dot.
This was inspired by (but does not fix) bug 696172.
|
|
Tor turned up an interesting section in the C spec about this. See
page 275 of http://open-std.org/jtc1/sc22/wg14/www/docs/n1494.pdf
regarding acceptable places for setjmp to occur.
It seems that:
if (setjmp(buf))
if (!setjmp(buf))
if (setjmp(buf) {==,!=,<,>} <integer constant>)
etc are all valid things to do, but assignments (and subsequent
testing of values) like:
if ((code = setjmp(buf)) == 0)
are not allowed.
Further, it's not even clear that:
if (a() && setjmp(buf))
is permissible.
We therefore recast the macros into the form:
a();
if (setjmp((buf)) == 0)
which should be acceptable under the C spec.
To keep try atomic, we introduce a block '{{{' around this, along
with a matching close block '}}}' in the catch clause. This has the
nifty extra effect of giving us a compile time error if we mismatch
our try/catches.
|
|
Use +/-FLT_MAX rather than INT_MIN/MAX for floats.
Avoid mid-block definitions of vars.
|
|
|
|
|
|
|
|
- use core.fileFormat to decide whether a proof file is being viewed,
- don't show the proofing button except for PDF files.
- in a proofing activity, show the page that was being viewed when
the proof was requested.
- Add extra two arguments to fz_write_gproof_file in the Android build.
|
|
Probably related to bug 695507.
|
|
|
|
When we are asked to output a text file, the current code would
correctly guess the file format from the name, but would then
output to stdout anyway. Fixed here.
|
|
Modern gcc's have a compiler (optimiser) bug that can cause
values not to be written back to memory when they should. We
work around this by using an inline function to force the
compiler to behave.
Many thanks to Marcos Woehrmann for doing the analysis that
lead to this workaround.
|
|
Include pdfapp.h after the UNICODE defines to ensure that the
correct version of the Windows string functions are used.
Thanks to Tamir Evan for this workaround.
|
|
sizeof(16) is not 16 :)
Thanks to David Binderman for pointing this out.
|
|
We were missing a : in the getopt string after the 'p' meaning
that any password supplied was treated as a filename.
|
|
Take on 2 patches from Zeniko to solve problems with the latest
version of PDF encryption.
Many thanks.
|
|
Disable the use of link time code creation. I don't believe this
costs us much (if anything) and it avoids VS2005 dying on
release builds due to a bug triggered by the use of 64bit
fz_off_t.
|
|
And add error handling.
|
|
|
|
Still a no-op except for returning the document format.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The default profile case (sRGB and SWOP CMYK) are indicated by
empty strings for those entries.
|
|
|
|
|
|
|
|
Ghostscript device has been changed from gproof to gprf for
sanity.
Also update the non-gsapi calling code to use the same options
as the gsapi calling code.
|
|
This fixes bug #696123 by allowing multiple signatures each to be written
to the document in a separate incemental update.
Add count num_incremental_sections to keep track of the number of
incremental sections.
Add xref_base, which can be set between 0 and num_incremental_sections
inclusive to access different versions of the document.
Add disallow_new_increments flag that stops new incremental sections
being provoked by the creation of an xref stream.
Move the unsaved_sigs list from the document structure to the xref
structure. With this commit in place, the lists will never grow beyond
length one, but we've maintained the list structure in case other cases
need supporting in the future.
Add an end offset field to the xref structure, so that during completion
of signatures the document length of the various incremental versions of
the document are available.
Factor out functions for storing unsaved signatures and for checking if
an object is an unsaved signature.
Do deep copy of objects that require the holding of several versions.
|
|
This is work towards supporting several levels of incremental xref,
which in turn is work towards bug #696123. When several levels are
present, the operation will make a copy of the object and that needs
to be done before any change to the object.
|
|
This is work towards bug #696123
|
|
In the incremental case, we should update ofs_list only when actually
writing an object to file.
This is work towards bug #696123.
|
|
This is work towards supporting several levels of incremental xref,
which in turn, is work towards bug #696123. When several levels of
incremental xref are present there can be objects that appear at
multiple levels and differ between those levels. This deep-copy function
will be used to create new copies before the new version is altered.
|
|
This is work towards bug #696123. It does not fix the bug because, in fact,
saving multiple signatures in one go is not permitted (they need to use
several incremental saves), but we may as well have the order correctly
held.
|
|
Setting the default post rendering ICC profile to sRGB will make the ghostscript
code use the ICC path with a SWOP CMYK device profile followed by a conversion to
sRGB for the RGB content in the gproof file.
|
|
Also fix a few ifdefs in time.c so that it builds on MinGW.
|
|
This will be useful for identifying when we are proofing.
|
|
|
|
|
|
|