summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-07-14 14:23:22 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-07-14 15:24:34 +0100
commit024c78c94f43d6896e138b951cf55f31ec7dfd56 (patch)
treec2c89ab6be9028bbd19b43f15a9d1a8d71b8b4ba /cui/source
parent9ae7372923960ed02067f1757d155437ba142d5b (diff)
Resolves: fdo#36534 rework SvxSimpleTable to not manage its own parent
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/dialogs/multipat.cxx3
-rw-r--r--cui/source/inc/autocdlg.hxx8
-rw-r--r--cui/source/inc/multipat.hxx1
-rw-r--r--cui/source/inc/radiobtnbox.hxx2
-rw-r--r--cui/source/options/fontsubs.cxx3
-rw-r--r--cui/source/options/fontsubs.hxx7
-rw-r--r--cui/source/options/optfltr.cxx3
-rw-r--r--cui/source/options/optfltr.hxx7
-rw-r--r--cui/source/options/optjava.cxx7
-rw-r--r--cui/source/options/optjava.hxx1
-rw-r--r--cui/source/options/radiobtnbox.cxx15
-rw-r--r--cui/source/options/webconninfo.cxx8
-rw-r--r--cui/source/options/webconninfo.hxx3
-rw-r--r--cui/source/tabpages/autocdlg.cxx6
14 files changed, 41 insertions, 33 deletions
diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx
index fb6aea37e4a0..08d8bc7d77e0 100644
--- a/cui/source/dialogs/multipat.cxx
+++ b/cui/source/dialogs/multipat.cxx
@@ -192,7 +192,8 @@ SvxMultiPathDialog::SvxMultiPathDialog( Window* pParent, sal_Bool bEmptyAllowed
aPathFL ( this, CUI_RES( FL_MULTIPATH) ),
aPathLB ( this, CUI_RES( LB_MULTIPATH ) ),
- aRadioLB ( this, CUI_RES( LB_RADIOBUTTON ) ),
+ m_aRadioLBContainer(this, CUI_RES(LB_RADIOBUTTON)),
+ aRadioLB(m_aRadioLBContainer),
aRadioFT ( this, CUI_RES( FT_RADIOBUTTON ) ),
aAddBtn ( this, CUI_RES( BTN_ADD_MULTIPATH ) ),
aDelBtn ( this, CUI_RES( BTN_DEL_MULTIPATH ) ),
diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx
index 91e97c25eac9..a22d7b34fe3a 100644
--- a/cui/source/inc/autocdlg.hxx
+++ b/cui/source/inc/autocdlg.hxx
@@ -83,8 +83,10 @@ class OfaACorrCheckListBox : public SvxSimpleTable
virtual void KeyInput( const KeyEvent& rKEvt );
public:
- OfaACorrCheckListBox(Window* pParent, const ResId& rResId ) :
- SvxSimpleTable( pParent, rResId ){}
+ OfaACorrCheckListBox(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); }
@@ -136,6 +138,7 @@ class OfaSwAutoFmtOptionsPage : public SfxTabPage
{
using TabPage::ActivatePage;
+ SvxSimpleTableContainer m_aCheckLBContainer;
OfaACorrCheckListBox aCheckLB;
PushButton aEditPB;
FixedText aHeader1Expl;
@@ -334,6 +337,7 @@ private:
SvxCheckListBox aCheckLB;
// Just for writer
+ SvxSimpleTableContainer m_aSwCheckLBContainer;
OfaACorrCheckListBox aSwCheckLB;
String sHeader1;
String sHeader2;
diff --git a/cui/source/inc/multipat.hxx b/cui/source/inc/multipat.hxx
index ac4afbfceaf6..ec6f8ef4e709 100644
--- a/cui/source/inc/multipat.hxx
+++ b/cui/source/inc/multipat.hxx
@@ -58,6 +58,7 @@ class SvxMultiPathDialog : public ModalDialog
protected:
FixedLine aPathFL;
ListBox aPathLB;
+ SvxSimpleTableContainer m_aRadioLBContainer;
svx::SvxRadioButtonListBox aRadioLB;
FixedText aRadioFT;
PushButton aAddBtn;
diff --git a/cui/source/inc/radiobtnbox.hxx b/cui/source/inc/radiobtnbox.hxx
index 0a67dcf9fd95..f7f8aea4a8bd 100644
--- a/cui/source/inc/radiobtnbox.hxx
+++ b/cui/source/inc/radiobtnbox.hxx
@@ -49,7 +49,7 @@ protected:
virtual void KeyInput( const KeyEvent& rKEvt );
public:
- SvxRadioButtonListBox( Window* _pParent, const ResId& _rId );
+ SvxRadioButtonListBox(SvxSimpleTableContainer& rParent, WinBits nBits = WB_BORDER);
~SvxRadioButtonListBox();
void HandleEntryChecked( SvLBoxEntry* _pEntry );
diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index 7a310b6f9dd2..8e8035461e84 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 1038b8eea822..ecd324ea4f63 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 a18c791b20c4..d9ccea223ef7 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 f62f92d062b1..aab983270fb6 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 14f122cfe78f..733d9eea6310 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 2c9681a29ce8..3bbfbb67d4e2 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 06c0352864c0..ca30c33ea6e0 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 dcd2afa7140b..d14141fc788c 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 b5ad4a3777ba..08aadd6b3858 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;
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index a41467a5035b..f6f0ee48d4fe 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -428,7 +428,8 @@ enum OfaAutoFmtOptions
OfaSwAutoFmtOptionsPage::OfaSwAutoFmtOptionsPage( Window* pParent,
const SfxItemSet& rSet ) :
SfxTabPage(pParent, CUI_RES(RID_OFAPAGE_AUTOFMT_APPLY), rSet),
- aCheckLB (this, CUI_RES(CLB_SETTINGS)),
+ m_aCheckLBContainer(this, CUI_RES(CLB_SETTINGS)),
+ aCheckLB(m_aCheckLBContainer),
aEditPB (this, CUI_RES(PB_EDIT)),
aHeader1Expl (this, CUI_RES(FT_HEADER1_EXPLANATION)),
aHeader2Expl (this, CUI_RES(FT_HEADER2_EXPLANATION)),
@@ -1897,7 +1898,8 @@ SvLBoxEntry* OfaQuoteTabPage::CreateEntry(String& rTxt, sal_uInt16 nCol)
OfaQuoteTabPage::OfaQuoteTabPage( Window* pParent, const SfxItemSet& rSet ) :
SfxTabPage(pParent, CUI_RES( RID_OFAPAGE_AUTOCORR_QUOTE ), rSet),
aCheckLB (this, CUI_RES(CLB_SETTINGS )),
- aSwCheckLB (this, CUI_RES(CLB_SETTINGS )),
+ m_aSwCheckLBContainer(this, CUI_RES(CLB_SETTINGS)),
+ aSwCheckLB(m_aSwCheckLBContainer),
sHeader1 (CUI_RES( STR_HEADER1 )),
sHeader2 (CUI_RES( STR_HEADER2 )),
sNonBrkSpace (CUI_RES( ST_NON_BREAK_SPACE )),