diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-05-04 12:09:52 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-05-04 16:24:55 +0000 |
commit | df673c28191cca181ef526d02f24b4a7a6f5e200 (patch) | |
tree | 8fe9304aa58e3c0045bba5140f6b6fbb322d7ea7 /xfa/fde | |
parent | c5fc83c50dee0968bd3c16e69ca84300531c6391 (diff) | |
download | pdfium-df673c28191cca181ef526d02f24b4a7a6f5e200.tar.xz |
Cleanup more null IFX_Pause parameters
This Cl cleans up more IFX_Pause parameters which are always null.
Change-Id: Ia48600f06216db64a2db8e6e97222a91bd4ba149
Reviewed-on: https://pdfium-review.googlesource.com/4890
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'xfa/fde')
-rw-r--r-- | xfa/fde/cfde_txtedtbuf.h | 2 | ||||
-rw-r--r-- | xfa/fde/cfde_txtedtengine.cpp | 6 | ||||
-rw-r--r-- | xfa/fde/cfde_txtedtengine.h | 2 | ||||
-rw-r--r-- | xfa/fde/cfde_txtedtpage.cpp | 8 | ||||
-rw-r--r-- | xfa/fde/cfde_txtedtpage.h | 2 |
5 files changed, 7 insertions, 13 deletions
diff --git a/xfa/fde/cfde_txtedtbuf.h b/xfa/fde/cfde_txtedtbuf.h index 096ce6bf77..39187f48a3 100644 --- a/xfa/fde/cfde_txtedtbuf.h +++ b/xfa/fde/cfde_txtedtbuf.h @@ -15,8 +15,6 @@ #include "core/fxcrt/fx_system.h" #include "core/fxcrt/ifx_chariter.h" -class IFX_Pause; - class CFDE_TxtEdtBuf { public: class Iterator : public IFX_CharIter { diff --git a/xfa/fde/cfde_txtedtengine.cpp b/xfa/fde/cfde_txtedtengine.cpp index 7bd9259b5f..a8445b028e 100644 --- a/xfa/fde/cfde_txtedtengine.cpp +++ b/xfa/fde/cfde_txtedtengine.cpp @@ -622,7 +622,7 @@ int32_t CFDE_TxtEdtEngine::StartLayout() { return 0; } -int32_t CFDE_TxtEdtEngine::DoLayout(IFX_Pause* pPause) { +int32_t CFDE_TxtEdtEngine::DoLayout() { int32_t nCount = pdfium::CollectionSize<int32_t>(m_ParagPtrArray); CFDE_TxtEdtParag* pParag = nullptr; int32_t nLineCount = 0; @@ -630,10 +630,6 @@ int32_t CFDE_TxtEdtEngine::DoLayout(IFX_Pause* pPause) { pParag = m_ParagPtrArray[m_nLayoutPos].get(); pParag->CalcLines(); nLineCount += pParag->GetLineCount(); - if (nLineCount > m_nPageLineCount && pPause && pPause->NeedToPauseNow()) { - m_nLineCount += nLineCount; - return (++m_nLayoutPos * 100) / nCount; - } } m_nLineCount += nLineCount; return 100; diff --git a/xfa/fde/cfde_txtedtengine.h b/xfa/fde/cfde_txtedtengine.h index 3166f1854c..31883fc3c8 100644 --- a/xfa/fde/cfde_txtedtengine.h +++ b/xfa/fde/cfde_txtedtengine.h @@ -68,7 +68,7 @@ class CFDE_TxtEdtEngine { bool Undo(const IFDE_TxtEdtDoRecord* pRecord); int32_t StartLayout(); - int32_t DoLayout(IFX_Pause* pPause); + int32_t DoLayout(); void EndLayout(); int32_t CountParags() const; diff --git a/xfa/fde/cfde_txtedtpage.cpp b/xfa/fde/cfde_txtedtpage.cpp index f0b03af7ca..f3127e7708 100644 --- a/xfa/fde/cfde_txtedtpage.cpp +++ b/xfa/fde/cfde_txtedtpage.cpp @@ -226,18 +226,18 @@ bool CFDE_TxtEdtPage::IsLoaded(const CFX_RectF* pClipBox) { return m_bLoaded; } -int32_t CFDE_TxtEdtPage::LoadPage(const CFX_RectF* pClipBox, - IFX_Pause* pPause) { +int32_t CFDE_TxtEdtPage::LoadPage(const CFX_RectF* pClipBox) { if (m_nRefCount > 0) { m_nRefCount++; return m_nRefCount; } + CFDE_TxtEdtBuf* pBuf = m_pEditEngine->GetTextBuf(); const FDE_TXTEDTPARAMS* pParams = m_pEditEngine->GetEditParams(); wchar_t wcAlias = 0; - if (pParams->dwMode & FDE_TEXTEDITMODE_Password) { + if (pParams->dwMode & FDE_TEXTEDITMODE_Password) wcAlias = m_pEditEngine->GetAliasChar(); - } + m_pIter = pdfium::MakeUnique<CFDE_TxtEdtBuf::Iterator>( static_cast<CFDE_TxtEdtBuf*>(pBuf), wcAlias); CFX_TxtBreak* pBreak = m_pEditEngine->GetTextBreak(); diff --git a/xfa/fde/cfde_txtedtpage.h b/xfa/fde/cfde_txtedtpage.h index beebdad2af..c715c45062 100644 --- a/xfa/fde/cfde_txtedtpage.h +++ b/xfa/fde/cfde_txtedtpage.h @@ -42,7 +42,7 @@ class CFDE_TxtEdtPage : public IFDE_VisualSet { FXTEXT_CHARPOS*& pCharPos, CFX_RectF* pBBox) const; bool IsLoaded(const CFX_RectF* pClipBox); - int32_t LoadPage(const CFX_RectF* pClipBox, IFX_Pause* pPause); + int32_t LoadPage(const CFX_RectF* pClipBox); void UnloadPage(const CFX_RectF* pClipBox); const CFX_RectF& GetContentsBox(); |