Date: prev next · Thread: first prev next last
2014 Archives by date, by thread · List index


Hi to all,

the most simple approach to distinguish the different behavior is to use an error handler.

In the latest version of my translation of Andrew Pitonyak's OOME I give an example (see pp. 605-609). Andrew has changed his example to just handle LO alone.

Have a look at https://www.uni-due.de/~abi070/ooo.html

Greetings
Volker

Am 20.10.2014 um 18:59 schrieb Regina Henschel:
Hi Fernand,

Fernand Vanrie schrieb:
Johnny, Regina ,

under "tools" we have a function GetProductName()
who returns for me "LibreOffice4.2"

hope it helps

Thanks for the hint to the application libraries. It works in Apache
OpenOffice too.

Kind regards
Regina


Fernand

Hi Johnny,

You might distinguish it with Basic function IsUnoStruct?

Kind regards
Regina

Johnny Rosenberg schrieb:
Here's my problem:

I have both Apache OpenOffice and LibreOffice installed and I use them
both. I have quite a few Calc files with Basic macros. Today I found my
first difference between the Basic API in LibreOffice vs. Apache
OpenOffice:

Dim Dlg As Object, Ctl As Object
DialogLibraries.LoadLibrary("Standard")
Dlg=CreateUnoDialog(DialogLibraries.Standard.ElDialog)
Ctl=Dlg.getControl("DateField")

Now, I want to use Ctl.setDate(myDate) and myDate=Ctl.getDate(), and
here's
the difference:
In Apache OpenOffice, myDate is a Long. Today's date, 2014-10-19, is
represented as 20141019. I made two functions to convert to and from
the
format I needed.

When running my macro in LibreOffice, the macro was interrupted by an
error
message, of course. After some debugging I found that the LibreOffice
version of Ctl.setDate/Ctl.getDate works with a struct:
Type DateType
Year As Long
Month As Long
Day As Long
End Type


This is of course not a big deal, I can make the macro accept both
formats,
but the macro need to know if LibreOffice or Apache OpenOffice is
running
it. How can I do that? I have tried to find the answer myself, both
using
xray and searching the web, but so far nothing.










--
Volker Lenhardt

--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

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.