Commit graph

63 commits

Author SHA1 Message Date
Albert Astals Cid f467807506 Remove #ifdefs for Qt we require in cmake anyway 2017-01-16 00:36:08 +01:00
Montel Laurent 466eb79615 Use QStringLiteral 2015-10-29 13:37:11 +01:00
Frederik Gladhorn dad6936896 Bring back the txt generator 2014-09-17 23:52:52 +02:00
Frederik Gladhorn 6c602bf0e7 Use categorized logging even more 2014-09-16 23:38:25 +02:00
Frederik Gladhorn e28dbc6c00 Port to QMime
compressedMimeFor now already does the inheritance check, so another
check was removed.
2014-09-11 16:32:43 +02:00
Frederik Gladhorn 83d3f1f6b7 Revert "Some more kDebug->qDebug"
Seems like kDebug doesn't spam the user, so this needs to use qCDebug.

This reverts commit 34fbdf8c85.
2014-09-11 02:03:46 +02:00
Frederik Gladhorn 34fbdf8c85 Some more kDebug->qDebug 2014-09-09 18:17:36 +02:00
Frederik Gladhorn b79e706e56 Merge remote-tracking branch 'origin/master' into frameworks
Conflicts:
	generators/dvi/generator_dvi.cpp
	generators/ooo/generator_ooo.cpp
	part.cpp
	shell/main.cpp
	shell/shell.cpp
	shell/shell.h
	shell/shellutils.h
	tests/CMakeLists.txt
	ui/propertiesdialog.cpp
2014-08-14 13:35:43 +02:00
Vishesh Handa fb330dd45c Port the EPubGenerator 2014-08-13 11:42:09 +02:00
Albert Astals Cid e9e3d4a435 Make documentInfo be Hash based instead of XML based 2014-08-10 22:38:13 +02:00
Frederik Gladhorn 0c7a45c7a5 Disable lots of stuff and compile
The text generator is the only one compiled now.
This version links for me but then doesn't find its KPart on startup.

TTS has been completely disabled as well as some other things like the
about dialog.
2014-08-10 14:42:54 +02:00
Frederik Gladhorn 0ba233788c Use moc include style dictated by automoc
While it's generally not a great idea to include moc files at least this
compiles.
2014-08-09 00:21:03 +02:00
Frederik Gladhorn 75031eee7e Fix includes 2014-08-08 01:59:55 +02:00
Albert Astals Cid 86dd9e8801 Move the ooo wallet code to use the part.cpp one
Less widgets in generators/core \o/
2014-05-10 15:54:03 +02:00
Christoph Feck 60cc5dc98e TextDocumentGenerator: Use black as default text color
REVIEW: 111681
BUGS: 253583
BUGS: 322547
FIXED-IN: 4.12.90
2014-03-12 23:01:42 +01:00
Jaydeep Solanki e9ccc4867b epub video support 2013-10-24 00:20:04 +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
Azat Khuzhin 1fdb0a0a06 Font selector for TextDocumentGenerator
REVIEW: 109021
2013-05-18 16:03:33 +02:00
Montel Laurent f9f65979f5 Normalize signals/slots 2011-07-31 21:22:04 +02: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
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
Tobias Koenig 911f8eaeca tab -> whitespace fixes
svn path=/trunk/KDE/kdegraphics/okular/; revision=971089
2009-05-21 16:46:05 +00:00
Pino Toscano 0761b20be2 turn the internal class Utils (with just static members) into a TextDocumentUtils namespace
svn path=/trunk/KDE/kdegraphics/okular/; revision=908736
2009-01-10 11:29:11 +00:00
Brad Hards 3cb0e7575f Improve handling of document synopsis with
strange entry ordering.

CCBUG:168678

svn path=/trunk/KDE/kdegraphics/okular/; revision=890398
2008-11-29 07:45:25 +00:00
Brad Hards bfa53df1ec Don't crash when setting up the document synopsis for
ODTs with strange heading ordering.

This may still cause the synopsis to look different
to the way the user expected. Will take another
look at that.

BUG: 168678

svn path=/trunk/KDE/kdegraphics/okular/; revision=890395
2008-11-29 05:34:33 +00:00
Pino Toscano 355eef2da6 correct place the bracket out of the #ifdef
svn path=/trunk/KDE/kdegraphics/okular/; revision=855781
2008-09-01 12:51:30 +00:00
Brad Hards cfb62ab4d5 Add support for export to OpenDocument text and HTML
for TextDocumentGenerator-based generators:
 - EPub format
 - Fictionbook format
 - OOO.

This depends on Qt 4.5. Thanks to Qt Software (or wherever Thomas Z.
works) for QTextDocumentWriter!

It wouldn't be too hard to make this work for plucker (.pdb)
format, but that format doesn't work for me. It would be very
hard to make it work for other formats.


svn path=/trunk/KDE/kdegraphics/okular/; revision=855771
2008-09-01 12:00:50 +00:00
Pino Toscano 84a23006d5 ask the q-ptr only when compling the threaded rendering
svn path=/trunk/KDE/kdegraphics/okular/; revision=847495
2008-08-15 13:24:02 +00:00
Pino Toscano 6cf2d5786e limit the scope of the text cursor, so it's deleted before the mutex unlock
svn path=/trunk/KDE/kdegraphics/okular/; revision=805246
2008-05-07 23:04:01 +00:00
Pino Toscano 697d51e1a2 Make the rendering for TextDocument-based generators threaded, only if Qt (via QFontDatabase) tells us we can.
... but, as it's proving to be buggy (text disappearing from menus) and crashing (out-of-range font engine list), it's disabled for now, define OKULAR_TEXTDOCUMENT_THREADED_RENDERING to try it.

svn path=/trunk/KDE/kdegraphics/okular/; revision=804719
2008-05-06 20:20:10 +00:00
Pino Toscano 18c8cf59e8 - when the loading of a textdocument-based document fails, cleanup all the stuff eventually gathered from the converter
- cleanup also the annotation position when closing a textdocument

svn path=/trunk/KDE/kdegraphics/okular/; revision=799076
2008-04-20 09:49:20 +00:00
Pino Toscano 890367943b clear TOC and document info when closing a textdocument-based document
svn path=/trunk/KDE/kdegraphics/okular/; revision=798886
2008-04-19 20:06:31 +00:00
Pino Toscano c44ce52719 add a private reimplementation of metaData() so the text document generator can show the title of a document
svn path=/trunk/KDE/kdegraphics/okular/; revision=785821
2008-03-15 02:15:16 +00:00
Pino Toscano 7266660c37 Add a protected TextDocumentGenerator* generator() to the TextDocumentConverter to make it able to use stuff of the Document (eg a parent for dialogs).
svn path=/trunk/KDE/kdegraphics/okular/; revision=775125
2008-02-14 23:19:24 +00:00
Pino Toscano 40803bf9b0 and actually connect to the new signal
svn path=/trunk/KDE/kdegraphics/okular/; revision=772364
2008-02-08 14:47:41 +00:00
Pino Toscano c6b7cfab8c Add a addMetaData(DocumentInfo::Key, QString) signal to the TextDocumentConverter.
This way, standard info keys can be used without adding manually the key id and the translated label.

svn path=/trunk/KDE/kdegraphics/okular/; revision=772350
2008-02-08 14:13:55 +00:00
Pino Toscano b9af4a6a94 check for valid pages
svn path=/trunk/KDE/kdegraphics/okular/; revision=747055
2007-12-10 22:39:48 +00:00
Pino Toscano 5fc6503d89 For now, do not consider links whose page cannot be calculated.
BUG: 153733

svn path=/trunk/KDE/kdegraphics/okular/; revision=747032
2007-12-10 21:03:32 +00:00
Pino Toscano a194acf2bc Foo/FooPrivate for TextDocumentConverter
svn path=/trunk/KDE/kdegraphics/okular/; revision=746277
2007-12-08 14:45:32 +00:00
Pino Toscano 870980da75 correctly set the External flag for annotations loaded from documents
svn path=/trunk/KDE/kdegraphics/okular/; revision=746264
2007-12-08 13:45:06 +00:00
Pino Toscano 6aa123656a Port the plugin system to the standard KDE factory and loader, getting rid of the custom system okular had so far.
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
2007-12-02 20:57:24 +00:00
Tobias Koenig 3ce7e38f06 Now that we use QPrinter, call QTextDocument::print() directly...
Enable printing for this generator.

svn path=/trunk/KDE/kdegraphics/okular/; revision=742243
2007-11-27 16:29:50 +00:00
John Layt 070285e039 Port from KPrinter to QPrinter, remove dependency on KDE4_KDEPRINT_LIBS.
*** Note this is not a complete port, most of the generators use the 
printFiles method which Qt 4.3 does not support, these have simply
been commented out until we find a solution.  At least it removes
the dependency so we can remove from kdelibs.

svn path=/trunk/KDE/kdegraphics/okular/; revision=725660
2007-10-15 23:01:27 +00:00
Pino Toscano 15155d8824 Rename the virtual closeDocument() to doCloseDocument(), and make it protected.
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
2007-10-08 16:46:51 +00:00
Pino Toscano 006111382b common d_ptr+q_ptr structure for Generator/TextDocumentGenerator, and their private classes
svn path=/trunk/KDE/kdegraphics/okular/; revision=712465
2007-09-14 13:31:55 +00:00
Pino Toscano de45467966 properly free the resources of a document when calling closeDocument(), not in the destructor of the generator or in loadDocument()
svn path=/trunk/KDE/kdegraphics/okular/; revision=667128
2007-05-21 22:26:37 +00:00
Tobias Koenig bbbbd8eda9 Fixed the 'select one line twice' bug.
It's always helpfull to talk to a koffice developer, thanks to Thomas :)

svn path=/trunk/KDE/kdegraphics/okular/; revision=663744
2007-05-12 08:17:02 +00:00
Pino Toscano 06411f9805 Add links and annotations when loading the pages, not during the pixmap generations.
Tobias: is the calculation of the annotations bounding rect correct?
CCMAIL: tokoe@kde.org

svn path=/trunk/KDE/kdegraphics/okular/; revision=660831
2007-05-03 21:45:14 +00:00
Pino Toscano 2e024d6d96 generalize a bit more the way for constructing "standard" ExportFormat's
svn path=/trunk/KDE/kdegraphics/okular/; revision=656426
2007-04-21 11:09:41 +00:00