diff options
author | Tom Sepez <tsepez@chromium.org> | 2016-03-01 11:34:03 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2016-03-01 11:34:03 -0800 |
commit | 50dfc4a7068e8e08105f7b9a3945136e7246e677 (patch) | |
tree | a292ef9ae17bfabcb20c94505320dc6c5f6e6258 /xfa/src/fee | |
parent | 23835e3eadc276e4235cbb0a56c8e19ebf7a58f9 (diff) | |
download | pdfium-50dfc4a7068e8e08105f7b9a3945136e7246e677.tar.xz |
Replace FX_LPCRECT typedef with underlying types
Helps with transparency. Also remove default args and
use override consistently in the affected methods.
R=dsinclair@chromium.org
Review URL: https://codereview.chromium.org/1751093002 .
Diffstat (limited to 'xfa/src/fee')
-rw-r--r-- | xfa/src/fee/include/ifde_txtedtpage.h | 9 | ||||
-rw-r--r-- | xfa/src/fee/src/fee/fde_txtedtpage.cpp | 9 | ||||
-rw-r--r-- | xfa/src/fee/src/fee/fde_txtedtpage.h | 77 |
3 files changed, 49 insertions, 46 deletions
diff --git a/xfa/src/fee/include/ifde_txtedtpage.h b/xfa/src/fee/include/ifde_txtedtpage.h index c16e94febf..884b752d82 100644 --- a/xfa/src/fee/include/ifde_txtedtpage.h +++ b/xfa/src/fee/include/ifde_txtedtpage.h @@ -32,11 +32,10 @@ class IFDE_TxtEdtPage : public IFDE_CanvasSet, public IFX_TxtAccess { virtual int32_t GetDisplayPos(const CFX_RectF& rtClip, FXTEXT_CHARPOS*& pCharPos, - FX_LPRECTF pBBox = NULL) const = 0; - virtual FX_BOOL IsLoaded(FX_LPCRECTF pClipBox = NULL) = 0; - virtual int32_t LoadPage(FX_LPCRECTF pClipBox = NULL, - IFX_Pause* pPause = NULL) = 0; - virtual void UnloadPage(FX_LPCRECTF pClipBox = NULL) = 0; + CFX_RectF* pBBox) const = 0; + virtual FX_BOOL IsLoaded(const CFX_RectF* pClipBox) = 0; + virtual int32_t LoadPage(const CFX_RectF* pClipBox, IFX_Pause* pPause) = 0; + virtual void UnloadPage(const CFX_RectF* pClipBox) = 0; virtual const CFX_RectF& GetContentsBox() = 0; }; diff --git a/xfa/src/fee/src/fee/fde_txtedtpage.cpp b/xfa/src/fee/src/fee/fde_txtedtpage.cpp index 40d0155b45..14e7a94a8b 100644 --- a/xfa/src/fee/src/fee/fde_txtedtpage.cpp +++ b/xfa/src/fee/src/fee/fde_txtedtpage.cpp @@ -290,7 +290,7 @@ int32_t CFDE_TxtEdtPage::GetCharCount() const { } int32_t CFDE_TxtEdtPage::GetDisplayPos(const CFX_RectF& rtClip, FXTEXT_CHARPOS*& pCharPos, - FX_LPRECTF pBBox) const { + CFX_RectF* pBBox) const { pCharPos = FX_Alloc(FXTEXT_CHARPOS, m_nCharCount); int32_t nCharPosCount = 0; FDE_HVISUALOBJ hVisualObj = NULL; @@ -376,10 +376,11 @@ int32_t CFDE_TxtEdtPage::SelectWord(const CFX_PointF& fPoint, int32_t& nCount) { pIter->Release(); return nRet; } -FX_BOOL CFDE_TxtEdtPage::IsLoaded(FX_LPCRECTF pClipBox) { +FX_BOOL CFDE_TxtEdtPage::IsLoaded(const CFX_RectF* pClipBox) { return m_bLoaded; } -int32_t CFDE_TxtEdtPage::LoadPage(FX_LPCRECTF pClipBox, IFX_Pause* pPause) { +int32_t CFDE_TxtEdtPage::LoadPage(const CFX_RectF* pClipBox, + IFX_Pause* pPause) { if (m_nRefCount > 0) { m_nRefCount++; return m_nRefCount; @@ -558,7 +559,7 @@ int32_t CFDE_TxtEdtPage::LoadPage(FX_LPCRECTF pClipBox, IFX_Pause* pPause) { m_bLoaded = TRUE; return 0; } -void CFDE_TxtEdtPage::UnloadPage(FX_LPCRECTF pClipBox) { +void CFDE_TxtEdtPage::UnloadPage(const CFX_RectF* pClipBox) { FXSYS_assert(m_nRefCount > 0); m_nRefCount--; if (m_nRefCount == 0) { diff --git a/xfa/src/fee/src/fee/fde_txtedtpage.h b/xfa/src/fee/src/fee/fde_txtedtpage.h index cc7ff244b7..9b67b6f486 100644 --- a/xfa/src/fee/src/fee/fde_txtedtpage.h +++ b/xfa/src/fee/src/fee/fde_txtedtpage.h @@ -99,42 +99,45 @@ class CFDE_TxtEdtPage : public IFDE_TxtEdtPage { public: CFDE_TxtEdtPage(IFDE_TxtEdtEngine* pEngine, int32_t nLineIndex); - virtual void Release(); - virtual IFDE_TxtEdtEngine* GetEngine() const; - - virtual FDE_VISUALOBJTYPE GetType(); - virtual FX_BOOL GetBBox(FDE_HVISUALOBJ hVisualObj, CFX_RectF& bbox); - virtual FX_BOOL GetMatrix(FDE_HVISUALOBJ hVisualObj, CFX_Matrix& matrix); - virtual FX_BOOL GetRect(FDE_HVISUALOBJ hVisualObj, CFX_RectF& rt); - virtual FX_BOOL GetClip(FDE_HVISUALOBJ hVisualObj, CFX_RectF& rt); - virtual int32_t GetCharRect(int32_t nIndex, - CFX_RectF& rect, - FX_BOOL bBBox = FALSE) const; - virtual int32_t GetCharIndex(const CFX_PointF& fPoint, FX_BOOL& bBefore); - virtual int32_t SelectWord(const CFX_PointF& fPoint, int32_t& nCount); - virtual int32_t GetCharStart() const; - virtual int32_t GetCharCount() const; - virtual void CalcRangeRectArray(int32_t nStart, - int32_t nCount, - CFX_RectFArray& RectFArr) const; - virtual int32_t GetDisplayPos(const CFX_RectF& rtClip, - FXTEXT_CHARPOS*& pCharPos, - FX_LPRECTF pBBox) const; - - virtual FX_BOOL IsLoaded(FX_LPCRECTF pClipBox = NULL); - virtual int32_t LoadPage(FX_LPCRECTF pClipBox = NULL, - IFX_Pause* pPause = NULL); - virtual void UnloadPage(FX_LPCRECTF pClipBox = NULL); - - virtual const CFX_RectF& GetContentsBox(); - virtual FX_POSITION GetFirstPosition(FDE_HVISUALOBJ hCanvas); - virtual FDE_HVISUALOBJ GetNext(FDE_HVISUALOBJ hCanvas, - FX_POSITION& pos, - IFDE_VisualSet*& pVisualSet); - virtual FDE_HVISUALOBJ GetParentCanvas(FDE_HVISUALOBJ hCanvas, - IFDE_VisualSet*& pVisualSet); - virtual FX_WCHAR GetChar(void* pIdentity, int32_t index) const; - virtual int32_t GetWidth(void* pIdentity, int32_t index) const; + // IFDE_TxtEditPage: + void Release() override; + IFDE_TxtEdtEngine* GetEngine() const override; + int32_t GetCharRect(int32_t nIndex, + CFX_RectF& rect, + FX_BOOL bBBox = FALSE) const override; + int32_t GetCharIndex(const CFX_PointF& fPoint, FX_BOOL& bBefore) override; + void CalcRangeRectArray(int32_t nStart, + int32_t nCount, + CFX_RectFArray& RectFArr) const override; + int32_t SelectWord(const CFX_PointF& fPoint, int32_t& nCount) override; + int32_t GetCharStart() const override; + int32_t GetCharCount() const override; + int32_t GetDisplayPos(const CFX_RectF& rtClip, + FXTEXT_CHARPOS*& pCharPos, + CFX_RectF* pBBox) const override; + FX_BOOL IsLoaded(const CFX_RectF* pClipBox) override; + int32_t LoadPage(const CFX_RectF* pClipBox, IFX_Pause* pPause) override; + void UnloadPage(const CFX_RectF* pClipBox) override; + const CFX_RectF& GetContentsBox() override; + + // IFDE_VisualSet: + FDE_VISUALOBJTYPE GetType() override; + FX_BOOL GetBBox(FDE_HVISUALOBJ hVisualObj, CFX_RectF& bbox) override; + FX_BOOL GetMatrix(FDE_HVISUALOBJ hVisualObj, CFX_Matrix& matrix) override; + FX_BOOL GetRect(FDE_HVISUALOBJ hVisualObj, CFX_RectF& rt) override; + FX_BOOL GetClip(FDE_HVISUALOBJ hVisualObj, CFX_RectF& rt) override; + + // IFDE_CanvasSet: + FX_POSITION GetFirstPosition(FDE_HVISUALOBJ hCanvas) override; + FDE_HVISUALOBJ GetNext(FDE_HVISUALOBJ hCanvas, + FX_POSITION& pos, + IFDE_VisualSet*& pVisualSet) override; + FDE_HVISUALOBJ GetParentCanvas(FDE_HVISUALOBJ hCanvas, + IFDE_VisualSet*& pVisualSet) override; + + // IFX_TxtAccess: + FX_WCHAR GetChar(void* pIdentity, int32_t index) const override; + int32_t GetWidth(void* pIdentity, int32_t index) const override; protected: virtual ~CFDE_TxtEdtPage(); @@ -143,13 +146,13 @@ class CFDE_TxtEdtPage : public IFDE_TxtEdtPage { void NormalizePt2Rect(CFX_PointF& ptF, const CFX_RectF& rtF, FX_FLOAT fTolerance) const; + IFX_CharIter* m_pIter; CFDE_TxtEdtTextSet* m_pTextSet; CFDE_TxtEdtEngine* m_pEditEngine; CFDE_TXTEDTPieceMassArray m_PieceMassArr; CFDE_TxtEdtParag* m_pBgnParag; CFDE_TxtEdtParag* m_pEndParag; - int32_t m_nRefCount; int32_t m_nPageStart; int32_t m_nCharCount; |