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

Side by Side Diff: xfa/fxfa/app/xfa_textlayout.cpp

Issue 1882213002: Cleanup various IFX_ text 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/fxfa/app/xfa_textlayout.h ('k') | xfa/fxfa/parser/xfa_localevalue.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/fxfa/app/xfa_textlayout.h" 7 #include "xfa/fxfa/app/xfa_textlayout.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 pXMLElement->GetLocalTagName(wsTag); 729 pXMLElement->GetLocalTagName(wsTag);
730 if (wsTag == FX_WSTRC(L"body") || wsTag == FX_WSTRC(L"html")) { 730 if (wsTag == FX_WSTRC(L"body") || wsTag == FX_WSTRC(L"html")) {
731 pXMLContainer = pXMLChild; 731 pXMLContainer = pXMLChild;
732 break; 732 break;
733 } 733 }
734 } 734 }
735 } 735 }
736 } 736 }
737 return pXMLContainer; 737 return pXMLContainer;
738 } 738 }
739 IFX_RTFBreak* CXFA_TextLayout::CreateBreak(FX_BOOL bDefault) { 739 CFX_RTFBreak* CXFA_TextLayout::CreateBreak(FX_BOOL bDefault) {
740 uint32_t dwStyle = FX_RTFLAYOUTSTYLE_ExpandTab; 740 uint32_t dwStyle = FX_RTFLAYOUTSTYLE_ExpandTab;
741 if (!bDefault) { 741 if (!bDefault) {
742 dwStyle |= FX_RTFLAYOUTSTYLE_Pagination; 742 dwStyle |= FX_RTFLAYOUTSTYLE_Pagination;
743 } 743 }
744 IFX_RTFBreak* pBreak = IFX_RTFBreak::Create(0); 744 CFX_RTFBreak* pBreak = new CFX_RTFBreak(0);
745 pBreak->SetLayoutStyles(dwStyle); 745 pBreak->SetLayoutStyles(dwStyle);
746 pBreak->SetLineBreakChar(L'\n'); 746 pBreak->SetLineBreakChar(L'\n');
747 pBreak->SetLineBreakTolerance(1); 747 pBreak->SetLineBreakTolerance(1);
748 pBreak->SetFont(m_textParser.GetFont(m_pTextProvider, NULL)); 748 pBreak->SetFont(m_textParser.GetFont(m_pTextProvider, NULL));
749 pBreak->SetFontSize(m_textParser.GetFontSize(m_pTextProvider, NULL)); 749 pBreak->SetFontSize(m_textParser.GetFontSize(m_pTextProvider, NULL));
750 return pBreak; 750 return pBreak;
751 } 751 }
752 void CXFA_TextLayout::InitBreak(FX_FLOAT fLineWidth) { 752 void CXFA_TextLayout::InitBreak(FX_FLOAT fLineWidth) {
753 CXFA_Font font = m_pTextProvider->GetFontNode(); 753 CXFA_Font font = m_pTextProvider->GetFontNode();
754 CXFA_Para para = m_pTextProvider->GetParaNode(); 754 CXFA_Para para = m_pTextProvider->GetParaNode();
(...skipping 1235 matching lines...) Expand 10 before | Expand all | Expand 10 after
1990 tr.iLength = iLength; 1990 tr.iLength = iLength;
1991 tr.fFontSize = pPiece->fFontSize; 1991 tr.fFontSize = pPiece->fFontSize;
1992 tr.iBidiLevel = pPiece->iBidiLevel; 1992 tr.iBidiLevel = pPiece->iBidiLevel;
1993 tr.iCharRotation = 0; 1993 tr.iCharRotation = 0;
1994 tr.wLineBreakChar = L'\n'; 1994 tr.wLineBreakChar = L'\n';
1995 tr.iVerticalScale = pPiece->iVerScale; 1995 tr.iVerticalScale = pPiece->iVerScale;
1996 tr.dwLayoutStyles = FX_RTFLAYOUTSTYLE_ExpandTab; 1996 tr.dwLayoutStyles = FX_RTFLAYOUTSTYLE_ExpandTab;
1997 tr.iHorizontalScale = pPiece->iHorScale; 1997 tr.iHorizontalScale = pPiece->iHorScale;
1998 return TRUE; 1998 return TRUE;
1999 } 1999 }
OLDNEW
« no previous file with comments | « xfa/fxfa/app/xfa_textlayout.h ('k') | xfa/fxfa/parser/xfa_localevalue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698