summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdf_transformpage.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-10-16 14:00:21 -0700
committerTom Sepez <tsepez@chromium.org>2015-10-16 14:00:21 -0700
commitdb0be96179f0cd5f1787564cbccf86320a4d54ae (patch)
tree447ba797f172bfffa2d21dacc7dbf6fb2900bfd7 /fpdfsdk/src/fpdf_transformpage.cpp
parentcebdda5a686251087f14e8df19b7f988dfae46de (diff)
downloadpdfium-db0be96179f0cd5f1787564cbccf86320a4d54ae.tar.xz
Merge to XFA: Introduce CPDFPageFromFPFDPage()
Original Review URL: https://codereview.chromium.org/1406543004 . (cherry picked from commit 943ea142b6a7e6edc91fe3c307013129e6eb0ef3) R=thestig@chromium.org Review URL: https://codereview.chromium.org/1411623002 .
Diffstat (limited to 'fpdfsdk/src/fpdf_transformpage.cpp')
-rw-r--r--fpdfsdk/src/fpdf_transformpage.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/fpdfsdk/src/fpdf_transformpage.cpp b/fpdfsdk/src/fpdf_transformpage.cpp
index dbf97aa2f0..132f6683d0 100644
--- a/fpdfsdk/src/fpdf_transformpage.cpp
+++ b/fpdfsdk/src/fpdf_transformpage.cpp
@@ -11,10 +11,6 @@
namespace {
-CPDF_Page* GetPageFromFPDFPage(FPDF_PAGE page) {
- return page ? static_cast<CPDFXFA_Page*>(page)->GetPDFPage() : nullptr;
-}
-
void SetBoundingBox(CPDF_Page* page,
const CFX_ByteStringC& key,
float left,
@@ -55,7 +51,7 @@ DLLEXPORT void STDCALL FPDFPage_SetMediaBox(FPDF_PAGE page,
float bottom,
float right,
float top) {
- CPDF_Page* pPage = GetPageFromFPDFPage(page);
+ CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!pPage)
return;
@@ -67,7 +63,7 @@ DLLEXPORT void STDCALL FPDFPage_SetCropBox(FPDF_PAGE page,
float bottom,
float right,
float top) {
- CPDF_Page* pPage = GetPageFromFPDFPage(page);
+ CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!pPage)
return;
@@ -79,7 +75,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_GetMediaBox(FPDF_PAGE page,
float* bottom,
float* right,
float* top) {
- CPDF_Page* pPage = GetPageFromFPDFPage(page);
+ CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
return pPage && GetBoundingBox(pPage, "MediaBox", left, bottom, right, top);
}
@@ -88,14 +84,14 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_GetCropBox(FPDF_PAGE page,
float* bottom,
float* right,
float* top) {
- CPDF_Page* pPage = GetPageFromFPDFPage(page);
+ CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
return pPage && GetBoundingBox(pPage, "CropBox", left, bottom, right, top);
}
DLLEXPORT FPDF_BOOL STDCALL FPDFPage_TransFormWithClip(FPDF_PAGE page,
FS_MATRIX* matrix,
FS_RECTF* clipRect) {
- CPDF_Page* pPage = GetPageFromFPDFPage(page);
+ CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!pPage)
return FALSE;
@@ -268,7 +264,7 @@ void OutputPath(CFX_ByteTextBuf& buf, CPDF_Path path) {
DLLEXPORT void STDCALL FPDFPage_InsertClipPath(FPDF_PAGE page,
FPDF_CLIPPATH clipPath) {
- CPDF_Page* pPage = GetPageFromFPDFPage(page);
+ CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!pPage)
return;