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

Side by Side Diff: xfa/fee/fde_txtedtengine.cpp

Issue 1896893003: Cleanup FDE interfaces. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 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/tto/fde_textout.cpp ('k') | xfa/fwl/basewidget/fwl_editimp.cpp » ('j') | 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/fee/fde_txtedtengine.h" 7 #include "xfa/fee/fde_txtedtengine.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 1491 matching lines...) Expand 10 before | Expand all | Expand 10 after
1502 FX_BOOL CFDE_TxtEdtEngine::MoveHome() { 1502 FX_BOOL CFDE_TxtEdtEngine::MoveHome() {
1503 UpdateCaretRect(0, TRUE); 1503 UpdateCaretRect(0, TRUE);
1504 return TRUE; 1504 return TRUE;
1505 } 1505 }
1506 FX_BOOL CFDE_TxtEdtEngine::MoveEnd() { 1506 FX_BOOL CFDE_TxtEdtEngine::MoveEnd() {
1507 UpdateCaretRect(GetTextBufLength(), TRUE); 1507 UpdateCaretRect(GetTextBufLength(), TRUE);
1508 return TRUE; 1508 return TRUE;
1509 } 1509 }
1510 1510
1511 FX_BOOL CFDE_TxtEdtEngine::IsFitArea(CFX_WideString& wsText) { 1511 FX_BOOL CFDE_TxtEdtEngine::IsFitArea(CFX_WideString& wsText) {
1512 IFDE_TextOut* pTextOut = IFDE_TextOut::Create(); 1512 CFDE_TextOut* pTextOut = new CFDE_TextOut;
1513 pTextOut->SetLineSpace(m_Param.fLineSpace); 1513 pTextOut->SetLineSpace(m_Param.fLineSpace);
1514 pTextOut->SetFont(m_Param.pFont); 1514 pTextOut->SetFont(m_Param.pFont);
1515 pTextOut->SetFontSize(m_Param.fFontSize); 1515 pTextOut->SetFontSize(m_Param.fFontSize);
1516 CFX_RectF rcText; 1516 CFX_RectF rcText;
1517 FXSYS_memset(&rcText, 0, sizeof(rcText)); 1517 FXSYS_memset(&rcText, 0, sizeof(rcText));
1518 uint32_t dwStyle = 0; 1518 uint32_t dwStyle = 0;
1519 if (!(m_Param.dwMode & FDE_TEXTEDITMODE_MultiLines)) { 1519 if (!(m_Param.dwMode & FDE_TEXTEDITMODE_MultiLines)) {
1520 dwStyle |= FDE_TTOSTYLE_SingleLine; 1520 dwStyle |= FDE_TTOSTYLE_SingleLine;
1521 } 1521 }
1522 if (m_Param.dwMode & FDE_TEXTEDITMODE_AutoLineWrap) { 1522 if (m_Param.dwMode & FDE_TEXTEDITMODE_AutoLineWrap) {
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
1776 int32_t nEngine = 0; 1776 int32_t nEngine = 0;
1777 ArchiveLoader >> nEngine; 1777 ArchiveLoader >> nEngine;
1778 m_pEngine = (CFDE_TxtEdtEngine*)(uintptr_t)nEngine; 1778 m_pEngine = (CFDE_TxtEdtEngine*)(uintptr_t)nEngine;
1779 int32_t iSel = 0; 1779 int32_t iSel = 0;
1780 ArchiveLoader >> iSel; 1780 ArchiveLoader >> iSel;
1781 m_bSel = !!iSel; 1781 m_bSel = !!iSel;
1782 ArchiveLoader >> m_nIndex; 1782 ArchiveLoader >> m_nIndex;
1783 ArchiveLoader >> m_nCaret; 1783 ArchiveLoader >> m_nCaret;
1784 ArchiveLoader >> m_wsRange; 1784 ArchiveLoader >> m_wsRange;
1785 } 1785 }
OLDNEW
« no previous file with comments | « xfa/fde/tto/fde_textout.cpp ('k') | xfa/fwl/basewidget/fwl_editimp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698