Hi,
i try’d dllimport before and everything works fine.
BUT I like(need) to have methods to fill data in textfields….
I know that everything could be made with methods and dllimport, but is this
the recommended way?
Have a “easy” code on Windows and complicated on Ubuntu ??? :(
private void FillHeader(IModel row)
{
// ReSharper disable SuspiciousTypeConversion.Global
var xtextfields = ((XTextFieldsSupplier)Document).getTextFields();
// ReSharper restore SuspiciousTypeConversion.Global
var xText = Document.getText();
var enumaration = xtextfields.createEnumeration();
while (enumaration.hasMoreElements())
{
try
{
var field = enumaration.nextElement();
if (!(field.Value is XTextField)) continue;
var name = (field.Value as
XTextField).getAnchor().getString();
var value = GetPropertyValue(row, name);
if (string.IsNullOrEmpty(value))
{
xText.removeTextContent((XTextField)field.Value);
}
else
{
(field.Value as
XTextField).getAnchor().setString(value);
}
}
catch
{
// ReSharper disable RedundantJumpStatement
continue;
// ReSharper restore RedundantJumpStatement
}
}
var xModel = (Document);
var xController = xModel.getCurrentController();
// ReSharper disable SuspiciousTypeConversion.Global
var xTextViewCursor =
((XTextViewCursorSupplier)xController).getViewCursor();
// ReSharper restore SuspiciousTypeConversion.Global
xTextViewCursor.gotoEnd(false);
}
Von: Marco Ridoni [mailto:[email protected]]
Gesendet: Dienstag, 18. Oktober 2016 11:22
An: Miguel de Icaza <[email protected]>
Cc: Wolfgang Mauer <[email protected]>; [email protected]
Betreff: Re: [Mono-list] mono and LibreOffice (Ubuntu/Linux)
My use case for my service was very simple:
1) Convert a "whatever" document to PDF
2) Generate a XLS/Calc spreadsheet from XML data (this part was later dealt
with using NPOI)
I found that using the C# and/or Java bindings the whole thing was quite
unstable, so I wrote a small C/C++ wrapper, that in turn is called by Mono or
.Net with a standard DLLImport. This works both on Linux and Windows (it's for
a ASP.Net MVC web app that is developed and tested under Windows and deployed
under Linux).
If you wish, code is freely (in any meaning) available, beware that it probably
requires some cleaning up.
m.
2016-10-18 3:06 GMT+02:00 Miguel de Icaza via Mono-list
<[email protected] <mailto:[email protected]> >:
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 <[email protected]
<mailto:[email protected]> >
Date: Monday, October 17, 2016 at 5:40 PM
To: Miguel de Icaza <[email protected] <mailto:[email protected]> >,
"[email protected] <mailto:[email protected]> "
<[email protected] <mailto:[email protected]> >
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:[email protected] <mailto:[email protected]>
]
Gesendet: Montag, 17. Oktober 2016 21:13
An: Wolfgang Mauer <[email protected]
<mailto:[email protected]> >; [email protected]
<mailto:[email protected]>
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 <[email protected]
<mailto:[email protected]> > on behalf of Wolfgang Mauer
<[email protected] <mailto:[email protected]> >
Date: Saturday, October 8, 2016 at 7:22 AM
To: "[email protected] <mailto:[email protected]> "
<[email protected] <mailto:[email protected]> >
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
_______________________________________________
Mono-list maillist - [email protected] <mailto:[email protected]>
http://lists.dot.net/mailman/listinfo/mono-list
_______________________________________________
Mono-list maillist - [email protected]
http://lists.dot.net/mailman/listinfo/mono-list