Kaydet (Commit) 79358a75 authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: tdf#122308 ensure parent for message dialog

Change-Id: Ie7e97d3beedfa007243e4a6b7408341857f2d903
Reviewed-on: https://gerrit.libreoffice.org/65979
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst af3e421f
......@@ -404,13 +404,22 @@ uno::Sequence< document::CmisVersion > SfxObjectShell::GetCmisVersions( )
void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
{
weld::Window* pDialogParent = rReq.GetFrameWeld();
if (!pDialogParent)
{
SfxViewFrame* pFrame = GetFrame();
if (!pFrame)
pFrame = SfxViewFrame::GetFirst(this);
if (pFrame)
pDialogParent = pFrame->GetWindow().GetFrameWeld();
}
sal_uInt16 nId = rReq.GetSlot();
if( SID_SIGNATURE == nId || SID_MACRO_SIGNATURE == nId )
{
if ( QueryHiddenInformation( HiddenWarningFact::WhenSigning, nullptr ) == RET_YES )
( SID_SIGNATURE == nId ) ? SignDocumentContent(rReq.GetFrameWeld()) : SignScriptingContent(rReq.GetFrameWeld());
( SID_SIGNATURE == nId ) ? SignDocumentContent(pDialogParent) : SignScriptingContent(pDialogParent);
return;
}
......@@ -437,7 +446,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
if ( !IsOwnStorageFormat( *GetMedium() ) )
return;
SfxVersionDialog aDlg(rReq.GetFrameWeld(), pFrame, IsSaveVersionOnClose());
SfxVersionDialog aDlg(pDialogParent, pFrame, IsSaveVersionOnClose());
aDlg.run();
SetSaveVersionOnClose(aDlg.IsSaveVersionOnClose());
rReq.Done();
......@@ -802,7 +811,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
if ( lErr != ERRCODE_IO_ABORT )
{
SfxErrorContext aEc(ERRCTX_SFX_SAVEASDOC,GetTitle());
ErrorHandler::HandleError(lErr, rReq.GetFrameWeld());
ErrorHandler::HandleError(lErr, pDialogParent);
}
if ( nId == SID_EXPORTDOCASPDF )
......@@ -891,7 +900,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
SetModified( false );
ErrCode lErr = GetErrorCode();
ErrorHandler::HandleError(lErr, rReq.GetFrameWeld());
ErrorHandler::HandleError(lErr, pDialogParent);
rReq.SetReturnValue( SfxBoolItem(0, true) );
rReq.Done();
......@@ -904,7 +913,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
case SID_DOCTEMPLATE:
{
// save as document templates
SfxSaveAsTemplateDialog aDlg(rReq.GetFrameWeld(), GetModel());
SfxSaveAsTemplateDialog aDlg(pDialogParent, GetModel());
(void)aDlg.run();
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment