summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-09-23 16:41:48 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-09-24 16:32:13 +0200
commit6f3c7c4506c1df1319bac2c1cc0899dda827f65f (patch)
tree66cfb0d3b7aabe903e3bde4974198a8a85a60178
parentac7047f72087f09f2ab223f1af2518778382c06a (diff)
set correct parent
Change-Id: I133cccc72896021c38f90efa3f9819fd5410d836 Reviewed-on: https://gerrit.libreoffice.org/79419 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--cui/source/options/optinet2.cxx14
-rw-r--r--cui/source/options/optjava.cxx5
-rw-r--r--cui/source/options/optjava.hxx2
-rw-r--r--cui/source/tabpages/chardlg.cxx2
-rw-r--r--cui/source/tabpages/page.cxx2
-rw-r--r--filter/source/pdf/impdialog.cxx2
-rw-r--r--sc/source/ui/optdlg/tpcalc.cxx4
-rw-r--r--sc/source/ui/optdlg/tpformula.cxx2
-rw-r--r--sc/source/ui/optdlg/tpusrlst.cxx8
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx2
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx4
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.cxx4
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.cxx2
13 files changed, 27 insertions, 26 deletions
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 36cb6917599b..53fc71f2a69d 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -562,7 +562,7 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, SavePasswordHdl, weld::Button&, void)
xMasterPasswd->removeMasterPassword();
uno::Reference<task::XInteractionHandler> xTmpHandler(task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(),
- VCLUnoHelper::GetInterface(GetParentDialog())));
+ GetDialogController()->getDialog()->GetXWindow()));
if ( xMasterPasswd->changeMasterPassword(xTmpHandler) )
{
@@ -580,7 +580,7 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, SavePasswordHdl, weld::Button&, void)
}
else
{
- std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(GetFrameWeld(),
+ std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(GetDialogFrameWeld(),
VclMessageType::Question, VclButtonsType::YesNo,
m_sPasswordStoringDeactivateStr));
xQueryBox->set_default_response(RET_NO);
@@ -620,7 +620,7 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, MasterPasswordHdl, weld::Button&, void)
if ( xMasterPasswd->isPersistentStoringAllowed() )
{
uno::Reference<task::XInteractionHandler> xTmpHandler(task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(),
- VCLUnoHelper::GetInterface(GetParentDialog())));
+ GetDialogController()->getDialog()->GetXWindow()));
xMasterPasswd->changeMasterPassword(xTmpHandler);
}
}
@@ -636,7 +636,7 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, MasterPasswordCBHdl, weld::Button&, void)
task::PasswordContainer::create(comphelper::getProcessComponentContext()));
uno::Reference<task::XInteractionHandler> xTmpHandler(task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(),
- VCLUnoHelper::GetInterface(GetParentDialog())));
+ GetDialogController()->getDialog()->GetXWindow()));
if ( m_xMasterPasswordCB->get_active() )
{
@@ -681,7 +681,7 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, ShowPasswordsHdl, weld::Button&, void)
task::PasswordContainer::create(comphelper::getProcessComponentContext()));
uno::Reference<task::XInteractionHandler> xTmpHandler(task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(),
- VCLUnoHelper::GetInterface(GetParentDialog())));
+ GetDialogController()->getDialog()->GetXWindow()));
if ( xMasterPasswd->isPersistentStoringAllowed() && xMasterPasswd->authorizateWithMasterPassword(xTmpHandler) )
{
@@ -723,7 +723,7 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, MacroSecPBHdl, weld::Button&, void)
{
Reference< security::XDocumentDigitalSignatures > xD(
security::DocumentDigitalSignatures::createDefault(comphelper::getProcessComponentContext() ) );
- xD->setParentWindow(VCLUnoHelper::GetInterface(GetParentDialog()));
+ xD->setParentWindow(GetDialogController()->getDialog()->GetXWindow());
xD->manageTrustedSources();
}
catch (const Exception&)
@@ -945,7 +945,7 @@ IMPL_LINK_NOARG(SvxEMailTabPage, FileDialogHdl_Impl, weld::Button&, void)
{
if (!pImpl->bROProgram)
{
- FileDialogHelper aHelper(css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, FileDialogFlags::NONE, GetFrameWeld());
+ FileDialogHelper aHelper(css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, FileDialogFlags::NONE, GetDialogFrameWeld());
OUString sPath = m_xMailerURLED->get_text();
if ( sPath.isEmpty() )
sPath = "/usr/bin";
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 5f536acf4d37..676ce162a16b 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -298,9 +298,10 @@ IMPL_LINK( SvxJavaOptionsPage, DialogClosedHdl, DialogClosedEvent*, pEvt, void )
}
}
-IMPL_LINK_NOARG(SvxJavaOptionsPage, ExpertConfigHdl_Impl, weld::Button&, void)
+IMPL_STATIC_LINK_NOARG(SvxJavaOptionsPage, ExpertConfigHdl_Impl, weld::Button&, void)
{
- ScopedVclPtrInstance<CuiAboutConfigTabPage> pExpertConfigDlg(GetParentDialog());
+ //TODO weld this one too
+ ScopedVclPtrInstance<CuiAboutConfigTabPage> pExpertConfigDlg(nullptr);
pExpertConfigDlg->Reset();//initialize and reset function
if( RET_OK == pExpertConfigDlg->Execute() )
diff --git a/cui/source/options/optjava.hxx b/cui/source/options/optjava.hxx
index 6345c5a53120..ad84b0d1a17c 100644
--- a/cui/source/options/optjava.hxx
+++ b/cui/source/options/optjava.hxx
@@ -95,7 +95,7 @@ private:
DECL_LINK(StartFolderPickerHdl, void *, void);
DECL_LINK(DialogClosedHdl, css::ui::dialogs::DialogClosedEvent*, void);
- DECL_LINK(ExpertConfigHdl_Impl, weld::Button&, void);
+ DECL_STATIC_LINK(SvxJavaOptionsPage, ExpertConfigHdl_Impl, weld::Button&, void);
void ClearJavaInfo();
void ClearJavaList();
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 152117aaceb5..b66ef21e8332 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -3104,7 +3104,7 @@ void SvxCharTwoLinesPage::Initialize()
void SvxCharTwoLinesPage::SelectCharacter(weld::TreeView* pBox)
{
bool bStart = pBox == m_xStartBracketLB.get();
- SvxCharacterMap aDlg(GetFrameWeld(), nullptr, nullptr);
+ SvxCharacterMap aDlg(GetDialogFrameWeld(), nullptr, nullptr);
aDlg.DisableFontSelection();
if (aDlg.run() == RET_OK)
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index 58d4e8627475..f3df9bcec989 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -1256,7 +1256,7 @@ DeactivateRC SvxPageDescPage::DeactivatePage( SfxItemSet* _pSet )
if ( ePaper != PAPER_SCREEN_4_3 && ePaper != PAPER_SCREEN_16_9 && ePaper != PAPER_SCREEN_16_10 && IsMarginOutOfRange() )
{
- std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(GetFrameWeld(),
+ std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(GetDialogFrameWeld(),
VclMessageType::Question, VclButtonsType::YesNo,
m_xPrintRangeQueryText->get_label()));
xQueryBox->set_default_response(RET_NO);
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index deb1503f8743..e711b5fde586 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -1188,7 +1188,7 @@ IMPL_LINK_NOARG(ImpPDFTabSecurityPage, ClickmaPbSetPwdHdl, weld::Button&, void)
ErrorHandler::GetErrorString(ERRCODE_IO_NOTSUPPORTED, msg); //TODO: handle failure
std::unique_ptr<weld::MessageDialog>(
Application::CreateMessageDialog(
- GetFrameWeld(), VclMessageType::Error, VclButtonsType::Ok, msg))
+ GetDialogFrameWeld(), VclMessageType::Error, VclButtonsType::Ok, msg))
->run();
return;
}
diff --git a/sc/source/ui/optdlg/tpcalc.cxx b/sc/source/ui/optdlg/tpcalc.cxx
index f38ef51c443a..12833f3dd248 100644
--- a/sc/source/ui/optdlg/tpcalc.cxx
+++ b/sc/source/ui/optdlg/tpcalc.cxx
@@ -182,7 +182,7 @@ bool ScTpCalcOptions::FillItemSet( SfxItemSet* rCoreAttrs )
xBatch->commit();
SolarMutexGuard aGuard;
if (svtools::executeRestartDialog(
- comphelper::getProcessComponentContext(), GetFrameWeld(),
+ comphelper::getProcessComponentContext(), GetDialogFrameWeld(),
svtools::RESTART_REASON_THREADING))
GetDialogController()->response(RET_OK);
}
@@ -208,7 +208,7 @@ DeactivateRC ScTpCalcOptions::DeactivatePage( SfxItemSet* pSetP )
if ( nReturn == DeactivateRC::KeepPage )
{
- std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Warning,
+ std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetDialogFrameWeld(), VclMessageType::Warning,
VclButtonsType::Ok, ScResId(STR_INVALID_EPS)));
xBox->run();
diff --git a/sc/source/ui/optdlg/tpformula.cxx b/sc/source/ui/optdlg/tpformula.cxx
index c948608ae76b..97ea25373814 100644
--- a/sc/source/ui/optdlg/tpformula.cxx
+++ b/sc/source/ui/optdlg/tpformula.cxx
@@ -114,7 +114,7 @@ void ScTpFormulaOptions::UpdateCustomCalcRadioButtons(bool bDefault)
void ScTpFormulaOptions::LaunchCustomCalcSettings()
{
- ScCalcOptionsDialog aDlg(GetFrameWeld(), maCurrentConfig, maCurrentDocOptions.IsWriteCalcConfig());
+ ScCalcOptionsDialog aDlg(GetDialogFrameWeld(), maCurrentConfig, maCurrentDocOptions.IsWriteCalcConfig());
if (aDlg.run() == RET_OK)
{
maCurrentConfig = aDlg.GetConfig();
diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx
index 0682fb55d585..9d0f8f7f3437 100644
--- a/sc/source/ui/optdlg/tpusrlst.cxx
+++ b/sc/source/ui/optdlg/tpusrlst.cxx
@@ -336,7 +336,7 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos,
if ( (nStartCol != nEndCol) && (nStartRow != nEndRow) )
{
- ScColOrRowDlg aDialog(GetFrameWeld(), aStrCopyList, aStrCopyFrom);
+ ScColOrRowDlg aDialog(GetDialogFrameWeld(), aStrCopyList, aStrCopyFrom);
nCellDir = aDialog.run();
}
else if ( nStartCol != nEndCol )
@@ -397,7 +397,7 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos,
if ( bValueIgnored )
{
- std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetFrameWeld(),
+ std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetDialogFrameWeld(),
VclMessageType::Info, VclButtonsType::Ok,
aStrCopyErr));
xInfoBox->run();
@@ -594,7 +594,7 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, weld::Button&, rBtn, void )
+ mxLbLists->get_text( nRemovePos )
+ aStrQueryRemove.getToken( 1, '#' );
- std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(GetFrameWeld(),
+ std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(GetDialogFrameWeld(),
VclMessageType::Question, VclButtonsType::YesNo,
aMsg));
xQueryBox->set_default_response(RET_YES);
@@ -675,7 +675,7 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, weld::Button&, rBtn, void )
}
else
{
- std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetFrameWeld(),
+ std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetDialogFrameWeld(),
VclMessageType::Warning, VclButtonsType::Ok,
ScResId(STR_INVALID_TABREF)));
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index 88aabd52855e..56b4801ddf55 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -120,7 +120,7 @@ static OUString lcl_getFlatURL( uno::Reference<beans::XPropertySet> const & xSou
}
SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent)
- : SfxDialogController(pParent->GetFrameWeld(), "modules/swriter/ui/selectaddressdialog.ui", "SelectAddressDialog")
+ : SfxDialogController(pParent->GetWizard()->getDialog(), "modules/swriter/ui/selectaddressdialog.ui", "SelectAddressDialog")
, m_bInSelectHdl(false)
, m_xAddressPage(pParent)
, m_xDescriptionFI(m_xBuilder->weld_label("desc"))
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index 8c50dd1f454a..ad9772abd592 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -183,7 +183,7 @@ IMPL_LINK_NOARG(SwMailMergeAddressBlockPage, AddressListHdl_Impl, weld::Button&,
catch (const uno::Exception& e)
{
TOOLS_WARN_EXCEPTION("sw", "");
- std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetFrameWeld(),
+ std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(m_pWizard->getDialog(),
VclMessageType::Warning, VclButtonsType::Ok, e.Message));
xBox->run();
}
@@ -191,7 +191,7 @@ IMPL_LINK_NOARG(SwMailMergeAddressBlockPage, AddressListHdl_Impl, weld::Button&,
IMPL_LINK_NOARG(SwMailMergeAddressBlockPage, SettingsHdl_Impl, weld::Button&, void)
{
- SwSelectAddressBlockDialog aDlg(GetFrameWeld(), m_pWizard->GetConfigItem());
+ SwSelectAddressBlockDialog aDlg(m_pWizard->getDialog(), m_pWizard->GetConfigItem());
SwMailMergeConfigItem& rConfig = m_pWizard->GetConfigItem();
aDlg.SetAddressBlocks(rConfig.GetAddressBlocks(), m_xSettings->GetSelectedAddress());
aDlg.SetSettings(rConfig.IsIncludeCountry(), rConfig.GetExcludeCountry());
diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx
index dcf285bc5899..80cb8403a337 100644
--- a/sw/source/ui/dbui/mmdocselectpage.cxx
+++ b/sw/source/ui/dbui/mmdocselectpage.cxx
@@ -101,7 +101,7 @@ IMPL_LINK(SwMailMergeDocSelectPage, FileSelectHdl, weld::Button&, rButton, void)
if(bTemplate)
{
m_xLoadTemplateRB->set_active(true);
- SfxNewFileDialog aNewFileDlg(GetFrameWeld(), SfxNewFileDialogMode::NONE);
+ SfxNewFileDialog aNewFileDlg(m_pWizard->getDialog(), SfxNewFileDialogMode::NONE);
sal_uInt16 nRet = aNewFileDlg.run();
if(RET_TEMPLATE_LOAD == nRet)
bTemplate = false;
@@ -114,7 +114,7 @@ IMPL_LINK(SwMailMergeDocSelectPage, FileSelectHdl, weld::Button&, rButton, void)
if(!bTemplate)
{
sfx2::FileDialogHelper aDlgHelper(TemplateDescription::FILEOPEN_SIMPLE,
- FileDialogFlags::NONE, GetFrameWeld());
+ FileDialogFlags::NONE, m_pWizard->getDialog());
Reference < XFilePicker3 > xFP = aDlgHelper.GetFilePicker();
xFP->setDisplayDirectory( SvtPathOptions().GetWorkPath() );
diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx
index fe4b57ca5be5..0aa4470ea078 100644
--- a/sw/source/ui/dbui/mmgreetingspage.cxx
+++ b/sw/source/ui/dbui/mmgreetingspage.cxx
@@ -108,7 +108,7 @@ void SwGreetingsHandler::UpdatePreview()
IMPL_LINK_NOARG(SwMailMergeGreetingsPage, AssignHdl_Impl, weld::Button&, void)
{
const OUString sPreview(m_xFemaleLB->get_active_text() + "\n" + m_xMaleLB->get_active_text());
- SwAssignFieldsDialog aDlg(GetFrameWeld(), m_rConfigItem, sPreview, false);
+ SwAssignFieldsDialog aDlg(m_pWizard->getDialog(), m_rConfigItem, sPreview, false);
if (RET_OK == aDlg.run())
{
UpdatePreview();