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

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

Issue 2089443002: Convert XFA_ELEMENT to an enum class (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: More unknown checks 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/parser/xfa_locale.cpp ('k') | xfa/fxfa/parser/xfa_object.h » ('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_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 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after
1242 return pLocale; 1242 return pLocale;
1243 } 1243 }
1244 void CXFA_LocaleMgr::SetDefLocale(IFX_Locale* pLocale) { 1244 void CXFA_LocaleMgr::SetDefLocale(IFX_Locale* pLocale) {
1245 m_pDefLocale = pLocale; 1245 m_pDefLocale = pLocale;
1246 } 1246 }
1247 CFX_WideStringC CXFA_LocaleMgr::GetConfigLocaleName(CXFA_Node* pConfig) { 1247 CFX_WideStringC CXFA_LocaleMgr::GetConfigLocaleName(CXFA_Node* pConfig) {
1248 if (!(m_dwLocaleFlags & 0x01)) { 1248 if (!(m_dwLocaleFlags & 0x01)) {
1249 m_wsConfigLocale.clear(); 1249 m_wsConfigLocale.clear();
1250 if (pConfig) { 1250 if (pConfig) {
1251 CXFA_Node* pChildfConfig = 1251 CXFA_Node* pChildfConfig =
1252 pConfig->GetFirstChildByClass(XFA_ELEMENT_Acrobat); 1252 pConfig->GetFirstChildByClass(XFA_Element::Acrobat);
1253 if (!pChildfConfig) { 1253 if (!pChildfConfig) {
1254 pChildfConfig = pConfig->GetFirstChildByClass(XFA_ELEMENT_Present); 1254 pChildfConfig = pConfig->GetFirstChildByClass(XFA_Element::Present);
1255 } 1255 }
1256 CXFA_Node* pCommon = 1256 CXFA_Node* pCommon =
1257 pChildfConfig 1257 pChildfConfig
1258 ? pChildfConfig->GetFirstChildByClass(XFA_ELEMENT_Common) 1258 ? pChildfConfig->GetFirstChildByClass(XFA_Element::Common)
1259 : NULL; 1259 : NULL;
1260 CXFA_Node* pLocale = 1260 CXFA_Node* pLocale =
1261 pCommon ? pCommon->GetFirstChildByClass(XFA_ELEMENT_Locale) : NULL; 1261 pCommon ? pCommon->GetFirstChildByClass(XFA_Element::Locale) : NULL;
1262 if (pLocale) { 1262 if (pLocale) {
1263 pLocale->TryCData(XFA_ATTRIBUTE_Value, m_wsConfigLocale, FALSE); 1263 pLocale->TryCData(XFA_ATTRIBUTE_Value, m_wsConfigLocale, FALSE);
1264 } 1264 }
1265 } 1265 }
1266 m_dwLocaleFlags |= 0x01; 1266 m_dwLocaleFlags |= 0x01;
1267 } 1267 }
1268 return m_wsConfigLocale.AsStringC(); 1268 return m_wsConfigLocale.AsStringC();
1269 } 1269 }
1270 static CXFA_TimeZoneProvider* g_pProvider = NULL; 1270 static CXFA_TimeZoneProvider* g_pProvider = NULL;
1271 1271
(...skipping 30 matching lines...) Expand all
1302 m_tz.tzMinute = (int8_t)((FXSYS_abs((int)timezone) % 3600) / 60); 1302 m_tz.tzMinute = (int8_t)((FXSYS_abs((int)timezone) % 3600) / 60);
1303 #endif 1303 #endif
1304 } 1304 }
1305 CXFA_TimeZoneProvider::~CXFA_TimeZoneProvider() {} 1305 CXFA_TimeZoneProvider::~CXFA_TimeZoneProvider() {}
1306 void CXFA_TimeZoneProvider::SetTimeZone(FX_TIMEZONE& tz) { 1306 void CXFA_TimeZoneProvider::SetTimeZone(FX_TIMEZONE& tz) {
1307 m_tz = tz; 1307 m_tz = tz;
1308 } 1308 }
1309 void CXFA_TimeZoneProvider::GetTimeZone(FX_TIMEZONE& tz) { 1309 void CXFA_TimeZoneProvider::GetTimeZone(FX_TIMEZONE& tz) {
1310 tz = m_tz; 1310 tz = m_tz;
1311 } 1311 }
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/xfa_locale.cpp ('k') | xfa/fxfa/parser/xfa_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698