summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qt5/src/poppler-document.cc18
-rw-r--r--qt5/src/poppler-qt5.h9
2 files changed, 25 insertions, 2 deletions
diff --git a/qt5/src/poppler-document.cc b/qt5/src/poppler-document.cc
index 98959a10..741a1b7f 100644
--- a/qt5/src/poppler-document.cc
+++ b/qt5/src/poppler-document.cc
@@ -1,7 +1,7 @@
/* poppler-document.cc: qt interface to poppler
* Copyright (C) 2005, Net Integration Technologies, Inc.
* Copyright (C) 2005, 2008, Brad Hards <bradh@frogmouth.net>
- * Copyright (C) 2005-2010, 2012, 2013, 2015, Albert Astals Cid <aacid@kde.org>
+ * Copyright (C) 2005-2010, 2012, 2013, 2015, 2017, Albert Astals Cid <aacid@kde.org>
* Copyright (C) 2006-2010, Pino Toscano <pino@kde.org>
* Copyright (C) 2010, 2011 Hib Eris <hib@hiberis.nl>
* Copyright (C) 2012 Koji Otani <sho@bbr.jp>
@@ -784,6 +784,22 @@ namespace Poppler {
return Document::NoForm; // make gcc happy
}
+ QVector<int> Document::formCalculateOrder() const
+ {
+ QVector<int> result;
+
+ Form *form = m_doc->doc->getCatalog()->getForm();
+ const std::vector<Ref> &calculateOrder = form->getCalculateOrder();
+ for (uint i = 0; i < calculateOrder.size(); ++i) {
+ FormWidget *w = form->findWidgetByRef(calculateOrder[i]);
+ if (w) {
+ result << w->getID();
+ }
+ }
+
+ return result;
+ }
+
QDateTime convertDate( char *dateString )
{
int year, mon, day, hour, min, sec, tzHours, tzMins;
diff --git a/qt5/src/poppler-qt5.h b/qt5/src/poppler-qt5.h
index 562507ef..45cc6ffa 100644
--- a/qt5/src/poppler-qt5.h
+++ b/qt5/src/poppler-qt5.h
@@ -1,7 +1,7 @@
/* poppler-qt.h: qt interface to poppler
* Copyright (C) 2005, Net Integration Technologies, Inc.
* Copyright (C) 2005, 2007, Brad Hards <bradh@frogmouth.net>
- * Copyright (C) 2005-2015, Albert Astals Cid <aacid@kde.org>
+ * Copyright (C) 2005-2015, 2017, Albert Astals Cid <aacid@kde.org>
* Copyright (C) 2005, Stefan Kebekus <stefan.kebekus@math.uni-koeln.de>
* Copyright (C) 2006-2011, Pino Toscano <pino@kde.org>
* Copyright (C) 2009 Shawn Rutledge <shawn.t.rutledge@gmail.com>
@@ -1523,6 +1523,13 @@ QString subject = m_doc->info("Subject");
FormType formType() const;
/**
+ Returns the calculate order for forms (using their id)
+
+ \since 0.53
+ */
+ QVector<int> formCalculateOrder() const;
+
+ /**
Destructor.
*/
~Document();