Commit graph

1540 commits

Author SHA1 Message Date
Montel Laurent 7b79ca1b36 Pedentic-- 2014-03-02 13:59:49 +01:00
Albert Astals Cid 9858322668 Merge remote-tracking branch 'origin/KDE/4.13' 2014-03-01 17:11:15 +01:00
Albert Astals Cid 3c79ac8ea1 Merge remote-tracking branch 'origin/KDE/4.12' into KDE/4.13 2014-03-01 17:03:23 +01:00
Albert Astals Cid a75a7ed086 Do not start a text generation thread if we're closing
Fixes occasional crash and makes no sense either :D
2014-03-01 17:01:14 +01:00
Albert Astals Cid b8778575f4 master is now 4.14 2014-02-28 00:12:35 +01:00
Albert Astals Cid 7829a47570 Prepare for 4.12.3 2014-02-28 00:10:30 +01:00
Jaan Vajakas a80922d45e Improve XY Cut layout recognition code
It was a simple bug in the XY Cut layout recognition code that made it too eager to see columns everywhere.
Also removed the dependence of the layout analysis algorithms on the display DPI (introduced by the recently added feature of using KScreen) to make their behavior more predictable and reproducible.

BUGS: 326207
BUGS: 331090
FIXED-IN: 4.13.0
REVIEW: 115759
2014-02-25 23:59:41 +01:00
Michal Humpula c07ee043a3 Multiple Tiles Managers per Page
It's straighforward implementation. Every single place, where there were call for (or with) TilesManager, now has a DocumentObserver as companion. The m_tiledManager reference in PagePrivate was changed to QMap<DocumentObserver, TilesManager>.

REVIEW: 113986
2014-02-19 23:41:22 +01:00
Albert Astals Cid 66c6432f5b Prepare for 4.12.2 2014-01-28 23:01:01 +01:00
Albert Astals Cid 8814a6fa3d Do not crash if we don't pass down a widget to show on 2014-01-13 01:47:31 +01:00
Eugene Shalygin ed35594627 Use DPI of current screen for PDF rendering
Includes some fixes from Albert:
 * kscreen cmake fixes
   Don't make libkscreen mandatory, give the proper version we need
 * Fix the @since
 * Kill Resolution and use a QSizeF
   I first thought QSizeF didn't make sense, but well what's a dpi if not a number of pixels in width and some others in height?
 * Remove unwanted const
 * Remove unneeded utils.h includes
 * Fix comments on realDPIXY()
 * Make it compile in non X11

REVIEW: 111829
2014-01-13 01:37:56 +01:00
Albert Astals Cid 52ab967075 Add the error message for the error 2014-01-12 19:21:11 +01:00
Albert Astals Cid 0aec32fc7d Don't try to print something with invalid sizes
Unfortunately as we can't add new strings to stable versions it'd say "unwnown error" if that happens
Don't think it's too bad since this shouldn't be happening much

BUGS: 329562
2014-01-12 19:21:10 +01:00
Albert Astals Cid c324c532d1 Don't try to print something with invalid sizes
Unfortunately as we can't add new strings to stable versions it'd say "unwnown error" if that happens
Don't think it's too bad since this shouldn't be happening much

BUGS: 329562
2014-01-12 19:17:10 +01:00
Jan Kundrát 25d6407ffc Merge branch 'KDE/4.12' 2014-01-11 14:51:30 +01:00
Jan Kundrát 2bd0ec5fda The doesConsumeX method was defined but never used
Having functions which are defined but not used serves no gain. This patch
therefore removes the extra method and updates the comment reference in the
second one to make it standalone.

REVIEW: 114959
2014-01-11 00:25:28 +01:00
Jan Kundrát 677e0660fa Remove unused arguments
REVIEW: 114958
2014-01-11 00:25:09 +01:00
Albert Astals Cid 59e8643697 Prepare for 4.12.1 2014-01-09 00:27:35 +01:00
Albert Astals Cid 10b6560cf7 Merge remote-tracking branch 'origin/KDE/4.12' 2014-01-05 01:32:53 +01:00
Albert Astals Cid 9adbd054e4 Do not resetSearch if we're closing down
It's useless as it will be reset anyway on the close down procedure
and it will cause a crash if you are unlucky.

Reason:
  * In the document observers qset pageview comes before
  * We are closing and notifySetup with an empty vector
  * pageview empties its vector in notifySetip
  * part sees the notifySetup and resets the search
  * resetting the search calls another notifySetup with the non empty page vector
    that will be deleted asap when we go back to the first notifySetup

There are another billion ways to fix this:
 * Don't allow nested notifySetup
 * Clear the running searches before sending the first notifySetup
 * Empty the pagesVector before sending the first notifySetup
 * etc

But i feel this is the less invasive one (even if it may not be the most technically correct)

BUGS: 329582
FIXED-IN: 4.12.1
2014-01-05 01:32:19 +01:00
Jon Mease 43246c563b Viewport transition refinements for Find and Undo/Redo actions
REVIEW: 114060

This patch introduces viewport transitions for undo/redo actions on annotations and forms.  When an annotation/form action is undone/redone but the associated annotation/form is not currently visible, the viewport is updated to center on the undo/redo action. If the annotation/form is visible, the viewport is not updated.

The viewport transitions for the Find action have also been updated to this same algorithm.  Previously the viewport was moved to center on each matching search term even if the search term was already visible in the viewport. This lead to unnecessary viewport transitions if the search term matched several items in a single paragraph for example.

These proposed changes to the viewport transition behavior are consistent with the find and undo behavior of many existing applications including Kate, Open Office, and Foxit PDF Reader.
2013-12-29 23:27:30 +01:00
Albert Astals Cid 25f96c52ea Merge remote-tracking branch 'origin/KDE/4.12' 2013-12-15 23:47:49 +01:00
Albert Astals Cid 88e4bbbbf5 Merge remote-tracking branch 'origin/KDE/4.11' into KDE/4.12 2013-12-15 23:47:27 +01:00
Albert Astals Cid 5dfffec650 Make sure string passed to -J is no more than 255 bytes
lpr refuses to print referencing http://tools.ietf.org/search/rfc2911#section-4.1.2
Unfortunately cutting at 255 bytes may mess up the end of the name, but oh well
BUGS: 326617
FIXED-IN: 4.11.5
2013-12-15 23:46:27 +01:00
Albert Astals Cid 6c0299151f update for the release 2013-12-11 20:14:18 +01:00
Albert Astals Cid 7264e77407 Merge remote-tracking branch 'origin/KDE/4.12' 2013-11-28 00:06:37 +01:00
Albert Astals Cid 56c6b61311 Merge remote-tracking branch 'origin/KDE/4.11' into KDE/4.12 2013-11-28 00:06:13 +01:00
Albert Astals Cid 9c3165d214 Going back and forward in history may also change the page
So notify those that care about tha page and not about the viewport
2013-11-28 00:05:24 +01:00
Egor Matirov f98f55db9d Extend AudioPlayer so that it gives info about if something is playing at the moment or not
Reviewed by Jaydeep Solanki

REVIEW: 114019
2013-11-27 23:27:30 +01:00
Albert Astals Cid d2d4528bea Increase versions for 4.12 RC 2013-11-25 22:23:02 +01:00
Albert Astals Cid 7881731a2b Prepare for 4.11.4 release 2013-11-23 17:53:45 +01:00
Albert Astals Cid 78fa306931 Prepare for Beta3 2013-11-20 00:29:47 +01:00
Albert Astals Cid ff34a5e493 prepare for beta1 2013-11-04 23:17:10 +01:00
Albert Astals Cid b991b11ce2 increase devel version 2013-11-04 23:10:57 +01:00
Albert Astals Cid 5a1afc51e3 Pass down to lpr the printer margins
This makes automagically work the printing on printers with
hard-margins since the QPrinter dialog margins are initialized to the printer
hard-margins. If you still want the old and mostly unuseful
behaviour of not having any margin (and thus your printer not printing things on the borders) you
can always set the margins to 0 in the dialog

BUGS: 319476
FIXED-IN: 4.12.0
2013-10-29 21:25:54 +01:00
Albert Astals Cid e475ac9f4a prepare for 4.11.3 2013-10-26 11:54:43 +02:00
Jaydeep Solanki e9ccc4867b epub video support 2013-10-24 00:20:04 +02:00
Jaan Vajakas dff8bf1b36 Improve searching code
Also simplified code a bit by removing unnecessary calls to toLower in TextPagePrivate::findTextInternalForward and TextPagePrivate::findTextInternalBackward I also fixed a small bug: the letter capital I with dot above (U+0130) did not match itself in case-insensitive mode on Qt 4.8.4 (U+0130 still does not match lowercase i (U+0069), which can be considered another bug, that I didn't fix (although this behavior conforms to the Unicode case folding rules)).

(I did not implement the Knuth-Morris-Pratt algorithm that I promised in a comment of Bug 323263 because on second thought I find that the win, if any, would probably be negligible except for some very special documents and special query strings.)

BUGS: 323262
BUGS: 323263
REVIEW: 112135
2013-10-18 16:30:07 +02:00
Fabio D'Urso ad589985e1 Remove some unused #includes 2013-10-14 20:42:34 +02:00
Albert Astals Cid b1ac42bc55 Update for 4.11.2 2013-09-25 19:41:33 +02:00
Albert Astals Cid 1e24c32846 Update for 4.11.1 2013-08-28 22:49:02 +02:00
Albert Astals Cid dbecbedced Set version for 4.11.0 2013-08-06 22:54:47 +02:00
Albert Astals Cid b4a01564dc Merge remote-tracking branch 'origin/KDE/4.11' 2013-08-06 22:34:01 +02:00
Albert Astals Cid 3f1ec4cee7 Fix fictionbook loading
Prefer the backends that declare explicit support for a mime over the ones that get the support by inheritance
In the fictionbook case it was happening that application/x-fictionbook+xml inherits text plain
so when we ask for the fictionbook backend, we get both
the one that says
MimeType=application/x-fictionbook+xml;
and the one that says
MimeType=text/plain;
and then it happens that the second has bigger X-KDE-Priority

By prefering the ones that explicitely declare support for a mime we "fix" this

OTOH we may want to explore showing the backend selector if there's more than one by default

FIXED-IN: 4.11.0
2013-08-06 22:31:13 +02:00
Fabio D'Urso 77daa9627b Fix the issue exposed by the previous patch
Cherry-picked from a556126816

The patch de-singletons the PageController class.

The PageController is now per-document and it gets deleted when the
document is closed.

As consequence of this, the RotationJob's done signal will not be
delivered if the document has been closed, and thus this fixes the
crash.
2013-07-30 21:13:08 +02:00
Fabio D'Urso a556126816 Fix the issue exposed by the previous patch
The patch de-singletons the PageController class.

The PageController is now per-document and it gets deleted when the
document is closed.

As consequence of this, the RotationJob's done signal will not be
delivered if the document has been closed, and thus this fixes the
crash.
2013-07-30 20:40:40 +02:00
Albert Astals Cid 770374b09c Increase version for 4.11 RC2 2013-07-24 00:14:48 +02:00
Albert Astals Cid e3bd5116c5 Increase version for 4.11 RC1 2013-07-09 19:24:32 +02:00
Albert Astals Cid 4e4829a7dc Increase version for the devel version 2013-07-09 19:23:42 +02:00
Fabio D'Urso 850deab286 Allow selection of filled polygons through the filled region 2013-07-02 00:44:15 +02:00
Fabio D'Urso d77ed7e998 Fix HighlightAnnotation selection in rotated documents 2013-07-02 00:04:01 +02:00
Fabio D'Urso 5888f65a2e Allow selection of polygons through the segment that closes the path too 2013-07-01 22:19:28 +02:00
Fabio D'Urso 3c65f81fb9 Prefer annotations in the foreground in Page::objectRect 2013-07-01 22:06:46 +02:00
l10n daemon script 2e847d2f81 SVN_SILENT made messages (.desktop file) 2013-07-01 03:53:16 +00:00
Mailson Menezes d61c690bc0 Merge remote-tracking branch 'origin/KDE/4.10' 2013-06-24 21:56:56 -03:00
Mailson Menezes ff1168901f Fix issue of creating an annotation on tiles mode
Sometimes annotations created on tiles mode were not shown immediately.

What requestPixmaps do is given a PixmapRequest, change its
normalizedRect attribute so the rect is tile aligned. However
refreshPixmaps was creating a PixmapRequest with the rect already tile
aligned and then delivering the PixmapRequest to requestPixmaps, which
would trye to take the requested rectangle and change it so it is also
tile aligned. Since the PixmapRequest delivered by refreshPixmaps was
already aligned, the requested rectangle was inflated by the tile
alignment procedure. After that the generated request becomes bigger
than the defined threshold and is discarded. This patch actually
removes the tile alignment logic from refreshPixmaps and let only the
requestPixmaps handle this.
2013-06-24 21:53:59 -03:00
Albert Astals Cid f1fa1e0602 Prepare for 4.11 Beta 2 2013-06-24 21:55:05 +02:00
Albert Astals Cid 68c9299b02 Prepare for 4.10.5 2013-06-24 21:49:49 +02:00
Yuri Chornoivan 3b73357d2f Fix some typos found by Krazy2 2013-06-24 13:46:16 +03:00
Peter Grasch 4d4dd68ca2 Fix usability issues with selecting annotations
REVIEW: 109627
2013-06-23 19:22:21 +02:00
Albert Astals Cid e159522131 Merge remote-tracking branch 'origin/KDE/4.10'
Conflicts:
	core/document.cpp
2013-06-23 18:45:09 +02:00
Albert Astals Cid 15eb104d75 Don't preload pages if the generator is not Threaded
BUG: 318048
FIXED-IN: 4.10.5
2013-06-23 18:43:33 +02:00
Fabio D'Urso 3919ab0836 Merge remote-tracking branch 'origin/KDE/4.10' 2013-06-22 12:05:57 +02:00
Mailson Menezes 7a41ee5d50 Fix tiles issue when zooming out a rotated document
The issue can be reproduced by zooming a rotated document to 1600% then
back to 800%

REVIEW: 110905
2013-06-22 11:54:36 +02:00
Albert Astals Cid 1cf42813b4 Prepare for 4.11 Beta 1 2013-06-10 00:43:36 +02:00
Fabio D'Urso 3c7d61fc24 Removed TextDocumentSettingsWidget::font()
Generators can query the font via generalSettings()->font()
2013-06-07 00:45:47 +02:00
Fabio D'Urso a79351212d Removed TextDocumentGenerator::generalSettingsWidget()
Which is now useless because with the previous patch
TextDocumentGenerator no longer caches the widget.
2013-06-07 00:44:56 +02:00
Fabio D'Urso 3dd3a000db Don't crash if Configure Backends is opened again after it's been closed 2013-06-07 00:26:05 +02:00
Jon Mease b7ce9114c5 Undo support for PDF forms
Together with the already commited support for undo in annotations fixes 177501
BUGS: 177501
REVIEW: 110589
FIXED-IN: 4.11.0
2013-06-03 22:46:41 +02:00
Albert Astals Cid ccd889228e Prepare for 0.16.4 2013-05-28 20:17:31 +02:00
Yuri Chornoivan c32b130342 Some i18n fixes 2013-05-19 10:59:43 +03:00
Azat Khuzhin f30c8def7b Added missing core/textdocumentsettings_p.h 2013-05-18 17:44:11 +02:00
Azat Khuzhin 1fdb0a0a06 Font selector for TextDocumentGenerator
REVIEW: 109021
2013-05-18 16:03:33 +02:00
Albert Astals Cid bfbcbffc80 Merge remote-tracking branch 'origin/KDE/4.10'
Conflicts:
	generators/spectre/okularApplication_ghostview.desktop
2013-05-16 23:53:29 +02:00
Albert Astals Cid c9964acdc6 Fix clicking on notes being hard on high zooms
It is still not perfect because for some reason poppler is painting outside the boundaries box (or we are not creating/setting it correctly)
but at least now it's not ultra hard to click in a note application at high zoom

FIXED-IN: 4.10.4
BUGS: 319637
2013-05-16 23:51:11 +02:00
Jon Mease 2ae9e58bb4 Merge window.text, contents and inplaceText annotation properties
BUG: 319442
REVIEW: 110391
2013-05-14 09:43:27 +02:00
Jon Mease 4296ac7e5d Rotate annotation to match page when setting annotation's properties
BUG:318828
REVIEW:110229
2013-05-07 22:06:00 +02:00
Fabio D'Urso c95e8afc43 Merge remote-tracking branch 'origin/KDE/4.10'
Conflicts:
	core/document.cpp
2013-04-26 00:07:09 +02:00
Fabio D'Urso 9812f5277e Do *not* swap width and height in DocumentPrivate::refreshPixmaps
They must not be swapped, because generators already swap them on their
own, and swapping them twice results in distorted pixmaps.

BUG: 318829
FIXED-IN: 4.10.3
2013-04-25 23:57:06 +02:00
Albert Astals Cid 61f0760518 Prepare for 0.16.3 2013-04-25 19:48:35 +02:00
Script Kiddy cbc693b664 SVN_SILENT made messages (.desktop file) 2013-04-20 09:48:58 +02:00
Albert Astals Cid f24445a6e2 Merge remote-tracking branch 'origin/KDE/4.10' 2013-04-17 22:13:34 +02:00
Albert Astals Cid f7b742af0d Rename the variable
Makes it easier to understand, imho
2013-04-17 22:13:02 +02:00
Albert Astals Cid 2abe5fa9ef Do yet another attempt at finding the correct mimetype
Makes
okular http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/products/digital-editions/assets/welcome.epub
work
2013-04-17 22:00:02 +02:00
Albert Astals Cid f03d68128b Merge remote-tracking branch 'origin/KDE/4.10'
Conflicts:
	generators/spectre/okularApplication_ghostview.desktop
2013-04-17 21:03:13 +02:00
Albert Astals Cid a6d53df7ac fix indent 2013-04-17 21:02:32 +02:00
Jon Mease 3c6140b616 Fix Undo / Redo of annotation creation doesn't properly handle page rotation and adds undo unit tests
BUG: 318091
REVIEW: 109989
2013-04-13 22:54:47 +02:00
Albert Astals Cid 076e0cfaf8 More the commands to a different file 2013-04-06 00:39:35 +02:00
Albert Astals Cid d0fd156dc9 Minor tweaks 2013-04-06 00:28:39 +02:00
Jon Mease 78faf1e68f Add undo/redo support for annotations
REVIEW: 107442
2013-04-06 00:22:48 +02:00
Albert Astals Cid 88d36fa27f Update version for 4.10.2 2013-03-26 20:31:53 +01:00
Albert Astals Cid 04c3b836ff Merge remote-tracking branch 'origin/KDE/4.10'
Conflicts:
	generators/spectre/okularApplication_ghostview.desktop
2013-03-14 23:09:57 +01:00
Albert Astals Cid 3f3f82afa1 Fix my email address 2013-03-14 23:09:07 +01:00
Albert Astals Cid 7bfc3a42bc Update versions for 4.10.1 2013-02-27 23:14:24 +01:00
Albert Astals Cid 541650a4f4 Remove the concept of observer/view id
Just use the pointer as id :-)

This is BIC and SIC, increase the soversion now to makes sure we don't forget in the future

Patch based in an earlier patch by Bogdan Cristea <cristeab@gmail.com>
REVIEW: 109115
2013-02-24 23:01:02 +01:00
Script Kiddy a034e086e5 SVN_SILENT made messages (.desktop file) 2013-02-08 08:27:14 +01:00
Script Kiddy 23e88b8605 SVN_SILENT made messages (.desktop file) 2013-02-05 21:28:25 +01:00
Script Kiddy ba79674de9 SVN_SILENT made messages (.desktop file) 2013-02-05 16:52:55 +01:00
Albert Astals Cid 2cab1c0a42 Update versions for 4.10.0 2013-01-28 23:53:31 +00:00
Script Kiddy be60fbf64d SVN_SILENT made messages (.desktop file) 2013-01-23 08:25:54 +01:00
Albert Astals Cid cb003adcfd Merge remote-tracking branch 'origin/KDE/4.10' 2013-01-23 00:06:26 +01:00
Script Kiddy 44b7ff680c SVN_SILENT made messages (.desktop file) 2013-01-22 20:35:02 +01:00
Albert Astals Cid ecef3b27b9 Update version for RC3 2013-01-15 23:31:33 +01:00
Albert Astals Cid f4380a8827 Update version for RC2 2013-01-02 19:33:54 +01:00
Thomas Fischer 96c69528d4 Show paper size names like "ISO/DIN A4" instead of just paper size in numbers
REVIEW: 107350
2012-12-31 11:14:54 +01:00
Script Kiddy 341c0bc7f2 SVN_SILENT made messages (.desktop file) 2012-12-24 09:00:24 +01:00
Script Kiddy d4aceee67e SVN_SILENT made messages (.desktop file) 2012-12-23 07:56:06 +01:00
Albert Astals Cid d32e5ec948 Update version for RC1 2012-12-17 00:48:42 +01:00
Albert Astals Cid 8a7587f874 Increase version for devel version 2012-12-16 23:03:56 +01:00
Fabio D'Urso 3656d8ea47 Force minimum AnnotationObjectRect size
So that it's easier to select thin horizontal/vertical lines
2012-12-16 21:05:15 +01:00
Albert Astals Cid 3485faf6dd Merge remote-tracking branch 'origin/KDE/4.9' 2012-12-12 23:41:53 +01:00
Albert Astals Cid 2002e0a4b0 Do not ignore spaces on backwards search
This ports a change we made to the forward search 4 years ago...
7183c172c2 for more reference

BUGS: 311232
FIXED-IN: 4.9.5
2012-12-12 23:40:41 +01:00
Fabio D'Urso c69be76122 Added comment to tell when the condition fixed by the previous patch happens 2012-12-12 23:32:03 +01:00
Mailson Menezes 466e402d9e Remove assertion of request normalized rect
normalizedRect is null if the requested page is not visible

BUG: 311238
2012-12-12 23:24:31 +01:00
Fabio D'Urso 4a1c43df66 Do not use pixmaps from tiled requests to calculate the contents bounding box 2012-12-12 19:33:48 +01:00
Albert Astals Cid 4defea8674 Update version for beta2 2012-11-30 21:15:56 +01:00
Albert Astals Cid 57bc499c9a Update version 0.15.4 for 4.9.4 release 2012-11-27 09:47:08 +01:00
Pino Toscano 4e171fbbfe add missing ';' 2012-11-16 01:21:02 +01:00
Mailson Menezes ce7d96dd96 Assert the request have a valid normalized rect 2012-11-15 21:11:45 -03:00
Mailson Menezes c0ae3d2e9f Fix issues where some rotated tiles were rejected 2012-11-15 20:50:34 -03:00
Mailson Menezes 7528fb8c88 Change TilesManager::tilesAt use
- The second parameter has changed to an enum
 - Now Page::tilesAt only returns tiles with pixmaps
2012-11-15 20:41:17 -03:00
Mailson Menezes 66e93136f9 Limit zoom to 400% if document doesn't support tiles 2012-11-15 20:24:51 -03:00
Albert Astals Cid 12b6d1c3d3 Kill the ZoomFactor config
It was only used to return 1, that was then used in
CHMGenerator::textPage, that code still looks a bit fishy, but that was already there, it's just now that looks a bit more fishier
2012-11-15 23:45:01 +01:00
Albert Astals Cid 81bf02dc3c Update for beta1 release 2012-11-15 20:43:24 +01:00
Mailson Menezes 31195f03b3 Document ownership of pixmap in Tile 2012-11-12 13:11:34 -03:00
Mailson Menezes b762e5f10e Fix issue where the tiles seemed to be deformed while rotating the page
Also, don't mark rotated pixmaps as dirty since we are already updating
them
2012-11-12 13:11:34 -03:00
Fabio D'Urso d3eb739814 Merged TilesManager::setWidth and setHeight into a single setSize method 2012-11-11 21:39:23 +01:00
Fabio D'Urso 7e12f25ac0 PixmapRequest: Return normalizedRect() by reference 2012-11-10 19:03:24 +01:00
Fabio D'Urso 2b4de7c934 Generator interface: Use the existing setFeature method to report tiled rendering capability
instead of adding a new supportsTiles() virtual method
2012-11-10 17:04:14 +01:00
Fabio D'Urso 20ecee1b36 Added @since markers in generator.h 2012-11-10 15:50:12 +01:00
Mailson Menezes de565cdd2a Reimplement Tile::operator=
QList requires its members to have an assignment operator
2012-11-10 01:54:09 -03:00
Fabio D'Urso c460b0cd90 Changed a little documentation in tilesmanager_p.h 2012-11-09 19:48:46 +01:00
Fabio D'Urso 68f8dd73e1 TilesManager doesn't need to be exported and doesn't need a virtual dtor 2012-11-09 19:48:23 +01:00
Fabio D'Urso b8f4cdc808 Packed bool members in PixmapRequestPrivate 2012-11-09 18:24:58 +01:00
Fabio D'Urso e301aa9099 Re-added private Tile::operator= with no implementation
So that no one uses the default one
2012-11-09 18:19:27 +01:00
Fabio D'Urso 85d5f043a2 Removed useless Tile::operator= 2012-11-09 17:49:23 +01:00
Albert Astals Cid bb9508e2f4 Be const my friend 2012-11-09 01:10:43 +01:00
Mailson Menezes f56c5a8ac9 Merge branch 'master' into tiled-rendering 2012-11-08 20:51:01 -03:00
Fabio D'Urso 437ddad588 Hide tiles manager within okularcore
Only the Tile class (tile.h) is visible from the outside
2012-11-08 20:26:17 -03:00
Fabio D'Urso e12966b259 Removed possibility to have a tiles manager per observer
Now only the PageView can have a tiles manager.
2012-11-08 20:52:01 +01:00
Fabio D'Urso bdbd03f5c9 Misc minor changes in DocumentPrivate::cleanupPixmapMemory
1) Fixed underflow when memoryDiff > memoryToFree
2) Use current viewport's page number instead of any visible page as
   page from which distances are calculated
3) Renamed currentVieport to visibleRect, because the currentVieport is
   a different thing
2012-11-08 19:35:22 +01:00
Fabio D'Urso f2acce05a3 Count used memory using a qulonglong 2012-11-08 19:33:22 +01:00
Fabio D'Urso b4b742a575 Fixed sign in rankTiles 2012-11-08 19:12:05 +01:00
Mailson Menezes f91f55d117 Split tile structure in Tile and TileNode
The new class TileNode represents a node in the tree structure
whereas Tile is just a data structure to store the pixmap and tile rect
and is used outside tiles manager.
2012-11-08 14:44:57 -03:00
Mailson Menezes da54ffdd8e Improve the evicting algorithm
The miss counter was taken away. Now the algorithm relies on the
distance between the tiles and the viewport.

Also the visibleRect() and setVisibleRect() methods were removed from
TilesManager since we now pass this information to
TilesManager::cleanupPixmapMemory()
2012-11-08 10:58:08 -03:00
Mailson Menezes c13ad1afc3 Rewrite debug messages
Fabio D'Urso suggested to rewrite the debug messages showed when a tiles
manager is started to a less scary one.
2012-11-08 09:02:33 -03:00
Mailson Menezes f798ef22d1 Refactor tiles manager code as suggested by Fabio D'urso 2012-11-08 08:50:33 -03:00
Mailson Menezes 1fc67e9e99 Fix memory leaking on tiles merge 2012-11-08 08:50:08 -03:00
Fabio D'Urso e9189c0d71 Added support for user strings in editable form combobox fields 2012-11-03 18:28:50 +01:00
Albert Astals Cid 769e079e70 Merge remote-tracking branch 'origin/KDE/4.9' 2012-11-02 22:26:10 +01:00
Albert Astals Cid d59ffb4a7a Fix crash when searching backwards
When searching backwards end is not actually words.end but words.begin (since the loop goes backwards) hence we can't pass end to stringLengthAdaptedWithHyphen
I've now renamed end to loop_end to make it a bit more clear.
BUGS: 309030
FIXED-IN: 4.9.4
2012-11-02 22:24:23 +01:00
Albert Astals Cid 84be046806 Update version 0.15.3 for 4.9.3 release 2012-11-02 01:02:00 +01:00
Mailson Menezes a61e1e0834 Fix annotations bug
The annotations created in tiles mode were not shown unless the user
changed the zoom level.
2012-10-25 09:24:11 -03:00
Tobias Koenig 563ad0458e Extend Document::processAction() to handle RenditionActions
REVIEW: 106608
2012-10-22 13:04:02 +02:00
Tobias Koenig f713dd0fdf Extended Okular::ScreenAnnotation to take a trigger action
REVIEW: 106604
2012-10-22 13:03:08 +02:00
Tobias Koenig 282950d127 Add Okular::RenditionAction class
REVIEW: 106603
2012-10-22 13:02:23 +02:00
Mailson Menezes b87d0f6c5b Fix bug where outdated requests were used on tiles manager
Requests created before the tiles manager has started aren't meant to be
used.
2012-10-18 01:38:44 -03:00
Bogdan Cristea 7ce6990098 Separate settings in core and non core
Will make it easier to make separate apps based on the core in the future
Note this will most probably break your settings if you are not running a very up to date kdelibs (4.9 or 4.10)
so be careful on updating
REVIEW: 104947
2012-10-16 00:28:29 +02:00
Albert Astals Cid f1269cf223 Merge remote-tracking branch 'origin/KDE/4.9' 2012-10-14 18:59:17 +02:00
Albert Astals Cid 30e4830094 Do not crash if start or end layout don't exist
BUGS: 308003
FIXED-IN: 4.9.3
2012-10-14 18:57:37 +02:00
Albert Astals Cid 42c03e2139 Merge remote-tracking branch 'origin/KDE/4.9' 2012-10-10 23:18:56 +02:00
Albert Astals Cid 1525dea87d Fix printing contiguous selected pages with bookmarks
BUGS: 308200
FIXED-IN: 4.9.3
2012-10-10 23:17:17 +02:00
Mailson Menezes 6032dae9b4 Remove request mutex
This mutex at tiles manager is not actually necessary since any of the
related code will run on a different thread.
2012-10-10 17:35:55 -03:00
Albert Astals Cid ea08b46308 Remove code i did not want to commit
The part with the todo wasn't meant to be commited yet
2012-09-26 23:28:58 +02:00
Albert Astals Cid ed02ecfb60 Remove the disable threading option
It was added ages ago when our threading code was not perfect, but should be top notch now so this makes not any sense
2012-09-25 21:18:10 +02:00
Albert Astals Cid 385933205a Change code so there is no a return inside three ifs 2012-09-25 12:53:35 +02:00
Albert Astals Cid 4befd95ef8 sendGeneratorRequest -> sendGeneratorPixmapRequest 2012-09-25 11:09:34 +02:00
Mailson Menezes ca89ffe96c Avoid making unnecessary requests
Some requests may take a while to process in a highly zoomed region.
Since those requests are not yet finished, other requests to the same
region are likely to be made (specially if the user is scrolling fast)
and the generator will have to render the same region repeatedly.

Also when changing zoom rapidly some pixmaps can arrive at the tiles
manager when another request has already been posted. This pixmap is not
necessary anymore and should be discarded (the tiles manager will get a
new pixmap anyway).
2012-09-24 22:41:57 -03:00
Albert Astals Cid d917fe1e12 Unify the forward and backward search methods
Same functionality 60 lines of duplicated code less to maintain
2012-09-25 00:14:10 +02:00
Albert Astals Cid 998e322e7a Version increases for 0.15.2 (4.9.2) 2012-09-24 16:26:09 +02:00
Tobias Koenig 770e2818bb Evaluate additional actions of screen and widget annotations
This fixes the auto-start feature of PDFs generated with the LaTeX movie
package, which uses the additional action of a widget annotation to start
the movie when entering the page.

BUG: 300051
REVIEW: 106430
FIXED-IN: 4.10
2012-09-21 10:50:57 +02:00
Fabio D'Urso 081f3e5bcb Removed generators/poppler/README.Annotations
README.Annotations contained info that are no longer useful, as Okular
now relies on Poppler to parse PDF annotations.
2012-09-08 19:42:13 +02:00
Jan Binder aa6ed8afc0 Replace deprecated QMatrix by QTransform
REVIEW: 105737
2012-09-08 17:06:02 +02:00
Albert Astals Cid a716b3e4e0 kill all the deprecated functions now that we've change ABI anyway 2012-09-06 19:10:03 +02:00
Tobias Koenig d3e0dadcac Introduce notifyCurrentPageChanged callback DocumentObserver interface 2012-09-06 08:46:10 +02:00
Albert Astals Cid 7407ccb80a Update versions 2012-08-29 12:50:42 +02:00
Mailson Menezes fe9d9118a2 Adjust normalized rect upon tiles manager creation
Must be the smallest normalized rect containing all visible tiles
2012-08-26 18:27:38 -03:00
Mailson Menezes 9b70d1875a Remove debug painting off tiles manager
The extra painting is for debug purposes only. It may change depending
on what the developer wants to fix and should not go upstream.
2012-08-26 18:25:15 -03:00
Mailson Menezes 116e4f9b80 Remove annoying warning
Comparison between signed and unsigned values.
2012-08-26 14:39:35 -03:00
Mailson Menezes 96f325896e Keep track of visible region even when not using tiles
The visible region was set in the PixmapRequest only a tiles manager was
available. Because of that the generator could check if it was supposed
to used tiles by simply checking if its normalized rect was null.
However is good to know the visible region even when a tiles manager is
not present. This way if the request is big enough to start a tiles
manager we already know the visible region and can change the
PixmapRequest accordingly.
2012-08-24 14:02:07 -03:00
Mailson Menezes 0053b9c015 Remove unused property from PixmapObject
This property was added before the tiles manager was created.
2012-08-24 14:02:07 -03:00
Mailson Menezes 2d5b51ff88 Fix crash when changing between memory profiles 2012-08-24 14:01:54 -03:00
Mailson Menezes 42350c87df Properly destruct TilesManager 2012-08-24 13:54:29 -03:00
Mailson Menezes 1bfe8610c9 Do not evict visible tiles
Also avoid trying to evict more tiles if the tiles manager is empty (all
tiles were previously removed)
2012-08-20 00:47:33 -03:00
Mailson Menezes 3c71dbbcf3 Document changes introduced by the tiles manager 2012-08-19 20:35:25 -03:00
Mailson Menezes d2f236e82f Document Tile and TilesManager 2012-08-19 18:56:54 -03:00
Mailson Menezes 66500e05b8 Check the incoming PixmapRequest before using it 2012-08-19 16:00:15 -03:00
Mailson Menezes 11b848cad9 Only use tiles if the generator supports it
Add the new virtual method Generator::supportsTiles (defaults to false)
2012-08-19 15:10:27 -03:00
Tobias Koenig 8dbd83ab2a Implement support for poster image of videos in PDF documents
With this commit Okular will show a so called poster image for PDF documents
containing movie annotations. The image will be a screenshot of the first frame
of the video.

BUGS: 301603
REVIEW: 105890
FIXED-IN: 4.10.0
2012-08-19 12:23:47 +02:00
Mailson Menezes d3a0fa057a Split tiles before the request
The splitting was only executed after the pixmap arrived the tiles
manager. That was bad and likely to lead to an unnecessary rendering in
the case of a big tile that would be split after all.

This also fixes a bug where some tiles weren't updated.
2012-08-18 17:31:16 -03:00
Mailson Menezes 851a503e81 Move tiles manager to a private header 2012-08-17 15:23:58 -03:00
Mailson Menezes 401c3f7e5d Add rotation support to tiles manager 2012-08-17 14:30:53 -03:00
Mailson Menezes 67c59c2c44 Fix underflow on memory cleanup in tiles manager 2012-08-15 15:25:36 -03:00
Tobias Koenig 58eb957f26 Support multiple annotations in RMB menu
Provide the actions for all annotations in the RMB menu, if multiple
annotations are located on top of each other.

BUGS: 300942
REVIEW: 106035
FIXED-IN: 4.10.0
2012-08-15 17:24:11 +02:00
Mailson Menezes 3c09b93713 Merge branch 'master' into tiled-rendering
Conflicts:
	core/document.cpp
2012-08-15 11:44:22 -03:00
Mailson Menezes 3d630fbb2a Remove unused tiles 2012-08-13 01:09:38 -03:00
Script Kiddy e653d83816 SVN_SILENT made messages (.desktop file) 2012-08-07 18:30:47 +02:00
Mailson Menezes 82510818c4 Split and merge tiles according to zoom level
To allow more zooming, split tiles when it reaches an arbitrary size.
2012-08-05 15:50:02 -03:00
Albert Astals Cid b441873b6b 4.9.0 version bump 2012-07-25 19:07:55 +02:00
Script Kiddy 6f2e1fa918 SVN_SILENT made messages (.desktop file) 2012-07-19 10:10:40 +02:00
Fabio D'Urso edbb4ef9f5 Call Generator::signalPixmapRequestDone _after_ saving the calculated bounding box
Fixes a bug that causes the extraction of a wrong bounding box:

If the request queue is not empty, signalPixmapRequestDone causes a new
pixmap request to be started, thus overwriting mPixmapGenerationThread's
mCalcBoundingBox before it is read by the if in the next line.

Now signalPixmapRequestDone is called after the bounding box is saved,
so that new requests are started only after all data from
mPixmapGenerationThread have been saved.

BUG: 257370
REVIEW: 105600
2012-07-17 21:06:19 +02:00
Fabio D'Urso 5b12bf685d Call Generator::signalPixmapRequestDone _after_ saving the calculated bounding box
Fixes a bug that causes the extraction of a wrong bounding box:

If the request queue is not empty, signalPixmapRequestDone causes a new
pixmap request to be started, thus overwriting mPixmapGenerationThread's
mCalcBoundingBox before it is read by the if in the next line.

Now signalPixmapRequestDone is called after the bounding box is saved,
so that new requests are started only after all data from
mPixmapGenerationThread have been saved.

BUG: 257370
REVIEW: 105600
2012-07-17 20:35:54 +02:00
Mailson Menezes 032f03a0e8 Track memory usage of tiles 2012-07-16 18:19:02 -03:00
Mailson Menezes 9c09eb938e Use tiles only when it's necessary
In other words: don't use tiles when the page is not big enough
2012-07-16 18:19:01 -03:00
Albert Astals Cid 9ce6c55559 Don't be so noisy! 2012-07-11 22:44:12 +02:00
Albert Astals Cid ea8ec188c9 Don't be so noisy! 2012-07-11 22:42:45 +02:00
Tobias Koenig 4c8f0bc5de Fix temporary movie file names correctly
Actually we don't need the source name included into the name of
the temporary file. So don't do it to prevent bogus names.
2012-07-11 16:47:17 +02:00
Tobias Koenig ceba1bcb3d Follow-up fix for ensuring sane temporary movie file names 2012-07-11 16:42:52 +02:00
Tobias Koenig 06b0cf8616 Always create temporary movie files with a sane name
BUGS: 303227
2012-07-11 12:25:21 +02:00
Mailson Menezes de2ee00ff8 Improvements on tiles manager
- Made improvements on the code (not performance)
 - Fix issue of not painting dirty tiles
2012-07-11 02:14:50 -03:00
Mailson Menezes 124da866e8 Add license header to tile manager files 2012-07-10 21:48:30 -03:00
Fabio D'Urso b78aa89d12 Before preloading pixmaps check that they fit in cache 2012-07-10 01:11:52 +02:00
Fabio D'Urso 36108c509e Refactoring of cleanupPixmapMemory
memoryToFree calculation now lives in DocumentPrivate::calculateMemoryToFree()
2012-07-10 01:11:40 +02:00
Fabio D'Urso 37bb875c30 Clean pixmap cache in order of descreasing distance from current viewport
Previously it was cleaned in FIFO order

I also moved the pixmap selection logic in a separate function, that
will be needed in the next patches.

Note: This behaviour is yet not optimal for the thumbnails panel,
because it is allowed to be at a page different than the current
viewport
2012-07-10 01:11:12 +02:00
Fabio D'Urso 569c9b84ce Before preloading pixmaps check that they fit in cache 2012-07-10 00:57:49 +02:00
Fabio D'Urso 00afec8617 Refactoring of cleanupPixmapMemory
memoryToFree calculation now lives in DocumentPrivate::calculateMemoryToFree()
2012-07-10 00:57:17 +02:00
Fabio D'Urso 1feb549d3d Clean pixmap cache in order of descreasing distance from current viewport
Previously it was cleaned in FIFO order

I also moved the pixmap selection logic in a separate function, that
will be needed in the next patches.

Note: This behaviour is yet not optimal for the thumbnails panel,
because it is allowed to be at a page different than the current
viewport
2012-07-10 00:56:19 +02:00
Albert Astals Cid 0bbc23b859 Bump to RC2 version 2012-07-09 23:04:31 +02:00
Mailson Menezes 9f3cf45e37 Rendering with a tiles manager
Currently it's only available for PDFs and does not support rotation.
2012-07-08 18:08:38 -03:00
Mailson Menezes 48d105672f Use NormalizedRect instead of VisiblePageRect on PixmapRequest 2012-07-08 15:24:20 -03:00
Albert Astals Cid 48651d22dd warning-- 2012-07-02 11:50:32 +02:00
Albert Astals Cid 1b7074cacd warning-- 2012-07-02 11:49:55 +02:00
Albert Astals Cid 42911929fb Bump to RC1 version 2012-06-25 22:04:27 +02:00
Albert Astals Cid ff92bac005 Bump devel version to 0.15.70 2012-06-25 22:03:43 +02:00
Albert Astals Cid cd8485c7bc Make the freeSwap out param optional 2012-06-24 23:53:01 +02:00
Fabio D'Urso 3c2d2e1b7a Better memory limit tuning in greedy mode to avoid triggering the OOM if swap is full
Using Albert's new formula
2012-06-24 21:05:14 +02:00
Albert Astals Cid 0e01e11717 Do not update the last update time on failure
Because the code *should* work so it failing is exceptional and we don't want to cache the value
2012-06-24 20:08:18 +02:00
Albert Astals Cid fb5a178311 Fix underflwo in memoryToFree found by Fabio 2012-06-24 19:03:38 +02:00
Albert Astals Cid 444e6b7b19 Fix underflow in getFreeMemory()
It actually serves three purposes:
a) Make sure all the values are there (this should be always true, but doesn't hurt making sure) because if SwapFree was there but SwapTotal was not, it'd be a mess
b) add up things in order so we don't underflow, currently the code did process stuff as it came in the file, and it happens that SwapTotal appears before SwapFree in /proc/meminfo so it actually did  "MemFree:" + "Buffers:" + "Cached:" - "SwapTotal:" + "SwapFree:", which can underflow if "MemFree:" + "Buffers:" + "Cached:" < "SwapTotal:"
c) Do not underflow at all, so if  "MemFree:" + "Buffers:" + "Cached:" +  "SwapFree:" < "SwapTotal:" we return 0 correctly not a zillion of free memory

Aurélien you might want to update gwenviews copy of this code (there's a few other bugfixes we did a while ago you didn't update either)

CCMAIL: agateau@kde.org

BUGS: 291129
2012-06-20 00:37:37 +02:00
Albert Astals Cid 791a4ac39e Fix spacing 2012-06-20 00:37:36 +02:00
Albert Astals Cid e7a4e3b392 Remove misleading comment 2012-06-20 00:37:36 +02:00
Fabio D'Urso 939891c9dd Renamed Document::SaveCapability members I added ten minutes ago
Forms -> SaveFormsCapability
Annotations -> SaveAnnotationsCapability
2012-06-14 00:31:17 +02:00
Fabio D'Urso 7c3c28fdf6 Fixed unclear text
Also turns a if-if sequence in a if-elseif to make more evident that
we never show both messages.
2012-06-13 23:45:56 +02:00
Fabio D'Urso 23eb083b00 Show a warning if annotations will not be saved to PDF.
The only affected generator is poppler (because it's the only one with
saving support).
Since version 0.20, Poppler can save annotations to PDF. If the user is
using an older version, this patch warns him that annotations are not
saved.
2012-06-13 22:59:55 +02:00
Mailson Menezes a405c079f4 Rendered image is at the same size of viewport
Previously we were rendering the current viewport but the image provided
by poppler was as big as the scaled page.
2012-06-09 14:39:06 -03:00
Albert Astals Cid 07495549bb Bump versions 2012-06-07 22:49:10 +02:00
Fabio D'Urso 5930478352 Keep original filename when creating a .okular archive from a .okular archive
This patch makes sure that the file saved in the .okular file keeps
the original filename (and, in particular, the extension) even if the
user is re-exporting a .okular archive as .okular archive. Before this
patch, the file boundled in the .okular archive would be named like the
.okular file it was exported from (eg foo.okular instead of foo.pdf).
Note: Okular had no problems in reopening it, but advanced users
unpacking the ZIP file obtained a .okular file which is actually a
native file, and not an okular archive.
2012-06-07 18:59:39 +02:00
Fabio D'Urso 9a11294b12 Sort bookmarks from the same page in viewport order 2012-06-05 00:49:16 +02:00
Fabio D'Urso 86c92ffec2 Fixes against causes of annotation data loss + Improved GUI message logic
1) If the user had previously annotated the document with an old okular
version and the document contains existing annotations and no /Encrypt
(ie the case where annotation changes are no longer saved locally), make
Document::saveDocumentInfo write the original unmodified local
annotations back to XML, so that it seems that the original file was not
changed. If the user makes annotation changes, code from previous
patches already asks him to save them to a different document on close.

2) Ask "Save changes?" if the user has modified annotations in a .okular
archive.
BUG: 300197

3) Turned a "sorry" message in a "information" (with dontshowthisagain),
because now we also have the "Save changes?" prompt to inform the user.

4) Suppressed all annotation-related message boxes on document opening
2012-06-05 00:49:01 +02:00
Fabio D'Urso d2fa4c9bf3 TextAnnotation stamp fix
- Make "Comment" the default stamp instead of "Note" (because we used to omit
   the "icon" in the exported DOM if it was "Comment")
 - Don't omit the icon name anymore
2012-06-05 00:48:50 +02:00
Mailson Menezes 83282971d8 Render current viewport only 2012-05-29 14:06:02 -03:00
Fabio D'Urso e3f1c388de Ask "Save annotation changes?" if there are unsaved annotations that cannot be saved locally
This patch turns Okular into a ReadWritePart. Annotation editing is always
disabled if we're loaded as ReadOnlyPart, no matter the document type.

REVIEW: 105020
2012-05-23 23:43:44 +02:00
Fabio D'Urso 04935266d2 Fix wrong text 2012-05-23 00:52:20 +02:00
Fabio D'Urso b3782d82a1 Fallback behavior for documents whose generator provides native annotation editing support without saveAs support
The only affected generator is poppler. Note that:
Document has /Encrypt <=iff=> SaveInterface supportsOption(SaveChanges) is false

This patch enforces the following behavior (and warns the user the first time
he edits an annotation).

- If the document has /Encrypt, warn that "Save as" is not available, but it's
possible to export as okular archive. New annotations will be automatically
saved to XML as usual.
Note that the previous patch already made all existing annotations uneditable,
because there's no way to save them.

- If the document has no /Encrypt and there are existing external annotations,
warn that changes won't be saved automatically. The user needs to "Save as" or
changes will be lost.

- If the document has no /Encrypt and there aren't existing external
annotations, don't show any warning. New annotations will be automatically saved
to XML as usual and to file if "Save as" is pressed.
2012-05-17 23:51:00 +02:00
Fabio D'Urso b33d71ef81 Enable edit/removal of external annotations if the generator supports it 2012-05-17 23:50:55 +02:00
Fabio D'Urso 157638f2f9 Added Annotation::BeingMoved flag to avoid refreshing pixmaps while moving annotations 2012-05-17 23:50:39 +02:00
Fabio D'Urso 6c296b916b Use UUIDs intead of a (broken) counter to generate annotations' unique names
The previous counter-based approach didn't take into account existing names used
by external annotations and names used in other pages.
Instead of creating a document-global table of used names, I used random UUIDs
as a source of unique names.
2012-05-17 23:50:20 +02:00
Fabio D'Urso 68127e00ea Do not store flag Annotation::ExternallyDrawn when exporting to DOM
It's an implementation detail
2012-05-17 23:50:17 +02:00
Fabio D'Urso 249bea5985 Re-add restored annotations via Document so that AnnotationProxy gets notified
Previously, restored annotations followed a shorter path that bypassed AnnotationProxy
2012-05-17 23:50:14 +02:00
Fabio D'Urso f6fa2a5614 Disable GUI operations on certain types of annotations
Modification and removal of *external* annotations are disabled by this
patch. Note that this change doesn't remove any functionality, because they
have never been implemented (AnnotationProxy is defined by the previous
patch).

The #if0'd blocks will be enabled by a future patch that provides fallback
behavior for generators that don't support saving changes.
2012-05-17 23:50:10 +02:00
Fabio D'Urso ec9f068d77 Added AnnotationProxy to SaveInterface
Based on Pino Toscano's earlier work
2012-05-17 23:49:58 +02:00
Fabio D'Urso 07c57bb2ab Dead code removed (PagePrivate::modifyAnnotation)
The first if ("modified already") is always taken
2012-05-17 23:49:54 +02:00
Albert Astals Cid df5b9cd4a2 Do not set mTextPageReady to true
mTextPageReady is only used for threaded generation and this is a sync one so resetting it to true make very bad things happen
An improvement of this area is needed since it makes no sense canGenerateTextPage returns mTextPageReady when generateTextPage doesn't use itB
BUGS: 297379
FIXED-IN: 4.8.3
(cherry picked from commit c29ce712cf)
2012-04-06 00:53:02 +02:00
Tobias Koenig 4639ded310 Implement autostart support for movie annotations
Evaluate MovieActions to implement autostart behavior for movie annotations.

REVIEW:104271
2012-04-03 14:18:10 +02:00
David Faure dc2f2d36aa Fix compilation with strict iterators 2012-03-27 13:25:12 +02:00
Mailson Menezes bd9087f20a Remember position on the page in bookmark
IOW accept more than one bookmark per page
BUGS: 157198
REVIEW: 104365
2012-03-26 20:01:01 +02:00
Albert Astals Cid 9d805df013 Double click selects words
BUGS: 187347
FIXED-IN: 4.9,0
2012-03-25 23:48:47 +02:00
Guillermo A. Amaral B 592c0c1611 Allow PDF Generator to handle embedded movies 2012-03-22 17:35:33 +00:00
Albert Astals Cid d3d8025ef1 Merge remote-tracking branch 'origin/KDE/4.8'
Conflicts:
	VERSION
	core/version.h
2012-03-09 00:29:48 +01:00
Albert Astals Cid bf47b97cc2 Do not return 0 in getFreeMemory for the first two seconds 2012-03-09 00:26:51 +01:00
Albert Astals Cid 4d8ba36488 Add greedy preloading option
Based on a patch by Sebastian Rose <s.rose@semkath.de>
REVIEW: 103129
BUGS: 184196
2012-03-09 00:12:20 +01:00
Albert Astals Cid 3e3a504d3c Allow the renaming of bookmark "parent" items (i.e. file names)
Patch heavily inspired on a patch by Constantin Serban-Radoi <costashsrc@gmail.com>
2012-03-08 23:26:44 +01:00
Albert Astals Cid bd6219327f Update version for 4.8.1 2012-02-29 23:00:19 +01:00
Albert Astals Cid d34bc7f263 Do not cache end() of a QList you are removing stuff from...
...makes it crash :D
BUGS: 294633
FIXED-IN: 4.8.1
2012-02-22 23:23:47 +01:00
Albert Astals Cid 04716f9fd1 Do not cache end() of a QList you are removing stuff from...
...makes it crash :D
BUGS: 294633
FIXED-IN: 4.8.1
2012-02-22 23:21:44 +01:00
Albert Astals Cid 80d7cf0b8a Merge branch 'textfind-enhancement'
Conflicts:
	core/textpage.cpp
2012-02-02 19:31:08 +01:00
Albert Astals Cid 12ab23e631 Add a note why we can't use rightRef 2012-02-02 19:27:57 +01:00
Albert Astals Cid d6c1ead1b0 More small adaptations 2012-02-02 19:24:11 +01:00
Albert Astals Cid e74894ce94 Put duplicate code in a function 2012-02-02 19:13:11 +01:00
Albert Astals Cid 7825e4c545 Fix stuff for a better merge 2012-02-02 19:07:13 +01:00
Mohammad Mahfuzur Rahman Mamun 92e3c16066 all len-1 are replaced with str.endsWith 2012-01-27 10:15:46 +06:00
Mohammad Mahfuzur Rahman Mamun 0c02a163ea Some minor changes and cleanup of Backward textfind 2012-01-23 15:08:07 +06:00
Albert Astals Cid cc3d80dc33 bump devel version to 0.14.80 2012-01-18 18:05:35 +01:00
Albert Astals Cid 81c5c540df Update versions for KDE 4.8
(cherry picked from commit 51a77e6a51)
2012-01-18 18:04:31 +01:00
Albert Astals Cid 51a77e6a51 Update versions for KDE 4.8 2012-01-18 18:03:37 +01:00
Mohammad Mahfuzur Rahman Mamun 9afba5c75d Some textfind change 2012-01-18 14:50:34 +06:00
Mohammad Mahfuzur Rahman Mamun 1dd139736f both forward and backward find implemented and tested a bit 2012-01-12 19:34:11 +06:00
Mohammad Mahfuzur Rahman Mamun f6a3ccf8b5 some printinfo and unnecessary comments has been removed 2012-01-12 13:51:47 +06:00
Mohammad Mahfuzur Rahman Mamun 7062308214 textfind with hyphenation working - simple test with pdf and djvu done 2012-01-12 12:57:48 +06:00
Albert Astals Cid 83a052b3ac Revert 604187b7a3 and 258cd6562a
I did not have time to finish the poppler work and even if this will probably be good for using the poppler work, this adds new API and I don't want to commit to this since having a proper look at making it work
Sorry i failed to fulfill my promise
2011-12-11 22:20:45 +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
Mohammad Mahfuzur Rahman Mamun aa5128630c Little Experiment for pdf 2011-11-09 19:44:05 +06: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
Albert Astals Cid 5ec4c069f0 Add @since markers 2011-11-02 23:05: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
Michel Ludwig 872c537f44 Merge branch 'master' into viewerinterface 2011-11-01 21:12:40 +00:00