diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-12-09 16:39:40 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-12-09 16:39:40 -0800 |
commit | bd573f126f93acc2034be2df1c6f571670f76c35 (patch) | |
tree | beeea3b9370bb7490ed5933dadbef857cb8df23d /core/src/fpdfapi/fpdf_render | |
parent | e021e084717b8cc43f8a0667ad9d1a807dfe381c (diff) | |
download | pdfium-bd573f126f93acc2034be2df1c6f571670f76c35.tar.xz |
Merge to XFA: Get rid of most uses of CFX_PtrArray.
Original Review URL: https://codereview.chromium.org/1518593002 .
(cherry picked from commit 035359cd8ddb555fa33b6133db4fd405e4660712)
R=thestig@chromium.org
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1513103002 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_render')
-rw-r--r-- | core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp | 6 | ||||
-rw-r--r-- | core/src/fpdfapi/fpdf_render/render_int.h | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp index a714d38615..8cfa8dc4fb 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp @@ -358,10 +358,10 @@ FX_BOOL CPDF_RenderStatus::ProcessType3Text( const CPDF_TextObject* textobj, const CFX_AffineMatrix* pObj2Device) { CPDF_Type3Font* pType3Font = textobj->m_TextState.GetFont()->GetType3Font(); - for (int j = 0; j < m_Type3FontCache.GetSize(); j++) - if ((CPDF_Type3Font*)m_Type3FontCache.GetAt(j) == pType3Font) { + for (int j = 0; j < m_Type3FontCache.GetSize(); j++) { + if (m_Type3FontCache.GetAt(j) == pType3Font) return TRUE; - } + } CFX_Matrix dCTM = m_pDevice->GetCTM(); FX_FLOAT sa = FXSYS_fabs(dCTM.a); FX_FLOAT sd = FXSYS_fabs(dCTM.d); diff --git a/core/src/fpdfapi/fpdf_render/render_int.h b/core/src/fpdfapi/fpdf_render/render_int.h index dbc9f1102b..d764c9a5ff 100644 --- a/core/src/fpdfapi/fpdf_render/render_int.h +++ b/core/src/fpdfapi/fpdf_render/render_int.h @@ -137,11 +137,12 @@ class CPDF_RenderStatus { FX_BOOL ContinueSingleObject(const CPDF_PageObject* pObj, const CFX_AffineMatrix* pObj2Device, IFX_Pause* pPause); + CPDF_RenderContext* GetContext() { return m_pContext; } + CPDF_RenderOptions m_Options; CPDF_Dictionary* m_pFormResource; CPDF_Dictionary* m_pPageResource; - CFX_PtrArray m_Type3FontCache; - CPDF_RenderContext* GetContext() { return m_pContext; } + CFX_ArrayTemplate<CPDF_Type3Font*> m_Type3FontCache; protected: friend class CPDF_ImageRenderer; |