diff options
author | Pierre MARTY <pmarty@linagora.com> | 2020-04-17 19:01:41 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-07-21 13:33:20 +0200 |
commit | fef72302dac39674103c8cf66f1a5e27b9f3d7ab (patch) | |
tree | d03eab60b1854bd2a6023bfaa52572ac3e7d80ce /sfx2 | |
parent | bb47ca165959f73929211a736aa8d810fe110e43 (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>
Diffstat (limited to 'sfx2')
-rwxr-xr-x[-rw-r--r--] | sfx2/source/doc/guisaveas.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index c47d18a5710d..6e26bacd8078 100644..100755 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -1600,12 +1600,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 ( aURL.GetFileExtension().equalsIgnoreAsciiCase( "pdf" ) ) + nStoreMode = EXPORT_REQUESTED | PDFEXPORT_REQUESTED; + } } // so the arguments will not change any more and can be stored to the main location |