[poppler] 4 commits - qt4/src
Pino Toscano
pino at kemper.freedesktop.org
Fri Feb 8 09:47:42 PST 2008
qt4/src/poppler-document.cc | 16 ++++++++--------
qt4/src/poppler-page.cc | 4 ++--
qt4/src/poppler-private.h | 2 ++
qt4/src/poppler-qt4.h | 2 +-
4 files changed, 13 insertions(+), 11 deletions(-)
New commits:
commit eca91761741de5b340f7a2160db5b33401feb935
Author: Pino Toscano <pino at kde.org>
Date: Fri Feb 8 18:42:14 2008 +0100
Remove unneeded headers.
diff --git a/qt4/src/poppler-page.cc b/qt4/src/poppler-page.cc
index 48c19ed..0ebdad2 100644
--- a/qt4/src/poppler-page.cc
+++ b/qt4/src/poppler-page.cc
@@ -17,12 +17,12 @@
*/
#include <poppler-qt4.h>
-#include <QtCore/QFile>
+
#include <QtCore/QMap>
#include <QtGui/QImage>
#include <QtGui/QPainter>
+
#include <config.h>
-#include <GlobalParams.h>
#include <PDFDoc.h>
#include <Catalog.h>
#include <Form.h>
commit 899627505a4645fb1cc7d3599adbeec449c57041
Author: Pino Toscano <pino at kde.org>
Date: Fri Feb 8 18:41:13 2008 +0100
The return value is QString, so return QString's...
diff --git a/qt4/src/poppler-document.cc b/qt4/src/poppler-document.cc
index f40cfc6..7536834 100644
--- a/qt4/src/poppler-document.cc
+++ b/qt4/src/poppler-document.cc
@@ -208,11 +208,11 @@ namespace Poppler {
// [Albert] Code adapted from pdfinfo.cc on xpdf
Object info;
if ( m_doc->locked )
- return NULL;
+ return QString();
m_doc->doc->getDocInfo( &info );
if ( !info.isDict() )
- return NULL;
+ return QString();
QString result;
Object obj;
@@ -229,7 +229,7 @@ namespace Poppler {
}
obj.free();
info.free();
- return NULL;
+ return QString();
}
QStringList Document::infoKeys() const
commit a1606fa4ff438983e3a7f55dd2d10a66f72e6711
Author: Pino Toscano <pino at kde.org>
Date: Fri Feb 8 17:31:32 2008 +0100
Move checkDocument() inside the private class.
diff --git a/qt4/src/poppler-document.cc b/qt4/src/poppler-document.cc
index 7982fe6..f40cfc6 100644
--- a/qt4/src/poppler-document.cc
+++ b/qt4/src/poppler-document.cc
@@ -43,7 +43,7 @@ namespace Poppler {
DocumentData *doc = new DocumentData(new GooString(QFile::encodeName(filePath)),
new GooString(ownerPassword.data()),
new GooString(userPassword.data()));
- return checkDocument(doc);
+ return DocumentData::checkDocument(doc);
}
Document *Document::loadFromData(const QByteArray &fileContents,
@@ -54,10 +54,10 @@ namespace Poppler {
DocumentData *doc = new DocumentData(fileContents,
new GooString(ownerPassword.data()),
new GooString(userPassword.data()));
- return checkDocument(doc);
+ return DocumentData::checkDocument(doc);
}
- Document *Document::checkDocument(DocumentData *doc)
+ Document *DocumentData::checkDocument(DocumentData *doc)
{
Document *pdoc;
if (doc->doc->isOk() || doc->doc->getErrorCode() == errEncrypted) {
diff --git a/qt4/src/poppler-private.h b/qt4/src/poppler-private.h
index 36879c4..29df4a6 100644
--- a/qt4/src/poppler-private.h
+++ b/qt4/src/poppler-private.h
@@ -239,6 +239,8 @@ namespace Poppler {
}
}
}
+
+ static Document *checkDocument(DocumentData *doc);
PDFDoc *doc;
QByteArray fileContents;
diff --git a/qt4/src/poppler-qt4.h b/qt4/src/poppler-qt4.h
index 6d79806..42acf9e 100644
--- a/qt4/src/poppler-qt4.h
+++ b/qt4/src/poppler-qt4.h
@@ -464,6 +464,7 @@ namespace Poppler {
*/
class Document {
friend class Page;
+ friend class DocumentData;
public:
/**
@@ -873,7 +874,6 @@ QString subject = m_doc->info("Subject");
DocumentData *m_doc;
Document(DocumentData *dataA);
- static Document *checkDocument(DocumentData *doc);
};
class BaseConverterPrivate;
commit f1ec70a83f807493dab5118761df31c0f67decad
Author: Pino Toscano <pino at kde.org>
Date: Fri Feb 8 17:26:41 2008 +0100
Remove C-ism.
diff --git a/qt4/src/poppler-document.cc b/qt4/src/poppler-document.cc
index f5f3c90..7982fe6 100644
--- a/qt4/src/poppler-document.cc
+++ b/qt4/src/poppler-document.cc
@@ -128,7 +128,7 @@ namespace Poppler {
return m_doc->locked;
}
- Document::PageMode Document::pageMode(void) const
+ Document::PageMode Document::pageMode() const
{
switch (m_doc->doc->getCatalog()->getPageMode()) {
case Catalog::pageModeNone:
@@ -148,7 +148,7 @@ namespace Poppler {
}
}
- Document::PageLayout Document::pageLayout(void) const
+ Document::PageLayout Document::pageLayout() const
{
switch (m_doc->doc->getCatalog()->getPageLayout()) {
case Catalog::pageLayoutNone:
More information about the poppler
mailing list