Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: xfa/fde/cfde_txtedtengine.cpp

Issue 2614383003: Add CFDE_TxtEdtBuf tests (Closed)
Patch Set: Review feedback Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fde/cfde_txtedtengine.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "xfa/fde/cfde_txtedtengine.h" 7 #include "xfa/fde/cfde_txtedtengine.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 m_nCaret = nLength; 668 m_nCaret = nLength;
669 } 669 }
670 int32_t nIndex = m_nCaret; 670 int32_t nIndex = m_nCaret;
671 if (!m_bBefore) { 671 if (!m_bBefore) {
672 nIndex--; 672 nIndex--;
673 } 673 }
674 m_rtCaret.Set(0, 0, 1, m_Param.fFontSize); 674 m_rtCaret.Set(0, 0, 1, m_Param.fFontSize);
675 Unlock(); 675 Unlock();
676 } 676 }
677 677
678 bool CFDE_TxtEdtEngine::Optimize(IFX_Pause* pPause) {
679 return m_pTxtBuf->Optimize(pPause);
680 }
681
682 CFDE_TxtEdtBuf* CFDE_TxtEdtEngine::GetTextBuf() const { 678 CFDE_TxtEdtBuf* CFDE_TxtEdtEngine::GetTextBuf() const {
683 return m_pTxtBuf.get(); 679 return m_pTxtBuf.get();
684 } 680 }
685 681
686 int32_t CFDE_TxtEdtEngine::GetTextBufLength() const { 682 int32_t CFDE_TxtEdtEngine::GetTextBufLength() const {
687 return m_pTxtBuf->GetTextLength() - 1; 683 return m_pTxtBuf->GetTextLength() - 1;
688 } 684 }
689 685
690 CFX_TxtBreak* CFDE_TxtEdtEngine::GetTextBreak() const { 686 CFX_TxtBreak* CFDE_TxtEdtEngine::GetTextBreak() const {
691 return m_pTextBreak.get(); 687 return m_pTextBreak.get();
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after
1477 m_SelRangePtrArr.RemoveAt(nCountRange); 1473 m_SelRangePtrArr.RemoveAt(nCountRange);
1478 DeleteRange_DoRecord(nSelStart, nSelCount, true); 1474 DeleteRange_DoRecord(nSelStart, nSelCount, true);
1479 } 1475 }
1480 ClearSelection(); 1476 ClearSelection();
1481 m_Param.pEventSink->OnTextChanged(m_ChangeInfo); 1477 m_Param.pEventSink->OnTextChanged(m_ChangeInfo);
1482 m_Param.pEventSink->OnSelChanged(); 1478 m_Param.pEventSink->OnSelChanged();
1483 SetCaretPos(nSelStart, true); 1479 SetCaretPos(nSelStart, true);
1484 return; 1480 return;
1485 } 1481 }
1486 } 1482 }
OLDNEW
« no previous file with comments | « xfa/fde/cfde_txtedtengine.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698