| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |