I am developing a .NET 8 cross-platform application on Debian, which needs to interact with LibreOffice via UNO API. What i'm trying to accomplish is to save an opened Libre Office tab.
Here is my approximate code:
using unoidl.com.sun.star.frame;
using unoidl.com.sun.star.lang;
using unoidl.com.sun.star.uno;
using unoidl.com.sun.star.beans;
public void SaveLibreOfficeDocument()
{
XComponentContext xLocalContext = uno.util.Bootstrap.bootstrap();
XMultiComponentFactory xMCF = xLocalContext.getServiceManager();
object desktop = xMCF.createInstanceWithContext("com.sun.star.frame.Desktop", xLocalContext);
XComponentLoader xCL = (XComponentLoader)desktop;
XModel xModel = (XModel)xCL.loadComponentFromURL("private:factory/scalc", "_blank", 0, new PropertyValue[0]);
// Now, save the document
XStorable xStorable = (XStorable)xModel;
xStorable.store();
}
The problem is that I don't really know how to include all this packages (usings are highlighted as errors).