diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-08-16 14:08:21 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-08-16 19:32:22 +0000 |
commit | 5a0214b38862ebb761342cd6708b8afe1192e1b8 (patch) | |
tree | 09269eb38d2e6d6540c5b90c5bea0c35cabadc73 | |
parent | a169364e46956875db35fb1baacc4a0a1ee17f08 (diff) | |
download | pdfium-5a0214b38862ebb761342cd6708b8afe1192e1b8.tar.xz |
Remove friendship from TxtEdtEngine and TxtEdtPage
This CL removes the remaining friendship in CFDE_TxtEdtEngine but adding
public methods for CFDE_TxtEdtPage to access.
Change-Id: I9e6420921bc4567a499c8e688c6db51029659ae8
Reviewed-on: https://pdfium-review.googlesource.com/11230
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
-rw-r--r-- | xfa/fde/cfde_txtedtengine.cpp | 1 | ||||
-rw-r--r-- | xfa/fde/cfde_txtedtengine.h | 4 | ||||
-rw-r--r-- | xfa/fde/cfde_txtedtpage.cpp | 2 |
3 files changed, 2 insertions, 5 deletions
diff --git a/xfa/fde/cfde_txtedtengine.cpp b/xfa/fde/cfde_txtedtengine.cpp index 06a2815924..86931737c5 100644 --- a/xfa/fde/cfde_txtedtengine.cpp +++ b/xfa/fde/cfde_txtedtengine.cpp @@ -166,7 +166,6 @@ CFDE_TxtEdtEngine::CFDE_TxtEdtEngine() m_nCaret(0), m_bBefore(true), m_nCaretPage(0), - m_dwFindFlags(0), m_bLock(false), m_nLimit(0), m_wcAliasChar(L'*'), diff --git a/xfa/fde/cfde_txtedtengine.h b/xfa/fde/cfde_txtedtengine.h index 71a07413a0..c4db3e91b1 100644 --- a/xfa/fde/cfde_txtedtengine.h +++ b/xfa/fde/cfde_txtedtengine.h @@ -123,6 +123,7 @@ class CFDE_TxtEdtEngine { const CFX_WideString& wsReplace); void SetLimit(int32_t nLimit); + int32_t GetLimit() const { return m_nLimit; } void SetAliasChar(wchar_t wcAlias); void RemoveSelRange(int32_t nStart, int32_t nCount); @@ -170,8 +171,6 @@ class CFDE_TxtEdtEngine { } private: - friend class CFDE_TxtEdtPage; - struct FDE_TXTEDTSELRANGE { int32_t nStart; int32_t nCount; @@ -237,7 +236,6 @@ class CFDE_TxtEdtEngine { bool m_bBefore; int32_t m_nCaretPage; CFX_RectF m_rtCaret; - uint32_t m_dwFindFlags; bool m_bLock; int32_t m_nLimit; wchar_t m_wcAliasChar; diff --git a/xfa/fde/cfde_txtedtpage.cpp b/xfa/fde/cfde_txtedtpage.cpp index 6f86b8a682..344bc65cf2 100644 --- a/xfa/fde/cfde_txtedtpage.cpp +++ b/xfa/fde/cfde_txtedtpage.cpp @@ -360,7 +360,7 @@ int32_t CFDE_TxtEdtPage::LoadPage(const CFX_RectF* pClipBox) { if ((pParams->dwLayoutStyles & FDE_TEXTEDITLAYOUT_CombText) && m_nCharCount > 1) { int32_t nCount = m_nCharCount - 1; - int32_t n = (m_pEditEngine->m_nLimit - nCount) / 2; + int32_t n = (m_pEditEngine->GetLimit() - nCount) / 2; fDelta = (m_rtPageContents.width / nCount) * n; } else { fDelta = (pParams->fPlateWidth - m_rtPageContents.width) / 2; |