Commit graph

8104 commits

Author SHA1 Message Date
Andre Heinecke 18d404c3ee Support additional widget actions in PDF Forms
Summary:
This adds support for actions associated with form fields
through corresponding annotation widgets.

Test Plan:
Still needs a unit test, only tested manually with
the document attached in the task.

Reviewers: #okular, aacid

Reviewed By: #okular, aacid

Subscribers: okular-devel, aacid

Tags: #okular

Maniphest Tasks: T8627

Differential Revision: https://phabricator.kde.org/D12665
2018-05-30 10:04:21 +02:00
Andre Heinecke 3ae2ae06e8 Fix recalculating forms twice
Summary:
As a side effect of f0a80a67 a recalculation was triggered
by the notifyFormChanges called in EditFormTextCommand::redo,
which is called for each edit. So calculation was done twice.

Test Plan: The calculate forms test still passes.

Reviewers: aacid

Subscribers: okular-devel

Tags: #okular

Differential Revision: https://phabricator.kde.org/D12825
2018-05-28 16:03:54 +02:00
Burkhard Lück 7812952c85 add info about default/custom annotations
make it obvious that okular has more than the default annotations

Differential Revision: https://phabricator.kde.org/D13072
2018-05-24 06:57:33 +02:00
Oliver Sander 004efa70e4 Draw a dark rectangle around highlighted search results
Summary:
BUG: 355043

Makes it easier to distinguish search results from text with a 'highlight' annotation.

Reviewers: #okular

Subscribers: okular-devel, simgunz, cfeck, aacid, ngraham

Tags: #okular

Differential Revision: https://phabricator.kde.org/D7662
2018-05-18 17:27:28 +02:00
Simone Gaiarin 48b9ca66a6 Raise annotation window when clicking on annotation
Summary:
Raise annotation window when clicking on the window title, window text edit, or the associated annotation.

BUG: 388532

Reviewers: #okular, aacid

Subscribers: okular-devel, ngraham, #okular

Tags: #okular

Differential Revision: https://phabricator.kde.org/D10792
2018-05-18 15:17:58 +02:00
Aleix Pol add2c59808 Kirigami: Don't show two drawer items
One just on Android, the other for the rest
2018-05-18 14:41:11 +02:00
Aleix Pol 885e1f2269 Android: Make it possible to open documents from Android
Include ad-hoc code to open files on Android.
2018-05-18 01:44:18 +02:00
Aleix Pol 9ca00505a5 Kirigami: Remove unused slot 2018-05-17 19:58:47 +02:00
Aleix Pol 356229a74f Kirigami/Android: Try to get all android-specific code together
Create a separate android file for such code
2018-05-17 19:58:47 +02:00
Aleix Pol 600e72100b Remove the internal file navigation from the global drawer
Summary: Instead include an "open" item.

Test Plan: opened a file

Reviewers: #okular, mart, aacid

Reviewed By: mart

Subscribers: okular-devel

Tags: #okular

Differential Revision: https://phabricator.kde.org/D12884
2018-05-17 16:56:22 +02:00
l10n daemon script 93645d1f9d GIT_SILENT made messages (after extraction) 2018-05-17 03:36:30 +02:00
Aleix Pol 5931c0de8d Don't pretend to translate "Okular" as an application name
Fixes build when signing the package.
2018-05-15 01:33:08 +02:00
Aleix Pol ad09cfdcf1 Kirigami: Properly reuse the page when scrolling back
Reviewed by Albert Astals
2018-05-13 17:57:22 +02:00
Aleix Pol ac53737242 Remove dup'ed comment 2018-05-13 17:56:05 +02:00
Aleix Pol 9cafd504c0 Kirigami: Asynchronous request of pixmaps
Don't block when reading the document to be able to render

Reviwed by Albert Astals
2018-05-13 17:55:34 +02:00
Aleix Pol c92397da88 Kirigami: Don't try to render if the item is empty 2018-05-13 16:11:55 +02:00
Aleix Pol 1a170e81df Kirigami: set request's normalized rect
We used to give a null rectangle and okular didn't render anything.

Reviewed by Albert Astals
2018-05-13 16:11:33 +02:00
Aleix Pol cf4bb5e3b1 Android: Make it possible to associate with files
Summary:
Put the file into a file descriptor and open this file descriptor.
Just application/pdf for now.

Test Plan: opened some documents on my phone

Reviewers: #okular, aacid, mart

Reviewed By: mart

Subscribers: okular-devel

Tags: #okular

Differential Revision: https://phabricator.kde.org/D12770
2018-05-11 19:27:13 +02:00
Sune Vuorela aa800c01bc Merge branch 'Applications/18.04' 2018-05-08 21:46:20 +02:00
Sune Vuorela 3e48663fb7 Use a target in FindDiscount (modern cmake) rather than variables
Test Plan: Things still builds

Reviewers: kde-buildsystem, apol

Reviewed By: apol

Subscribers: apol, aacid, #okular

Tags: #okular

Differential Revision: https://phabricator.kde.org/D12672
2018-05-08 21:39:06 +02:00
Aleix Pol 90f187e360 QtQuick: schedule a texture render when the window changes
It needs to the devicePixelRatio to the window where it's in.
2018-05-08 17:58:56 +02:00
Aleix Pol a082ace479 QtQuick: simplify PageItem
Don't compare the limits to itself
2018-05-08 17:58:56 +02:00
Aleix Pol 970e0f2ba9 QtQuick: simplify drawing code
Removes a deprecated optimization
2018-05-08 17:58:56 +02:00
l10n daemon script ee57925c57 GIT_SILENT made messages (after extraction) 2018-05-06 06:09:02 +02:00
l10n daemon script 26c40ab7bd GIT_SILENT made messages (after extraction) 2018-05-06 03:31:04 +02:00
Christoph Feck 84b404b845 GIT_SILENT Upgrade KDE Applications version to 18.04.1. 2018-05-02 14:17:32 +02:00
Sune Vuorela 13bdb97084 Don't crash if fopen fails
Summary:
If we have a qrc url, all checks so far fails, and this one returns null.

It might also be possible to get here in some race condition.

Reviewers: aacid

Reviewed By: aacid

Subscribers: #okular

Tags: #okular

Differential Revision: https://phabricator.kde.org/D12643
2018-05-01 22:24:24 +02:00
Albert Astals Cid 3a060a1680 Delete old actions when setting new
Noone should be calling this twice, but there's no need to leak memory if they do
2018-04-30 14:03:22 +02:00
Andre Heinecke 1de0f5465b Add support for chained / next actions
Summary:
This adds support for multiple actions following each
other through the "Next" value of Action dictionaries.

Test Plan: Activates the corresponding part of the visibilitytest.

Reviewers: #okular

Subscribers: sander, aacid

Tags: #okular

Maniphest Tasks: T8278

Differential Revision: https://phabricator.kde.org/D11609
2018-04-30 14:02:49 +02:00
l10n daemon script cc052577a4 GIT_SILENT made messages (after extraction) 2018-04-30 03:40:55 +02:00
l10n daemon script e26b5826cc GIT_SILENT made messages (after extraction) 2018-04-29 03:30:26 +02:00
l10n daemon script aba5b8e6dc GIT_SILENT made messages (after extraction) 2018-04-27 03:38:49 +02:00
l10n daemon script 8041ce82b7 GIT_SILENT made messages (after extraction) 2018-04-26 03:31:33 +02:00
Aleix Pol 58c09cd47c QtQuick: Use proper drawer API 2018-04-26 00:35:06 +02:00
Aleix Pol bf6f5f74dc QtQuick: Don't reset zoom when scrollbars appear 2018-04-25 18:08:03 +02:00
Aleix Pol df35e22314 QtQuick: make certain properties readonly 2018-04-25 17:31:32 +02:00
Aleix Pol 374d953e39 QtQuick: remove unnecessary use of QQuickPixmapItem
It was already ported to render into a pixmap, so just pass that pixmap
as a texture.
2018-04-25 17:27:10 +02:00
Aleix Pol 77dfe3ddc6 QtQuick: Port from Text to proper Kirigami.Units 2018-04-25 16:14:47 +02:00
Aleix Pol 84854afb64 QtQuick: Only emit when there's something to change 2018-04-25 16:01:19 +02:00
Aleix Pol a7b165c0f2 QtQuick: Adopt more assertive behavior upon document change
Don't change all pages to 0, it should be the application currentPage to
change. Otherwise we get to having 3 items at page 0.
2018-04-25 16:01:19 +02:00
Aleix Pol 19222f27ca QtQuick: fix visual corruption
Don't request async pixmaps then render them straight away.
2018-04-25 16:01:19 +02:00
Aleix Pol c51419dd9f QtQuick: use the right bounds when painting
Use textureSize as the documentation suggests, contentsSize is
deprecated.
Sometimes this size is invalid, use textureSize in such case.
2018-04-25 16:01:19 +02:00
Albert Astals Cid 9d64765c21 Use QFile::encodeName instead of toLocal8Bit
It's the same unless you're on Mac, because Mac
2018-04-24 19:45:43 +02:00
Albert Astals Cid 1ab8dd7c62 Fix autotest build if poppler is not installed 2018-04-24 11:59:07 +02:00
Andre Heinecke 7eb72911f8 Add test for visibility changes
The test only tests what is currently supported so it does
not yet test radio buttons and action chains. But
the visibilitytest.pdf already provides these, too.

Differential Revision: https://phabricator.kde.org/D11597
2018-04-23 23:58:11 +02:00
Andre Heinecke bf90867c13 Add support for dynamic visibility
Summary:
This adds the hidden property to JavaScript fields and
uses it to implement support for HideAction.

Test Plan: Unit test in the next commit.

Reviewers: #okular

Subscribers: aacid

Tags: #okular

Maniphest Tasks: T8274

Differential Revision: https://phabricator.kde.org/D11596
2018-04-23 23:55:01 +02:00
Albert Astals Cid b3f8b51b39 Merge remote-tracking branch 'origin/Applications/18.04' 2018-04-23 23:09:19 +02:00
Albert Astals Cid 991eb0ed31 Use toLocal8Bit instead of toUtf8
It's the most "proper" way to do it, i guess in real world scenarios it
doesn't really matter though
2018-04-23 23:08:06 +02:00
Chinmoy Ranjan Pradhan c559268987 Obey umask rules when saving new file
Summary:
Okular saves a new file with permissions 0600 completely ignoring the umask value. This is because it
makes use of QTemporaryFile which creates file with the said permissions and which then Okular copies
to the new location.
So to overcome this generate new file permissions using old mask value and change permissions of the
new file.

BUG: 392682

Test Plan:
Set umask to 0040
Open a pdf file from the same shell and save it under a new name.
Before patch:
file permisions -> 0600
After patch:
file permisions -> 0606

Reviewers: #okular, aacid

Tags: #okular

Differential Revision: https://phabricator.kde.org/D12049
2018-04-23 23:07:19 +02:00
l10n daemon script d2fe4868e1 GIT_SILENT made messages (after extraction) 2018-04-23 03:36:39 +02:00