Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(433)

Side by Side Diff: core/src/fpdfapi/fpdf_render/fpdf_render.cpp

Issue 1709393002: Remove PageObject's m_Type and add As<Type> functions (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "core/src/fpdfapi/fpdf_render/render_int.h" 7 #include "core/src/fpdfapi/fpdf_render/render_int.h"
8 8
9 #include "core/include/fpdfapi/fpdf_module.h" 9 #include "core/include/fpdfapi/fpdf_module.h"
10 #include "core/include/fpdfapi/fpdf_render.h" 10 #include "core/include/fpdfapi/fpdf_render.h"
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 m_pCurObj = pObj; 299 m_pCurObj = pObj;
300 if (m_Options.m_pOCContext && pObj->m_ContentMark.NotNull() && 300 if (m_Options.m_pOCContext && pObj->m_ContentMark.NotNull() &&
301 !m_Options.m_pOCContext->CheckObjectVisible(pObj)) { 301 !m_Options.m_pOCContext->CheckObjectVisible(pObj)) {
302 return FALSE; 302 return FALSE;
303 } 303 }
304 304
305 ProcessClipPath(pObj->m_ClipPath, pObj2Device); 305 ProcessClipPath(pObj->m_ClipPath, pObj2Device);
306 if (ProcessTransparency(pObj, pObj2Device)) 306 if (ProcessTransparency(pObj, pObj2Device))
307 return FALSE; 307 return FALSE;
308 308
309 if (pObj->m_Type == CPDF_PageObject::IMAGE) { 309 if (pObj->IsImage()) {
310 m_pObjectRenderer.reset(IPDF_ObjectRenderer::Create(pObj->m_Type)); 310 m_pObjectRenderer.reset(IPDF_ObjectRenderer::Create(pObj->GetType()));
311 if (!m_pObjectRenderer->Start(this, pObj, pObj2Device, FALSE)) { 311 if (!m_pObjectRenderer->Start(this, pObj, pObj2Device, FALSE)) {
312 if (!m_pObjectRenderer->m_Result) 312 if (!m_pObjectRenderer->m_Result)
313 DrawObjWithBackground(pObj, pObj2Device); 313 DrawObjWithBackground(pObj, pObj2Device);
314 m_pObjectRenderer.reset(); 314 m_pObjectRenderer.reset();
315 return FALSE; 315 return FALSE;
316 } 316 }
317 return ContinueSingleObject(pObj, pObj2Device, pPause); 317 return ContinueSingleObject(pObj, pObj2Device, pPause);
318 } 318 }
319 319
320 ProcessObjectNoClip(pObj, pObj2Device); 320 ProcessObjectNoClip(pObj, pObj2Device);
321 return FALSE; 321 return FALSE;
322 } 322 }
323 323
324 IPDF_ObjectRenderer* IPDF_ObjectRenderer::Create(int type) { 324 IPDF_ObjectRenderer* IPDF_ObjectRenderer::Create(CPDF_PageObject::Type type) {
325 if (type != CPDF_PageObject::IMAGE) { 325 if (type != CPDF_PageObject::IMAGE) {
Lei Zhang 2016/02/19 04:22:31 Maybe just remove the type parameter and this chec
Wei Li 2016/02/19 19:32:19 I removed it for now. Looks like IPDF_ObjectRender
326 return NULL; 326 return NULL;
327 } 327 }
328 return new CPDF_ImageRenderer; 328 return new CPDF_ImageRenderer;
329 } 329 }
330 FX_BOOL CPDF_RenderStatus::GetObjectClippedRect(const CPDF_PageObject* pObj, 330 FX_BOOL CPDF_RenderStatus::GetObjectClippedRect(const CPDF_PageObject* pObj,
331 const CFX_Matrix* pObj2Device, 331 const CFX_Matrix* pObj2Device,
332 FX_BOOL bLogical, 332 FX_BOOL bLogical,
333 FX_RECT& rect) const { 333 FX_RECT& rect) const {
334 rect = pObj->GetBBox(pObj2Device); 334 rect = pObj->GetBBox(pObj2Device);
335 FX_RECT rtClip = m_pDevice->GetClipBox(); 335 FX_RECT rtClip = m_pDevice->GetClipBox();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 pBitmap->DitherFS(pal, 8, &rect); 367 pBitmap->DitherFS(pal, 8, &rect);
368 } else if (m_DitherBits == 4) { 368 } else if (m_DitherBits == 4) {
369 static FX_ARGB pal[16] = {0, 17, 34, 51, 68, 85, 102, 119, 369 static FX_ARGB pal[16] = {0, 17, 34, 51, 68, 85, 102, 119,
370 136, 153, 170, 187, 204, 221, 238, 255}; 370 136, 153, 170, 187, 204, 221, 238, 255};
371 pBitmap->DitherFS(pal, 16, &rect); 371 pBitmap->DitherFS(pal, 16, &rect);
372 } 372 }
373 } 373 }
374 void CPDF_RenderStatus::ProcessObjectNoClip(const CPDF_PageObject* pObj, 374 void CPDF_RenderStatus::ProcessObjectNoClip(const CPDF_PageObject* pObj,
375 const CFX_Matrix* pObj2Device) { 375 const CFX_Matrix* pObj2Device) {
376 FX_BOOL bRet = FALSE; 376 FX_BOOL bRet = FALSE;
377 switch (pObj->m_Type) { 377 switch (pObj->GetType()) {
378 case CPDF_PageObject::TEXT: 378 case CPDF_PageObject::TEXT:
379 bRet = ProcessText((CPDF_TextObject*)pObj, pObj2Device, NULL); 379 bRet = ProcessText((CPDF_TextObject*)pObj, pObj2Device, NULL);
Lei Zhang 2016/02/19 04:22:31 More casts to get rid of.
Wei Li 2016/02/19 19:32:19 Thanks for spotting these. Done.
380 break; 380 break;
381 case CPDF_PageObject::PATH: 381 case CPDF_PageObject::PATH:
382 bRet = ProcessPath((CPDF_PathObject*)pObj, pObj2Device); 382 bRet = ProcessPath((CPDF_PathObject*)pObj, pObj2Device);
383 break; 383 break;
384 case CPDF_PageObject::IMAGE: 384 case CPDF_PageObject::IMAGE:
385 bRet = ProcessImage((CPDF_ImageObject*)pObj, pObj2Device); 385 bRet = ProcessImage((CPDF_ImageObject*)pObj, pObj2Device);
386 break; 386 break;
387 case CPDF_PageObject::SHADING: 387 case CPDF_PageObject::SHADING:
388 bRet = ProcessShading((CPDF_ShadingObject*)pObj, pObj2Device); 388 bRet = ProcessShading((CPDF_ShadingObject*)pObj, pObj2Device);
389 break; 389 break;
390 case CPDF_PageObject::FORM: 390 case CPDF_PageObject::FORM:
391 bRet = ProcessForm((CPDF_FormObject*)pObj, pObj2Device); 391 bRet = ProcessForm((CPDF_FormObject*)pObj, pObj2Device);
392 break; 392 break;
393 } 393 }
394 if (!bRet) { 394 if (!bRet) {
395 DrawObjWithBackground(pObj, pObj2Device); 395 DrawObjWithBackground(pObj, pObj2Device);
396 } 396 }
397 } 397 }
398 FX_BOOL CPDF_RenderStatus::DrawObjWithBlend(const CPDF_PageObject* pObj, 398 FX_BOOL CPDF_RenderStatus::DrawObjWithBlend(const CPDF_PageObject* pObj,
399 const CFX_Matrix* pObj2Device) { 399 const CFX_Matrix* pObj2Device) {
400 FX_BOOL bRet = FALSE; 400 FX_BOOL bRet = FALSE;
401 switch (pObj->m_Type) { 401 switch (pObj->GetType()) {
402 case CPDF_PageObject::PATH: 402 case CPDF_PageObject::PATH:
403 bRet = ProcessPath((CPDF_PathObject*)pObj, pObj2Device); 403 bRet = ProcessPath((CPDF_PathObject*)pObj, pObj2Device);
404 break; 404 break;
405 case CPDF_PageObject::IMAGE: 405 case CPDF_PageObject::IMAGE:
406 bRet = ProcessImage((CPDF_ImageObject*)pObj, pObj2Device); 406 bRet = ProcessImage((CPDF_ImageObject*)pObj, pObj2Device);
407 break; 407 break;
408 case CPDF_PageObject::FORM: 408 case CPDF_PageObject::FORM:
409 bRet = ProcessForm((CPDF_FormObject*)pObj, pObj2Device); 409 bRet = ProcessForm((CPDF_FormObject*)pObj, pObj2Device);
410 break; 410 break;
411 default: 411 default:
412 break; 412 break;
413 } 413 }
414 return bRet; 414 return bRet;
415 } 415 }
416 void CPDF_RenderStatus::GetScaledMatrix(CFX_Matrix& matrix) const { 416 void CPDF_RenderStatus::GetScaledMatrix(CFX_Matrix& matrix) const {
417 CFX_Matrix dCTM = m_pDevice->GetCTM(); 417 CFX_Matrix dCTM = m_pDevice->GetCTM();
418 matrix.a *= FXSYS_fabs(dCTM.a); 418 matrix.a *= FXSYS_fabs(dCTM.a);
419 matrix.d *= FXSYS_fabs(dCTM.d); 419 matrix.d *= FXSYS_fabs(dCTM.d);
420 } 420 }
421 void CPDF_RenderStatus::DrawObjWithBackground(const CPDF_PageObject* pObj, 421 void CPDF_RenderStatus::DrawObjWithBackground(const CPDF_PageObject* pObj,
422 const CFX_Matrix* pObj2Device) { 422 const CFX_Matrix* pObj2Device) {
423 FX_RECT rect; 423 FX_RECT rect;
424 if (GetObjectClippedRect(pObj, pObj2Device, FALSE, rect)) { 424 if (GetObjectClippedRect(pObj, pObj2Device, FALSE, rect)) {
425 return; 425 return;
426 } 426 }
427 int res = 300; 427 int res = 300;
428 if (pObj->m_Type == CPDF_PageObject::IMAGE && 428 if (pObj->IsImage() &&
429 m_pDevice->GetDeviceCaps(FXDC_DEVICE_CLASS) == FXDC_PRINTER) { 429 m_pDevice->GetDeviceCaps(FXDC_DEVICE_CLASS) == FXDC_PRINTER) {
430 res = 0; 430 res = 0;
431 } 431 }
432 CPDF_ScaledRenderBuffer buffer; 432 CPDF_ScaledRenderBuffer buffer;
433 if (!buffer.Initialize(m_pContext, m_pDevice, rect, pObj, &m_Options, res)) { 433 if (!buffer.Initialize(m_pContext, m_pDevice, rect, pObj, &m_Options, res)) {
434 return; 434 return;
435 } 435 }
436 CFX_Matrix matrix = *pObj2Device; 436 CFX_Matrix matrix = *pObj2Device;
437 matrix.Concat(*buffer.GetMatrix()); 437 matrix.Concat(*buffer.GetMatrix());
438 GetScaledMatrix(matrix); 438 GetScaledMatrix(matrix);
439 CPDF_Dictionary* pFormResource = NULL; 439 CPDF_Dictionary* pFormResource = NULL;
440 if (pObj->m_Type == CPDF_PageObject::FORM) { 440 if (pObj->IsForm()) {
441 CPDF_FormObject* pFormObj = (CPDF_FormObject*)pObj; 441 const CPDF_FormObject* pFormObj = pObj->AsForm();
442 if (pFormObj->m_pForm && pFormObj->m_pForm->m_pFormDict) { 442 if (pFormObj->m_pForm && pFormObj->m_pForm->m_pFormDict) {
443 pFormResource = pFormObj->m_pForm->m_pFormDict->GetDictBy("Resources"); 443 pFormResource = pFormObj->m_pForm->m_pFormDict->GetDictBy("Resources");
444 } 444 }
445 } 445 }
446 CPDF_RenderStatus status; 446 CPDF_RenderStatus status;
447 status.Initialize(m_pContext, buffer.GetDevice(), buffer.GetMatrix(), NULL, 447 status.Initialize(m_pContext, buffer.GetDevice(), buffer.GetMatrix(), NULL,
448 NULL, NULL, &m_Options, m_Transparency, m_bDropObjects, 448 NULL, NULL, &m_Options, m_Transparency, m_bDropObjects,
449 pFormResource); 449 pFormResource);
450 status.RenderSingleObject(pObj, &matrix); 450 status.RenderSingleObject(pObj, &matrix);
451 buffer.OutputToDevice(); 451 buffer.OutputToDevice();
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 const CFX_Matrix* pObj2Device) { 714 const CFX_Matrix* pObj2Device) {
715 const CPDF_GeneralStateData* pGeneralState = pPageObj->m_GeneralState; 715 const CPDF_GeneralStateData* pGeneralState = pPageObj->m_GeneralState;
716 int blend_type = 716 int blend_type =
717 pGeneralState ? pGeneralState->m_BlendType : FXDIB_BLEND_NORMAL; 717 pGeneralState ? pGeneralState->m_BlendType : FXDIB_BLEND_NORMAL;
718 if (blend_type == FXDIB_BLEND_UNSUPPORTED) { 718 if (blend_type == FXDIB_BLEND_UNSUPPORTED) {
719 return TRUE; 719 return TRUE;
720 } 720 }
721 CPDF_Dictionary* pSMaskDict = 721 CPDF_Dictionary* pSMaskDict =
722 pGeneralState ? ToDictionary(pGeneralState->m_pSoftMask) : NULL; 722 pGeneralState ? ToDictionary(pGeneralState->m_pSoftMask) : NULL;
723 if (pSMaskDict) { 723 if (pSMaskDict) {
724 if (pPageObj->m_Type == CPDF_PageObject::IMAGE && 724 if (pPageObj->IsImage() &&
725 ((CPDF_ImageObject*)pPageObj)->m_pImage->GetDict()->KeyExist("SMask")) { 725 pPageObj->AsImage()->m_pImage->GetDict()->KeyExist("SMask")) {
726 pSMaskDict = NULL; 726 pSMaskDict = NULL;
727 } 727 }
728 } 728 }
729 CPDF_Dictionary* pFormResource = NULL; 729 CPDF_Dictionary* pFormResource = NULL;
730 FX_FLOAT group_alpha = 1.0f; 730 FX_FLOAT group_alpha = 1.0f;
731 int Transparency = m_Transparency; 731 int Transparency = m_Transparency;
732 FX_BOOL bGroupTransparent = FALSE; 732 FX_BOOL bGroupTransparent = FALSE;
733 if (pPageObj->m_Type == CPDF_PageObject::FORM) { 733 if (pPageObj->IsForm()) {
734 CPDF_FormObject* pFormObj = (CPDF_FormObject*)pPageObj; 734 const CPDF_FormObject* pFormObj = pPageObj->AsForm();
735 const CPDF_GeneralStateData* pStateData = 735 const CPDF_GeneralStateData* pStateData =
736 pFormObj->m_GeneralState.GetObject(); 736 pFormObj->m_GeneralState.GetObject();
737 if (pStateData) { 737 if (pStateData) {
738 group_alpha = pStateData->m_FillAlpha; 738 group_alpha = pStateData->m_FillAlpha;
739 } 739 }
740 Transparency = pFormObj->m_pForm->m_Transparency; 740 Transparency = pFormObj->m_pForm->m_Transparency;
741 bGroupTransparent = !!(Transparency & PDFTRANS_ISOLATED); 741 bGroupTransparent = !!(Transparency & PDFTRANS_ISOLATED);
742 if (pFormObj->m_pForm->m_pFormDict) { 742 if (pFormObj->m_pForm->m_pFormDict) {
743 pFormResource = pFormObj->m_pForm->m_pFormDict->GetDictBy("Resources"); 743 pFormResource = pFormObj->m_pForm->m_pFormDict->GetDictBy("Resources");
744 } 744 }
745 } 745 }
746 FX_BOOL bTextClip = FALSE; 746 FX_BOOL bTextClip = FALSE;
747 if (pPageObj->m_ClipPath.NotNull() && pPageObj->m_ClipPath.GetTextCount() && 747 if (pPageObj->m_ClipPath.NotNull() && pPageObj->m_ClipPath.GetTextCount() &&
748 m_pDevice->GetDeviceClass() == FXDC_DISPLAY && 748 m_pDevice->GetDeviceClass() == FXDC_DISPLAY &&
749 !(m_pDevice->GetDeviceCaps(FXDC_RENDER_CAPS) & FXRC_SOFT_CLIP)) { 749 !(m_pDevice->GetDeviceCaps(FXDC_RENDER_CAPS) & FXRC_SOFT_CLIP)) {
750 bTextClip = TRUE; 750 bTextClip = TRUE;
751 } 751 }
752 if ((m_Options.m_Flags & RENDER_OVERPRINT) && 752 if ((m_Options.m_Flags & RENDER_OVERPRINT) && pPageObj->IsImage() &&
753 pPageObj->m_Type == CPDF_PageObject::IMAGE && pGeneralState && 753 pGeneralState && pGeneralState->m_FillOP && pGeneralState->m_StrokeOP) {
754 pGeneralState->m_FillOP && pGeneralState->m_StrokeOP) {
755 CPDF_Document* pDocument = NULL; 754 CPDF_Document* pDocument = NULL;
756 CPDF_Page* pPage = NULL; 755 CPDF_Page* pPage = NULL;
757 if (m_pContext->GetPageCache()) { 756 if (m_pContext->GetPageCache()) {
758 pPage = m_pContext->GetPageCache()->GetPage(); 757 pPage = m_pContext->GetPageCache()->GetPage();
759 pDocument = pPage->m_pDocument; 758 pDocument = pPage->m_pDocument;
760 } else { 759 } else {
761 pDocument = ((CPDF_ImageObject*)pPageObj)->m_pImage->GetDocument(); 760 pDocument = pPageObj->AsImage()->m_pImage->GetDocument();
762 } 761 }
763 CPDF_Dictionary* pPageResources = pPage ? pPage->m_pPageResources : NULL; 762 CPDF_Dictionary* pPageResources = pPage ? pPage->m_pPageResources : NULL;
764 CPDF_Object* pCSObj = ((CPDF_ImageObject*)pPageObj) 763 CPDF_Object* pCSObj =
765 ->m_pImage->GetStream() 764 pPageObj->AsImage()->m_pImage->GetStream()->GetDict()->GetElementValue(
766 ->GetDict() 765 "ColorSpace");
767 ->GetElementValue("ColorSpace");
768 CPDF_ColorSpace* pColorSpace = 766 CPDF_ColorSpace* pColorSpace =
769 pDocument->LoadColorSpace(pCSObj, pPageResources); 767 pDocument->LoadColorSpace(pCSObj, pPageResources);
770 if (pColorSpace) { 768 if (pColorSpace) {
771 int format = pColorSpace->GetFamily(); 769 int format = pColorSpace->GetFamily();
772 if (format == PDFCS_DEVICECMYK || format == PDFCS_SEPARATION || 770 if (format == PDFCS_DEVICECMYK || format == PDFCS_SEPARATION ||
773 format == PDFCS_DEVICEN) { 771 format == PDFCS_DEVICEN) {
774 blend_type = FXDIB_BLEND_DARKEN; 772 blend_type = FXDIB_BLEND_DARKEN;
775 } 773 }
776 pDocument->GetPageData()->ReleaseColorSpace(pCSObj); 774 pDocument->GetPageData()->ReleaseColorSpace(pCSObj);
777 } 775 }
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 bitmap->MultiplyAlpha(pSMaskSource.get()); 861 bitmap->MultiplyAlpha(pSMaskSource.get());
864 } 862 }
865 if (pTextMask) { 863 if (pTextMask) {
866 bitmap->MultiplyAlpha(pTextMask.get()); 864 bitmap->MultiplyAlpha(pTextMask.get());
867 pTextMask.reset(); 865 pTextMask.reset();
868 } 866 }
869 if (Transparency & PDFTRANS_GROUP && group_alpha != 1.0f) { 867 if (Transparency & PDFTRANS_GROUP && group_alpha != 1.0f) {
870 bitmap->MultiplyAlpha((int32_t)(group_alpha * 255)); 868 bitmap->MultiplyAlpha((int32_t)(group_alpha * 255));
871 } 869 }
872 Transparency = m_Transparency; 870 Transparency = m_Transparency;
873 if (pPageObj->m_Type == CPDF_PageObject::FORM) { 871 if (pPageObj->IsForm()) {
874 Transparency |= PDFTRANS_GROUP; 872 Transparency |= PDFTRANS_GROUP;
875 } 873 }
876 CompositeDIBitmap(bitmap, rect.left, rect.top, 0, 255, blend_type, 874 CompositeDIBitmap(bitmap, rect.left, rect.top, 0, 255, blend_type,
877 Transparency); 875 Transparency);
878 return TRUE; 876 return TRUE;
879 } 877 }
880 878
881 CFX_DIBitmap* CPDF_RenderStatus::GetBackdrop(const CPDF_PageObject* pObj, 879 CFX_DIBitmap* CPDF_RenderStatus::GetBackdrop(const CPDF_PageObject* pObj,
882 const FX_RECT& rect, 880 const FX_RECT& rect,
883 int& left, 881 int& left,
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 while (iter != iterEnd) { 1079 while (iter != iterEnd) {
1082 CPDF_PageObject* pCurObj = iter->get(); 1080 CPDF_PageObject* pCurObj = iter->get();
1083 if (pCurObj && pCurObj->m_Left <= m_ClipRect.right && 1081 if (pCurObj && pCurObj->m_Left <= m_ClipRect.right &&
1084 pCurObj->m_Right >= m_ClipRect.left && 1082 pCurObj->m_Right >= m_ClipRect.left &&
1085 pCurObj->m_Bottom <= m_ClipRect.top && 1083 pCurObj->m_Bottom <= m_ClipRect.top &&
1086 pCurObj->m_Top >= m_ClipRect.bottom) { 1084 pCurObj->m_Top >= m_ClipRect.bottom) {
1087 if (m_pRenderStatus->ContinueSingleObject( 1085 if (m_pRenderStatus->ContinueSingleObject(
1088 pCurObj, &m_pCurrentLayer->m_Matrix, pPause)) { 1086 pCurObj, &m_pCurrentLayer->m_Matrix, pPause)) {
1089 return; 1087 return;
1090 } 1088 }
1091 if (pCurObj->m_Type == CPDF_PageObject::IMAGE && 1089 if (pCurObj->IsImage() &&
1092 m_pRenderStatus->m_Options.m_Flags & RENDER_LIMITEDIMAGECACHE) { 1090 m_pRenderStatus->m_Options.m_Flags & RENDER_LIMITEDIMAGECACHE) {
1093 m_pContext->GetPageCache()->CacheOptimization( 1091 m_pContext->GetPageCache()->CacheOptimization(
1094 m_pRenderStatus->m_Options.m_dwLimitCacheSize); 1092 m_pRenderStatus->m_Options.m_dwLimitCacheSize);
1095 } 1093 }
1096 if (pCurObj->m_Type == CPDF_PageObject::FORM || 1094 if (pCurObj->IsForm() || pCurObj->IsShading()) {
1097 pCurObj->m_Type == CPDF_PageObject::SHADING) {
1098 nObjsToGo = 0; 1095 nObjsToGo = 0;
1099 } else { 1096 } else {
1100 --nObjsToGo; 1097 --nObjsToGo;
1101 } 1098 }
1102 } 1099 }
1103 m_LastObjectRendered = iter; 1100 m_LastObjectRendered = iter;
1104 if (nObjsToGo == 0) { 1101 if (nObjsToGo == 0) {
1105 if (pPause && pPause->NeedToPauseNow()) 1102 if (pPause && pPause->NeedToPauseNow())
1106 return; 1103 return;
1107 nObjsToGo = kStepLimit; 1104 nObjsToGo = kStepLimit;
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
1334 for (int i = 0; i < nItems; i++) { 1331 for (int i = 0; i < nItems; i++) {
1335 const CPDF_ContentMarkItem& item = pData->GetItem(i); 1332 const CPDF_ContentMarkItem& item = pData->GetItem(i);
1336 if (item.GetName() == "OC" && 1333 if (item.GetName() == "OC" &&
1337 item.GetParamType() == CPDF_ContentMarkItem::PropertiesDict && 1334 item.GetParamType() == CPDF_ContentMarkItem::PropertiesDict &&
1338 !CheckOCGVisible(item.GetParam())) { 1335 !CheckOCGVisible(item.GetParam())) {
1339 return FALSE; 1336 return FALSE;
1340 } 1337 }
1341 } 1338 }
1342 return TRUE; 1339 return TRUE;
1343 } 1340 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698