summaryrefslogtreecommitdiff
path: root/xfa/fde/cfde_txtedtpage.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-08-16 16:36:31 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-08-16 21:39:28 +0000
commita364729be3725adbc9689c1c8c23902df102243b (patch)
tree4d97b4e0a50145996f5b7b487a48c499e67eff82 /xfa/fde/cfde_txtedtpage.h
parenta016857bcee1a09e67bd34e895ef639a3946fa91 (diff)
downloadpdfium-a364729be3725adbc9689c1c8c23902df102243b.tar.xz
Move some CFDE_TxtEdt* methods to the headerschromium/3188
This CL moves several methods from the CFDE_TxtEdt* classes from the .cpp to .h files. As well, the GetCaretRect method is updated to return the rect instead of using an out param. Change-Id: I1288701f47d9ac1c413fbf06627f20b295b18b86 Reviewed-on: https://pdfium-review.googlesource.com/11270 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'xfa/fde/cfde_txtedtpage.h')
-rw-r--r--xfa/fde/cfde_txtedtpage.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/xfa/fde/cfde_txtedtpage.h b/xfa/fde/cfde_txtedtpage.h
index e635ac726a..78814fb612 100644
--- a/xfa/fde/cfde_txtedtpage.h
+++ b/xfa/fde/cfde_txtedtpage.h
@@ -41,25 +41,25 @@ class CFDE_TxtEdtPage {
CFDE_TxtEdtPage(CFDE_TxtEdtEngine* pEngine, int32_t nLineIndex);
~CFDE_TxtEdtPage();
- CFX_RectF GetRect(const FDE_TEXTEDITPIECE& pPiece);
- CFDE_TxtEdtEngine* GetEngine() const;
+ CFX_RectF GetRect(const FDE_TEXTEDITPIECE& pPiece) { return CFX_RectF(); }
+ CFDE_TxtEdtEngine* GetEngine() const { return m_pEditEngine.Get(); }
int32_t GetCharRect(int32_t nIndex, CFX_RectF& rect, bool bBBox) const;
int32_t GetCharIndex(const CFX_PointF& fPoint, bool& bBefore);
void CalcRangeRectArray(int32_t nStart,
int32_t nCount,
std::vector<CFX_RectF>* RectFArr) const;
int32_t SelectWord(const CFX_PointF& fPoint, int32_t& nCount);
- int32_t GetCharStart() const;
- int32_t GetCharCount() const;
+ int32_t GetCharStart() const { return m_nPageStart; }
+ int32_t GetCharCount() const { return m_nCharCount; }
int32_t GetDisplayPos(const CFX_RectF& rtClip,
FXTEXT_CHARPOS*& pCharPos,
CFX_RectF* pBBox) const;
- bool IsLoaded(const CFX_RectF* pClipBox);
+ bool IsLoaded(const CFX_RectF* pClipBox) { return m_bLoaded; }
int32_t LoadPage(const CFX_RectF* pClipBox);
void UnloadPage(const CFX_RectF* pClipBox);
- const CFX_RectF& GetContentsBox();
+ const CFX_RectF& GetContentsBox() { return m_rtPageContents; }
- size_t GetTextPieceCount() const;
+ size_t GetTextPieceCount() const { return m_pTextSet ? m_Pieces.size() : 0; }
const FDE_TEXTEDITPIECE& GetTextPiece(size_t pos) const;
wchar_t GetChar(const FDE_TEXTEDITPIECE* pIdentity, int32_t index) const;