[poppler] 6 commits - qt4/src qt5/src utils/pdftotext.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Fri Nov 15 11:27:07 PST 2013
qt4/src/poppler-annotation.cc | 5 +++--
qt5/src/poppler-annotation.cc | 3 ++-
utils/pdftotext.cc | 8 +++++---
3 files changed, 10 insertions(+), 6 deletions(-)
New commits:
commit 4da94680d4d2d6b1bd3351d476a20f9c7ae565bc
Merge: 3ea3d7c 78c407a
Author: Albert Astals Cid <aacid at kde.org>
Date: Fri Nov 15 20:27:00 2013 +0100
Merge remote-tracking branch 'origin/poppler-0.24'
commit 3ea3d7c6c7a0ede76428204ec11aec3a844117fc
Author: Hib Eris <hib at hiberis.nl>
Date: Fri Nov 15 19:59:52 2013 +0100
pdftotext: Silence warning for may be used uninitialized variable
Bug #71640
diff --git a/utils/pdftotext.cc b/utils/pdftotext.cc
index f2d7233..c90968d 100644
--- a/utils/pdftotext.cc
+++ b/utils/pdftotext.cc
@@ -341,7 +341,7 @@ int main(int argc, char *argv[]) {
}
// write text file
- if (bbox) {
+ if (htmlMeta && bbox) { // htmlMeta && is superfluous but makes gcc happier
textOut = new TextOutputDev(NULL, physLayout, fixedPitch, rawOrder, htmlMeta);
if (textOut->isOk()) {
commit 97910b9eb92df49757915bde02e0d54de04552d4
Author: Hib Eris <hib at hiberis.nl>
Date: Fri Nov 15 19:55:19 2013 +0100
Do not close stdout in pdftotext
Bug #71639
diff --git a/utils/pdftotext.cc b/utils/pdftotext.cc
index f7b2b0e..f2d7233 100644
--- a/utils/pdftotext.cc
+++ b/utils/pdftotext.cc
@@ -18,7 +18,7 @@
// Copyright (C) 2006 Dominic Lachowicz <cinamod at hotmail.com>
// Copyright (C) 2007-2008, 2010, 2011 Albert Astals Cid <aacid at kde.org>
// Copyright (C) 2009 Jan Jockusch <jan at jockusch.de>
-// Copyright (C) 2010 Hib Eris <hib at hiberis.nl>
+// Copyright (C) 2010, 2013 Hib Eris <hib at hiberis.nl>
// Copyright (C) 2010 Kenneth Berland <ken at hero.com>
// Copyright (C) 2011 Tom Gleason <tom at buildadam.com>
// Copyright (C) 2011 Steven Murdoch <Steven.Murdoch at cl.cam.ac.uk>
@@ -367,7 +367,9 @@ int main(int argc, char *argv[]) {
}
fprintf(f, "</doc>\n");
}
- fclose(f);
+ if (f != stdout) {
+ fclose(f);
+ }
} else {
textOut = new TextOutputDev(textFileName->getCString(),
physLayout, fixedPitch, rawOrder, htmlMeta);
commit 78c407ac7e8f48ae2d2c75ad0f5960390190d2e3
Author: Albert Astals Cid <aacid at kde.org>
Date: Fri Nov 15 20:25:52 2013 +0100
destionation -> destination
And this is why the xml based api has to die
Bug #71643
Found by Hib
diff --git a/qt4/src/poppler-annotation.cc b/qt4/src/poppler-annotation.cc
index 08044c0..6d19065 100644
--- a/qt4/src/poppler-annotation.cc
+++ b/qt4/src/poppler-annotation.cc
@@ -1,5 +1,5 @@
/* poppler-annotation.cc: qt interface to poppler
- * Copyright (C) 2006, 2009, 2012 Albert Astals Cid <aacid at kde.org>
+ * Copyright (C) 2006, 2009, 2012, 2013 Albert Astals Cid <aacid at kde.org>
* Copyright (C) 2006, 2008, 2010 Pino Toscano <pino at kde.org>
* Copyright (C) 2012, Guillermo A. Amaral B. <gamaral at kde.org>
* Copyright (C) 2012, 2013 Fabio D'Urso <fabiodurso at hotmail.it>
@@ -3657,7 +3657,8 @@ void LinkAnnotation::store( QDomNode & node, QDomDocument & document ) const
Poppler::LinkGoto * go = static_cast< Poppler::LinkGoto * >( linkDestination() );
hyperlinkElement.setAttribute( "type", "GoTo" );
hyperlinkElement.setAttribute( "filename", go->fileName() );
- hyperlinkElement.setAttribute( "destionation", go->destination().toString() );
+ hyperlinkElement.setAttribute( "destionation", go->destination().toString() ); // TODO Remove for poppler 0.28
+ hyperlinkElement.setAttribute( "destination", go->destination().toString() );
break;
}
case Poppler::Link::Execute:
diff --git a/qt5/src/poppler-annotation.cc b/qt5/src/poppler-annotation.cc
index 052e060..9a8b655 100644
--- a/qt5/src/poppler-annotation.cc
+++ b/qt5/src/poppler-annotation.cc
@@ -3644,7 +3644,8 @@ void LinkAnnotation::store( QDomNode & node, QDomDocument & document ) const
Poppler::LinkGoto * go = static_cast< Poppler::LinkGoto * >( linkDestination() );
hyperlinkElement.setAttribute( "type", "GoTo" );
hyperlinkElement.setAttribute( "filename", go->fileName() );
- hyperlinkElement.setAttribute( "destionation", go->destination().toString() );
+ hyperlinkElement.setAttribute( "destionation", go->destination().toString() ); // TODO remove for poppler 0.28
+ hyperlinkElement.setAttribute( "destination", go->destination().toString() );
break;
}
case Poppler::Link::Execute:
commit c43a80e65fc570a8017892ba111a8c48ac33d9ad
Author: Hib Eris <hib at hiberis.nl>
Date: Fri Nov 15 19:59:52 2013 +0100
pdftotext: Silence warning for may be used uninitialized variable
Bug #71640
diff --git a/utils/pdftotext.cc b/utils/pdftotext.cc
index c592329..62ba3a3 100644
--- a/utils/pdftotext.cc
+++ b/utils/pdftotext.cc
@@ -341,7 +341,7 @@ int main(int argc, char *argv[]) {
}
// write text file
- if (bbox) {
+ if (htmlMeta && bbox) { // htmlMeta && is superfluous but makes gcc happier
textOut = new TextOutputDev(NULL, physLayout, fixedPitch, rawOrder, htmlMeta);
if (textOut->isOk()) {
commit f905d804c0d1c715d8423938f41b5a002c0ef15d
Author: Hib Eris <hib at hiberis.nl>
Date: Fri Nov 15 19:55:19 2013 +0100
Do not close stdout in pdftotext
Bug #71639
diff --git a/utils/pdftotext.cc b/utils/pdftotext.cc
index 3b8b69f..c592329 100644
--- a/utils/pdftotext.cc
+++ b/utils/pdftotext.cc
@@ -18,7 +18,7 @@
// Copyright (C) 2006 Dominic Lachowicz <cinamod at hotmail.com>
// Copyright (C) 2007-2008, 2010, 2011 Albert Astals Cid <aacid at kde.org>
// Copyright (C) 2009 Jan Jockusch <jan at jockusch.de>
-// Copyright (C) 2010 Hib Eris <hib at hiberis.nl>
+// Copyright (C) 2010, 2013 Hib Eris <hib at hiberis.nl>
// Copyright (C) 2010 Kenneth Berland <ken at hero.com>
// Copyright (C) 2011 Tom Gleason <tom at buildadam.com>
// Copyright (C) 2011 Steven Murdoch <Steven.Murdoch at cl.cam.ac.uk>
@@ -367,7 +367,9 @@ int main(int argc, char *argv[]) {
}
fprintf(f, "</doc>\n");
}
- fclose(f);
+ if (f != stdout) {
+ fclose(f);
+ }
} else {
textOut = new TextOutputDev(textFileName->getCString(),
physLayout, fixedPitch, rawOrder, htmlMeta);
More information about the poppler
mailing list