mirror of
https://invent.kde.org/graphics/okular
synced 2024-09-13 13:11:41 +00:00
- support for changing rotation and added access to the programs interface
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=442116
This commit is contained in:
parent
0cd70ee56c
commit
235e3e4c29
|
@ -5,7 +5,9 @@ kde_module_LTLIBRARIES = \
|
|||
|
||||
INCLUDES = -I$(srcdir)/../.. -I$(srcdir)/xpdf -I$(srcdir)/xpdf/goo -I$(srcdir)/xpdf/splash -I$(top_builddir)/kpdf $(all_includes)
|
||||
|
||||
libokularGenerator_xpdf_la_LIBADD = $(top_builddir)/kpdf/core/libkpdfcore.la $(top_builddir)/kpdf/conf/libkpdfconf.la $(top_builddir)/kpdf/generators/xpdf/xpdf/xpdf/libxpdf.la -lkdeui -lkdeprint
|
||||
libokularGenerator_xpdf_la_LIBADD = $(top_builddir)/kpdf/core/libkpdfcore.la $(top_builddir)/kpdf/conf/libkpdfconf.la \
|
||||
$(top_builddir)/kpdf/generators/xpdf/xpdf/xpdf/libxpdf.la \
|
||||
$(LIB_KDEPRINT) $(LIB_KDEUI)
|
||||
libokularGenerator_xpdf_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN)
|
||||
libokularGenerator_xpdf_la_SOURCES = generator_pdf.cpp gp_outputdev.cpp
|
||||
|
||||
|
|
|
@ -233,7 +233,7 @@ TextPage * PDFGenerator::fastTextPage (KPDFPage * page)
|
|||
// fetch ourselves a textpage
|
||||
KPDFTextDev td;
|
||||
docLock.lock();
|
||||
pdfdoc->displayPage( &td, page->number()+1, 72, 72, 0, true, false );
|
||||
pdfdoc->displayPage( &td, page->number()+1, 72, 72, page->rotation(), true, false );
|
||||
TextPage * textPage = td.takeTextPage();
|
||||
docLock.unlock();
|
||||
return textPage;
|
||||
|
@ -492,7 +492,7 @@ void PDFGenerator::generatePixmap( PixmapRequest * request )
|
|||
// 1. Set OutputDev parameters and Generate contents
|
||||
// note: thread safety is set on 'false' for the GUI (this) thread
|
||||
kpdfOutputDev->setParams( request->width, request->height, genTextPage, genObjectRects, genObjectRects, false );
|
||||
pdfdoc->displayPage( kpdfOutputDev, page->number() + 1, fakeDpiX, fakeDpiY, 0, true, genObjectRects );
|
||||
pdfdoc->displayPage( kpdfOutputDev, page->number() + 1, fakeDpiX, fakeDpiY, page->rotation(), true, genObjectRects );
|
||||
|
||||
// 2. Take data from outputdev and attach it to the Page
|
||||
page->setPixmap( request->id, kpdfOutputDev->takePixmap() );
|
||||
|
@ -521,7 +521,7 @@ void PDFGenerator::generateSyncTextPage( KPDFPage * page )
|
|||
// build a TextPage using the lightweight KPDFTextDev generator..
|
||||
KPDFTextDev td;
|
||||
docLock.lock();
|
||||
pdfdoc->displayPage( &td, page->number()+1, 72, 72, 0, true, false );
|
||||
pdfdoc->displayPage( &td, page->number()+1, 72, 72, page->rotation(), true, false );
|
||||
// ..and attach it to the page
|
||||
page->setSearchPage( abstractTextPage(td.takeTextPage(), page->height(), page->width()) );
|
||||
docLock.unlock();
|
||||
|
|
|
@ -67,6 +67,11 @@ class PDFGenerator : public Generator
|
|||
void generatePixmap( PixmapRequest * request );
|
||||
bool canGenerateTextPage();
|
||||
void generateSyncTextPage( KPDFPage * page );
|
||||
|
||||
// bah
|
||||
QString getXMLFile() { return QString::null; };
|
||||
void setupGUI(KActionCollection * /*ac*/ , QToolBox * /* tBox */) { ; };
|
||||
|
||||
bool supportsSearching() { return true; };
|
||||
bool supportsRotation() { return true; };
|
||||
bool prefersInternalSearching() { return false; };
|
||||
|
|
Loading…
Reference in a new issue