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

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

Issue 2037563002: Replace IFGAS_Font with underlying concrete type (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 4 years, 6 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_txtedttextset.h ('k') | xfa/fde/fde_gedevice.h » ('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 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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_txtedttextset.h" 7 #include "xfa/fde/cfde_txtedttextset.h"
8 8
9 #include "xfa/fde/cfde_txtedtengine.h" 9 #include "xfa/fde/cfde_txtedtengine.h"
10 #include "xfa/fde/cfde_txtedtpage.h" 10 #include "xfa/fde/cfde_txtedtpage.h"
(...skipping 14 matching lines...) Expand all
25 int32_t CFDE_TxtEdtTextSet::GetString(FDE_TEXTEDITPIECE* pPiece, 25 int32_t CFDE_TxtEdtTextSet::GetString(FDE_TEXTEDITPIECE* pPiece,
26 CFX_WideString& wsText) { 26 CFX_WideString& wsText) {
27 FX_WCHAR* pBuffer = wsText.GetBuffer(pPiece->nCount); 27 FX_WCHAR* pBuffer = wsText.GetBuffer(pPiece->nCount);
28 for (int32_t i = 0; i < pPiece->nCount; i++) { 28 for (int32_t i = 0; i < pPiece->nCount; i++) {
29 pBuffer[i] = m_pPage->GetChar(pPiece, i); 29 pBuffer[i] = m_pPage->GetChar(pPiece, i);
30 } 30 }
31 wsText.ReleaseBuffer(pPiece->nCount); 31 wsText.ReleaseBuffer(pPiece->nCount);
32 return pPiece->nCount; 32 return pPiece->nCount;
33 } 33 }
34 34
35 IFGAS_Font* CFDE_TxtEdtTextSet::GetFont() { 35 CFGAS_GEFont* CFDE_TxtEdtTextSet::GetFont() {
36 return m_pPage->GetEngine()->GetEditParams()->pFont; 36 return m_pPage->GetEngine()->GetEditParams()->pFont;
37 } 37 }
38 38
39 FX_FLOAT CFDE_TxtEdtTextSet::GetFontSize() { 39 FX_FLOAT CFDE_TxtEdtTextSet::GetFontSize() {
40 return m_pPage->GetEngine()->GetEditParams()->fFontSize; 40 return m_pPage->GetEngine()->GetEditParams()->fFontSize;
41 } 41 }
42 42
43 FX_ARGB CFDE_TxtEdtTextSet::GetFontColor() { 43 FX_ARGB CFDE_TxtEdtTextSet::GetFontColor() {
44 return m_pPage->GetEngine()->GetEditParams()->dwFontColor; 44 return m_pPage->GetEngine()->GetEditParams()->dwFontColor;
45 } 45 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 tr.iLength = nLength; 94 tr.iLength = nLength;
95 tr.pFont = pTextParams->pFont; 95 tr.pFont = pTextParams->pFont;
96 tr.fFontSize = pTextParams->fFontSize; 96 tr.fFontSize = pTextParams->fFontSize;
97 tr.dwStyles = dwLayoutStyle; 97 tr.dwStyles = dwLayoutStyle;
98 tr.iCharRotation = pTextParams->nCharRotation; 98 tr.iCharRotation = pTextParams->nCharRotation;
99 tr.dwCharStyles = pPiece->dwCharStyles; 99 tr.dwCharStyles = pPiece->dwCharStyles;
100 tr.pRect = &(pPiece->rtPiece); 100 tr.pRect = &(pPiece->rtPiece);
101 tr.wLineBreakChar = pTextParams->wLineBreakChar; 101 tr.wLineBreakChar = pTextParams->wLineBreakChar;
102 return pEngine->GetTextBreak()->GetCharRects(&tr, rtArray, bBBox); 102 return pEngine->GetTextBreak()->GetCharRects(&tr, rtArray, bBBox);
103 } 103 }
OLDNEW
« no previous file with comments | « xfa/fde/cfde_txtedttextset.h ('k') | xfa/fde/fde_gedevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698