| Index: fpdfsdk/fpdfdoc.cpp
|
| diff --git a/fpdfsdk/fpdfdoc.cpp b/fpdfsdk/fpdfdoc.cpp
|
| index 5d113596bc8dcc741998cdfdf4c23b231b6da388..4d6a4d7f1ceb42f93b3099af3d848d7af1c67b16 100644
|
| --- a/fpdfsdk/fpdfdoc.cpp
|
| +++ b/fpdfsdk/fpdfdoc.cpp
|
| @@ -13,6 +13,7 @@
|
| #include "core/fpdfapi/parser/cpdf_document.h"
|
| #include "core/fpdfdoc/cpdf_bookmark.h"
|
| #include "core/fpdfdoc/cpdf_bookmarktree.h"
|
| +#include "core/fpdfdoc/cpdf_dest.h"
|
| #include "fpdfsdk/fsdk_define.h"
|
| #include "third_party/base/stl_util.h"
|
|
|
| @@ -211,6 +212,31 @@ DLLEXPORT unsigned long STDCALL FPDFDest_GetPageIndex(FPDF_DOCUMENT document,
|
| return dest.GetPageIndex(pDoc);
|
| }
|
|
|
| +DLLEXPORT FPDF_BOOL STDCALL FPDFDest_GetLocationInPage(FPDF_DEST pDict,
|
| + FPDF_BOOL* hasX,
|
| + FPDF_BOOL* hasY,
|
| + FPDF_BOOL* hasZoom,
|
| + FS_FLOAT* x,
|
| + FS_FLOAT* y,
|
| + FS_FLOAT* zoom) {
|
| + if (!pDict)
|
| + return false;
|
| +
|
| + std::unique_ptr<CPDF_Dest> dest(
|
| + new CPDF_Dest(static_cast<CPDF_Object*>(pDict)));
|
| + if (!dest->HasXYZ())
|
| + return false;
|
| +
|
| + bool bHasX;
|
| + bool bHasY;
|
| + bool bHasZoom;
|
| + dest->GetXYZ(&bHasX, &bHasY, &bHasZoom, x, y, zoom);
|
| + *hasX = bHasX;
|
| + *hasY = bHasY;
|
| + *hasZoom = bHasZoom;
|
| + return true;
|
| +}
|
| +
|
| DLLEXPORT FPDF_LINK STDCALL FPDFLink_GetLinkAtPoint(FPDF_PAGE page,
|
| double x,
|
| double y) {
|
|
|