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

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

Issue 2119013002: Change class member variables in raw pointer type into unique_ptr (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments Created 4 years, 5 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 <vector> 9 #include <vector>
10 10
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_formobject.cpp ('k') | core/fpdfapi/fpdf_page/include/cpdf_formobject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698