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.

thanks.

--- Kent Gibson <[EMAIL PROTECTED]> wrote:

> I set up a connection, get my XTextDocument and
> render
> with it.
> 
> Then later I want to put my XTextDocument back into
> a
> frame.
> 
> This all works perfectly, but the performance is
> bad.
> 
> It takes about half a second for a one page document
> to "refresh it".
> 
> You can pretty much see the algorithmn below.
> 
> Does anyone have any ideas how I could improve this?
> 
> many thanks.
> 
> ###############################################
> 
> 
> // Store given connection's document into stream.
> // Therefore create byte array stream and wrap into
> UNO output stream
> ByteArrayOutputStream byteOut = new
> ByteArrayOutputStream( 10000 );
> OutputStreamToXOutputStreamAdapter unoOut = new
> OutputStreamToXOutputStreamAdapter( byteOut );
> PropertyValue[] storeArgs = { new PropertyValue(
> "OutputStream",                                     
>  
>                 -1, unoOut,
> PropertyState.DIRECT_VALUE
> ) };
> // store our document to a stream
> connection.getDocument().storeToURL(
> "private:stream",
> storeArgs ); 
> 
> // Wrap filled byte array into UNO input stream and
> load new document from it
> XInputStream unoIn = new
> ByteArrayToXInputStreamAdapter(
> byteOut.toByteArray()
> );
> PropertyValue[] loadArgs =
> OpenOfficeCoreUtils.addPropertyValue( args,
>              new PropertyValue( "InputStream", -1,
> unoIn, PropertyState.DIRECT_VALUE ) );
> // reload our document from a stream
> loadedComponent =
> frameComponentLoader.loadComponentFromURL(
> "private:stream", "_self", 0, loadArgs ); 
> 
> 
> 
> __________________________________________________
> 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]

Reply via email to