summaryrefslogtreecommitdiff
path: root/platform
AgeCommit message (Collapse)Author
2016-10-19Rename internal headers to follow pattern *-imp.h.Sebastian Rasmussen
2016-10-18Avoid checking argument to fz_drop_*()/fz_free().Sebastian Rasmussen
As fz_drop_*()/fz_free() all must handle NULL.
2016-10-17gl: Add reload key binding: 'r'.Tor Andersson
2016-10-16Avoid casting when dropping super objects.Sebastian Rasmussen
2016-10-16Only check digital signature when mouse button is released.Sebastian Rasmussen
2016-10-14gl: Do document layout before loading outline, to prevent laying out twice.Tor Andersson
Loading the outline automatically triggers a layout.
2016-10-12Remove superfluous context null checks.Tor Andersson
Code MUST pass a non-null context to all functions. Checking ctx for null and failing silently is no more useful than segfaulting. fz_keep_imp and fz_drop_imp handle NULL pointers safely, so the NULL checks for this can also be dropped at the same time.
2016-10-12Android: Bug 697054: Increase zoom limitRobin Watts
Increase zoom limit to 64 times.
2016-10-10Bug 697094: Disable viewer text input on linux.Robin Watts
Only Windows and Android have form filling text input implemented properly so far. Neither of those build using the Makefile. We therefore disable text input in Makefile built viewers.
2016-10-10Update VS solution with new font.Robin Watts
2016-10-07Update Android build with fz_font/fz_colorspace API changes.Robin Watts
2016-10-07Update Noto fonts.Tor Andersson
New Devanagari serif font, several other updated fonts.
2016-10-07gl: Set glfw error callback before initialisation to catch setup errors.Tor Andersson
2016-10-07Add annotation editing functions and clean interface of existing ones.Tor Andersson
2016-10-07Remove separate tmp/deleted/changed annotation lists.Tor Andersson
Use a flag in the pdf_annot struct instead. Don't pass pdf_document to annotation edit functions.
2016-10-06Hide internals of fz_colorspaceRobin Watts
The implementation does not need to be in the public API.
2016-10-06Bug 697196: Add missing openjpeg file to Android Makefiles.Robin Watts
When updating openjpeg, I forgot to update the Android JNI makefiles with a newly created file. Thanks to szukw000 for reporting this!
2016-10-05Move fz_font definition to be private.Robin Watts
Move the definition of fz_font to be in a private header file rather than in the public API. Add accessors for specific parts of the structure and use them as appropriate. The font flags, and the harfbuzz records remain public. This means that only 3 files now need access to the font implementation (font.c, pdf-font.c and pdf-type3.c). This may be able to be improved further in future.
2016-09-26Update OpenJPEG to the latest (git) version.Robin Watts
Part of the change in this code is to require opj_malloc and co. Sadly, opj_malloc and co do not take a context field, so a we need to wrap calls to openjpeg with a lock. I am reusing the freetype lock here for simplicity.
2016-09-27Add newly added files missing from VS project.Sebastian Rasmussen
2016-09-23JNI: Improve string/name encoding handling.Robin Watts
At the moment, when we create java Strings from string or name PDFObjects, we assume they are all in javas not-quite-UTF-but-almost encoding. Here we assume they are in standard PDF format (namely that if they do not start with one of 2 specific BOMs, that they are in PDFDocEncoding). We update the code to convert to unicode, and create strings from that. This has the added side effect of correctly coping with 0 bytes in the middle of string buffers.
2016-09-23Android example: Make selected display profile persistentFred Ross-Perry
Also, we attempt to start the proofing at the currently-being-viewed page.
2016-09-23Android example: add embedded profile to print profiles listFred Ross-Perry
In the proof dialog, when the document has an embedded print profile, add it to the top of the list of choices. If it's selected, send <EMBEDDED> into gs instead of a file name.
2016-09-23Android example: tweak Apply button in proofing dialog.Fred Ross-Perry
Enable Apply button in proofing only when color checkboxes are changed.
2016-09-23Android example: move kankan module.Fred Ross-Perry
Out of platform/java and into the platform/android/example.
2016-09-23JNI: Fix typo in logic.Robin Watts
2016-09-23JNI: Rework conversion functions and nulls.Robin Watts
Java has a convention that 'toString' should return a printable version of an object. We cannot both support this, and support a sane naming of functions to interpret pdf objects that begins with 'to'. Instead use 'as'. This means we have 'asBoolean', 'asInteger', 'asString' which expect to work just on pdf objects of the required type. 'toString' continues to work on all types and gives a printable version. We split 'toByteString' into 2 separate functions, one for acting on strings (asByteString) and one for acting on names (asByteName) more nicely mirroring the C level functions (pdf_to_string and pdf_to_name). For simplicity of use, we add asString and asName functions that return using java Strings rather than byte arrays. There are potential encoding issues with these, but then there are throughout our string handling at the moment, so we will deal with those in a followup commit. We also update the internal workings of several functions so that they never return NULL pointers, but rather return the null object. To avoid repeatedly creating new null objects we introduce a global static PDFObject.Null object. This is important as we want get("SomethingNonexistent") to return a valid java object, so we can safely do things like: get("Foo").get("Bar").get("Baz").asInteger() without having to error check at every stage. Update DocViewActivity to call the new versions.
2016-09-23Java code to get embedded profile name from a PDF.Robin Watts
To be used to make correct profile invocations.
2016-09-23Clean up annotation enum names.Tor Andersson
Put them in the PDF name space and separate words with underscores. Remove redundant namespace prefixes in java constants. Device.FLAG_MASK rather than Device.FZ_DEVFLAG_MASK. Use namespace for PDF annotation flag enum.
2016-09-23Bug 697021: Count used string space correctly.Sebastian Rasmussen
Account for used space before comparison, not after.
2016-09-23Bug 697020: Remove variable only ever written to.Sebastian Rasmussen
2016-09-21Android example - don't do any layout after the document has been destroyed.fred ross-perry
2016-09-18JNI: Finalizers must be able to run with pointer being null.Sebastian Rasmussen
Applications must be able to run e.g. Document.destroy() and later set that reference to null and have the JVM successfully run the finalizer an arbitrary time later. Previously the JVM would fail to do so because the finalizer would throw an exception since the native pointer was null.
2016-09-17Android app: Update rgba -> bgra.Robin Watts
The separation class had a member renamed. Rename it here too.
2016-09-17Java bindings: Improve exception messagesRobin Watts
2016-09-16MSVS: Make libfonts consistent with other projectsRobin Watts
Its output directory was set differently.
2016-09-16Call Memento_fin in java Document_destroy().Robin Watts
As reasonable a place to call it as we can hope for. If we ever have 2 documents open and we close 1 then it will dump more blocks than we like, but when we get to that stage we can worry about it then.
2016-09-16MSVS: Correct paths to java files and add missing ones.Robin Watts
Not used, other than for the convenience of editing/searching.
2016-09-16Android JNI context fixes.Robin Watts
In the JNI code, we attach a cloned context onto each thread we encounter in thread local storage. When the thread shuts down, we should destroy that context. This can theoretically be achieved on pthreads by using the destructor registered to the tls slot. I have yet to see Android ever actually call this destructor yet though. No such mechanism exists for windows thread, so we'll just leak here for now. There is a potential fix for this, but it's hairy, so details are left in a comment in the code.
2016-09-16JNI: Handle the case where an object's native pointer is NULL.Sebastian Rasmussen
If Java code creates e.g. a Document object and later calls Document.destroy() and then keeps using the Document object the library would end up crashing because the native pointer was null. This case rather special case is now handled.
2016-09-16JNI: Do not fail on using null as a value in a dictionary.Sebastian Rasmussen
The underlying pdf_dict_put() converts into a null object.
2016-09-16JNI: Check if get_context has thrown exception,Sebastian Rasmussen
But do not check it twice.
2016-09-16JNI: Avoid throwing IllegalargumentException.Sebastian Rasmussen
2016-09-16JNI: Avoid getting context if not needed.Sebastian Rasmussen
2016-09-16JNI: Remove forgotten FIXME.Sebastian Rasmussen
This case can be handled gracefully since commit 2d3eca6dec6b8fc7a169b3fc357904069df6b6c4.
2016-09-15JNI: Ensure that BufferInputStream position is in range.Sebastian Rasmussen
2016-09-15JNI: Catch fitz exceptions and convert to Java exceptions.Sebastian Rasmussen
2016-09-15JNI: Don't replace Java exception with one from fitz.Sebastian Rasmussen
The JNI interface throws exceptions of its own, keep those instead of replacing them.
2016-09-15JNI: Throw IllegalArgumentException for null arguments.Sebastian Rasmussen
2016-09-15JNI: Delete global ref to Separation class after use.Sebastian Rasmussen