Hi,
I'm using Libreoffice :
Version: 5.2.7.2
Build ID: 1:5.2.7-1
Threads CPU : 2; Version de l'OS :Linux 4.12; UI Render : par défaut; VCL : gtk3;
Locale : fr-FR (fr_FR.UTF-8); Calc: group
Below is a complet macro to manage Vectors of variants (With french coments) . I've got a problem with unitary test (Cf. Sub Main) because call to procedure 'v.Ajouter(duolet)' use always passage by reference instead of a passage by value (ByVal) ! For all that, I delicately manage a passage by value in my function...
I tested with a call to New operator in order to build specifics instances at each call, like this :
duolet = new __TDuolet
duolet.key = "MONTAGNE"
duolet.Item = 3
v.Ajouter(duolet)
And it's fine, the duolet variable is a new one instance. But I don't want the caller do all this stuff. I would like easier way to do ...
I'm asking myself if it's a specific bug to my LibreOffice versin, or with Variants and Struct type (__TDuolet) ?
What do you think about that ? What can I do to copy by val the parameter into my function v.Ajouter(duolet) ?
Think you for your help...
Patrick
PS: Macro is below, it's a draft ...