epub_open wants an utf8 in Windows
It probably also wants utf8 in Linux, but the qPrintable already gives
us an utf8 in most of the normal Linux locales, so don't touch that
BUGS: 448274
Turns out some files contain images saved in the xps archive as a directory containing multiple pieces, the first one being the image itself and the second one being empty.
Of course this is quite a weird way to save an image, but it seems that it still is valid and other viewers are able to load it correctly.
This change fixes the loading of multipiece images.
(cherry picked from commit 3506fb2ea8)
First issue:
- The "document is totally signed" was based on the last signature of
the last page (that had signatures) that is not correct and needs to
be based in the last signature by date
- The "Rev #" number was based on the signature on the page, so if we
had two pages with one signature each the model showed "Rev 1" for
both
It adds new API which is not awesome in a stable branch, but the first
issue is important enough that warrants this to go to the stable branch
e.g. the ones in poppler issue 824
The PDF spec doesn't say (or I couldn't find it) how a user entered
string is converted to the byte array needed for password checking, so
we try both latin1 and utf8
Disable a few new warnings in clang-tidy
bugprone-implicit-widening-of-multiplication-result and
bugprone-easily-swappable-parameters seem like would be nice to fix, but
no time now
We did not take sepStyle 3 into account.
Also sepStyle 1 and 0 where mixed up and it didn't work either because
replace() needs to be assigned back to the string
BUGS: 445868
If we have code like <a><img></a><a><img></a> and the img has alt text
The old code did
remove image
insert alt text
but when we remove the image, the qtextdocument says
"i don't need the <a> anymore since there's nothing inside"
and then everything breaks because the layout has changed and we're
iterating over "unexisting" text blocks
So instead we just insert the alt text and
since we have selected the image with the cursor it will
replace it correctly
BUGS: 444971
This commit uses KUIT formatting for the filename part of the string,
fixes a grammar error ("read only" used as an adjective) and adds a bit
more detail for the user to help them figure out what happened.
Only handle shortcuts to quick annotation actions
if the Okular part is focussed. Otherwise, Okular as
embedded plugin might involuntarily steal numeric input
from the main application (like in the Kate preview plugin).