| 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 "core/include/fpdfdoc/fpdf_doc.h" | 7 #include "core/include/fpdfdoc/fpdf_doc.h" |
| 8 #include "core/src/fpdfdoc/doc_utils.h" | 8 #include "core/src/fpdfdoc/doc_utils.h" |
| 9 | 9 |
| 10 FX_BOOL PDF_FormField_IsUnison(CPDF_FormField* pField) { | 10 FX_BOOL PDF_FormField_IsUnison(CPDF_FormField* pField) { |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 case RichText: | 228 case RichText: |
| 229 case File: | 229 case File: |
| 230 return FIELDTYPE_TEXTFIELD; | 230 return FIELDTYPE_TEXTFIELD; |
| 231 case Sign: | 231 case Sign: |
| 232 return FIELDTYPE_SIGNATURE; | 232 return FIELDTYPE_SIGNATURE; |
| 233 default: | 233 default: |
| 234 break; | 234 break; |
| 235 } | 235 } |
| 236 return FIELDTYPE_UNKNOWN; | 236 return FIELDTYPE_UNKNOWN; |
| 237 } | 237 } |
| 238 |
| 238 CPDF_AAction CPDF_FormField::GetAdditionalAction() { | 239 CPDF_AAction CPDF_FormField::GetAdditionalAction() { |
| 239 CPDF_Object* pObj = FPDF_GetFieldAttr(m_pDict, "AA"); | 240 CPDF_Object* pObj = FPDF_GetFieldAttr(m_pDict, "AA"); |
| 240 if (!pObj) { | 241 return CPDF_AAction(pObj ? pObj->GetDict() : nullptr); |
| 241 return NULL; | |
| 242 } | |
| 243 return pObj->GetDict(); | |
| 244 } | 242 } |
| 243 |
| 245 CFX_WideString CPDF_FormField::GetAlternateName() { | 244 CFX_WideString CPDF_FormField::GetAlternateName() { |
| 246 CPDF_Object* pObj = FPDF_GetFieldAttr(m_pDict, "TU"); | 245 CPDF_Object* pObj = FPDF_GetFieldAttr(m_pDict, "TU"); |
| 247 if (!pObj) { | 246 if (!pObj) { |
| 248 return L""; | 247 return L""; |
| 249 } | 248 } |
| 250 return pObj->GetUnicodeText(); | 249 return pObj->GetUnicodeText(); |
| 251 } | 250 } |
| 252 CFX_WideString CPDF_FormField::GetMappingName() { | 251 CFX_WideString CPDF_FormField::GetMappingName() { |
| 253 CPDF_Object* pObj = FPDF_GetFieldAttr(m_pDict, "TM"); | 252 CPDF_Object* pObj = FPDF_GetFieldAttr(m_pDict, "TM"); |
| 254 if (!pObj) { | 253 if (!pObj) { |
| (...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1083 pFontDict = m_pForm->m_pFormDict->GetDictBy("DR") | 1082 pFontDict = m_pForm->m_pFormDict->GetDictBy("DR") |
| 1084 ->GetDictBy("Font") | 1083 ->GetDictBy("Font") |
| 1085 ->GetDictBy(font_name); | 1084 ->GetDictBy(font_name); |
| 1086 | 1085 |
| 1087 if (!pFontDict) { | 1086 if (!pFontDict) { |
| 1088 return; | 1087 return; |
| 1089 } | 1088 } |
| 1090 m_pFont = m_pForm->m_pDocument->LoadFont(pFontDict); | 1089 m_pFont = m_pForm->m_pDocument->LoadFont(pFontDict); |
| 1091 m_FontSize = FX_atof(syntax.GetWord()); | 1090 m_FontSize = FX_atof(syntax.GetWord()); |
| 1092 } | 1091 } |
| OLD | NEW |