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

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, 6 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
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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 if (!pFormRoot) {
319 return NULL; 319 return nullptr;
320 } 320 }
321 return new CXFA_WidgetAccIterator(this, pFormRoot); 321 return new CXFA_WidgetAccIterator(this, pFormRoot);
Lei Zhang 2016/06/23 18:21:44 ternary
dsinclair 2016/06/23 18:46:53 Done.
322 } 322 }
323 CXFA_FFWidget* CXFA_FFDocView::GetFocusWidget() { 323 CXFA_FFWidget* CXFA_FFDocView::GetFocusWidget() {
324 return m_pFocusWidget; 324 return m_pFocusWidget;
325 } 325 }
326 void CXFA_FFDocView::KillFocus() { 326 void CXFA_FFDocView::KillFocus() {
327 if (m_pFocusWidget && 327 if (m_pFocusWidget &&
328 (m_pFocusWidget->GetStatus() & XFA_WidgetStatus_Focused)) { 328 (m_pFocusWidget->GetStatus() & XFA_WidgetStatus_Focused)) {
329 (m_pFocusWidget)->OnKillFocus(NULL); 329 (m_pFocusWidget)->OnKillFocus(nullptr);
330 } 330 }
331 m_pFocusAcc = NULL; 331 m_pFocusAcc = nullptr;
332 m_pFocusWidget = NULL; 332 m_pFocusWidget = nullptr;
333 m_pOldFocusWidget = NULL; 333 m_pOldFocusWidget = nullptr;
334 } 334 }
335 FX_BOOL CXFA_FFDocView::SetFocus(CXFA_FFWidget* hWidget) { 335 FX_BOOL CXFA_FFDocView::SetFocus(CXFA_FFWidget* hWidget) {
336 CXFA_FFWidget* pNewFocus = hWidget; 336 CXFA_FFWidget* pNewFocus = hWidget;
337 if (m_pOldFocusWidget == pNewFocus) { 337 if (m_pOldFocusWidget == pNewFocus) {
338 return FALSE; 338 return FALSE;
339 } 339 }
340 CXFA_FFWidget* pOldFocus = m_pOldFocusWidget; 340 CXFA_FFWidget* pOldFocus = m_pOldFocusWidget;
341 m_pOldFocusWidget = pNewFocus; 341 m_pOldFocusWidget = pNewFocus;
342 if (pOldFocus) { 342 if (pOldFocus) {
343 if (m_pFocusWidget != m_pOldFocusWidget && 343 if (m_pFocusWidget != m_pOldFocusWidget &&
344 (pOldFocus->GetStatus() & XFA_WidgetStatus_Focused)) { 344 (pOldFocus->GetStatus() & XFA_WidgetStatus_Focused)) {
345 m_pFocusWidget = pOldFocus; 345 m_pFocusWidget = pOldFocus;
346 pOldFocus->OnKillFocus(pNewFocus); 346 pOldFocus->OnKillFocus(pNewFocus);
347 } else if ((pOldFocus->GetStatus() & XFA_WidgetStatus_Visible)) { 347 } else if ((pOldFocus->GetStatus() & XFA_WidgetStatus_Visible)) {
348 if (!pOldFocus->IsLoaded()) { 348 if (!pOldFocus->IsLoaded()) {
349 pOldFocus->LoadWidget(); 349 pOldFocus->LoadWidget();
350 } 350 }
351 pOldFocus->OnSetFocus(m_pFocusWidget); 351 pOldFocus->OnSetFocus(m_pFocusWidget);
352 m_pFocusWidget = pOldFocus; 352 m_pFocusWidget = pOldFocus;
353 pOldFocus->OnKillFocus(pNewFocus); 353 pOldFocus->OnKillFocus(pNewFocus);
354 } 354 }
355 } 355 }
356 if (m_pFocusWidget == m_pOldFocusWidget) { 356 if (m_pFocusWidget == m_pOldFocusWidget) {
357 return FALSE; 357 return FALSE;
358 } 358 }
359 pNewFocus = m_pOldFocusWidget; 359 pNewFocus = m_pOldFocusWidget;
360 if (m_pListFocusWidget && pNewFocus == m_pListFocusWidget) { 360 if (m_pListFocusWidget && pNewFocus == m_pListFocusWidget) {
361 m_pFocusAcc = NULL; 361 m_pFocusAcc = nullptr;
362 m_pFocusWidget = NULL; 362 m_pFocusWidget = nullptr;
363 m_pListFocusWidget = NULL; 363 m_pListFocusWidget = nullptr;
364 m_pOldFocusWidget = NULL; 364 m_pOldFocusWidget = nullptr;
365 return FALSE; 365 return FALSE;
366 } 366 }
367 if (pNewFocus && (pNewFocus->GetStatus() & XFA_WidgetStatus_Visible)) { 367 if (pNewFocus && (pNewFocus->GetStatus() & XFA_WidgetStatus_Visible)) {
368 if (!pNewFocus->IsLoaded()) { 368 if (!pNewFocus->IsLoaded()) {
369 pNewFocus->LoadWidget(); 369 pNewFocus->LoadWidget();
370 } 370 }
371 pNewFocus->OnSetFocus(m_pFocusWidget); 371 pNewFocus->OnSetFocus(m_pFocusWidget);
372 } 372 }
373 m_pFocusAcc = pNewFocus ? pNewFocus->GetDataAcc() : NULL; 373 m_pFocusAcc = pNewFocus ? pNewFocus->GetDataAcc() : nullptr;
374 m_pFocusWidget = pNewFocus; 374 m_pFocusWidget = pNewFocus;
375 m_pOldFocusWidget = m_pFocusWidget; 375 m_pOldFocusWidget = m_pFocusWidget;
376 return TRUE; 376 return TRUE;
377 } 377 }
378 CXFA_WidgetAcc* CXFA_FFDocView::GetFocusWidgetAcc() { 378 CXFA_WidgetAcc* CXFA_FFDocView::GetFocusWidgetAcc() {
379 return m_pFocusAcc; 379 return m_pFocusAcc;
380 } 380 }
381 void CXFA_FFDocView::SetFocusWidgetAcc(CXFA_WidgetAcc* pWidgetAcc) { 381 void CXFA_FFDocView::SetFocusWidgetAcc(CXFA_WidgetAcc* pWidgetAcc) {
382 CXFA_FFWidget* pNewFocus = 382 CXFA_FFWidget* pNewFocus =
383 pWidgetAcc ? pWidgetAcc->GetNextWidget(NULL) : NULL; 383 pWidgetAcc ? pWidgetAcc->GetNextWidget(nullptr) : nullptr;
384 if (SetFocus(pNewFocus)) { 384 if (SetFocus(pNewFocus)) {
385 m_pFocusAcc = pWidgetAcc; 385 m_pFocusAcc = pWidgetAcc;
386 if (m_iStatus == XFA_DOCVIEW_LAYOUTSTATUS_End) { 386 if (m_iStatus == XFA_DOCVIEW_LAYOUTSTATUS_End) {
387 m_pDoc->GetDocProvider()->SetFocusWidget(m_pDoc, m_pFocusWidget); 387 m_pDoc->GetDocProvider()->SetFocusWidget(m_pDoc, m_pFocusWidget);
388 } 388 }
389 } 389 }
390 } 390 }
391 void CXFA_FFDocView::DeleteLayoutItem(CXFA_FFWidget* pWidget) { 391 void CXFA_FFDocView::DeleteLayoutItem(CXFA_FFWidget* pWidget) {
392 if (m_pFocusAcc == pWidget->GetDataAcc()) { 392 if (m_pFocusAcc == pWidget->GetDataAcc()) {
393 m_pFocusAcc = NULL; 393 m_pFocusAcc = nullptr;
394 m_pFocusWidget = NULL; 394 m_pFocusWidget = nullptr;
395 m_pOldFocusWidget = NULL; 395 m_pOldFocusWidget = nullptr;
396 } 396 }
397 } 397 }
398 static int32_t XFA_ProcessEvent(CXFA_FFDocView* pDocView, 398 static int32_t XFA_ProcessEvent(CXFA_FFDocView* pDocView,
399 CXFA_WidgetAcc* pWidgetAcc, 399 CXFA_WidgetAcc* pWidgetAcc,
400 CXFA_EventParam* pParam) { 400 CXFA_EventParam* pParam) {
401 if (!pParam || pParam->m_eType == XFA_EVENT_Unknown) { 401 if (!pParam || pParam->m_eType == XFA_EVENT_Unknown) {
402 return XFA_EVENTERROR_NotExist; 402 return XFA_EVENTERROR_NotExist;
403 } 403 }
404 if (!pWidgetAcc || pWidgetAcc->GetElementType() == XFA_Element::Draw) { 404 if (!pWidgetAcc || pWidgetAcc->GetElementType() == XFA_Element::Draw) {
405 return XFA_EVENTERROR_NotExist; 405 return XFA_EVENTERROR_NotExist;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 int32_t iRet = XFA_EVENTERROR_NotExist; 440 int32_t iRet = XFA_EVENTERROR_NotExist;
441 if (pFormNode == pExclude) { 441 if (pFormNode == pExclude) {
442 return iRet; 442 return iRet;
443 } 443 }
444 XFA_Element elementType = pFormNode->GetElementType(); 444 XFA_Element elementType = pFormNode->GetElementType();
445 if (elementType == XFA_Element::Field) { 445 if (elementType == XFA_Element::Field) {
446 if (eEventType == XFA_EVENT_IndexChange) { 446 if (eEventType == XFA_EVENT_IndexChange) {
447 return iRet; 447 return iRet;
448 } 448 }
449 CXFA_WidgetAcc* pWidgetAcc = (CXFA_WidgetAcc*)pFormNode->GetWidgetData(); 449 CXFA_WidgetAcc* pWidgetAcc = (CXFA_WidgetAcc*)pFormNode->GetWidgetData();
450 if (pWidgetAcc == NULL) { 450 if (!pWidgetAcc) {
451 return iRet; 451 return iRet;
452 } 452 }
453 CXFA_EventParam eParam; 453 CXFA_EventParam eParam;
454 eParam.m_eType = eEventType; 454 eParam.m_eType = eEventType;
455 eParam.m_pTarget = pWidgetAcc; 455 eParam.m_pTarget = pWidgetAcc;
456 eParam.m_bIsFormReady = bIsFormReady; 456 eParam.m_bIsFormReady = bIsFormReady;
457 return XFA_ProcessEvent(this, pWidgetAcc, &eParam); 457 return XFA_ProcessEvent(this, pWidgetAcc, &eParam);
458 } 458 }
459 if (bRecursive) { 459 if (bRecursive) {
460 for (CXFA_Node* pNode = pFormNode->GetNodeItem( 460 for (CXFA_Node* pNode = pFormNode->GetNodeItem(
461 XFA_NODEITEM_FirstChild, XFA_ObjectType::ContainerNode); 461 XFA_NODEITEM_FirstChild, XFA_ObjectType::ContainerNode);
462 pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling, 462 pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling,
463 XFA_ObjectType::ContainerNode)) { 463 XFA_ObjectType::ContainerNode)) {
464 elementType = pNode->GetElementType(); 464 elementType = pNode->GetElementType();
465 if (elementType != XFA_Element::Variables && 465 if (elementType != XFA_Element::Variables &&
466 elementType != XFA_Element::Draw) { 466 elementType != XFA_Element::Draw) {
467 iRet |= ExecEventActivityByDeepFirst(pNode, eEventType, bIsFormReady, 467 iRet |= ExecEventActivityByDeepFirst(pNode, eEventType, bIsFormReady,
468 bRecursive, pExclude); 468 bRecursive, pExclude);
469 } 469 }
470 } 470 }
471 } 471 }
472 CXFA_WidgetAcc* pWidgetAcc = (CXFA_WidgetAcc*)pFormNode->GetWidgetData(); 472 CXFA_WidgetAcc* pWidgetAcc = (CXFA_WidgetAcc*)pFormNode->GetWidgetData();
473 if (pWidgetAcc == NULL) { 473 if (!pWidgetAcc) {
474 return iRet; 474 return iRet;
475 } 475 }
476 CXFA_EventParam eParam; 476 CXFA_EventParam eParam;
477 eParam.m_eType = eEventType; 477 eParam.m_eType = eEventType;
478 eParam.m_pTarget = pWidgetAcc; 478 eParam.m_pTarget = pWidgetAcc;
479 eParam.m_bIsFormReady = bIsFormReady; 479 eParam.m_bIsFormReady = bIsFormReady;
480 iRet |= XFA_ProcessEvent(this, pWidgetAcc, &eParam); 480 iRet |= XFA_ProcessEvent(this, pWidgetAcc, &eParam);
481 return iRet; 481 return iRet;
482 } 482 }
483 483
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 for (int32_t j = 0; j < iCount; j++) { 763 for (int32_t j = 0; j < iCount; j++) {
764 CXFA_Object* refObj = rs.nodes[j]; 764 CXFA_Object* refObj = rs.nodes[j];
765 if (!refObj->IsNode()) { 765 if (!refObj->IsNode()) {
766 continue; 766 continue;
767 } 767 }
768 CXFA_Node* refNode = refObj->AsNode(); 768 CXFA_Node* refNode = refObj->AsNode();
769 if (bValueUseContent) { 769 if (bValueUseContent) {
770 wsValue = refNode->GetContent(); 770 wsValue = refNode->GetContent();
771 } else { 771 } else {
772 CXFA_Node* nodeValue = refNode->GetFirstChildByName(uValueHash); 772 CXFA_Node* nodeValue = refNode->GetFirstChildByName(uValueHash);
773 if (nodeValue == NULL) { 773 if (!nodeValue) {
Lei Zhang 2016/06/23 18:21:44 flip
dsinclair 2016/06/23 18:46:53 ternery.
774 wsValue = refNode->GetContent(); 774 wsValue = refNode->GetContent();
775 } else { 775 } else {
776 wsValue = nodeValue->GetContent(); 776 wsValue = nodeValue->GetContent();
777 } 777 }
778 } 778 }
779 if (!bUseValue) { 779 if (!bUseValue) {
780 if (bLabelUseContent) { 780 if (bLabelUseContent) {
781 wsLabel = refNode->GetContent(); 781 wsLabel = refNode->GetContent();
782 } else { 782 } else {
783 CXFA_Node* nodeLabel = refNode->GetFirstChildByName(wsLabelRef); 783 CXFA_Node* nodeLabel = refNode->GetFirstChildByName(wsLabelRef);
(...skipping 11 matching lines...) Expand all
795 void CXFA_FFDocView::SetChangeMark() { 795 void CXFA_FFDocView::SetChangeMark() {
796 if (m_iStatus < XFA_DOCVIEW_LAYOUTSTATUS_End) { 796 if (m_iStatus < XFA_DOCVIEW_LAYOUTSTATUS_End) {
797 return; 797 return;
798 } 798 }
799 m_pDoc->GetDocProvider()->SetChangeMark(m_pDoc); 799 m_pDoc->GetDocProvider()->SetChangeMark(m_pDoc);
800 } 800 }
801 CXFA_Node* CXFA_FFDocView::GetRootSubform() { 801 CXFA_Node* CXFA_FFDocView::GetRootSubform() {
802 CXFA_Node* pFormPacketNode = 802 CXFA_Node* pFormPacketNode =
803 ToNode(m_pDoc->GetXFADoc()->GetXFAObject(XFA_HASHCODE_Form)); 803 ToNode(m_pDoc->GetXFADoc()->GetXFAObject(XFA_HASHCODE_Form));
804 if (!pFormPacketNode) { 804 if (!pFormPacketNode) {
805 return NULL; 805 return nullptr;
806 } 806 }
807 return pFormPacketNode->GetFirstChildByClass(XFA_Element::Subform); 807 return pFormPacketNode->GetFirstChildByClass(XFA_Element::Subform);
808 } 808 }
809 809
810 CXFA_WidgetAccIterator::CXFA_WidgetAccIterator(CXFA_FFDocView* pDocView, 810 CXFA_WidgetAccIterator::CXFA_WidgetAccIterator(CXFA_FFDocView* pDocView,
811 CXFA_Node* pTravelRoot) 811 CXFA_Node* pTravelRoot)
812 : m_ContentIterator(pTravelRoot) { 812 : m_ContentIterator(pTravelRoot) {
813 m_pDocView = pDocView; 813 m_pDocView = pDocView;
814 m_pCurWidgetAcc = NULL; 814 m_pCurWidgetAcc = nullptr;
815 } 815 }
816 CXFA_WidgetAccIterator::~CXFA_WidgetAccIterator() {} 816 CXFA_WidgetAccIterator::~CXFA_WidgetAccIterator() {}
817 void CXFA_WidgetAccIterator::Reset() { 817 void CXFA_WidgetAccIterator::Reset() {
818 m_pCurWidgetAcc = NULL; 818 m_pCurWidgetAcc = nullptr;
819 m_ContentIterator.Reset(); 819 m_ContentIterator.Reset();
820 } 820 }
821 CXFA_WidgetAcc* CXFA_WidgetAccIterator::MoveToFirst() { 821 CXFA_WidgetAcc* CXFA_WidgetAccIterator::MoveToFirst() {
822 return NULL; 822 return nullptr;
823 } 823 }
824 CXFA_WidgetAcc* CXFA_WidgetAccIterator::MoveToLast() { 824 CXFA_WidgetAcc* CXFA_WidgetAccIterator::MoveToLast() {
825 return NULL; 825 return nullptr;
826 } 826 }
827 CXFA_WidgetAcc* CXFA_WidgetAccIterator::MoveToNext() { 827 CXFA_WidgetAcc* CXFA_WidgetAccIterator::MoveToNext() {
828 CXFA_Node* pItem = m_pCurWidgetAcc ? m_ContentIterator.MoveToNext() 828 CXFA_Node* pItem = m_pCurWidgetAcc ? m_ContentIterator.MoveToNext()
829 : m_ContentIterator.GetCurrent(); 829 : m_ContentIterator.GetCurrent();
830 while (pItem) { 830 while (pItem) {
831 m_pCurWidgetAcc = static_cast<CXFA_WidgetAcc*>(pItem->GetWidgetData()); 831 m_pCurWidgetAcc = static_cast<CXFA_WidgetAcc*>(pItem->GetWidgetData());
832 if (m_pCurWidgetAcc) 832 if (m_pCurWidgetAcc)
833 return m_pCurWidgetAcc; 833 return m_pCurWidgetAcc;
834 pItem = m_ContentIterator.MoveToNext(); 834 pItem = m_ContentIterator.MoveToNext();
835 } 835 }
836 return NULL; 836 return nullptr;
837 } 837 }
838 CXFA_WidgetAcc* CXFA_WidgetAccIterator::MoveToPrevious() { 838 CXFA_WidgetAcc* CXFA_WidgetAccIterator::MoveToPrevious() {
839 return NULL; 839 return nullptr;
840 } 840 }
841 CXFA_WidgetAcc* CXFA_WidgetAccIterator::GetCurrentWidgetAcc() { 841 CXFA_WidgetAcc* CXFA_WidgetAccIterator::GetCurrentWidgetAcc() {
842 return NULL; 842 return nullptr;
843 } 843 }
844 FX_BOOL CXFA_WidgetAccIterator::SetCurrentWidgetAcc(CXFA_WidgetAcc* hWidget) { 844 FX_BOOL CXFA_WidgetAccIterator::SetCurrentWidgetAcc(CXFA_WidgetAcc* hWidget) {
845 return FALSE; 845 return FALSE;
846 } 846 }
847 void CXFA_WidgetAccIterator::SkipTree() { 847 void CXFA_WidgetAccIterator::SkipTree() {
848 m_ContentIterator.SkipChildrenAndMoveToNext(); 848 m_ContentIterator.SkipChildrenAndMoveToNext();
849 m_pCurWidgetAcc = NULL; 849 m_pCurWidgetAcc = nullptr;
850 } 850 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698