summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-01-22 16:31:10 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-01-22 16:35:27 +0000
commit696fd019ca1cb04344342ee45c7677eb0dcd1c73 (patch)
treeb8dc6234ae1318508ef90ac27332ca567c7c5560 /cui
parentd9e04ae281eaf0a888c9ca9918835cc0ce94f3ed (diff)
split resize parts of ConnectElements into ::Resize
Change-Id: If338bf70537883e575e9137fe749675b301c27fe
Diffstat (limited to 'cui')
-rw-r--r--cui/source/customize/macropg.cxx11
-rw-r--r--cui/source/inc/headertablistbox.hxx27
2 files changed, 19 insertions, 19 deletions
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: */