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

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

Issue 1885973002: Remove implicit cast from CFX_ByteString to (const char*). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Typo 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_locale.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_object.h" 7 #include "xfa/fxfa/parser/xfa_object.h"
8 8
9 #include "core/fxcrt/include/fx_ext.h" 9 #include "core/fxcrt/include/fx_ext.h"
10 #include "xfa/fde/xml/fde_xml_imp.h" 10 #include "xfa/fde/xml/fde_xml_imp.h"
(...skipping 1712 matching lines...) Expand 10 before | Expand all | Expand 10 after
1723 } 1723 }
1724 } 1724 }
1725 void CXFA_Node::Script_Boolean_Value(FXJSE_HVALUE hValue, 1725 void CXFA_Node::Script_Boolean_Value(FXJSE_HVALUE hValue,
1726 FX_BOOL bSetting, 1726 FX_BOOL bSetting,
1727 XFA_ATTRIBUTE eAttribute) { 1727 XFA_ATTRIBUTE eAttribute) {
1728 if (bSetting) { 1728 if (bSetting) {
1729 CFX_ByteString newValue; 1729 CFX_ByteString newValue;
1730 if (!(FXJSE_Value_IsNull(hValue) || FXJSE_Value_IsUndefined(hValue))) { 1730 if (!(FXJSE_Value_IsNull(hValue) || FXJSE_Value_IsUndefined(hValue))) {
1731 FXJSE_Value_ToUTF8String(hValue, newValue); 1731 FXJSE_Value_ToUTF8String(hValue, newValue);
1732 } 1732 }
1733 int32_t iValue = FXSYS_atoi(newValue); 1733 int32_t iValue = FXSYS_atoi(newValue.c_str());
1734 CFX_WideString wsNewValue = (iValue == 0) ? FX_WSTRC(L"0") : FX_WSTRC(L"1"); 1734 CFX_WideString wsNewValue = (iValue == 0) ? FX_WSTRC(L"0") : FX_WSTRC(L"1");
1735 CFX_WideString wsFormatValue(wsNewValue); 1735 CFX_WideString wsFormatValue(wsNewValue);
1736 CXFA_WidgetData* pContainerWidgetData = GetContainerWidgetData(); 1736 CXFA_WidgetData* pContainerWidgetData = GetContainerWidgetData();
1737 if (pContainerWidgetData) { 1737 if (pContainerWidgetData) {
1738 pContainerWidgetData->GetFormatDataValue(wsNewValue.AsStringC(), 1738 pContainerWidgetData->GetFormatDataValue(wsNewValue.AsStringC(),
1739 wsFormatValue); 1739 wsFormatValue);
1740 } 1740 }
1741 SetScriptContent(wsNewValue, wsFormatValue, TRUE, TRUE); 1741 SetScriptContent(wsNewValue, wsFormatValue, TRUE, TRUE);
1742 } else { 1742 } else {
1743 CFX_WideString wsValue = GetScriptContent(TRUE); 1743 CFX_WideString wsValue = GetScriptContent(TRUE);
(...skipping 3657 matching lines...) Expand 10 before | Expand all | Expand 10 after
5401 return m_pAttachNode->InsertChild(pNewNode, pBeforeNode); 5401 return m_pAttachNode->InsertChild(pNewNode, pBeforeNode);
5402 } 5402 }
5403 FX_BOOL CXFA_AttachNodeList::Remove(CXFA_Node* pNode) { 5403 FX_BOOL CXFA_AttachNodeList::Remove(CXFA_Node* pNode) {
5404 return m_pAttachNode->RemoveChild(pNode); 5404 return m_pAttachNode->RemoveChild(pNode);
5405 } 5405 }
5406 CXFA_Node* CXFA_AttachNodeList::Item(int32_t iIndex) { 5406 CXFA_Node* CXFA_AttachNodeList::Item(int32_t iIndex) {
5407 return m_pAttachNode->GetChild( 5407 return m_pAttachNode->GetChild(
5408 iIndex, XFA_ELEMENT_UNKNOWN, 5408 iIndex, XFA_ELEMENT_UNKNOWN,
5409 m_pAttachNode->GetClassID() == XFA_ELEMENT_Subform); 5409 m_pAttachNode->GetClassID() == XFA_ELEMENT_Subform);
5410 } 5410 }
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/xfa_locale.cpp ('k') | xfa/fxfa/parser/xfa_script_imp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698