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

Side by Side Diff: xfa/fxfa/parser/xfa_script_signaturepseudomodel.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_script_resolveprocessor.cpp ('k') | no next file » | 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_signaturepseudomodel.h" 7 #include "xfa/fxfa/parser/xfa_script_signaturepseudomodel.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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 } 61 }
62 CXFA_FFDoc* hDoc = pNotify->GetHDOC(); 62 CXFA_FFDoc* hDoc = pNotify->GetHDOC();
63 CXFA_NodeList* pNodeList = NULL; 63 CXFA_NodeList* pNodeList = NULL;
64 CFX_WideString wsExpression; 64 CFX_WideString wsExpression;
65 CFX_WideString wsXMLIdent; 65 CFX_WideString wsXMLIdent;
66 if (iLength >= 1) { 66 if (iLength >= 1) {
67 pNodeList = (CXFA_NodeList*)pArguments->GetObject(0); 67 pNodeList = (CXFA_NodeList*)pArguments->GetObject(0);
68 } 68 }
69 if (iLength >= 2) { 69 if (iLength >= 2) {
70 CFX_ByteString bsExpression = pArguments->GetUTF8String(1); 70 CFX_ByteString bsExpression = pArguments->GetUTF8String(1);
71 wsExpression = CFX_WideString::FromUTF8(bsExpression.AsByteStringC()); 71 wsExpression = CFX_WideString::FromUTF8(bsExpression.AsStringC());
72 } 72 }
73 if (iLength >= 3) { 73 if (iLength >= 3) {
74 CFX_ByteString bsXMLIdent = pArguments->GetUTF8String(2); 74 CFX_ByteString bsXMLIdent = pArguments->GetUTF8String(2);
75 wsXMLIdent = CFX_WideString::FromUTF8(bsXMLIdent.AsByteStringC()); 75 wsXMLIdent = CFX_WideString::FromUTF8(bsXMLIdent.AsStringC());
76 } 76 }
77 FX_BOOL bSign = pNotify->GetDocProvider()->Sign(hDoc, pNodeList, 77 FX_BOOL bSign = pNotify->GetDocProvider()->Sign(
78 wsExpression.AsWideStringC(), 78 hDoc, pNodeList, wsExpression.AsStringC(), wsXMLIdent.AsStringC());
79 wsXMLIdent.AsWideStringC());
80 FXJSE_HVALUE hValue = pArguments->GetReturnValue(); 79 FXJSE_HVALUE hValue = pArguments->GetReturnValue();
81 if (hValue) { 80 if (hValue) {
82 FXJSE_Value_SetBoolean(hValue, bSign); 81 FXJSE_Value_SetBoolean(hValue, bSign);
83 } 82 }
84 } 83 }
85 void CScript_SignaturePseudoModel::Script_SignaturePseudoModel_Enumerate( 84 void CScript_SignaturePseudoModel::Script_SignaturePseudoModel_Enumerate(
86 CFXJSE_Arguments* pArguments) { 85 CFXJSE_Arguments* pArguments) {
87 int32_t iLength = pArguments->GetLength(); 86 int32_t iLength = pArguments->GetLength();
88 if (iLength != 0) { 87 if (iLength != 0) {
89 ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"enumerate"); 88 ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"enumerate");
(...skipping 29 matching lines...) Expand all
119 } 118 }
120 if (iLength >= 2) { 119 if (iLength >= 2) {
121 bClear = pArguments->GetInt32(1) == 0 ? FALSE : TRUE; 120 bClear = pArguments->GetInt32(1) == 0 ? FALSE : TRUE;
122 } 121 }
123 FX_BOOL bFlag = pNotify->GetDocProvider()->Clear(hDoc, pNode, bClear); 122 FX_BOOL bFlag = pNotify->GetDocProvider()->Clear(hDoc, pNode, bClear);
124 FXJSE_HVALUE hValue = pArguments->GetReturnValue(); 123 FXJSE_HVALUE hValue = pArguments->GetReturnValue();
125 if (hValue) { 124 if (hValue) {
126 FXJSE_Value_SetBoolean(hValue, bFlag); 125 FXJSE_Value_SetBoolean(hValue, bFlag);
127 } 126 }
128 } 127 }
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/xfa_script_resolveprocessor.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698