summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-06-25Fix warnings/compile error on linux.Robin Watts
min is a windows only define.
2012-06-25Forms: handle clicking on one of a group of like-named check boxesPaul Gardiner
All of the group are updated which can make them act like radio buttons in the case that all have different "on" values
2012-06-22Forms support: correctly locate the field dictionary when setting valuePaul Gardiner
Some fields have separate widget annotations. Some have the widget rolled in. This commit correctly identifies the field when setting the field value, thus fixing bug 693145
2012-06-22Forms: implement appearance synthesis for combed textPaul Gardiner
2012-06-22Rework pdf_lexbuf to allow for dynamic parsing buffers.Robin Watts
Currently pdf_lexbufs use a static scratch buffer for parsing. In the main case this is 64K in size, but in other cases it can be just 256 bytes; this causes problems when parsing long strings. Even the 64K limit is an implementation limit of Acrobat, not an architectural limit of PDF. Change here to allow dynamic buffers. This means a slightly more complex setup and destruction for each buffer, but more importantly requires correct cleanup on errors. To avoid having to insert lots more try/catch clauses this commit includes various changes to the code so we reuse pdf_lexbufs where possible. This keeps the speed up.
2012-06-22Free context in mujstest to avoid leaks.Robin Watts
2012-06-22Resize About box to restore change in size lost when merging.Robin Watts
The About box was resized on master, and this change was lost during an earlier merge.
2012-06-21Add fz_buffer_cat_pdf_string function to avoid Bug 693143.Robin Watts
Avoid overflowing fz_buffer_printf by using a dedicated string output function; this also solves potential problems with us not escaping chars in strings correctly. Unfortunately this doesn't completely cure the bug as we run straight into problems in the lexer.
2012-06-21Updates for more effective mujstest.Robin Watts
Mudraw is updated so when the -j flag is used it guesses the length of the text it should output for each field. It also outputs a "Lorem Ipsum" string, which should hopefully test the layout facilities a bit better. Mujstest is updated so it can read the escaped chars from that string.
2012-06-21Forms; Improve text positioning in single-line text widgetsPaul Gardiner
This fixes bug 693126
2012-06-21Forms: implement javascript "color" convenience object (fixes bug 693130)Paul Gardiner
2012-06-21Forms: handle exclusivity of radio buttons. Fixes bug 693125Paul Gardiner
2012-06-21Forms: implement the ResetForm actionPaul Gardiner
This fixes the problem with the test file in bug 693125, although it doesn't make radio buttons act correctly. The file, rather than using radio buttons, was actually using check boxes with a reset-form action to achieve the exclusivity.
2012-06-21Forms: permit annotations with no appearance streamPaul Gardiner
We now create pdf_annot objects for PDF annotations even if they have no appearance stream (i.e. even if invisible). That is necessary because even invisible annotations can be targets of user interaction. This is at least a partial fix for bug 693131
2012-06-20Move the Visual C solution over to new v8 library layoutRobin Watts
Previously, we've been working with a prebuild v8 lib, only available in a single (debug) configuration. Here, we move to reading the include files from thirdparty/v8-3.9/include and getting the built libs from thirdparty/v8-3.9/build/{Debug,Release}/lib/ as appropriate.
2012-06-20Makefile changes to enable mupdf-v8 and mujstest-v8 on linux.Robin Watts
If the v8 lib is present in thirdparty, add the above binaries to the 'all' target.
2012-06-20Various fixes to pdf forms stuff found while compiling for linux.Robin Watts
Mostly char * <-> unsigned char * conversions.
2012-06-20Various small fixes found while trying to build for linux.Robin Watts
"verbose" seems to be a reserved word. Various unused vars, and warnings that didn't show up on windows.
2012-06-20Remove unused variable.Robin Watts
2012-06-20Reduce amount of boiler plate by casting function pointers to void*.Tor Andersson
Remove the shim indirection layer for fz_document. A little less type safe, but a lot less boiler plate.
2012-06-20Don't compile javascript v8 implementation on unix for now.Tor Andersson
2012-06-20Stub wintextinput on x11.Tor Andersson
2012-06-20Silence signed/unsigned conversion warning.Tor Andersson
2012-06-20Add better mechanism for enumerating annotation rectangles.Robin Watts
Rather than having a dedicated call to enumerate the rectangles for the annotations on a page, add an interface for enumerating annotations with accessor functions. Currently the only accessor function is the one to get the annotation rectangle. Use this new scheme in place of fz_bound_annots within mudraw. Also use this scheme to set the caret cursor in the viewer when over a data field.
2012-06-19Avoid lots of const warnings.Robin Watts
Add/Remove a few consts to pacify MSVC.
2012-06-19Fix bug 693133: MuPDF forms support: Text incorrectly transformedPaul Gardiner
Refactor the text-widget updating code to use the later-written, button-updating technique, which accounts for rotation. Also now delays generation of appearance streams until required for rendering.
2012-06-18Forms: fix potential SEGVPaul Gardiner
2012-06-15Add colorspace entry to pdfapp_s to set default colorspace.Robin Watts
This is initialised to rgb or bgr according to whether _WIN32 is set as has always been the case. This allows apps that want to override it (such as mujstest) to do so though.
2012-06-15Fix mouse click glitches with forms enabled pdfapp.Robin Watts
When clicking on a form field, especially with breakpoints in play, it is possible for the up/down click logic to get confused. Improve it by using a flag to avoid processing a down click twice.
2012-06-15Fix binary handling in mujstestRobin Watts
When encountering top bit set chars in script files, behave well.
2012-06-15Tweaks to mujstest; -v and -p flags.Robin Watts
The -v flag tells mujstest to echo the lines read from the script file as it runs (useful to see at what point things crash). The -p flag gives a prefix to apply to the paths from in the script file.
2012-06-15Move javascript loading after encryption/repair has been done.Robin Watts
Currently we were attempting to load the javascript for a document immediately on opening it. Here we delay it until 1) the encryption for a document has been loaded, and 2) any repair required to a document has been done. This solves various problems, which were leading (indirectly) to bug 693128.
2012-06-15Fix bug 693128: MuPDF forms support: crash on button clickPaul Gardiner
Fix one pdf_js function that didn't protect agains doc->js == NULL. Also change exception handling in pdf_new_js so that it doesn't abort just because of a single failed stream load.
2012-06-15Forms: Assume black if default appearance doesn't specify a colorPaul Gardiner
2012-06-14Solution changes to make release and memento builds of v8 linked things work.Robin Watts
We only seem to have a debug build of the v8 build to work with at the moment though...
2012-06-14Add -j flag to mudraw; create simple mujstest scripts automatically.Robin Watts
We add a new fz_bound_annots function (and associated pdf_bound_annots function) that calls a given callback with the page rectangle of the annotations on a given page. This is marked as being a 'temporary' function, so we can remove it/change it in future if required. It seems likely that we'll want to have some sort of 'iterate over annotations' function eventually, and this does the job for now. Add a -j flag to mudraw that outputs a simple mujstest script. For each page with annotations, the script jumps to that page, then for each annotation on the page, it sets some text to be entered, and clicks the annotation. In the case of text fields, this will cause the text to be entered into that text field; in the case of buttons it will execute the button. At the end of each page with annotations, the script is told to snapshot the page. These test scripts are not designed to be full tests, but they do at least provide an easy way for us to generate scripts where every field in our test suite is interacted with.
2012-06-14First version of mujstest-v8.pdf and associated solution changes.Robin Watts
Simple command line tool made from cutting all the windows specifics out of win_main.c and adding a simple script handler in. Read lines from the script, and feed those events to pdfapp. Screenshot pages as required.
2012-06-14After handling a mouseclick on a form field, stop processing.Robin Watts
This is important, otherwise we can get into an unexpected state and subsequent mouse moves appear as pans.
2012-06-14Fix problem in text_splitter (badly initialised max_lines)Robin Watts
Testing tests_private/v1.3/09+20anim+20fx-fo-dx-adr-mx.pdf with mujstest shows an infinite loop due to an initialisation that uses FLT_MAX rather than INT_MAX. Even using INT_MAX still shows problems until a cast is added.
2012-06-13Tweak pdf_new_{rect,matrix,xobject} to avoid warnings.Robin Watts
These functions currently call pdf_array_put, but this fails to extend the array. Change to use pdf_array_push instead.
2012-06-13Merge branch 'master' into formsPaul Gardiner
2012-06-13Remove unnecessary function and improve namingPaul Gardiner
2012-06-13Merge branch 'master' into formsPaul Gardiner
Conflicts: fitz/fitz-internal.h fitz/stm_buffer.c pdf/mupdf-internal.h
2012-06-12Android app: explicitly release resources when page moves out of cache areaPaul Gardiner
2012-06-12A few general utility functions added for the sake of the forms workPaul Gardiner
2012-06-12Remove use of uninialized context.Paul Gardiner
Harmless, since the context wasn't used, but confusing.
2012-06-12Android app: build safe AsyncTask behaviour into a derived classPaul Gardiner
2012-06-12Forms: handle carriage control in multiline text widgetPaul Gardiner
2012-06-12Change mudraw to set the error code if rendering errors present.Robin Watts
Make mudraw pass a cookie in to the rendering procedures. If any errors are reported for any page, remember this, and set the return code to 1 on exit.
2012-06-12Forms: improved handling of text scaling in multiline text widgetsPaul Gardiner