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
Albert Astals Cid
6ad8e94d53
make the forward and backward search code more similar
...
svn path=/trunk/KDE/kdegraphics/okular/; revision=1170644
2010-09-01 18:53:49 +00:00
Albert Astals Cid
649722af24
add some const makes the code a bit easier to understand
...
svn path=/trunk/KDE/kdegraphics/okular/; revision=1170640
2010-09-01 18:46:18 +00:00
Albert Astals Cid
3aa8f6aaa4
fix docu
...
svn path=/trunk/KDE/kdegraphics/okular/; revision=1162332
2010-08-11 21:01:33 +00:00
Pino Toscano
ba0dd22f71
when archiving, resolve the symlink if the document path is that
...
CCBUG: 245243
svn path=/trunk/KDE/kdegraphics/okular/; revision=1161859
2010-08-10 23:49:30 +00:00
Pino Toscano
e44da2085d
bump development version to 0.11.80
...
svn path=/trunk/KDE/kdegraphics/okular/; revision=1156081
2010-07-28 14:47:12 +00:00
Albert Astals Cid
4e551e6867
Improve error message
...
svn path=/trunk/KDE/kdegraphics/okular/; revision=1148688
2010-07-11 15:32:43 +00:00
John Layt
80a04bd577
Whoops! Didn't relise we had an API/BIC guarantee on Okular. Restore previous
...
API and make it call the new API.
CCMAIL: kde-bindings@kde.org
CCMAIL: aacid@kde.org
CCBUG: 194586
svn path=/trunk/KDE/kdegraphics/okular/; revision=1134631
2010-06-04 19:04:05 +00:00
John Layt
b30305b668
Enable Current Page option in Okular print dialog if running Qt >= 4.7
...
Changed exported api so cc: to bindings.
CCMAIL: kde-bindings@kde.org
CCBUG: 194586
svn path=/trunk/KDE/kdegraphics/okular/; revision=1134379
2010-06-04 08:25:25 +00:00
Pino Toscano
561b688bc9
percent-decode lilypond references
...
BUG: 236967
svn path=/trunk/KDE/kdegraphics/okular/; revision=1129748
2010-05-23 16:08:59 +00:00
Pino Toscano
45e62fa320
make sure actionsForUrl() returns actions sorted by page number
...
CCBUG: 205952
svn path=/trunk/KDE/kdegraphics/okular/; revision=1129512
2010-05-22 17:44:26 +00:00
Luigi Toscano
2bacaf9e14
New method to get the proper PrintError from the printFile* return value
...
svn path=/trunk/KDE/kdegraphics/okular/; revision=1115578
2010-04-16 21:56:16 +00:00
Albert Astals Cid
25f95bbc9f
duplicate code is evil
...
svn path=/trunk/KDE/kdegraphics/okular/; revision=1115314
2010-04-15 22:26:58 +00:00
Albert Astals Cid
3583f6010a
move from virtual to slot to not kick ABI in the nuts
...
svn path=/trunk/KDE/kdegraphics/okular/; revision=1114947
2010-04-14 23:33:14 +00:00
Albert Astals Cid
0f0cacd63a
add a way to generators give a bit more info of why printing failed
...
and implement it in the pdf generator, others welcome to implement the function
for other generators
svn path=/trunk/KDE/kdegraphics/okular/; revision=1114944
2010-04-14 23:07:27 +00:00
Albert Astals Cid
ce41955ab8
avoid copying a file if we can just rename it
...
svn path=/trunk/KDE/kdegraphics/okular/; revision=1114913
2010-04-14 21:38:40 +00:00
Tobias Koenig
d5a2d53d21
Do not crash in case of false calculations in a generator
...
BUG: 233944
svn path=/trunk/KDE/kdegraphics/okular/; revision=1113765
2010-04-11 17:54:54 +00:00
Glen Kaukola
122fab0eee
Krazy: Check single-char QString operations for efficiency.
...
svn path=/trunk/KDE/kdegraphics/okular/; revision=1110335
2010-04-02 19:07:36 +00:00
Glen Kaukola
45c82f8636
Krazy: Check for spelling errors
...
svn path=/trunk/KDE/kdegraphics/okular/; revision=1110329
2010-04-02 18:49:13 +00:00
Script Kiddy
ff913d232f
SVN_SILENT made messages (.desktop file)
...
svn path=/trunk/KDE/kdegraphics/okular/; revision=1108213
2010-03-28 07:14:45 +00:00