<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - FILESAVE Saving a Document with "#" in name (libreoffice dialogs)"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=95336#c7">Comment # 7</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - FILESAVE Saving a Document with "#" in name (libreoffice dialogs)"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=95336">bug 95336</a>
              from <span class="vcard"><a class="email" href="mailto:alexhfromnorthholland@gmail.com" title="Alex H. <alexhfromnorthholland@gmail.com>"> <span class="fn">Alex H.</span></a>
</span></b>
        <pre>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
<a href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx">https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx</a>
.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>