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

Side by Side Diff: fpdfsdk/src/javascript/app.cpp

Issue 1415803002: XFA: add CPDFDocumentToFPDFDocument() (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Address comments Created 5 years, 2 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
« no previous file with comments | « fpdfsdk/src/fsdk_baseform.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "app.h" 7 #include "app.h"
8 8
9 #include "../../../third_party/base/nonstd_unique_ptr.h" 9 #include "../../../third_party/base/nonstd_unique_ptr.h"
10 #include "../../include/fsdk_mgr.h" // For CPDFDoc_Environment. 10 #include "../../include/fsdk_mgr.h" // For CPDFDoc_Environment.
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 194
195 FX_BOOL app::viewerVersion(IJS_Context* cc, 195 FX_BOOL app::viewerVersion(IJS_Context* cc,
196 CJS_PropValue& vp, 196 CJS_PropValue& vp,
197 CFX_WideString& sError) { 197 CFX_WideString& sError) {
198 if (!vp.IsGetting()) 198 if (!vp.IsGetting())
199 return FALSE; 199 return FALSE;
200 200
201 CJS_Context* pContext = (CJS_Context*)cc; 201 CJS_Context* pContext = (CJS_Context*)cc;
202 CPDFSDK_Document* pCurDoc = pContext->GetReaderDocument(); 202 CPDFSDK_Document* pCurDoc = pContext->GetReaderDocument();
203 CPDFXFA_Document* pDoc = pCurDoc->GetDocument(); 203 CPDFXFA_Document* pDoc = pCurDoc->GetDocument();
204 if (pDoc->GetDocType() == 1 || pDoc->GetDocType() == 2) 204 if (pDoc->GetDocType() == 1 || pDoc->GetDocType() == 2) {
205 vp << JS_NUM_VIEWERVERSION_XFA; 205 vp << JS_NUM_VIEWERVERSION_XFA;
206 else 206 return TRUE;
207 vp << JS_NUM_VIEWERVERSION; 207 }
208 208
209 vp << JS_NUM_VIEWERVERSION;
209 return TRUE; 210 return TRUE;
210 } 211 }
211 212
212 FX_BOOL app::platform(IJS_Context* cc, 213 FX_BOOL app::platform(IJS_Context* cc,
213 CJS_PropValue& vp, 214 CJS_PropValue& vp,
214 CFX_WideString& sError) { 215 CFX_WideString& sError) {
215 if (vp.IsGetting()) { 216 if (vp.IsGetting()) {
216 vp << JS_STR_PLATFORM; 217 vp << JS_STR_PLATFORM;
217 return TRUE; 218 return TRUE;
218 } 219 }
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 FX_BOOL app::media(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { 810 FX_BOOL app::media(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) {
810 return FALSE; 811 return FALSE;
811 } 812 }
812 813
813 FX_BOOL app::execDialog(IJS_Context* cc, 814 FX_BOOL app::execDialog(IJS_Context* cc,
814 const CJS_Parameters& params, 815 const CJS_Parameters& params,
815 CJS_Value& vRet, 816 CJS_Value& vRet,
816 CFX_WideString& sError) { 817 CFX_WideString& sError) {
817 return TRUE; 818 return TRUE;
818 } 819 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/fsdk_baseform.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698