Kaydet (Commit) cadf6cc3 authored tarafından Luboš Luňák's avatar Luboš Luňák

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
üst 4652d118
...@@ -991,6 +991,9 @@ bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode, ...@@ -991,6 +991,9 @@ bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
OUString("UIName"), OUString("UIName"),
OUString() ); OUString() );
pFileDlg->SetCurrentFilter( aFilterUIName ); 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 // it is no export, bSetStandardName == true means that user agreed to store document in the default (default default ;-)) format
else if ( bSetStandardName || GetStorable()->hasLocation() ) else if ( bSetStandardName || GetStorable()->hasLocation() )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment