[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sfx2/source
Pierre MARTY (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jul 21 14:48:36 UTC 2020
sfx2/source/doc/guisaveas.cxx | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 68880474423c4e2b22cdc2a25b64750863a9023f
Author: Pierre MARTY <pmarty at linagora.com>
AuthorDate: Fri Apr 17 19:01:41 2020 +0200
Commit: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Tue Jul 21 16:47:57 2020 +0200
tdf#121191 Fix PDF viewer after "Export..."
* Add '.pdf' file extension detection:
| if the file is actually a PDF then modify the 'nStoreMode' value
| to 'EXPORT_REQUESTED | PDFEXPORT_REQUESTED'
Change-Id: I2c950dc424fd62f004bb3eb6860621561669f547
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92715
Tested-by: Jenkins
Reviewed-by: Pierre Marty <pmarty at linagora.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99143
Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
old mode 100644
new mode 100755
index eb94e0873e6e..bb4b0fb7f838
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -1601,12 +1601,18 @@ bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& xMo
aModelData.GetMediaDescr().find( OUString("FilterFlags") );
bool bFilterFlagsSet = ( aIter != aModelData.GetMediaDescr().end() );
+ // check if the filter Dialog has not been called before
if( !( nStoreMode & PDFEXPORT_REQUESTED ) && !( nStoreMode & EPUBEXPORT_REQUESTED ) && !bFilterFlagsSet
&& ( ( nStoreMode & EXPORT_REQUESTED ) || bUseFilterOptions ) )
{
// execute filter options dialog
if ( aModelData.ExecuteFilterDialog_Impl( aFilterName ) )
+ {
bDialogUsed = true;
+ // check if the file is a pdf or not and change the storing mode at convenience
+ if (aFilterName.endsWith("pdf_Export"))
+ nStoreMode = EXPORT_REQUESTED | PDFEXPORT_REQUESTED;
+ }
}
// so the arguments will not change any more and can be stored to the main location
More information about the Libreoffice-commits
mailing list