| 605 | } |
| 606 | |
| 607 | PDFDestination Document::resolveDestination(const PDFDestination & namedDestination) const |
| 608 | { |
| 609 | QReadLocker docLocker(_docLock.data()); |
| 610 | MuPDFLocaleResetter lr; |
| 611 | |
| 612 | Q_ASSERT(_mupdf_data != NULL); |
| 613 | |
| 614 | // TODO: Test this method |
| 615 | |
| 616 | // If namedDestination is not a named destination at all, simply return a copy |
| 617 | if (namedDestination.isExplicit()) |
| 618 | return namedDestination; |
| 619 | |
| 620 | fz_obj * name = fz_new_name(namedDestination.destinationName().toUtf8().data()); |
| 621 | // Note: Ideally, we would use resolve_dest, but that is not declared |
| 622 | // officially in mupdf.h, only in <mupdf>/pdf/pdf_annot.c |
| 623 | //fz_obj * dest = resolve_dest(_mupdf_data, name) |
| 624 | fz_obj * dest = pdf_lookup_dest(_mupdf_data, name); |
| 625 | fz_drop_obj(name); |
| 626 | return toPDFDestination(_mupdf_data, dest); |
| 627 | } |
| 628 | |
| 629 | QList<PDFFontInfo> Document::fonts() const |
| 630 | { |
nothing calls this directly
no test coverage detected