This is needed because sometimes the hash had collissions and make it impossible to know which character we had to put back
Now we just keep the word and the characters together in the same class and it is much easier to correlate them
Also the code gets much more simplified and less new/delete are needed
This fixes the crash in 287138
I am still concerted that we use the page width and height in TextPagePrivate::correctTextOrder, but that should not cause crashes, at most some misplacements of very small text
TextPagePrivate::correctTextOrder was running makeAndSortLines + calculateStatisticalInformation to calculate the tcx, tcy
to pass it to XYCutForBoundingBoxes and then in XYCutForBoundingBoxes we were doing the same but just for when countLoop was not 0, thus
if we remove the first code and remove the check for countLoop being not 0 we end up with the same behaviour
This fixes the crash at 287138, it does still not really fix the flaw in the algorithm in TextPagePrivate::breakWordIntoCharacters
when there are two strings with the same text and the same bounding rectangle in the same page, but i still don't know how to fix that problem properly,
so i've fixed a bug that was generating the situation for files that actually do not have it
BUGS: 287138
Since we are going to use KStandardAction::saveAs again later for the "real" 'Save As...'.
This was working fine since there is no default shortcut for SaveAs but if the user sets one
in the global kde config then he gets duplicate shortcut problems
BUGS: 268551
Makes this statement similar to the one that uses pe->rect() instead of pe->region().rects()
You can test it by:
* Opening a document with okular
* Scroll down a bit so that you are not on the top of the viewing area
* Open the review tool
* Move the review tool around
* See how it leaves unrepainted garbage
* See how this patch fixes it
(cherry picked from commit 9f654a0029)
This handles the case when the source location changes without a need for the
document to be scrolled.
Better call 'viewport()->update()' in 'Part::setShowSourceLocationsGraphically'.
The method 'showSourceLocation' has been extended with a new parameter which
controls whether the given source location is shown graphically. A new method
'clearLastShownSourceLocation' has been added; and a corresponding implementation
is provided.
This increases the UI responsiveness on opening PDF that are slow to render
This is because we can only have one thread using the pdf because of
poppler, if we do not queue this call, it will immediately try to generate
the pixmap for this page ending up in the thread for rendering being started.
But then while we are still opening the file we will ask if the file
has embedded files, and this means accessing poppler again and we will be
stuck there because the rendering thread has still not finished. This way by
delaying the execution until we return to the event loop we guarantee
all short queries that are done while opening the file are done already and
we won't block the UI
Generator already provides a nice way to thread requests
so we don't need a custom one here. AFAIR it existed
because this code predates the base generator threading mechanism