[Mono-list] mono and LibreOffice (Ubuntu/Linux)

Wolfgang Mauer wolfgang.mauer at kabelmail.de
Tue Oct 18 11:49:08 UTC 2016


Thanks for that infos.

But all this do not work with a actual version of Ubuntu and LibreOffice :(

 

No “climaker“ on Ubuntu

No working assemblys (actual cppuhelper.dll has mixed code c++/clr) on Ubuntu

 

Trying to do this:

Load (“Connect”) to libreoffice, open(“InitDocument”) my template and fill alle textfileds with data

On Windows everythink works fine :(

 

        private void Connect()

        {

            var boot = uno.util.Bootstrap.bootstrap();

            _multiServiceFactory = (XMultiServiceFactory)boot.getServiceManager();

        }

 

        /// <summary> Creates an empty spreadsheet document. </summary>

        private void InitDocument(string document, string nummer)

        {

            var path = Path.GetTempPath() + "Kunde[" + nummer + "].odt";

            var loader = (XComponentLoader)_multiServiceFactory.createInstance("com.sun.star.frame..Desktop");

            var urlConverter = (XFileIdentifierConverter)_multiServiceFactory.createInstance("com.sun.star.ucb.FileContentProvider");

 

            var url = urlConverter.getFileURLFromSystemPath(Path.GetPathRoot(path), path);

            var template = urlConverter.getFileURLFromSystemPath(Path.GetPathRoot(document), document);

            var retVal = (XTextDocument)loader.loadComponentFromURL(template, "_blank", 0, new[] { MakePropertyValue("TemplateURL", new uno.Any(template)), MakePropertyValue("Title", new uno.Any("Kunde[" + nummer + "]")) });

            ((XStorable)retVal).storeAsURL(url, new PropertyValue[0]);

        }

 

        private static PropertyValue MakePropertyValue(string cName, uno.Any uValue)

        {

            var oPropertyValue = new PropertyValue();

            if (!string.IsNullOrEmpty(cName))

                oPropertyValue.Name = cName;

            oPropertyValue.Value = uValue;

            return oPropertyValue;

        }

………………….

 

/Wolfgang

 

Von: Miguel de Icaza [mailto:miguel at microsoft.com] 
Gesendet: Dienstag, 18. Oktober 2016 03:06
An: Wolfgang Mauer <wolfgang.mauer at kabelmail.de>; mono-list at lists.xamarin.com
Betreff: Re: AW: [Mono-list] mono and LibreOffice (Ubuntu/Linux)

 

Sadly, I do not recall the details, and the little information that was available on the net has been gone.

 

But judging from a blog post of mine [1], it looks like Michael Meeks at the time ported the support to run with Mono.   Other than that, I do not have more information.

 

I managed to track down some old Addin for MonoDevelop, and you can maybe use this as a starting point for your investigations:

 

https://github.com/mono/monodevelop/tree/monodevelop-4.0.12-branch/extras/OpenOfficeSamples

 

I suggest you reach out to the open office team.

 

[1] http://tirania.org/blog/archive/2008/Jun-12.html

 

From: Wolfgang Mauer <wolfgang.mauer at kabelmail.de <mailto:wolfgang.mauer at kabelmail.de> >
Date: Monday, October 17, 2016 at 5:40 PM
To: Miguel de Icaza <miguel at microsoft.com <mailto:miguel at microsoft.com> >, "mono-list at lists.xamarin.com <mailto:mono-list at lists.xamarin.com> " <mono-list at lists.xamarin.com <mailto:mono-list at lists.xamarin.com> >
Subject: AW: [Mono-list] mono and LibreOffice (Ubuntu/Linux)

 

Ok, Thanks.

With Ubuntu > 12.04 can’t find “cli-cppuhelper” no more.

Is this a problem within mono or libreoffice?

If you use libreoffice > 3.5 you will see that it will not work.

 

/Wolfgang

 

Von: Miguel de Icaza [ <mailto:miguel at microsoft.com> mailto:miguel at microsoft.com] 
Gesendet: Montag, 17. Oktober 2016 21:13
An: Wolfgang Mauer < <mailto:wolfgang.mauer at kabelmail.de> wolfgang.mauer at kabelmail.de>;  <mailto:mono-list at lists.xamarin.com> mono-list at lists.xamarin.com
Betreff: Re: [Mono-list] mono and LibreOffice (Ubuntu/Linux)

 

Hello,

 

When I last used it, all the work took place on Unix, I do not recall using Windows at all.

 

Miguel.

 

From: Mono-list <mono-list-bounces at lists.dot.net <mailto:mono-list-bounces at lists.dot.net> > on behalf of Wolfgang Mauer <wolfgang.mauer at kabelmail.de <mailto:wolfgang.mauer at kabelmail.de> >
Date: Saturday, October 8, 2016 at 7:22 AM
To: "mono-list at lists.xamarin.com <mailto:mono-list at lists.xamarin.com> " <mono-list at lists.xamarin.com <mailto:mono-list at lists.xamarin.com> >
Subject: [Mono-list] mono and LibreOffice (Ubuntu/Linux)

 

Hi all,

i just restart working on a project that uses LibreOffice(CLI) from mono.

Now I am wondering that the assembly’s (cli_cppuhelper.dll) only run on Windows?

Is there is a way to get this working again?

 

/Regards

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dot.net/pipermail/mono-list/attachments/20161018/477b07a7/attachment-0001.html>


More information about the Mono-list mailing list