Commit graph

158 commits

Author SHA1 Message Date
Albert Astals Cid 3957683d76 Merge branch 'dont-use-docdata-for-annots-and-forms' into Applications/17.12 2017-11-16 15:00:23 +01:00
Albert Astals Cid 19b7e3c112 The work in this branch was sponsored by LiMux
give them some credit in the headers
2017-11-16 09:58:31 +01:00
Albert Astals Cid e29892fda4 some review tweaks 2017-11-15 11:20:25 +01:00
Albert Astals Cid a2f5560c00 PDF: Support the poppler 0.62 renderToImage with update callback
Summary:
This way pages that take more than 500ms to render get updated every so often so that the
user can see that the program didn't hang, it's just that it's taking long to render

Tags:
incremental rendering, partial updates

BUGS: 344081

Subscribers: #okular

Tags: #okular

Differential Revision: https://phabricator.kde.org/D8379
2017-11-09 17:28:54 +01:00
Albert Astals Cid 099d3cfcc8 Update @since to 1.3
Let's see if we can squeeze it in
2017-11-06 06:10:13 +01:00
Albert Astals Cid ca5422d0e9 Implement swapBackingFile for the PDF backend
How does it work:
 * What it does is really closing and opening the file again through poppler
 * This means that things that are generated in "open" time like Page, Rects, Annotations, Forms need to be updated
	* For Page what we do is swap the PagePrivate so that other classes that hold Page* don't break
		* Since some parts of the PagePrivate can be reused, we move them in PagePrivate::adoptGeneratedContents
	* For all the commands in the undo stack we need to update the annotations/forms it refers to, added a new function to do that
	* The annotationmodel needs updating it's pointers
	* The widgets for the forms are reused and their form* updated
	* the widgets for the videos are recreased since videos don't really hold much content (you lose the playing status on save but i think that's acceptable)

TODO: Make this work for .okular files
TODO: For files with password we will need to reload the file, asking for the password again and thus losing the undo stack, warn the user
TODO: autotests
2017-10-26 15:30:44 +02:00
Albert Astals Cid 04ed10d3ea Merge remote-tracking branch 'origin/master' into dont-use-docdata-for-annots-and-forms 2017-09-11 19:51:51 +02:00
Albert Astals Cid 1d2dd42c67 no need for & here 2017-03-02 22:45:45 +01:00
Albert Astals Cid 519f0acac7 document which variant kind is returned 2017-03-02 22:23:41 +01:00
Albert Astals Cid ec70995895 QString as key is evil, add a nice enum 2017-03-02 21:04:59 +01:00
Albert Astals Cid b50aff3ed7 Q_NULLPTR -> nullptr 2017-03-02 20:09:32 +01:00
Albert Astals Cid 2868e3e5ca Support SetOCGState links
Needs a very recent poppler

BUGS: 368402
REVIEW: 129216
2016-11-26 16:00:46 +01:00
Alex Richardson 2f9246ae42 Port to new JSON plugin loading system
This means Okular can now work without ksycoca and KDELibs4Support.

REVIEW: 126193
2016-01-04 15:59:07 +01:00
Albert Astals Cid 8445660539 Merge remote-tracking branch 'origin/master' into frameworks 2015-10-18 22:29:00 +02:00
Albert Astals Cid 1cd101b480 Small cleanup of the layer support feature
Tab replacing, function naming, include removal, @since addition, etc
2015-09-15 01:38:09 +02:00
Montel Laurent 6fab218de9 Use Q_NULLPTR 2015-08-18 15:12:07 +02:00
Saheb Preet Singh bf673495fb added layers on the left sidebar 2015-05-27 19:26:56 +05:30
Montel Laurent 5da7c5f77d port to qCDebug. Autogenerate export headers 2014-10-27 22:35:06 +01:00
Montel Laurent 17a55c6dab Merge remote-tracking branch 'origin/master' into frameworks
Conflicts:
	CMakeLists.txt
	core/document.cpp
	generators/poppler/CMakeLists.txt
	generators/poppler/generator_pdf.cpp
	generators/poppler/generator_pdf.h
2014-10-09 07:34:35 +02:00
Albert Astals Cid d95efa7698 Move synctex up to the core from poppler generator
This way dvi and any other potential user gets it for free

The diff is huge, but the synctex files are just moves.

And the code in core/ is also mostly just a move from the generator_pdf.cpp code

Acked by Luigi

REVIEW: 120311
2014-10-09 00:17:53 +02:00
Montel Laurent 17b7049c69 Fix includes 2014-10-08 13:48:01 +02:00
Frederik Gladhorn dad6936896 Bring back the txt generator 2014-09-17 23:52:52 +02:00
Frederik Gladhorn e28dbc6c00 Port to QMime
compressedMimeFor now already does the inheritance check, so another
check was removed.
2014-09-11 16:32:43 +02:00
Albert Astals Cid 4335b6e509 douc++ 2014-09-09 11:44:33 +02:00
Fabio D'Urso 288f87f1a5 Merge branch 'master' into dont-use-docdata-for-annots-and-forms
Conflicts:
	core/document.cpp
	core/document_p.h
	part.cpp
	part.h
2014-09-08 14:58:55 +02:00
Frederik Gladhorn b79e706e56 Merge remote-tracking branch 'origin/master' into frameworks
Conflicts:
	generators/dvi/generator_dvi.cpp
	generators/ooo/generator_ooo.cpp
	part.cpp
	shell/main.cpp
	shell/shell.cpp
	shell/shell.h
	shell/shellutils.h
	tests/CMakeLists.txt
	ui/propertiesdialog.cpp
2014-08-14 13:35:43 +02:00
Albert Astals Cid f76184cb55 Revert e96dabc467
Diggory i think there was a misunderstanding in our discussion

The patch is unfinished (not goot to commit with a TODO)
and needs to be improved (need to find a way to not break ABI, QSize param should be const &) please
open a reviewrequest and we can discuss/finalize it there.

CCMAIL: diggory.hardy@unibas.ch
2014-08-13 21:07:32 +02:00
Diggory Hardy e96dabc467 Fix font size on high-DPI displays in ePub documents (but makes images small) 2014-08-13 18:54:30 +02:00
Vishesh Handa e038950f50 KIcon -> QIcon 2014-08-13 11:54:49 +02:00
Vishesh Handa e4a4d400c3 Port the poppler generator 2014-08-13 11:16:28 +02:00
Albert Astals Cid e9e3d4a435 Make documentInfo be Hash based instead of XML based 2014-08-10 22:38:13 +02:00
Frederik Gladhorn 0c7a45c7a5 Disable lots of stuff and compile
The text generator is the only one compiled now.
This version links for me but then doesn't find its KPart on startup.

TTS has been completely disabled as well as some other things like the
about dialog.
2014-08-10 14:42:54 +02:00
Fabio D'Urso 43a3756e1c Hot-swap backing file instead of reloading (if the generator supports it) 2014-05-11 18:52:15 +02:00
Albert Astals Cid 86dd9e8801 Move the ooo wallet code to use the part.cpp one
Less widgets in generators/core \o/
2014-05-10 15:54:03 +02:00
Fabio D'Urso e514ddbf78 Added @since markers 2014-05-10 00:56:57 +02:00
Albert Astals Cid e93d5bda01 Move KWallet code from pdf backend to ui
This helps with the widget dependency removal in the core/backends
2014-05-09 19:58:43 +02:00
Eugene Shalygin ed35594627 Use DPI of current screen for PDF rendering
Includes some fixes from Albert:
 * kscreen cmake fixes
   Don't make libkscreen mandatory, give the proper version we need
 * Fix the @since
 * Kill Resolution and use a QSizeF
   I first thought QSizeF didn't make sense, but well what's a dpi if not a number of pixels in width and some others in height?
 * Remove unwanted const
 * Remove unneeded utils.h includes
 * Fix comments on realDPIXY()
 * Make it compile in non X11

REVIEW: 111829
2014-01-13 01:37:56 +01:00
Albert Astals Cid 0aec32fc7d Don't try to print something with invalid sizes
Unfortunately as we can't add new strings to stable versions it'd say "unwnown error" if that happens
Don't think it's too bad since this shouldn't be happening much

BUGS: 329562
2014-01-12 19:21:10 +01:00
Albert Astals Cid 541650a4f4 Remove the concept of observer/view id
Just use the pointer as id :-)

This is BIC and SIC, increase the soversion now to makes sure we don't forget in the future

Patch based in an earlier patch by Bogdan Cristea <cristeab@gmail.com>
REVIEW: 109115
2013-02-24 23:01:02 +01:00
Fabio D'Urso 7e12f25ac0 PixmapRequest: Return normalizedRect() by reference 2012-11-10 19:03:24 +01:00
Fabio D'Urso 2b4de7c934 Generator interface: Use the existing setFeature method to report tiled rendering capability
instead of adding a new supportsTiles() virtual method
2012-11-10 17:04:14 +01:00
Fabio D'Urso 20ecee1b36 Added @since markers in generator.h 2012-11-10 15:50:12 +01:00
Mailson Menezes 96f325896e Keep track of visible region even when not using tiles
The visible region was set in the PixmapRequest only a tiles manager was
available. Because of that the generator could check if it was supposed
to used tiles by simply checking if its normalized rect was null.
However is good to know the visible region even when a tiles manager is
not present. This way if the request is big enough to start a tiles
manager we already know the visible region and can change the
PixmapRequest accordingly.
2012-08-24 14:02:07 -03:00
Mailson Menezes 3c71dbbcf3 Document changes introduced by the tiles manager 2012-08-19 20:35:25 -03:00
Mailson Menezes 11b848cad9 Only use tiles if the generator supports it
Add the new virtual method Generator::supportsTiles (defaults to false)
2012-08-19 15:10:27 -03:00
Mailson Menezes 48d105672f Use NormalizedRect instead of VisiblePageRect on PixmapRequest 2012-07-08 15:24:20 -03:00
Mailson Menezes 83282971d8 Render current viewport only 2012-05-29 14:06:02 -03:00
Pino Toscano c05523da2b fix #include paths in core headers to other core headers to be relative
... and with double quotes brackets, so they can properly include each other without relying on the compiler include path
2011-06-01 10:51:31 +02:00
Albert Astals Cid 3583f6010a move from virtual to slot to not kick ABI in the nuts
svn path=/trunk/KDE/kdegraphics/okular/; revision=1114947
2010-04-14 23:33:14 +00:00
Albert Astals Cid 0f0cacd63a add a way to generators give a bit more info of why printing failed
and implement it in the pdf generator, others welcome to implement the function
for other generators

svn path=/trunk/KDE/kdegraphics/okular/; revision=1114944
2010-04-14 23:07:27 +00:00