diff options
author | dsinclair <dsinclair@chromium.org> | 2016-12-08 14:06:10 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-12-08 14:06:10 -0800 |
commit | 89ab499024b1f362b1d40dabd9fadded8b095203 (patch) | |
tree | 456a5edadee5b6e45ce11e552c110f84e5b765b9 /xfa/fwl | |
parent | 43ac44cbf52076fd2354d5276c95d5b4b4a06d64 (diff) | |
download | pdfium-89ab499024b1f362b1d40dabd9fadded8b095203.tar.xz |
Change layout item in CFWL_Widget type from void
Previously the LayoutItem was a void*. This Cl changes the LayoutItem to
explicity be a CXFA_FFWidget.
Review-Url: https://codereview.chromium.org/2559643004
Diffstat (limited to 'xfa/fwl')
-rw-r--r-- | xfa/fwl/cfwl_edit.cpp | 6 | ||||
-rw-r--r-- | xfa/fwl/cfwl_widget.h | 7 |
2 files changed, 6 insertions, 7 deletions
diff --git a/xfa/fwl/cfwl_edit.cpp b/xfa/fwl/cfwl_edit.cpp index 913f08d7b9..5cf3f2f006 100644 --- a/xfa/fwl/cfwl_edit.cpp +++ b/xfa/fwl/cfwl_edit.cpp @@ -1168,8 +1168,7 @@ void CFWL_Edit::ShowCaret(CFX_RectF* pRect) { pRect->Offset(rtOuter.left, rtOuter.top); } - CXFA_FFWidget* pXFAWidget = - static_cast<CXFA_FFWidget*>(pOuter->GetLayoutItem()); + CXFA_FFWidget* pXFAWidget = pOuter->GetLayoutItem(); if (!pXFAWidget) return; @@ -1197,8 +1196,7 @@ void CFWL_Edit::HideCaret(CFX_RectF* pRect) { while (pOuter->GetOuter()) pOuter = pOuter->GetOuter(); - CXFA_FFWidget* pXFAWidget = - static_cast<CXFA_FFWidget*>(pOuter->GetLayoutItem()); + CXFA_FFWidget* pXFAWidget = pOuter->GetLayoutItem(); if (!pXFAWidget) return; diff --git a/xfa/fwl/cfwl_widget.h b/xfa/fwl/cfwl_widget.h index 64fc526ad6..5046aab888 100644 --- a/xfa/fwl/cfwl_widget.h +++ b/xfa/fwl/cfwl_widget.h @@ -43,6 +43,7 @@ class CFWL_MessageKey; class CFWL_Widget; class CFWL_WidgetMgr; class CFWL_WidgetProperties; +class CXFA_FFWidget; class IFWL_ThemeProvider; class CFWL_Widget : public IFWL_WidgetDelegate { @@ -105,8 +106,8 @@ class CFWL_Widget : public IFWL_WidgetDelegate { uint32_t GetEventKey() const { return m_nEventKey; } void SetEventKey(uint32_t key) { m_nEventKey = key; } - void* GetLayoutItem() const { return m_pLayoutItem; } - void SetLayoutItem(void* pItem) { m_pLayoutItem = pItem; } + CXFA_FFWidget* GetLayoutItem() const { return m_pLayoutItem; } + void SetLayoutItem(CXFA_FFWidget* pItem) { m_pLayoutItem = pItem; } void SetFocus(bool bFocus); void RepaintRect(const CFX_RectF& pRect); @@ -189,7 +190,7 @@ class CFWL_Widget : public IFWL_WidgetDelegate { void NotifyDriver(); bool IsParent(CFWL_Widget* pParent); - void* m_pLayoutItem; + CXFA_FFWidget* m_pLayoutItem; uint32_t m_nEventKey; IFWL_WidgetDelegate* m_pDelegate; // Not owned. }; |