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

Side by Side Diff: core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp

Issue 1918113002: Clean up CPDF_Page. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: More cleanup, fix build Created 4 years, 7 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/fpdfapi/fpdf_page/pageint.h" 7 #include "core/fpdfapi/fpdf_page/pageint.h"
8 8
9 #include <limits.h> 9 #include <limits.h>
10 10
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 m_pType3Char(nullptr), 690 m_pType3Char(nullptr),
691 m_pData(nullptr), 691 m_pData(nullptr),
692 m_Size(0), 692 m_Size(0),
693 m_CurrentOffset(0) {} 693 m_CurrentOffset(0) {}
694 694
695 CPDF_ContentParser::~CPDF_ContentParser() { 695 CPDF_ContentParser::~CPDF_ContentParser() {
696 if (!m_pSingleStream) 696 if (!m_pSingleStream)
697 FX_Free(m_pData); 697 FX_Free(m_pData);
698 } 698 }
699 699
700 void CPDF_ContentParser::Start(CPDF_Page* pPage, CPDF_ParseOptions* pOptions) { 700 void CPDF_ContentParser::Start(CPDF_Page* pPage) {
701 if (m_Status != Ready || !pPage || !pPage->m_pDocument || 701 if (m_Status != Ready || !pPage || !pPage->m_pDocument ||
702 !pPage->m_pFormDict) { 702 !pPage->m_pFormDict) {
703 m_Status = Done; 703 m_Status = Done;
704 return; 704 return;
705 } 705 }
706 m_pObjectHolder = pPage; 706 m_pObjectHolder = pPage;
707 m_bForm = FALSE; 707 m_bForm = FALSE;
708 if (pOptions) {
709 m_Options = *pOptions;
710 }
711 m_Status = ToBeContinued; 708 m_Status = ToBeContinued;
712 m_InternalStage = STAGE_GETCONTENT; 709 m_InternalStage = STAGE_GETCONTENT;
713 m_CurrentOffset = 0; 710 m_CurrentOffset = 0;
714 711
715 CPDF_Object* pContent = pPage->m_pFormDict->GetDirectObjectBy("Contents"); 712 CPDF_Object* pContent = pPage->m_pFormDict->GetDirectObjectBy("Contents");
716 if (!pContent) { 713 if (!pContent) {
717 m_Status = Done; 714 m_Status = Done;
718 return; 715 return;
719 } 716 }
720 if (CPDF_Stream* pStream = pContent->AsStream()) { 717 if (CPDF_Stream* pStream = pContent->AsStream()) {
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 } 882 }
886 m_Status = Done; 883 m_Status = Done;
887 return; 884 return;
888 } 885 }
889 steps++; 886 steps++;
890 if (pPause && pPause->NeedToPauseNow()) { 887 if (pPause && pPause->NeedToPauseNow()) {
891 break; 888 break;
892 } 889 }
893 } 890 }
894 } 891 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698