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

Side by Side Diff: xfa/fxfa/parser/xfa_layout_itemlayout.cpp

Issue 1857073002: Make down-conversion explicit from CFX_Widetring to CFX_WideStringC. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: String argument type 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 1370 matching lines...) Expand 10 before | Expand all | Expand 10 after
1381 if (pLayoutNode->TryCData(XFA_ATTRIBUTE_ColumnWidths, wsColumnWidths)) { 1381 if (pLayoutNode->TryCData(XFA_ATTRIBUTE_ColumnWidths, wsColumnWidths)) {
1382 CFX_WideStringArray widths; 1382 CFX_WideStringArray widths;
1383 if (FX_SeparateStringW(wsColumnWidths.raw_str(), wsColumnWidths.GetLength(), 1383 if (FX_SeparateStringW(wsColumnWidths.raw_str(), wsColumnWidths.GetLength(),
1384 L' ', widths) > 0) { 1384 L' ', widths) > 0) {
1385 int32_t iCols = widths.GetSize(); 1385 int32_t iCols = widths.GetSize();
1386 CFX_WideString wsWidth; 1386 CFX_WideString wsWidth;
1387 for (int32_t i = 0; i < iCols; i++) { 1387 for (int32_t i = 0; i < iCols; i++) {
1388 wsWidth = widths[i]; 1388 wsWidth = widths[i];
1389 wsWidth.TrimLeft(L' '); 1389 wsWidth.TrimLeft(L' ');
1390 if (!wsWidth.IsEmpty()) { 1390 if (!wsWidth.IsEmpty()) {
1391 CXFA_Measurement measure(wsWidth); 1391 CXFA_Measurement measure(wsWidth.AsWideStringC());
1392 m_rgSpecifiedColumnWidths.Add(measure.ToUnit(XFA_UNIT_Pt)); 1392 m_rgSpecifiedColumnWidths.Add(measure.ToUnit(XFA_UNIT_Pt));
1393 } 1393 }
1394 } 1394 }
1395 } 1395 }
1396 } 1396 }
1397 int32_t iSpecifiedColumnCount = m_rgSpecifiedColumnWidths.GetSize(); 1397 int32_t iSpecifiedColumnCount = m_rgSpecifiedColumnWidths.GetSize();
1398 CXFA_LayoutContext layoutContext; 1398 CXFA_LayoutContext layoutContext;
1399 layoutContext.m_prgSpecifiedColumnWidths = &m_rgSpecifiedColumnWidths; 1399 layoutContext.m_prgSpecifiedColumnWidths = &m_rgSpecifiedColumnWidths;
1400 CXFA_LayoutContext* pLayoutContext = 1400 CXFA_LayoutContext* pLayoutContext =
1401 iSpecifiedColumnCount > 0 ? &layoutContext : NULL; 1401 iSpecifiedColumnCount > 0 ? &layoutContext : NULL;
(...skipping 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after
2963 (int32_t)(uintptr_t)m_PendingNodesCount.GetValueAt(pTemplate); 2963 (int32_t)(uintptr_t)m_PendingNodesCount.GetValueAt(pTemplate);
2964 if (iCount >= iMax) { 2964 if (iCount >= iMax) {
2965 return FALSE; 2965 return FALSE;
2966 } 2966 }
2967 iCount++; 2967 iCount++;
2968 m_PendingNodesCount.SetAt(pTemplate, (void*)(uintptr_t)(iCount)); 2968 m_PendingNodesCount.SetAt(pTemplate, (void*)(uintptr_t)(iCount));
2969 return TRUE; 2969 return TRUE;
2970 } 2970 }
2971 return TRUE; 2971 return TRUE;
2972 } 2972 }
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