Commit fc13e5c1 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Reactivate djvu generator

parent 47a278b5
......@@ -96,9 +96,9 @@ if(CHM_FOUND)
add_subdirectory( chm )
endif(CHM_FOUND)
#if(DJVULIBRE_FOUND)
# add_subdirectory(djvu)
#endif(DJVULIBRE_FOUND)
if(DJVULIBRE_FOUND)
add_subdirectory(djvu)
endif(DJVULIBRE_FOUND)
add_subdirectory(dvi)
......
......@@ -29,6 +29,7 @@
#include <QtCore/QDebug>
#include <klocale.h>
#include <qtemporaryfile.h>
#include <QDir>
static void recurseCreateTOC( QDomDocument &maindoc, const QDomNode &parent, QDomNode &parentDestination, KDjVu *djvu )
{
......@@ -73,10 +74,9 @@ static KAboutData createAboutData()
i18n( "DjVu Backend" ),
"0.2.3",
i18n( "DjVu backend based on DjVuLibre." ),
KAboutLicense::GPL
i18n( "© 2006-2008 Pino Toscano" )
);
aboutData.addAuthor( ki18n( "Pino Toscano" ), KLocalizedString(), "pino@kde.org" );
KAboutLicense::GPL,
i18n( "© 2006-2008 Pino Toscano" ));
aboutData.addAuthor( i18n( "Pino Toscano" ), QString(), QLatin1String("pino@kde.org") );
return aboutData;
}
......@@ -333,7 +333,7 @@ Okular::ObjectRect* DjVuGenerator::convertKDjVuLink( int page, KDjVu::Link * lin
{
KDjVu::UrlLink* l = static_cast<KDjVu::UrlLink*>( link );
QString url = l->url();
newlink = new Okular::BrowseAction( url );
newlink = new Okular::BrowseAction( QUrl(url) );
break;
}
}
......
......@@ -25,6 +25,7 @@
#include <libdjvu/miniexp.h>
#include <stdio.h>
#include <KDebug>
QDebug &operator<<( QDebug & s, const ddjvu_rect_t &r )
{
......@@ -275,7 +276,7 @@ void KDjVu::Annotation::setComment( const QString &comment )
miniexp_t exp = m_anno;
exp = miniexp_cdr( exp );
exp = miniexp_cdr( exp );
miniexp_rplaca( exp, miniexp_string( comment.toUtf8() ) );
miniexp_rplaca( exp, miniexp_string( comment.toUtf8().constData() ) );
}
QColor KDjVu::Annotation::color() const
......@@ -330,7 +331,7 @@ QColor KDjVu::TextAnnotation::color() const
void KDjVu::TextAnnotation::setColor( const QColor &color )
{
const QByteArray col = color.name().toLatin1();
find_replace_or_add_second_in_pair( m_anno, "backclr", miniexp_symbol( col ) );
find_replace_or_add_second_in_pair( m_anno, "backclr", miniexp_symbol( col.constData() ) );
}
bool KDjVu::TextAnnotation::inlineText() const
......@@ -375,7 +376,7 @@ QColor KDjVu::LineAnnotation::color() const
void KDjVu::LineAnnotation::setColor( const QColor &color )
{
const QByteArray col = color.name().toLatin1();
find_replace_or_add_second_in_pair( m_anno, "lineclr", miniexp_symbol( col ) );
find_replace_or_add_second_in_pair( m_anno, "lineclr", miniexp_symbol( col.constData() ) );
}
QPoint KDjVu::LineAnnotation::point2() const
......@@ -667,7 +668,7 @@ bool KDjVu::openFile( const QString & fileName )
closeFile();
// load the document...
d->m_djvu_document = ddjvu_document_create_by_filename( d->m_djvu_cxt, QFile::encodeName( fileName ), true );
d->m_djvu_document = ddjvu_document_create_by_filename( d->m_djvu_cxt, QFile::encodeName( fileName ).constData(), true );
if ( !d->m_djvu_document ) return false;
// ...and wait for its loading
wait_for_ddjvu_message( d->m_djvu_cxt, DDJVU_DOCINFO );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment