| 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 <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 m_pLastImage = pObj->m_pImage; | 744 m_pLastImage = pObj->m_pImage; |
| 745 if (!m_pObjectHolder->HasImageMask()) | 745 if (!m_pObjectHolder->HasImageMask()) |
| 746 m_pObjectHolder->SetHasImageMask(m_pLastImage->IsMask()); | 746 m_pObjectHolder->SetHasImageMask(m_pLastImage->IsMask()); |
| 747 } else if (type == "Form") { | 747 } else if (type == "Form") { |
| 748 AddForm(pXObject); | 748 AddForm(pXObject); |
| 749 } | 749 } |
| 750 } | 750 } |
| 751 | 751 |
| 752 void CPDF_StreamContentParser::AddForm(CPDF_Stream* pStream) { | 752 void CPDF_StreamContentParser::AddForm(CPDF_Stream* pStream) { |
| 753 std::unique_ptr<CPDF_FormObject> pFormObj(new CPDF_FormObject); | 753 std::unique_ptr<CPDF_FormObject> pFormObj(new CPDF_FormObject); |
| 754 pFormObj->m_pForm = | 754 pFormObj->m_pForm.reset( |
| 755 new CPDF_Form(m_pDocument, m_pPageResources, pStream, m_pResources); | 755 new CPDF_Form(m_pDocument, m_pPageResources, pStream, m_pResources)); |
| 756 pFormObj->m_FormMatrix = m_pCurStates->m_CTM; | 756 pFormObj->m_FormMatrix = m_pCurStates->m_CTM; |
| 757 pFormObj->m_FormMatrix.Concat(m_mtContentToUser); | 757 pFormObj->m_FormMatrix.Concat(m_mtContentToUser); |
| 758 CPDF_AllStates status; | 758 CPDF_AllStates status; |
| 759 status.m_GeneralState = m_pCurStates->m_GeneralState; | 759 status.m_GeneralState = m_pCurStates->m_GeneralState; |
| 760 status.m_GraphState = m_pCurStates->m_GraphState; | 760 status.m_GraphState = m_pCurStates->m_GraphState; |
| 761 status.m_ColorState = m_pCurStates->m_ColorState; | 761 status.m_ColorState = m_pCurStates->m_ColorState; |
| 762 status.m_TextState = m_pCurStates->m_TextState; | 762 status.m_TextState = m_pCurStates->m_TextState; |
| 763 pFormObj->m_pForm->ParseContent(&status, nullptr, nullptr, m_Level + 1); | 763 pFormObj->m_pForm->ParseContent(&status, nullptr, nullptr, m_Level + 1); |
| 764 if (!m_pObjectHolder->BackgroundAlphaNeeded() && | 764 if (!m_pObjectHolder->BackgroundAlphaNeeded() && |
| 765 pFormObj->m_pForm->BackgroundAlphaNeeded()) { | 765 pFormObj->m_pForm->BackgroundAlphaNeeded()) { |
| (...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1681 } else { | 1681 } else { |
| 1682 PDF_ReplaceAbbr(pElement); | 1682 PDF_ReplaceAbbr(pElement); |
| 1683 } | 1683 } |
| 1684 } | 1684 } |
| 1685 break; | 1685 break; |
| 1686 } | 1686 } |
| 1687 default: | 1687 default: |
| 1688 break; | 1688 break; |
| 1689 } | 1689 } |
| 1690 } | 1690 } |
| OLD | NEW |