Commit graph

1913 commits

Author SHA1 Message Date
Gilbert Assaf 786ec88526 Bug 236688 - Sort pages according to TOC in CHM Files
All pages in a CHM File are now ordered accordingly to TOC Data. If a page is not in TOC, it will be added at the end.

Testing Done:
I created a small example chm file to test this. I can provide the file, if someone would like to have it.

Bugs closed: 236688

Reviewed at https://git.reviewboard.kde.org/r/130078/
2017-05-31 13:13:48 +02:00
Gilbert Assaf ff1647ce68 CHM: zooming changes the font size
Transfers zoom handling from KHTML to KHTMLView and QImage.
This way the font now actually increases when you zoom in and zoom handling is more in line with the other generators.

Bugs closed: 164198

Reviewed at https://git.reviewboard.kde.org/r/130127/
2017-05-31 13:12:41 +02:00
Gilbert Assaf e876640c21 Bug 262265 chmlib should not send qFatal if encoding could not be guessed
Okular sends a 'qFatal()', if no encoding could be guessed. This will also create a core dump crashing Okular and all open document in this instance.

Bugs closed: 262265

Reviewed at https://git.reviewboard.kde.org/r/130106/
2017-05-31 13:02:20 +02:00
Gilbert Assaf 357f198c1e kio_msits emits mimetype again
kio_msits emitting mimetype function ported to QT5. A kio slave should always emit the mimetype (see kio slave api doc).

Reviewed at https://git.reviewboard.kde.org/r/130113/
2017-05-31 12:54:25 +02:00
l10n daemon script 767a1c0eac SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-05-21 04:36:10 +02:00
l10n daemon script bfe1f62eb5 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-05-12 04:21:17 +02:00
l10n daemon script ef9ea64bc3 GIT_SILENT made messages (after extraction) 2017-05-12 02:59:10 +02:00
Andreas Sturmlechner 1177c2e1a8 Merge branch 'Applications/17.04' 2017-04-23 00:11:28 +02:00
Andreas Sturmlechner 3ed10b8ccf Fix typo 2017-04-22 12:55:48 +02:00
l10n daemon script cd1d36df29 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-04-22 05:08:45 +02:00
l10n daemon script 94fbca1c95 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-04-22 04:06:38 +02:00
l10n daemon script a25642c178 GIT_SILENT made messages (after extraction) 2017-04-22 02:52:16 +02:00
l10n daemon script 91e740c236 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-04-17 04:01:59 +02:00
l10n daemon script dc104a44dc SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-04-09 05:11:50 +02:00
l10n daemon script cce5cf2592 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-04-09 04:02:44 +02:00
Albert Astals Cid dd71abcf47 cmake: Remove endif that doesn't match opening if
Thanfully they fixed this crazyness a while ago
2017-04-06 22:14:01 +02:00
Tobias Deiminger 0957abc39a Add annotation resize functionality
Usage:
If you left-click an annotation, it gets selected. Resize handles appear on the selection rectangle. When cursor is moved over one of the 8 resize handles on the corners/edges, the cursor shape changes to indicate resize mode. Everywhere else on the annotation means "move", just as it was before resize feature was added. Pressing ESC or clicking an area outside the annotation cancels a selection. Pressing Del deletes a selected annotation.

Feature is only applicable for annotation types AText, AStamp and AGeom.

Implementation:
It works by eventually changing AnnotationPrivate::m_boundary and notifying generator (i.e. poppler) about that change. Annotation state handling is shifted out of PageView into a new class MouseAnnotation (ui/pageviewmouseannotation.cpp). Some functionality not related to resizing but to annotation interaction in general is also shifted to class MouseAnnotation, to build a single place of responsiblity.

Other changes:
Add method Document::adjustPageAnnotation, backed by a QUndoCommand.
class Okular::AdjustAnnotationCommand.
Add Annotation::adjust and Annotation::canBeResized methods.
Draw resize handles in PagePainter::paintCroppedPageOnPainter.

Resize and move work
-for types AText, AStamp and AGeom
-on all pages of document
-when viewport position changes
-when zoom level changes
-for all page rotations (0°, 90°, 180°, 270°)

Selection is canceled
-when currently selected annotation is deleted
-on mouse click outside of currently selected annotation
-ESC is pressed

Viewport is shifted when mouse cursor during move/resize comes close to viewport border.
Resize to negative is prevented.
Tiny annotations are still selectable.
If mouse is moved over an annotation type that we can focus, and the annotation is not yet focused, mouse cursor shape changes to arrow.
If mouse cursor rests over an annotation A, while annotation B is focused, a tooltip for annotation A is shown.
Selected Annotation is deleted when Del is pressed.

Test for regressions:
-Annotation interaction (focus, move, resize, start playback, ...) are only done in mode EnumMouseMode::Browse.
-If mouse is moved over an annotation type where we can start an action, mouse cursor shape changes to pointing hand.
-If mouse is moved over an annotation type that we can't interact with, mouse cursor shape stays a open hand.
-If mouse cursor rests over an annotation of any type, a tooltip for that annotation is shown.
-Grab/move scroll area (on left click + mouse move) is prevented, if mouse is over focused annotation, or over AMovie/AScreen/AFileAttachment annotation.
-A double click on a annotation starts the "annotator".

REVIEW: 127366
BUG: 177778
BUG: 314843
BUG: 358060
2017-03-19 23:18:17 +01:00
Albert Astals Cid f06bf612d7 Merge remote-tracking branch 'origin/Applications/16.12' 2017-03-05 19:53:10 +01:00
Albert Astals Cid 0419812ad7 djvu: Initialize to white if rendering fails
It's what ddjvu does, and also it's not nice to return an uninitialzed image back to the user

BUGS: 377202
2017-03-05 19:51:29 +01:00
Albert Astals Cid 7da5adce57 indent++ 2017-03-05 19:35:16 +01:00
Albert Astals Cid 4573c7a646 Recalculate forms after other are edited
BUGS: 376958
2017-03-03 01:08:44 +01:00
Albert Astals Cid 20a81c9de0 Set the Okular Form additional actions from the poppler Form additional actions 2017-03-03 01:00:09 +01:00
Albert Astals Cid c80b59f1de I said use new API 2017-03-02 22:03:46 +01:00
Albert Astals Cid b4ac0be485 Use the new API 2017-03-02 22:00:27 +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 e72d2f5357 virtual override -> override 2017-03-02 20:40:09 +01:00
Albert Astals Cid 191a37fb52 Q_DECL_OVERRIDE -> override 2017-03-02 20:39:24 +01:00
Albert Astals Cid 4072eb0c3a Add override 2017-03-02 20:38:50 +01:00
Albert Astals Cid 0329e29779 Merge remote-tracking branch 'origin/Applications/16.12' 2017-02-28 00:26:36 +01:00
Albert Astals Cid 6874317c8a Fix crash on CHM files that use "plain English" LCID
BUGS: 376936
2017-02-28 00:25:20 +01:00
l10n daemon script 5b7a8d3d67 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-02-26 07:52:08 +01:00
l10n daemon script 15543ea8bd GIT_SILENT made messages (after extraction) 2017-02-26 06:49:42 +01:00
Christoph Feck 7a013e3869 Require KHtml only when building CHM generator
Reviewed by: aacid

Differential Revision: D4507
2017-02-10 02:57:06 +01:00
l10n daemon script c55c44ed95 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-02-07 12:50:18 +01:00
l10n daemon script 2a0bdca687 GIT_SILENT made messages (after extraction) 2017-02-07 08:56:11 +01:00
l10n daemon script 963ce79c45 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-02-06 07:51:00 +01:00
l10n daemon script 7381616690 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-02-06 06:04:23 +01:00
l10n daemon script 53a6cde141 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-02-04 06:23:35 +01:00
l10n daemon script 0922f2f524 GIT_SILENT made messages (after extraction) 2017-02-04 03:59:15 +01:00
l10n daemon script 0e1cf0fbb9 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-02-02 07:40:34 +01:00
l10n daemon script 0cbf1d24e7 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-02-02 05:57:03 +01:00
Martin T. H. Sandsmark 7f3eebd9f3 Only show warning messages by default
REVIEW: 129832
2017-01-16 18:41:33 +01:00
Albert Astals Cid ed4a9f42f4 Merge remote-tracking branch 'origin/Applications/16.12' 2017-01-16 00:37:25 +01:00
Albert Astals Cid f467807506 Remove #ifdefs for Qt we require in cmake anyway 2017-01-16 00:36:08 +01:00
Martin T. H. Sandsmark 033f21c826 Port some missing debug output to categorized logging 2017-01-14 19:15:26 +01:00
l10n daemon script a8a6268183 GIT_SILENT made messages (after extraction) 2017-01-10 08:01:20 +01:00
l10n daemon script e44b17080a SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-01-09 06:00:41 +01:00
l10n daemon script 93b824de9e GIT_SILENT made messages (after extraction) 2017-01-09 03:54:16 +01:00
l10n daemon script 4290dffb1b GIT_SILENT made messages (after extraction) 2016-12-26 06:45:49 +01:00
l10n daemon script 30993aa3f1 GIT_SILENT made messages (after extraction) 2016-12-26 03:41:57 +01:00