Apache OpenOffice (AOO) Bugzilla – Issue 41816
API: sfx_FrameLoader::com::sun::star::frame::XSynchronousFrameLoader::load()
Last modified: 2013-02-24 21:06:54 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
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
.
an exception occure in src680_m95 => zu