Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(409)

Side by Side Diff: xfa/fxfa/app/xfa_ffdocview.cpp

Issue 2095653002: Remove NULL in xfa/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fxfa/app/xfa_ffchoicelist.cpp ('k') | xfa/fxfa/app/xfa_fffield.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_ffdocview.h" 7 #include "xfa/fxfa/include/xfa_ffdocview.h"
8 8
9 #include "core/fxcrt/include/fx_ext.h" 9 #include "core/fxcrt/include/fx_ext.h"
10 #include "xfa/fxfa/app/xfa_ffbarcode.h" 10 #include "xfa/fxfa/app/xfa_ffbarcode.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 UnlockUpdate(); 192 UnlockUpdate();
193 } 193 }
194 int32_t CXFA_FFDocView::CountPageViews() { 194 int32_t CXFA_FFDocView::CountPageViews() {
195 if (!m_pXFADocLayout) { 195 if (!m_pXFADocLayout) {
196 return 0; 196 return 0;
197 } 197 }
198 return m_pXFADocLayout->CountPages(); 198 return m_pXFADocLayout->CountPages();
199 } 199 }
200 CXFA_FFPageView* CXFA_FFDocView::GetPageView(int32_t nIndex) { 200 CXFA_FFPageView* CXFA_FFDocView::GetPageView(int32_t nIndex) {
201 if (!m_pXFADocLayout) { 201 if (!m_pXFADocLayout) {
202 return NULL; 202 return nullptr;
203 } 203 }
204 return static_cast<CXFA_FFPageView*>(m_pXFADocLayout->GetPage(nIndex)); 204 return static_cast<CXFA_FFPageView*>(m_pXFADocLayout->GetPage(nIndex));
205 } 205 }
206 206
207 CXFA_LayoutProcessor* CXFA_FFDocView::GetXFALayout() const { 207 CXFA_LayoutProcessor* CXFA_FFDocView::GetXFALayout() const {
208 return m_pDoc->GetXFADoc()->GetDocLayout(); 208 return m_pDoc->GetXFADoc()->GetDocLayout();
209 } 209 }
210 FX_BOOL CXFA_FFDocView::ResetSingleWidgetAccData(CXFA_WidgetAcc* pWidgetAcc) { 210 FX_BOOL CXFA_FFDocView::ResetSingleWidgetAccData(CXFA_WidgetAcc* pWidgetAcc) {
211 CXFA_Node* pNode = pWidgetAcc->GetNode(); 211 CXFA_Node* pNode = pWidgetAcc->GetNode();
212 XFA_Element eType = pNode->GetElementType(); 212 XFA_Element eType = pNode->GetElementType();
213 if (eType != XFA_Element::Field && eType != XFA_Element::ExclGroup) { 213 if (eType != XFA_Element::Field && eType != XFA_Element::ExclGroup) {
214 return FALSE; 214 return FALSE;
215 } 215 }
216 pWidgetAcc->ResetData(); 216 pWidgetAcc->ResetData();
217 pWidgetAcc->UpdateUIDisplay(); 217 pWidgetAcc->UpdateUIDisplay();
218 if (CXFA_Validate validate = pWidgetAcc->GetValidate()) { 218 if (CXFA_Validate validate = pWidgetAcc->GetValidate()) {
219 AddValidateWidget(pWidgetAcc); 219 AddValidateWidget(pWidgetAcc);
220 validate.GetNode()->SetFlag(XFA_NodeFlag_NeedsInitApp, false); 220 validate.GetNode()->SetFlag(XFA_NodeFlag_NeedsInitApp, false);
221 } 221 }
222 return TRUE; 222 return TRUE;
223 } 223 }
224 void CXFA_FFDocView::ResetWidgetData(CXFA_WidgetAcc* pWidgetAcc) { 224 void CXFA_FFDocView::ResetWidgetData(CXFA_WidgetAcc* pWidgetAcc) {
225 m_bLayoutEvent = TRUE; 225 m_bLayoutEvent = TRUE;
226 FX_BOOL bChanged = FALSE; 226 FX_BOOL bChanged = FALSE;
227 CXFA_Node* pFormNode = NULL; 227 CXFA_Node* pFormNode = nullptr;
228 if (pWidgetAcc) { 228 if (pWidgetAcc) {
229 bChanged = ResetSingleWidgetAccData(pWidgetAcc); 229 bChanged = ResetSingleWidgetAccData(pWidgetAcc);
230 pFormNode = pWidgetAcc->GetNode(); 230 pFormNode = pWidgetAcc->GetNode();
231 } else { 231 } else {
232 pFormNode = GetRootSubform(); 232 pFormNode = GetRootSubform();
233 } 233 }
234 if (!pFormNode) { 234 if (!pFormNode) {
235 return; 235 return;
236 } 236 }
237 if (pFormNode->GetElementType() != XFA_Element::Field && 237 if (pFormNode->GetElementType() != XFA_Element::Field &&
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 CXFA_FFWidgetHandler* CXFA_FFDocView::GetWidgetHandler() { 308 CXFA_FFWidgetHandler* CXFA_FFDocView::GetWidgetHandler() {
309 if (!m_pWidgetHandler) { 309 if (!m_pWidgetHandler) {
310 m_pWidgetHandler = new CXFA_FFWidgetHandler(this); 310 m_pWidgetHandler = new CXFA_FFWidgetHandler(this);
311 } 311 }
312 return m_pWidgetHandler; 312 return m_pWidgetHandler;
313 } 313 }
314 314
315 CXFA_WidgetAccIterator* CXFA_FFDocView::CreateWidgetAccIterator( 315 CXFA_WidgetAccIterator* CXFA_FFDocView::CreateWidgetAccIterator(
316 XFA_WIDGETORDER eOrder) { 316 XFA_WIDGETORDER eOrder) {
317 CXFA_Node* pFormRoot = GetRootSubform(); 317 CXFA_Node* pFormRoot = GetRootSubform();
318 if (!pFormRoot) { 318 return pFormRoot ? new CXFA_WidgetAccIterator(this, pFormRoot) : nullptr;
319 return NULL;
320 }
321 return new CXFA_WidgetAccIterator(this, pFormRoot);
322 } 319 }
323 CXFA_FFWidget* CXFA_FFDocView::GetFocusWidget() { 320 CXFA_FFWidget* CXFA_FFDocView::GetFocusWidget() {
324 return m_pFocusWidget; 321 return m_pFocusWidget;
325 } 322 }
326 void CXFA_FFDocView::KillFocus() { 323 void CXFA_FFDocView::KillFocus() {
327 if (m_pFocusWidget && 324 if (m_pFocusWidget &&
328 (m_pFocusWidget->GetStatus() & XFA_WidgetStatus_Focused)) { 325 (m_pFocusWidget->GetStatus() & XFA_WidgetStatus_Focused)) {
329 (m_pFocusWidget)->OnKillFocus(NULL); 326 (m_pFocusWidget)->OnKillFocus(nullptr);
330 } 327 }
331 m_pFocusAcc = NULL; 328 m_pFocusAcc = nullptr;
332 m_pFocusWidget = NULL; 329 m_pFocusWidget = nullptr;
333 m_pOldFocusWidget = NULL; 330 m_pOldFocusWidget = nullptr;
334 } 331 }
335 FX_BOOL CXFA_FFDocView::SetFocus(CXFA_FFWidget* hWidget) { 332 FX_BOOL CXFA_FFDocView::SetFocus(CXFA_FFWidget* hWidget) {
336 CXFA_FFWidget* pNewFocus = hWidget; 333 CXFA_FFWidget* pNewFocus = hWidget;
337 if (m_pOldFocusWidget == pNewFocus) { 334 if (m_pOldFocusWidget == pNewFocus) {
338 return FALSE; 335 return FALSE;
339 } 336 }
340 CXFA_FFWidget* pOldFocus = m_pOldFocusWidget; 337 CXFA_FFWidget* pOldFocus = m_pOldFocusWidget;
341 m_pOldFocusWidget = pNewFocus; 338 m_pOldFocusWidget = pNewFocus;
342 if (pOldFocus) { 339 if (pOldFocus) {
343 if (m_pFocusWidget != m_pOldFocusWidget && 340 if (m_pFocusWidget != m_pOldFocusWidget &&
344 (pOldFocus->GetStatus() & XFA_WidgetStatus_Focused)) { 341 (pOldFocus->GetStatus() & XFA_WidgetStatus_Focused)) {
345 m_pFocusWidget = pOldFocus; 342 m_pFocusWidget = pOldFocus;
346 pOldFocus->OnKillFocus(pNewFocus); 343 pOldFocus->OnKillFocus(pNewFocus);
347 } else if ((pOldFocus->GetStatus() & XFA_WidgetStatus_Visible)) { 344 } else if ((pOldFocus->GetStatus() & XFA_WidgetStatus_Visible)) {
348 if (!pOldFocus->IsLoaded()) { 345 if (!pOldFocus->IsLoaded()) {
349 pOldFocus->LoadWidget(); 346 pOldFocus->LoadWidget();
350 } 347 }
351 pOldFocus->OnSetFocus(m_pFocusWidget); 348 pOldFocus->OnSetFocus(m_pFocusWidget);
352 m_pFocusWidget = pOldFocus; 349 m_pFocusWidget = pOldFocus;
353 pOldFocus->OnKillFocus(pNewFocus); 350 pOldFocus->OnKillFocus(pNewFocus);
354 } 351 }
355 } 352 }
356 if (m_pFocusWidget == m_pOldFocusWidget) { 353 if (m_pFocusWidget == m_pOldFocusWidget) {
357 return FALSE; 354 return FALSE;
358 } 355 }
359 pNewFocus = m_pOldFocusWidget; 356 pNewFocus = m_pOldFocusWidget;
360 if (m_pListFocusWidget && pNewFocus == m_pListFocusWidget) { 357 if (m_pListFocusWidget && pNewFocus == m_pListFocusWidget) {
361 m_pFocusAcc = NULL; 358 m_pFocusAcc = nullptr;
362 m_pFocusWidget = NULL; 359 m_pFocusWidget = nullptr;
363 m_pListFocusWidget = NULL; 360 m_pListFocusWidget = nullptr;
364 m_pOldFocusWidget = NULL; 361 m_pOldFocusWidget = nullptr;
365 return FALSE; 362 return FALSE;
366 } 363 }
367 if (pNewFocus && (pNewFocus->GetStatus() & XFA_WidgetStatus_Visible)) { 364 if (pNewFocus && (pNewFocus->GetStatus() & XFA_WidgetStatus_Visible)) {
368 if (!pNewFocus->IsLoaded()) { 365 if (!pNewFocus->IsLoaded()) {
369 pNewFocus->LoadWidget(); 366 pNewFocus->LoadWidget();
370 } 367 }
371 pNewFocus->OnSetFocus(m_pFocusWidget); 368 pNewFocus->OnSetFocus(m_pFocusWidget);
372 } 369 }
373 m_pFocusAcc = pNewFocus ? pNewFocus->GetDataAcc() : NULL; 370 m_pFocusAcc = pNewFocus ? pNewFocus->GetDataAcc() : nullptr;
374 m_pFocusWidget = pNewFocus; 371 m_pFocusWidget = pNewFocus;
375 m_pOldFocusWidget = m_pFocusWidget; 372 m_pOldFocusWidget = m_pFocusWidget;
376 return TRUE; 373 return TRUE;
377 } 374 }
378 CXFA_WidgetAcc* CXFA_FFDocView::GetFocusWidgetAcc() { 375 CXFA_WidgetAcc* CXFA_FFDocView::GetFocusWidgetAcc() {
379 return m_pFocusAcc; 376 return m_pFocusAcc;
380 } 377 }
381 void CXFA_FFDocView::SetFocusWidgetAcc(CXFA_WidgetAcc* pWidgetAcc) { 378 void CXFA_FFDocView::SetFocusWidgetAcc(CXFA_WidgetAcc* pWidgetAcc) {
382 CXFA_FFWidget* pNewFocus = 379 CXFA_FFWidget* pNewFocus =
383 pWidgetAcc ? pWidgetAcc->GetNextWidget(NULL) : NULL; 380 pWidgetAcc ? pWidgetAcc->GetNextWidget(nullptr) : nullptr;
384 if (SetFocus(pNewFocus)) { 381 if (SetFocus(pNewFocus)) {
385 m_pFocusAcc = pWidgetAcc; 382 m_pFocusAcc = pWidgetAcc;
386 if (m_iStatus == XFA_DOCVIEW_LAYOUTSTATUS_End) { 383 if (m_iStatus == XFA_DOCVIEW_LAYOUTSTATUS_End) {
387 m_pDoc->GetDocProvider()->SetFocusWidget(m_pDoc, m_pFocusWidget); 384 m_pDoc->GetDocProvider()->SetFocusWidget(m_pDoc, m_pFocusWidget);
388 } 385 }
389 } 386 }
390 } 387 }
391 void CXFA_FFDocView::DeleteLayoutItem(CXFA_FFWidget* pWidget) { 388 void CXFA_FFDocView::DeleteLayoutItem(CXFA_FFWidget* pWidget) {
392 if (m_pFocusAcc == pWidget->GetDataAcc()) { 389 if (m_pFocusAcc == pWidget->GetDataAcc()) {
393 m_pFocusAcc = NULL; 390 m_pFocusAcc = nullptr;
394 m_pFocusWidget = NULL; 391 m_pFocusWidget = nullptr;
395 m_pOldFocusWidget = NULL; 392 m_pOldFocusWidget = nullptr;
396 } 393 }
397 } 394 }
398 static int32_t XFA_ProcessEvent(CXFA_FFDocView* pDocView, 395 static int32_t XFA_ProcessEvent(CXFA_FFDocView* pDocView,
399 CXFA_WidgetAcc* pWidgetAcc, 396 CXFA_WidgetAcc* pWidgetAcc,
400 CXFA_EventParam* pParam) { 397 CXFA_EventParam* pParam) {
401 if (!pParam || pParam->m_eType == XFA_EVENT_Unknown) { 398 if (!pParam || pParam->m_eType == XFA_EVENT_Unknown) {
402 return XFA_EVENTERROR_NotExist; 399 return XFA_EVENTERROR_NotExist;
403 } 400 }
404 if (!pWidgetAcc || pWidgetAcc->GetElementType() == XFA_Element::Draw) { 401 if (!pWidgetAcc || pWidgetAcc->GetElementType() == XFA_Element::Draw) {
405 return XFA_EVENTERROR_NotExist; 402 return XFA_EVENTERROR_NotExist;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 int32_t iRet = XFA_EVENTERROR_NotExist; 437 int32_t iRet = XFA_EVENTERROR_NotExist;
441 if (pFormNode == pExclude) { 438 if (pFormNode == pExclude) {
442 return iRet; 439 return iRet;
443 } 440 }
444 XFA_Element elementType = pFormNode->GetElementType(); 441 XFA_Element elementType = pFormNode->GetElementType();
445 if (elementType == XFA_Element::Field) { 442 if (elementType == XFA_Element::Field) {
446 if (eEventType == XFA_EVENT_IndexChange) { 443 if (eEventType == XFA_EVENT_IndexChange) {
447 return iRet; 444 return iRet;
448 } 445 }
449 CXFA_WidgetAcc* pWidgetAcc = (CXFA_WidgetAcc*)pFormNode->GetWidgetData(); 446 CXFA_WidgetAcc* pWidgetAcc = (CXFA_WidgetAcc*)pFormNode->GetWidgetData();
450 if (pWidgetAcc == NULL) { 447 if (!pWidgetAcc) {
451 return iRet; 448 return iRet;
452 } 449 }
453 CXFA_EventParam eParam; 450 CXFA_EventParam eParam;
454 eParam.m_eType = eEventType; 451 eParam.m_eType = eEventType;
455 eParam.m_pTarget = pWidgetAcc; 452 eParam.m_pTarget = pWidgetAcc;
456 eParam.m_bIsFormReady = bIsFormReady; 453 eParam.m_bIsFormReady = bIsFormReady;
457 return XFA_ProcessEvent(this, pWidgetAcc, &eParam); 454 return XFA_ProcessEvent(this, pWidgetAcc, &eParam);
458 } 455 }
459 if (bRecursive) { 456 if (bRecursive) {
460 for (CXFA_Node* pNode = pFormNode->GetNodeItem( 457 for (CXFA_Node* pNode = pFormNode->GetNodeItem(
461 XFA_NODEITEM_FirstChild, XFA_ObjectType::ContainerNode); 458 XFA_NODEITEM_FirstChild, XFA_ObjectType::ContainerNode);
462 pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling, 459 pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling,
463 XFA_ObjectType::ContainerNode)) { 460 XFA_ObjectType::ContainerNode)) {
464 elementType = pNode->GetElementType(); 461 elementType = pNode->GetElementType();
465 if (elementType != XFA_Element::Variables && 462 if (elementType != XFA_Element::Variables &&
466 elementType != XFA_Element::Draw) { 463 elementType != XFA_Element::Draw) {
467 iRet |= ExecEventActivityByDeepFirst(pNode, eEventType, bIsFormReady, 464 iRet |= ExecEventActivityByDeepFirst(pNode, eEventType, bIsFormReady,
468 bRecursive, pExclude); 465 bRecursive, pExclude);
469 } 466 }
470 } 467 }
471 } 468 }
472 CXFA_WidgetAcc* pWidgetAcc = (CXFA_WidgetAcc*)pFormNode->GetWidgetData(); 469 CXFA_WidgetAcc* pWidgetAcc = (CXFA_WidgetAcc*)pFormNode->GetWidgetData();
473 if (pWidgetAcc == NULL) { 470 if (!pWidgetAcc) {
474 return iRet; 471 return iRet;
475 } 472 }
476 CXFA_EventParam eParam; 473 CXFA_EventParam eParam;
477 eParam.m_eType = eEventType; 474 eParam.m_eType = eEventType;
478 eParam.m_pTarget = pWidgetAcc; 475 eParam.m_pTarget = pWidgetAcc;
479 eParam.m_bIsFormReady = bIsFormReady; 476 eParam.m_bIsFormReady = bIsFormReady;
480 iRet |= XFA_ProcessEvent(this, pWidgetAcc, &eParam); 477 iRet |= XFA_ProcessEvent(this, pWidgetAcc, &eParam);
481 return iRet; 478 return iRet;
482 } 479 }
483 480
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 for (int32_t j = 0; j < iCount; j++) { 760 for (int32_t j = 0; j < iCount; j++) {
764 CXFA_Object* refObj = rs.nodes[j]; 761 CXFA_Object* refObj = rs.nodes[j];
765 if (!refObj->IsNode()) { 762 if (!refObj->IsNode()) {
766 continue; 763 continue;
767 } 764 }
768 CXFA_Node* refNode = refObj->AsNode(); 765 CXFA_Node* refNode = refObj->AsNode();
769 if (bValueUseContent) { 766 if (bValueUseContent) {
770 wsValue = refNode->GetContent(); 767 wsValue = refNode->GetContent();
771 } else { 768 } else {
772 CXFA_Node* nodeValue = refNode->GetFirstChildByName(uValueHash); 769 CXFA_Node* nodeValue = refNode->GetFirstChildByName(uValueHash);
773 if (nodeValue == NULL) { 770 wsValue = nodeValue ? nodeValue->GetContent() : refNode->GetContent();
774 wsValue = refNode->GetContent();
775 } else {
776 wsValue = nodeValue->GetContent();
777 }
778 } 771 }
779 if (!bUseValue) { 772 if (!bUseValue) {
780 if (bLabelUseContent) { 773 if (bLabelUseContent) {
781 wsLabel = refNode->GetContent(); 774 wsLabel = refNode->GetContent();
782 } else { 775 } else {
783 CXFA_Node* nodeLabel = refNode->GetFirstChildByName(wsLabelRef); 776 CXFA_Node* nodeLabel = refNode->GetFirstChildByName(wsLabelRef);
784 if (nodeLabel) 777 if (nodeLabel)
785 wsLabel = nodeLabel->GetContent(); 778 wsLabel = nodeLabel->GetContent();
786 } 779 }
787 } else { 780 } else {
788 wsLabel = wsValue; 781 wsLabel = wsValue;
789 } 782 }
790 pAcc->InsertItem(wsLabel, wsValue); 783 pAcc->InsertItem(wsLabel, wsValue);
791 } 784 }
792 } 785 }
793 m_BindItems.RemoveAll(); 786 m_BindItems.RemoveAll();
794 } 787 }
795 void CXFA_FFDocView::SetChangeMark() { 788 void CXFA_FFDocView::SetChangeMark() {
796 if (m_iStatus < XFA_DOCVIEW_LAYOUTSTATUS_End) { 789 if (m_iStatus < XFA_DOCVIEW_LAYOUTSTATUS_End) {
797 return; 790 return;
798 } 791 }
799 m_pDoc->GetDocProvider()->SetChangeMark(m_pDoc); 792 m_pDoc->GetDocProvider()->SetChangeMark(m_pDoc);
800 } 793 }
801 CXFA_Node* CXFA_FFDocView::GetRootSubform() { 794 CXFA_Node* CXFA_FFDocView::GetRootSubform() {
802 CXFA_Node* pFormPacketNode = 795 CXFA_Node* pFormPacketNode =
803 ToNode(m_pDoc->GetXFADoc()->GetXFAObject(XFA_HASHCODE_Form)); 796 ToNode(m_pDoc->GetXFADoc()->GetXFAObject(XFA_HASHCODE_Form));
804 if (!pFormPacketNode) { 797 if (!pFormPacketNode) {
805 return NULL; 798 return nullptr;
806 } 799 }
807 return pFormPacketNode->GetFirstChildByClass(XFA_Element::Subform); 800 return pFormPacketNode->GetFirstChildByClass(XFA_Element::Subform);
808 } 801 }
809 802
810 CXFA_WidgetAccIterator::CXFA_WidgetAccIterator(CXFA_FFDocView* pDocView, 803 CXFA_WidgetAccIterator::CXFA_WidgetAccIterator(CXFA_FFDocView* pDocView,
811 CXFA_Node* pTravelRoot) 804 CXFA_Node* pTravelRoot)
812 : m_ContentIterator(pTravelRoot) { 805 : m_ContentIterator(pTravelRoot) {
813 m_pDocView = pDocView; 806 m_pDocView = pDocView;
814 m_pCurWidgetAcc = NULL; 807 m_pCurWidgetAcc = nullptr;
815 } 808 }
816 CXFA_WidgetAccIterator::~CXFA_WidgetAccIterator() {} 809 CXFA_WidgetAccIterator::~CXFA_WidgetAccIterator() {}
817 void CXFA_WidgetAccIterator::Reset() { 810 void CXFA_WidgetAccIterator::Reset() {
818 m_pCurWidgetAcc = NULL; 811 m_pCurWidgetAcc = nullptr;
819 m_ContentIterator.Reset(); 812 m_ContentIterator.Reset();
820 } 813 }
821 CXFA_WidgetAcc* CXFA_WidgetAccIterator::MoveToFirst() { 814 CXFA_WidgetAcc* CXFA_WidgetAccIterator::MoveToFirst() {
822 return NULL; 815 return nullptr;
823 } 816 }
824 CXFA_WidgetAcc* CXFA_WidgetAccIterator::MoveToLast() { 817 CXFA_WidgetAcc* CXFA_WidgetAccIterator::MoveToLast() {
825 return NULL; 818 return nullptr;
826 } 819 }
827 CXFA_WidgetAcc* CXFA_WidgetAccIterator::MoveToNext() { 820 CXFA_WidgetAcc* CXFA_WidgetAccIterator::MoveToNext() {
828 CXFA_Node* pItem = m_pCurWidgetAcc ? m_ContentIterator.MoveToNext() 821 CXFA_Node* pItem = m_pCurWidgetAcc ? m_ContentIterator.MoveToNext()
829 : m_ContentIterator.GetCurrent(); 822 : m_ContentIterator.GetCurrent();
830 while (pItem) { 823 while (pItem) {
831 m_pCurWidgetAcc = static_cast<CXFA_WidgetAcc*>(pItem->GetWidgetData()); 824 m_pCurWidgetAcc = static_cast<CXFA_WidgetAcc*>(pItem->GetWidgetData());
832 if (m_pCurWidgetAcc) 825 if (m_pCurWidgetAcc)
833 return m_pCurWidgetAcc; 826 return m_pCurWidgetAcc;
834 pItem = m_ContentIterator.MoveToNext(); 827 pItem = m_ContentIterator.MoveToNext();
835 } 828 }
836 return NULL; 829 return nullptr;
837 } 830 }
838 CXFA_WidgetAcc* CXFA_WidgetAccIterator::MoveToPrevious() { 831 CXFA_WidgetAcc* CXFA_WidgetAccIterator::MoveToPrevious() {
839 return NULL; 832 return nullptr;
840 } 833 }
841 CXFA_WidgetAcc* CXFA_WidgetAccIterator::GetCurrentWidgetAcc() { 834 CXFA_WidgetAcc* CXFA_WidgetAccIterator::GetCurrentWidgetAcc() {
842 return NULL; 835 return nullptr;
843 } 836 }
844 FX_BOOL CXFA_WidgetAccIterator::SetCurrentWidgetAcc(CXFA_WidgetAcc* hWidget) { 837 FX_BOOL CXFA_WidgetAccIterator::SetCurrentWidgetAcc(CXFA_WidgetAcc* hWidget) {
845 return FALSE; 838 return FALSE;
846 } 839 }
847 void CXFA_WidgetAccIterator::SkipTree() { 840 void CXFA_WidgetAccIterator::SkipTree() {
848 m_ContentIterator.SkipChildrenAndMoveToNext(); 841 m_ContentIterator.SkipChildrenAndMoveToNext();
849 m_pCurWidgetAcc = NULL; 842 m_pCurWidgetAcc = nullptr;
850 } 843 }
OLDNEW
« no previous file with comments | « xfa/fxfa/app/xfa_ffchoicelist.cpp ('k') | xfa/fxfa/app/xfa_fffield.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698