Chromium Code Reviews| 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/app/xfa_ffwidgetacc.h" | 7 #include "xfa/fxfa/app/xfa_ffwidgetacc.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 706 CXFA_LayoutItem* pLayout = nullptr; | 706 CXFA_LayoutItem* pLayout = nullptr; |
| 707 if (pWidget) { | 707 if (pWidget) { |
| 708 pLayout = pWidget->GetNext(); | 708 pLayout = pWidget->GetNext(); |
| 709 } else { | 709 } else { |
| 710 pLayout = m_pDocView->GetXFALayout()->GetLayoutItem(m_pNode); | 710 pLayout = m_pDocView->GetXFALayout()->GetLayoutItem(m_pNode); |
| 711 } | 711 } |
| 712 return static_cast<CXFA_FFWidget*>(pLayout); | 712 return static_cast<CXFA_FFWidget*>(pLayout); |
| 713 } | 713 } |
| 714 void CXFA_WidgetAcc::UpdateUIDisplay(CXFA_FFWidget* pExcept) { | 714 void CXFA_WidgetAcc::UpdateUIDisplay(CXFA_FFWidget* pExcept) { |
| 715 CXFA_FFWidget* pWidget = NULL; | 715 CXFA_FFWidget* pWidget = NULL; |
| 716 while ((pWidget = GetNextWidget(pWidget))) { | 716 while ((pWidget = GetNextWidget(pWidget)) != nullptr) { |
|
Lei Zhang
2016/05/20 03:48:02
Why do we need the explicit check against nullptr?
Wei Li
2016/05/20 16:33:15
This is due to msvs warning c4706 "assignment with
| |
| 717 if (pWidget == pExcept || !pWidget->IsLoaded() || | 717 if (pWidget == pExcept || !pWidget->IsLoaded() || |
| 718 (GetUIType() != XFA_ELEMENT_CheckButton && pWidget->IsFocused())) { | 718 (GetUIType() != XFA_ELEMENT_CheckButton && pWidget->IsFocused())) { |
| 719 continue; | 719 continue; |
| 720 } | 720 } |
| 721 pWidget->UpdateFWLData(); | 721 pWidget->UpdateFWLData(); |
| 722 pWidget->AddInvalidateRect(); | 722 pWidget->AddInvalidateRect(); |
| 723 } | 723 } |
| 724 } | 724 } |
| 725 | 725 |
| 726 void CXFA_WidgetAcc::CalcCaptionSize(CFX_SizeF& szCap) { | 726 void CXFA_WidgetAcc::CalcCaptionSize(CFX_SizeF& szCap) { |
| (...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1691 if (pIDNode) { | 1691 if (pIDNode) { |
| 1692 pEmbAcc = (CXFA_WidgetAcc*)pIDNode->GetWidgetData(); | 1692 pEmbAcc = (CXFA_WidgetAcc*)pIDNode->GetWidgetData(); |
| 1693 } | 1693 } |
| 1694 if (pEmbAcc) { | 1694 if (pEmbAcc) { |
| 1695 pEmbAcc->GetValue(wsValue, XFA_VALUEPICTURE_Display); | 1695 pEmbAcc->GetValue(wsValue, XFA_VALUEPICTURE_Display); |
| 1696 return TRUE; | 1696 return TRUE; |
| 1697 } | 1697 } |
| 1698 } | 1698 } |
| 1699 return FALSE; | 1699 return FALSE; |
| 1700 } | 1700 } |
| OLD | NEW |