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

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

Issue 2032613003: Get rid of NULLs in core/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Fix a bad merge Created 4 years, 6 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/app/xfa_textlayout.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 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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/cxfa_widgetdata.h" 7 #include "xfa/fxfa/parser/cxfa_widgetdata.h"
8 8
9 #include "core/fxcrt/include/fx_ext.h" 9 #include "core/fxcrt/include/fx_ext.h"
10 #include "xfa/fxbarcode/include/BC_Library.h" 10 #include "xfa/fxbarcode/include/BC_Library.h"
(...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 if (!pUIChild) 1064 if (!pUIChild)
1065 return -1; 1065 return -1;
1066 if (CXFA_Node* pNode = pUIChild->GetChild(0, XFA_ELEMENT_Comb)) 1066 if (CXFA_Node* pNode = pUIChild->GetChild(0, XFA_ELEMENT_Comb))
1067 return pNode->GetInteger(XFA_ATTRIBUTE_NumberOfCells); 1067 return pNode->GetInteger(XFA_ATTRIBUTE_NumberOfCells);
1068 return -1; 1068 return -1;
1069 } 1069 }
1070 1070
1071 CFX_WideString CXFA_WidgetData::GetBarcodeType() { 1071 CFX_WideString CXFA_WidgetData::GetBarcodeType() {
1072 CXFA_Node* pUIChild = GetUIChild(); 1072 CXFA_Node* pUIChild = GetUIChild();
1073 return pUIChild ? CFX_WideString(pUIChild->GetCData(XFA_ATTRIBUTE_Type)) 1073 return pUIChild ? CFX_WideString(pUIChild->GetCData(XFA_ATTRIBUTE_Type))
1074 : nullptr; 1074 : CFX_WideString();
1075 } 1075 }
1076 1076
1077 FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_CharEncoding(int32_t& val) { 1077 FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_CharEncoding(int32_t& val) {
1078 CXFA_Node* pUIChild = GetUIChild(); 1078 CXFA_Node* pUIChild = GetUIChild();
1079 CFX_WideString wsCharEncoding; 1079 CFX_WideString wsCharEncoding;
1080 if (pUIChild->TryCData(XFA_ATTRIBUTE_CharEncoding, wsCharEncoding)) { 1080 if (pUIChild->TryCData(XFA_ATTRIBUTE_CharEncoding, wsCharEncoding)) {
1081 if (wsCharEncoding.CompareNoCase(L"UTF-16")) { 1081 if (wsCharEncoding.CompareNoCase(L"UTF-16")) {
1082 val = CHAR_ENCODING_UNICODE; 1082 val = CHAR_ENCODING_UNICODE;
1083 return TRUE; 1083 return TRUE;
1084 } 1084 }
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
1779 } 1779 }
1780 } 1780 }
1781 } else if (wc == L'.') { 1781 } else if (wc == L'.') {
1782 iTread_ = 0; 1782 iTread_ = 0;
1783 iLead = -1; 1783 iLead = -1;
1784 } 1784 }
1785 wsRet += wc; 1785 wsRet += wc;
1786 } 1786 }
1787 return wsRet; 1787 return wsRet;
1788 } 1788 }
OLDNEW
« no previous file with comments | « xfa/fxfa/app/xfa_textlayout.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698