summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-04-17 16:59:44 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-04-17 21:40:19 +0200
commiteffa599086c38b3391d03dc5b6770b523e886b60 (patch)
treed13f374e8b203505491270abe552b4aa94d9fb46 /sfx2
parent79ee6c979dcb87228836964af4f153f42edba745 (diff)
Related: tdf#116928 set specific parent for document warning dialog
Change-Id: I827563c16a2ae59c698e1bfa82022a11f5256483 Reviewed-on: https://gerrit.libreoffice.org/53055 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/control/dispatch.cxx17
-rw-r--r--sfx2/source/doc/objserv.cxx4
2 files changed, 17 insertions, 4 deletions
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 6bc623a7b461..c05609f01ce7 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -1079,7 +1079,8 @@ const SfxPoolItem* SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode eCall,
});
*/
const SfxPoolItem* SfxDispatcher::ExecuteList(sal_uInt16 nSlot, SfxCallMode eCall,
- std::initializer_list<SfxPoolItem const*> args)
+ std::initializer_list<SfxPoolItem const*> args,
+ std::initializer_list<SfxPoolItem const*> internalargs)
{
if ( IsLocked() )
return nullptr;
@@ -1097,7 +1098,19 @@ const SfxPoolItem* SfxDispatcher::ExecuteList(sal_uInt16 nSlot, SfxCallMode eCal
MappedPut_Impl( aSet, *pArg );
}
- SfxRequest aReq( nSlot, eCall, aSet );
+ SfxRequest aReq(nSlot, eCall, aSet);
+
+ if (internalargs.begin() != internalargs.end())
+ {
+ SfxAllItemSet aInternalSet(SfxGetpApp()->GetPool());
+ for (const SfxPoolItem *pArg : internalargs)
+ {
+ assert(pArg);
+ aInternalSet.Put(*pArg);
+ }
+ aReq.SetInternalArgs_Impl(aInternalSet);
+ }
+
Execute_( *pShell, *pSlot, aReq, eCall );
return aReq.GetReturnValue();
}
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index a8e4a94f8a63..7485cfe04a5f 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -698,7 +698,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
if ( lErr != ERRCODE_IO_ABORT )
{
SfxErrorContext aEc(ERRCTX_SFX_SAVEASDOC,GetTitle());
- ErrorHandler::HandleError( lErr );
+ ErrorHandler::HandleError(lErr, rReq.GetFrameWeld());
}
if ( nId == SID_EXPORTDOCASPDF )
@@ -787,7 +787,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
SetModified( false );
ErrCode lErr = GetErrorCode();
- ErrorHandler::HandleError(lErr);
+ ErrorHandler::HandleError(lErr, rReq.GetFrameWeld());
rReq.SetReturnValue( SfxBoolItem(0, true) );
rReq.Done();