Chromium Code Reviews| Index: fpdfsdk/src/fpdfeditpage.cpp |
| diff --git a/fpdfsdk/src/fpdfeditpage.cpp b/fpdfsdk/src/fpdfeditpage.cpp |
| index 6c140791313f58135f51ff01205bff7b3f1237bf..e3916dc935e1b8649cd4508198231744e5423f71 100644 |
| --- a/fpdfsdk/src/fpdfeditpage.cpp |
| +++ b/fpdfsdk/src/fpdfeditpage.cpp |
| @@ -140,7 +140,7 @@ DLLEXPORT void STDCALL FPDFPage_InsertObject(FPDF_PAGE page, |
| pPage->GetPageObjectList()->push_back( |
| std::unique_ptr<CPDF_PageObject>(pPageObj)); |
| - switch (pPageObj->m_Type) { |
| + switch (pPageObj->GetType()) { |
| case FPDF_PAGEOBJ_PATH: { |
| CPDF_PathObject* pPathObj = (CPDF_PathObject*)pPageObj; |
|
Lei Zhang
2016/02/19 04:22:31
More casts.
Wei Li
2016/02/19 19:32:19
Done.
|
| pPathObj->CalcBoundingBox(); |
| @@ -216,13 +216,13 @@ FPDFPageObj_HasTransparency(FPDF_PAGEOBJECT pageObject) { |
| if (pGeneralState && pGeneralState->m_FillAlpha != 1.0f) |
| return TRUE; |
| - if (pPageObj->m_Type == CPDF_PageObject::PATH) { |
| + if (pPageObj->IsPath()) { |
| if (pGeneralState && pGeneralState->m_StrokeAlpha != 1.0f) |
| return TRUE; |
| } |
| - if (pPageObj->m_Type == CPDF_PageObject::FORM) { |
| - CPDF_FormObject* pFormObj = (CPDF_FormObject*)pPageObj; |
| + if (pPageObj->IsForm()) { |
| + CPDF_FormObject* pFormObj = pPageObj->AsForm(); |
| if (pFormObj->m_pForm && |
| (pFormObj->m_pForm->m_Transparency & PDFTRANS_ISOLATED)) |
| return TRUE; |