summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdfdoc.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-03-05 16:44:22 -0800
committerTom Sepez <tsepez@chromium.org>2015-03-05 16:44:22 -0800
commit7b5bc26e8267fec38bef9f95cd04d2bd731faff3 (patch)
tree9203aa0ff0d4a34616a5161b2ded34ce7e9ada24 /fpdfsdk/src/fpdfdoc.cpp
parent827a1722f70e7092270b5e0fdfba1e9c0b1ac50f (diff)
downloadpdfium-7b5bc26e8267fec38bef9f95cd04d2bd731faff3.tar.xz
Merge to XFA: Make conversion between CPDF_Action and its dictionary explicit.
Original Review URL: https://codereview.chromium.org/984773002 R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/984783002
Diffstat (limited to 'fpdfsdk/src/fpdfdoc.cpp')
-rw-r--r--fpdfsdk/src/fpdfdoc.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/fpdfsdk/src/fpdfdoc.cpp b/fpdfsdk/src/fpdfdoc.cpp
index 19b4581829..9e4267ffc7 100644
--- a/fpdfsdk/src/fpdfdoc.cpp
+++ b/fpdfsdk/src/fpdfdoc.cpp
@@ -99,14 +99,14 @@ DLLEXPORT FPDF_ACTION STDCALL FPDFBookmark_GetAction(FPDF_BOOKMARK pDict)
if (!pDict)
return NULL;
CPDF_Bookmark bookmark((CPDF_Dictionary*)pDict);
- return bookmark.GetAction();
+ return bookmark.GetAction().GetDict();
}
DLLEXPORT unsigned long STDCALL FPDFAction_GetType(FPDF_ACTION pDict)
{
if (!pDict)
return 0;
- CPDF_Action action = (CPDF_Dictionary*)pDict;
+ CPDF_Action action((CPDF_Dictionary*)pDict);
CPDF_Action::ActionType type = action.GetType();
switch (type) {
case CPDF_Action::GoTo:
@@ -130,7 +130,7 @@ DLLEXPORT FPDF_DEST STDCALL FPDFAction_GetDest(FPDF_DOCUMENT document, FPDF_ACTI
if (!pDict)
return NULL;
CPDF_Document* pDoc = ((CPDFXFA_Document*)document)->GetPDFDoc();
- CPDF_Action action = (CPDF_Dictionary*)pDict;
+ CPDF_Action action((CPDF_Dictionary*)pDict);
return action.GetDest(pDoc);
}
@@ -142,7 +142,7 @@ DLLEXPORT unsigned long STDCALL FPDFAction_GetURIPath(FPDF_DOCUMENT document, FP
if (!pDict)
return 0;
CPDF_Document* pDoc = ((CPDFXFA_Document*)document)->GetPDFDoc();
- CPDF_Action action = (CPDF_Dictionary*)pDict;
+ CPDF_Action action((CPDF_Dictionary*)pDict);
CFX_ByteString path = action.GetURI(pDoc);
unsigned long len = path.GetLength() + 1;
if (buffer != NULL && buflen >= len)
@@ -207,7 +207,7 @@ DLLEXPORT FPDF_ACTION STDCALL FPDFLink_GetAction(FPDF_LINK pDict)
if (!pDict)
return NULL;
CPDF_Link link = (CPDF_Dictionary*)pDict;
- return link.GetAction();
+ return link.GetAction().GetDict();
}
DLLEXPORT FPDF_BOOL STDCALL FPDFLink_Enumerate(FPDF_PAGE page, int* startPos, FPDF_LINK* linkAnnot)