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

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

Issue 2467203003: Remove FX_BOOL from xfa. (Closed)
Patch Set: Created 4 years, 1 month 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_localevalue.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 <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 if (!pGeModule) 1041 if (!pGeModule)
1042 return nullptr; 1042 return nullptr;
1043 1043
1044 CCodec_ModuleMgr* pCodecMgr = pGeModule->GetCodecModule(); 1044 CCodec_ModuleMgr* pCodecMgr = pGeModule->GetCodecModule();
1045 if (!pCodecMgr) 1045 if (!pCodecMgr)
1046 return nullptr; 1046 return nullptr;
1047 1047
1048 std::unique_ptr<CXML_Element> pLocale; 1048 std::unique_ptr<CXML_Element> pLocale;
1049 uint8_t* pOut = nullptr; 1049 uint8_t* pOut = nullptr;
1050 uint32_t dwSize; 1050 uint32_t dwSize;
1051 pCodecMgr->GetFlateModule()->FlateOrLZWDecode(FALSE, pBuf, nBufLen, TRUE, 0, 1051 pCodecMgr->GetFlateModule()->FlateOrLZWDecode(false, pBuf, nBufLen, true, 0,
1052 0, 0, 0, 0, pOut, dwSize); 1052 0, 0, 0, 0, pOut, dwSize);
1053 if (pOut) { 1053 if (pOut) {
1054 pLocale.reset(CXML_Element::Parse(pOut, dwSize)); 1054 pLocale.reset(CXML_Element::Parse(pOut, dwSize));
1055 FX_Free(pOut); 1055 FX_Free(pOut);
1056 } 1056 }
1057 return pLocale ? std::unique_ptr<IFX_Locale>( 1057 return pLocale ? std::unique_ptr<IFX_Locale>(
1058 new CXFA_XMLLocale(std::move(pLocale))) 1058 new CXFA_XMLLocale(std::move(pLocale)))
1059 : nullptr; 1059 : nullptr;
1060 } 1060 }
1061 1061
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
1230 pChildfConfig = pConfig->GetFirstChildByClass(XFA_Element::Present); 1230 pChildfConfig = pConfig->GetFirstChildByClass(XFA_Element::Present);
1231 } 1231 }
1232 CXFA_Node* pCommon = 1232 CXFA_Node* pCommon =
1233 pChildfConfig 1233 pChildfConfig
1234 ? pChildfConfig->GetFirstChildByClass(XFA_Element::Common) 1234 ? pChildfConfig->GetFirstChildByClass(XFA_Element::Common)
1235 : nullptr; 1235 : nullptr;
1236 CXFA_Node* pLocale = 1236 CXFA_Node* pLocale =
1237 pCommon ? pCommon->GetFirstChildByClass(XFA_Element::Locale) 1237 pCommon ? pCommon->GetFirstChildByClass(XFA_Element::Locale)
1238 : nullptr; 1238 : nullptr;
1239 if (pLocale) { 1239 if (pLocale) {
1240 pLocale->TryCData(XFA_ATTRIBUTE_Value, m_wsConfigLocale, FALSE); 1240 pLocale->TryCData(XFA_ATTRIBUTE_Value, m_wsConfigLocale, false);
1241 } 1241 }
1242 } 1242 }
1243 m_dwLocaleFlags |= 0x01; 1243 m_dwLocaleFlags |= 0x01;
1244 } 1244 }
1245 return m_wsConfigLocale.AsStringC(); 1245 return m_wsConfigLocale.AsStringC();
1246 } 1246 }
1247 1247
1248 static CXFA_TimeZoneProvider* g_pProvider = nullptr; 1248 static CXFA_TimeZoneProvider* g_pProvider = nullptr;
1249 1249
1250 // Static. 1250 // Static.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1283 1283
1284 CXFA_TimeZoneProvider::~CXFA_TimeZoneProvider() {} 1284 CXFA_TimeZoneProvider::~CXFA_TimeZoneProvider() {}
1285 1285
1286 void CXFA_TimeZoneProvider::SetTimeZone(FX_TIMEZONE& tz) { 1286 void CXFA_TimeZoneProvider::SetTimeZone(FX_TIMEZONE& tz) {
1287 m_tz = tz; 1287 m_tz = tz;
1288 } 1288 }
1289 1289
1290 void CXFA_TimeZoneProvider::GetTimeZone(FX_TIMEZONE& tz) { 1290 void CXFA_TimeZoneProvider::GetTimeZone(FX_TIMEZONE& tz) {
1291 tz = m_tz; 1291 tz = m_tz;
1292 } 1292 }
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/xfa_locale.cpp ('k') | xfa/fxfa/parser/xfa_localevalue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698