OLD | NEW |
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 "../../../include/fpdfapi/fpdf_page.h" | 7 #include "../../../include/fpdfapi/fpdf_page.h" |
8 #include "../../../include/fpdfapi/fpdf_module.h" | 8 #include "../../../include/fpdfapi/fpdf_module.h" |
9 #include "../../../include/fxcodec/fx_codec.h" | 9 #include "../../../include/fxcodec/fx_codec.h" |
10 #include "pageint.h" | 10 #include "pageint.h" |
(...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
955 m_pSingleStream = FX_NEW CPDF_StreamAcc; | 955 m_pSingleStream = FX_NEW CPDF_StreamAcc; |
956 m_pSingleStream->LoadAllData((CPDF_Stream*)pContent, FALSE); | 956 m_pSingleStream->LoadAllData((CPDF_Stream*)pContent, FALSE); |
957 } else if (pContent->GetType() == PDFOBJ_ARRAY) { | 957 } else if (pContent->GetType() == PDFOBJ_ARRAY) { |
958 CPDF_Array* pArray = (CPDF_Array*)pContent; | 958 CPDF_Array* pArray = (CPDF_Array*)pContent; |
959 m_nStreams = pArray->GetCount(); | 959 m_nStreams = pArray->GetCount(); |
960 if (m_nStreams == 0) { | 960 if (m_nStreams == 0) { |
961 m_Status = Done; | 961 m_Status = Done; |
962 return; | 962 return; |
963 } | 963 } |
964 m_pStreamArray = FX_Alloc(CPDF_StreamAcc*, m_nStreams); | 964 m_pStreamArray = FX_Alloc(CPDF_StreamAcc*, m_nStreams); |
965 FXSYS_memset32(m_pStreamArray, 0, sizeof(CPDF_StreamAcc*) * m_nStreams); | |
966 } else { | 965 } else { |
967 m_Status = Done; | 966 m_Status = Done; |
968 return; | 967 return; |
969 } | 968 } |
970 } | 969 } |
971 void CPDF_ContentParser::Start(CPDF_Form* pForm, CPDF_AllStates* pGraphicStates, | 970 void CPDF_ContentParser::Start(CPDF_Form* pForm, CPDF_AllStates* pGraphicStates, |
972 CFX_AffineMatrix* pParentMatrix, CPDF_Type3Char*
pType3Char, CPDF_ParseOptions* pOptions, int level) | 971 CFX_AffineMatrix* pParentMatrix, CPDF_Type3Char*
pType3Char, CPDF_ParseOptions* pOptions, int level) |
973 { | 972 { |
974 m_pType3Char = pType3Char; | 973 m_pType3Char = pType3Char; |
975 m_pObjects = pForm; | 974 m_pObjects = pForm; |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1137 return 100; | 1136 return 100; |
1138 } | 1137 } |
1139 if (m_InternalStage == PAGEPARSE_STAGE_GETCONTENT) { | 1138 if (m_InternalStage == PAGEPARSE_STAGE_GETCONTENT) { |
1140 return 10; | 1139 return 10; |
1141 } | 1140 } |
1142 if (m_InternalStage == PAGEPARSE_STAGE_CHECKCLIP) { | 1141 if (m_InternalStage == PAGEPARSE_STAGE_CHECKCLIP) { |
1143 return 90; | 1142 return 90; |
1144 } | 1143 } |
1145 return 10 + 80 * m_CurrentOffset / m_Size; | 1144 return 10 + 80 * m_CurrentOffset / m_Size; |
1146 } | 1145 } |
OLD | NEW |