Fixes "implicit declaration of function" error with devtoolset-10
(gcc (GCC) 10.2.1 20210130 (Red Hat 10.2.1-11)) in centos7 Docker image
used for building an AppImage.
See also the original source code:
https://github.com/jlaurens/synctex/blob/2020/synctex_parser.c#L104
This bug would cause out-of-memory errors when zoomed in.
There's an equivalent (and therefore redundant) check for if the
normalizedRect is null, so it looks like the normalizedArea != 0 check
was an oversight, if anything.
If the active backend is gnupg (e.g. if only compiled-in backend, or later when configurabitily thru okular has been merged), we can offer to view and edit certificates with Kleopatra (KDE's certificate manager)
Instead of just a simple list of "nickname"'s which is kind of like the
signing backend's internal ID for a given certificate, provide some more
context to each key.
This is a slight improvement, not a complete overhaul.
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.
Adobe's docs say:
For example, for a field with a value of “020”, value returns the integer 20,
while valueAsString returns the string “020”.
Share most of the fieldGetValue code by splitting it out into a 'Core'
variant and then using it in both GetValue and GetValueAsString.
BUGS: 468036
QTime is quite inefficient and getFreeMemory sometimes gets called quite
frequently. I found that upwards of 10% of CPU time was being spent
inside of QTime in some cases. Besides being the recommended thing for
this use case, QDeadlineTimer is a lot more efficient.
It turns out that there were two issues at play here: rounding errors
meant that pixmaps were almost never the same size as pagePainter
thought the tiles should be, and the tile-is-the-size-it-should-be code
path was broken (but only hit in rare cases, seemingly at random).
To help with rounding errors in the future, I added a geometryF function
to NormalizedRect that returns a QRectF. In general,
device-independent-pixel points/rects should be floating point, and
device-pixel rects should be integer.
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
Viewport isn't centered on annotations when translating/resizing.
This is best seen if the page is zoomed in and annotation is translated so that
several viewport transitions had happened.
Using undo after translation will expose error.
Function moveViewportIfBoundingRectNotFullyVisible centers viewport based on
translated/resized annotation's bounding rectangle.
For that reason functions translateBoundingRectangle/adjustBoundingRectangle need
to return the same bounding rectangle as annotation's translate/adjust functions.
The link can be percent encoded so try it like that if not found in the
normal way, also if the text overflows the page, it's in the next page
BUGS: 458289
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
QLinkedList is gone from Qt6
The 1:1 port is std::list but we don't need iterator stability on
removal/insertion so just port to QList (one case to std::vector since
QList needs a copy constructor)
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
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
I'm going to need to break binary compatibility to add a new feature
so may as well cleanup all the TODOs regarding that
Changes:
* Moving a few destructors to the header
* Removing a few unnecessary & in params
* Adding a few necessary & in params
* Making print return an enum instead of a bool and then having another
function that returns the enum
* Make Generator::requestFontData be a virtual
* Remove unused enum
* Remove a few filePrinter unneeded functions
* Remove unused TextDocumentGenerator::addMetaData signal
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
By using Poppler 20.10 new custom image stamps APIs
Instead of the incompatible hack we used before that only worked for Okular.
This is done by modifying the update function used by PopplerAnnotationProxy in order to load the image in
the correct dimensions and send it to the poppler-Qt5 frontend.
We temporarily store the stamp annotation appearance when deleting it so that we can set it again when doing an undo undo.
The bounding rect is *visual* and it can happen that we have
invisible text and thus the algorithm will get super confused
because there will be text items that are outside the text area