Bug 95336 - FILESAVE Saving a Document with "#" in name (libreoffice dialogs)
Summary: FILESAVE Saving a Document with "#" in name (libreoffice dialogs)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: LO-File-Dialog
  Show dependency treegraph
 
Reported: 2015-10-26 19:30 UTC by Lukas
Modified: 2023-09-08 05:31 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Picture discription of bug (162.56 KB, image/png)
2015-10-30 13:36 UTC, Lukas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas 2015-10-26 19:30:30 UTC
To recreate the bug open any file type in any module of libreoffice and try to name the file with a "#" included in the file name and you will get the following error

Error saving the document test # :
Nonexistent object.
Path to the file does not exist.

You can however save it without the #, then change the name to include the # then saving works just fine.
Comment 1 raal 2015-10-29 20:38:30 UTC
I can not confirm with LO 5.0.2.2, win7. File name "Bez názvu# 1.odt".
Comment 2 Lukas 2015-10-30 13:36:05 UTC
Created attachment 120108 [details]
Picture discription of bug
Comment 3 raal 2015-10-30 15:09:17 UTC
I can confirm with Version: 5.1.0.0.alpha1+ (x64)
Build ID: 72f192418948f018f6c8b18c14463476820c9d5b
TinderBox: Win-x86_64@62-TDF, Branch:MASTER, Time: 2015-10-19_21:22:52

No problem with system dialogs, only with LO dialogs. Works OK in writer, seems to be Calc bug.
Comment 4 raal 2015-10-30 15:12:01 UTC
Reproducible with Verze: 4.1.5.3
ID sestavení: 1c1366bba2ba2b554cd2ca4d87c06da81c05d24
Comment 5 Lukas 2015-10-30 15:28:14 UTC
The bug seems to exist in all modules of Libre office for me. I'm currently at work, when I get home I'll test on Windows 10 and mint in varying versions
Comment 6 QA Administrators 2016-11-08 11:56:28 UTC Comment hidden (obsolete)
Comment 7 Alex H. 2017-12-09 18:36:21 UTC
Still occurs in this build, which I built myself:

Version: 6.1.0.0.alpha0+ (x64)
Build ID: 7c77ff5dd2d0573a56f8b59dc9113c23e0ea29c9
CPU threads: 4; OS: Windows 10.0; UI render: default; 
Locale: nl-NL (nl_NL); Calc: CL

although I don't get an error; instead it just chops off the # and anything following it.

Steps to reproduce:

1. As said, this problem doesn't occur with Windows' built-in dialogs,
   so you may first have to go to Tools > Options and then 'General'
   and check the box 'Use LibreOffice dialogs'.
2. For any Calc document, select File > Save As... and type "abc#def"
   as the file name.

Expected behavior:
Should save the file under that name.

Actual behavior:
Saves it as "abc.ods".

-------------

The problem here is that the dialog ModelData_Impl::OutputFileDialog (libo-core\sfx2\source\doc\guisaveas.cxx) treats the full path as an URL, so for a local file it comes out as e.g. "file:///C:/users/john/Documents/abc#def.ods". The # is then seen as the beginning of a so-called fragment and chopped off.

Note, for the record, that Windows forbids certain characters like '*' in file names, but '#' is allowed. See https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx .
Comment 8 Frank 2018-02-26 13:09:35 UTC
I want to confirm and specify this bug.
We use LibreOffice Version 5.0.3.2 and Linux Mint 17.3.
If we save in Writer or Calc a document containing the character "#" it CAN be saved on the harddrive. But if we do this on our server using the Samba (smb://) protocol the file is saved but the file name is TRUNCATED directly before the "#" including the file ending .ods or .odt.
Example:
"test#.odt" to be saved
"test" is saved on the server
This error does not occur when we use other characters like !,§,$,&,+,-,= and _.
Comment 9 QA Administrators 2019-02-27 03:56:28 UTC Comment hidden (obsolete)
Comment 10 pernegger 2019-10-17 11:01:20 UTC
Something quite similar is still present in

Version: 6.0.7.3
Build-ID: 1:6.0.7-0ubuntu0.18.04.10
CPU-Threads: 24; BS: Linux 5.0; UI-Render: Standard; VCL: gtk3; 
Gebietsschema: de-AT (de_DE.UTF-8); Calc: group

See https://bugs.documentfoundation.org/show_bug.cgi?id=128196.
Comment 11 QA Administrators 2021-10-17 03:54:54 UTC Comment hidden (obsolete)
Comment 12 Michael Warner 2021-10-17 18:19:42 UTC
Still an issue in:
Version: 7.2.0.4 (x64) / LibreOffice Community
Build ID: 9a9c6381e3f7a62afc1329bd359cc48accb6435b
CPU threads: 6; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 13 Kira Tubo 2023-09-08 00:55:52 UTC
Reproduced in daily master build with same results as Alex in Comment 7.

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 9a37652b79001bf5208841b9221dee851b9b6d0f
CPU threads: 6; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 14 Kira Tubo 2023-09-08 05:31:54 UTC
Reproduced in LO v.3.3. If LibreOffice dialogs are used in Windows, as is stated in Comment 7, then issue occurs as described in original bug report (v.4.1.4.3) with the error message.