| OLD | NEW |
| 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 } | 319 } |
| 320 | 320 |
| 321 int32_t CXFA_TextParser::GetVAlgin(CXFA_TextProvider* pTextProvider) const { | 321 int32_t CXFA_TextParser::GetVAlgin(CXFA_TextProvider* pTextProvider) const { |
| 322 CXFA_Para para = pTextProvider->GetParaNode(); | 322 CXFA_Para para = pTextProvider->GetParaNode(); |
| 323 return para ? para.GetVerticalAlign() : XFA_ATTRIBUTEENUM_Top; | 323 return para ? para.GetVerticalAlign() : XFA_ATTRIBUTEENUM_Top; |
| 324 } | 324 } |
| 325 | 325 |
| 326 FX_FLOAT CXFA_TextParser::GetTabInterval(IFDE_CSSComputedStyle* pStyle) const { | 326 FX_FLOAT CXFA_TextParser::GetTabInterval(IFDE_CSSComputedStyle* pStyle) const { |
| 327 CFX_WideString wsValue; | 327 CFX_WideString wsValue; |
| 328 if (pStyle && pStyle->GetCustomStyle(FX_WSTRC(L"tab-interval"), wsValue)) | 328 if (pStyle && pStyle->GetCustomStyle(FX_WSTRC(L"tab-interval"), wsValue)) |
| 329 return CXFA_Measurement(wsValue.AsWideStringC()).ToUnit(XFA_UNIT_Pt); | 329 return CXFA_Measurement(wsValue.AsStringC()).ToUnit(XFA_UNIT_Pt); |
| 330 return 36; | 330 return 36; |
| 331 } | 331 } |
| 332 | 332 |
| 333 int32_t CXFA_TextParser::CountTabs(IFDE_CSSComputedStyle* pStyle) const { | 333 int32_t CXFA_TextParser::CountTabs(IFDE_CSSComputedStyle* pStyle) const { |
| 334 CFX_WideString wsValue; | 334 CFX_WideString wsValue; |
| 335 if (pStyle && pStyle->GetCustomStyle(FX_WSTRC(L"xfa-tab-count"), wsValue)) | 335 if (pStyle && pStyle->GetCustomStyle(FX_WSTRC(L"xfa-tab-count"), wsValue)) |
| 336 return wsValue.GetInteger(); | 336 return wsValue.GetInteger(); |
| 337 return 0; | 337 return 0; |
| 338 } | 338 } |
| 339 | 339 |
| (...skipping 1651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1991 tr.iLength = iLength; | 1991 tr.iLength = iLength; |
| 1992 tr.fFontSize = pPiece->fFontSize; | 1992 tr.fFontSize = pPiece->fFontSize; |
| 1993 tr.iBidiLevel = pPiece->iBidiLevel; | 1993 tr.iBidiLevel = pPiece->iBidiLevel; |
| 1994 tr.iCharRotation = 0; | 1994 tr.iCharRotation = 0; |
| 1995 tr.wLineBreakChar = L'\n'; | 1995 tr.wLineBreakChar = L'\n'; |
| 1996 tr.iVerticalScale = pPiece->iVerScale; | 1996 tr.iVerticalScale = pPiece->iVerScale; |
| 1997 tr.dwLayoutStyles = FX_RTFLAYOUTSTYLE_ExpandTab; | 1997 tr.dwLayoutStyles = FX_RTFLAYOUTSTYLE_ExpandTab; |
| 1998 tr.iHorizontalScale = pPiece->iHorScale; | 1998 tr.iHorizontalScale = pPiece->iHorScale; |
| 1999 return TRUE; | 1999 return TRUE; |
| 2000 } | 2000 } |
| OLD | NEW |