Commit graph

1539 commits

Author SHA1 Message Date
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
Michel Ludwig a823df5c8f Some more changes according to the review. 2011-10-31 21:44:21 +00:00
Jiri Baum 412e3e739e table selection tool - semi-automatic dividers
BUGS: 283440
REVIEW: 102788
2011-10-31 16:33:03 +01:00
Albert Astals Cid 405bd75a1a add a property with the page number
deliverately not documented since we don't want others to use it
2011-10-26 00:10:42 +02:00
Albert Astals Cid 880dae2e19 Add a way to rename the current page bookmark from the menu
Comes with some api additions to bookmarkmanager
2011-10-25 22:21:22 +02:00
Michel Ludwig 2fd4100cbd Coding style fixes 2011-10-23 14:22:58 +01:00
Michel Ludwig 1adb8cc718 Merge branch 'master' into viewerinterface 2011-10-23 10:18:48 +01:00
Michel Ludwig e8e0237ca0 Add the possibility to show sources location graphically on the rendered pages.
Note that currently the rotation of pages is not taken into account as one still has
to find a unique way of handling this.
2011-10-17 20:56:45 +01:00
Albert Astals Cid d41f230123 Move correctTextOrder to TextPagePrivate 2011-10-17 19:09:26 +02:00
Michel Ludwig d29099b39c Only activate a subset of the available features when the part is launched in viewer mode.
In viewer mode the part will now use a different XML GUI file (part-viewermode.rc).
Also, some actions won't be created, e.g. those used for exporting stuff, for
launching presentation mode, or for selecting parts of the document. The captions
of the configuration dialogs also contain the word 'viewer' then.
2011-10-12 20:36:01 +01:00
Michel Ludwig 0e29008150 Initial commit of the 'ViewerInterface' and of a first implementation. 2011-09-10 18:15:52 +01:00
Albert Astals Cid 258cd6562a Core work for Reset Forms Action support
Heavily inspired in Guillermo Amaral patches
CCMAIL: gamaral@kde.org
2011-08-25 02:24:38 +02:00
Albert Astals Cid dfa5e96c46 this are pointers now 2011-08-24 12:42:50 +02:00
Mahfuzur Rahman Mamun 59dddc9d74 Fix for regions with one line 2011-08-24 12:35:47 +02:00
Albert Astals Cid bea2a493f7 There is no need to duplicate and delete here, just use m_words 2011-08-23 17:35:19 +02:00
Albert Astals Cid dec4733603 Rework the internals a bit
* Remove m_word_chars_map, m_XY_cut_tree, m_lines and m_line_rects: They are not really member
variables and where used only to pass info from one method to another, we use variables and parameters
for that now
 * Make output parameters be * instead of & following Qt guidelines
 * Fix all memory leaks, valgrind is happy now :-)
2011-08-23 17:15:12 +02:00
Albert Astals Cid 1a98e3f3f8 declare when used, makes code easier to read 2011-08-23 16:21:10 +02:00
Albert Astals Cid 9b7e249210 Faster way of adding the elements 2011-08-23 16:16:51 +02:00
Albert Astals Cid 2ff2cd9434 Rename copyFromList to setWordList
Also change the behaviour in that it adopts the pointers, saves a few news and deletes
2011-08-23 16:10:43 +02:00
Albert Astals Cid 33f9c203b1 Use a QVarLengthArray as suggested by Pino 2011-08-23 16:02:08 +02:00
Albert Astals Cid 2e1d140d69 define int for "iterators" in the for declaration 2011-08-23 15:58:46 +02:00
Albert Astals Cid cc8fd5280a More small fixes
Use [] + & instead of at() + replace
Fix memory leak
2011-08-23 15:55:53 +02:00
Albert Astals Cid 792eca9fb5 Use [] and & instead of at() + replace() 2011-08-23 15:47:56 +02:00
Albert Astals Cid 8286aac4db We never use m_spaces, so kill it 2011-08-23 15:39:06 +02:00
Albert Astals Cid 917482f0b7 Fix memory leak
Need to delete these two here too
2011-08-23 15:37:43 +02:00
Albert Astals Cid e842bcdfed No need to if the delete 2011-08-23 15:24:44 +02:00
Mahfuzur Rahman Mamun d7576a6a2b Fix crashes
1. I replaced the previous fixed memory array with dynamic memory allocation
(line 18-20).
2. Put some extra check so that we do not access under or over the boundary
of arrays (line 29-30,37-38)
3. Removed some unnecessary parts(line 46-48,56-58)
4. Instead of appending already existing element, I have created new
TinyTextEntity elements and removed them after usage(72-73,79)
5. Restored the deletion of words(78). Deletion of word will crash the
program, as all the TinyTextEntity in the nodes of the tree has reference to
words. This memory will be deallocated at line 105.
6. Another change like 4 is done in line 96-97.
2011-08-23 15:22:47 +02:00
Albert Astals Cid 75cac8a3c6 I am pretty sure we need to delete this 2011-08-22 20:40:52 +02:00
Albert Astals Cid 0e1efa6516 rework the API a bit so we can assign it to const variables 2011-08-22 20:36:49 +02:00
Albert Astals Cid d0d2b45a11 Fix TextPagePrivate::removeSpace iteration
You need to use the iterator returned by erase
2011-08-22 20:29:36 +02:00
Albert Astals Cid ccc317bc5c remove toAscii().data() since that is already a QString 2011-08-22 20:20:16 +02:00
Albert Astals Cid 2bec8e3aaa add some const, will make the code easier to read later on 2011-08-22 20:19:23 +02:00
Albert Astals Cid 7dbc4f48e1 Do not use this-> 2011-08-22 19:24:42 +02:00
Albert Astals Cid d6b5a70951 Mark file local functions static 2011-08-22 19:20:50 +02:00
Albert Astals Cid 0e825cc599 fix potential memory leak 2011-08-22 19:17:47 +02:00
Albert Astals Cid be8f9bd9cb Rename copy* functions to something I like more 2011-08-22 19:12:21 +02:00
Albert Astals Cid c78a7069b1 fix bad merge 2011-08-22 19:08:04 +02:00
Albert Astals Cid a9fd44009e Add some const & 2011-08-22 19:06:29 +02:00
Albert Astals Cid 3f69b491cd Merge branch 'selection_and_highlighting' 2011-08-22 18:50:49 +02:00
Mohammad Mahfuzur Rahman Mamun c55ee4b70d A last moment refactoring of the code ... some const & changes 2011-08-22 22:36:47 +06:00
Mohammad Mahfuzur Rahman Mamun dca4ee559c Another Code Refactoring done 2011-08-21 10:44:42 +06:00
Mohammad Mahfuzur Rahman Mamun 88ec0951fe Some code restructure changes in textpage.cpp 2011-08-19 07:01:11 +06:00
Mohammad Mahfuzur Rahman Mamun 73d4a31350 code recommenting done in textpage.cpp 2011-08-18 07:03:46 +06:00
Mohammad Mahfuzur Rahman Mamun 5a8b984f14 debugging and printing removed from textpage.cpp ... need code recomment now 2011-08-17 15:32:40 +06:00
Mohammad Mahfuzur Rahman Mamun 1b8e1fc436 all files other than textpage.cpp has been changed necessarily 2011-08-17 10:59:10 +06:00
Mohammad Mahfuzur Rahman Mamun 3214307ed9 unnecessary changes removed from area.h and cpp textpage.h textpage_p.h 2011-08-17 10:45:46 +06:00
Mohammad Mahfuzur Rahman Mamun 10b11903c2 Removal of black selection for epub or odt is working with some problem 2011-08-13 16:06:18 +06:00
Mohammad Mahfuzur Rahman Mamun 929e4b6a0e Removed some double selection Problem 2011-08-12 08:25:21 +06:00
Albert Astals Cid d3ebf089c4 Do not rely on extension but on output format for conversion
BUGS: 277801
2011-08-11 16:17:24 +01:00
Mohammad Mahfuzur Rahman Mamun b50b622a25 A Little change in the makeandsort lines 2011-08-04 14:35:09 +06:00
Mohammad Mahfuzur Rahman Mamun 1ef68e3301 text selection for both selection type 01 and 02 seems to be working correctly 2011-08-04 10:34:11 +06:00
Mohammad Mahfuzur Rahman Mamun 9a07e04fe3 another try for second type selection 2011-08-03 15:28:33 +06:00
Mohammad Mahfuzur Rahman Mamun ff289f819c selection 02 implemented but not working perfectly 2011-08-01 19:26:36 +06:00
Montel Laurent f9f65979f5 Normalize signals/slots 2011-07-31 21:22:04 +02:00
Mohammad Mahfuzur Rahman Mamun 9168932079 trying to solve the second kind of selecction 2011-07-29 18:18:41 +06:00
Mohammad Mahfuzur Rahman Mamun b599f02205 second type selection crashing 2011-07-28 18:53:40 +06:00
Kevin Kofler e001fbab55 Fix landscape documents getting printed in portrait format if "Landscape" is selected in the print dialog (the default).
Partly based on a patch by Falk from KDE bug #181290.

BUG: 181290
REVIEW: 101513
2011-07-28 01:41:48 +02:00
Mohammad Mahfuzur Rahman Mamun a2be8384c5 A little change for crash if there is no textPage but, yet correctTextOrder() is called 2011-07-22 15:07:13 +06:00
Mohammad Mahfuzur Rahman Mamun 4c4f6c1c7c text selection code moved to Page::setTextPage from Document::requestTextPage 2011-07-20 22:15:41 +06:00
Mohammad Mahfuzur Rahman Mamun c598b7749d removal of some crashes 2011-07-20 13:04:59 +06:00
Mohammad Mahfuzur Rahman Mamun fe20bcf157 an small but important change in XYCut and possible memory leak protection for m_spaces 2011-07-20 09:05:17 +06:00
Pino Toscano 13652b84af bump devel version to 0.13.80 2011-07-19 23:49:36 +02:00
Mohammad Mahfuzur Rahman Mamun 6623014fc5 some change in makeWord 2011-07-16 03:13:05 +06:00
Mohammad Mahfuzur Rahman Mamun b69d9e0262 implementation of parameter tuning of XYcut using local information 2011-07-15 17:29:59 +06:00
Mohammad Mahfuzur Rahman Mamun 2809c3c747 makeAndSortLines changed to remove some similar code redundancy 2011-07-14 19:23:39 +06:00
Mohammad Mahfuzur Rahman Mamun 9343babe43 some issues regarding selection (TextPage::textArea) solved 2011-07-14 17:35:02 +06:00
Mohammad Mahfuzur Rahman Mamun e406207444 character selection added in rearranged code 2011-07-13 23:40:36 +06:00
Mohammad Mahfuzur Rahman Mamun 8a3d4b2db5 some rearrangement and redesign of the code 2011-07-13 19:27:04 +06:00
Mohammad Mahfuzur Rahman Mamun 33d0facf4e selection of text by character done ... need some testing and debug 2011-07-13 17:16:03 +06:00
Mohammad Mahfuzur Rahman Mamun 3d0564fa40 changed the added space scheme ... looking nice now :) 2011-07-13 09:11:18 +06:00
Mohammad Mahfuzur Rahman Mamun 1bbb192fce added spaces between words ... looking very bad though ... will be solved later 2011-07-12 20:24:17 +06:00
Mohammad Mahfuzur Rahman Mamun b288243324 This version is not crashing in my pc ... just checked with first 5 pages of http://www.icir.org/floyd/papers/early.twocolumn.pdf 2011-07-11 18:21:27 +06:00
Mohammad Mahfuzur Rahman Mamun 588b054365 Our own selection based on XY Cut seems to work except for mathematical forumlas 2011-07-11 11:37:34 +06:00
Mohammad Mahfuzur Rahman Mamun 8eda44b435 crash in makeword removed 2011-07-10 20:54:38 +06:00
Mohammad Mahfuzur Rahman Mamun ccc9a62b0d XY Cut implementation primary version done ... (need to test and debug) 2011-07-10 12:00:57 +06:00
Mohammad Mahfuzur Rahman Mamun e2b0e0816c calculation of horizontal and vertical projection profile done 2011-07-09 00:12:39 +06:00
Mohammad Mahfuzur Rahman Mamun 4d33b929ec some addition for line rectangle and some bug fixing 2011-07-03 14:56:27 +06:00
Mohammad Mahfuzur Rahman Mamun f14a8502dd remove some problems from makeWord function in textPage 2011-07-02 21:24:50 +06:00
Mohammad Mahfuzur Rahman Mamun e07fca1d47 creating words from single chracters before layout analysis 2011-07-02 01:40:37 +06:00
Mohammad Mahfuzur Rahman Mamun bbd28aa8bf calculation of column space rectangle and a try to separate columns from a two column document on that basis 2011-07-01 16:41:55 +06:00
Mohammad Mahfuzur Rahman Mamun 4c5d844e28 Find word spacing and column spacing 2011-06-30 20:03:00 +06:00
Mohammad Mahfuzur Rahman Mamun 27d0f2f8c6 create and sort lines by y overlap first and then according to x ordering 2011-06-29 18:17:15 +06:00
Mohammad Mahfuzur Rahman Mamun 2eb5f270fd three functions added in textpage 2011-06-27 19:58:24 +06:00
Mohammad Mahfuzur Rahman Mamun 30e57988fc unnecessary comments removed and a small change 2011-06-27 14:26:37 +06:00
Mohammad Mahfuzur Rahman Mamun 57db9f4c19 textSelection according to the TextList seems to work fine -- tested with some pdfs 2011-06-25 11:11:33 +06:00
Mohammad Mahfuzur Rahman Mamun 3798bd7398 primary text selection for more than one columns -- have problem if start or end is in empty space 2011-06-25 00:43:10 +06:00
Myreal Name 2149fb46ef Another message 2011-06-24 22:53:44 +06:00
Pino Toscano c05523da2b fix #include paths in core headers to other core headers to be relative
... and with double quotes brackets, so they can properly include each other without relying on the compiler include path
2011-06-01 10:51:31 +02:00
Script Kiddy b815d7356d SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdegraphics/okular/; revision=1231185
2011-05-10 10:01:23 +00:00
Albert Astals Cid 439e7b9799 remove unused variables
svn path=/trunk/KDE/kdegraphics/okular/; revision=1230896
2011-05-08 15:33:17 +00:00
Script Kiddy 64b8965b35 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdegraphics/okular/; revision=1230852
2011-05-08 07:37:44 +00:00
David Palacio db7d8ff608 Test if the file is readable if it is a regular file.
*REVIEW: 6667

svn path=/trunk/KDE/kdegraphics/okular/; revision=1230523
2011-05-05 20:51:05 +00:00
Albert Astals Cid 38462d062a "Normalize" strings so searching for ligatures like "fi" works
Patch by Christopher Reichert
BUGS: 181828

svn path=/trunk/KDE/kdegraphics/okular/; revision=1225994
2011-03-25 20:07:45 +00:00
Albert Astals Cid 50e3519ffc Fix off by one error on setting the search boundary limits
Fix researched by Christopher Reichert
Will backport to 4.6 if works fine in trunk for a while
BUGS: 266535

svn path=/trunk/KDE/kdegraphics/okular/; revision=1224201
2011-03-08 23:47:08 +00:00
Pino Toscano 96ae09cfde ignore setViewport() for page numbers out of the document
CCBUG: 266133

svn path=/trunk/KDE/kdegraphics/okular/; revision=1220028
2011-02-12 14:49:32 +00:00
Pino Toscano 40d20ca58d in each page, add a pointer to the owner document
svn path=/trunk/KDE/kdegraphics/okular/; revision=1217914
2011-01-29 15:38:18 +00:00
Albert Astals Cid 6f3667b9d7 forwardport r1216334 okular/branches/KDE/4.6/kdegraphics/okular/core/document.cpp:
use prettyUrl to get a prettier url

svn path=/trunk/KDE/kdegraphics/okular/; revision=1216336
2011-01-22 18:46:56 +00:00
Script Kiddy 6754fbd1c4 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdegraphics/okular/; revision=1213671
2011-01-11 09:12:11 +00:00
Pino Toscano f1fee7ebf8 bump devel version to 0.12.80
svn path=/trunk/KDE/kdegraphics/okular/; revision=1212172
2011-01-05 23:50:16 +00:00
Albert Astals Cid 870fd3ba12 Fix point #1 of 213258, open the dialog editor just after adding a note, because adding a note without text is probably not what you want to do.
Will be in KDE *4.7*
Patch by Victor Blazquez <victor.blazquez@gmail.com>
BUGS: 213258

svn path=/trunk/KDE/kdegraphics/okular/; revision=1209674
2010-12-27 22:16:11 +00:00
Albert Astals Cid fab89241b2 Implement memory functions for freebsd
Patch by Alberto Villa
BUGS: 218418

svn path=/trunk/KDE/kdegraphics/okular/; revision=1207422
2010-12-18 01:07:33 +00:00
Laurent Montel a86bbe9053 Use QLatin1String
svn path=/trunk/KDE/kdegraphics/okular/; revision=1178207
2010-09-22 11:52:46 +00:00