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

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

Issue 1862123003: Rename both As{Byte,Wide}StringC() helpers to AsStringC(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase, fix new usage. 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/fm2js/xfa_fm2jscontext.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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « xfa/fxfa/app/xfa_textlayout.h ('k') | xfa/fxfa/fm2js/xfa_fm2jscontext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698