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

Unified Diff: xfa/src/fwl/src/basewidget/fwl_tooltipctrlimp.cpp

Issue 1460883002: Make IFWL_Target::m_pImpl a private member. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: xfa/src/fwl/src/basewidget/fwl_tooltipctrlimp.cpp
diff --git a/xfa/src/fwl/src/basewidget/fwl_tooltipctrlimp.cpp b/xfa/src/fwl/src/basewidget/fwl_tooltipctrlimp.cpp
index 6c680f90595b06894c7db86b2ce65323d6465ff1..f9ae30fe7d89d4e257bd11cddfd29f9b4d8bdc7a 100644
--- a/xfa/src/fwl/src/basewidget/fwl_tooltipctrlimp.cpp
+++ b/xfa/src/fwl/src/basewidget/fwl_tooltipctrlimp.cpp
@@ -15,33 +15,28 @@ IFWL_ToolTip* IFWL_ToolTip::Create() {
return new IFWL_ToolTip;
}
FWL_ERR IFWL_ToolTip::Initialize(IFWL_Widget* pOuter) {
- m_pImpl = new CFWL_ToolTipImp(pOuter);
- ((CFWL_ToolTipImp*)m_pImpl)->SetInterface(this);
- return ((CFWL_ToolTipImp*)m_pImpl)->Initialize();
+ CFWL_ToolTipImp* pToolTipImpl = new CFWL_ToolTipImp(pOuter);
+ SetImpl(pToolTipImpl);
+ pToolTipImpl->SetInterface(this);
+ return pToolTipImpl->Initialize();
}
FWL_ERR IFWL_ToolTip::Initialize(const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter) {
- m_pImpl = new CFWL_ToolTipImp(properties, pOuter);
- ((CFWL_ToolTipImp*)m_pImpl)->SetInterface(this);
- return ((CFWL_ToolTipImp*)m_pImpl)->Initialize();
+ CFWL_ToolTipImp* pToolTipImpl = new CFWL_ToolTipImp(properties, pOuter);
+ SetImpl(pToolTipImpl);
+ pToolTipImpl->SetInterface(this);
+ return pToolTipImpl->Initialize();
}
FWL_ERR IFWL_ToolTip::SetAnchor(const CFX_RectF& rtAnchor) {
- return ((CFWL_ToolTipImp*)m_pImpl)->SetAnchor(rtAnchor);
+ return static_cast<CFWL_ToolTipImp*>(GetImpl())->SetAnchor(rtAnchor);
}
FWL_ERR IFWL_ToolTip::Show() {
- return ((CFWL_ToolTipImp*)m_pImpl)->Show();
+ return static_cast<CFWL_ToolTipImp*>(GetImpl())->Show();
}
FWL_ERR IFWL_ToolTip::Hide() {
- return ((CFWL_ToolTipImp*)m_pImpl)->Hide();
+ return static_cast<CFWL_ToolTipImp*>(GetImpl())->Hide();
}
IFWL_ToolTip::IFWL_ToolTip() {
- m_pImpl = NULL;
-}
-IFWL_ToolTip::~IFWL_ToolTip() {
- if (m_pImpl) {
- delete (CFWL_ToolTipImp*)m_pImpl;
- m_pImpl = NULL;
- }
}
CFWL_ToolTipImp::CFWL_ToolTipImp(IFWL_Widget* pOuter)
: CFWL_FormImp(pOuter),

Powered by Google App Engine
This is Rietveld 408576698