diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-07-27 11:55:29 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-07-27 11:55:29 -0700 |
commit | ff46aaf499edcf153ee2f57c7016587aa96dcfa0 (patch) | |
tree | 0a0d92713af476897899b126d180cc6294433d10 /fpdfsdk/src/fpdfdoc.cpp | |
parent | aafeff816e22c1333c17d8a0eb4fe8927c28142d (diff) | |
download | pdfium-ff46aaf499edcf153ee2f57c7016587aa96dcfa0.tar.xz |
FX Bool considered harmful, part 3
Try to reland this patch after fixing underlying issues that
caused it to be reverted.
fx_system.h is the only manual edit.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1258093002 .
Diffstat (limited to 'fpdfsdk/src/fpdfdoc.cpp')
-rw-r--r-- | fpdfsdk/src/fpdfdoc.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/fpdfsdk/src/fpdfdoc.cpp b/fpdfsdk/src/fpdfdoc.cpp index f75197bdbf..e2640697bb 100644 --- a/fpdfsdk/src/fpdfdoc.cpp +++ b/fpdfsdk/src/fpdfdoc.cpp @@ -208,13 +208,13 @@ DLLEXPORT FPDF_ACTION STDCALL FPDFLink_GetAction(FPDF_LINK pDict) DLLEXPORT FPDF_BOOL STDCALL FPDFLink_Enumerate(FPDF_PAGE page, int* startPos, FPDF_LINK* linkAnnot) { if(!page || !startPos || !linkAnnot) - return FALSE; + return false; CPDF_Page* pPage = (CPDF_Page*)page; if(!pPage->m_pFormDict) - return FALSE; + return false; CPDF_Array* pAnnots = pPage->m_pFormDict->GetArray("Annots"); if(!pAnnots) - return FALSE; + return false; for (int i = *startPos; i < (int)pAnnots->GetCount(); i++) { CPDF_Dictionary* pDict = (CPDF_Dictionary*)pAnnots->GetElementValue(i); if (!pDict || pDict->GetType() != PDFOBJ_DICTIONARY) @@ -222,23 +222,23 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFLink_Enumerate(FPDF_PAGE page, int* startPos, FP if(pDict->GetString(FX_BSTRC("Subtype")).Equal(FX_BSTRC("Link"))) { *startPos = i + 1; *linkAnnot = (FPDF_LINK)pDict; - return TRUE; + return true; } } - return FALSE; + return false; } DLLEXPORT FPDF_BOOL STDCALL FPDFLink_GetAnnotRect(FPDF_LINK linkAnnot, FS_RECTF* rect) { if(!linkAnnot || !rect) - return FALSE; + return false; CPDF_Dictionary* pAnnotDict = (CPDF_Dictionary*)linkAnnot; CPDF_Rect rt = pAnnotDict->GetRect(FX_BSTRC("Rect")); rect->left = rt.left; rect->bottom = rt.bottom; rect->right = rt.right; rect->top = rt.top; - return TRUE; + return true; } DLLEXPORT int STDCALL FPDFLink_CountQuadPoints(FPDF_LINK linkAnnot) @@ -255,12 +255,12 @@ DLLEXPORT int STDCALL FPDFLink_CountQuadPoints(FPDF_LINK linkAnnot) DLLEXPORT FPDF_BOOL STDCALL FPDFLink_GetQuadPoints(FPDF_LINK linkAnnot, int quadIndex, FS_QUADPOINTSF* quadPoints) { if(!linkAnnot || !quadPoints) - return FALSE; + return false; CPDF_Dictionary* pAnnotDict = (CPDF_Dictionary*)linkAnnot; CPDF_Array* pArray = pAnnotDict->GetArray(FX_BSTRC("QuadPoints")); if (pArray) { if (quadIndex < 0 || quadIndex >= (int)pArray->GetCount()/8 || ((quadIndex*8+7) >= (int)pArray->GetCount())) - return FALSE; + return false; quadPoints->x1 = pArray->GetNumber(quadIndex*8); quadPoints->y1 = pArray->GetNumber(quadIndex*8+1); quadPoints->x2 = pArray->GetNumber(quadIndex*8+2); @@ -269,9 +269,9 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFLink_GetQuadPoints(FPDF_LINK linkAnnot, int quad quadPoints->y3 = pArray->GetNumber(quadIndex*8+5); quadPoints->x4 = pArray->GetNumber(quadIndex*8+6); quadPoints->y4 = pArray->GetNumber(quadIndex*8+7); - return TRUE; + return true; } - return FALSE; + return false; } DLLEXPORT unsigned long STDCALL FPDF_GetMetaText(FPDF_DOCUMENT doc, FPDF_BYTESTRING tag, |