Commit graph

5561 commits

Author SHA1 Message Date
Albert Astals Cid ffbaa091b6 add the QtCore path here too 2011-12-11 22:16:53 +01:00
Script Kiddy 6715c207e8 SVN_SILENT made messages (.desktop file) 2011-12-11 08:38:07 +01:00
Script Kiddy 6af2062d72 SVN_SILENT made messages (.desktop file) 2011-12-08 09:04:23 +01:00
Michel Ludwig a7021f5677 Correctly repaint the page view in all circumstances when closing the currently shown document 2011-12-07 22:05:36 +00:00
Script Kiddy 2d70239ee3 SVN_SILENT made messages (.desktop file) 2011-12-07 09:23:18 +01:00
Stephen Anthony ac85f27474 Modify behaviour for 'facing pages' mode to have pages touch at the center
REVIEW: 103194
2011-12-04 12:44:51 +01:00
Albert Astals Cid 428d2412bd Remove the need for the hash so we can map back from words to characters
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
2011-12-03 13:50:37 +01:00
Albert Astals Cid 972b514c21 Rework makeAndSortLines to return a list of qpairs instead of two lists 2011-12-01 00:09:00 +00:00
Albert Astals Cid ad79f60045 entRect is const 2011-12-01 00:09:00 +00:00
Albert Astals Cid 2776b11276 Move the invocation of makeAndSortLines inside calculateStatisticalInformation 2011-12-01 00:09:00 +00:00
Albert Astals Cid 476e21e440 declare j and k in the for loop definition 2011-12-01 00:09:00 +00:00
Albert Astals Cid b055d659b0 Simplify the code
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
2011-12-01 00:09:00 +00:00
Albert Astals Cid d49894b9d2 the list does not change -> const 2011-12-01 00:09:00 +00:00
Albert Astals Cid d704dd1ecd const + spacing fixes 2011-12-01 00:09:00 +00:00
Albert Astals Cid 8d7c2b2ce1 Make the function const to signal it does not change anything in the object 2011-12-01 00:09:00 +00:00
Albert Astals Cid e8c7e8aa13 Do what the comment says 2011-12-01 00:09:00 +00:00
Albert Astals Cid 446838c080 < > -> !=
I can read it better
2011-12-01 00:09:00 +00:00
Albert Astals Cid 7a4c56dda5 Improve spacing/style 2011-11-30 21:54:19 +00:00
Albert Astals Cid dcf0e78227 Properly parse "characters" formed by two QChars
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
2011-11-28 23:54:36 +00:00
Pino Toscano 56e1002af6 djvu: try to extract "line" text blocks if there are no "word" ones
documents could have no word precision, so we could make a try in using line blocks
(leave the "char" extraction still there and commented)
2011-11-25 16:45:59 +01:00
Yuri Chornoivan 9dab469366 Fix typos: occured -> occurred. 2011-11-25 07:36:23 +02:00
Frederik Schwarzer 40ac3d889b Make strings more user friendly. 2011-11-25 00:14:38 +01:00
Michel Ludwig b8389cac7a Ensure that the zoom combo box is enabled when a new current item is set.
Due to a limitation(?) in the handling of combo boxes, they have to be enabled
whenever a new current item is set.
2011-11-24 21:28:07 +00:00
Geoffry Song 4877786a78 Revert "Grey out copy option for empty text selections"
This reverts commit 34b2e1bab5.

this was a mistake (it also adds a new string)
2011-11-23 19:12:20 -05:00
Geoffry Song 888043991d fix a crash when rightclicking outside a page in text selection mode 2011-11-23 18:59:41 -05:00
Geoffry Song 34b2e1bab5 Grey out copy option for empty text selections 2011-11-23 18:47:35 -05:00
Albert Astals Cid 395d7163f6 Set an empty shortcut to Save copy as
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
2011-11-21 23:34:59 +01:00
Pino Toscano 16b36087f9 dvi: fix build without freetype
always use the "no full font" case for this build configuration
2011-11-15 10:14:43 +01:00
Albert Astals Cid 94daa325b2 Remove this code since it totally breaks okular itself
CCMAIL: michel.ludwig@gmail.com
2011-11-14 17:49:20 +01:00
Albert Astals Cid 0cb5a67ef1 Fix repainting for repaints with small regions
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)
2011-11-14 17:23:00 +01:00
Albert Astals Cid b8663a3908 do not need this qthread include here 2011-11-13 15:36:37 +01:00
David Palacio 82c29939ea Merge pages, pageSize and extractImageFiles.
This fixes change 39fc2a471e
which does not work on archives (zip, rar, etc.).
2011-11-09 10:53:47 -05:00
Aaron Seigo 63a0b4f3cb close the window currently viewing when selecting Quit, as per the KDE ui standards 2011-11-09 16:36:13 +01:00
Albert Astals Cid ea1f02b61a Merge branch 'kill_poppler_thread' 2011-11-09 15:57:35 +01:00
Mohammad Mahfuzur Rahman Mamun aa5128630c Little Experiment for pdf 2011-11-09 19:44:05 +06:00
Michel Ludwig 5db362fb26 Use the correct line number in 'Part::showSourceLocation' 2011-11-08 08:25:36 +00:00
Michel Ludwig ab436aaaf5 Better move the calls to 'viewport()->update()' relating to the ViewerInterface inside the PageView class. 2011-11-07 21:07:10 +00:00
Michel Ludwig d02c86fe9b Also add an update call to 'Part::showSourceLocation'.
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'.
2011-11-06 14:55:05 +00:00
Michel Ludwig 5b7c6b8170 Add two new methods to the viewer interface.
Namely, 'areSourceLocationsShownGraphically()' and 'isWatchFileModeEnabled()'.
A corresponding implementation is provided.
2011-11-05 09:40:12 +00:00
Michel Ludwig 1be2696cc3 Allow for more control over when source locations are shown graphically.
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.
2011-11-05 09:18:08 +00:00
Albert Astals Cid 689f6507d3 Avoid searching three times in the hash 2011-11-03 19:18:27 +01:00
Albert Astals Cid 99b3906560 Move the calculation of the key to a single place
Removes the problem of changing it in one placea and not in the other
2011-11-03 19:11:23 +01:00
Albert Astals Cid 5a48a4aab9 Fix crash due to new text algorithm
When there are two entities with the same key, do not only check for
are but also for text to be matching
2011-11-03 19:00:03 +01:00
Pino Toscano a5c80e1c8e fb2: basic conversion for <stanza> 2011-11-03 11:53:08 +01:00
Albert Astals Cid 5ec4c069f0 Add @since markers 2011-11-02 23:05:19 +01:00
Albert Astals Cid 804abdc542 Merge branch 'master' into kill_poppler_thread 2011-11-02 22:53:09 +01:00
Albert Astals Cid 0c4ed4c08a Make PageView::notifyViewportChanged call "itself" with a queued connection
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
2011-11-02 22:49:22 +01:00
Albert Astals Cid 744915f243 Remove thread from the pdf generator
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
2011-11-02 22:13:19 +01:00
Michel Ludwig d7e116f2d7 Move the definition of the 'EmbedMode' enum to 'part.h' 2011-11-02 20:29:31 +00:00
Michel Ludwig 00b01aa987 Add method 'setLastSourceLocationViewport( const Okular::DocumentViewport& vp )' to PageView
Undo changes to the class 'DocumentViewport'.
2011-11-01 21:13:20 +00:00