| 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 "core/fpdfapi/fpdf_page/pageint.h" | 7 #include "core/fpdfapi/fpdf_page/pageint.h" |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 801 CPDF_ImageObject* pRet = pImageObj.get(); | 801 CPDF_ImageObject* pRet = pImageObj.get(); |
| 802 m_pObjectHolder->GetPageObjectList()->push_back(std::move(pImageObj)); | 802 m_pObjectHolder->GetPageObjectList()->push_back(std::move(pImageObj)); |
| 803 return pRet; | 803 return pRet; |
| 804 } | 804 } |
| 805 | 805 |
| 806 void CPDF_StreamContentParser::Handle_MarkPlace_Dictionary() {} | 806 void CPDF_StreamContentParser::Handle_MarkPlace_Dictionary() {} |
| 807 | 807 |
| 808 void CPDF_StreamContentParser::Handle_EndImage() {} | 808 void CPDF_StreamContentParser::Handle_EndImage() {} |
| 809 | 809 |
| 810 void CPDF_StreamContentParser::Handle_EndMarkedContent() { | 810 void CPDF_StreamContentParser::Handle_EndMarkedContent() { |
| 811 if (m_CurContentMark.IsNull()) | 811 if (!m_CurContentMark) |
| 812 return; | 812 return; |
| 813 | 813 |
| 814 int count = m_CurContentMark.GetObject()->CountItems(); | 814 int count = m_CurContentMark.GetObject()->CountItems(); |
| 815 if (count == 1) { | 815 if (count == 1) { |
| 816 m_CurContentMark.SetNull(); | 816 m_CurContentMark.SetNull(); |
| 817 return; | 817 return; |
| 818 } | 818 } |
| 819 m_CurContentMark.GetModify()->DeleteLastMark(); | 819 m_CurContentMark.GetModify()->DeleteLastMark(); |
| 820 } | 820 } |
| 821 | 821 |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1096 | 1096 |
| 1097 if (!pShading->IsShadingObject() || !pShading->Load()) | 1097 if (!pShading->IsShadingObject() || !pShading->Load()) |
| 1098 return; | 1098 return; |
| 1099 | 1099 |
| 1100 std::unique_ptr<CPDF_ShadingObject> pObj(new CPDF_ShadingObject); | 1100 std::unique_ptr<CPDF_ShadingObject> pObj(new CPDF_ShadingObject); |
| 1101 pObj->m_pShading = pShading; | 1101 pObj->m_pShading = pShading; |
| 1102 SetGraphicStates(pObj.get(), FALSE, FALSE, FALSE); | 1102 SetGraphicStates(pObj.get(), FALSE, FALSE, FALSE); |
| 1103 pObj->m_Matrix = m_pCurStates->m_CTM; | 1103 pObj->m_Matrix = m_pCurStates->m_CTM; |
| 1104 pObj->m_Matrix.Concat(m_mtContentToUser); | 1104 pObj->m_Matrix.Concat(m_mtContentToUser); |
| 1105 CFX_FloatRect bbox = | 1105 CFX_FloatRect bbox = |
| 1106 pObj->m_ClipPath.IsNull() ? m_BBox : pObj->m_ClipPath.GetClipBox(); | 1106 pObj->m_ClipPath ? pObj->m_ClipPath.GetClipBox() : m_BBox; |
| 1107 if (pShading->IsMeshShading()) | 1107 if (pShading->IsMeshShading()) |
| 1108 bbox.Intersect(GetShadingBBox(pShading, pObj->m_Matrix)); | 1108 bbox.Intersect(GetShadingBBox(pShading, pObj->m_Matrix)); |
| 1109 pObj->m_Left = bbox.left; | 1109 pObj->m_Left = bbox.left; |
| 1110 pObj->m_Right = bbox.right; | 1110 pObj->m_Right = bbox.right; |
| 1111 pObj->m_Top = bbox.top; | 1111 pObj->m_Top = bbox.top; |
| 1112 pObj->m_Bottom = bbox.bottom; | 1112 pObj->m_Bottom = bbox.bottom; |
| 1113 m_pObjectHolder->GetPageObjectList()->push_back(std::move(pObj)); | 1113 m_pObjectHolder->GetPageObjectList()->push_back(std::move(pObj)); |
| 1114 } | 1114 } |
| 1115 | 1115 |
| 1116 void CPDF_StreamContentParser::Handle_SetCharSpace() { | 1116 void CPDF_StreamContentParser::Handle_SetCharSpace() { |
| (...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1685 } else { | 1685 } else { |
| 1686 PDF_ReplaceAbbr(pElement); | 1686 PDF_ReplaceAbbr(pElement); |
| 1687 } | 1687 } |
| 1688 } | 1688 } |
| 1689 break; | 1689 break; |
| 1690 } | 1690 } |
| 1691 default: | 1691 default: |
| 1692 break; | 1692 break; |
| 1693 } | 1693 } |
| 1694 } | 1694 } |
| OLD | NEW |