[Libreoffice-commits] core.git: sfx2/source

Pierre MARTY (via logerrit) logerrit at kemper.freedesktop.org
Tue Jul 21 11:34:01 UTC 2020


 sfx2/source/doc/guisaveas.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit fef72302dac39674103c8cf66f1a5e27b9f3d7ab
Author:     Pierre MARTY <pmarty at linagora.com>
AuthorDate: Fri Apr 17 19:01:41 2020 +0200
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Jul 21 13:33:20 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>

diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
old mode 100644
new mode 100755
index c47d18a5710d..6e26bacd8078
--- 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


More information about the Libreoffice-commits mailing list