MCPcopy Create free account
hub / github.com/TeXworks/texworks / resolveDestination

Method resolveDestination

modules/QtPDF/src/backends/MuPDFBackend.cpp:607–627  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

605}
606
607PDFDestination 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
629QList<PDFFontInfo> Document::fonts() const
630{

Callers

nothing calls this directly

Calls 4

isExplicitMethod · 0.80
destinationNameMethod · 0.80
toPDFDestinationFunction · 0.70
dataMethod · 0.45

Tested by

no test coverage detected