summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre MARTY <pmarty@linagora.com>2020-04-17 19:01:41 +0200
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2020-07-21 16:47:57 +0200
commit68880474423c4e2b22cdc2a25b64750863a9023f (patch)
tree9a9e744cbca60cad80f5513f7f69c744ddfd668d
parent932afa101df9c762691d3e914f66b763dfbb7f30 (diff)
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@linagora.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99143 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/guisaveas.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index eb94e0873e6e..bb4b0fb7f838 100644..100755
--- 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