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 "app.h" | 7 #include "app.h" |
8 | 8 |
9 #include "Document.h" | 9 #include "Document.h" |
10 #include "JS_Context.h" | 10 #include "JS_Context.h" |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 } | 193 } |
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->GetXFADocument(); |
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 return TRUE; | 206 return TRUE; |
207 } | 207 } |
208 | 208 |
209 vp << JS_NUM_VIEWERVERSION; | 209 vp << JS_NUM_VIEWERVERSION; |
210 return TRUE; | 210 return TRUE; |
211 } | 211 } |
212 | 212 |
213 FX_BOOL app::platform(IJS_Context* cc, | 213 FX_BOOL app::platform(IJS_Context* cc, |
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
810 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) { |
811 return FALSE; | 811 return FALSE; |
812 } | 812 } |
813 | 813 |
814 FX_BOOL app::execDialog(IJS_Context* cc, | 814 FX_BOOL app::execDialog(IJS_Context* cc, |
815 const std::vector<CJS_Value>& params, | 815 const std::vector<CJS_Value>& params, |
816 CJS_Value& vRet, | 816 CJS_Value& vRet, |
817 CFX_WideString& sError) { | 817 CFX_WideString& sError) { |
818 return TRUE; | 818 return TRUE; |
819 } | 819 } |
OLD | NEW |