poppler/ArthurOutputDev.cc | 11 ++++++++++- poppler/Makefile.am | 4 ++-- qt4/src/CMakeLists.txt | 6 +----- qt4/src/Makefile.am | 6 +----- qt4/src/poppler-document.cc | 2 +- qt4/src/poppler-page.cc | 4 +--- test/CMakeLists.txt | 14 +++++++++----- 7 files changed, 25 insertions(+), 22 deletions(-)
New commits: commit 654698b556eb53eab7c2d55fc6b3fdd9e35173bb Author: Pino Toscano <[email protected]> Date: Thu Mar 4 13:16:11 2010 +0100 [Qt4] use Arthur unconditionally arthur is no more tied to splash, so can be used in an occasion diff --git a/qt4/src/poppler-document.cc b/qt4/src/poppler-document.cc index c2563f4..d91200f 100644 --- a/qt4/src/poppler-document.cc +++ b/qt4/src/poppler-document.cc @@ -499,8 +499,8 @@ namespace Poppler { QSet<Document::RenderBackend> ret; #if defined(HAVE_SPLASH) ret << Document::SplashBackend; - ret << Document::ArthurBackend; #endif + ret << Document::ArthurBackend; return ret; } diff --git a/qt4/src/poppler-page.cc b/qt4/src/poppler-page.cc index 9e889ce..2a3e48c 100644 --- a/qt4/src/poppler-page.cc +++ b/qt4/src/poppler-page.cc @@ -38,10 +38,10 @@ #include <TextOutputDev.h> #include <Annot.h> #include <Link.h> +#include <ArthurOutputDev.h> #if defined(HAVE_SPLASH) #include <SplashOutputDev.h> #include <splash/SplashBitmap.h> -#include <ArthurOutputDev.h> #endif #include "poppler-private.h" @@ -242,7 +242,6 @@ QImage Page::renderToImage(double xres, double yres, int x, int y, int w, int h, } case Poppler::Document::ArthurBackend: { -#if defined(HAVE_SPLASH) QSize size = pageSize(); QImage tmpimg(w == -1 ? qRound( size.width() * xres / 72.0 ) : w, h == -1 ? qRound( size.height() * yres / 72.0 ) : h, QImage::Format_ARGB32); @@ -270,7 +269,6 @@ QImage Page::renderToImage(double xres, double yres, int x, int y, int w, int h, painter.restore(); painter.end(); img = tmpimg; -#endif break; } } commit 41931b6310d2ae81e622db904246f019ceb8410d Author: Pino Toscano <[email protected]> Date: Thu Mar 4 13:13:11 2010 +0100 [Qt4] compile Arthur unconditionally as the arthur output dev does not require splash anymore, we can always compile it with poppler-qt4 diff --git a/poppler/Makefile.am b/poppler/Makefile.am index 5f6a94a..83859e9 100644 --- a/poppler/Makefile.am +++ b/poppler/Makefile.am @@ -13,6 +13,8 @@ splash_libs = \ $(SPLASH_LIBS) \ $(top_builddir)/splash/libsplash.la +endif + if BUILD_POPPLER_QT4 poppler_arthur = libpoppler-arthur.la @@ -29,8 +31,6 @@ arthur_libs = \ endif -endif - if BUILD_CAIRO_OUTPUT diff --git a/qt4/src/CMakeLists.txt b/qt4/src/CMakeLists.txt index f6c7b16..e2ad57a 100644 --- a/qt4/src/CMakeLists.txt +++ b/qt4/src/CMakeLists.txt @@ -25,12 +25,8 @@ set(poppler_qt4_SRCS poppler-sound.cc poppler-textbox.cc poppler-page-transition.cc + ${CMAKE_SOURCE_DIR}/poppler/ArthurOutputDev.cc ) -if (ENABLE_SPLASH) - set(poppler_qt4_SRCS ${poppler_qt4_SRCS} - ${CMAKE_SOURCE_DIR}/poppler/ArthurOutputDev.cc - ) -endif (ENABLE_SPLASH) qt4_automoc(${poppler_qt4_SRCS}) add_library(poppler-qt4 SHARED ${poppler_qt4_SRCS}) set_target_properties(poppler-qt4 PROPERTIES VERSION 3.2.0 SOVERSION 3) diff --git a/qt4/src/Makefile.am b/qt4/src/Makefile.am index c78f4ba..600d0cc 100644 --- a/qt4/src/Makefile.am +++ b/qt4/src/Makefile.am @@ -53,14 +53,10 @@ libpoppler_qt4_la_SOURCES = \ libpoppler_qt4_la_LIBADD = \ $(top_builddir)/poppler/libpoppler.la \ + $(top_builddir)/poppler/libpoppler-arthur.la \ $(FONTCONFIG_LIBS) \ $(POPPLER_QT4_LIBS) -if BUILD_SPLASH_OUTPUT -libpoppler_qt4_la_LIBADD += \ - $(top_builddir)/poppler/libpoppler-arthur.la -endif - libpoppler_qt4_la_LDFLAGS = -version-info 5:0:2 @create_shared_lib@ # This rule lets GNU make create any *.moc from the equivalent *.h commit 48a29e2bbc9aa9bd0cb2775a2365c0ffdeb6ce87 Author: Pino Toscano <[email protected]> Date: Thu Mar 4 13:11:43 2010 +0100 [Arthur] make ArthurOutputDev compile even with Splash disabled text rendering is disabled in that case for now diff --git a/poppler/ArthurOutputDev.cc b/poppler/ArthurOutputDev.cc index fbc8b01..b3b8dd0 100644 --- a/poppler/ArthurOutputDev.cc +++ b/poppler/ArthurOutputDev.cc @@ -49,6 +49,7 @@ #include <QtGui/QPainterPath> //------------------------------------------------------------------------ +#ifdef HAVE_SPLASH #include "splash/SplashFontFileID.h" #include "splash/SplashFontFile.h" #include "splash/SplashFontEngine.h" @@ -77,7 +78,7 @@ private: Ref r; }; - +#endif //------------------------------------------------------------------------ // ArthurOutputDev @@ -94,11 +95,14 @@ ArthurOutputDev::ArthurOutputDev(QPainter *painter): ArthurOutputDev::~ArthurOutputDev() { +#ifdef HAVE_SPLASH delete m_fontEngine; +#endif } void ArthurOutputDev::startDoc(XRef *xrefA) { xref = xrefA; +#ifdef HAVE_SPLASH delete m_fontEngine; m_fontEngine = new SplashFontEngine( #if HAVE_T1LIB_H @@ -109,6 +113,7 @@ void ArthurOutputDev::startDoc(XRef *xrefA) { gFalse, #endif m_painter->testRenderHint(QPainter::TextAntialiasing)); +#endif } void ArthurOutputDev::startPage(int pageNum, GfxState *state) @@ -249,6 +254,7 @@ void ArthurOutputDev::updateStrokeOpacity(GfxState *state) void ArthurOutputDev::updateFont(GfxState *state) { +#ifdef HAVE_SPLASH GfxFont *gfxFont; GfxFontType fontType; SplashOutFontFileID *id; @@ -474,6 +480,7 @@ void ArthurOutputDev::updateFont(GfxState *state) delete id; err1: return; +#endif } static QPainterPath convertPath(GfxState *state, GfxPath *path, Qt::FillRule fillRule) @@ -540,6 +547,7 @@ void ArthurOutputDev::drawChar(GfxState *state, double x, double y, double dx, double dy, double originX, double originY, CharCode code, int nBytes, Unicode *u, int uLen) { +#ifdef HAVE_SPLASH double x1, y1; // SplashPath *path; int render; @@ -636,6 +644,7 @@ void ArthurOutputDev::drawChar(GfxState *state, double x, double y, } */ } +#endif } GBool ArthurOutputDev::beginType3Char(GfxState *state, double x, double y, commit 2013a19b6457753890affad8c4049f2ce4627df7 Author: Pino Toscano <[email protected]> Date: Thu Mar 4 13:02:43 2010 +0100 [CMake/tests] compile gtk-splash-test only if splash is enabled diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index eada899..0c01418 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -24,11 +24,15 @@ if (GTK_FOUND AND BUILD_GTK_TESTS) ${CMAKE_BINARY_DIR}/glib ) - set (gtk_splash_test_SRCS - gtk-splash-test.cc - ) - poppler_add_test(gtk-splash-test BUILD_GTK_TESTS ${gtk_splash_test_SRCS}) - target_link_libraries(gtk-splash-test poppler ${GTK2_LIBRARIES}) + if (ENABLE_SPLASH) + + set (gtk_splash_test_SRCS + gtk-splash-test.cc + ) + poppler_add_test(gtk-splash-test BUILD_GTK_TESTS ${gtk_splash_test_SRCS}) + target_link_libraries(gtk-splash-test poppler ${GTK2_LIBRARIES}) + + endif (ENABLE_SPLASH) if (HAVE_CAIRO) _______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
