From ee02ea37e8f85920885600d56df706d690e648ff Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 29 Oct 2015 15:01:55 -0700 Subject: XFA: Manual merge of Clean up IFX_BidiChar - Replace IFX_BidiChar with just CFX_BidiChar - Document implementation - Change out parameters to pointers - Remove dead code - Add an enum for bidi directions - Move several externs to a header - Add unit tests Original CL: https://codereview.chromium.org/1197643002 This version does not remove fx_arb.h and fx_arabic.h, as there is code on the XFA branch that still uses parts of it. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1423103002 . --- core/src/fxcrt/fx_arabic.h | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) (limited to 'core/src/fxcrt/fx_arabic.h') diff --git a/core/src/fxcrt/fx_arabic.h b/core/src/fxcrt/fx_arabic.h index 83893e3774..8fde73d5d9 100644 --- a/core/src/fxcrt/fx_arabic.h +++ b/core/src/fxcrt/fx_arabic.h @@ -23,9 +23,9 @@ class CFX_ArabicChar : public IFX_ArabicChar { const CFX_Char* next) const; protected: - FX_LPCARBFORMTABLE ParseChar(const CFX_Char* pTC, - FX_WCHAR& wChar, - FX_CHARTYPE& eType) const; + const FX_ARBFORMTABLE* ParseChar(const CFX_Char* pTC, + FX_WCHAR& wChar, + FX_CHARTYPE& eType) const; }; void FX_BidiReverseString(CFX_WideString& wsText, int32_t iStart, @@ -207,25 +207,5 @@ int32_t FX_BidiReorderLevel(int32_t iBaseLevel, void FX_BidiReorder(int32_t iBaseLevel, CFX_WideString& wsText, const CFX_Int32Array& levels); -class CFX_BidiChar final : public IFX_BidiChar { - public: - CFX_BidiChar(); - ~CFX_BidiChar() override {} - - void SetPolicy(FX_BOOL bSeparateNeutral = TRUE) override; - FX_BOOL AppendChar(FX_WCHAR wch) override; - FX_BOOL EndChar() override; - int32_t GetBidiInfo(int32_t& iStart, int32_t& iCount) override; - void Reset() override; - - private: - FX_BOOL m_bSeparateNeutral; - int32_t m_iCurStart; - int32_t m_iCurCount; - int32_t m_iCurBidi; - int32_t m_iLastBidi; - int32_t m_iLastStart; - int32_t m_iLastCount; -}; #endif // CORE_SRC_FXCRT_FX_ARABIC_H_ -- cgit v1.2.3