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 "fpdfsdk/include/fsdk_baseform.h" | 7 #include "fpdfsdk/include/fsdk_baseform.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <map> | 10 #include <map> |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 CFX_WideString sName; | 108 CFX_WideString sName; |
109 if (GetFieldType() == FIELDTYPE_RADIOBUTTON) { | 109 if (GetFieldType() == FIELDTYPE_RADIOBUTTON) { |
110 sName = GetAnnotName(); | 110 sName = GetAnnotName(); |
111 if (sName.IsEmpty()) | 111 if (sName.IsEmpty()) |
112 sName = GetName(); | 112 sName = GetName(); |
113 } else { | 113 } else { |
114 sName = GetName(); | 114 sName = GetName(); |
115 } | 115 } |
116 | 116 |
117 if (!sName.IsEmpty()) | 117 if (!sName.IsEmpty()) |
118 m_hMixXFAWidget = pDocView->GetWidgetByName(sName); | 118 m_hMixXFAWidget = pDocView->GetWidgetByName(sName, nullptr); |
119 } | 119 } |
120 } | 120 } |
121 return m_hMixXFAWidget; | 121 return m_hMixXFAWidget; |
122 } | 122 } |
123 | 123 |
124 return nullptr; | 124 return nullptr; |
125 } | 125 } |
126 | 126 |
127 CXFA_FFWidget* CPDFSDK_Widget::GetGroupMixXFAWidget() { | 127 CXFA_FFWidget* CPDFSDK_Widget::GetGroupMixXFAWidget() { |
128 CPDFSDK_Document* pSDKDoc = m_pPageView->GetSDKDocument(); | 128 CPDFSDK_Document* pSDKDoc = m_pPageView->GetSDKDocument(); |
129 CPDFXFA_Document* pDoc = pSDKDoc->GetXFADocument(); | 129 CPDFXFA_Document* pDoc = pSDKDoc->GetXFADocument(); |
130 if (pDoc->GetDocType() == DOCTYPE_STATIC_XFA) { | 130 if (pDoc->GetDocType() == DOCTYPE_STATIC_XFA) { |
131 if (CXFA_FFDocView* pDocView = pDoc->GetXFADocView()) { | 131 if (CXFA_FFDocView* pDocView = pDoc->GetXFADocView()) { |
132 CFX_WideString sName = GetName(); | 132 CFX_WideString sName = GetName(); |
133 if (!sName.IsEmpty()) | 133 if (!sName.IsEmpty()) |
134 return pDocView->GetWidgetByName(sName); | 134 return pDocView->GetWidgetByName(sName, nullptr); |
135 } | 135 } |
136 } | 136 } |
137 | 137 |
138 return nullptr; | 138 return nullptr; |
139 } | 139 } |
140 | 140 |
141 CXFA_FFWidgetHandler* CPDFSDK_Widget::GetXFAWidgetHandler() const { | 141 CXFA_FFWidgetHandler* CPDFSDK_Widget::GetXFAWidgetHandler() const { |
142 CPDFSDK_Document* pSDKDoc = m_pPageView->GetSDKDocument(); | 142 CPDFSDK_Document* pSDKDoc = m_pPageView->GetSDKDocument(); |
143 CPDFXFA_Document* pDoc = pSDKDoc->GetXFADocument(); | 143 CPDFXFA_Document* pDoc = pSDKDoc->GetXFADocument(); |
144 if (pDoc->GetDocType() == DOCTYPE_STATIC_XFA) { | 144 if (pDoc->GetDocType() == DOCTYPE_STATIC_XFA) { |
(...skipping 2716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2861 break; | 2861 break; |
2862 } | 2862 } |
2863 } | 2863 } |
2864 } | 2864 } |
2865 | 2865 |
2866 CFX_FloatRect CBA_AnnotIterator::GetAnnotRect(const CPDFSDK_Annot* pAnnot) { | 2866 CFX_FloatRect CBA_AnnotIterator::GetAnnotRect(const CPDFSDK_Annot* pAnnot) { |
2867 CFX_FloatRect rcAnnot; | 2867 CFX_FloatRect rcAnnot; |
2868 pAnnot->GetPDFAnnot()->GetRect(rcAnnot); | 2868 pAnnot->GetPDFAnnot()->GetRect(rcAnnot); |
2869 return rcAnnot; | 2869 return rcAnnot; |
2870 } | 2870 } |
OLD | NEW |