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

Side by Side Diff: fpdfsdk/src/fsdk_baseannot.cpp

Issue 1465663002: Update XFA fpdfsdk to match master (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 1 month 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/include/fxcrt/fx_ext.h" 7 #include "core/include/fxcrt/fx_ext.h"
8 #include "fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h" 8 #include "fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h"
9 #include "fpdfsdk/include/fsdk_baseannot.h" 9 #include "fpdfsdk/include/fsdk_baseannot.h"
10 #include "fpdfsdk/include/fsdk_define.h" 10 #include "fpdfsdk/include/fsdk_define.h"
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 871
872 pParentDict = pAPTypeDict; 872 pParentDict = pAPTypeDict;
873 pStream = pAPTypeDict->GetStream(sAPState); 873 pStream = pAPTypeDict->GetStream(sAPState);
874 } 874 }
875 875
876 if (!pStream) { 876 if (!pStream) {
877 pStream = new CPDF_Stream(nullptr, 0, nullptr); 877 pStream = new CPDF_Stream(nullptr, 0, nullptr);
878 878
879 CPDF_Document* pDoc = m_pPageView->GetPDFDocument(); 879 CPDF_Document* pDoc = m_pPageView->GetPDFDocument();
880 int32_t objnum = pDoc->AddIndirectObject(pStream); 880 int32_t objnum = pDoc->AddIndirectObject(pStream);
881 // pAPDict->SetAtReference(sAPType, pDoc, objnum);
882 ASSERT(pParentDict != NULL);
883 pParentDict->SetAtReference(sAPType, pDoc, objnum); 881 pParentDict->SetAtReference(sAPType, pDoc, objnum);
884 } 882 }
885 883
886 CPDF_Dictionary* pStreamDict = pStream->GetDict(); 884 CPDF_Dictionary* pStreamDict = pStream->GetDict();
887 if (!pStreamDict) { 885 if (!pStreamDict) {
888 pStreamDict = new CPDF_Dictionary; 886 pStreamDict = new CPDF_Dictionary;
889 pStreamDict->SetAtName("Type", "XObject"); 887 pStreamDict->SetAtName("Type", "XObject");
890 pStreamDict->SetAtName("Subtype", "Form"); 888 pStreamDict->SetAtName("Subtype", "Form");
891 pStreamDict->SetAtInteger("FormType", 1); 889 pStreamDict->SetAtInteger("FormType", 1);
892 pStream->InitStream(nullptr, 0, pStreamDict); 890 pStream->InitStream(nullptr, 0, pStreamDict);
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
987 if (m_pPageView) 985 if (m_pPageView)
988 return m_pPageView->GetPDFPage(); 986 return m_pPageView->GetPDFPage();
989 return NULL; 987 return NULL;
990 } 988 }
991 989
992 CPDFXFA_Page* CPDFSDK_Annot::GetPDFXFAPage() { 990 CPDFXFA_Page* CPDFSDK_Annot::GetPDFXFAPage() {
993 if (m_pPageView) 991 if (m_pPageView)
994 return m_pPageView->GetPDFXFAPage(); 992 return m_pPageView->GetPDFXFAPage();
995 return NULL; 993 return NULL;
996 } 994 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698