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