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

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

Issue 1857073002: Make down-conversion explicit from CFX_Widetring to CFX_WideStringC. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: String argument type 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') | xfa/include/fxfa/xfa_ffwidget.h » ('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_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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 = 71 wsExpression =
72 CFX_WideString::FromUTF8(bsExpression, bsExpression.GetLength()); 72 CFX_WideString::FromUTF8(bsExpression, bsExpression.GetLength());
73 } 73 }
74 if (iLength >= 3) { 74 if (iLength >= 3) {
75 CFX_ByteString bsXMLIdent = pArguments->GetUTF8String(2); 75 CFX_ByteString bsXMLIdent = pArguments->GetUTF8String(2);
76 wsXMLIdent = CFX_WideString::FromUTF8(bsXMLIdent, bsXMLIdent.GetLength()); 76 wsXMLIdent = CFX_WideString::FromUTF8(bsXMLIdent, bsXMLIdent.GetLength());
77 } 77 }
78 FX_BOOL bSign = pNotify->GetDocProvider()->Sign(hDoc, pNodeList, wsExpression, 78 FX_BOOL bSign = pNotify->GetDocProvider()->Sign(hDoc, pNodeList,
79 wsXMLIdent); 79 wsExpression.AsWideStringC(),
80 wsXMLIdent.AsWideStringC());
80 FXJSE_HVALUE hValue = pArguments->GetReturnValue(); 81 FXJSE_HVALUE hValue = pArguments->GetReturnValue();
81 if (hValue) { 82 if (hValue) {
82 FXJSE_Value_SetBoolean(hValue, bSign); 83 FXJSE_Value_SetBoolean(hValue, bSign);
83 } 84 }
84 } 85 }
85 void CScript_SignaturePseudoModel::Script_SignaturePseudoModel_Enumerate( 86 void CScript_SignaturePseudoModel::Script_SignaturePseudoModel_Enumerate(
86 CFXJSE_Arguments* pArguments) { 87 CFXJSE_Arguments* pArguments) {
87 int32_t iLength = pArguments->GetLength(); 88 int32_t iLength = pArguments->GetLength();
88 if (iLength != 0) { 89 if (iLength != 0) {
89 ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"enumerate"); 90 ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"enumerate");
(...skipping 29 matching lines...) Expand all
119 } 120 }
120 if (iLength >= 2) { 121 if (iLength >= 2) {
121 bClear = pArguments->GetInt32(1) == 0 ? FALSE : TRUE; 122 bClear = pArguments->GetInt32(1) == 0 ? FALSE : TRUE;
122 } 123 }
123 FX_BOOL bFlag = pNotify->GetDocProvider()->Clear(hDoc, pNode, bClear); 124 FX_BOOL bFlag = pNotify->GetDocProvider()->Clear(hDoc, pNode, bClear);
124 FXJSE_HVALUE hValue = pArguments->GetReturnValue(); 125 FXJSE_HVALUE hValue = pArguments->GetReturnValue();
125 if (hValue) { 126 if (hValue) {
126 FXJSE_Value_SetBoolean(hValue, bFlag); 127 FXJSE_Value_SetBoolean(hValue, bFlag);
127 } 128 }
128 } 129 }
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/xfa_script_resolveprocessor.cpp ('k') | xfa/include/fxfa/xfa_ffwidget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698