I'm going to need to break binary compatibility to add a new feature
so may as well cleanup all the TODOs regarding that
Changes:
* Moving a few destructors to the header
* Removing a few unnecessary & in params
* Adding a few necessary & in params
* Making print return an enum instead of a bool and then having another
function that returns the enum
* Make Generator::requestFontData be a virtual
* Remove unused enum
* Remove a few filePrinter unneeded functions
* Remove unused TextDocumentGenerator::addMetaData signal
find . \( -name "*.cpp" -or -name "*.h" -or -name "*.c" -or -name "*.cc" \) -exec clang-format -i {} \;
If you reached this file doing a git blame, please see README.clang-format (added 2 commits in the future of this one)
Summary:
Only supported by the pdf backend if using poppler >= 0.63
Sadly had to change the generator API
Text cancellation is a bit wobbly still since poppler has large parts
of the code where doesn't check for the cancellation flag, but that
is something that will get automagically fixed for us if the poppler
side is improved
Test Plan: Needs https://bugs.freedesktop.org/show_bug.cgi?id=104263
Reviewers: ervin, rkflx
Reviewed By: ervin, rkflx
Subscribers: #okular
Tags: #okular
Differential Revision: https://phabricator.kde.org/D9328
This seems to be required with KPluginFactory and Qt5 since without it
KPluginFactory::create<Okular::Generator>() always returns null.
For some reason this requires a complete rebuild before generatorstest
passes.
REVIEW: 123466
This is one of the few KDVI features that was still missing from DVI
generator.
The most important informations from the now-removed fontPool::status()
method are shown.
svn path=/trunk/KDE/kdegraphics/okular/; revision=1052192
Protected the potentially concurred methods using the user mutex.
Removed the manual 'ready' flag and the calculation of the bounding box, as both are done in the core.
This should avoid the block when rendering pages and extracting text from them, and reduce the "slow" feeling esp when invoking external Ghostscript.
BUG: 192284
CCBUG: 162643
svn path=/trunk/KDE/kdegraphics/okular/; revision=966599
CCMAIL: luigi.toscano@tiscali.it
He says:
"Thanks for the infrastructure work to John Layt and apologies for my (non-existent) reply to your mail..."
CCMAIL: john@layt.net
svn path=/trunk/KDE/kdegraphics/okular/; revision=754729
- simplify the handling of the pages wrt rotation
- make internal anchors hyperlinks work again
Thanks!
CCMAIL: luigi.toscano@tiscali.it
svn path=/trunk/KDE/kdegraphics/okular/; revision=753485
This requires a generator to have a
MyGenerator(QObject *parent, const QVariantList &args)
constructor in order to be successfully loaded.
The OKULAR_EXPORT_PLUGIN macro was adapted, and the generators to provide it the about data; the protected Generator::setAboutData() is no more needed.
Remove the 'lib' prefix from plugins, unneeded now.
CCMAIL: okular-devel@kde.org
svn path=/trunk/KDE/kdegraphics/okular/; revision=744169
Added a non-virtual closeDocument() in the base Generator class: this way, particular closing routines can be implemented in the "low level" of a generator.
Apart the renaming, the logic of doCloseDocument() remains the same.
CCMAIL: okular-devel@kde.org
svn path=/trunk/KDE/kdegraphics/okular/; revision=723046
* add full API docs
* renamed getMetaData -> metaData
* removed supportsRotation in Document and Generator
* moved Permission and SearchDirection enums into separated header core/global.h
svn path=/trunk/playground/graphics/okular/; revision=619183
Add a protected method to get the document, and hide the real document pointer as private, so the generators can't redefine it.
svn path=/trunk/playground/graphics/okular/; revision=598025
* Moved all implementations to generator.cpp
* Added 'const' where it make sense
* Adapted all generators (except gs)
svn path=/trunk/playground/graphics/okular/; revision=597525
Instead of telling the generators to do the work themselves (that was usually destraoying the ld pages and creating the new ones), now we just rotate the page objects deleting only their "mutable" contents.
This way, generators can just return true in their supportRotation() to make okular rotate the pages for them for free. Of course they still have to generate the page pixmaps according to the given page rotation.
Now, there's a new rotationChanged() function in the Generator API so generator that needs it can be norified about the document rotation changing.
CCMAIL: developers@okular.org
svn path=/trunk/playground/graphics/okular/; revision=593632
Now every generator has to implement this one and put (if necessary) all the code for cleaning up all the stuff related to the currently open document.
For now the return value it is not read, but generators as strongly suggested to return tru o false, whether all the operations in there went fine.
svn path=/trunk/playground/graphics/okular/; revision=562210
Adapted from the DVI plugin of KViewShell.
It can:
- load documents
- generate correctly the pixmaps for the images
- rotate the pages
- extract the text from the pages (thus search and text selection are possible)
- extract the URL hyperlinks from the documents
Credits for this work goes to Luigi Toscano, thanks Luigi!
CCMAIL: Luigi Toscano <luigi.toscano@tiscali.it>
svn path=/trunk/playground/graphics/okular/; revision=555582