diff options
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp | 33 | ||||
-rw-r--r-- | core/src/fpdfapi/fpdf_render/fpdf_render.cpp | 12 |
2 files changed, 3 insertions, 42 deletions
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp index fb43c64a1a..b11c7eeb44 100644 --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp @@ -297,39 +297,6 @@ int CPDF_Document::_GetPageCount() const } return _CountPages(pPages, 0); } -static FX_BOOL _EnumPages(CPDF_Dictionary* pPages, IPDF_EnumPageHandler* pHandler) -{ - CPDF_Array* pKidList = pPages->GetArray(FX_BSTRC("Kids")); - if (pKidList == NULL) { - return pHandler->EnumPage(pPages); - } - for (FX_DWORD i = 0; i < pKidList->GetCount(); i ++) { - CPDF_Dictionary* pKid = pKidList->GetDict(i); - if (pKid == NULL) { - continue; - } - if (!pKid->KeyExist(FX_BSTRC("Kids"))) { - if (!pHandler->EnumPage(pKid)) { - return FALSE; - } - } else { - return _EnumPages(pKid, pHandler); - } - } - return TRUE; -} -void CPDF_Document::EnumPages(IPDF_EnumPageHandler* pHandler) -{ - CPDF_Dictionary* pRoot = GetRoot(); - if (pRoot == NULL) { - return; - } - CPDF_Dictionary* pPages = pRoot->GetDict(FX_BSTRC("Pages")); - if (pPages == NULL) { - return; - } - _EnumPages(pPages, pHandler); -} FX_BOOL CPDF_Document::IsContentUsedElsewhere(FX_DWORD objnum, CPDF_Dictionary* pThisPageDict) { for (int i = 0; i < m_PageList.GetSize(); i ++) { diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render.cpp index f8c4a41186..a9212522b8 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render.cpp @@ -915,12 +915,9 @@ void CPDF_RenderContext::GetBackground(CFX_DIBitmap* pBuffer, const CPDF_PageObj { CFX_FxgeDevice device; device.Attach(pBuffer); - if (m_pBackgroundDraw) { - m_pBackgroundDraw->OnDrawBackground(&device, pFinalMatrix); - } else { - FX_RECT rect(0, 0, device.GetWidth(), device.GetHeight()); - device.FillRect(&rect, 0xffffffff); - } + + FX_RECT rect(0, 0, device.GetWidth(), device.GetHeight()); + device.FillRect(&rect, 0xffffffff); Render(&device, pObj, pOptions, pFinalMatrix); } CPDF_GraphicStates* CPDF_RenderStatus::CloneObjStates(const CPDF_GraphicStates* pSrcStates, FX_BOOL bStroke) @@ -946,7 +943,6 @@ CPDF_RenderContext::CPDF_RenderContext() void CPDF_RenderContext::Create(CPDF_Document* pDoc, CPDF_PageRenderCache* pPageCache, CPDF_Dictionary* pPageResources, FX_BOOL bFirstLayer) { - m_pBackgroundDraw = NULL; m_pDocument = pDoc; m_pPageResources = pPageResources; m_pPageCache = pPageCache; @@ -954,7 +950,6 @@ void CPDF_RenderContext::Create(CPDF_Document* pDoc, CPDF_PageRenderCache* pPage } void CPDF_RenderContext::Create(CPDF_Page* pPage, FX_BOOL bFirstLayer) { - m_pBackgroundDraw = NULL; m_pDocument = pPage->m_pDocument; m_pPageResources = pPage->m_pPageResources; m_pPageCache = pPage->GetRenderCache(); @@ -968,7 +963,6 @@ void CPDF_RenderContext::Clear() m_pDocument = NULL; m_pPageResources = NULL; m_pPageCache = NULL; - m_pBackgroundDraw = NULL; m_bFirstLayer = TRUE; m_ContentList.RemoveAll(); } |