Download it now!
Bug 120403 - Save As does not default to current directory if MS Office document without extension is open
Summary: Save As does not default to current directory if MS Office document without e...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
4.1.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, regression
Depends on:
Blocks: FormatDetection
  Show dependency treegraph
 
Reported: 2018-10-08 07:57 UTC by Kai Uwe Broulik
Modified: 2019-02-15 05:08 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Uwe Broulik 2018-10-08 07:57:44 UTC
When choosing "Save As" in the File menu, the resulting file dialog would default to the location of the currently opened file and pre-fill its file name. However, this does not work when the document I'm trying to Save As is a MS Office document (e.g. doc) that does not have an extension.

Steps to reproduce:
1.) Create a new document in LibreOffice Writer
2.) Save the document as "Microsoft Word 97-2003 (.doc)" file
3.) Remove the ".doc" file extension
4.) Open the document in LibreOffice Writer
5.) Click "Save As"

Observed behavior:
The file dialog opens (it also seems to take slightly longer to open than usually) in Home with "Untitled 1" as file name.

Expected behavior:
The file dialog opens in the location where the file is saved and the file is pre-selected, or (if not shown in the list because of filters) its file name pre-filled into the file name text field.

Additional remarks:
I noticed the window title is also "Untitled 1 - LibreOffice Writer" rather than the file name, so perhaps that's an issue in the underlying file reading/loading code.

It does not matter whether the location saved to contains spaces or other special characters.
It does not matter whether the "confirm when not saving as open document format" option is enabled.
It does not matter what default file type for saving text files (odt or doc or docx) was configured in Settings.

It does not matter what VCL plugin I use, both the kde and gtk3 dialogs show the same behavior.

This can also be reproduced with XLS files but they aren't recognized as such without their extension (only works if manually opened in soffice).
This can *not* be reproduced with DOCX or XLSX files but they aren't recognized as such without their extension (shared mime info thinks they're archives, which they area)
This can *not* be reproduced with ODT or ODS files.

This worked in LibreOffice 3.x (whatever was shipped in Ubuntu 12.04)
Comment 1 Buovjaga 2018-10-28 21:06:25 UTC
Bibisected on Linux 41max repo, had to skip some due to launch error and these three are the candidates:

https://gerrit.libreoffice.org/plugins/gitiles/core/+/1a3c7b84b7b22109d691a770649af42c1033d709%5E!
https://gerrit.libreoffice.org/plugins/gitiles/core/+/c9fbcaa0b97c31216f5da8febd066a029c9bdef2%5E!
https://gerrit.libreoffice.org/plugins/gitiles/core/+/96c8251448646b65f6ea0b657417bca66d9a9b6e%5E!

They are all about file format detection.

Same behaviour on Windows as well (compared 3.5.0 to newer ones).