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 confirms without checking.

(cherry picked from commit cadf6cc31ffa000d1fe8e42cc3e6cd427e0104bd)
Signed-off-by: Andras Timar <andras.timar@collabora.com>

Change-Id: I46504630b5f4e489d5a0cedf0b2b358305763722