Issue 41816 - API: sfx_FrameLoader::com::sun::star::frame::XSynchronousFrameLoader::load()
Summary: API: sfx_FrameLoader::com::sun::star::frame::XSynchronousFrameLoader::load()
Status: CLOSED NOT_AN_OOO_ISSUE
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P2 Trivial
Target Milestone: ---
Assignee: chne
QA Contact: issues@api
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-01 14:57 UTC by chne
Modified: 2013-02-24 21:06 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description chne 2005-02-01 14:57:29 UTC
Under special condition office crashes. Please run the following macro:
Sub Main
Dim urlS as new com.sun.star.util.URL

url = "private:factory/swriter"

oDoc = StarDesktop.loadComponentFromURL("private:factory/swriter", "test", 40,
DimArray())
oFL = createUnoService("com.sun.star.comp.office.FrameLoader")
oURLT = createUnoService("com.sun.star.util.URLTransformer")

oFrame = StarDesktop.getCurrentFrame()

urlS.Complete = url

res = oURLT.parseStrict(urlS)

dim descr(2) as new com.sun.star.beans.PropertyValue
descr(0).Name = "URL"
descr(0).Value = urlS(0)
descr(1).Name = "TypeName"
descr(1).Value = "writer8"

oFL.load(descr(), oFrame)

End Sub
Comment 1 andreas.schluens 2005-03-17 10:41:11 UTC
Sorry ... but your script seams to be wrong.
a)
"urlS(0)" is not a valid construct in basic .. as a result of that the loader mis an URL 
in general

b)
"dim descr(2) ..." must be changed to "dim descr(1) ..."
Otherwise you create an array with 3 elements ... but use only 2 of them realy.

c)
Parsing of the URL is not needed here. Because the mediadescriptor does not 
support an util.URL struct . It uses an URL as string value only.

Please use the following changed script to verify the problem again.

Sub Main

	url    = "private:factory/swriter"
	frame  = StarDesktop.findFrame("_blank", 0)
	loader = createUnoService("com.sun.star.comp.office.FrameLoader")

	dim descr(1) as new com.sun.star.beans.PropertyValue
	descr(0).Name = "URL"
	descr(0).Value = url
	descr(1).Name = "TypeName"
	descr(1).Value = "writer8"

	frame.getContainerWindow().setVisible(true)
	isok = loader.load(descr(), frame)
	
	if isok then
		msgbox "OK"
	else
		msgbox "Error"
	endif

End Sub
Comment 2 andreas.schluens 2005-03-17 10:43:00 UTC
.
Comment 3 chne 2005-04-20 11:11:03 UTC
an exception occure in src680_m95 => zu