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

Side by Side Diff: xfa/fxfa/parser/xfa_script_eventpseudomodel.cpp

Issue 1862123003: Rename both As{Byte,Wide}StringC() helpers to AsStringC(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase, fix new usage. Created 4 years, 8 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 | « xfa/fxfa/parser/xfa_parser_imp.cpp ('k') | xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp » ('j') | 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 "xfa/fxfa/parser/xfa_script_eventpseudomodel.h" 7 #include "xfa/fxfa/parser/xfa_script_eventpseudomodel.h"
8 8
9 #include "xfa/fxfa/app/xfa_ffnotify.h" 9 #include "xfa/fxfa/app/xfa_ffnotify.h"
10 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" 10 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h"
(...skipping 14 matching lines...) Expand all
25 : CXFA_OrdinaryObject(pDocument, XFA_ELEMENT_EventPseudoModel) { 25 : CXFA_OrdinaryObject(pDocument, XFA_ELEMENT_EventPseudoModel) {
26 m_uScriptHash = XFA_HASHCODE_Event; 26 m_uScriptHash = XFA_HASHCODE_Event;
27 } 27 }
28 CScript_EventPseudoModel::~CScript_EventPseudoModel() {} 28 CScript_EventPseudoModel::~CScript_EventPseudoModel() {}
29 void Script_EventPseudoModel_StringProperty(FXJSE_HVALUE hValue, 29 void Script_EventPseudoModel_StringProperty(FXJSE_HVALUE hValue,
30 CFX_WideString& wsValue, 30 CFX_WideString& wsValue,
31 FX_BOOL bSetting) { 31 FX_BOOL bSetting) {
32 if (bSetting) { 32 if (bSetting) {
33 CFX_ByteString bsValue; 33 CFX_ByteString bsValue;
34 FXJSE_Value_ToUTF8String(hValue, bsValue); 34 FXJSE_Value_ToUTF8String(hValue, bsValue);
35 wsValue = CFX_WideString::FromUTF8(bsValue.AsByteStringC()); 35 wsValue = CFX_WideString::FromUTF8(bsValue.AsStringC());
36 } else { 36 } else {
37 FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsValue).AsByteStringC()); 37 FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsValue).AsStringC());
38 } 38 }
39 } 39 }
40 void Script_EventPseudoModel_InterProperty(FXJSE_HVALUE hValue, 40 void Script_EventPseudoModel_InterProperty(FXJSE_HVALUE hValue,
41 int32_t& iValue, 41 int32_t& iValue,
42 FX_BOOL bSetting) { 42 FX_BOOL bSetting) {
43 if (bSetting) { 43 if (bSetting) {
44 iValue = FXJSE_Value_ToInteger(hValue); 44 iValue = FXJSE_Value_ToInteger(hValue);
45 } else { 45 } else {
46 FXJSE_Value_SetInteger(hValue, iValue); 46 FXJSE_Value_SetInteger(hValue, iValue);
47 } 47 }
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 CXFA_ScriptContext* pScriptContext = m_pDocument->GetScriptContext(); 265 CXFA_ScriptContext* pScriptContext = m_pDocument->GetScriptContext();
266 if (!pScriptContext) { 266 if (!pScriptContext) {
267 return; 267 return;
268 } 268 }
269 CXFA_EventParam* pEventParam = pScriptContext->GetEventParam(); 269 CXFA_EventParam* pEventParam = pScriptContext->GetEventParam();
270 if (!pEventParam) { 270 if (!pEventParam) {
271 return; 271 return;
272 } 272 }
273 pEventParam->Reset(); 273 pEventParam->Reset();
274 } 274 }
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/xfa_parser_imp.cpp ('k') | xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698