<html><br />I evaluated the behavior from Basic for all of the different modes based on a specific build on a specific Linux platform. I did not read the code, nor did I test different platforms. I documented all of this in OOME on my web site. Don't remember the direct link, but, it is on http://www.pitonyak.org under my macros page. <br /><br />I also loop at a few other methods for opening files using a service that might be useful to you. <br /><br />On Friday, December 21, 2018 14:15 EST, Kaganski Mike <mikekaganski@hotmail.com> wrote:<br /> <blockquote type="cite" cite="HE1PR10MB17218E754F64556ECE2949EBD6B80@HE1PR10MB1721.EURPRD10.PROD.OUTLOOK.COM">Hi!<br /><br />On 21.12.2018 20:37, Takeshi Abe wrote:<br />> In order to tell whether the behavior reported in tdf#119102 [1] is a bug<br />> or not, I would like to understand the specification of LibO Basic's Open<br />> statement [2].<br />><br />> The following table summarizes what current (master) LibO does, which I read<br />> from SbiStream::Open() in basic/source/runtime/iosys.cxx.<br />><br />> ACCESS\FOR | APPEND | BINARY | INPUT | OUTPUT | RANDOM |<br />> ----------------------+--------+--------+-------+--------+--------+<br />> default | - | - | - | X | - |<br />> READ ("read only") | - | - | - | - | - |<br />> WRITE ("write only") | - | -(*) | X | X | -(**) |<br />> READ WRITE ("both") | - | -(*) | X | X | -(**) |<br />><br />> "X": the runtime deletes the file of given path first if already exists;<br />> "-": it does not.<br />> (*) requested in i#18638 <https://bz.apache.org/ooo/show_bug.cgi?id=18638>;<br />> see commit 23b49669ab70cac72d5f6d955e7d2af617e6934e.<br />> (**) requested in i#61277 <https://bz.apache.org/ooo/show_bug.cgi?id=61277>;<br />> see commit 42a63dd0e81f13a84a5f551e03ede685e2bf34c7.<br />><br />> So here is a couple of questions popping up on a confused soul:<br />><br />> (1) What does the default ACCESS mode mean?<br />> Is it just the same as READ, WRITE, or READ WRITE?<br />> Or does it depends on given FOR mode?<br />><br />> (2) Does 'FOR INPUT + ACCESS WRITE' or 'FOR OUTPUT + ACCESS READ' make<br />> any sense?<br /><br />Cannot answer the questions; just for completeness, something you could<br />already know:<br /><br />the current handling of BINARY opened for write was defined in commit<br />23b49669ab70cac72d5f6d955e7d2af617e6934e [1] for #i18638 [2].<br /><br />[1]<br />https://git.libreoffice.org/core/+/23b49669ab70cac72d5f6d955e7d2af617e6934e%5E%21/<br />[2] https://bz.apache.org/ooo/show_bug.cgi?id=18638<br /><br />--<br />Best regards,<br />Mike Kaganski<br />_______________________________________________<br />LibreOffice mailing list<br />LibreOffice@lists.freedesktop.org<br />https://lists.freedesktop.org/mailman/listinfo/libreoffice</blockquote><br /><br /><br /> </html>