| 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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 } | 344 } |
| 345 return 1; | 345 return 1; |
| 346 } | 346 } |
| 347 void CXFA_FFTabOrderPageWidgetIterator::OrderContainer( | 347 void CXFA_FFTabOrderPageWidgetIterator::OrderContainer( |
| 348 CXFA_LayoutItemIterator* sIterator, | 348 CXFA_LayoutItemIterator* sIterator, |
| 349 CXFA_LayoutItem* pContainerItem, | 349 CXFA_LayoutItem* pContainerItem, |
| 350 CXFA_TabParam* pContainer, | 350 CXFA_TabParam* pContainer, |
| 351 FX_BOOL& bCurrentItem, | 351 FX_BOOL& bCurrentItem, |
| 352 FX_BOOL& bContentArea, | 352 FX_BOOL& bContentArea, |
| 353 FX_BOOL bMarsterPage) { | 353 FX_BOOL bMarsterPage) { |
| 354 CFX_PtrArray tabParams; | 354 CFX_ArrayTemplate<CXFA_TabParam*> tabParams; |
| 355 CXFA_LayoutItem* pSearchItem = sIterator->MoveToNext(); | 355 CXFA_LayoutItem* pSearchItem = sIterator->MoveToNext(); |
| 356 while (pSearchItem) { | 356 while (pSearchItem) { |
| 357 if (!pSearchItem->IsContentLayoutItem()) { | 357 if (!pSearchItem->IsContentLayoutItem()) { |
| 358 bContentArea = TRUE; | 358 bContentArea = TRUE; |
| 359 pSearchItem = sIterator->MoveToNext(); | 359 pSearchItem = sIterator->MoveToNext(); |
| 360 continue; | 360 continue; |
| 361 } | 361 } |
| 362 if (bMarsterPage && bContentArea) { | 362 if (bMarsterPage && bContentArea) { |
| 363 break; | 363 break; |
| 364 } | 364 } |
| (...skipping 21 matching lines...) Expand all Loading... |
| 386 } else { | 386 } else { |
| 387 pSearchItem = sIterator->MoveToNext(); | 387 pSearchItem = sIterator->MoveToNext(); |
| 388 } | 388 } |
| 389 } | 389 } |
| 390 int32_t iChildren = tabParams.GetSize(); | 390 int32_t iChildren = tabParams.GetSize(); |
| 391 if (iChildren > 1) { | 391 if (iChildren > 1) { |
| 392 FXSYS_qsort(tabParams.GetData(), iChildren, sizeof(void*), | 392 FXSYS_qsort(tabParams.GetData(), iChildren, sizeof(void*), |
| 393 XFA_TabOrderWidgetComparator); | 393 XFA_TabOrderWidgetComparator); |
| 394 } | 394 } |
| 395 for (int32_t iStart = 0; iStart < iChildren; iStart++) { | 395 for (int32_t iStart = 0; iStart < iChildren; iStart++) { |
| 396 CXFA_TabParam* pParam = (CXFA_TabParam*)tabParams[iStart]; | 396 CXFA_TabParam* pParam = tabParams[iStart]; |
| 397 pContainer->m_Children.Add(pParam->m_pWidget); | 397 pContainer->m_Children.Add(pParam->m_pWidget); |
| 398 if (pParam->m_Children.GetSize() > 0) { | 398 if (pParam->m_Children.GetSize() > 0) { |
| 399 pContainer->m_Children.Append(pParam->m_Children); | 399 pContainer->m_Children.Append(pParam->m_Children); |
| 400 } | 400 } |
| 401 delete pParam; | 401 delete pParam; |
| 402 } | 402 } |
| 403 tabParams.RemoveAll(); | 403 tabParams.RemoveAll(); |
| 404 } | 404 } |
| 405 void CXFA_FFTabOrderPageWidgetIterator::CreateSpaceOrderWidgetArray( | 405 void CXFA_FFTabOrderPageWidgetIterator::CreateSpaceOrderWidgetArray( |
| 406 CXFA_WidgetArray& WidgetArray) { | 406 CXFA_WidgetArray& WidgetArray) { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 427 CXFA_LayoutItem* pLayoutItem) { | 427 CXFA_LayoutItem* pLayoutItem) { |
| 428 if (CXFA_FFWidget* pWidget = XFA_GetWidgetFromLayoutItem(pLayoutItem)) { | 428 if (CXFA_FFWidget* pWidget = XFA_GetWidgetFromLayoutItem(pLayoutItem)) { |
| 429 if (!pWidget->IsLoaded() && | 429 if (!pWidget->IsLoaded() && |
| 430 (pWidget->GetStatus() & XFA_WIDGETSTATUS_Visible)) { | 430 (pWidget->GetStatus() & XFA_WIDGETSTATUS_Visible)) { |
| 431 pWidget->LoadWidget(); | 431 pWidget->LoadWidget(); |
| 432 } | 432 } |
| 433 return pWidget; | 433 return pWidget; |
| 434 } | 434 } |
| 435 return NULL; | 435 return NULL; |
| 436 } | 436 } |
| OLD | NEW |