From 696fd019ca1cb04344342ee45c7677eb0dcd1c73 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 22 Jan 2014 16:31:10 +0000 Subject: split resize parts of ConnectElements into ::Resize Change-Id: If338bf70537883e575e9137fe749675b301c27fe --- cui/source/customize/macropg.cxx | 11 +++++++---- cui/source/inc/headertablistbox.hxx | 27 ++++++++++++--------------- 2 files changed, 19 insertions(+), 19 deletions(-) (limited to 'cui') diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx index 578cd5cd42da..db9a6a8104d4 100644 --- a/cui/source/customize/macropg.cxx +++ b/cui/source/customize/macropg.cxx @@ -157,12 +157,10 @@ _HeaderTabListBox::_HeaderTabListBox( Window* pParent, const ResId& rId ) maListBox.EnableCellFocus(); } -_HeaderTabListBox::~_HeaderTabListBox() +void _HeaderTabListBox::Resize() { -} + Control::Resize(); -void _HeaderTabListBox::ConnectElements( void ) -{ // calc pos and size of header bar Point aPnt( 0, 0 ); Size aSize( maHeaderBar.CalcWindowSizePixel() ); @@ -174,6 +172,11 @@ void _HeaderTabListBox::ConnectElements( void ) aPnt.Y() += aSize.Height(); aSize.Height() = aCtrlSize.Height() - aSize.Height(); maListBox.SetPosSizePixel( aPnt, aSize ); +} + +void _HeaderTabListBox::ConnectElements( void ) +{ + Resize(); // set handler maHeaderBar.SetEndDragHdl( LINK( this, _HeaderTabListBox, HeaderEndDrag_Impl ) ); diff --git a/cui/source/inc/headertablistbox.hxx b/cui/source/inc/headertablistbox.hxx index da178764035b..b39c36a7c178 100644 --- a/cui/source/inc/headertablistbox.hxx +++ b/cui/source/inc/headertablistbox.hxx @@ -33,11 +33,19 @@ protected: DECL_LINK( HeaderEndDrag_Impl, HeaderBar* ); virtual bool Notify( NotifyEvent& rNEvt ); public: - _HeaderTabListBox( Window* pParent, const ResId& rId ); - virtual ~_HeaderTabListBox(); + _HeaderTabListBox( Window* pParent, const ResId& rId ); - inline SvHeaderTabListBox& GetListBox( void ); - inline HeaderBar& GetHeaderBar( void ); + void Resize(); + + SvHeaderTabListBox& GetListBox() + { + return maListBox; + } + + HeaderBar& GetHeaderBar() + { + return maHeaderBar; + } void ConnectElements( void );/**< should be called after all manipulations on elements are done calcs real sizes depending on sizes of this */ @@ -45,17 +53,6 @@ public: void Enable( bool bEnable = true, bool bChild = true ); ///< same meaning as Windows::Enable() }; -inline SvHeaderTabListBox& _HeaderTabListBox::GetListBox( void ) -{ - return maListBox; -} - -inline HeaderBar& _HeaderTabListBox::GetHeaderBar( void ) -{ - return maHeaderBar; -} - - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit