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 "core/fpdfdoc/include/cpdf_formcontrol.h" | 7 #include "core/fpdfdoc/include/cpdf_formcontrol.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
11 #include "core/fpdfapi/fpdf_page/include/cpdf_form.h" | 11 #include "core/fpdfapi/fpdf_page/include/cpdf_form.h" |
12 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" | 12 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" |
13 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" | 13 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" |
14 #include "core/fpdfapi/fpdf_parser/include/cpdf_stream.h" | 14 #include "core/fpdfapi/fpdf_parser/include/cpdf_stream.h" |
15 #include "core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h" | 15 #include "core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h" |
16 #include "core/fpdfapi/fpdf_render/include/cpdf_rendercontext.h" | 16 #include "core/fpdfapi/fpdf_render/include/cpdf_rendercontext.h" |
17 #include "core/fpdfdoc/include/cpdf_interform.h" | 17 #include "core/fpdfdoc/include/cpdf_interform.h" |
| 18 #include "core/fxge/include/cfx_renderdevice.h" |
18 | 19 |
19 namespace { | 20 namespace { |
20 | 21 |
21 const FX_CHAR* const g_sHighlightingMode[] = { | 22 const FX_CHAR* const g_sHighlightingMode[] = { |
22 // Must match order of HighlightingMode enum. | 23 // Must match order of HighlightingMode enum. |
23 "N", "I", "O", "P", "T"}; | 24 "N", "I", "O", "P", "T"}; |
24 | 25 |
25 } // namespace | 26 } // namespace |
26 | 27 |
27 CPDF_FormControl::CPDF_FormControl(CPDF_FormField* pField, | 28 CPDF_FormControl::CPDF_FormControl(CPDF_FormField* pField, |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 if (!m_pWidgetDict) | 321 if (!m_pWidgetDict) |
321 return 0; | 322 return 0; |
322 if (m_pWidgetDict->KeyExist("Q")) | 323 if (m_pWidgetDict->KeyExist("Q")) |
323 return m_pWidgetDict->GetIntegerBy("Q", 0); | 324 return m_pWidgetDict->GetIntegerBy("Q", 0); |
324 | 325 |
325 CPDF_Object* pObj = FPDF_GetFieldAttr(m_pField->m_pDict, "Q"); | 326 CPDF_Object* pObj = FPDF_GetFieldAttr(m_pField->m_pDict, "Q"); |
326 if (pObj) | 327 if (pObj) |
327 return pObj->GetInteger(); | 328 return pObj->GetInteger(); |
328 return m_pField->m_pForm->GetFormAlignment(); | 329 return m_pField->m_pForm->GetFormAlignment(); |
329 } | 330 } |
OLD | NEW |