[poppler] poppler/qt: Makefile.am, 1.14, 1.15 poppler-link.cc, 1.1, 1.2 poppler-page.cc, 1.18, 1.19 poppler-private.h, 1.8, 1.9

Albert Astals Cid aacid at kemper.freedesktop.org
Wed Mar 7 11:15:34 PST 2007


Update of /cvs/poppler/poppler/qt
In directory kemper:/tmp/cvs-serv13217/qt

Modified Files:
	Makefile.am poppler-link.cc poppler-page.cc poppler-private.h 
Log Message:
2007-03-07  Carlos Garcia Campos <carlosgc at gnome.org>
        reviewed by: Albert Astals Cid <aacid at kde.org>

        * poppler/Page.cc: Consider 0x0 boxes as invalid. Fixes
        http://bugzilla.gnome.org/show_bug.cgi?id=408682

2007-03-06  Pino Toscano <pino at kde.org>
        reviewed by: Albert Astals Cid <aacid at kde.org>

       * configure.ac:
       * qt/Makefile.am:
       * qt/poppler-link.cc:
       * qt/poppler-page.cc:
       * qt/poppler-private.h:
       * qt4/poppler-link.cc:
       Make the Qt4 frontend compilable again with no Splash.
       Make the Qt3 frontend compilable with no Splash.


Index: Makefile.am
===================================================================
RCS file: /cvs/poppler/poppler/qt/Makefile.am,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- Makefile.am	25 Sep 2006 20:43:18 -0000	1.14
+++ Makefile.am	7 Mar 2007 19:15:32 -0000	1.15
@@ -3,7 +3,6 @@
 	-I$(top_srcdir)/poppler			\
 	$(cairo_includes)			\
 	$(POPPLER_QT_CXXFLAGS)			\
-	$(SPLASH_CFLAGS)			\
 	$(FREETYPE_CFLAGS)			\
 	$(FONTCONFIG_CFLAGS)
 

Index: poppler-link.cc
===================================================================
RCS file: /cvs/poppler/poppler/qt/poppler-link.cc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- poppler-link.cc	25 Jun 2006 16:19:32 -0000	1.1
+++ poppler-link.cc	7 Mar 2007 19:15:32 -0000	1.2
@@ -60,11 +60,13 @@
 		m_changeTop = ld->getChangeTop();
 		m_changeZoom = ld->getChangeZoom();
 		
-		int leftAux, topAux, rightAux, bottomAux;
+		int leftAux = 0, topAux = 0, rightAux = 0, bottomAux = 0;
 		
+#if defined(HAVE_SPLASH)
 		SplashOutputDev *sod = data.doc->getOutputDev();
 		sod->cvtUserToDev( left, top, &leftAux, &topAux );
 		sod->cvtUserToDev( right, bottom, &rightAux, &bottomAux );
+#endif
 		
 		m_left = leftAux;
 		m_top = topAux;

Index: poppler-page.cc
===================================================================
RCS file: /cvs/poppler/poppler/qt/poppler-page.cc,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- poppler-page.cc	22 Dec 2006 23:27:54 -0000	1.18
+++ poppler-page.cc	7 Mar 2007 19:15:32 -0000	1.19
@@ -20,13 +20,17 @@
 #include <poppler-qt.h>
 #include <qfile.h>
 #include <qimage.h>
+#include <config.h>
 #include <GlobalParams.h>
 #include <PDFDoc.h>
 #include <Catalog.h>
 #include <ErrorCodes.h>
-#include <SplashOutputDev.h>
 #include <TextOutputDev.h>
+#if defined(HAVE_SPLASH)
+#include <SplashOutputDev.h>
 #include <splash/SplashBitmap.h>
+#endif
+
 #include "poppler-private.h"
 #include "poppler-page-transition-private.h"
 
@@ -65,6 +69,7 @@
 
 QImage Page::renderToImage(double xres, double yres, bool doLinks) const
 {
+#if defined(HAVE_SPLASH)
   SplashOutputDev *output_dev;
   SplashBitmap *bitmap;
   SplashColorPtr color_ptr;
@@ -101,6 +106,13 @@
   output_dev->startPage( 0, NULL );
 
   return img;
+#else
+  (void)xres;
+  (void)xres;
+  (void)doLinks;
+
+  return QImage();
+#endif
 }
 
 QString Page::getText(const Rectangle &r) const
@@ -222,6 +234,7 @@
 {
   QValueList<Link*> popplerLinks;
 
+#if defined(HAVE_SPLASH)
   Links *xpdfLinks = data->doc->data->doc.takeLinks();
   for (int i = 0; i < xpdfLinks->getNumLinks(); ++i)
   {
@@ -339,6 +352,7 @@
   }
 
   delete xpdfLinks;
+#endif
   
   return popplerLinks;
 }

Index: poppler-private.h
===================================================================
RCS file: /cvs/poppler/poppler/qt/poppler-private.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- poppler-private.h	26 Jul 2006 18:16:01 -0000	1.8
+++ poppler-private.h	7 Mar 2007 19:15:32 -0000	1.9
@@ -18,13 +18,18 @@
 
 #include <qdom.h>
 
+#include <config.h>
 #include <Object.h>
 #include <Outline.h>
-#include <SplashOutputDev.h>
 #include <Link.h>
 #include <PDFDoc.h>
 #include <FontInfo.h>
 #include <UGooString.h>
+#if defined(HAVE_SPLASH)
+#include <SplashOutputDev.h>
+#else
+class SplashOutputDev;
+#endif
 
 namespace Poppler {
     
@@ -63,12 +68,15 @@
 
     ~DocumentData()
     {
+#if defined(HAVE_SPLASH)
         delete m_outputDev;
+#endif
         delete m_fontInfoScanner;
     }
 
     SplashOutputDev *getOutputDev()
     {
+#if defined(HAVE_SPLASH)
         if (!m_outputDev)
         {
             SplashColor white;
@@ -78,6 +86,7 @@
             m_outputDev = new SplashOutputDev(splashModeRGB8Qt, 4, gFalse, white);
             m_outputDev->startDoc(doc.getXRef());
         }
+#endif
         return m_outputDev;
     }
 



More information about the poppler mailing list