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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 bsSymbols = "currencySymbols"; | 69 bsSymbols = "currencySymbols"; |
70 wsName = FX_WSTRC(L"isoname"); | 70 wsName = FX_WSTRC(L"isoname"); |
71 break; | 71 break; |
72 default: | 72 default: |
73 return; | 73 return; |
74 } | 74 } |
75 CXML_Element* pElement = m_pLocaleData->GetElement("", bsSymbols.AsStringC()); | 75 CXML_Element* pElement = m_pLocaleData->GetElement("", bsSymbols.AsStringC()); |
76 if (!pElement) { | 76 if (!pElement) { |
77 return; | 77 return; |
78 } | 78 } |
79 GetPattern(pElement, CFX_ByteStringC((const FX_CHAR*)bsSymbols, | 79 GetPattern(pElement, |
80 bsSymbols.GetLength() - 1), | 80 CFX_ByteStringC(bsSymbols.c_str(), bsSymbols.GetLength() - 1), |
81 wsName.AsStringC(), wsNumSymbol); | 81 wsName.AsStringC(), wsNumSymbol); |
82 } | 82 } |
83 void CXFA_XMLLocale::GetDateTimeSymbols(CFX_WideString& wsDtSymbol) const { | 83 void CXFA_XMLLocale::GetDateTimeSymbols(CFX_WideString& wsDtSymbol) const { |
84 if (!m_pLocaleData) { | 84 if (!m_pLocaleData) { |
85 return; | 85 return; |
86 } | 86 } |
87 CFX_ByteString bsSpace; | 87 CFX_ByteString bsSpace; |
88 CXML_Element* pNumberSymbols = | 88 CXML_Element* pNumberSymbols = |
89 m_pLocaleData->GetElement(bsSpace.AsStringC(), "dateTimeSymbols"); | 89 m_pLocaleData->GetElement(bsSpace.AsStringC(), "dateTimeSymbols"); |
90 if (!pNumberSymbols) { | 90 if (!pNumberSymbols) { |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 CXFA_Node* pNode = pCalendar->GetFirstChildByClass(eElement); | 367 CXFA_Node* pNode = pCalendar->GetFirstChildByClass(eElement); |
368 for (; pNode; pNode = pNode->GetNextSameClassSibling(eElement)) { | 368 for (; pNode; pNode = pNode->GetNextSameClassSibling(eElement)) { |
369 if (pNode->GetBoolean(XFA_ATTRIBUTE_Abbr) == bAbbr) { | 369 if (pNode->GetBoolean(XFA_ATTRIBUTE_Abbr) == bAbbr) { |
370 CXFA_Node* pSymbol = pNode->GetChild(index, XFA_ELEMENT_UNKNOWN); | 370 CXFA_Node* pSymbol = pNode->GetChild(index, XFA_ELEMENT_UNKNOWN); |
371 return pSymbol ? pSymbol->GetContent() : CFX_WideString(); | 371 return pSymbol ? pSymbol->GetContent() : CFX_WideString(); |
372 } | 372 } |
373 } | 373 } |
374 } | 374 } |
375 return CFX_WideString(); | 375 return CFX_WideString(); |
376 } | 376 } |
OLD | NEW |