qt5/src/poppler-document.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
New commits: commit b2c2433b4dc8bb11fcd6206dc8e24373a66ba521 Author: Albert Astals Cid <aa...@kde.org> Date: Sat Sep 22 20:09:40 2018 +0200 qt5: Be more stubborn getting the page from a label string If using the "plain" label string didn't work, try with an unicode encoded one, this is a bit better since the label->cmpN comparison in PageLabelInfo::labelToIndex now succeeds but unfortunately the strtol used there still gets confused and fails to return the proper page index diff --git a/qt5/src/poppler-document.cc b/qt5/src/poppler-document.cc index 102bd820..c7b90ca9 100644 --- a/qt5/src/poppler-document.cc +++ b/qt5/src/poppler-document.cc @@ -567,8 +567,12 @@ namespace Poppler { GooString label_g(label.toLatin1().data()); int index; - if (!m_doc->doc->getCatalog()->labelToIndex (&label_g, &index)) - return nullptr; + if (!m_doc->doc->getCatalog()->labelToIndex (&label_g, &index)) { + std::unique_ptr<GooString> label_ug(QStringToUnicodeGooString(label)); + if (!m_doc->doc->getCatalog()->labelToIndex (label_ug.get(), &index)) { + return nullptr; + } + } return page(index); } _______________________________________________ poppler mailing list poppler@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/poppler