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

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

Issue 1979723003: Make CFX_WideString(const CFX_WideString&) explicit. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Override Created 4 years, 7 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_imp.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_hostpseudomodel.h" 7 #include "xfa/fxfa/parser/xfa_script_hostpseudomodel.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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 } 156 }
157 CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify(); 157 CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
158 if (!pNotify) { 158 if (!pNotify) {
159 return; 159 return;
160 } 160 }
161 CXFA_FFDoc* hDoc = pNotify->GetHDOC(); 161 CXFA_FFDoc* hDoc = pNotify->GetHDOC();
162 if (bSetting) { 162 if (bSetting) {
163 CFX_ByteString bsValue; 163 CFX_ByteString bsValue;
164 FXJSE_Value_ToUTF8String(hValue, bsValue); 164 FXJSE_Value_ToUTF8String(hValue, bsValue);
165 pNotify->GetDocProvider()->SetTitle( 165 pNotify->GetDocProvider()->SetTitle(
166 hDoc, CFX_WideString::FromUTF8(bsValue.AsStringC()).AsStringC()); 166 hDoc, CFX_WideString::FromUTF8(bsValue.AsStringC()));
167 return; 167 return;
168 } 168 }
169 CFX_WideString wsTitle; 169 CFX_WideString wsTitle;
170 pNotify->GetDocProvider()->GetTitle(hDoc, wsTitle); 170 pNotify->GetDocProvider()->GetTitle(hDoc, wsTitle);
171 FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsTitle).AsStringC()); 171 FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsTitle).AsStringC());
172 } 172 }
173 void CScript_HostPseudoModel::Script_HostPseudoModel_ValidationsEnabled( 173 void CScript_HostPseudoModel::Script_HostPseudoModel_ValidationsEnabled(
174 FXJSE_HVALUE hValue, 174 FXJSE_HVALUE hValue,
175 FX_BOOL bSetting, 175 FX_BOOL bSetting,
176 XFA_ATTRIBUTE eAttribute) { 176 XFA_ATTRIBUTE eAttribute) {
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify(); 795 CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
796 if (!pNotify) { 796 if (!pNotify) {
797 return; 797 return;
798 } 798 }
799 CFX_WideString wsDataTime = pNotify->GetCurrentDateTime(); 799 CFX_WideString wsDataTime = pNotify->GetCurrentDateTime();
800 FXJSE_HVALUE hValue = pArguments->GetReturnValue(); 800 FXJSE_HVALUE hValue = pArguments->GetReturnValue();
801 if (hValue) { 801 if (hValue) {
802 FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsDataTime).AsStringC()); 802 FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsDataTime).AsStringC());
803 } 803 }
804 } 804 }
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/xfa_parser_imp.cpp ('k') | xfa/fxfa/parser/xfa_script_imp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698