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

Side by Side Diff: xfa/fxfa/parser/xfa_layout_itemlayout.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/parser/xfa_document_serialize.cpp ('k') | xfa/fxfa/parser/xfa_layout_pagemgr_new.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/parser/xfa_layout_itemlayout.h" 7 #include "xfa/fxfa/parser/xfa_layout_itemlayout.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 1371 matching lines...) Expand 10 before | Expand all | Expand 10 after
1382 if (pLayoutNode->TryCData(XFA_ATTRIBUTE_ColumnWidths, wsColumnWidths)) { 1382 if (pLayoutNode->TryCData(XFA_ATTRIBUTE_ColumnWidths, wsColumnWidths)) {
1383 CFX_WideStringArray widths; 1383 CFX_WideStringArray widths;
1384 if (FX_SeparateStringW(wsColumnWidths.c_str(), wsColumnWidths.GetLength(), 1384 if (FX_SeparateStringW(wsColumnWidths.c_str(), wsColumnWidths.GetLength(),
1385 L' ', widths) > 0) { 1385 L' ', widths) > 0) {
1386 int32_t iCols = widths.GetSize(); 1386 int32_t iCols = widths.GetSize();
1387 CFX_WideString wsWidth; 1387 CFX_WideString wsWidth;
1388 for (int32_t i = 0; i < iCols; i++) { 1388 for (int32_t i = 0; i < iCols; i++) {
1389 wsWidth = widths[i]; 1389 wsWidth = widths[i];
1390 wsWidth.TrimLeft(L' '); 1390 wsWidth.TrimLeft(L' ');
1391 if (!wsWidth.IsEmpty()) { 1391 if (!wsWidth.IsEmpty()) {
1392 CXFA_Measurement measure(wsWidth.AsWideStringC()); 1392 CXFA_Measurement measure(wsWidth.AsStringC());
1393 m_rgSpecifiedColumnWidths.Add(measure.ToUnit(XFA_UNIT_Pt)); 1393 m_rgSpecifiedColumnWidths.Add(measure.ToUnit(XFA_UNIT_Pt));
1394 } 1394 }
1395 } 1395 }
1396 } 1396 }
1397 } 1397 }
1398 int32_t iSpecifiedColumnCount = m_rgSpecifiedColumnWidths.GetSize(); 1398 int32_t iSpecifiedColumnCount = m_rgSpecifiedColumnWidths.GetSize();
1399 CXFA_LayoutContext layoutContext; 1399 CXFA_LayoutContext layoutContext;
1400 layoutContext.m_prgSpecifiedColumnWidths = &m_rgSpecifiedColumnWidths; 1400 layoutContext.m_prgSpecifiedColumnWidths = &m_rgSpecifiedColumnWidths;
1401 CXFA_LayoutContext* pLayoutContext = 1401 CXFA_LayoutContext* pLayoutContext =
1402 iSpecifiedColumnCount > 0 ? &layoutContext : NULL; 1402 iSpecifiedColumnCount > 0 ? &layoutContext : NULL;
(...skipping 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after
2964 (int32_t)(uintptr_t)m_PendingNodesCount.GetValueAt(pTemplate); 2964 (int32_t)(uintptr_t)m_PendingNodesCount.GetValueAt(pTemplate);
2965 if (iCount >= iMax) { 2965 if (iCount >= iMax) {
2966 return FALSE; 2966 return FALSE;
2967 } 2967 }
2968 iCount++; 2968 iCount++;
2969 m_PendingNodesCount.SetAt(pTemplate, (void*)(uintptr_t)(iCount)); 2969 m_PendingNodesCount.SetAt(pTemplate, (void*)(uintptr_t)(iCount));
2970 return TRUE; 2970 return TRUE;
2971 } 2971 }
2972 return TRUE; 2972 return TRUE;
2973 } 2973 }
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/xfa_document_serialize.cpp ('k') | xfa/fxfa/parser/xfa_layout_pagemgr_new.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698