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/fxfa/include/xfa_ffpageview.h" | 7 #include "xfa/fxfa/include/xfa_ffpageview.h" |
8 | 8 |
9 #include "xfa/fde/fde_render.h" | 9 #include "xfa/fde/fde_render.h" |
10 #include "xfa/fxfa/app/xfa_ffcheckbutton.h" | 10 #include "xfa/fxfa/app/xfa_ffcheckbutton.h" |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 } | 225 } |
226 CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::GetTraverseWidget( | 226 CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::GetTraverseWidget( |
227 CXFA_FFWidget* pWidget) { | 227 CXFA_FFWidget* pWidget) { |
228 CXFA_WidgetAcc* pAcc = pWidget->GetDataAcc(); | 228 CXFA_WidgetAcc* pAcc = pWidget->GetDataAcc(); |
229 CXFA_Node* pTraversal = pAcc->GetNode()->GetChild(0, XFA_ELEMENT_Traversal); | 229 CXFA_Node* pTraversal = pAcc->GetNode()->GetChild(0, XFA_ELEMENT_Traversal); |
230 if (pTraversal) { | 230 if (pTraversal) { |
231 CXFA_Node* pTraverse = pTraversal->GetChild(0, XFA_ELEMENT_Traverse); | 231 CXFA_Node* pTraverse = pTraversal->GetChild(0, XFA_ELEMENT_Traverse); |
232 if (pTraverse) { | 232 if (pTraverse) { |
233 CFX_WideString wsTraverseWidgetName; | 233 CFX_WideString wsTraverseWidgetName; |
234 if (pTraverse->GetAttribute(XFA_ATTRIBUTE_Ref, wsTraverseWidgetName)) { | 234 if (pTraverse->GetAttribute(XFA_ATTRIBUTE_Ref, wsTraverseWidgetName)) { |
235 return FindWidgetByName(wsTraverseWidgetName.AsStringC(), pWidget); | 235 return FindWidgetByName(wsTraverseWidgetName, pWidget); |
236 } | 236 } |
237 } | 237 } |
238 } | 238 } |
239 return NULL; | 239 return NULL; |
240 } | 240 } |
241 CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::FindWidgetByName( | 241 CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::FindWidgetByName( |
242 const CFX_WideStringC& wsWidgetName, | 242 const CFX_WideString& wsWidgetName, |
243 CXFA_FFWidget* pRefWidget) { | 243 CXFA_FFWidget* pRefWidget) { |
244 return pRefWidget->GetDocView()->GetWidgetByName(wsWidgetName, pRefWidget); | 244 return pRefWidget->GetDocView()->GetWidgetByName(wsWidgetName, pRefWidget); |
245 } | 245 } |
246 void CXFA_FFTabOrderPageWidgetIterator::CreateTabOrderWidgetArray() { | 246 void CXFA_FFTabOrderPageWidgetIterator::CreateTabOrderWidgetArray() { |
247 m_TabOrderWidgetArray.RemoveAll(); | 247 m_TabOrderWidgetArray.RemoveAll(); |
248 CXFA_WidgetArray SpaceOrderWidgetArray; | 248 CXFA_WidgetArray SpaceOrderWidgetArray; |
249 CreateSpaceOrderWidgetArray(SpaceOrderWidgetArray); | 249 CreateSpaceOrderWidgetArray(SpaceOrderWidgetArray); |
250 int32_t nWidgetCount = SpaceOrderWidgetArray.GetSize(); | 250 int32_t nWidgetCount = SpaceOrderWidgetArray.GetSize(); |
251 if (nWidgetCount < 1) { | 251 if (nWidgetCount < 1) { |
252 return; | 252 return; |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 CXFA_LayoutItem* pLayoutItem) { | 375 CXFA_LayoutItem* pLayoutItem) { |
376 if (CXFA_FFWidget* pWidget = XFA_GetWidgetFromLayoutItem(pLayoutItem)) { | 376 if (CXFA_FFWidget* pWidget = XFA_GetWidgetFromLayoutItem(pLayoutItem)) { |
377 if (!pWidget->IsLoaded() && | 377 if (!pWidget->IsLoaded() && |
378 (pWidget->GetStatus() & XFA_WIDGETSTATUS_Visible)) { | 378 (pWidget->GetStatus() & XFA_WIDGETSTATUS_Visible)) { |
379 pWidget->LoadWidget(); | 379 pWidget->LoadWidget(); |
380 } | 380 } |
381 return pWidget; | 381 return pWidget; |
382 } | 382 } |
383 return NULL; | 383 return NULL; |
384 } | 384 } |
OLD | NEW |