From 39e75be271667d156044d7641ff2347b9f8a513c Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 20 Sep 2017 17:10:31 +0200 Subject: EPUB export: add uno command to bypass options dialog Similarly how this is possible with PDF. The toolbar button is hidden by default in Writer, though. Change-Id: Iaf3b61ac2160578f7eaabd194ce8932792575c29 Reviewed-on: https://gerrit.libreoffice.org/42554 Reviewed-by: Miklos Vajna Tested-by: Jenkins --- sfx2/source/appl/appuno.cxx | 4 ++-- sfx2/source/doc/guisaveas.cxx | 7 ++++++- sfx2/source/doc/objserv.cxx | 2 ++ 3 files changed, 10 insertions(+), 3 deletions(-) (limited to 'sfx2/source') diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index 534baecfe967..84e113e8bca6 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -170,7 +170,7 @@ static bool isMediaDescriptor( sal_uInt16 nSlotId ) nSlotId == SID_SAVEASDOC || nSlotId == SID_SAVEDOC || nSlotId == SID_SAVETO || nSlotId == SID_SAVEACOPY || nSlotId == SID_EXPORTDOCASPDF || nSlotId == SID_DIRECTEXPORTDOCASPDF || - nSlotId == SID_EXPORTDOCASEPUB || + nSlotId == SID_EXPORTDOCASEPUB || nSlotId == SID_DIRECTEXPORTDOCASEPUB || nSlotId == SID_SAVEACOPYITEM); } @@ -1331,7 +1331,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence& xMo const OUString sFilterFlagsString("FilterFlags"); bool bPDFOptions = (nStoreMode & PDFEXPORT_REQUESTED) && !(nStoreMode & PDFDIRECTEXPORT_REQUESTED); - bool bEPUBOptions = (nStoreMode & EPUBEXPORT_REQUESTED); + bool bEPUBOptions = (nStoreMode & EPUBEXPORT_REQUESTED) && !(nStoreMode & EPUBDIRECTEXPORT_REQUESTED); if ( ( nStoreMode & EXPORT_REQUESTED ) && (bPDFOptions || bEPUBOptions) ) { // this is PDF or EPUB export, the filter options dialog should be shown before the export diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index da09164f0317..0dfd5b80959f 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -500,6 +500,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) bIsPDFExport = true; SAL_FALLTHROUGH; case SID_EXPORTDOCASEPUB: + case SID_DIRECTEXPORTDOCASEPUB: case SID_EXPORTDOC: case SID_SAVEASDOC: case SID_SAVEASREMOTE: @@ -979,6 +980,7 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet) case SID_EXPORTDOCASPDF: case SID_DIRECTEXPORTDOCASPDF: case SID_EXPORTDOCASEPUB: + case SID_DIRECTEXPORTDOCASEPUB: { break; } -- cgit