diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-10-15 16:34:32 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-10-15 16:34:32 -0700 |
commit | 943ea142b6a7e6edc91fe3c307013129e6eb0ef3 (patch) | |
tree | 8de4aaa7bb8eb3d463246d2a2f400006e60bae99 /fpdfsdk/src/fpdf_transformpage.cpp | |
parent | b456ba7f62fa416f456ef78750c18fd2bdf837be (diff) | |
download | pdfium-943ea142b6a7e6edc91fe3c307013129e6eb0ef3.tar.xz |
Introduce CPDFPageFromFPFDPage()
Abstracts the way that pages are passed to the embedder
between XFA and master.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1406543004 .
Diffstat (limited to 'fpdfsdk/src/fpdf_transformpage.cpp')
-rw-r--r-- | fpdfsdk/src/fpdf_transformpage.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/fpdfsdk/src/fpdf_transformpage.cpp b/fpdfsdk/src/fpdf_transformpage.cpp index 4a892f1320..cdc646ae7e 100644 --- a/fpdfsdk/src/fpdf_transformpage.cpp +++ b/fpdfsdk/src/fpdf_transformpage.cpp @@ -9,10 +9,6 @@ namespace { -CPDF_Page* GetPageFromFPDFPage(FPDF_PAGE page) { - return static_cast<CPDF_Page*>(page); -} - void SetBoundingBox(CPDF_Page* page, const CFX_ByteStringC& key, float left, @@ -53,7 +49,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; @@ -65,7 +61,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; @@ -77,7 +73,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); } @@ -86,14 +82,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; @@ -266,7 +262,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; |