diff options
Diffstat (limited to 'core/src/fpdfapi')
-rw-r--r-- | core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp | 4 | ||||
-rw-r--r-- | core/src/fpdfapi/fpdf_font/fpdf_font.cpp | 2 | ||||
-rw-r--r-- | core/src/fpdfapi/fpdf_page/fpdf_page.cpp | 56 | ||||
-rw-r--r-- | core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp | 2 | ||||
-rw-r--r-- | core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp | 29 | ||||
-rw-r--r-- | core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp | 4 | ||||
-rw-r--r-- | core/src/fpdfapi/fpdf_page/pageint.h | 8 | ||||
-rw-r--r-- | core/src/fpdfapi/fpdf_render/fpdf_render.cpp | 42 | ||||
-rw-r--r-- | core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp | 6 | ||||
-rw-r--r-- | core/src/fpdfapi/fpdf_render/render_int.h | 2 |
10 files changed, 74 insertions, 81 deletions
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp index 555de449fa..82ab370564 100644 --- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp +++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp @@ -20,9 +20,9 @@ CPDF_PageContentGenerator::CPDF_PageContentGenerator(CPDF_Page* pPage) if (m_pPage) { m_pDocument = m_pPage->m_pDocument; } - FX_POSITION pos = pPage->GetFirstObjectPosition(); + FX_POSITION pos = pPage->GetPageObjectList()->GetHeadPosition(); while (pos) { - InsertPageObject(pPage->GetNextObject(pos)); + InsertPageObject(pPage->GetPageObjectList()->GetNextObject(pos)); } } CPDF_PageContentGenerator::~CPDF_PageContentGenerator() {} diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp index e3d75076d7..ec86a60d6f 100644 --- a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp +++ b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp @@ -1706,7 +1706,7 @@ CPDF_Type3Char* CPDF_Type3Font::LoadChar(FX_DWORD charcode, int level) { ASSERT(!pdfium::ContainsKey(m_CacheMap, charcode)); CPDF_Type3Char* pCachedChar = pNewChar.release(); m_CacheMap[charcode] = pCachedChar; - if (pCachedChar->m_pForm->CountObjects() == 0) { + if (pCachedChar->m_pForm->GetPageObjectList()->GetCount() == 0) { delete pCachedChar->m_pForm; pCachedChar->m_pForm = nullptr; } diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page.cpp index c4a26e9921..1a81e1b901 100644 --- a/core/src/fpdfapi/fpdf_page/fpdf_page.cpp +++ b/core/src/fpdfapi/fpdf_page/fpdf_page.cpp @@ -670,7 +670,7 @@ void CPDF_FormObject::CalcBoundingBox() { m_Right = form_rect.right; m_Top = form_rect.top; } -CPDF_PageObjectList::CPDF_PageObjectList() +CPDF_PageObjectHolder::CPDF_PageObjectHolder() : m_pFormDict(nullptr), m_pFormStream(nullptr), m_pDocument(nullptr), @@ -680,14 +680,15 @@ CPDF_PageObjectList::CPDF_PageObjectList() m_bBackgroundAlphaNeeded(FALSE), m_bHasImageMask(FALSE), m_ParseState(CONTENT_NOT_PARSED), - m_ObjectList(128) {} -CPDF_PageObjectList::~CPDF_PageObjectList() { - FX_POSITION pos = m_ObjectList.GetHeadPosition(); + m_PageObjectList(128) {} + +CPDF_PageObjectHolder::~CPDF_PageObjectHolder() { + FX_POSITION pos = m_PageObjectList.GetHeadPosition(); while (pos) { - delete (CPDF_PageObject*)m_ObjectList.GetNext(pos); + delete m_PageObjectList.GetNextObject(pos); } } -void CPDF_PageObjectList::ContinueParse(IFX_Pause* pPause) { +void CPDF_PageObjectHolder::ContinueParse(IFX_Pause* pPause) { if (!m_pParser) { return; } @@ -700,43 +701,30 @@ void CPDF_PageObjectList::ContinueParse(IFX_Pause* pPause) { FX_POSITION CPDF_PageObjectList::InsertObject(FX_POSITION posInsertAfter, CPDF_PageObject* pNewObject) { if (!posInsertAfter) { - return m_ObjectList.AddHead(pNewObject); - } - return m_ObjectList.InsertAfter(posInsertAfter, pNewObject); -} -int CPDF_PageObjectList::GetObjectIndex(CPDF_PageObject* pObj) const { - int index = 0; - FX_POSITION pos = m_ObjectList.GetHeadPosition(); - while (pos) { - CPDF_PageObject* pThisObj = (CPDF_PageObject*)m_ObjectList.GetNext(pos); - if (pThisObj == pObj) { - return index; - } - index++; + return AddHead(pNewObject); } - return -1; + return InsertAfter(posInsertAfter, pNewObject); } CPDF_PageObject* CPDF_PageObjectList::GetObjectByIndex(int index) const { - FX_POSITION pos = m_ObjectList.FindIndex(index); - return pos ? static_cast<CPDF_PageObject*>(m_ObjectList.GetAt(pos)) : nullptr; + FX_POSITION pos = FindIndex(index); + return pos ? GetObjectAt(pos) : nullptr; } -void CPDF_PageObjectList::Transform(const CFX_Matrix& matrix) { - FX_POSITION pos = m_ObjectList.GetHeadPosition(); +void CPDF_PageObjectHolder::Transform(const CFX_Matrix& matrix) { + FX_POSITION pos = m_PageObjectList.GetHeadPosition(); while (pos) { - CPDF_PageObject* pObj = (CPDF_PageObject*)m_ObjectList.GetNext(pos); - pObj->Transform(matrix); + m_PageObjectList.GetNextObject(pos)->Transform(matrix); } } -CFX_FloatRect CPDF_PageObjectList::CalcBoundingBox() const { - if (m_ObjectList.GetCount() == 0) { +CFX_FloatRect CPDF_PageObjectHolder::CalcBoundingBox() const { + if (m_PageObjectList.GetCount() == 0) { return CFX_FloatRect(0, 0, 0, 0); } FX_FLOAT left, right, top, bottom; left = bottom = 1000000 * 1.0f; right = top = -1000000 * 1.0f; - FX_POSITION pos = m_ObjectList.GetHeadPosition(); + FX_POSITION pos = m_PageObjectList.GetHeadPosition(); while (pos) { - CPDF_PageObject* pObj = (CPDF_PageObject*)m_ObjectList.GetNext(pos); + CPDF_PageObject* pObj = (CPDF_PageObject*)m_PageObjectList.GetNext(pos); if (left > pObj->m_Left) { left = pObj->m_Left; } @@ -752,7 +740,7 @@ CFX_FloatRect CPDF_PageObjectList::CalcBoundingBox() const { } return CFX_FloatRect(left, bottom, right, top); } -void CPDF_PageObjectList::LoadTransInfo() { +void CPDF_PageObjectHolder::LoadTransInfo() { if (!m_pFormDict) { return; } @@ -926,10 +914,10 @@ void CPDF_Form::ParseContent(CPDF_AllStates* pGraphicStates, CPDF_Form* CPDF_Form::Clone() const { CPDF_Form* pClone = new CPDF_Form(m_pDocument, m_pPageResources, m_pFormStream, m_pResources); - FX_POSITION pos = m_ObjectList.GetHeadPosition(); + FX_POSITION pos = m_PageObjectList.GetHeadPosition(); while (pos) { - CPDF_PageObject* pObj = (CPDF_PageObject*)m_ObjectList.GetNext(pos); - pClone->m_ObjectList.AddTail(pObj->Clone()); + CPDF_PageObject* pObj = (CPDF_PageObject*)m_PageObjectList.GetNext(pos); + pClone->m_PageObjectList.AddTail(pObj->Clone()); } return pClone; } diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp index 20345138b4..a003d2047f 100644 --- a/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp +++ b/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp @@ -520,7 +520,7 @@ void CPDF_AllStates::ProcessExtGS(CPDF_Dictionary* pGS, pGeneralState->SetBlendMode(mode); if (pGeneralState->m_BlendType > FXDIB_BLEND_MULTIPLY) { - pParser->GetObjectList()->SetBackgroundAlphaNeeded(TRUE); + pParser->GetPageObjectHolder()->SetBackgroundAlphaNeeded(TRUE); } break; } diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp index 7f242fdb0e..6e02cb11b4 100644 --- a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp +++ b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp @@ -114,7 +114,7 @@ CPDF_StreamContentParser::CPDF_StreamContentParser( CPDF_Dictionary* pPageResources, CPDF_Dictionary* pParentResources, CFX_Matrix* pmtContentToUser, - CPDF_PageObjectList* pObjList, + CPDF_PageObjectHolder* pObjHolder, CPDF_Dictionary* pResources, CPDF_Rect* pBBox, CPDF_ParseOptions* pOptions, @@ -124,7 +124,7 @@ CPDF_StreamContentParser::CPDF_StreamContentParser( m_pPageResources(pPageResources), m_pParentResources(pParentResources), m_pResources(pResources), - m_pObjectList(pObjList), + m_pObjectHolder(pObjHolder), m_Level(level), m_ParamStartPos(0), m_ParamCount(0), @@ -738,8 +738,8 @@ void CPDF_StreamContentParser::Handle_ExecuteXObject() { CPDF_ImageObject* pObj = AddImage(pXObject, NULL, FALSE); m_LastImageName = name; m_pLastImage = pObj->m_pImage; - if (!m_pObjectList->HasImageMask()) - m_pObjectList->SetHasImageMask(m_pLastImage->IsMask()); + if (!m_pObjectHolder->HasImageMask()) + m_pObjectHolder->SetHasImageMask(m_pLastImage->IsMask()); } else if (type == "Form") { AddForm(pXObject); } else { @@ -764,7 +764,7 @@ void CPDF_StreamContentParser::AddForm(CPDF_Stream* pStream) { form_bbox.Transform(&form_matrix); } CPDF_StreamContentParser parser(m_pDocument, m_pPageResources, m_pResources, - &m_mtContentToUser, m_pObjectList, + &m_mtContentToUser, m_pObjectHolder, pResources, &form_bbox, &m_Options, m_pCurStates.get(), m_Level + 1); parser.m_pCurStates->m_CTM = form_matrix; @@ -791,13 +791,13 @@ void CPDF_StreamContentParser::AddForm(CPDF_Stream* pStream) { status.m_ColorState = m_pCurStates->m_ColorState; status.m_TextState = m_pCurStates->m_TextState; pFormObj->m_pForm->ParseContent(&status, NULL, NULL, &m_Options, m_Level + 1); - if (!m_pObjectList->BackgroundAlphaNeeded() && + if (!m_pObjectHolder->BackgroundAlphaNeeded() && pFormObj->m_pForm->BackgroundAlphaNeeded()) { - m_pObjectList->SetBackgroundAlphaNeeded(TRUE); + m_pObjectHolder->SetBackgroundAlphaNeeded(TRUE); } pFormObj->CalcBoundingBox(); SetGraphicStates(pFormObj, TRUE, TRUE, TRUE); - m_pObjectList->AddTail(pFormObj); + m_pObjectHolder->GetPageObjectList()->AddTail(pFormObj); } CPDF_ImageObject* CPDF_StreamContentParser::AddImage(CPDF_Stream* pStream, @@ -822,7 +822,7 @@ CPDF_ImageObject* CPDF_StreamContentParser::AddImage(CPDF_Stream* pStream, SetGraphicStates(pImageObj, pImageObj->m_pImage->IsMask(), FALSE, FALSE); pImageObj->m_Matrix = ImageMatrix; pImageObj->CalcBoundingBox(); - m_pObjectList->AddTail(pImageObj); + m_pObjectHolder->GetPageObjectList()->AddTail(pImageObj); return pImageObj; } @@ -1211,7 +1211,7 @@ void CPDF_StreamContentParser::Handle_ShadeFill() { pObj->m_Right = bbox.right; pObj->m_Top = bbox.top; pObj->m_Bottom = bbox.bottom; - m_pObjectList->AddTail(pObj); + m_pObjectHolder->GetPageObjectList()->AddTail(pObj); } void CPDF_StreamContentParser::Handle_SetCharSpace() { @@ -1389,7 +1389,7 @@ void CPDF_StreamContentParser::AddTextObject(CFX_ByteString* pStrs, pCopy->Copy(pText); m_ClipTextList.Add(pCopy); } - m_pObjectList->AddTail(pText); + m_pObjectHolder->GetPageObjectList()->AddTail(pText); if (pKerning && pKerning[nsegs - 1] != 0) { if (!pFont->IsVertWriting()) { m_pCurStates->m_TextX -= @@ -1624,7 +1624,7 @@ void CPDF_StreamContentParser::AddPathObject(int FillType, FX_BOOL bStroke) { pPathObj->m_Matrix = matrix; SetGraphicStates(pPathObj, TRUE, FALSE, TRUE); pPathObj->CalcBoundingBox(); - m_pObjectList->AddTail(pPathObj); + m_pObjectHolder->GetPageObjectList()->AddTail(pPathObj); } if (PathClipType) { if (!matrix.IsIdentity()) { @@ -1641,12 +1641,13 @@ FX_DWORD CPDF_StreamContentParser::Parse(const uint8_t* pData, if (m_Level > _FPDF_MAX_FORM_LEVEL_) { return dwSize; } - FX_DWORD InitObjCount = m_pObjectList->CountObjects(); + FX_DWORD InitObjCount = m_pObjectHolder->GetPageObjectList()->GetCount(); CPDF_StreamParser syntax(pData, dwSize); CPDF_StreamParserAutoClearer auto_clearer(&m_pSyntax, &syntax); m_CompatCount = 0; while (1) { - FX_DWORD cost = m_pObjectList->CountObjects() - InitObjCount; + FX_DWORD cost = + m_pObjectHolder->GetPageObjectList()->GetCount() - InitObjCount; if (max_cost && cost >= max_cost) { break; } diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp index 022c170bf0..7fa3286e11 100644 --- a/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp +++ b/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp @@ -841,10 +841,10 @@ void CPDF_ContentParser::Continue(IFX_Pause* pPause) { m_pType3Char->m_BBox.top = FXSYS_round(m_pParser->GetType3Data()[5] * 1000); } - FX_POSITION pos = m_pObjects->GetFirstObjectPosition(); + FX_POSITION pos = m_pObjects->GetPageObjectList()->GetHeadPosition(); while (pos) { CPDF_PageObject* pObj = - (CPDF_PageObject*)m_pObjects->GetNextObject(pos); + m_pObjects->GetPageObjectList()->GetNextObject(pos); if (pObj->m_ClipPath.IsNull()) { continue; } diff --git a/core/src/fpdfapi/fpdf_page/pageint.h b/core/src/fpdfapi/fpdf_page/pageint.h index 9c8946b721..4df8d6aa9f 100644 --- a/core/src/fpdfapi/fpdf_page/pageint.h +++ b/core/src/fpdfapi/fpdf_page/pageint.h @@ -94,7 +94,7 @@ class CPDF_StreamContentParser { CPDF_Dictionary* pPageResources, CPDF_Dictionary* pParentResources, CFX_Matrix* pmtContentToUser, - CPDF_PageObjectList* pObjList, + CPDF_PageObjectHolder* pObjHolder, CPDF_Dictionary* pResources, CFX_FloatRect* pBBox, CPDF_ParseOptions* pOptions, @@ -102,7 +102,7 @@ class CPDF_StreamContentParser { int level); ~CPDF_StreamContentParser(); - CPDF_PageObjectList* GetObjectList() const { return m_pObjectList; } + CPDF_PageObjectHolder* GetPageObjectHolder() const { return m_pObjectHolder; } CPDF_AllStates* GetCurStates() const { return m_pCurStates.get(); } FX_BOOL IsColored() const { return m_bColored; } const FX_FLOAT* GetType3Data() const { return m_Type3Data; } @@ -236,7 +236,7 @@ class CPDF_StreamContentParser { CPDF_Dictionary* m_pPageResources; CPDF_Dictionary* m_pParentResources; CPDF_Dictionary* m_pResources; - CPDF_PageObjectList* m_pObjectList; + CPDF_PageObjectHolder* m_pObjectHolder; int m_Level; CFX_Matrix m_mtContentToUser; CFX_FloatRect m_BBox; @@ -298,7 +298,7 @@ class CPDF_ContentParser { ParseStatus m_Status; InternalStage m_InternalStage; - CPDF_PageObjectList* m_pObjects; + CPDF_PageObjectHolder* m_pObjects; FX_BOOL m_bForm; CPDF_ParseOptions m_Options; CPDF_Type3Char* m_pType3Char; diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render.cpp index 0ea941a1e6..0023ee92de 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render.cpp @@ -237,17 +237,19 @@ FX_BOOL CPDF_RenderStatus::Initialize(CPDF_RenderContext* pContext, m_Transparency = transparency; return TRUE; } -void CPDF_RenderStatus::RenderObjectList(const CPDF_PageObjectList* pObjs, - const CFX_Matrix* pObj2Device) { +void CPDF_RenderStatus::RenderObjectList( + const CPDF_PageObjectHolder* pObjectHolder, + const CFX_Matrix* pObj2Device) { CFX_FloatRect clip_rect = m_pDevice->GetClipBox(); CFX_Matrix device2object; device2object.SetReverse(*pObj2Device); device2object.TransformRect(clip_rect); int index = 0; - FX_POSITION pos = pObjs->GetFirstObjectPosition(); + FX_POSITION pos = pObjectHolder->GetPageObjectList()->GetHeadPosition(); while (pos) { index++; - CPDF_PageObject* pCurObj = pObjs->GetNextObject(pos); + CPDF_PageObject* pCurObj = + pObjectHolder->GetPageObjectList()->GetNextObject(pos); if (pCurObj == m_pStopObj) { m_bStopped = TRUE; return; @@ -971,10 +973,10 @@ CPDF_RenderContext::CPDF_RenderContext(CPDF_Document* pDoc, CPDF_RenderContext::~CPDF_RenderContext() {} -void CPDF_RenderContext::AppendLayer(CPDF_PageObjectList* pObjs, +void CPDF_RenderContext::AppendLayer(CPDF_PageObjectHolder* pObjectHolder, const CFX_Matrix* pObject2Device) { Layer* pLayer = m_Layers.AddSpace(); - pLayer->m_pObjectList = pObjs; + pLayer->m_pObjectHolder = pObjectHolder; if (pObject2Device) { pLayer->m_Matrix = *pObject2Device; } else { @@ -999,9 +1001,9 @@ void CPDF_RenderContext::Render(CFX_RenderDevice* pDevice, FinalMatrix.Concat(*pLastMatrix); CPDF_RenderStatus status; status.Initialize(this, pDevice, pLastMatrix, pStopObj, NULL, NULL, - pOptions, pLayer->m_pObjectList->m_Transparency, FALSE, - NULL); - status.RenderObjectList(pLayer->m_pObjectList, &FinalMatrix); + pOptions, pLayer->m_pObjectHolder->m_Transparency, + FALSE, NULL); + status.RenderObjectList(pLayer->m_pObjectHolder, &FinalMatrix); if (status.m_Options.m_Flags & RENDER_LIMITEDIMAGECACHE) { m_pPageCache->CacheOptimization(status.m_Options.m_dwLimitCacheSize); } @@ -1012,8 +1014,8 @@ void CPDF_RenderContext::Render(CFX_RenderDevice* pDevice, } else { CPDF_RenderStatus status; status.Initialize(this, pDevice, NULL, pStopObj, NULL, NULL, pOptions, - pLayer->m_pObjectList->m_Transparency, FALSE, NULL); - status.RenderObjectList(pLayer->m_pObjectList, &pLayer->m_Matrix); + pLayer->m_pObjectHolder->m_Transparency, FALSE, NULL); + status.RenderObjectList(pLayer->m_pObjectHolder, &pLayer->m_Matrix); if (status.m_Options.m_Flags & RENDER_LIMITEDIMAGECACHE) { m_pPageCache->CacheOptimization(status.m_Options.m_dwLimitCacheSize); } @@ -1064,7 +1066,7 @@ void CPDF_ProgressiveRenderer::Continue(IFX_Pause* pPause) { m_pRenderStatus.reset(new CPDF_RenderStatus()); m_pRenderStatus->Initialize( m_pContext, m_pDevice, NULL, NULL, NULL, NULL, m_pOptions, - m_pCurrentLayer->m_pObjectList->m_Transparency, FALSE, NULL); + m_pCurrentLayer->m_pObjectHolder->m_Transparency, FALSE, NULL); m_pDevice->SaveState(); m_ClipRect = m_pDevice->GetClipBox(); CFX_Matrix device2object; @@ -1074,14 +1076,16 @@ void CPDF_ProgressiveRenderer::Continue(IFX_Pause* pPause) { FX_POSITION pos; if (m_LastObjectRendered) { pos = m_LastObjectRendered; - m_pCurrentLayer->m_pObjectList->GetNextObject(pos); + m_pCurrentLayer->m_pObjectHolder->GetPageObjectList()->GetNextObject(pos); } else { - pos = m_pCurrentLayer->m_pObjectList->GetFirstObjectPosition(); + pos = m_pCurrentLayer->m_pObjectHolder->GetPageObjectList() + ->GetHeadPosition(); } int nObjsToGo = kStepLimit; while (pos) { CPDF_PageObject* pCurObj = - m_pCurrentLayer->m_pObjectList->GetObjectAt(pos); + m_pCurrentLayer->m_pObjectHolder->GetPageObjectList()->GetObjectAt( + pos); if (pCurObj && pCurObj->m_Left <= m_ClipRect.right && pCurObj->m_Right >= m_ClipRect.left && pCurObj->m_Bottom <= m_ClipRect.top && @@ -1108,9 +1112,9 @@ void CPDF_ProgressiveRenderer::Continue(IFX_Pause* pPause) { return; nObjsToGo = kStepLimit; } - m_pCurrentLayer->m_pObjectList->GetNextObject(pos); + m_pCurrentLayer->m_pObjectHolder->GetPageObjectList()->GetNextObject(pos); } - if (m_pCurrentLayer->m_pObjectList->IsParsed()) { + if (m_pCurrentLayer->m_pObjectHolder->IsParsed()) { m_pRenderStatus.reset(); m_pDevice->RestoreState(); m_pCurrentLayer = nullptr; @@ -1120,8 +1124,8 @@ void CPDF_ProgressiveRenderer::Continue(IFX_Pause* pPause) { return; } } else { - m_pCurrentLayer->m_pObjectList->ContinueParse(pPause); - if (!m_pCurrentLayer->m_pObjectList->IsParsed()) + m_pCurrentLayer->m_pObjectHolder->ContinueParse(pPause); + if (!m_pCurrentLayer->m_pObjectHolder->IsParsed()) return; } } diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp index d0427f68fa..7e2c0bd0fd 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp @@ -316,9 +316,9 @@ FX_BOOL CPDF_Type3Char::LoadBitmap(CPDF_RenderContext* pContext) { if (m_pBitmap || !m_pForm) { return TRUE; } - if (m_pForm->CountObjects() == 1 && !m_bColored) { - CPDF_PageObject* pPageObj = - m_pForm->GetObjectAt(m_pForm->GetFirstObjectPosition()); + if (m_pForm->GetPageObjectList()->GetCount() == 1 && !m_bColored) { + CPDF_PageObject* pPageObj = m_pForm->GetPageObjectList()->GetObjectAt( + m_pForm->GetPageObjectList()->GetHeadPosition()); if (pPageObj->m_Type == CPDF_PageObject::IMAGE) { CPDF_ImageObject* pImage = (CPDF_ImageObject*)pPageObj; m_ImageMatrix = pImage->m_Matrix; diff --git a/core/src/fpdfapi/fpdf_render/render_int.h b/core/src/fpdfapi/fpdf_render/render_int.h index 165e6800fb..9a262ea6fc 100644 --- a/core/src/fpdfapi/fpdf_render/render_int.h +++ b/core/src/fpdfapi/fpdf_render/render_int.h @@ -124,7 +124,7 @@ class CPDF_RenderStatus { FX_ARGB fill_color = 0, FX_DWORD GroupFamily = 0, FX_BOOL bLoadMask = FALSE); - void RenderObjectList(const CPDF_PageObjectList* pObjs, + void RenderObjectList(const CPDF_PageObjectHolder* pObjectHolder, const CFX_Matrix* pObj2Device); void RenderSingleObject(const CPDF_PageObject* pObj, const CFX_Matrix* pObj2Device); |