From d46fecbebdbfdadaef8ae12f741e5780c78907e9 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 14 Jul 2011 14:23:22 +0100 Subject: Resolves: fdo#36534 rework SvxSimpleTable to not manage its own parent --- cui/source/options/fontsubs.cxx | 3 ++- cui/source/options/fontsubs.hxx | 7 +++++-- cui/source/options/optfltr.cxx | 3 ++- cui/source/options/optfltr.hxx | 7 +++++-- cui/source/options/optjava.cxx | 7 ++++--- cui/source/options/optjava.hxx | 1 + cui/source/options/radiobtnbox.cxx | 15 ++------------- cui/source/options/webconninfo.cxx | 8 ++++---- cui/source/options/webconninfo.hxx | 3 ++- 9 files changed, 27 insertions(+), 27 deletions(-) (limited to 'cui/source/options') diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx index e8bb7af50..588982c34 100644 --- a/cui/source/options/fontsubs.cxx +++ b/cui/source/options/fontsubs.cxx @@ -57,7 +57,8 @@ SvxFontSubstTabPage::SvxFontSubstTabPage( Window* pParent, aFont2FT (this, CUI_RES(FT_FONT2)), aFont2CB (this, CUI_RES(CB_FONT2)), aNewDelTBX (this, CUI_RES(TBX_SUBSTNEWDEL)), - aCheckLB (this, CUI_RES(CLB_SUBSTITUTES)), + m_aCheckLBContainer(this, CUI_RES(CLB_SUBSTITUTES)), + aCheckLB(m_aCheckLBContainer), aSourceViewFontsFL (this, CUI_RES(FL_SOURCEVIEW )), aFontNameFT (this, CUI_RES(FT_FONTNAME )), diff --git a/cui/source/options/fontsubs.hxx b/cui/source/options/fontsubs.hxx index 0c60f4a14..50edd71e3 100644 --- a/cui/source/options/fontsubs.hxx +++ b/cui/source/options/fontsubs.hxx @@ -53,8 +53,10 @@ class SvxFontSubstCheckListBox : public SvxSimpleTable virtual void KeyInput( const KeyEvent& rKEvt ); public: - SvxFontSubstCheckListBox(Window* pParent, const ResId& rResId ) : - SvxSimpleTable( pParent, rResId ){} + SvxFontSubstCheckListBox(SvxSimpleTableContainer& rParent, WinBits nBits = WB_BORDER) + : SvxSimpleTable(rParent, nBits) + { + } inline void *GetUserData(sal_uLong nPos) { return GetEntry(nPos)->GetUserData(); } inline void SetUserData(sal_uLong nPos, void *pData ) { GetEntry(nPos)->SetUserData(pData); } @@ -78,6 +80,7 @@ class SvxFontSubstTabPage : public SfxTabPage FixedText aFont2FT; FontNameBox aFont2CB; ToolBox aNewDelTBX; + SvxSimpleTableContainer m_aCheckLBContainer; SvxFontSubstCheckListBox aCheckLB; FixedLine aSourceViewFontsFL; diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx index 171684c53..c2c209453 100644 --- a/cui/source/options/optfltr.cxx +++ b/cui/source/options/optfltr.cxx @@ -147,7 +147,8 @@ void OfaMSFilterTabPage::Reset( const SfxItemSet& ) OfaMSFilterTabPage2::OfaMSFilterTabPage2( Window* pParent, const SfxItemSet& rSet ) : SfxTabPage( pParent, CUI_RES( RID_OFAPAGE_MSFILTEROPT2 ), rSet ), - aCheckLB ( this, CUI_RES( CLB_SETTINGS )), + m_aCheckLBContainer(this, CUI_RES( CLB_SETTINGS)), + aCheckLB(m_aCheckLBContainer), aHeader1FT ( this, CUI_RES( FT_HEADER1_EXPLANATION )), aHeader2FT ( this, CUI_RES( FT_HEADER2_EXPLANATION )), sHeader1 ( CUI_RES( ST_HEADER1 )), diff --git a/cui/source/options/optfltr.hxx b/cui/source/options/optfltr.hxx index b6e924b3d..4371fd69e 100644 --- a/cui/source/options/optfltr.hxx +++ b/cui/source/options/optfltr.hxx @@ -81,10 +81,13 @@ class OfaMSFilterTabPage2 : public SfxTabPage virtual void KeyInput( const KeyEvent& rKEvt ); public: - MSFltrSimpleTable(Window* pParent, const ResId& rResId ) : - SvxSimpleTable( pParent, rResId ){} + MSFltrSimpleTable(SvxSimpleTableContainer& rParent, WinBits nBits = WB_BORDER) + : SvxSimpleTable(rParent, nBits) + { + } }; + SvxSimpleTableContainer m_aCheckLBContainer; MSFltrSimpleTable aCheckLB; FixedText aHeader1FT, aHeader2FT; String sHeader1, sHeader2; diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx index e15fe5e19..f3b31216e 100644 --- a/cui/source/options/optjava.cxx +++ b/cui/source/options/optjava.cxx @@ -99,7 +99,8 @@ SvxJavaOptionsPage::SvxJavaOptionsPage( Window* pParent, const SfxItemSet& rSet m_aJavaLine ( this, CUI_RES( FL_JAVA ) ), m_aJavaEnableCB ( this, CUI_RES( CB_JAVA_ENABLE ) ), m_aJavaFoundLabel ( this, CUI_RES( FT_JAVA_FOUND ) ), - m_aJavaList ( this, CUI_RES( LB_JAVA ) ), + m_aJavaListContainer(this, CUI_RES(LB_JAVA)), + m_aJavaList(m_aJavaListContainer), m_aJavaPathText ( this, CUI_RES( FT_JAVA_PATH ) ), m_aAddBtn ( this, CUI_RES( PB_ADD ) ), m_aParameterBtn ( this, CUI_RES( PB_PARAMETER ) ), @@ -169,9 +170,9 @@ SvxJavaOptionsPage::SvxJavaOptionsPage( Window* pParent, const SfxItemSet& rSet aPos = m_aParameterBtn.GetPosPixel(); aPos.X() -= nDiff; m_aParameterBtn.SetPosSizePixel(aPos, aButtonSize); - Size aSize = m_aJavaList.GetSizePixel(); + Size aSize = m_aJavaListContainer.GetSizePixel(); aSize.Width() -= nDiff; - m_aJavaList.SetSizePixel(aSize); + m_aJavaListContainer.SetSizePixel(aSize); } } diff --git a/cui/source/options/optjava.hxx b/cui/source/options/optjava.hxx index 598b4739d..697d198da 100644 --- a/cui/source/options/optjava.hxx +++ b/cui/source/options/optjava.hxx @@ -56,6 +56,7 @@ private: FixedLine m_aJavaLine; CheckBox m_aJavaEnableCB; FixedText m_aJavaFoundLabel; + SvxSimpleTableContainer m_aJavaListContainer; svx::SvxRadioButtonListBox m_aJavaList; FixedText m_aJavaPathText; PushButton m_aAddBtn; diff --git a/cui/source/options/radiobtnbox.cxx b/cui/source/options/radiobtnbox.cxx index 06c035286..ca30c33ea 100644 --- a/cui/source/options/radiobtnbox.cxx +++ b/cui/source/options/radiobtnbox.cxx @@ -35,9 +35,8 @@ namespace svx { // class SvxRadioButtonListBox ---------------------------------------------------- -SvxRadioButtonListBox::SvxRadioButtonListBox( Window* _pParent, const ResId& _rId ) : - - SvxSimpleTable( _pParent, _rId ) +SvxRadioButtonListBox::SvxRadioButtonListBox(SvxSimpleTableContainer& rParent, WinBits nBits) + : SvxSimpleTable(rParent, nBits) { EnableCheckButton( new SvLBoxButtonData( this, true ) ); @@ -50,16 +49,6 @@ SvxRadioButtonListBox::~SvxRadioButtonListBox() void SvxRadioButtonListBox::SetTabs() { SvxSimpleTable::SetTabs(); -/* - sal_uInt16 nAdjust = SV_LBOXTAB_ADJUST_RIGHT | SV_LBOXTAB_ADJUST_LEFT | - SV_LBOXTAB_ADJUST_CENTER | SV_LBOXTAB_ADJUST_NUMERIC | SV_LBOXTAB_FORCE; - if ( aTabs.Count() > 0 ) - { - SvLBoxTab* pTab = (SvLBoxTab*)aTabs.GetObject(0); - pTab->nFlags &= ~nAdjust; - pTab->nFlags |= SV_LBOXTAB_PUSHABLE | SV_LBOXTAB_ADJUST_CENTER | SV_LBOXTAB_FORCE; - } -*/ } void SvxRadioButtonListBox::MouseButtonUp( const MouseEvent& _rMEvt ) diff --git a/cui/source/options/webconninfo.cxx b/cui/source/options/webconninfo.cxx index 9f65bf463..3a5a90c8e 100644 --- a/cui/source/options/webconninfo.cxx +++ b/cui/source/options/webconninfo.cxx @@ -48,10 +48,9 @@ namespace svx // class PasswordTable --------------------------------------------------- -PasswordTable::PasswordTable( Window* pParent, const ResId& rResId ) : - SvxSimpleTable( pParent, rResId ) +PasswordTable::PasswordTable(SvxSimpleTableContainer& rParent, WinBits nBits) + : SvxSimpleTable(rParent, nBits | WB_NOINITIALSELECTION) { - SetStyle( GetStyle() | WB_NOINITIALSELECTION ); } void PasswordTable::InsertHeaderItem( sal_uInt16 nColumn, const String& rText, HeaderBarItemBits nBits ) @@ -97,7 +96,8 @@ void PasswordTable::Resort( bool bForced ) WebConnectionInfoDialog::WebConnectionInfoDialog( Window* pParent ) : ModalDialog( pParent, CUI_RES( RID_SVXDLG_WEBCONNECTION_INFO ) ) ,m_aNeverShownFI ( this, CUI_RES( FI_NEVERSHOWN ) ) - ,m_aPasswordsLB ( this, CUI_RES( LB_PASSWORDS ) ) + ,m_aPasswordsLBContainer(this, CUI_RES( LB_PASSWORDS)) + ,m_aPasswordsLB(m_aPasswordsLBContainer) ,m_aRemoveBtn ( this, CUI_RES( PB_REMOVE ) ) ,m_aRemoveAllBtn ( this, CUI_RES( PB_REMOVEALL ) ) ,m_aChangeBtn ( this, CUI_RES( PB_CHANGE ) ) diff --git a/cui/source/options/webconninfo.hxx b/cui/source/options/webconninfo.hxx index 49778839f..bd8e04aee 100644 --- a/cui/source/options/webconninfo.hxx +++ b/cui/source/options/webconninfo.hxx @@ -42,7 +42,7 @@ namespace svx class PasswordTable : public SvxSimpleTable { public: - PasswordTable( Window* pParent, const ResId& rResId ); + PasswordTable(SvxSimpleTableContainer& rParent, WinBits nBits = WB_BORDER); void InsertHeaderItem( sal_uInt16 nColumn, const String& rText, HeaderBarItemBits nBits ); void ResetTabs(); @@ -56,6 +56,7 @@ namespace svx { private: FixedInfo m_aNeverShownFI; + SvxSimpleTableContainer m_aPasswordsLBContainer; PasswordTable m_aPasswordsLB; PushButton m_aRemoveBtn; PushButton m_aRemoveAllBtn; -- cgit v1.2.3