sw: fix merge mail to direct export as pdf
In order to export directly to PDF, the document must remove the hidden sections (if format condition), the data source should stay on current selected record finally restore the hidden sections. Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: Idf8e2a26d5c9cbe61ddac6c35cc2e1df1175da27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141520 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
This commit is contained in:
committed by
Miklos Vajna
parent
fb8d94e77f
commit
1e007e8f17
@@ -967,12 +967,26 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
|
||||
uno::Reference< uno::XInterface >(), sal_uInt32(ERRCODE_IO_ABORT));
|
||||
}
|
||||
|
||||
const SfxBoolItem *pItem = nId != SID_DIRECTEXPORTDOCASPDF ? nullptr :
|
||||
dynamic_cast<const SfxBoolItem*>( GetSlotState(SID_MAIL_PREPAREEXPORT) );
|
||||
if (pItem && pItem->GetValue())
|
||||
{
|
||||
SfxRequest aRequest(SID_MAIL_PREPAREEXPORT, SfxCallMode::SYNCHRON, GetPool());
|
||||
aRequest.AppendItem(SfxBoolItem(FN_PARAM_1, true));
|
||||
ExecuteSlot(aRequest);
|
||||
}
|
||||
|
||||
aHelper.GUIStoreModel( GetModel(),
|
||||
OUString::createFromAscii( pSlot->GetUnoName() ),
|
||||
aDispatchArgs,
|
||||
bPreselectPassword,
|
||||
GetDocumentSignatureState() );
|
||||
|
||||
if (pItem && pItem->GetValue())
|
||||
{
|
||||
SfxRequest aRequest(SID_MAIL_EXPORT_FINISHED, SfxCallMode::SYNCHRON, GetPool());
|
||||
ExecuteSlot(aRequest);
|
||||
}
|
||||
|
||||
// merge aDispatchArgs to the request
|
||||
SfxAllItemSet aResultParams( GetPool() );
|
||||
|
||||
Reference in New Issue
Block a user