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/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 Loading... |
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 Loading... |
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 } |
OLD | NEW |