diff options
author | weili <weili@chromium.org> | 2016-08-15 12:25:29 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-15 12:25:29 -0700 |
commit | 8e557bd9e7c09f9ce75fbea42f826b74d5cdc54b (patch) | |
tree | 64484433a43f21fa73e89c80eddded27d16a3e48 /xfa/fgas | |
parent | 1099b29f5569004f8a83be93dbe0c31a3620a9e5 (diff) | |
download | pdfium-8e557bd9e7c09f9ce75fbea42f826b74d5cdc54b.tar.xz |
Clean up XFA locale and locale manager
Return unique_ptr for GetLocale(), directly use destructors
instead of Release() functions, use vectors to manage arrays.
Review-Url: https://codereview.chromium.org/2241863002
Diffstat (limited to 'xfa/fgas')
-rw-r--r-- | xfa/fgas/localization/fgas_locale.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/xfa/fgas/localization/fgas_locale.h b/xfa/fgas/localization/fgas_locale.h index 3401d6ca5a..cc565a6d77 100644 --- a/xfa/fgas/localization/fgas_locale.h +++ b/xfa/fgas/localization/fgas_locale.h @@ -54,12 +54,9 @@ enum FX_DATETIMETYPE { class IFX_Locale { public: - virtual ~IFX_Locale() {} - virtual void Release() = 0; - - virtual CFX_WideString GetName() = 0; + virtual CFX_WideString GetName() const = 0; virtual void GetNumbericSymbol(FX_LOCALENUMSYMBOL eType, CFX_WideString& wsNumSymbol) const = 0; virtual void GetDateTimeSymbols(CFX_WideString& wsDtSymbol) const = 0; @@ -85,11 +82,13 @@ class IFX_Locale { class IFX_LocaleMgr { public: virtual ~IFX_LocaleMgr() {} - virtual void Release() = 0; - virtual uint16_t GetDefLocaleID() = 0; + + virtual uint16_t GetDefLocaleID() const = 0; virtual IFX_Locale* GetDefLocale() = 0; - virtual IFX_Locale* GetLocale(uint16_t lcid) = 0; virtual IFX_Locale* GetLocaleByName(const CFX_WideString& wsLocaleName) = 0; + + protected: + virtual std::unique_ptr<IFX_Locale> GetLocale(uint16_t lcid) = 0; }; FX_BOOL FX_DateFromCanonical(const CFX_WideString& wsDate, |