Apache OpenOffice (AOO) Bugzilla – Issue 63271
macro:///Tools.UCB.LoadDataFromFile needs minor change
Last modified: 2013-07-30 02:40:35 UTC
In the macro library "Tools.UCB" the function "LoadDataFromFile" should be changed like this: <now> Function LoadDataFromFile(FilePath as String, DataList()) as Boolean ... oFile = oUcb.OpenFileReadWrite(FilePath) oInputStream.SetInputStream(oFile.GetInputStream) ... </now> <new> Function LoadDataFromFile(FilePath as String, DataList()) as Boolean ... oFile = oUcb.OpenFileRead(FilePath) oInputStream.SetInputStream(oFile) ... </new> because on Unix like operating systems the ordinary user has no right to open files not owned by himself for writing. Use case: I wanted to open the file: <OpenOffice.org1.1.3>/share/psprint/psprint.conf for making a list of names of predefined printers. I couldn't because the file is owned by root. With this modification it works and the function is universally usable for macro writers. I haven't found the place where it is used from originally, so the spot in some autopilot or the like making this function necessary should be checked for regression. From reading the code of the function I see no problem, only read access is done.
sw->ih: this is your area methinks
IH->ms2: you have already provided a solution - so I think you can fix this.
ms2 -> IH No, sorry. I cannot do that because I have no write access to the sources. I'm not a developer but a user and macro programmer. Please forward to the responsible Decveloper for the tools macro library.
Created attachment 74073
Reset assignee on issues not touched by assignee in more than 1000 days.