| 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/src/javascript/event.h" | 7 #include "fpdfsdk/src/javascript/event.h" |
| 8 | 8 |
| 9 #include "fpdfsdk/include/javascript/IJavaScript.h" | 9 #include "fpdfsdk/include/javascript/IJavaScript.h" |
| 10 #include "fpdfsdk/src/javascript/Field.h" | 10 #include "fpdfsdk/src/javascript/Field.h" |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 } else { | 165 } else { |
| 166 vp << bRc; | 166 vp << bRc; |
| 167 } | 167 } |
| 168 return TRUE; | 168 return TRUE; |
| 169 } | 169 } |
| 170 | 170 |
| 171 FX_BOOL event::richChange(IJS_Context* cc, | 171 FX_BOOL event::richChange(IJS_Context* cc, |
| 172 CJS_PropValue& vp, | 172 CJS_PropValue& vp, |
| 173 CFX_WideString& sError) { | 173 CFX_WideString& sError) { |
| 174 return TRUE; | 174 return TRUE; |
| 175 if (vp.IsSetting()) { | |
| 176 } else { | |
| 177 ; | |
| 178 } | |
| 179 return TRUE; | |
| 180 } | 175 } |
| 181 | 176 |
| 182 FX_BOOL event::richChangeEx(IJS_Context* cc, | 177 FX_BOOL event::richChangeEx(IJS_Context* cc, |
| 183 CJS_PropValue& vp, | 178 CJS_PropValue& vp, |
| 184 CFX_WideString& sError) { | 179 CFX_WideString& sError) { |
| 185 return TRUE; | 180 return TRUE; |
| 186 if (vp.IsSetting()) { | |
| 187 } else { | |
| 188 ; | |
| 189 } | |
| 190 return TRUE; | |
| 191 } | 181 } |
| 192 | 182 |
| 193 FX_BOOL event::richValue(IJS_Context* cc, | 183 FX_BOOL event::richValue(IJS_Context* cc, |
| 194 CJS_PropValue& vp, | 184 CJS_PropValue& vp, |
| 195 CFX_WideString& sError) { | 185 CFX_WideString& sError) { |
| 196 return TRUE; | 186 return TRUE; |
| 197 if (vp.IsSetting()) { | |
| 198 } else { | |
| 199 ; | |
| 200 } | |
| 201 return TRUE; | |
| 202 } | 187 } |
| 203 | 188 |
| 204 FX_BOOL event::selEnd(IJS_Context* cc, | 189 FX_BOOL event::selEnd(IJS_Context* cc, |
| 205 CJS_PropValue& vp, | 190 CJS_PropValue& vp, |
| 206 CFX_WideString& sError) { | 191 CFX_WideString& sError) { |
| 207 CJS_Context* pContext = (CJS_Context*)cc; | 192 CJS_Context* pContext = (CJS_Context*)cc; |
| 208 CJS_EventHandler* pEvent = pContext->GetEventHandler(); | 193 CJS_EventHandler* pEvent = pContext->GetEventHandler(); |
| 209 | 194 |
| 210 if (wcscmp((const wchar_t*)pEvent->Name(), L"Keystroke") != 0) { | 195 if (wcscmp((const wchar_t*)pEvent->Name(), L"Keystroke") != 0) { |
| 211 return TRUE; | 196 return TRUE; |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 | 318 |
| 334 CJS_Context* pContext = (CJS_Context*)cc; | 319 CJS_Context* pContext = (CJS_Context*)cc; |
| 335 CJS_EventHandler* pEvent = pContext->GetEventHandler(); | 320 CJS_EventHandler* pEvent = pContext->GetEventHandler(); |
| 336 | 321 |
| 337 if (pEvent->WillCommit()) | 322 if (pEvent->WillCommit()) |
| 338 vp << TRUE; | 323 vp << TRUE; |
| 339 else | 324 else |
| 340 vp << FALSE; | 325 vp << FALSE; |
| 341 return TRUE; | 326 return TRUE; |
| 342 } | 327 } |
| OLD | NEW |