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 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1373 pMarginNode->GetMeasure(XFA_ATTRIBUTE_LeftInset).ToUnit(XFA_UNIT_Pt); | 1373 pMarginNode->GetMeasure(XFA_ATTRIBUTE_LeftInset).ToUnit(XFA_UNIT_Pt); |
1374 fRightInset = | 1374 fRightInset = |
1375 pMarginNode->GetMeasure(XFA_ATTRIBUTE_RightInset).ToUnit(XFA_UNIT_Pt); | 1375 pMarginNode->GetMeasure(XFA_ATTRIBUTE_RightInset).ToUnit(XFA_UNIT_Pt); |
1376 } | 1376 } |
1377 FX_FLOAT fContentWidthLimit = | 1377 FX_FLOAT fContentWidthLimit = |
1378 bContainerWidthAutoSize ? XFA_LAYOUT_FLOAT_MAX | 1378 bContainerWidthAutoSize ? XFA_LAYOUT_FLOAT_MAX |
1379 : fContainerWidth - fLeftInset - fRightInset; | 1379 : fContainerWidth - fLeftInset - fRightInset; |
1380 CFX_WideStringC wsColumnWidths; | 1380 CFX_WideStringC wsColumnWidths; |
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.GetPtr(), 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); |
1392 m_rgSpecifiedColumnWidths.Add(measure.ToUnit(XFA_UNIT_Pt)); | 1392 m_rgSpecifiedColumnWidths.Add(measure.ToUnit(XFA_UNIT_Pt)); |
1393 } | 1393 } |
(...skipping 1569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 } |
OLD | NEW |