| OLD | NEW |
| 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_locale.h" | 7 #include "xfa/fxfa/parser/xfa_locale.h" |
| 8 | 8 |
| 9 #include "core/fxcrt/include/fx_xml.h" | 9 #include "core/fxcrt/include/fx_xml.h" |
| 10 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" | 10 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 } | 219 } |
| 220 } | 220 } |
| 221 CXFA_NodeLocale::CXFA_NodeLocale(CXFA_Node* pLocale) { | 221 CXFA_NodeLocale::CXFA_NodeLocale(CXFA_Node* pLocale) { |
| 222 m_pLocale = pLocale; | 222 m_pLocale = pLocale; |
| 223 } | 223 } |
| 224 CXFA_NodeLocale::~CXFA_NodeLocale() {} | 224 CXFA_NodeLocale::~CXFA_NodeLocale() {} |
| 225 void CXFA_NodeLocale::Release() { | 225 void CXFA_NodeLocale::Release() { |
| 226 delete this; | 226 delete this; |
| 227 } | 227 } |
| 228 CFX_WideString CXFA_NodeLocale::GetName() { | 228 CFX_WideString CXFA_NodeLocale::GetName() { |
| 229 return m_pLocale ? m_pLocale->GetCData(XFA_ATTRIBUTE_Name) : NULL; | 229 return CFX_WideString(m_pLocale ? m_pLocale->GetCData(XFA_ATTRIBUTE_Name) |
| 230 : nullptr); |
| 230 } | 231 } |
| 231 void CXFA_NodeLocale::GetNumbericSymbol(FX_LOCALENUMSYMBOL eType, | 232 void CXFA_NodeLocale::GetNumbericSymbol(FX_LOCALENUMSYMBOL eType, |
| 232 CFX_WideString& wsNumSymbol) const { | 233 CFX_WideString& wsNumSymbol) const { |
| 233 switch (eType) { | 234 switch (eType) { |
| 234 case FX_LOCALENUMSYMBOL_Decimal: | 235 case FX_LOCALENUMSYMBOL_Decimal: |
| 235 wsNumSymbol = GetSymbol(XFA_ELEMENT_NumberSymbols, FX_WSTRC(L"decimal")); | 236 wsNumSymbol = GetSymbol(XFA_ELEMENT_NumberSymbols, FX_WSTRC(L"decimal")); |
| 236 break; | 237 break; |
| 237 case FX_LOCALENUMSYMBOL_Grouping: | 238 case FX_LOCALENUMSYMBOL_Grouping: |
| 238 wsNumSymbol = GetSymbol(XFA_ELEMENT_NumberSymbols, FX_WSTRC(L"grouping")); | 239 wsNumSymbol = GetSymbol(XFA_ELEMENT_NumberSymbols, FX_WSTRC(L"grouping")); |
| 239 break; | 240 break; |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 CXFA_Node* pNode = pCalendar->GetFirstChildByClass(eElement); | 366 CXFA_Node* pNode = pCalendar->GetFirstChildByClass(eElement); |
| 366 for (; pNode; pNode = pNode->GetNextSameClassSibling(eElement)) { | 367 for (; pNode; pNode = pNode->GetNextSameClassSibling(eElement)) { |
| 367 if (pNode->GetBoolean(XFA_ATTRIBUTE_Abbr) == bAbbr) { | 368 if (pNode->GetBoolean(XFA_ATTRIBUTE_Abbr) == bAbbr) { |
| 368 CXFA_Node* pSymbol = pNode->GetChild(index, XFA_ELEMENT_UNKNOWN); | 369 CXFA_Node* pSymbol = pNode->GetChild(index, XFA_ELEMENT_UNKNOWN); |
| 369 return pSymbol ? pSymbol->GetContent() : CFX_WideString(); | 370 return pSymbol ? pSymbol->GetContent() : CFX_WideString(); |
| 370 } | 371 } |
| 371 } | 372 } |
| 372 } | 373 } |
| 373 return CFX_WideString(); | 374 return CFX_WideString(); |
| 374 } | 375 } |
| OLD | NEW |