| 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 } | 189 } |
| 190 | 190 |
| 191 return FALSE; | 191 return FALSE; |
| 192 } | 192 } |
| 193 | 193 |
| 194 FX_BOOL app::viewerVersion(IJS_Context* cc, | 194 FX_BOOL app::viewerVersion(IJS_Context* cc, |
| 195 CJS_PropValue& vp, | 195 CJS_PropValue& vp, |
| 196 CFX_WideString& sError) { | 196 CFX_WideString& sError) { |
| 197 if (!vp.IsGetting()) | 197 if (!vp.IsGetting()) |
| 198 return FALSE; | 198 return FALSE; |
| 199 | |
| 200 vp << JS_NUM_VIEWERVERSION; | 199 vp << JS_NUM_VIEWERVERSION; |
| 201 return TRUE; | 200 return TRUE; |
| 202 } | 201 } |
| 203 | 202 |
| 204 FX_BOOL app::platform(IJS_Context* cc, | 203 FX_BOOL app::platform(IJS_Context* cc, |
| 205 CJS_PropValue& vp, | 204 CJS_PropValue& vp, |
| 206 CFX_WideString& sError) { | 205 CFX_WideString& sError) { |
| 207 if (vp.IsGetting()) { | 206 if (!vp.IsGetting()) |
| 208 vp << JS_STR_PLATFORM; | 207 return FALSE; |
| 209 return TRUE; | 208 vp << JS_STR_PLATFORM; |
| 210 } | 209 return TRUE; |
| 211 | |
| 212 return FALSE; | |
| 213 } | 210 } |
| 214 | 211 |
| 215 FX_BOOL app::language(IJS_Context* cc, | 212 FX_BOOL app::language(IJS_Context* cc, |
| 216 CJS_PropValue& vp, | 213 CJS_PropValue& vp, |
| 217 CFX_WideString& sError) { | 214 CFX_WideString& sError) { |
| 218 if (vp.IsGetting()) { | 215 if (!vp.IsGetting()) |
| 219 vp << JS_STR_LANGUANGE; | 216 return FALSE; |
| 220 return TRUE; | 217 vp << JS_STR_LANGUANGE; |
| 221 } | 218 return TRUE; |
| 222 | |
| 223 return FALSE; | |
| 224 } | 219 } |
| 225 | 220 |
| 226 // creates a new fdf object that contains no data | 221 // creates a new fdf object that contains no data |
| 227 // comment: need reader support | 222 // comment: need reader support |
| 228 // note: | 223 // note: |
| 229 // CFDF_Document * CPDFDoc_Environment::NewFDF(); | 224 // CFDF_Document * CPDFDoc_Environment::NewFDF(); |
| 230 FX_BOOL app::newFDF(IJS_Context* cc, | 225 FX_BOOL app::newFDF(IJS_Context* cc, |
| 231 const std::vector<CJS_Value>& params, | 226 const std::vector<CJS_Value>& params, |
| 232 CJS_Value& vRet, | 227 CJS_Value& vRet, |
| 233 CFX_WideString& sError) { | 228 CFX_WideString& sError) { |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 801 FX_BOOL app::media(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { | 796 FX_BOOL app::media(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { |
| 802 return FALSE; | 797 return FALSE; |
| 803 } | 798 } |
| 804 | 799 |
| 805 FX_BOOL app::execDialog(IJS_Context* cc, | 800 FX_BOOL app::execDialog(IJS_Context* cc, |
| 806 const std::vector<CJS_Value>& params, | 801 const std::vector<CJS_Value>& params, |
| 807 CJS_Value& vRet, | 802 CJS_Value& vRet, |
| 808 CFX_WideString& sError) { | 803 CFX_WideString& sError) { |
| 809 return TRUE; | 804 return TRUE; |
| 810 } | 805 } |
| OLD | NEW |