argh. please help. this is driving me batty. Ok i have an empty frame,
XWindow xWindow = ( XWindow ) UnoRuntime.queryInterface( XWindow.class, officeWindow.getUNOWindowPeer() ); object = serviceFactory.createInstance( "com.sun.star.frame.Frame" ); XFrame documentFrame = ( XFrame ) UnoRuntime.queryInterface( XFrame.class, object ); documentFrame.initialize( xWindow ); documentFrame.setName( documentFrame.toString() ); // Register frame at the desktop XFrames xFrames = ( ( XFramesSupplier ) UnoRuntime.queryInterface( XFramesSupplier.class, desktop ) ).getFrames(); xFrames.append( documentFrame ); then I go and create a blank document and put it into my frame: XComponentLoader frameComponentLoader = ( XComponentLoader ) UnoRuntime.queryInterface( XComponentLoader.class, documentFrame); loadedComponent = frameComponentLoader.loadComponentFromURL( url, "_self", 0, args ); the purpose so that I can see a nice blank doc. then I go and create another blank doc. I do some rendering and I want to replace my first doc with the second doc. this works with streams, but performance is bad. now when i play with the windows, ie setVisible, I can never successfully replacing my firstwindow with my secondwindow. for example this does not work: documentFrame.setComponent( documentFrame.getContainerWindow(),officeDocument.getCurrentController()); sorry for all the details but this is a tricky problem, one that I have been fighting for days. I will be happy to provide more source code, if someone wants to help. The root of the problem is isolated in one class. The guide says"Currently, the only way for clients to construct a frame and insert a OpenOffice.org document into it, is to use the com.sun.star.frame.XComponentLoader interface of the com.sun.star.frame.Desktop" but this is not clear to me. Any help would be great. --- Kent Gibson <[EMAIL PROTECTED]> wrote: > thanks that was pretty much the solution I needed. > > you see becuase the documentation said "do not mess > around with setVisible" i didn't, so I did the same > thing with streams. But now that I know that this is > fixed with 2.0.2 I know now where to concentrate on. > I > did try this before but had some problems and > assuemed > it had to do with the fact that I was doing some > that > I shouldn't, alrighty I will give it any try thanks! > > --- Mathias Bauer <[EMAIL PROTECTED]> wrote: > > > Kent Gibson wrote: > > > > > Hi-ya > > > > > > Sorry to pester but does anyone have any ideas? > I > > > tried to explain the problem clearly but it is a > > > tricky problem. I suppose I could summarise it > by > > > asking, how would one convert a hidden document > > > efficiently into a non hidden document. Right > now > > it > > > takes me about 3 minutes to render the document > > and > > > then about 10 minutes just to convert it into a > > non > > > hidden document for viewing. > > > > OOO 2.0.2 allows you to make a hidden document > > visible by a simple API > > call. Is that what you want? > > > > In Basic it's simply: > > > > doc.loadComponentFromURL(...) ' hidden loading > > ' > > ' now do with the document what you want > > ' > > ' now make it visible > > > doc.CurrentController.Frame.ContainerWindow.setVisible( > > True ) > > > > You could do the same in older versions (the API > > already existed) but > > the document would behave strange afterwards (file > > will not be released > > when document is closed), it needed some fixes in > > the code that have > > been applied in 2.0.2. > > > > But admittedly I don't understand how this is > > related to your original > > question about the bad performance for refreshing > a > > document by reloading. > > > > BTW: considering that each "refresh" requires a > > complete write/read > > cycle I don't think that the performance is as > > expected. In general the > > load/save performance in OOo is not very good and > we > > are working on > > this, but don't expect exact promises now about > when > > we will reach which > > performance gain. > > > > Best regards, > > Mathias > > > > -- > > Mathias Bauer - OpenOffice.org Application > Framework > > Project Lead > > Please reply to the list only, [EMAIL PROTECTED] > > is a spam sink. > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam > protection around > http://mail.yahoo.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
