| 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/src/fde/css/fde_cssstyleselector.h" | 7 #include "xfa/fde/css/fde_cssstyleselector.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| 11 #include "xfa/src/fde/css/fde_csscache.h" | 11 #include "xfa/fde/css/fde_csscache.h" |
| 12 #include "xfa/src/fde/css/fde_cssdeclaration.h" | 12 #include "xfa/fde/css/fde_cssdeclaration.h" |
| 13 | 13 |
| 14 int32_t CFDE_CSSCounterStyle::FindIndex(const FX_WCHAR* pszIdentifier) { | 14 int32_t CFDE_CSSCounterStyle::FindIndex(const FX_WCHAR* pszIdentifier) { |
| 15 int32_t iCount = m_arrCounterData.GetSize(); | 15 int32_t iCount = m_arrCounterData.GetSize(); |
| 16 for (int32_t i = 0; i < iCount; i++) { | 16 for (int32_t i = 0; i < iCount; i++) { |
| 17 if (FXSYS_wcscmp(pszIdentifier, m_arrCounterData.ElementAt(i).m_pszIdent) == | 17 if (FXSYS_wcscmp(pszIdentifier, m_arrCounterData.ElementAt(i).m_pszIdent) == |
| 18 0) { | 18 0) { |
| 19 return i; | 19 return i; |
| 20 } | 20 } |
| 21 } | 21 } |
| 22 return -1; | 22 return -1; |
| (...skipping 1762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1785 return FDE_CSSTEXTTRANSFORM_LowerCase; | 1785 return FDE_CSSTEXTTRANSFORM_LowerCase; |
| 1786 default: | 1786 default: |
| 1787 return FDE_CSSTEXTTRANSFORM_None; | 1787 return FDE_CSSTEXTTRANSFORM_None; |
| 1788 } | 1788 } |
| 1789 } | 1789 } |
| 1790 FDE_CSSFONTVARIANT CFDE_CSSStyleSelector::ToFontVariant( | 1790 FDE_CSSFONTVARIANT CFDE_CSSStyleSelector::ToFontVariant( |
| 1791 FDE_CSSPROPERTYVALUE eValue) { | 1791 FDE_CSSPROPERTYVALUE eValue) { |
| 1792 return eValue == FDE_CSSPROPERTYVALUE_SmallCaps ? FDE_CSSFONTVARIANT_SmallCaps | 1792 return eValue == FDE_CSSPROPERTYVALUE_SmallCaps ? FDE_CSSFONTVARIANT_SmallCaps |
| 1793 : FDE_CSSFONTVARIANT_Normal; | 1793 : FDE_CSSFONTVARIANT_Normal; |
| 1794 } | 1794 } |
| OLD | NEW |