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/fpdfeditpage.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/fpdfeditpage.cpp')
-rw-r--r-- | fpdfsdk/src/fpdfeditpage.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/fpdfsdk/src/fpdfeditpage.cpp b/fpdfsdk/src/fpdfeditpage.cpp index 12c2cce1e2..8236cb206d 100644 --- a/fpdfsdk/src/fpdfeditpage.cpp +++ b/fpdfsdk/src/fpdfeditpage.cpp @@ -215,7 +215,7 @@ DLLEXPORT FPDF_PAGEOBJECT STDCALL FPDFPage_GetObject(FPDF_PAGE page, int index) DLLEXPORT FPDF_BOOL STDCALL FPDFPage_HasTransparency(FPDF_PAGE page) { - if(!page) return FALSE; + if(!page) return false; CPDF_Page* pPage = (CPDF_Page*)page; return pPage->BackgroundAlphaNeeded(); @@ -223,34 +223,34 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_HasTransparency(FPDF_PAGE page) DLLEXPORT FPDF_BOOL STDCALL FPDFPageObj_HasTransparency(FPDF_PAGEOBJECT pageObject) { - if(!pageObject) return FALSE; + if(!pageObject) return false; CPDF_PageObject* pPageObj = (CPDF_PageObject*)pageObject; const CPDF_GeneralStateData* pGeneralState = pPageObj->m_GeneralState; int blend_type = pGeneralState ? pGeneralState->m_BlendType : FXDIB_BLEND_NORMAL; - if (blend_type != FXDIB_BLEND_NORMAL) return TRUE; + if (blend_type != FXDIB_BLEND_NORMAL) return true; CPDF_Dictionary* pSMaskDict = pGeneralState ? (CPDF_Dictionary*)pGeneralState->m_pSoftMask : NULL; - if(pSMaskDict) return TRUE; + if(pSMaskDict) return true; if(pGeneralState && pGeneralState->m_FillAlpha != 1.0f) - return TRUE; + return true; if(pPageObj->m_Type == PDFPAGE_PATH) { if(pGeneralState && pGeneralState->m_StrokeAlpha != 1.0f) - return TRUE; + return true; } if(pPageObj->m_Type == PDFPAGE_FORM) { CPDF_FormObject* pFormObj = (CPDF_FormObject*)pPageObj; if(pFormObj->m_pForm && (pFormObj->m_pForm->m_Transparency & PDFTRANS_ISOLATED)) - return TRUE; + return true; if(pFormObj->m_pForm && (!(pFormObj->m_pForm->m_Transparency & PDFTRANS_ISOLATED) && (pFormObj->m_pForm->m_Transparency & PDFTRANS_GROUP))) - return TRUE; + return true; } - return FALSE; + return false; } DLLEXPORT FPDF_BOOL STDCALL FPDFPage_GenerateContent(FPDF_PAGE page) @@ -259,12 +259,12 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_GenerateContent(FPDF_PAGE page) if (!pPage || !pPage->m_pFormDict || !pPage->m_pFormDict->KeyExist("Type") || !pPage->m_pFormDict->GetElement("Type")->GetDirect() || pPage->m_pFormDict->GetElement("Type")->GetDirect()->GetString().Compare("Page")) { - return FALSE; + return false; } CPDF_PageContentGenerate CG(pPage); CG.GenerateContent(); - return TRUE; + return true; } DLLEXPORT void STDCALL FPDFPageObj_Transform(FPDF_PAGEOBJECT page_object, |