summaryrefslogtreecommitdiff
path: root/xfa/fgas/localization/fgas_locale.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-03-16 16:55:43 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-03-16 21:55:57 +0000
commit939121f33f9bb02c207094b5b3e78e69be992b84 (patch)
treed42477d9ded35bb5ad3d751a61bab644f83c73e2 /xfa/fgas/localization/fgas_locale.h
parent79e548eb98caefd3ea0f0e4806a7abca6654e7dc (diff)
downloadpdfium-939121f33f9bb02c207094b5b3e78e69be992b84.tar.xz
Cleanup some fgas locale code.
This Cl cleans up a bit of the locale code in fgas, removing unused code and cleaning up some of the other code. Change-Id: Ieb18df552cf5d803c1bbdbfe11a4f5a88c4b3af3 Reviewed-on: https://pdfium-review.googlesource.com/3094 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'xfa/fgas/localization/fgas_locale.h')
-rw-r--r--xfa/fgas/localization/fgas_locale.h47
1 files changed, 9 insertions, 38 deletions
diff --git a/xfa/fgas/localization/fgas_locale.h b/xfa/fgas/localization/fgas_locale.h
index 42f20f1c0f..ffcbb36b8d 100644
--- a/xfa/fgas/localization/fgas_locale.h
+++ b/xfa/fgas/localization/fgas_locale.h
@@ -80,18 +80,6 @@ class IFX_Locale {
CFX_WideString& wsPattern) const = 0;
};
-class IFX_LocaleMgr {
- public:
- virtual ~IFX_LocaleMgr() {}
-
- virtual uint16_t GetDefLocaleID() const = 0;
- virtual IFX_Locale* GetDefLocale() = 0;
- virtual IFX_Locale* GetLocaleByName(const CFX_WideString& wsLocaleName) = 0;
-
- protected:
- virtual std::unique_ptr<IFX_Locale> GetLocale(uint16_t lcid) = 0;
-};
-
bool FX_DateFromCanonical(const CFX_WideString& wsDate, CFX_Unitime& datetime);
bool FX_TimeFromCanonical(const CFX_WideStringC& wsTime,
CFX_Unitime& datetime,
@@ -102,45 +90,28 @@ class CFX_Decimal {
explicit CFX_Decimal(uint32_t val);
explicit CFX_Decimal(uint64_t val);
explicit CFX_Decimal(int32_t val);
- explicit CFX_Decimal(int64_t val);
- explicit CFX_Decimal(float val, uint8_t scale = 3);
+ explicit CFX_Decimal(float val, uint8_t scale);
explicit CFX_Decimal(const CFX_WideStringC& str);
- explicit CFX_Decimal(const CFX_ByteStringC& str);
+
operator CFX_WideString() const;
operator double() const;
- bool operator==(const CFX_Decimal& val) const;
- bool operator<=(const CFX_Decimal& val) const;
- bool operator>=(const CFX_Decimal& val) const;
- bool operator!=(const CFX_Decimal& val) const;
- bool operator<(const CFX_Decimal& val) const;
- bool operator>(const CFX_Decimal& val) const;
- CFX_Decimal operator+(const CFX_Decimal& val) const;
- CFX_Decimal operator-(const CFX_Decimal& val) const;
+
CFX_Decimal operator*(const CFX_Decimal& val) const;
CFX_Decimal operator/(const CFX_Decimal& val) const;
- CFX_Decimal operator%(const CFX_Decimal& val) const;
+
void SetScale(uint8_t newScale);
uint8_t GetScale();
- void SetAbs();
void SetNegate();
- void SetFloor();
- void SetCeiling();
- void SetTruncate();
- protected:
+ private:
CFX_Decimal(uint32_t hi, uint32_t mid, uint32_t lo, bool neg, uint8_t scale);
- inline bool IsNotZero() const { return m_uHi || m_uMid || m_uLo; }
- inline int8_t Compare(const CFX_Decimal& val) const;
- inline void Swap(CFX_Decimal& val);
- inline void FloorOrCeil(bool bFloor);
- CFX_Decimal AddOrMinus(const CFX_Decimal& val, bool isAdding) const;
- CFX_Decimal Multiply(const CFX_Decimal& val) const;
- CFX_Decimal Divide(const CFX_Decimal& val) const;
- CFX_Decimal Modulus(const CFX_Decimal& val) const;
- uint32_t m_uFlags;
+ bool IsNotZero() const { return m_uHi || m_uMid || m_uLo; }
+ void Swap(CFX_Decimal& val);
+
uint32_t m_uHi;
uint32_t m_uLo;
uint32_t m_uMid;
+ uint32_t m_uFlags;
};
#endif // XFA_FGAS_LOCALIZATION_FGAS_LOCALE_H_