Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(990)

Unified Diff: fpdfsdk/src/fpdf_transformpage.cpp

Issue 1406543004: Introduce CPDFPageFromFPDFPage() (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/src/fpdf_progressive.cpp ('k') | fpdfsdk/src/fpdfdoc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdf_transformpage.cpp
diff --git a/fpdfsdk/src/fpdf_transformpage.cpp b/fpdfsdk/src/fpdf_transformpage.cpp
index 4a892f13200e4dbaa18d3128d1de51647816037c..cdc646ae7e140a9559b1d721fb6dbe9f733db187 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;
« no previous file with comments | « fpdfsdk/src/fpdf_progressive.cpp ('k') | fpdfsdk/src/fpdfdoc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698