diff options
author | Michael Meeks <michael.meeks@suse.com> | 2011-09-27 12:37:00 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2011-09-27 15:07:12 +0100 |
commit | 642553238cc531f39049150ff52cf4e152b5abe6 (patch) | |
tree | 01e757db902775fe32e3af3ec43f9df7f8dac138 /cui | |
parent | add dependencies for vba unit test (diff) | |
download | core-642553238cc531f39049150ff52cf4e152b5abe6.tar.gz core-642553238cc531f39049150ff52cf4e152b5abe6.zip |
add GetParentDialog to VCL's Window, and remove DLGWIN & cut/paste
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/inc/cuitabarea.hxx | 6 | ||||
-rw-r--r-- | cui/source/tabpages/tabarea.cxx | 8 | ||||
-rw-r--r-- | cui/source/tabpages/tabline.cxx | 12 | ||||
-rw-r--r-- | cui/source/tabpages/tparea.cxx | 9 | ||||
-rw-r--r-- | cui/source/tabpages/tpbitmap.cxx | 36 | ||||
-rw-r--r-- | cui/source/tabpages/tpcolor.cxx | 40 | ||||
-rw-r--r-- | cui/source/tabpages/tpgradnt.cxx | 33 | ||||
-rw-r--r-- | cui/source/tabpages/tphatch.cxx | 33 | ||||
-rw-r--r-- | cui/source/tabpages/tpline.cxx | 21 | ||||
-rw-r--r-- | cui/source/tabpages/tplnedef.cxx | 30 | ||||
-rw-r--r-- | cui/source/tabpages/tplneend.cxx | 30 | ||||
-rw-r--r-- | cui/source/tabpages/tpshadow.cxx | 14 |
12 files changed, 82 insertions, 190 deletions
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx index 69102bafe43b..64801cadd047 100644 --- a/cui/source/inc/cuitabarea.hxx +++ b/cui/source/inc/cuitabarea.hxx @@ -653,9 +653,9 @@ class SvxLoadSaveEmbed { DECL_LINK( ClickLoadHdl_Impl, void * ); DECL_LINK( ClickSaveHdl_Impl, void * ); public: - SvxLoadSaveEmbed( Window *pParent, const ResId &aLoad, - const ResId &aSave, const ResId &aEmbed, - const ResId &aTableName, + SvxLoadSaveEmbed( Window *pParent, Window *pDialog, + const ResId &aLoad, const ResId &aSave, + const ResId &aEmbed, const ResId &aTableName, XPropertyListType t, XOutdevItemPool* mpXPool ); XPropertyListRef GetList(); void HideLoadSaveEmbed(); diff --git a/cui/source/tabpages/tabarea.cxx b/cui/source/tabpages/tabarea.cxx index f4634c08358a..cda945abe5af 100644 --- a/cui/source/tabpages/tabarea.cxx +++ b/cui/source/tabpages/tabarea.cxx @@ -48,14 +48,6 @@ #include "dlgname.hxx" #include <dialmgr.hxx> -#define DLGWIN this->GetParent()->GetParent() - -/************************************************************************* -|* -|* Konstruktor des Tab-Dialogs: Fuegt die Seiten zum Dialog hinzu -|* -|************************************************************************/ - SvxAreaTabDialog::SvxAreaTabDialog ( Window* pParent, diff --git a/cui/source/tabpages/tabline.cxx b/cui/source/tabpages/tabline.cxx index 362026520ce3..1e14d9d5a326 100644 --- a/cui/source/tabpages/tabline.cxx +++ b/cui/source/tabpages/tabline.cxx @@ -45,18 +45,6 @@ #include <svx/xtable.hxx> #include "svx/drawitem.hxx" -#define DLGWIN this->GetParent()->GetParent() - -#define BITMAP_WIDTH 32 -#define BITMAP_HEIGHT 12 -#define XOUT_WIDTH 150 - -/************************************************************************* -|* -|* Konstruktor des Tab-Dialogs: Fuegt die Seiten zum Dialog hinzu -|* -\************************************************************************/ - SvxLineTabDialog::SvxLineTabDialog ( Window* pParent, diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx index c675255e70f7..93244a3a8e6a 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -54,7 +54,6 @@ #include <svl/intitem.hxx> #include <sfx2/request.hxx> #include "paragrph.hrc" -#define DLGWIN this->GetParent()->GetParent() // static ---------------------------------------------------------------- @@ -812,7 +811,7 @@ void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet ) if( *pnBitmapListState ) { if( *pnBitmapListState & CT_CHANGED ) - pBitmapList = ( (SvxAreaTabDialog*) DLGWIN )-> + pBitmapList = ( (SvxAreaTabDialog*) GetParentDialog() )-> GetNewBitmapList(); _nPos = aLbBitmap.GetSelectEntryPos(); @@ -832,7 +831,7 @@ void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet ) if( *pnHatchingListState ) { if( *pnHatchingListState & CT_CHANGED ) - pHatchingList = ( (SvxAreaTabDialog*) DLGWIN )-> + pHatchingList = ( (SvxAreaTabDialog*) GetParentDialog() )-> GetNewHatchingList(); _nPos = aLbHatching.GetSelectEntryPos(); @@ -854,7 +853,7 @@ void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet ) if( *pnGradientListState ) { if( *pnGradientListState & CT_CHANGED ) - pGradientList = ( (SvxAreaTabDialog*) DLGWIN )-> + pGradientList = ( (SvxAreaTabDialog*) GetParentDialog() )-> GetNewGradientList(); _nPos = aLbGradient.GetSelectEntryPos(); @@ -874,7 +873,7 @@ void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet ) if( *pnColorListState ) { if( *pnColorListState & CT_CHANGED ) - pColorList = ( (SvxAreaTabDialog*) DLGWIN )-> + pColorList = ( (SvxAreaTabDialog*) GetParentDialog() )-> GetNewColorList(); // aLbColor _nPos = aLbColor.GetSelectEntryPos(); diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index c15680efae8f..b0877be9dba9 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -68,14 +68,6 @@ #include "sfx2/opengrf.hxx" #include "paragrph.hrc" -#define DLGWIN this->GetParent()->GetParent() - -/************************************************************************* -|* -|* Dialog zum Aendern und Definieren der Bitmaps -|* -\************************************************************************/ - SvxBitmapTabPage::SvxBitmapTabPage ( Window* pParent, @@ -180,7 +172,7 @@ void SvxBitmapTabPage::ActivatePage( const SfxItemSet& ) *pnColorListState & CT_MODIFIED ) { if( *pnColorListState & CT_CHANGED ) - pColorList = ( (SvxAreaTabDialog*) DLGWIN )->GetNewColorList(); + pColorList = ( (SvxAreaTabDialog*) GetParentDialog() )->GetNewColorList(); // LbColor nPos = aLbColor.GetSelectEntryPos(); @@ -544,7 +536,7 @@ long SvxBitmapTabPage::CheckChanges_Impl() Image aWarningBoxImage = WarningBox::GetStandardImage(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!"); - AbstractSvxMessDialog* aMessDlg = pFact->CreateSvxMessDialog( DLGWIN, RID_SVXDLG_MESSBOX, + AbstractSvxMessDialog* aMessDlg = pFact->CreateSvxMessDialog( GetParentDialog(), RID_SVXDLG_MESSBOX, String( SVX_RES( RID_SVXSTR_BITMAP ) ), String( CUI_RES( RID_SVXSTR_ASK_CHANGE_BITMAP ) ), &aWarningBoxImage ); @@ -610,7 +602,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!"); - AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); + AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( GetParentDialog(), aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); WarningBox* pWarnBox = NULL; sal_uInt16 nError = RID_SVXSTR_WARN_NAME_DUPLICATE; @@ -632,7 +624,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) if( !pWarnBox ) { - pWarnBox = new WarningBox( DLGWIN, + pWarnBox = new WarningBox( GetParentDialog(), WinBits( WB_OK_CANCEL ), String( ResId( nError, rMgr ) ) ); pWarnBox->SetHelpId( HID_WARN_NAME_DUPLICATE ); @@ -739,7 +731,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickImportHdl_Impl, void *, EMPTYARG ) INetURLObject aURL( aDlg.GetPath() ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!"); - AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, String(aURL.GetName()).GetToken( 0, '.' ), aDesc ); + AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( GetParentDialog(), String(aURL.GetName()).GetToken( 0, '.' ), aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); nError = RID_SVXSTR_WARN_NAME_DUPLICATE; @@ -761,7 +753,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickImportHdl_Impl, void *, EMPTYARG ) if( !pWarnBox ) { - pWarnBox = new WarningBox( DLGWIN, + pWarnBox = new WarningBox( GetParentDialog(), WinBits( WB_OK_CANCEL ), String( ResId( nError, rMgr ) ) ); pWarnBox->SetHelpId( HID_WARN_NAME_DUPLICATE ); @@ -801,7 +793,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickImportHdl_Impl, void *, EMPTYARG ) } else // Graphik konnte nicht geladen werden - ErrorBox( DLGWIN, + ErrorBox( GetParentDialog(), WinBits( WB_OK ), String( ResId( RID_SVXSTR_READ_DATA_ERROR, rMgr ) ) ).Execute(); } @@ -829,7 +821,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!"); - AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); + AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( GetParentDialog(), aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); long nCount = pBitmapList->Count(); @@ -873,7 +865,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) } else { - WarningBox aBox( DLGWIN, WinBits( WB_OK ), String( ResId( RID_SVXSTR_WARN_NAME_DUPLICATE, rMgr ) ) ); + WarningBox aBox( GetParentDialog(), WinBits( WB_OK ), String( ResId( RID_SVXSTR_WARN_NAME_DUPLICATE, rMgr ) ) ); aBox.SetHelpId( HID_WARN_NAME_DUPLICATE ); aBox.Execute(); } @@ -891,7 +883,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) if( nPos != LISTBOX_ENTRY_NOTFOUND ) { - QueryBox aQueryBox( DLGWIN, WinBits( WB_YES_NO | WB_DEF_NO ), + QueryBox aQueryBox( GetParentDialog(), WinBits( WB_YES_NO | WB_DEF_NO ), String( CUI_RES( RID_SVXSTR_ASK_DEL_BITMAP ) ) ); if( aQueryBox.Execute() == RET_YES ) @@ -928,7 +920,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) if ( *pnBitmapListState & CT_MODIFIED ) { - nReturn = WarningBox( DLGWIN, WinBits( WB_YES_NO_CANCEL ), + nReturn = WarningBox( GetParentDialog(), WinBits( WB_YES_NO_CANCEL ), String( ResId( RID_SVXSTR_WARN_TABLE_OVERWRITE, rMgr ) ) ).Execute(); if ( nReturn == RET_YES ) @@ -961,7 +953,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) if( pBmpList->Load() ) { pBitmapList = pBmpList; - ( (SvxAreaTabDialog*) DLGWIN )->SetNewBitmapList( pBitmapList ); + ( (SvxAreaTabDialog*) GetParentDialog() )->SetNewBitmapList( pBitmapList ); aLbBitmaps.Clear(); aLbBitmaps.Fill( pBitmapList ); @@ -991,7 +983,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) else { LeaveWait(); - ErrorBox( DLGWIN, WinBits( WB_OK ), + ErrorBox( GetParentDialog(), WinBits( WB_OK ), String( ResId( RID_SVXSTR_READ_DATA_ERROR, rMgr ) ) ).Execute(); } } @@ -1067,7 +1059,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickSaveHdl_Impl, void *, EMPTYARG ) } else { - ErrorBox( DLGWIN, WinBits( WB_OK ), + ErrorBox( GetParentDialog(), WinBits( WB_OK ), String( CUI_RES( RID_SVXSTR_WRITE_DATA_ERROR ) ) ).Execute(); } } diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index ce1febfc0f9f..0626e35bfda1 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -55,29 +55,15 @@ namespace css = ::com::sun::star; -#define DLGWIN GetParentDialog( this ) - -static Window* GetParentDialog( Window* pWindow ) -{ - while( pWindow ) - { - if( pWindow->IsDialog() ) - break; - - pWindow = pWindow->GetParent(); - } - - return pWindow; -} // Load save embed functionality -SvxLoadSaveEmbed::SvxLoadSaveEmbed( Window *pParent, const ResId &rLoad, - const ResId &rSave, const ResId &rEmbed, - const ResId &rTableName, +SvxLoadSaveEmbed::SvxLoadSaveEmbed( Window *pParent, Window *pDialog, + const ResId &rLoad, const ResId &rSave, + const ResId &rEmbed, const ResId &rTableName, XPropertyListType t, XOutdevItemPool* pXPool ) : meType( t ) , mpXPool( pXPool ) - , mpTopDlg( GetParentDialog( pParent ) ) + , mpTopDlg( pDialog ) , maBoxEmbed( pParent, rEmbed ) , maBtnLoad( pParent, rLoad ) , maBtnSave( pParent, rSave ) @@ -326,7 +312,8 @@ SvxColorTabPage::SvxColorTabPage ) : SfxTabPage ( pParent, CUI_RES( RID_SVXPAGE_COLOR ), rInAttrs ), - SvxLoadSaveEmbed ( this, CUI_RES( BTN_LOAD ), CUI_RES( BTN_SAVE ), + SvxLoadSaveEmbed ( this, GetParentDialog(), + CUI_RES( BTN_LOAD ), CUI_RES( BTN_SAVE ), CUI_RES( BTN_EMBED ), CUI_RES( FT_TABLE_NAME ), XCOLOR_LIST, (XOutdevItemPool*) rInAttrs.GetPool() ), @@ -514,7 +501,7 @@ long SvxColorTabPage::CheckChanges_Impl() Image aWarningBoxImage = WarningBox::GetStandardImage(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!"); - AbstractSvxMessDialog* aMessDlg = pFact->CreateSvxMessDialog( DLGWIN, RID_SVXDLG_MESSBOX, + AbstractSvxMessDialog* aMessDlg = pFact->CreateSvxMessDialog( GetParentDialog(), RID_SVXDLG_MESSBOX, SVX_RESSTR( RID_SVXSTR_COLOR ), String( ResId( RID_SVXSTR_ASK_CHANGE_COLOR, rMgr ) ), &aWarningBoxImage ); @@ -681,14 +668,14 @@ IMPL_LINK( SvxColorTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) // Wenn ja, wird wiederholt ein neuer Name angefordert if ( !bDifferent ) { - WarningBox aWarningBox( DLGWIN, WinBits( WB_OK ), + WarningBox aWarningBox( GetParentDialog(), WinBits( WB_OK ), String( ResId( RID_SVXSTR_WARN_NAME_DUPLICATE, rMgr ) ) ); aWarningBox.SetHelpId( HID_WARN_NAME_DUPLICATE ); aWarningBox.Execute(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!"); - AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); + AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( GetParentDialog(), aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); sal_Bool bLoop = sal_True; @@ -758,14 +745,14 @@ IMPL_LINK( SvxColorTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) // Wenn ja, wird wiederholt ein neuer Name angefordert if ( !bDifferent ) { - WarningBox aWarningBox( DLGWIN, WinBits( WB_OK ), + WarningBox aWarningBox( GetParentDialog(), WinBits( WB_OK ), String( ResId( RID_SVXSTR_WARN_NAME_DUPLICATE, rMgr ) ) ); aWarningBox.SetHelpId( HID_WARN_NAME_DUPLICATE ); aWarningBox.Execute(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!"); - AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); + AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( GetParentDialog(), aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); sal_Bool bLoop = sal_True; @@ -818,7 +805,7 @@ IMPL_LINK( SvxColorTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxColorTabPage, ClickWorkOnHdl_Impl, void *, EMPTYARG ) { - SvColorDialog* pColorDlg = new SvColorDialog( DLGWIN ); + SvColorDialog* pColorDlg = new SvColorDialog( GetParentDialog() ); Color aTmpColor (aAktuellColor); if (eCM != CM_RGB) @@ -860,7 +847,7 @@ IMPL_LINK( SvxColorTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) if( nPos != LISTBOX_ENTRY_NOTFOUND ) { - QueryBox aQueryBox( DLGWIN, WinBits( WB_YES_NO | WB_DEF_NO ), + QueryBox aQueryBox( GetParentDialog(), WinBits( WB_YES_NO | WB_DEF_NO ), String( CUI_RES( RID_SVXSTR_ASK_DEL_COLOR ) ) ); if( aQueryBox.Execute() == RET_YES ) @@ -1230,5 +1217,4 @@ void SvxColorTabPage::FillUserData() SetUserData( UniString::CreateFromInt32( eCM ) ); } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx index fd7f1a9ed6a8..99448b8c0aed 100644 --- a/cui/source/tabpages/tpgradnt.cxx +++ b/cui/source/tabpages/tpgradnt.cxx @@ -52,17 +52,6 @@ #include <svx/dialogs.hrc> #include "paragrph.hrc" -#define DLGWIN this->GetParent()->GetParent() - -#define BITMAP_WIDTH 32 -#define BITMAP_HEIGHT 12 - -/************************************************************************* -|* -|* Dialog zum Aendern und Definieren der Farbverlaeufe -|* -\************************************************************************/ - SvxGradientTabPage::SvxGradientTabPage ( Window* pParent, @@ -186,7 +175,7 @@ void SvxGradientTabPage::ActivatePage( const SfxItemSet& ) *pnColorListState & CT_MODIFIED ) { if( *pnColorListState & CT_CHANGED ) - pColorList = ( (SvxAreaTabDialog*) DLGWIN )->GetNewColorList(); + pColorList = ( (SvxAreaTabDialog*) GetParentDialog() )->GetNewColorList(); // LbColorFrom nPos = aLbColorFrom.GetSelectEntryPos(); @@ -284,7 +273,7 @@ long SvxGradientTabPage::CheckChanges_Impl() Image aWarningBoxImage = WarningBox::GetStandardImage(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!"); - AbstractSvxMessDialog* aMessDlg = pFact->CreateSvxMessDialog( DLGWIN, RID_SVXDLG_MESSBOX, + AbstractSvxMessDialog* aMessDlg = pFact->CreateSvxMessDialog( GetParentDialog(), RID_SVXDLG_MESSBOX, SVX_RESSTR( RID_SVXSTR_GRADIENT ), CUI_RESSTR( RID_SVXSTR_ASK_CHANGE_GRADIENT ), &aWarningBoxImage ); @@ -452,7 +441,7 @@ IMPL_LINK( SvxGradientTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!"); - AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); + AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( GetParentDialog(), aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); WarningBox* pWarnBox = NULL; sal_uInt16 nError = RID_SVXSTR_WARN_NAME_DUPLICATE; @@ -475,7 +464,7 @@ IMPL_LINK( SvxGradientTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) if( !pWarnBox ) { - pWarnBox = new WarningBox( DLGWIN, + pWarnBox = new WarningBox( GetParentDialog(), WinBits( WB_OK_CANCEL ), String( ResId( nError, rMgr ) ) ); pWarnBox->SetHelpId( HID_WARN_NAME_DUPLICATE ); @@ -547,7 +536,7 @@ IMPL_LINK( SvxGradientTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!"); - AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); + AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( GetParentDialog(), aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); long nCount = pGradientList->Count(); @@ -592,7 +581,7 @@ IMPL_LINK( SvxGradientTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) } else { - WarningBox aBox( DLGWIN, WinBits( WB_OK ),String( ResId( RID_SVXSTR_WARN_NAME_DUPLICATE, rMgr ) ) ); + WarningBox aBox( GetParentDialog(), WinBits( WB_OK ),String( ResId( RID_SVXSTR_WARN_NAME_DUPLICATE, rMgr ) ) ); aBox.SetHelpId( HID_WARN_NAME_DUPLICATE ); aBox.Execute(); } @@ -611,7 +600,7 @@ IMPL_LINK( SvxGradientTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) if( nPos != LISTBOX_ENTRY_NOTFOUND ) { - QueryBox aQueryBox( DLGWIN, WinBits( WB_YES_NO | WB_DEF_NO ), + QueryBox aQueryBox( GetParentDialog(), WinBits( WB_YES_NO | WB_DEF_NO ), String( CUI_RES( RID_SVXSTR_ASK_DEL_GRADIENT ) ) ); if ( aQueryBox.Execute() == RET_YES ) @@ -647,7 +636,7 @@ IMPL_LINK( SvxGradientTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) if ( *pnGradientListState & CT_MODIFIED ) { - nReturn = WarningBox( DLGWIN, WinBits( WB_YES_NO_CANCEL ), + nReturn = WarningBox( GetParentDialog(), WinBits( WB_YES_NO_CANCEL ), String( ResId( RID_SVXSTR_WARN_TABLE_OVERWRITE, rMgr ) ) ).Execute(); if ( nReturn == RET_YES ) @@ -682,7 +671,7 @@ IMPL_LINK( SvxGradientTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) if ( pGrdList->Load() ) { pGradientList = pGrdList; - ( (SvxAreaTabDialog*) DLGWIN )-> + ( (SvxAreaTabDialog*) GetParentDialog() )-> SetNewGradientList( pGradientList ); aLbGradients.Clear(); @@ -713,7 +702,7 @@ IMPL_LINK( SvxGradientTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) else { LeaveWait(); - ErrorBox( DLGWIN, WinBits( WB_OK ), + ErrorBox( GetParentDialog(), WinBits( WB_OK ), String( ResId( RID_SVXSTR_READ_DATA_ERROR, rMgr ) ) ).Execute(); } } @@ -789,7 +778,7 @@ IMPL_LINK( SvxGradientTabPage, ClickSaveHdl_Impl, void *, EMPTYARG ) } else { - ErrorBox( DLGWIN, WinBits( WB_OK ), + ErrorBox( GetParentDialog(), WinBits( WB_OK ), String( CUI_RES( RID_SVXSTR_WRITE_DATA_ERROR ) ) ).Execute(); } } diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx index 31b606de95a8..febb0d305918 100644 --- a/cui/source/tabpages/tphatch.cxx +++ b/cui/source/tabpages/tphatch.cxx @@ -53,17 +53,6 @@ #include "paragrph.hrc" #include <svx/dialogs.hrc> -#define DLGWIN this->GetParent()->GetParent() - -#define BITMAP_WIDTH 32 -#define BITMAP_HEIGHT 12 - -/************************************************************************* -|* -|* Dialog zum Aendern und Definieren der Schraffuren -|* -\************************************************************************/ - SvxHatchTabPage::SvxHatchTabPage ( Window* pParent, @@ -185,7 +174,7 @@ void SvxHatchTabPage::ActivatePage( const SfxItemSet& rSet ) *pnColorListState & CT_MODIFIED ) { if( *pnColorListState & CT_CHANGED ) - pColorList = ( (SvxAreaTabDialog*) DLGWIN )->GetNewColorList(); + pColorList = ( (SvxAreaTabDialog*) GetParentDialog() )->GetNewColorList(); // LbLineColor nPos = aLbLineColor.GetSelectEntryPos(); @@ -263,7 +252,7 @@ long SvxHatchTabPage::CheckChanges_Impl() Image aWarningBoxImage = WarningBox::GetStandardImage(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!"); - AbstractSvxMessDialog* aMessDlg = pFact->CreateSvxMessDialog( DLGWIN, RID_SVXDLG_MESSBOX, + AbstractSvxMessDialog* aMessDlg = pFact->CreateSvxMessDialog( GetParentDialog(), RID_SVXDLG_MESSBOX, SVX_RESSTR( RID_SVXSTR_HATCH ), CUI_RESSTR( RID_SVXSTR_ASK_CHANGE_HATCH ), &aWarningBoxImage ); @@ -506,7 +495,7 @@ IMPL_LINK( SvxHatchTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!"); - AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); + AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( GetParentDialog(), aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); WarningBox* pWarnBox = NULL; sal_uInt16 nError = RID_SVXSTR_WARN_NAME_DUPLICATE; @@ -528,7 +517,7 @@ IMPL_LINK( SvxHatchTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) if( !pWarnBox ) { - pWarnBox = new WarningBox( DLGWIN, + pWarnBox = new WarningBox( GetParentDialog(), WinBits( WB_OK_CANCEL ), String( ResId( nError, rMgr ) ) ); pWarnBox->SetHelpId( HID_WARN_NAME_DUPLICATE ); @@ -595,7 +584,7 @@ IMPL_LINK( SvxHatchTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!"); - AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); + AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( GetParentDialog(), aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); long nCount = pHatchingList->Count(); @@ -641,7 +630,7 @@ IMPL_LINK( SvxHatchTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) } else { - WarningBox aBox( DLGWIN, WinBits( WB_OK ),String( ResId( RID_SVXSTR_WARN_NAME_DUPLICATE, rMgr ) ) ); + WarningBox aBox( GetParentDialog(), WinBits( WB_OK ),String( ResId( RID_SVXSTR_WARN_NAME_DUPLICATE, rMgr ) ) ); aBox.SetHelpId( HID_WARN_NAME_DUPLICATE ); aBox.Execute(); } @@ -659,7 +648,7 @@ IMPL_LINK( SvxHatchTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) if( nPos != LISTBOX_ENTRY_NOTFOUND ) { - QueryBox aQueryBox( DLGWIN, WinBits( WB_YES_NO | WB_DEF_NO ), + QueryBox aQueryBox( GetParentDialog(), WinBits( WB_YES_NO | WB_DEF_NO ), String( CUI_RES( RID_SVXSTR_ASK_DEL_HATCH ) ) ); if( aQueryBox.Execute() == RET_YES ) @@ -695,7 +684,7 @@ IMPL_LINK( SvxHatchTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) if ( *pnHatchingListState & CT_MODIFIED ) { - nReturn = WarningBox( DLGWIN, WinBits( WB_YES_NO_CANCEL ), + nReturn = WarningBox( GetParentDialog(), WinBits( WB_YES_NO_CANCEL ), String( ResId( RID_SVXSTR_WARN_TABLE_OVERWRITE, rMgr ) ) ).Execute(); if ( nReturn == RET_YES ) @@ -726,7 +715,7 @@ IMPL_LINK( SvxHatchTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) if( pHatchList->Load() ) { pHatchingList = pHatchList; - ( (SvxAreaTabDialog*) DLGWIN )->SetNewHatchingList( pHatchingList ); + ( (SvxAreaTabDialog*) GetParentDialog() )->SetNewHatchingList( pHatchingList ); aLbHatchings.Clear(); aLbHatchings.Fill( pHatchingList ); @@ -753,7 +742,7 @@ IMPL_LINK( SvxHatchTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) *pnHatchingListState &= ~CT_MODIFIED; } else - ErrorBox( DLGWIN, WinBits( WB_OK ), + ErrorBox( GetParentDialog(), WinBits( WB_OK ), String( ResId( RID_SVXSTR_READ_DATA_ERROR, rMgr ) ) ).Execute(); } } @@ -828,7 +817,7 @@ IMPL_LINK( SvxHatchTabPage, ClickSaveHdl_Impl, void *, EMPTYARG ) } else { - ErrorBox( DLGWIN, WinBits( WB_OK ), + ErrorBox( GetParentDialog(), WinBits( WB_OK ), String( CUI_RES( RID_SVXSTR_WRITE_DATA_ERROR ) ) ).Execute(); } } diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index 013f94af4d26..3a27eaace18b 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -68,13 +68,6 @@ #define MAX_BMP_WIDTH 16 #define MAX_BMP_HEIGHT 16 -// define ---------------------------------------------------------------- - -#define DLGWIN this->GetParent()->GetParent() - -#define BITMAP_WIDTH 32 -#define BITMAP_HEIGHT 12 -#define XOUT_WIDTH 150 // static ---------------------------------------------------------------- @@ -87,12 +80,6 @@ static sal_uInt16 pLineRanges[] = 0 }; -/************************************************************************* -|* -|* Dialog zum Aendern der Linien -|* -\************************************************************************/ - SvxLineTabPage::SvxLineTabPage ( Window* pParent, @@ -316,7 +303,7 @@ void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet ) ( *pnDashListState & CT_CHANGED ) ) { if( *pnDashListState & CT_CHANGED ) - pDashList = ( (SvxLineTabDialog*) DLGWIN )-> + pDashList = ( (SvxLineTabDialog*) GetParentDialog() )-> GetNewDashList(); *pnDashListState = CT_NONE; @@ -349,7 +336,7 @@ void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet ) ( *pnLineEndListState & CT_CHANGED ) ) { if( *pnLineEndListState & CT_CHANGED ) - pLineEndList = ( (SvxLineTabDialog*) DLGWIN )-> + pLineEndList = ( (SvxLineTabDialog*) GetParentDialog() )-> GetNewLineEndList(); *pnLineEndListState = CT_NONE; @@ -404,7 +391,7 @@ void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet ) if( *pnColorListState ) { if( *pnColorListState & CT_CHANGED ) - pColorList = ( (SvxLineTabDialog*) DLGWIN )->GetNewColorList(); + pColorList = ( (SvxLineTabDialog*) GetParentDialog() )->GetNewColorList(); // aLbColor sal_uInt16 nColorPos = aLbColor.GetSelectEntryPos(); aLbColor.Clear(); @@ -1254,7 +1241,7 @@ SfxTabPage* SvxLineTabPage::Create( Window* pWindow, sal_uInt16* SvxLineTabPage::GetRanges() { - return( pLineRanges ); + return pLineRanges; } //------------------------------------------------------------------------ diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx index 6dfe68a6cfc3..96d6cb40d08d 100644 --- a/cui/source/tabpages/tplnedef.cxx +++ b/cui/source/tabpages/tplnedef.cxx @@ -54,18 +54,8 @@ #include <svx/dialmgr.hxx> #include <svx/dialogs.hrc> -#define DLGWIN this->GetParent()->GetParent() - -#define BITMAP_WIDTH 32 -#define BITMAP_HEIGHT 12 #define XOUT_WIDTH 150 -/************************************************************************* -|* -|* Dialog zum Definieren von Linienstilen -|* -\************************************************************************/ - SvxLineDefTabPage::SvxLineDefTabPage ( Window* pParent, @@ -254,7 +244,7 @@ void SvxLineDefTabPage::CheckChanges_Impl() Image aWarningBoxImage = WarningBox::GetStandardImage(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!"); - AbstractSvxMessDialog* aMessDlg = pFact->CreateSvxMessDialog( DLGWIN, RID_SVXDLG_MESSBOX, + AbstractSvxMessDialog* aMessDlg = pFact->CreateSvxMessDialog( GetParentDialog(), RID_SVXDLG_MESSBOX, SVX_RESSTR( RID_SVXSTR_LINESTYLE ), String( ResId( RID_SVXSTR_ASK_CHANGE_LINESTYLE, rMgr ) ), &aWarningBoxImage ); @@ -583,7 +573,7 @@ IMPL_LINK( SvxLineDefTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!"); - AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); + AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( GetParentDialog(), aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); sal_Bool bLoop = sal_True; @@ -628,7 +618,7 @@ IMPL_LINK( SvxLineDefTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) } else { - WarningBox aBox( DLGWIN, WinBits( WB_OK ),String( ResId( RID_SVXSTR_WARN_NAME_DUPLICATE, rMgr ) ) ); + WarningBox aBox( GetParentDialog(), WinBits( WB_OK ),String( ResId( RID_SVXSTR_WARN_NAME_DUPLICATE, rMgr ) ) ); aBox.SetHelpId( HID_WARN_NAME_DUPLICATE ); aBox.Execute(); } @@ -661,7 +651,7 @@ IMPL_LINK( SvxLineDefTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!"); - AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); + AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( GetParentDialog(), aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); long nCount = pDashList->Count(); @@ -709,7 +699,7 @@ IMPL_LINK( SvxLineDefTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) } else { - WarningBox aBox( DLGWIN, WinBits( WB_OK ), String( ResId( RID_SVXSTR_WARN_NAME_DUPLICATE, rMgr ) ) ); + WarningBox aBox( GetParentDialog(), WinBits( WB_OK ), String( ResId( RID_SVXSTR_WARN_NAME_DUPLICATE, rMgr ) ) ); aBox.SetHelpId( HID_WARN_NAME_DUPLICATE ); aBox.Execute(); } @@ -727,7 +717,7 @@ IMPL_LINK( SvxLineDefTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { - QueryBox aQueryBox( DLGWIN, WinBits( WB_YES_NO | WB_DEF_NO ), + QueryBox aQueryBox( GetParentDialog(), WinBits( WB_YES_NO | WB_DEF_NO ), String( CUI_RES( RID_SVXSTR_ASK_DEL_LINESTYLE ) ) ); if ( aQueryBox.Execute() == RET_YES ) @@ -765,7 +755,7 @@ IMPL_LINK( SvxLineDefTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) if ( *pnDashListState & CT_MODIFIED ) { - nReturn = WarningBox( DLGWIN, WinBits( WB_YES_NO_CANCEL ), + nReturn = WarningBox( GetParentDialog(), WinBits( WB_YES_NO_CANCEL ), String( ResId( RID_SVXSTR_WARN_TABLE_OVERWRITE, rMgr ) ) ).Execute(); if ( nReturn == RET_YES ) @@ -797,7 +787,7 @@ IMPL_LINK( SvxLineDefTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) if( pDshLst->Load() ) { pDashList = pDshLst; - ( (SvxLineTabDialog*) DLGWIN )->SetNewDashList( pDashList ); + ( (SvxLineTabDialog*) GetParentDialog() )->SetNewDashList( pDashList ); aLbLineStyles.Clear(); aLbLineStyles.Fill( pDashList ); @@ -812,7 +802,7 @@ IMPL_LINK( SvxLineDefTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) } else //aIStream.Close(); - ErrorBox( DLGWIN, WinBits( WB_OK ), + ErrorBox( GetParentDialog(), WinBits( WB_OK ), String( ResId( RID_SVXSTR_READ_DATA_ERROR, rMgr ) ) ).Execute(); } } @@ -874,7 +864,7 @@ IMPL_LINK( SvxLineDefTabPage, ClickSaveHdl_Impl, void *, EMPTYARG ) } else { - ErrorBox( DLGWIN, WinBits( WB_OK ), + ErrorBox( GetParentDialog(), WinBits( WB_OK ), String( CUI_RES( RID_SVXSTR_WRITE_DATA_ERROR ) ) ).Execute(); } } diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx index 572b0af82fd5..6b253ad1c185 100644 --- a/cui/source/tabpages/tplneend.cxx +++ b/cui/source/tabpages/tplneend.cxx @@ -58,18 +58,8 @@ #include <basegfx/matrix/b2dhommatrixtools.hxx> #include <svx/dialogs.hrc> -#define DLGWIN this->GetParent()->GetParent() - -#define BITMAP_WIDTH 32 -#define BITMAP_HEIGHT 12 #define XOUT_WIDTH 150 -/************************************************************************* -|* -|* Dialog zum Definieren von Linienenden-Stilen -|* -\************************************************************************/ - SvxLineEndDefTabPage::SvxLineEndDefTabPage ( Window* pParent, @@ -217,7 +207,7 @@ void SvxLineEndDefTabPage::CheckChanges_Impl() if( aString != aLbLineEnds.GetSelectEntry() ) { - QueryBox aQueryBox( DLGWIN, WinBits( WB_YES_NO | WB_DEF_NO ), + QueryBox aQueryBox( GetParentDialog(), WinBits( WB_YES_NO | WB_DEF_NO ), CUI_RESSTR( RID_SVXSTR_ASK_CHANGE_LINEEND ) ); if ( aQueryBox.Execute() == RET_YES ) @@ -354,14 +344,14 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) // Wenn ja, wird wiederholt ein neuer Name angefordert if ( !bDifferent ) { - WarningBox aWarningBox( DLGWIN, WinBits( WB_OK ), + WarningBox aWarningBox( GetParentDialog(), WinBits( WB_OK ), String( ResId( RID_SVXSTR_WARN_NAME_DUPLICATE, rMgr ) ) ); aWarningBox.SetHelpId( HID_WARN_NAME_DUPLICATE ); aWarningBox.Execute(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!"); - AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); + AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( GetParentDialog(), aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); sal_Bool bLoop = sal_True; @@ -468,7 +458,7 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!"); - AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); + AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( GetParentDialog(), aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); sal_Bool bLoop = sal_True; @@ -503,7 +493,7 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) } else { - WarningBox aBox( DLGWIN, WinBits( WB_OK ),String( ResId( RID_SVXSTR_WARN_NAME_DUPLICATE, rMgr ) ) ); + WarningBox aBox( GetParentDialog(), WinBits( WB_OK ),String( ResId( RID_SVXSTR_WARN_NAME_DUPLICATE, rMgr ) ) ); aBox.SetHelpId( HID_WARN_NAME_DUPLICATE ); aBox.Execute(); } @@ -531,7 +521,7 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) if( nPos != LISTBOX_ENTRY_NOTFOUND ) { - QueryBox aQueryBox( DLGWIN, WinBits( WB_YES_NO | WB_DEF_NO ), + QueryBox aQueryBox( GetParentDialog(), WinBits( WB_YES_NO | WB_DEF_NO ), String( CUI_RES( RID_SVXSTR_ASK_DEL_LINEEND ) ) ); if ( aQueryBox.Execute() == RET_YES ) @@ -568,7 +558,7 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) if ( *pnLineEndListState & CT_MODIFIED ) { - nReturn = WarningBox( DLGWIN, WinBits( WB_YES_NO_CANCEL ), + nReturn = WarningBox( GetParentDialog(), WinBits( WB_YES_NO_CANCEL ), String( ResId( RID_SVXSTR_WARN_TABLE_OVERWRITE, rMgr ) ) ).Execute(); if ( nReturn == RET_YES ) @@ -599,7 +589,7 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) if( pLeList->Load() ) { pLineEndList = pLeList; - ( (SvxLineTabDialog*) DLGWIN )->SetNewLineEndList( pLineEndList ); + ( (SvxLineTabDialog*) GetParentDialog() )->SetNewLineEndList( pLineEndList ); aLbLineEnds.Clear(); aLbLineEnds.Fill( pLineEndList ); Reset( rOutAttrs ); @@ -612,7 +602,7 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) *pnLineEndListState &= ~CT_MODIFIED; } else - ErrorBox( DLGWIN, WinBits( WB_OK ), + ErrorBox( GetParentDialog(), WinBits( WB_OK ), String( ResId( RID_SVXSTR_READ_DATA_ERROR, rMgr ) ) ).Execute(); } } @@ -674,7 +664,7 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickSaveHdl_Impl, void *, EMPTYARG ) } else { - ErrorBox( DLGWIN, WinBits( WB_OK ), + ErrorBox( GetParentDialog(), WinBits( WB_OK ), String( CUI_RES( RID_SVXSTR_WRITE_DATA_ERROR ) ) ).Execute(); } } diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx index ea334b576bba..bada2c2f0eb6 100644 --- a/cui/source/tabpages/tpshadow.cxx +++ b/cui/source/tabpages/tpshadow.cxx @@ -48,10 +48,6 @@ #include <svx/xlineit0.hxx> #include <sfx2/request.hxx> -#define DLGWIN this->GetParent()->GetParent() - -// static ---------------------------------------------------------------- - static sal_uInt16 pShadowRanges[] = { SDRATTR_SHADOWCOLOR, @@ -61,12 +57,6 @@ static sal_uInt16 pShadowRanges[] = 0 }; -/************************************************************************* -|* -|* Dialog zum Aendern des Schattens -|* -\************************************************************************/ - SvxShadowTabPage::SvxShadowTabPage( Window* pParent, const SfxItemSet& rInAttrs ) : SvxTabPage ( pParent, CUI_RES( RID_SVXPAGE_SHADOW ), rInAttrs ), @@ -231,14 +221,14 @@ void SvxShadowTabPage::ActivatePage( const SfxItemSet& rSet ) { if( *pnColorListState & CT_CHANGED ) { - SvxAreaTabDialog* pArea = dynamic_cast< SvxAreaTabDialog* >( DLGWIN ); + SvxAreaTabDialog* pArea = dynamic_cast< SvxAreaTabDialog* >( GetParentDialog() ); if( pArea ) { pColorList = pArea->GetNewColorList(); } else { - SvxLineTabDialog* pLine = dynamic_cast< SvxLineTabDialog* >( DLGWIN ); + SvxLineTabDialog* pLine = dynamic_cast< SvxLineTabDialog* >( GetParentDialog() ); if( pLine ) pColorList = pLine->GetNewColorList(); } |