When signing a "filename versioned" pdf, e.g. foo-1.2.3.pdf, the
current suggestion for signed name is weird. the "_signed"
gets misplaced in the middle of the version.
Also, compressed pdf's (pdf.gz) gets up with weird suggestions.
Fix both of these cases and document (by tests) the current behavior.
In certain usecases, especially for non-linux desktop builds, the
advantage of of dbus is often limited. Provide a way to disable
building with dbus.
Note that this also disables the related functionalities of having a
second okular launch open the document in the first okular.
This also disables the unit tests that tests those features.
This adds a test document with most formatting options directly accessible through acrobat.
Currently only the number format functions are tested as they are the only ones implemented.
Original patch is from Oliver Sander, rebased and fixed up by Nicolas Fella
This is an abi break, but it menas we can extend signature and
certificate info in the future without breaking the abi again.
While we are at it, there is no need to hand around pointers to
certificate/signature info any longer, so clean up that. Fix memleaks as
side effect.
When the second instance is launched it receives an activation token per environment variable
We need to pass that token to the first instance so that it can use it to raise itself
Also properly use startup ids for this on X11 instead of relying on forceActiveWindow, which is a hack
This represents the newly entered data for each keystroke. This is often a single added character, but for cases like pasting text it can be more complex.
The PDF API reference doesn't specify any algorithm to use.
The algorithm used here works by iterating through both strings from the start until the first different character is encountered. Then the rest of the new text is considered the difference.
This doesn't produce the theoretically optimal/minimal diff, but seems to work well enough for practical application.
When text is removed the diff is empty
Better enforce them now, so that the work to port doesn't increase over
time
Not a super fan of this for regular applications, but oh well the ship
has sailed
If an image URL contains a non-ASCII character (e.g. `kartöffelchen.jpg`), the html returned by the markdown parser contains the encoded path `kart%C3%B6ffelchen.jpg`. We must decode the path before checking if the image file exists.
QLinkedList is deprecated in later Qt5 and gone in Qt6
The 1:1 port is std::list but in this cases all we ever do
is create the lists, push back to them, and pass then around
to be read, for that a QList is more than enough
Make it more similar to how we handle the format event.
We pass the new value to processKeystrokeAction, that calls the script
and sets the new value for the form object according to the result. If
needed the widget is refreshed to reflect the new text
Also allows us not to compile a ./part/toggleactionmenu.cpp in the test, which seems to fix
the crashes in freebsd, makes some sense since we end up with two
ToggleActionMenu in the test, the one provided by the okularpart
library and the other compiled in
When the annotation is unchecked the previous mouse mode is restored.
The slot slotMouseNormalToggled is changed back to its original version
of slotSetMouseNormal given that we needed to pass the checked state
only to detach the annotations, and we do it in the lambda now.
BUG: 398108
BUG: 437377
FIXED-IN: 21.08
* Remove the ImplicitDefaultAction intelligence, so ToggleActionMenu is
not more than a KActionMenu with setDefaultAction().
* Instead, reset the default action when it gets removed from the menu().
This is done by filtering QActionEvent from menu().
* Add an autotest for ToggleActionMenu.
This replaces prior efforts to fix problems in ToggleActionMenu
in !245 and !254, following the discussion on the virtual meeting
at 2021-02-26.
6b26a2b4b and 1786e6c99 have already ported PageView and
AnnotationActionHandler to the simplified interface.
The coordinates in Viewport.rePos are normalized on the full page. In
two functions within pageview.cpp, these were treated as coordinates on
the cropped page.
CCBUG: 198427
This partially fixes the bug 198427 in the case that the cropping of the
target pages (and the pages around the target) is known at the time the
link is clicked. That is, it works if
- One uses 'Trim To Selection'
- One uses 'Trim To Margin' and has already viewed at the target
page(s).
In the case that the cropping of the page at the target is unknown, we
still end up at the wrong position.