From 71c4a2b761885c2d5515e89fd5aedf7d1e8a249b Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 12 May 2016 09:38:28 +0100 Subject: mpDefDialogParent is not used since 2002 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit i.e. commit c0ae87cb5f2989bc4b8dff4907994d513ee87e39 Author: Stephan Schäfer Date: Tue Oct 22 08:39:05 2002 +0000 #103442# choose DefDialogParent on-the-fly and so calling SetDefDialogParent doesn't achieve anything Change-Id: I2ec72da47b2dac03fdddbdb9eba5ae4bf205eb22 --- sw/source/ui/dialog/uiregionsw.cxx | 12 ------------ sw/source/ui/fldui/fldfunc.cxx | 6 +----- sw/source/ui/fldui/javaedit.cxx | 10 ++-------- sw/source/ui/index/cnttab.cxx | 10 ++-------- 4 files changed, 5 insertions(+), 33 deletions(-) (limited to 'sw/source/ui') diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 8525ff22896e..3db1ed3cde6d 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -308,7 +308,6 @@ SwEditRegionDlg::SwEditRegionDlg( vcl::Window* pParent, SwWrtShell& rWrtSh ) , aImageIL(SW_RES(IL_SECTION_BITMAPS)) , rSh(rWrtSh) , m_pDocInserter(nullptr) - , m_pOldDefDlgParent(nullptr) , bDontCheckPasswd(true) { get(m_pCurName, "curname"); @@ -545,7 +544,6 @@ void SwEditRegionDlg::dispose() m_pOK.clear(); m_pOptionsPB.clear(); m_pDismiss.clear(); - m_pOldDefDlgParent.clear(); SfxModalDialog::dispose(); } @@ -1024,8 +1022,6 @@ IMPL_LINK_NOARG_TYPED(SwEditRegionDlg, FileSearchHdl, Button*, void) { if(!CheckPasswd()) return; - m_pOldDefDlgParent = Application::GetDefDialogParent(); - Application::SetDefDialogParent( this ); delete m_pDocInserter; m_pDocInserter = new ::sfx2::DocumentInserter( "swriter" ); @@ -1342,8 +1338,6 @@ IMPL_LINK_TYPED( SwEditRegionDlg, DlgClosedHdl, sfx2::FileDialogHelper *, _pFile pSectRepr->GetSectionData().SetLinkFilePassword(sPassword); m_pFileNameED->SetText(pSectRepr->GetFile()); } - - Application::SetDefDialogParent( m_pOldDefDlgParent ); } IMPL_LINK_TYPED( SwEditRegionDlg, SubRegionEventHdl, VclWindowEvent&, rEvent, void ) @@ -1504,7 +1498,6 @@ SwInsertSectionTabPage::SwInsertSectionTabPage( "modules/swriter/ui/sectionpage.ui", &rAttrSet) , m_pWrtSh(nullptr) , m_pDocInserter(nullptr) - , m_pOldDefDlgParent(nullptr) { get(m_pCurName, "sectionnames"); m_pCurName->SetStyle(m_pCurName->GetStyle() | WB_SORT); @@ -1563,7 +1556,6 @@ void SwInsertSectionTabPage::dispose() m_pConditionFT.clear(); m_pConditionED.clear(); m_pEditInReadonlyCB.clear(); - m_pOldDefDlgParent.clear(); SfxTabPage::dispose(); } @@ -1755,8 +1747,6 @@ IMPL_LINK_TYPED( SwInsertSectionTabPage, UseFileHdl, Button *, pButton, void ) IMPL_LINK_NOARG_TYPED(SwInsertSectionTabPage, FileSearchHdl, Button*, void) { - m_pOldDefDlgParent = Application::GetDefDialogParent(); - Application::SetDefDialogParent( this ); delete m_pDocInserter; m_pDocInserter = new ::sfx2::DocumentInserter( "swriter" ); m_pDocInserter->StartExecuteModal( LINK( this, SwInsertSectionTabPage, DlgClosedHdl ) ); @@ -1808,8 +1798,6 @@ IMPL_LINK_TYPED( SwInsertSectionTabPage, DlgClosedHdl, sfx2::FileDialogHelper *, } else m_sFilterName = m_sFilePasswd = aEmptyOUStr; - - Application::SetDefDialogParent( m_pOldDefDlgParent ); } SwSectionFootnoteEndTabPage::SwSectionFootnoteEndTabPage( vcl::Window *pParent, diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx index e2828bf1e02c..5f3a1701f771 100644 --- a/sw/source/ui/fldui/fldfunc.cxx +++ b/sw/source/ui/fldui/fldfunc.cxx @@ -531,15 +531,11 @@ void SwFieldFuncPage::UpdateSubType() } // call MacroBrowser, fill Listbox with Macros -IMPL_LINK_TYPED( SwFieldFuncPage, MacroHdl, Button *, pBtn, void ) +IMPL_LINK_NOARG_TYPED( SwFieldFuncPage, MacroHdl, Button *, void) { - vcl::Window* pDefModalDlgParent = Application::GetDefDialogParent(); - Application::SetDefDialogParent( pBtn ); const OUString sMacro(TurnMacroString(m_pNameED->GetText()).replaceAll(".", ";")); if (GetFieldMgr().ChooseMacro(sMacro)) UpdateSubType(); - - Application::SetDefDialogParent( pDefModalDlgParent ); } bool SwFieldFuncPage::FillItemSet(SfxItemSet* ) diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx index df81c3c1cb29..d448a193f533 100644 --- a/sw/source/ui/fldui/javaedit.cxx +++ b/sw/source/ui/fldui/javaedit.cxx @@ -45,8 +45,7 @@ SwJavaEditDialog::SwJavaEditDialog(vcl::Window* pParent, SwWrtShell* pWrtSh) : bIsUrl(false), pSh(pWrtSh), - pFileDlg(nullptr), - pOldDefDlgParent(nullptr) + pFileDlg(nullptr) { get(m_pTypeED, "scripttype"); get(m_pUrlRB, "url"); @@ -96,7 +95,6 @@ void SwJavaEditDialog::dispose() pSh->EnterStdMode(); delete pMgr; delete pFileDlg; - Application::SetDefDialogParent( pOldDefDlgParent ); m_pTypeED.clear(); m_pUrlRB.clear(); m_pEditRB.clear(); @@ -106,7 +104,6 @@ void SwJavaEditDialog::dispose() m_pOKBtn.clear(); m_pPrevBtn.clear(); m_pNextBtn.clear(); - pOldDefDlgParent.clear(); SvxStandardDialog::dispose(); } @@ -251,13 +248,10 @@ IMPL_LINK_NOARG_TYPED(SwJavaEditDialog, RadioButtonHdl, Button*, void) } } -IMPL_LINK_TYPED( SwJavaEditDialog, InsertFileHdl, Button *, pBtn, void ) +IMPL_LINK_NOARG_TYPED( SwJavaEditDialog, InsertFileHdl, Button *, void ) { if ( !pFileDlg ) { - pOldDefDlgParent = Application::GetDefDialogParent(); - Application::SetDefDialogParent( pBtn ); - pFileDlg = new ::sfx2::FileDialogHelper( ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, FileDialogFlags::Insert, OUString("swriter") ); diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index c7a5e82f59ed..248b60acb51f 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -2224,19 +2224,16 @@ VclPtr SwTOXEntryTabPage::Create( vcl::Window* pParent, const Sf return VclPtr::Create(pParent, *rAttrSet); } -IMPL_LINK_TYPED(SwTOXEntryTabPage, EditStyleHdl, Button*, pBtn, void) +IMPL_LINK_NOARG_TYPED(SwTOXEntryTabPage, EditStyleHdl, Button*, void) { if( LISTBOX_ENTRY_NOTFOUND != m_pCharStyleLB->GetSelectEntryPos()) { SfxStringItem aStyle(SID_STYLE_EDIT, m_pCharStyleLB->GetSelectEntry()); SfxUInt16Item aFamily(SID_STYLE_FAMILY, (sal_uInt16)SfxStyleFamily::Char); - vcl::Window* pDefDlgParent = Application::GetDefDialogParent(); - Application::SetDefDialogParent( pBtn ); static_cast(GetTabDialog())->GetWrtShell(). GetView().GetViewFrame()->GetDispatcher()->ExecuteList(SID_STYLE_EDIT, SfxCallMode::SYNCHRON|SfxCallMode::MODAL, { &aStyle, &aFamily }); - Application::SetDefDialogParent( pDefDlgParent ); } } @@ -3737,19 +3734,16 @@ VclPtr SwTOXStylesTabPage::Create( vcl::Window* pParent, return VclPtr::Create(pParent, *rAttrSet); } -IMPL_LINK_TYPED( SwTOXStylesTabPage, EditStyleHdl, Button *, pBtn, void ) +IMPL_LINK_NOARG_TYPED(SwTOXStylesTabPage, EditStyleHdl, Button *, void) { if( LISTBOX_ENTRY_NOTFOUND != m_pParaLayLB->GetSelectEntryPos()) { SfxStringItem aStyle(SID_STYLE_EDIT, m_pParaLayLB->GetSelectEntry()); SfxUInt16Item aFamily(SID_STYLE_FAMILY, (sal_uInt16)SfxStyleFamily::Para); - vcl::Window* pDefDlgParent = Application::GetDefDialogParent(); - Application::SetDefDialogParent( pBtn ); SwWrtShell& rSh = static_cast(GetTabDialog())->GetWrtShell(); rSh.GetView().GetViewFrame()->GetDispatcher()->ExecuteList(SID_STYLE_EDIT, SfxCallMode::SYNCHRON|SfxCallMode::MODAL, { &aStyle, &aFamily }); - Application::SetDefDialogParent( pDefDlgParent ); } } -- cgit v1.2.3