summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfdoc.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-03-28 17:04:16 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-03-28 17:04:16 +0000
commit7aba472e80b073fb699c702a0971f31282737bb3 (patch)
tree81dc3ec3f2ace4bd9660289df16a7796a929c57f /fpdfsdk/fpdfdoc.cpp
parent14094f22d9a7bfde8673689218a88d6feb02f3ee (diff)
downloadpdfium-7aba472e80b073fb699c702a0971f31282737bb3.tar.xz
Cleanup fsdk_define methods
This CL collects the various fsdk_define methods into a fsdk_define.cpp class. Methods only used in one place are moved into the appropriate anonymous namespaces. Change-Id: I75bfc7e8fe20711106fcf9821adeb41d69bf5848 Reviewed-on: https://pdfium-review.googlesource.com/29310 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfdoc.cpp')
-rw-r--r--fpdfsdk/fpdfdoc.cpp27
1 files changed, 1 insertions, 26 deletions
diff --git a/fpdfsdk/fpdfdoc.cpp b/fpdfsdk/fpdfdoc.cpp
index 774dc28e8c..2ba0053d8e 100644
--- a/fpdfsdk/fpdfdoc.cpp
+++ b/fpdfsdk/fpdfdoc.cpp
@@ -60,8 +60,6 @@ CPDF_LinkList* GetLinkList(CPDF_Page* page) {
return pHolder->get();
}
-} // namespace
-
CPDF_Array* CPDFArrayFromDest(FPDF_DEST dest) {
return static_cast<CPDF_Array*>(dest);
}
@@ -78,30 +76,7 @@ CPDF_Dictionary* CPDFDictionaryFromFPDFLink(FPDF_LINK link) {
return ToDictionary(static_cast<CPDF_Object*>(link));
}
-const CPDF_Array* GetQuadPointsArrayFromDictionary(CPDF_Dictionary* dict) {
- return dict ? dict->GetArrayFor("QuadPoints") : nullptr;
-}
-
-bool GetQuadPointsFromDictionary(CPDF_Dictionary* dict,
- size_t quad_index,
- FS_QUADPOINTSF* quad_points) {
- ASSERT(quad_points);
-
- const CPDF_Array* pArray = GetQuadPointsArrayFromDictionary(dict);
- if (!pArray || quad_index >= pArray->GetCount() / 8)
- return false;
-
- quad_index *= 8;
- quad_points->x1 = pArray->GetNumberAt(quad_index);
- quad_points->y1 = pArray->GetNumberAt(quad_index + 1);
- quad_points->x2 = pArray->GetNumberAt(quad_index + 2);
- quad_points->y2 = pArray->GetNumberAt(quad_index + 3);
- quad_points->x3 = pArray->GetNumberAt(quad_index + 4);
- quad_points->y3 = pArray->GetNumberAt(quad_index + 5);
- quad_points->x4 = pArray->GetNumberAt(quad_index + 6);
- quad_points->y4 = pArray->GetNumberAt(quad_index + 7);
- return true;
-}
+} // namespace
FPDF_EXPORT FPDF_BOOKMARK FPDF_CALLCONV
FPDFBookmark_GetFirstChild(FPDF_DOCUMENT document, FPDF_BOOKMARK pDict) {