Document.getField()
| 153 | |
| 154 | // Document.getField() |
| 155 | QJSValue JSDocument::getField(const QString &cName) const |
| 156 | { |
| 157 | QList<Page *>::const_iterator pIt = m_doc->m_pagesVector.constBegin(), pEnd = m_doc->m_pagesVector.constEnd(); |
| 158 | for (; pIt != pEnd; ++pIt) { |
| 159 | const QList<Okular::FormField *> pageFields = (*pIt)->formFields(); |
| 160 | for (FormField *form : pageFields) { |
| 161 | if (form->fullyQualifiedName() == cName) { |
| 162 | return JSField::wrapField(qjsEngine(this), form, *pIt); |
| 163 | } |
| 164 | } |
| 165 | } |
| 166 | return QJSValue(QJSValue::UndefinedValue); |
| 167 | } |
| 168 | |
| 169 | // Document.getPageLabel() |
| 170 | QString JSDocument::getPageLabel(int nPage) const |
no test coverage detected