From 5a0214b38862ebb761342cd6708b8afe1192e1b8 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 16 Aug 2017 14:08:21 -0400 Subject: 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 Reviewed-by: Henrique Nakashima Commit-Queue: dsinclair --- xfa/fde/cfde_txtedtengine.cpp | 1 - xfa/fde/cfde_txtedtengine.h | 4 +--- xfa/fde/cfde_txtedtpage.cpp | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) (limited to 'xfa/fde') 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; -- cgit v1.2.3