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

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

Issue 1882043004: Remove implicit cast from CFX_WideString to (const wchar_t*) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: win error #2 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_nodehelper.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_imp.h" 7 #include "xfa/fxfa/parser/xfa_script_imp.h"
8 8
9 #include "core/fxcrt/include/fx_ext.h" 9 #include "core/fxcrt/include/fx_ext.h"
10 #include "xfa/fxfa/app/xfa_ffnotify.h" 10 #include "xfa/fxfa/app/xfa_ffnotify.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 CXFA_ScriptContext* lpScriptContext = 174 CXFA_ScriptContext* lpScriptContext =
175 (CXFA_ScriptContext*)pDoc->GetScriptContext(); 175 (CXFA_ScriptContext*)pDoc->GetScriptContext();
176 CXFA_Object* lpCurNode = lpScriptContext->GetVariablesThis(pOrginalObject); 176 CXFA_Object* lpCurNode = lpScriptContext->GetVariablesThis(pOrginalObject);
177 CFX_WideString wsPropName = CFX_WideString::FromUTF8(szPropName); 177 CFX_WideString wsPropName = CFX_WideString::FromUTF8(szPropName);
178 if (lpScriptContext->GetType() == XFA_SCRIPTLANGTYPE_Formcalc) { 178 if (lpScriptContext->GetType() == XFA_SCRIPTLANGTYPE_Formcalc) {
179 if (szPropName == FOXIT_XFA_FM2JS_FORMCALC_RUNTIME) { 179 if (szPropName == FOXIT_XFA_FM2JS_FORMCALC_RUNTIME) {
180 XFA_FM2JS_GlobalPropertyGetter(lpScriptContext->m_hFM2JSContext, hValue); 180 XFA_FM2JS_GlobalPropertyGetter(lpScriptContext->m_hFM2JSContext, hValue);
181 return; 181 return;
182 } 182 }
183 uint32_t uHashCode = 183 uint32_t uHashCode =
184 FX_HashCode_String_GetW(wsPropName, wsPropName.GetLength()); 184 FX_HashCode_String_GetW(wsPropName.c_str(), wsPropName.GetLength());
185 if (uHashCode != XFA_HASHCODE_Layout) { 185 if (uHashCode != XFA_HASHCODE_Layout) {
186 CXFA_Object* pObject = 186 CXFA_Object* pObject =
187 lpScriptContext->GetDocument()->GetXFAObject(uHashCode); 187 lpScriptContext->GetDocument()->GetXFAObject(uHashCode);
188 if (pObject) { 188 if (pObject) {
189 FXJSE_Value_Set(hValue, lpScriptContext->GetJSValueFromMap(pObject)); 189 FXJSE_Value_Set(hValue, lpScriptContext->GetJSValueFromMap(pObject));
190 return; 190 return;
191 } 191 }
192 } 192 }
193 } 193 }
194 uint32_t dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties | 194 uint32_t dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties |
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 } 768 }
769 } 769 }
770 void CXFA_ScriptContext::AddNodesOfRunScript(CXFA_Node* pNode) { 770 void CXFA_ScriptContext::AddNodesOfRunScript(CXFA_Node* pNode) {
771 if (!m_pScriptNodeArray) { 771 if (!m_pScriptNodeArray) {
772 return; 772 return;
773 } 773 }
774 if (m_pScriptNodeArray->Find(pNode) == -1) { 774 if (m_pScriptNodeArray->Find(pNode) == -1) {
775 m_pScriptNodeArray->Add(pNode); 775 m_pScriptNodeArray->Add(pNode);
776 } 776 }
777 } 777 }
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/xfa_parser_imp.cpp ('k') | xfa/fxfa/parser/xfa_script_nodehelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698