Issue 59904

Summary: FrameSearchFlags doesnt work for loadComponentFromURL()
Product: App Dev Reporter: sarotti <joerg.leistikow>
Component: apiAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: issues, oooforum
Version: 3.3.0 or older (OOo)   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: 4.1.7
Developer Difficulty: ---

Description sarotti 2005-12-30 21:13:21 UTC
the following macro doesn´t work correct in the 2.0.1 version but only in 2.0.0. 
The file "form1" is loaded, but using the same code to open another file creates 
a new frame. It´s not opened in the same frame. 

Sub LoadForm1

Dim oDoc1 As Object 
Dim sURL1 As String

Rem Load a documents into the frame "myframe"!
oDesk = createUnoService("com.sun.star.frame.Desktop")
Dim NoArgs()
Rem Frame "myframe" will be created if it does not exist because it includes 
"CREATE"
sUrl_1 = "file:///C:/Form1.odt"
oDoc1 = oDesk.LoadComponentFromUrl(sUrl_1, "myframe", 63, Noargs())

End Sub
Comment 1 stephan.wunderlich 2006-01-03 12:41:57 UTC
sw->as: looks like one for you ... in OOo 2.0 the frame was reused ... in
OOo2.0.1 a new frame is created.
Comment 2 andreas.schluens 2006-01-31 14:29:20 UTC
.
Comment 3 andreas.schluens 2006-03-27 12:28:02 UTC
Changed the title
Comment 4 andreas.schluens 2006-06-20 12:34:57 UTC
.
Comment 5 Martin Hollmichel 2007-11-09 17:28:07 UTC
set target from 2.x to 3.x according to
http://wiki.services.openoffice.org/wiki/Target_3x
Comment 6 Mathias_Bauer 2009-05-06 17:15:29 UTC
grabbing issue
Comment 7 Marcus 2017-05-20 11:28:00 UTC
Reset assigne to the default "issues@openoffice.apache.org".
Comment 8 oooforum (fr) 2020-06-08 07:07:39 UTC
Still continue with AOO 4.1.7
The new document don't have its frame named.
Constant com.sun.star.frame.FrameSearchFlag.CREATE [1] seems to be ignored.
A workaround is to set a name:
oDoc1.CurrentController.Frame.setName("myframe") 

[1] https://www.openoffice.org/api/docs/common/ref/com/sun/star/frame/FrameSearchFlag.html