Apache OpenOffice (AOO) Bugzilla – Issue 13908
Scripting: GetAttr does not return proper value
Last modified: 2017-05-20 11:29:35 UTC
On my computer, c:\io.sys is a System, read-only hidden, archived file. I am only told that it is read-only. 1.0.3.1 on windows xp. Sub ExampleGetAttr Rem Should say " Read-Only Hidden System Archive" Rem says " Read-Only" Print FileAttributeString(GetAttr("C:\IO.SYS")) Rem Should say " Archive" says "Normal" Print FileAttributeString(GetAttr("C:\AUTOEXEC.BAT")) Rem "Directory" Print FileAttributeString(GetAttr("C:\WINDOWS")) End Sub Function FileAttributeString(x As Integer) As String Dim s As String If (x = 0) Then s = "Normal" Else s = "" If (x AND 16) <> 0 Then s = "Directory" If (x AND 1) <> 0 Then s = s & " Read-Only" If (x AND 2) <> 0 Then s = " Hidden" If (x AND 4) <> 0 Then s = s & " System" If (x AND 8) <> 0 Then s = s & " Volume" If (x AND 32) <> 0 Then s = s & " Archive" End If FileAttributeString = s End Function
StarBASIC runtime, not API
The general problem is that these attributes are Windows specific and currently only system independent attributes are supported.
cp: retargeted to Office-Later due to limited ressources
Reset assigne to the default "issues@openoffice.apache.org".