Dear Michael,
Many thanks for quick response.
See our answers in green.
Best Regards
[Nick] & Team
On 3/6/2012 7:38 PM, Michael Meeks wrote:
Hi there,
On Tue, 2012-03-06 at 19:23 +0400, libreoffice.ge@gmail.com wrote:
We are working on Open source Project where OOO Calc was used
for report designer. Now we are going to migrate from OOO calc to LO
Calc and need your help with following:
Great - where is your source code out of interest ? :-)
[Nick]
Old code hosted on Sourceforge CVS can be found here:
http://fina.cvs.sourceforge.net/viewvc/fina
Code related with OOO addin is here:
http://fina.cvs.sourceforge.net/viewvc/fina/addin/
Old project is here: http://sourceforge.net/projects/fina
New code hosted on Atlasian SVN is here:
https://fina2net.atlassian.net/svn/FINA/trunk ( current version is 0.2)
New Project is here: jira.fina2.net
1. We are using OOO SDK 2.1 to register Calc Add in.
· Was new LO SDK changed significantly?
It should not have been. One thing to bear in mind is that our xcu
(configuration data) parser is a lot stricter, so you need well formed
XML that matches the schema (which was not true in older versions). But
if you get that right things should be ok I hope.
[Nick]
Do you think we need to rewrite the code? Or XML configuration /
customization will be enough?
· Where is a docs we need to read before development?
Assume that the docs are the same as before I guess, but they are here:
http://api.libreoffice.org/
bug reports / patches to the docs much appreciated.
[Nick] Thanks.
2. We have used OOOBean [officebean.jar] for opening OOO Calc
in Java Environment . Are you planning to develop officebean project?
Where can we find docs and/or wiki materials?
The bean should still exist, is still packaged, etc. There are a few
reports of problems with it, again fixes appreciated for that.
[Nick] Thanks. Can we generate HTML file without opening OOO (LO).
Right now (in old version) we are using the method - please see here:
https://fina2net.atlassian.net/source/browse/FINA/trunk/fina/fina-server/src/main/java/net/fina/server/ooo/OOSheet.java?hb=true
(or see code below). Connection with OOO takes allot of time: 2-3 sec.
3. One of the option we have is to use Libreoffice.org Calc
Plugin connected to JBoss through web services (like this project).
Could you please give us links on similar projects or “how to” doc?
Not that clear what you want, you want mail-merge ? if so, you'd want
to provide something that looked like a database I suppose to provide
that.
[Nick]
*We would like to write an extension for LO which will exchange data
with web services.We are planning to link it with JBoss. Will send you
more infomration and screenshot on what we are discussing.*
4. UNO Interface - was it significantly changed?
In a nutshell we should be backwards compatible with OpenOffice.org -
at least, this is what we try to be. Of course, there are always bugs we
need to find out :-)
Hope that helps !
Michael.
CODE HOW TO SAVE OOO to HTML
public byte[] exportAsHtml(byte[] tempReportContent) {
byte[] htmlContent = null;
try {
log.info("Exporting As Html");
XStorable xStorable = null;
Object desktop = null;
XComponent document = null;
xRemoteContext = getRemoteContext();
xRemoteServiceManager =
xRemoteContext.getServiceManager();
// Get a desktop instance
desktop =
xRemoteServiceManager.createInstanceWithContext("com.sun.star.frame.Desktop",
xRemoteContext);
// Get a reference to the desktop interface
that can load files
XComponentLoader loader = (XComponentLoader)
UnoRuntime.queryInterface(XComponentLoader.class, desktop);
XInputStream xStream = new
ByteArrayToXInputStreamAdapter(tempReportContent);
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);
document =
loader.loadComponentFromURL("private:stream", "_blank", 0, args);
ByteArrayOutputStream out = new
ByteArrayOutputStream();
XOutputStream xOut = new
OutputStreamToXOutputStreamAdapter(out);
PropertyValue[] args1 = new PropertyValue[2];
args1[0] = new PropertyValue();
args1[0].Name = "OutputStream";
args1[0].Value = xOut;
args1[0].State = PropertyState.DIRECT_VALUE;
args1[1] = new PropertyValue();
args1[1].Name = "FilterName";
args1[1].Value = "HTML (StarCalc)";
xStorable = (XStorable)
UnoRuntime.queryInterface(XStorable.class, document);
xStorable.storeAsURL("private:stream", args1);
xOut.flush();
htmlContent = out.toByteArray();
xOut.closeOutput();
} catch (Exception ex) {
log.error(ex.getMessage(), ex);
}
return htmlContent;
}
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.