| OLD | NEW |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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/cxfa_data.h" | 7 #include "xfa/fxfa/parser/cxfa_data.h" |
| 8 | 8 |
| 9 #include "core/fxcrt/include/fx_ext.h" | 9 #include "core/fxcrt/fx_ext.h" |
| 10 #include "xfa/fxfa/parser/cxfa_measurement.h" | 10 #include "xfa/fxfa/parser/cxfa_measurement.h" |
| 11 #include "xfa/fxfa/parser/xfa_object.h" | 11 #include "xfa/fxfa/parser/xfa_object.h" |
| 12 | 12 |
| 13 // Static. | 13 // Static. |
| 14 FX_ARGB CXFA_Data::ToColor(const CFX_WideStringC& wsValue) { | 14 FX_ARGB CXFA_Data::ToColor(const CFX_WideStringC& wsValue) { |
| 15 uint8_t r = 0, g = 0, b = 0; | 15 uint8_t r = 0, g = 0, b = 0; |
| 16 if (wsValue.GetLength() == 0) | 16 if (wsValue.GetLength() == 0) |
| 17 return 0xff000000; | 17 return 0xff000000; |
| 18 | 18 |
| 19 int cc = 0; | 19 int cc = 0; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 fValue = ms.ToUnit(XFA_UNIT_Pt); | 73 fValue = ms.ToUnit(XFA_UNIT_Pt); |
| 74 return TRUE; | 74 return TRUE; |
| 75 } | 75 } |
| 76 return FALSE; | 76 return FALSE; |
| 77 } | 77 } |
| 78 | 78 |
| 79 FX_BOOL CXFA_Data::SetMeasure(XFA_ATTRIBUTE eAttr, FX_FLOAT fValue) { | 79 FX_BOOL CXFA_Data::SetMeasure(XFA_ATTRIBUTE eAttr, FX_FLOAT fValue) { |
| 80 CXFA_Measurement ms(fValue, XFA_UNIT_Pt); | 80 CXFA_Measurement ms(fValue, XFA_UNIT_Pt); |
| 81 return m_pNode->SetMeasure(eAttr, ms); | 81 return m_pNode->SetMeasure(eAttr, ms); |
| 82 } | 82 } |
| OLD | NEW |