| 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/fpdfapi/fpdf_serial.h" | 9 #include "../../../include/fpdfapi/fpdf_serial.h" |
| 10 #include "pageint.h" | 10 #include "pageint.h" |
| 11 | 11 |
| 12 #define REQUIRE_PARAMS(count) \ | 12 #define REQUIRE_PARAMS(count) \ |
| 13 if (m_ParamCount != count) { \ | 13 if (m_ParamCount != count) { \ |
| 14 m_bAbort = TRUE; \ | |
| 15 return; \ | 14 return; \ |
| 16 } | 15 } |
| 17 | 16 |
| 18 CPDF_StreamContentParser::CPDF_StreamContentParser( | 17 CPDF_StreamContentParser::CPDF_StreamContentParser( |
| 19 CPDF_Document* pDocument, | 18 CPDF_Document* pDocument, |
| 20 CPDF_Dictionary* pPageResources, | 19 CPDF_Dictionary* pPageResources, |
| 21 CPDF_Dictionary* pParentResources, | 20 CPDF_Dictionary* pParentResources, |
| 22 CFX_AffineMatrix* pmtContentToUser, | 21 CFX_AffineMatrix* pmtContentToUser, |
| 23 CPDF_PageObjects* pObjList, | 22 CPDF_PageObjects* pObjList, |
| 24 CPDF_Dictionary* pResources, | 23 CPDF_Dictionary* pResources, |
| 25 CPDF_Rect* pBBox, | 24 CPDF_Rect* pBBox, |
| 26 CPDF_ParseOptions* pOptions, | 25 CPDF_ParseOptions* pOptions, |
| 27 CPDF_AllStates* pStates, | 26 CPDF_AllStates* pStates, |
| 28 int level) | 27 int level) |
| 29 : m_pDocument(pDocument), | 28 : m_pDocument(pDocument), |
| 30 m_pPageResources(pPageResources), | 29 m_pPageResources(pPageResources), |
| 31 m_pParentResources(pParentResources), | 30 m_pParentResources(pParentResources), |
| 32 m_pResources(pResources), | 31 m_pResources(pResources), |
| 33 m_pObjectList(pObjList), | 32 m_pObjectList(pObjList), |
| 34 m_Level(level), | 33 m_Level(level), |
| 35 m_ParamStartPos(0), | 34 m_ParamStartPos(0), |
| 36 m_ParamCount(0), | 35 m_ParamCount(0), |
| 37 m_bAbort(FALSE), | |
| 38 m_pCurStates(new CPDF_AllStates), | 36 m_pCurStates(new CPDF_AllStates), |
| 39 m_pLastTextObject(nullptr), | 37 m_pLastTextObject(nullptr), |
| 40 m_DefFontSize(0), | 38 m_DefFontSize(0), |
| 41 m_pPathPoints(nullptr), | 39 m_pPathPoints(nullptr), |
| 42 m_PathPointCount(0), | 40 m_PathPointCount(0), |
| 43 m_PathAllocSize(0), | 41 m_PathAllocSize(0), |
| 44 m_PathCurrentX(0.0f), | 42 m_PathCurrentX(0.0f), |
| 45 m_PathCurrentY(0.0f), | 43 m_PathCurrentY(0.0f), |
| 46 m_PathClipType(0), | 44 m_PathClipType(0), |
| 47 m_pLastImage(nullptr), | 45 m_pLastImage(nullptr), |
| (...skipping 1541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1589 buf.AppendChar((char)code); | 1587 buf.AppendChar((char)code); |
| 1590 } | 1588 } |
| 1591 bFirst = !bFirst; | 1589 bFirst = !bFirst; |
| 1592 } | 1590 } |
| 1593 } | 1591 } |
| 1594 if (!bFirst) { | 1592 if (!bFirst) { |
| 1595 buf.AppendChar((char)code); | 1593 buf.AppendChar((char)code); |
| 1596 } | 1594 } |
| 1597 return buf.GetByteString(); | 1595 return buf.GetByteString(); |
| 1598 } | 1596 } |
| OLD | NEW |