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.
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
Disable bugprone-suspicious-include since it's triggered by the moc
includes
Disable bugprone-reserved-identifier since it's triggered by all our
_OKULAR defines, and yes even if the spec says that underscore is
reserved, are we going to be that unlucky that the library decides to
start using _OKULAR ? not probably
Add two TODOs for the future to make NormalizedRect/Point faster
Silence a warning about a quick moving QString if we make it non const
Silence a uchar vs char warning that is in decades old code so
experience seems to suggest it's ok.
find . \( -name "*.cpp" -or -name "*.h" -or -name "*.c" -or -name "*.cc" \) -exec clang-format -i {} \;
If you reached this file doing a git blame, please see README.clang-format (added 2 commits in the future of this one)
Use jq to filter compile_commands.json to not include the compilation of
autogenerated files, we don't want to check those
Also filter out the synctex folder, since that is imported code
Since unfortunately some of the autogenerated includes don't pass the
checks we do a trick of building out of source and then specifying the
.*/okular/.* path as the only includes we care about
Summary:
This shall improve the documentation of several area classes,
including NormalizedPoint, NormalizedRect, RegularArea, RegularAreaRect.
This shall also clarify when absolute coordinates and when normalized
coordinates are used.
Describes the normalized coordinate system in NormalizedPoint, with a new term “reference area” do describe mapping.
TODO:
Page view rotation.
This is not done consistently in Okular, but can be changed later. I think this documentation will help (me) with that then.
Test Plan: Run doxygen
Reviewers: #okular, aacid
Reviewed By: #okular, aacid
Subscribers: aacid, okular-devel
Tags: #okular
Differential Revision: https://phabricator.kde.org/D21266
Summary:
If a link spans more than one line we need one rect for each of the lines
BUGS: 403247
Subscribers: okular-devel
Tags: #okular
Differential Revision: https://phabricator.kde.org/D18303
We don't use it and it had problems if you tried to use the copy
constructor or the assignment operator so better just remove it.
I'm unusure if this is binary incompatible, but oh well
I.e. make sure they have destructor, copy constructor and asignment
operator
They don't really need them since it's plain data that can be copied
with the defaul implementations (which is actually what i am using) but
since we had some of them implemented and some not, clazy was
complaining that this is generally a bad idea, so implement them all
Summary:
First check in RegularArea::isNull sais this: "I'm a QList. If I'm empty, I'm not null". That doesn't make sense, invert it.
The next check says: "If I contain at least one shape which is not null, I'm not null.". That makes sense, keep it.
Test Plan: - check for regression in callers (TextPage::findText, TextPage::text, TextPage::words)
Reviewers: aacid
Reviewed By: aacid
Subscribers: okular-devel
Tags: #okular
Differential Revision: https://phabricator.kde.org/D15344
Summary:
Only supported by the pdf backend if using poppler >= 0.63
Sadly had to change the generator API
Text cancellation is a bit wobbly still since poppler has large parts
of the code where doesn't check for the cancellation flag, but that
is something that will get automagically fixed for us if the poppler
side is improved
Test Plan: Needs https://bugs.freedesktop.org/show_bug.cgi?id=104263
Reviewers: ervin, rkflx
Reviewed By: ervin, rkflx
Subscribers: #okular
Tags: #okular
Differential Revision: https://phabricator.kde.org/D9328
It's not part of the standard and GCC recently removed support for it
Looking at the code it seems we only need one external check, let's hope i'm right :D
Adapt the text selection to merge correctly depending on the current rotation.
Drawback: darker overlap zones if two lines overlap.
svn path=/trunk/KDE/kdegraphics/okular/; revision=708745