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 "fpdfsdk/fpdfxfa/include/fpdfxfa_app.h" | 7 #include "fpdfsdk/fpdfxfa/include/fpdfxfa_app.h" |
8 | 8 |
9 #include "fpdfsdk/fpdfxfa/include/fpdfxfa_util.h" | 9 #include "fpdfsdk/fpdfxfa/include/fpdfxfa_util.h" |
10 #include "fpdfsdk/include/fsdk_define.h" | 10 #include "fpdfsdk/include/fsdk_define.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 wsAppType = m_csAppType; | 86 wsAppType = m_csAppType; |
87 } | 87 } |
88 | 88 |
89 void CPDFXFA_App::GetAppName(CFX_WideString& wsName) { | 89 void CPDFXFA_App::GetAppName(CFX_WideString& wsName) { |
90 CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0); | 90 CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0); |
91 if (pEnv) { | 91 if (pEnv) { |
92 wsName = pEnv->FFI_GetAppName(); | 92 wsName = pEnv->FFI_GetAppName(); |
93 } | 93 } |
94 } | 94 } |
95 | 95 |
96 void CPDFXFA_App::GetFoxitAppName(CFX_WideString& wsFoxitName) { | |
97 wsFoxitName = L"Foxit"; | |
98 } | |
99 | |
100 void CPDFXFA_App::SetAppType(const CFX_WideStringC& wsAppType) { | 96 void CPDFXFA_App::SetAppType(const CFX_WideStringC& wsAppType) { |
101 m_csAppType = wsAppType; | 97 m_csAppType = wsAppType; |
102 } | 98 } |
103 | 99 |
104 void CPDFXFA_App::SetFoxitAppType(const CFX_WideStringC& wsFoxitAppType) {} | |
105 | |
106 void CPDFXFA_App::GetFoxitAppType(CFX_WideString& wsFoxitAppType) { | |
107 wsFoxitAppType.clear(); | |
108 } | |
109 | |
110 void CPDFXFA_App::GetLanguage(CFX_WideString& wsLanguage) { | 100 void CPDFXFA_App::GetLanguage(CFX_WideString& wsLanguage) { |
111 CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0); | 101 CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0); |
112 if (pEnv) { | 102 if (pEnv) { |
113 wsLanguage = pEnv->FFI_GetLanguage(); | 103 wsLanguage = pEnv->FFI_GetLanguage(); |
114 } | 104 } |
115 } | 105 } |
116 | 106 |
117 void CPDFXFA_App::GetPlatform(CFX_WideString& wsPlatform) { | 107 void CPDFXFA_App::GetPlatform(CFX_WideString& wsPlatform) { |
118 CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0); | 108 CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0); |
119 if (pEnv) { | 109 if (pEnv) { |
120 wsPlatform = pEnv->FFI_GetPlatform(); | 110 wsPlatform = pEnv->FFI_GetPlatform(); |
121 } | 111 } |
122 } | 112 } |
123 | 113 |
124 void CPDFXFA_App::GetVariation(CFX_WideString& wsVariation) { | 114 void CPDFXFA_App::GetVariation(CFX_WideString& wsVariation) { |
125 wsVariation = JS_STR_VIEWERVARIATION; | 115 wsVariation = JS_STR_VIEWERVARIATION; |
126 } | 116 } |
127 | 117 |
128 void CPDFXFA_App::GetVersion(CFX_WideString& wsVersion) { | 118 void CPDFXFA_App::GetVersion(CFX_WideString& wsVersion) { |
129 wsVersion = JS_STR_VIEWERVERSION_XFA; | 119 wsVersion = JS_STR_VIEWERVERSION_XFA; |
130 } | 120 } |
131 | 121 |
132 void CPDFXFA_App::GetFoxitVersion(CFX_WideString& wsFoxitVersion) { | |
133 wsFoxitVersion = L"7.0"; | |
134 } | |
135 | |
136 void CPDFXFA_App::Beep(uint32_t dwType) { | 122 void CPDFXFA_App::Beep(uint32_t dwType) { |
137 CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0); | 123 CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0); |
138 if (pEnv) { | 124 if (pEnv) { |
139 pEnv->JS_appBeep(dwType); | 125 pEnv->JS_appBeep(dwType); |
140 } | 126 } |
141 } | 127 } |
142 | 128 |
143 int32_t CPDFXFA_App::MsgBox(const CFX_WideString& wsMessage, | 129 int32_t CPDFXFA_App::MsgBox(const CFX_WideString& wsMessage, |
144 const CFX_WideString& wsTitle, | 130 const CFX_WideString& wsTitle, |
145 uint32_t dwIconType, | 131 uint32_t dwIconType, |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 } | 348 } |
363 } | 349 } |
364 | 350 |
365 IFWL_AdapterTimerMgr* CPDFXFA_App::GetTimerMgr() { | 351 IFWL_AdapterTimerMgr* CPDFXFA_App::GetTimerMgr() { |
366 CXFA_FWLAdapterTimerMgr* pAdapter = nullptr; | 352 CXFA_FWLAdapterTimerMgr* pAdapter = nullptr; |
367 CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0); | 353 CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0); |
368 if (pEnv) | 354 if (pEnv) |
369 pAdapter = new CXFA_FWLAdapterTimerMgr(pEnv); | 355 pAdapter = new CXFA_FWLAdapterTimerMgr(pEnv); |
370 return pAdapter; | 356 return pAdapter; |
371 } | 357 } |
OLD | NEW |