diff options
author | dsinclair <dsinclair@chromium.org> | 2016-11-15 12:33:06 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-11-15 12:33:06 -0800 |
commit | 38eaf4b11383e24a00192132b683cc07e38622a6 (patch) | |
tree | 169f9d48784035519ddee9191aa412cc817a4531 /xfa/fde/cfde_txtedtengine.cpp | |
parent | 05b9a317d66c29f740e4b0e89ea87143a11d61fc (diff) | |
download | pdfium-38eaf4b11383e24a00192132b683cc07e38622a6.tar.xz |
Cleanup cfwl_* files.
This Cl cleans up the visibility, method usage and return values in the
remaining CFWL files.
Review-Url: https://codereview.chromium.org/2498163002
Diffstat (limited to 'xfa/fde/cfde_txtedtengine.cpp')
-rw-r--r-- | xfa/fde/cfde_txtedtengine.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/xfa/fde/cfde_txtedtengine.cpp b/xfa/fde/cfde_txtedtengine.cpp index a4cfab2983..e0e788144a 100644 --- a/xfa/fde/cfde_txtedtengine.cpp +++ b/xfa/fde/cfde_txtedtengine.cpp @@ -160,11 +160,11 @@ int32_t CFDE_TxtEdtEngine::GetTextLength() const { void CFDE_TxtEdtEngine::GetText(CFX_WideString& wsText, int32_t nStart, - int32_t nCount) { + int32_t nCount) const { int32_t nTextBufLength = GetTextBufLength(); - if (nCount == -1) { + if (nCount == -1) nCount = nTextBufLength - nStart; - } + m_pTxtBuf->GetRange(wsText, nStart, nCount); RecoverParagEnd(wsText); } @@ -646,11 +646,11 @@ void CFDE_TxtEdtEngine::AddSelRange(int32_t nStart, int32_t nCount) { m_Param.pEventSink->On_SelChanged(this); } -int32_t CFDE_TxtEdtEngine::CountSelRanges() { +int32_t CFDE_TxtEdtEngine::CountSelRanges() const { return m_SelRangePtrArr.GetSize(); } -int32_t CFDE_TxtEdtEngine::GetSelRange(int32_t nIndex, int32_t& nStart) { +int32_t CFDE_TxtEdtEngine::GetSelRange(int32_t nIndex, int32_t& nStart) const { nStart = m_SelRangePtrArr[nIndex]->nStart; return m_SelRangePtrArr[nIndex]->nCount; } @@ -1190,7 +1190,7 @@ bool CFDE_TxtEdtEngine::ReplaceParagEnd(FX_WCHAR*& lpText, return bPreIsCR; } -void CFDE_TxtEdtEngine::RecoverParagEnd(CFX_WideString& wsText) { +void CFDE_TxtEdtEngine::RecoverParagEnd(CFX_WideString& wsText) const { FX_WCHAR wc = (m_nFirstLineEnd == FDE_TXTEDIT_LINEEND_CR) ? L'\n' : L'\r'; if (m_nFirstLineEnd == FDE_TXTEDIT_LINEEND_CRLF) { CFX_ArrayTemplate<int32_t> PosArr; |