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_basic_imp.h" | 7 #include "xfa/fxfa/parser/xfa_basic_imp.h" |
8 | 8 |
9 #include "core/fxcrt/include/fx_ext.h" | 9 #include "core/fxcrt/include/fx_ext.h" |
10 #include "xfa/fgas/crt/fgas_algorithm.h" | 10 #include "xfa/fgas/crt/fgas_algorithm.h" |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 case XFA_UNIT_Mp: | 481 case XFA_UNIT_Mp: |
482 fValue /= 0.001f; | 482 fValue /= 0.001f; |
483 return TRUE; | 483 return TRUE; |
484 case XFA_UNIT_Pc: | 484 case XFA_UNIT_Pc: |
485 fValue /= 12.0f; | 485 fValue /= 12.0f; |
486 return TRUE; | 486 return TRUE; |
487 default: | 487 default: |
488 fValue = 0; | 488 fValue = 0; |
489 return FALSE; | 489 return FALSE; |
490 } | 490 } |
491 return FALSE; | |
492 } | 491 } |
493 XFA_UNIT CXFA_Measurement::GetUnit(const CFX_WideStringC& wsUnit) { | 492 XFA_UNIT CXFA_Measurement::GetUnit(const CFX_WideStringC& wsUnit) { |
494 if (wsUnit == FX_WSTRC(L"mm")) { | 493 if (wsUnit == FX_WSTRC(L"mm")) { |
495 return XFA_UNIT_Mm; | 494 return XFA_UNIT_Mm; |
496 } else if (wsUnit == FX_WSTRC(L"pt")) { | 495 } else if (wsUnit == FX_WSTRC(L"pt")) { |
497 return XFA_UNIT_Pt; | 496 return XFA_UNIT_Pt; |
498 } else if (wsUnit == FX_WSTRC(L"in")) { | 497 } else if (wsUnit == FX_WSTRC(L"in")) { |
499 return XFA_UNIT_In; | 498 return XFA_UNIT_In; |
500 } else if (wsUnit == FX_WSTRC(L"cm")) { | 499 } else if (wsUnit == FX_WSTRC(L"cm")) { |
501 return XFA_UNIT_Cm; | 500 return XFA_UNIT_Cm; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
568 m_iPosition += iMaxLength; | 567 m_iPosition += iMaxLength; |
569 bEOS = IsEOF(); | 568 bEOS = IsEOF(); |
570 return iMaxLength; | 569 return iMaxLength; |
571 } | 570 } |
572 uint16_t CXFA_WideTextRead::GetCodePage() const { | 571 uint16_t CXFA_WideTextRead::GetCodePage() const { |
573 return (sizeof(FX_WCHAR) == 2) ? FX_CODEPAGE_UTF16LE : FX_CODEPAGE_UTF32LE; | 572 return (sizeof(FX_WCHAR) == 2) ? FX_CODEPAGE_UTF16LE : FX_CODEPAGE_UTF32LE; |
574 } | 573 } |
575 uint16_t CXFA_WideTextRead::SetCodePage(uint16_t wCodePage) { | 574 uint16_t CXFA_WideTextRead::SetCodePage(uint16_t wCodePage) { |
576 return GetCodePage(); | 575 return GetCodePage(); |
577 } | 576 } |
OLD | NEW |