[poppler] 3 commits - qt4/src qt5/src

Albert Astals Cid aacid at kemper.freedesktop.org
Wed Oct 9 17:19:48 PDT 2013


 qt4/src/poppler-document.cc |    6 ++++++
 qt5/src/poppler-document.cc |    6 ++++++
 2 files changed, 12 insertions(+)

New commits:
commit bd893d4a543a6cc3a525655f37def38440944f28
Merge: 93e8b05 daa0990
Author: Albert Astals Cid <aacid at kde.org>
Date:   Thu Oct 10 02:19:34 2013 +0200

    Merge remote-tracking branch 'origin/poppler-0.24'

commit daa0990a7baf17d00d12574a4de815e070727a86
Author: Albert Astals Cid <aacid at kde.org>
Date:   Thu Oct 10 02:16:25 2013 +0200

    Return empty if getXRef()->copy() fails
    
    Seems this can happen by looking at the backtrace in https://bugs.kde.org/show_bug.cgi?id=325810

diff --git a/qt4/src/poppler-document.cc b/qt4/src/poppler-document.cc
index 7d13656..6a06ab8 100644
--- a/qt4/src/poppler-document.cc
+++ b/qt4/src/poppler-document.cc
@@ -269,6 +269,8 @@ namespace Poppler {
 	    return QString();
 
 	QScopedPointer<XRef> xref(m_doc->doc->getXRef()->copy());
+	if (!xref)
+		return QString();
 	xref->getDocInfo(&info);
 	if ( !info.isDict() )
 	    return QString();
@@ -300,6 +302,8 @@ namespace Poppler {
 	    return QStringList();
 
 	QScopedPointer<XRef> xref(m_doc->doc->getXRef()->copy());
+	if (!xref)
+		return QStringList();
 	xref->getDocInfo(&info);
 	if ( !info.isDict() )
 	    return QStringList();
@@ -323,6 +327,8 @@ namespace Poppler {
 
 	Object info;
 	QScopedPointer<XRef> xref(m_doc->doc->getXRef()->copy());
+	if (!xref)
+		return QDateTime();
 	xref->getDocInfo(&info);
 	if ( !info.isDict() ) {
 	    info.free();
diff --git a/qt5/src/poppler-document.cc b/qt5/src/poppler-document.cc
index af1804e..158d506 100644
--- a/qt5/src/poppler-document.cc
+++ b/qt5/src/poppler-document.cc
@@ -255,6 +255,8 @@ namespace Poppler {
 	    return QString();
 
 	QScopedPointer<XRef> xref(m_doc->doc->getXRef()->copy());
+	if (!xref)
+		return QString();
 	xref->getDocInfo(&info);
 	if ( !info.isDict() )
 	    return QString();
@@ -286,6 +288,8 @@ namespace Poppler {
 	    return QStringList();
 
 	QScopedPointer<XRef> xref(m_doc->doc->getXRef()->copy());
+	if (!xref)
+		return QStringList();
 	xref->getDocInfo(&info);
 	if ( !info.isDict() )
 	    return QStringList();
@@ -309,6 +313,8 @@ namespace Poppler {
 
 	Object info;
 	QScopedPointer<XRef> xref(m_doc->doc->getXRef()->copy());
+	if (!xref)
+		return QDateTime();
 	xref->getDocInfo(&info);
 	if ( !info.isDict() ) {
 	    info.free();
commit f4bfa940aa40a82a1080cdaf765da1d1615ccfb1
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Sat Oct 5 11:20:04 2013 +0200

    cairo: Do not set an invalid matrix in drawImage()
    
    https://bugs.freedesktop.org/show_bug.cgi?id=70085

diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc
index 26760c8..77bd245 100644
--- a/poppler/CairoOutputDev.cc
+++ b/poppler/CairoOutputDev.cc
@@ -2938,7 +2938,8 @@ void CairoOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
   if (maskPattern) {
     if (!printing)
       cairo_clip (cairo);
-    cairo_set_matrix (cairo, &mask_matrix);
+    if (mask)
+      cairo_set_matrix (cairo, &mask_matrix);
     cairo_mask (cairo, maskPattern);
   } else {
     if (printing)


More information about the poppler mailing list