Issue 63271 - macro:///Tools.UCB.LoadDataFromFile needs minor change
Summary: macro:///Tools.UCB.LoadDataFromFile needs minor change
Status: CONFIRMED
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Trivial
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-16 17:55 UTC by ms2
Modified: 2013-07-30 02:40 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description ms2 2006-03-16 17:55:58 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.
Comment 1 stephan.wunderlich 2006-03-17 09:38:06 UTC
sw->ih: this is your area methinks
Comment 2 nospam 2006-08-09 09:51:38 UTC
IH->ms2: you have already provided a solution - so I think you can fix this.
Comment 3 ms2 2006-11-15 03:19:58 UTC
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.
Comment 4 hartsambatchvolv 2010-11-11 02:40:10 UTC
Created attachment 74073
Comment 5 Rob Weir 2013-07-30 02:40:35 UTC
Reset assignee on issues not touched by assignee in more than 1000 days.