| 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_localemgr.h" | 7 #include "xfa/fxfa/parser/xfa_localemgr.h" |
| 8 | 8 |
| 9 #include "core/fxcodec/include/fx_codec.h" | 9 #include "core/fxcodec/include/fx_codec.h" |
| 10 #include "core/fxcrt/include/fx_xml.h" | 10 #include "core/fxcrt/include/fx_xml.h" |
| (...skipping 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1116 break; | 1116 break; |
| 1117 case FXBSTR_ID(0, 0, 'r', 'u'): | 1117 case FXBSTR_ID(0, 0, 'r', 'u'): |
| 1118 dwLangueID = XFA_LANGID_ru_RU; | 1118 dwLangueID = XFA_LANGID_ru_RU; |
| 1119 break; | 1119 break; |
| 1120 } | 1120 } |
| 1121 return dwLangueID; | 1121 return dwLangueID; |
| 1122 } | 1122 } |
| 1123 CXFA_LocaleMgr::CXFA_LocaleMgr(CXFA_Node* pLocaleSet, CFX_WideString wsDeflcid) | 1123 CXFA_LocaleMgr::CXFA_LocaleMgr(CXFA_Node* pLocaleSet, CFX_WideString wsDeflcid) |
| 1124 : m_dwLocaleFlags(0x00) { | 1124 : m_dwLocaleFlags(0x00) { |
| 1125 m_dwDeflcid = XFA_GetLanguage(wsDeflcid); | 1125 m_dwDeflcid = XFA_GetLanguage(wsDeflcid); |
| 1126 CXFA_Node* pNodeLocale = NULL; | 1126 if (pLocaleSet) { |
| 1127 if (pLocaleSet && | 1127 CXFA_Node* pNodeLocale = pLocaleSet->GetNodeItem(XFA_NODEITEM_FirstChild); |
| 1128 (pNodeLocale = pLocaleSet->GetNodeItem(XFA_NODEITEM_FirstChild))) { | |
| 1129 while (pNodeLocale) { | 1128 while (pNodeLocale) { |
| 1130 m_LocaleArray.Add(new CXFA_NodeLocale(pNodeLocale)); | 1129 m_LocaleArray.Add(new CXFA_NodeLocale(pNodeLocale)); |
| 1131 pNodeLocale = pNodeLocale->GetNodeItem(XFA_NODEITEM_NextSibling); | 1130 pNodeLocale = pNodeLocale->GetNodeItem(XFA_NODEITEM_NextSibling); |
| 1132 } | 1131 } |
| 1133 } | 1132 } |
| 1134 m_pDefLocale = GetLocaleByName(wsDeflcid); | 1133 m_pDefLocale = GetLocaleByName(wsDeflcid); |
| 1135 } | 1134 } |
| 1136 CXFA_LocaleMgr::~CXFA_LocaleMgr() { | 1135 CXFA_LocaleMgr::~CXFA_LocaleMgr() { |
| 1137 for (int32_t i = 0; i < m_LocaleArray.GetSize(); i++) | 1136 for (int32_t i = 0; i < m_LocaleArray.GetSize(); i++) |
| 1138 m_LocaleArray[i]->Release(); | 1137 m_LocaleArray[i]->Release(); |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1304 m_tz.tzMinute = (int8_t)((FXSYS_abs((int)timezone) % 3600) / 60); | 1303 m_tz.tzMinute = (int8_t)((FXSYS_abs((int)timezone) % 3600) / 60); |
| 1305 #endif | 1304 #endif |
| 1306 } | 1305 } |
| 1307 CXFA_TimeZoneProvider::~CXFA_TimeZoneProvider() {} | 1306 CXFA_TimeZoneProvider::~CXFA_TimeZoneProvider() {} |
| 1308 void CXFA_TimeZoneProvider::SetTimeZone(FX_TIMEZONE& tz) { | 1307 void CXFA_TimeZoneProvider::SetTimeZone(FX_TIMEZONE& tz) { |
| 1309 m_tz = tz; | 1308 m_tz = tz; |
| 1310 } | 1309 } |
| 1311 void CXFA_TimeZoneProvider::GetTimeZone(FX_TIMEZONE& tz) { | 1310 void CXFA_TimeZoneProvider::GetTimeZone(FX_TIMEZONE& tz) { |
| 1312 tz = m_tz; | 1311 tz = m_tz; |
| 1313 } | 1312 } |
| OLD | NEW |