loader.loadComponentFromURL works slow when we are restoring CALC sheet from byte array | loader.loadComponentFromURL

libreoffice.ge at gmail.com libreoffice.ge at gmail.com
Sun May 20 23:59:02 PDT 2012


Hello,

We use OpenOffice.org 3.2.1 Library  to   restore   OOO | LO  CALC  
sheet  from byte array and have issue  with the performance while using 
*loader.loadComponentFromURL("private:stream", "_default", 0, args) * :

I have to get XComponent object and i do it with following code:

*XInputStream xStream = new ByteArrayToXInputStreamAdapter(buffer);*

**

*PropertyValue[] args = new PropertyValue[2];*

*args[0] = new PropertyValue();*

*args[0].Name = "InputStream";*

*args[0].Value = xStream;*

*args[0].State = PropertyState.DIRECT_VALUE;*

*args[1] = new PropertyValue();*

*args[1].Name = "Hidden";*

*args[1].Value = new Boolean(true);*

*XComponent xComponent = loader.loadComponentFromURL("private:stream", 
"_default", 0, args);*

The problem is that *loader.loadComponentFromURL("private:stream", 
"_default", 0, args); *method needs 2 - 4 seconds which is not 
acceptable. If anyone knows how to improve performance, please reply.


Best Regards,

FINA Team

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120521/701fb924/attachment-0001.html>


More information about the LibreOffice mailing list