diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-02-25 14:34:11 +0900 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-03-02 11:38:17 +0900 |
commit | 108cd7a38b55dc60deb1ac62372c06562f58b050 (patch) | |
tree | 421c46d366eb6a9221cfba15c732a467d55eb2fa /svtools/source | |
parent | ef9c71b106862b253380256b762f96991c257a26 (diff) |
cleanup TabBar's ImplTabButton
Change-Id: Ic77f322cce00885896343ce21e35db4e286aafda
Diffstat (limited to 'svtools/source')
-rw-r--r-- | svtools/source/control/tabbar.cxx | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index b098471a0a26..bc8c54256746 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -94,48 +94,49 @@ struct ImplTabBarItem class ImplTabButton : public PushButton { public: - ImplTabButton( TabBar* pParent, WinBits nWinStyle = 0 ) : - PushButton( pParent, nWinStyle | WB_RECTSTYLE | WB_SMALLSTYLE | WB_NOLIGHTBORDER | WB_NOPOINTERFOCUS ) {} + ImplTabButton(TabBar* pParent, WinBits nWinStyle = 0) + : PushButton(pParent, nWinStyle | WB_RECTSTYLE | WB_SMALLSTYLE | WB_NOLIGHTBORDER | WB_NOPOINTERFOCUS) + {} - TabBar* GetParent() const { return static_cast<TabBar*>(Window::GetParent()); } - - virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE; - - virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE; + TabBar* GetParent() const + { + return static_cast<TabBar*>(Window::GetParent()); + } - virtual void Command( const CommandEvent& rCEvt ) SAL_OVERRIDE; + virtual bool PreNotify(NotifyEvent& rNotifyEvent) SAL_OVERRIDE; + virtual void MouseButtonDown(const MouseEvent& rMouseEvent) SAL_OVERRIDE; + virtual void Command(const CommandEvent& rCommandEvent) SAL_OVERRIDE; }; -void ImplTabButton::MouseButtonDown( const MouseEvent& rMEvt ) +void ImplTabButton::MouseButtonDown(const MouseEvent& rMouseEvent) { - PushButton::MouseButtonDown(rMEvt); + PushButton::MouseButtonDown(rMouseEvent); } -void ImplTabButton::Command( const CommandEvent& rCEvt ) + +void ImplTabButton::Command(const CommandEvent& rCommandEvent) { - sal_uInt16 nCmd = rCEvt.GetCommand(); - if ( nCmd == COMMAND_CONTEXTMENU ) + sal_uInt16 nCommand = rCommandEvent.GetCommand(); + if (nCommand == COMMAND_CONTEXTMENU) { - TabBar *pParent = GetParent(); - pParent->maScrollAreaContextHdl.Call((void*)&rCEvt); + TabBar* pParent = GetParent(); + pParent->maScrollAreaContextHdl.Call((void*)&rCommandEvent); } - PushButton::Command(rCEvt); + PushButton::Command(rCommandEvent); } - - -bool ImplTabButton::PreNotify( NotifyEvent& rNEvt ) +bool ImplTabButton::PreNotify(NotifyEvent& rNotifyEvent) { - if ( rNEvt.GetType() == MouseNotifyEvent::MOUSEBUTTONDOWN ) + if (rNotifyEvent.GetType() == MouseNotifyEvent::MOUSEBUTTONDOWN) { - if ( GetParent()->IsInEditMode() ) + if (GetParent()->IsInEditMode()) { GetParent()->EndEditMode(); return true; } } - return PushButton::PreNotify( rNEvt ); + return PushButton::PreNotify(rNotifyEvent); } |