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

Unified Diff: xfa/fxfa/parser/xfa_localemgr.h

Issue 2241863002: Clean up XFA locale and locale manager (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: small fix Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxfa/parser/xfa_locale.cpp ('k') | xfa/fxfa/parser/xfa_localemgr.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/parser/xfa_localemgr.h
diff --git a/xfa/fxfa/parser/xfa_localemgr.h b/xfa/fxfa/parser/xfa_localemgr.h
index 7051fc9ac399a3b87493e5793bb9c60745299ac0..51c6a3b5fb0c31c608541cdeead40266e82b40c7 100644
--- a/xfa/fxfa/parser/xfa_localemgr.h
+++ b/xfa/fxfa/parser/xfa_localemgr.h
@@ -7,6 +7,9 @@
#ifndef XFA_FXFA_PARSER_XFA_LOCALEMGR_H_
#define XFA_FXFA_PARSER_XFA_LOCALEMGR_H_
+#include <memory>
+#include <vector>
+
#include "xfa/fgas/localization/fgas_datetime.h"
#include "xfa/fgas/localization/fgas_locale.h"
#include "xfa/fxfa/parser/xfa_localemgr.h"
@@ -36,19 +39,19 @@ class CXFA_LocaleMgr : public IFX_LocaleMgr {
~CXFA_LocaleMgr() override;
// IFX_LocaleMgr
- void Release() override;
- uint16_t GetDefLocaleID() override;
+ uint16_t GetDefLocaleID() const override;
IFX_Locale* GetDefLocale() override;
- IFX_Locale* GetLocale(uint16_t lcid) override;
IFX_Locale* GetLocaleByName(const CFX_WideString& wsLocaleName) override;
void SetDefLocale(IFX_Locale* pLocale);
CFX_WideStringC GetConfigLocaleName(CXFA_Node* pConfig);
protected:
- CFX_ArrayTemplate<IFX_Locale*> m_LocaleArray;
- CFX_ArrayTemplate<IFX_Locale*> m_XMLLocaleArray;
- IFX_Locale* m_pDefLocale;
+ std::unique_ptr<IFX_Locale> GetLocale(uint16_t lcid) override;
+
+ std::vector<std::unique_ptr<IFX_Locale>> m_LocaleArray;
+ std::vector<std::unique_ptr<IFX_Locale>> m_XMLLocaleArray;
+ IFX_Locale* m_pDefLocale; // owned by m_LocaleArray or m_XMLLocaleArray.
CFX_WideString m_wsConfigLocale;
uint16_t m_dwDeflcid;
uint16_t m_dwLocaleFlags;
« no previous file with comments | « xfa/fxfa/parser/xfa_locale.cpp ('k') | xfa/fxfa/parser/xfa_localemgr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698