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

Luboš Luňák l.lunak at collabora.com
Sun Apr 20 05:36:43 PDT 2014


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

New commits:
commit cadf6cc31ffa000d1fe8e42cc3e6cd427e0104bd
Author: Luboš Luňák <l.lunak at collabora.com>
Date:   Sun Apr 20 14:29:27 2014 +0200

    adjust output file extension when exporting (bnc#870581)
    
    If foo.odt is open, 'foo.odt' is the file name passed to the file dialog
    for File->Export to PDF (simply because it's the document name).  If automatic
    file extension is enabled, the file dialog will fix this to the PDF file type,
    but if disabled, the default filename will remain foo.odt, possibly overwriting
    the source file if the user is foolish enough to confirm without checking.
    
    Change-Id: I46504630b5f4e489d5a0cedf0b2b358305763722

diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 17866f9..908ed2a 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -991,6 +991,9 @@ bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
                                         OUString("UIName"),
                                         OUString() );
         pFileDlg->SetCurrentFilter( aFilterUIName );
+        aAdjustToType = aPreselectedFilterPropsHM.getUnpackedValueOrDefault(
+                                        OUString("Type"),
+                                        OUString() );
     }
     // it is no export, bSetStandardName == true means that user agreed to store document in the default (default default ;-)) format
     else if ( bSetStandardName || GetStorable()->hasLocation() )


More information about the Libreoffice-commits mailing list