Commit graph

226 commits

Author SHA1 Message Date
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
Fabio D'Urso e059d2652c core: support for migration of annots and forms out of docdata/ 2014-09-10 12:18:34 +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 e9e3d4a435 Make documentInfo be Hash based instead of XML based 2014-08-10 22:38:13 +02:00
Frederik Gladhorn a2f6a136b2 Fix some typos 2014-08-10 19:27:31 +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
Frederik Gladhorn 96b0e27c44 QAction, more includes fixed 2014-08-10 01:08:54 +02:00
Frederik Gladhorn 75031eee7e Fix includes 2014-08-08 01:59:55 +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
Fabio D'Urso eb6cd088d7 Fix non-PDF native file extraction from document archives 2014-05-11 18:52:13 +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
Albert Astals Cid 7b7fef0bea Move the messagebox about continuing search from core to ui 2014-05-10 11:33:21 +02:00
Albert Astals Cid e759c94224 let's call it searchid, goes for better searching :) 2014-05-10 10:27:59 +02:00
Albert Astals Cid 4c553ac87f small docu fix 2014-05-10 10:26:30 +02:00
Albert Astals Cid 630d3a8a5f Simplify search parameter passing 2014-05-10 00:49:01 +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
Michal Humpula c07ee043a3 Multiple Tiles Managers per Page
It's straighforward implementation. Every single place, where there were call for (or with) TilesManager, now has a DocumentObserver as companion. The m_tiledManager reference in PagePrivate was changed to QMap<DocumentObserver, TilesManager>.

REVIEW: 113986
2014-02-19 23:41:22 +01:00
Jon Mease b7ce9114c5 Undo support for PDF forms
Together with the already commited support for undo in annotations fixes 177501
BUGS: 177501
REVIEW: 110589
FIXED-IN: 4.11.0
2013-06-03 22:46:41 +02:00
Albert Astals Cid d0fd156dc9 Minor tweaks 2013-04-06 00:28:39 +02:00
Jon Mease 78faf1e68f Add undo/redo support for annotations
REVIEW: 107442
2013-04-06 00:22:48 +02: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
Mailson Menezes 66e93136f9 Limit zoom to 400% if document doesn't support tiles 2012-11-15 20:24:51 -03:00
Tobias Koenig 563ad0458e Extend Document::processAction() to handle RenditionActions
REVIEW: 106608
2012-10-22 13:04:02 +02:00
Albert Astals Cid 4befd95ef8 sendGeneratorRequest -> sendGeneratorPixmapRequest 2012-09-25 11:09:34 +02:00
Albert Astals Cid d917fe1e12 Unify the forward and backward search methods
Same functionality 60 lines of duplicated code less to maintain
2012-09-25 00:14:10 +02:00
Fabio D'Urso 939891c9dd Renamed Document::SaveCapability members I added ten minutes ago
Forms -> SaveFormsCapability
Annotations -> SaveAnnotationsCapability
2012-06-14 00:31:17 +02:00
Fabio D'Urso 23eb083b00 Show a warning if annotations will not be saved to PDF.
The only affected generator is poppler (because it's the only one with
saving support).
Since version 0.20, Poppler can save annotations to PDF. If the user is
using an older version, this patch warns him that annotations are not
saved.
2012-06-13 22:59:55 +02:00
Fabio D'Urso 9a11294b12 Sort bookmarks from the same page in viewport order 2012-06-05 00:49:16 +02:00
Fabio D'Urso e3f1c388de Ask "Save annotation changes?" if there are unsaved annotations that cannot be saved locally
This patch turns Okular into a ReadWritePart. Annotation editing is always
disabled if we're loaded as ReadOnlyPart, no matter the document type.

REVIEW: 105020
2012-05-23 23:43:44 +02:00
Fabio D'Urso f6fa2a5614 Disable GUI operations on certain types of annotations
Modification and removal of *external* annotations are disabled by this
patch. Note that this change doesn't remove any functionality, because they
have never been implemented (AnnotationProxy is defined by the previous
patch).

The #if0'd blocks will be enabled by a future patch that provides fallback
behavior for generators that don't support saving changes.
2012-05-17 23:50:10 +02:00
Fabio D'Urso ec9f068d77 Added AnnotationProxy to SaveInterface
Based on Pino Toscano's earlier work
2012-05-17 23:49:58 +02:00
Tobias Koenig 4639ded310 Implement autostart support for movie annotations
Evaluate MovieActions to implement autostart behavior for movie annotations.

REVIEW:104271
2012-04-03 14:18:10 +02:00
Albert Astals Cid 83a052b3ac Revert 604187b7a3 and 258cd6562a
I did not have time to finish the poppler work and even if this will probably be good for using the poppler work, this adds new API and I don't want to commit to this since having a proper look at making it work
Sorry i failed to fulfill my promise
2011-12-11 22:20:45 +01:00
Michel Ludwig 00b01aa987 Add method 'setLastSourceLocationViewport( const Okular::DocumentViewport& vp )' to PageView
Undo changes to the class 'DocumentViewport'.
2011-11-01 21:13:20 +00:00
Michel Ludwig a823df5c8f Some more changes according to the review. 2011-10-31 21:44:21 +00:00
Michel Ludwig 2fd4100cbd Coding style fixes 2011-10-23 14:22:58 +01:00
Michel Ludwig e8e0237ca0 Add the possibility to show sources location graphically on the rendered pages.
Note that currently the rotation of pages is not taken into account as one still has
to find a unique way of handling this.
2011-10-17 20:56:45 +01:00
Michel Ludwig 0e29008150 Initial commit of the 'ViewerInterface' and of a first implementation. 2011-09-10 18:15:52 +01:00
Albert Astals Cid 258cd6562a Core work for Reset Forms Action support
Heavily inspired in Guillermo Amaral patches
CCMAIL: gamaral@kde.org
2011-08-25 02:24:38 +02:00
Kevin Kofler e001fbab55 Fix landscape documents getting printed in portrait format if "Landscape" is selected in the print dialog (the default).
Partly based on a patch by Falk from KDE bug #181290.

BUG: 181290
REVIEW: 101513
2011-07-28 01:41:48 +02: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 3aa8f6aaa4 fix docu
svn path=/trunk/KDE/kdegraphics/okular/; revision=1162332
2010-08-11 21:01:33 +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
Albert Astals Cid b9d749bc0d Commit "Document information" patch by Luigi Toscano, 8 months without a nack from any devel and i like it, so let's commit it
Luigi's mail says
********
The attached patch changes a bit the handling of document informations 
and the informations shown in the info page.
- document path is added to the information and a button allows you to 
toggle between to file name (default) and the complete path;
- the number of the page is added to the information set by 
documentInfo() and not by the properties dialog (so the latter will not 
modify datas);
- the order of the information shown is the fixed now (see 
orderedProperties).
*********

Then there are a few things of my own since some const here and there and adding three values to Key enum

Also it fixes wish 208999
BUGS: 208999

svn path=/trunk/KDE/kdegraphics/okular/; revision=1049872
2009-11-16 00:46:33 +00:00
Albert Astals Cid 10ba02cbd5 in case we have a new enough poppler give a better error message when we can't save files with /Encrypt
BUGS: 208119

svn path=/trunk/KDE/kdegraphics/okular/; revision=1037771
2009-10-19 23:00:52 +00:00
Albert Astals Cid bdfcd6e337 typos -= 2
svn path=/trunk/KDE/kdegraphics/okular/; revision=1003103
2009-07-27 17:12:34 +00:00
Armin Berres 555cb3c9a1 add synctex support for pdf files
svn path=/trunk/KDE/kdegraphics/okular/; revision=1003016
2009-07-27 14:15:33 +00:00
Pino Toscano b2472bef0d check that the rotation page notification really refers to a page of a document
fixes crash when rotating documents opened in one of more than one okular tabs in konqueror

svn path=/trunk/KDE/kdegraphics/okular/; revision=989681
2009-06-30 17:21:55 +00:00
Pino Toscano dc7583eb8b Add the concept of "next destination" next to the "next viewport" one.
This allows a resolution, if set, of that named destination when opening a document.
CCBUG: 192032

svn path=/trunk/KDE/kdegraphics/okular/; revision=967542
2009-05-13 14:24:30 +00:00
Pino Toscano 090d1ec8a1 SVN_SILENT update apidox of DocumentSynopsis
svn path=/trunk/KDE/kdegraphics/okular/; revision=890893
2008-11-30 16:04:49 +00:00
Pino Toscano b6c5ba1bc8 Add API to load and save "document archives", ie an .okular archive with document and metadata (currently annotations).
Few missing to be done in it:
- more checks when saving
- make it use a proper mimetype

CCBUG: 151614

svn path=/trunk/KDE/kdegraphics/okular/; revision=884597
2008-11-15 14:15:31 +00:00
Pino Toscano 97335bf267 simple optimization in the Google-like search: split the search terms just once
svn path=/trunk/KDE/kdegraphics/okular/; revision=873283
2008-10-19 10:07:48 +00:00
Albert Astals Cid 61964b930f And now okular coupled with poppler from 5 minutes ago has the hability to let you save to file fonts embedded into a pdf file
svn path=/trunk/KDE/kdegraphics/okular/; revision=840789
2008-08-01 20:26:22 +00:00
Pino Toscano e13e74db92 add a private slot for hooks on config change
svn path=/trunk/KDE/kdegraphics/okular/; revision=803946
2008-05-04 15:02:35 +00:00
Pino Toscano 5851ddf6a8 Start a View class for managing the "views" of a document.
Provide ways to register & unregister the view from a Document, and to get/set the view capabilities.

svn path=/trunk/KDE/kdegraphics/okular/; revision=801657
2008-04-27 11:05:59 +00:00
Albert Astals Cid e82ba7082a less typos
svn path=/trunk/KDE/kdegraphics/okular/; revision=796366
2008-04-13 13:15:15 +00:00
Pino Toscano 1b0f177cbe missing private slot declaration, now the backward search works
svn path=/trunk/KDE/kdegraphics/okular/; revision=785672
2008-03-14 17:04:15 +00:00
Pino Toscano 8b6a259b48 Add a continueSearch() for optionally changing the search direction
svn path=/trunk/KDE/kdegraphics/okular/; revision=785619
2008-03-14 13:57:01 +00:00
Pino Toscano c9089f3160 Add the possibility to save a copy of the document with the changes to it (only for form fields at the moment).
On the Document/Generator side, introduce a proper interface for the purpouse.

On the GUI side, add a new "Save As" function that save the changed document to a location.
The action is enabled only if the current backend can provide the functionality.

svn path=/trunk/KDE/kdegraphics/okular/; revision=784661
2008-03-11 23:40:59 +00:00
Pino Toscano 8efe0c45c5 add few apidox for the new requestPixmaps(requests, options)
svn path=/trunk/KDE/kdegraphics/okular/; revision=783272
2008-03-07 16:12:48 +00:00
Pino Toscano e023effb15 Add a requestPixmaps() overload that takes options as flags.
This way we can tell to "merge" in a smart way the new pixmap request with the enqueued ones of the same ID.

Add a (private) slot to refresh all the pixmaps of a page.

svn path=/trunk/KDE/kdegraphics/okular/; revision=783259
2008-03-07 15:50:48 +00:00
Pino Toscano c6b7cfab8c Add a addMetaData(DocumentInfo::Key, QString) signal to the TextDocumentConverter.
This way, standard info keys can be used without adding manually the key id and the translated label.

svn path=/trunk/KDE/kdegraphics/okular/; revision=772350
2008-02-08 14:13:55 +00:00
John Layt 1b1ed9451b Enable Okular printing features:
* Add FilePrinter class to enable printing via postscript files
* DJVU, PDF, and PS backends print FilePrinter
* All backends enable printing of bookmarked pages
* Print and Print Preview actions enabled/disabled depending on backends
  printing ability

Note that FilePrinter only works on *NIX platforms with Cups, lpr, or lp.



svn path=/trunk/KDE/kdegraphics/okular/; revision=741990
2007-11-26 21:43:54 +00:00
Pino Toscano 6d375af868 Move all the bookmarking stuff into the BookmarkManager, that now updates the Document observers automatically.
svn path=/trunk/KDE/kdegraphics/okular/; revision=730404
2007-10-28 18:31:33 +00:00
John Layt 070285e039 Port from KPrinter to QPrinter, remove dependency on KDE4_KDEPRINT_LIBS.
*** Note this is not a complete port, most of the generators use the 
printFiles method which Qt 4.3 does not support, these have simply
been commented out until we find a solution.  At least it removes
the dependency so we can remove from kdelibs.

svn path=/trunk/KDE/kdegraphics/okular/; revision=725660
2007-10-15 23:01:27 +00:00
Pino Toscano bb59c02642 nuke Document::continueLastSearch(), continueSearch(id) is enough
svn path=/trunk/KDE/kdegraphics/okular/; revision=712500
2007-09-14 15:40:00 +00:00
Pino Toscano f8ed5302ec - move the Document::requestDone() to the private class, as it's something internal to the generator work
- make the Generator internally keep an pointer to the private class Document, so we can access easily to the Document' stuff

svn path=/trunk/KDE/kdegraphics/okular/; revision=712498
2007-09-14 15:29:16 +00:00
Pino Toscano 1d40b13d2b SVN_SILENT exclude more private stuff from the apidox
svn path=/trunk/KDE/kdegraphics/okular/; revision=707467
2007-09-01 22:48:28 +00:00
Pino Toscano a8d747745f Cleanup a bit the GuiInterface, and making it work.
Instead of manually requestion actions and other stuff, we just make the interface as gui client, requesting and integrating it in the part gui.
Also, rename the Generator's componentData() to ownComponentData() to avoid clashing with KXMLGUIClient.

svn path=/trunk/KDE/kdegraphics/okular/; revision=705933
2007-08-28 23:17:00 +00:00
Pino Toscano 0ecdc5b3c6 add the searchId to the searchFinished() signal of the Document, so each search line edit can ignore any search not started by itself
svn path=/trunk/KDE/kdegraphics/okular/; revision=704015
2007-08-23 22:16:37 +00:00
Pino Toscano 5acc8fcd0b extra ';'
svn path=/trunk/KDE/kdegraphics/okular/; revision=699740
2007-08-14 00:15:50 +00:00
Albert Astals Cid 41c25cb208 Back from holiday, let's do some comitting :-)
* Update some copyright years and mail addresses
 * Search does not block the GUI anymore YUHUUUUU
   Well, it it does but it's almost unperceptible, that means the searching methods of Document no longer return a bool but a void and the Document::searchFinished signal is used to know if something was found, nothing was found or the user pressed the cancel button !YES! one can cancel search now :-)
 * TextPage no longer holds the area and the current transformed area, it took TOO MUCH memory, now we transform the area each time, it's much more CPU intensive but i could not measure a time loss while searching big documents and i could measure HUNDREDS of MB of usage less.
 * MICRO optimization: Change some code to not detach some containers
 * I still don't have ADSL so this is something like a "blind" commit, Pino will check it compiles against current KDE, not against what's on my computers

svn path=/trunk/KDE/kdegraphics/okular/; revision=699701
2007-08-13 22:25:27 +00:00
Pino Toscano 5f38c3305f typos
svn path=/trunk/KDE/kdegraphics/okular/; revision=688232
2007-07-15 13:54:36 +00:00
Pino Toscano 5387c50960 Make the Configure backends dialog working, of course if the generators have the proper support for "mutable" configuration.
svn path=/trunk/KDE/kdegraphics/okular/; revision=687065
2007-07-12 20:04:56 +00:00
Pino Toscano 43f83cb967 move the calculation of the number of configurable generators to the Document, and start to store the information about the configurability of a generator
svn path=/trunk/KDE/kdegraphics/okular/; revision=687014
2007-07-12 17:52:14 +00:00
Pino Toscano 964424d62f stop gracefully the font extraction thread when closing a document or the properties dialog; make the thread deleting itself when finished
svn path=/trunk/KDE/kdegraphics/okular/; revision=685437
2007-07-08 21:22:37 +00:00
Pino Toscano 8a31e6f3f0 Allow the user to change the visible part(s) of the document by dragging the visible areas in the thumbnails, and to change the zoom of the document by Ctrl+wheel on them.
Patch by Diego R. Brogna, thanks a lot!

BUG: 135521

svn path=/trunk/KDE/kdegraphics/okular/; revision=685273
2007-07-08 14:25:08 +00:00
Pino Toscano e5037f45b1 Refator a bit the way Document and the generators use to read the font information from a document.
Instead of having a synchronous function that extracts all the information at once, use a function to read the fonts of a single page.
This way, we can get all the result step by step (aka page by page), and possibly in an asynchronous way.
The resuls of the font "scanning" are sent via signals, as well the end of the work.
So, instead of block waiting for the results of all the document at once, the Fonts tab in the properties dialog can have a progress bar with the progress, and the results (the fonts) that are added incrementally to the list.

Only two minor things are left:
- the process is always asynchronous at the moment, as the only generator that can provide this kind of information is the Poppler one (safe)
- there is no check for duplicate fonts
But they should be easy to solve.

svn path=/trunk/KDE/kdegraphics/okular/; revision=685002
2007-07-07 20:35:01 +00:00
Pino Toscano 2602037fb9 display (if available) the file size for attachments, courtesy of Albert for his work in poppler
svn path=/trunk/KDE/kdegraphics/okular/; revision=682847
2007-07-03 14:47:16 +00:00
Pino Toscano 3addf5ec7d const& for removePageAnnotations()
svn path=/trunk/KDE/kdegraphics/okular/; revision=668564
2007-05-26 19:25:18 +00:00
Tobias Koenig 06e831a3c9 Add a new method DocumentInfo::set( enum, QString ) to get more
consistency in the documentation info.

svn path=/trunk/KDE/kdegraphics/okular/; revision=664233
2007-05-13 12:54:46 +00:00
Pino Toscano 7cfa67ecf4 improve a bit the Document::setPageSize API -- better pass the size, and not an index
svn path=/trunk/KDE/kdegraphics/okular/; revision=660208
2007-05-01 23:21:29 +00:00
Pino Toscano 0f4cd40e26 slotRotation -> setRotation
svn path=/trunk/KDE/kdegraphics/okular/; revision=660207
2007-05-01 23:09:45 +00:00
Pino Toscano 8a84833504 Link -> Action renaming.
Step #4: apidox fixes.

svn path=/trunk/KDE/kdegraphics/okular/; revision=656146
2007-04-20 12:58:15 +00:00
Pino Toscano 0e12746a92 Link -> Action renaming.
TextDocumentConverter::addLink -> addAction
Document::processLink -> processAction

svn path=/trunk/KDE/kdegraphics/okular/; revision=656145
2007-04-20 12:49:17 +00:00
Pino Toscano 5f21b15d99 Link -> Action renaming.
Step #2: Link -> Action for the action hierarchy, and for the ObjectRect type.

svn path=/trunk/KDE/kdegraphics/okular/; revision=656140
2007-04-20 12:37:12 +00:00
Albert Astals Cid 0d47b62715 krazy include order issues
svn path=/trunk/KDE/kdegraphics/okular/; revision=655893
2007-04-19 18:30:20 +00:00
Albert Astals Cid b0339a4e40 fix some easy krazy issues
svn path=/trunk/KDE/kdegraphics/okular/; revision=654317
2007-04-15 19:11:10 +00:00
Pino Toscano efb6a5bcc6 rename Document::Private to DocumentPrivate
svn path=/trunk/KDE/kdegraphics/okular/; revision=653987
2007-04-14 19:44:07 +00:00
Albert Astals Cid 5365f79d6d fordwardport r648173 kpdf/branches/KDE/3.5/kdegraphics/kpdf/ (4 files in 3 dirs):
Give KMessageBoxes a parent widget.
DVI plugin is missing 4 messageboxes, some work has to be done to get them know the document() so they can call widget()

svn path=/trunk/playground/graphics/okular/; revision=648175
2007-03-30 17:46:50 +00:00
Pino Toscano f55c401b20 Refactor the document search interfaces, as discussed on the mailing list.
Merge the search in normal mode and the type-ahead in a search bar that appears on the bottom of the page view. This should work nicely.
In presentation mode, add a small floating search toolbar that takes care of searching during the presentation mode, on document request. This is not working yet, but basically most of the work is done.

Please test and report any problems you find.

CCMAIL: okular-devel@kde.org

svn path=/trunk/playground/graphics/okular/; revision=643607
2007-03-17 22:58:41 +00:00
Pino Toscano 1bfc805a3e it does not make much sense to check for a serie of permissions at the same time, so just check one permission at a time
svn path=/trunk/playground/graphics/okular/; revision=641341
2007-03-10 23:59:11 +00:00
Pino Toscano bc8036dc62 they are constant methods, so let them be 'const'
svn path=/trunk/playground/graphics/okular/; revision=641248
2007-03-10 17:25:14 +00:00
Pino Toscano fd7434c95a Add support for custom generator about data (and potentially for custom configuration).
svn path=/trunk/playground/graphics/okular/; revision=640348
2007-03-07 18:15:00 +00:00
Pino Toscano ca2a0e194d SVN_SILENT spell check
svn path=/trunk/playground/graphics/okular/; revision=630468
2007-02-05 13:50:36 +00:00
Tobias Koenig 0847edc4b7 Add a second parameter to requestTextPage/generateTextPage where you can
specify whether the request should be synchronous or asynchronous

svn path=/trunk/playground/graphics/okular/; revision=628893
2007-01-31 21:10:00 +00:00
Pino Toscano 10a6e3943e SVN_SILENT small #include cleanup
svn path=/trunk/playground/graphics/okular/; revision=627931
2007-01-28 16:47:13 +00:00
Pino Toscano d6e7010942 Refactor a bit the way we load the generator libraries: hide the hash with the Generator completely into the Document, so the Document have the complete control over them.
Add fillConfigDialog() and supportedMimeTypes() to the Document, so the Part can get all the info it needs with no need to own the generator structure.
This also loads all the generators when asking for their config widget, but that can be improved easily now; furthermore, all the generators used to load documents are kept.

svn path=/trunk/playground/graphics/okular/; revision=627909
2007-01-28 15:46:10 +00:00
Tobias Koenig 5069b62a80 Make PixmapRequest::swap() public but mark it for internal usage.
svn path=/trunk/playground/graphics/okular/; revision=624665
2007-01-17 16:50:54 +00:00