[libreoffice-users] Libreoffice 5.4.7 and 6.0.6 crash systematicaly opening Base with macros ...

2018-11-05 Thread Patrick Gelin

/Hi,/

/I was working on a base project (Debian stretch, 32 bit, Java jdk 
8u191) with LibreOffice 5.4.## and then I would like to test latest 
stable versio 6.0.6.

/

/So I installed Libreoffice 6.0.6 but LIbreoffice BAse Crash 
systematically executing first script.../


/I tryed to reinstall old LibreOffice 5.4.7 version and then LibreOffice 
crash systematically executing first script .../


/
/


--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy


Re: [libreoffice-users] Base : How to control insert into a form in order to generat my own keys by macro ?

2018-07-22 Thread Patrick Gelin

Thank you very much Robert :-)

But it looks strange to call "UndoRecordChanges" form operation after my 
own "YourInsertFunction", it look like this call undo my own insert ...
then, undo the operation of the form is not really no operation of the 
form ...


Could you please tell me more about the form operations ? In the book 
Robert Benitez - Database Programming OpenOffice.org Base & Basic - 
Cecilia Benitez, 2008 I find out nothing about all this ...


Do you think an other solution would be to lock the form controller or 
cancel the event, into "Before Record Action" handling ? I could find 
/"myDocument.lockControllers"/ function but it will stop only the 
interface refresh ...


Patrick

Le 22/07/2018 à 15:40, Robert Großkopf a écrit :

Hi Patrick,

So, if I set the property {AllowInserts = false}, do the Form stop to
handling the insert but continue to fired /"Before Record Action"/ and
/"After Record Action"/ events ? I think no, because the form could will
not display the new line to insert ...

You will need "Before Record Action". After the action the data will be
inserted.
You will also need AllowInserts = true. Without this you couldn't get
the cursor in a new row.
The macro should do something like this:

SUB InsertStop(oEvent AS OBJECT)
DIM oFormFeature AS OBJECT
DIM oFormOperations AS OBJECT
oFormFeature = com.sun.star.form.runtime.FormFeature
IF oEvent.Source.ImplementationName =
"org.openoffice.comp.svx.FormController" THEN
oFormOperations = oEvent.Source.FormOperations
YourInsertFunction()
oFormOperations.execute(oFormFeature.UndoRecordChanges)
REM oFormOperations.execute(oFormFeature.MoveToLast)
END SUB

The YourInsertFunction() does exist, or do I understand your mail the
wrong way?

Regards

Robert



--
/M Patrick GELIN
181 route d'Arzay
Lieu dit "Saint Martin"
38440 Lieudieu
06 80 32 87 18/

--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy


[libreoffice-users] Base : How to control insert into a form in order to generat my own keys by macro ?

2018-07-22 Thread Patrick Gelin

Hi,

I would like to control key generation by macro when inserting a new row 
into a form with Base. But the risk is to execute twice insert action : 
the first with my handling insert event (I want to manage the mapping 
and use my own generated keys) and the second by the form base code 
automatically 


So, if I set the property {AllowInserts = false}, do the Form stop to 
handling the insert but continue to fired /"Before Record Action"/ and 
/"After Record Action"/ events ? I think no, because the form could will 
not display the new line to insert ...


So I need to stop the handlind to the Form after my own into events. But 
I understand /"After Record action"/ event handling use a /"Sub"/ action 
not a /"function"/, so I can't return false after my handling ...


So how to do ?

Thank you for your help...
Patrick
/
/

--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy


Re: [libreoffice-users] Basic pseudo object code no reachable when defined into a basic library...

2018-07-20 Thread Patrick Gelin

Hi,

Thanks-you Jean-Francois for your correction. But it's not enought, the 
problem is still here ... I finded why : The new operator failed to load 
pseudo object code into a library from a document's call. It's same 
problem for GlobalScope library (inter-contener call) or Document 
library (inner-contener call).


But I can replace it with a function factory stored into the library and 
called from my document ... :


--
REM Factory Modul into LibApplication
Option Explicit

Function FactoryTest As Object
    FactoryTest = new Test
End Function

--
REM Unitary test into my document
Sub Test2()
    If not GlobalScope.BasicLibraries.hasByName("LibApplication") Then
        MsgBox("Librairie LibApplication non installée !")
        Exit Sub
    End If

    GlobalScope.BasicLibraries.loadLibrary("LibApplication")
    if not GlobalScope.BasicLibraries.isLibraryLoaded("LibApplication") 
Then

        MsgBox("Librairie LibApplication non chargée !")
        Exit Sub
    EndIf

    Dim oTest As Object

    oTest = FactoryTest()
    oTest.execute()
    Erase oTest
End Sub

Note : The Erase function call look's to run perfectly ...

So I need to add a specific modul in pseudo object library with 
factories ...


Patrick

Thank you for your help.
Patrick


--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy


[libreoffice-users] Basic pseudo object code no reachable when defined into a basic library...

2018-07-20 Thread Patrick Gelin

Hi,

I've got a problem with pseudo object no reachable when defined into 
library. The error message when I call new is :


"This object is not accessible. Invalid object reference."

Beloww is the Modul Test into library LibApplication, to define a Test 
object displaying a "Hello Box" dialog  when execute


REM  *  BASIC  *
Option Compatible
Option ClassModule

Option Explicit

Private _value As Integer
Private const _Msg = "Hello World"

' #PROCEDURE# 
==

' Name...: Class_Initialize
' Description ...:
' Parameters :
' Syntax : Class_Initialize
' Return values .:
' Modified...:
' Remarks ...:
' Related ...:
' Link ..:
' Example ...:
Private Sub Class_Initialize()
    _valute = 1
End Sub

' #PROCEDURE# 
==

' Name...: Class_Terminate
' Description ...:
' Parameters :
' Syntax : Class_Terminate
' Return values .:
' Modified...:
' Remarks ...:
' Related ...:
' Link ..:
' Example ...:
Private Sub Class_Terminate()
End Sub

Rem 
***

Rem
Rem PROPRIETES
Rem
Rem 
***


Rem 
***

Rem
Rem METHODES PRIVEES
Rem
Rem 
***


Rem 
***

Rem
Rem METHODES PUBLIQUES
Rem
Rem 
***
' #PROCEDURE# 
==

' Name...: Execute
' Description ...:
' Parameters :
' Syntax : Execute()
' Return values .:
' Modified...:
' Remarks ...:
' Related ...:
' Link ..:
' Example ...:
Public Sub Execute()
    MsgBox _Msg & " : " & _value
End Sub


Module to test into my main document :

Sub Test()
    If GlobalScope.BasicLibraries.hasByName("LibApplication") Then
        GlobalScope.BasicLibraries.loadLibrary("LibApplication")
    End If

if GlobalScope.BasicLibraries.isLibraryLoaded("LibApplication") Then
    Call Application.OpenConnection(ThisDatabaseDocument)
Else
    MsgBox("Librairie LibApplication non chargée !")
EndIf

Dim oTest As Object
Set oTest = new Test
oTest.execute()
Erase oTest
End Sub


Do you think it's not possible to use pseudo object code into library ? 
Do you know an other way than libraries to create domains (there is no 
folder to manage macros ...)



--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy


[libreoffice-users] How to connect my own listener to a Form RowSet ?

2018-07-12 Thread Patrick Gelin

Hi,

I would like to manage a Form into a pseudo Basic Object. I Writed a 
pseudo object to test (Bellow). I know a Form could be used with RowSet 
interface, but in the code bellow there is a problem in Sub Ecouter() 
with line :


_FormRowSet.addRowSetApproveListener(_ecoute1)

The error is that _FormRowSet. doesn't support 
addRowSetApproveListener() call ...


I don't know if the problem comme from the fact listeners could not be 
methods of pseudo object, or if the RowSet interface into a form is not 
completed ...


I know also I could clone the RowSet service of a form but it's read 
only. What I'm looking for is to listen the origin rowset of my form 
with read/write ...


Do you think it's possible ?

Thank you for your help !

Patrick



REM  *  BASIC  *
Option Compatible
Option ClassModule

Option Explicit

Private _FormRowSet As variant
Private _ecoute1 As Variant
Private _ecoute2 As Variant

Private Sub Class_Initialize()
End Sub

Private Sub Class_Terminate()
End Sub

Rem 
***

Rem
Rem PROPRIETES
Rem
Rem 
***



Rem 
***

Rem
Rem METHODES PRIVEES
Rem
Rem 
***



Rem 
***

Rem
Rem METHODES PUBLIQUES
Rem
Rem 
***


Public Sub Ecouter(FormRowSet As Variant)

    On local Error Goto Error_Sub

    _FormRowSet = FormRowSet

    _ecoute1 = CreateUnoListener("TVFAPEcouteAvant_", 
"com.sun.star.sdb.XRowSetApproveListener")

    _FormRowSet.addRowSetApproveListener(_ecoute1)

    _ecoute2 = CreateUnoListener("TVFAPEcouteApres_", 
"com.sun.star.sdbc.XRowSetListener")

    _FormRowSet.addRowSetListener(_ecoute2)

Exit_Sub:
    On error resume next
    Exit Sub
Error_Sub:
    TraceError("ERROR", Err, Name, Erl)
    Stop
End Sub

Public Sub ArreterEcoute()
    _FormRowSet.removeRowSetApproveListener(_ecoute1)
    _FormRowSet.removeRowSetListener(_ecoute2)
End Sub

'  GESTIONNAIRES DES EVENEMENTS XROWSETAPPROVELISTENERE 
---


Function TVFAPEcouteAvant_approveCursorMove(event As Object) As Boolean

    MsgBox "TVFAPEcouteAvant_approveCursorMove"

    TVFAPEcouteAvant_approveCursorMove = true
End Function

'---
Function TVFAPEcouteAvant_approveRowChange(event As Object) As Boolean

    MsgBox "TVFAPEcouteAvant_approveRowChange"

    TVFAPEcouteAvant_approveRowChange = true
End Function

'---
Function TVFAPEcouteAvant_approveRowSetChange(event As Object) As Boolean

    MsgBox "TVFAPEcouteAvant_approveRowSet"

    TVFAPEcouteAvant_approveRowSetChange = true
End Function

'---
Function TVFAPEcouteAvant_disposing(event As Object) As Boolean

    MsgBox "TVFAPEcouteAvant_disposing"

    TVFAPEcouteAvant_disposing = true
End Function

'  GESTIONNAIRES DES EVENEMENTS XROWSETLISTENERE 
---


Sub TVFAPEcouteApres_cursorMoved(event As Object)
    MsgBox "TVFAPEcouteApres_cursorMoved"
End Sub

'---
Sub TVFAPEcouteApres_RowChanged(event As Object)
    MsgBox "TVFAPEcouteApres_RowChanged"
End Sub

'---
Sub TVFAPEcouteApres_RowSetChanged(event As Object)
    MsgBox "TVFAPEcouteApres_RowSetChanged"
End Sub

'---
Sub TVFAPEcouteApres_disposing(event As Object)
    MsgBox "TVFAPEcouteApres_disposing"
End Sub



--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy


Re: [libreoffice-users] Basic : How to throw an events ?

2018-07-11 Thread Patrick Gelin

I visited your link :

https://api.libreoffice.org/examples/DevelopersGuide/examples.html

The ling is interesting but i founded only exemples about events 
listeners, nothing about how to throw events ...


Patrick

--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy


[libreoffice-users] Agenda as a mailing ...

2018-07-10 Thread Patrick Gelin

Hi,

I'm building automaticaly an agenda with Mailing function provided for 
Type Letter... Based on my template, and a Calc array with dates, I can 
produce a Writer document with a week page at left and a blanck page at 
right.


My problem is that model is two pages, both including the page number 
into bottom. But the mailing function produce a different pages styles 
based with mines : In my model styles are : APageGaucheCalendrier and 
APageDroiteCalendrier for page left and Right. But after, the mailing 
produce : APageDroiteCalendrier1, APageGaucheCalendrier2, 
APageDroiteCalendrier2, etc.


So, the page number is alwas [1, 2], [1,2], [1, 2] for each couple of 
page... So what can I do to not reset the page number for each "letter" 
produced with the mailing ?


Thank you in advance for your help !

Patrick


--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy


Re: [libreoffice-users] About pseudo objects with Basic code ...

2018-07-09 Thread Patrick Gelin
I think there is a problem with python: nomadism ! If I want to use my 
USB key with Base connecting to HSQLDB I need to install 
LibreOffice/OpenOffice into the PC, then JAVA, Then HSQLDB ... then 
Python ! It's a lot. I would like to use nn install system at work 
because admin installed LibreOffice and Java but not Python ... So may 
be for me java would be better than python in this context. What I love 
with Basic programmation : all it's embeded with my Base application !


*** Do you know a good book for LibreOffice/OpenOffice/UNO Java/Python 
programmation ? ***

What about UNO API if I use Python/Java ? Is there inline documentation ?

What about events management if I'm using event catch into extern 
application ? With basic I can open a simple dialog box to connect 
events to catch function, but with extern program I will need to 
register manualy. The interest to use LibreOffice Base is to build 
rapidedly a simple database interface...


I know, if you use Python or Java you are connected with Uno. But I know 
also there is some complexity with typing variables between Uno or 
Java/Python scripts ... And then, I know also Python is using some C++ 
interfaces,by memory for event mangement  Uno is C++ also, isn't it ?


--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy


Re: [libreoffice-users] About pseudo objects with Basic code ...

2018-07-08 Thread Patrick Gelin
Ok, with a factory for self variable into pseudo objects. I was thinking 
of this solution already, but I was hoping a better solution in next 
version ...
- Do you need this pseudo object code could be better object model 
complient next day ?
- Or do you think python will be a better way for OpenOffice/LibreOffice 
futur ?


Le 07/07/2018 à 21:37, Mauricio Baeza Servin a écrit :

On Sat, 7 Jul 2018 20:04:07 +0200, Patrick Gelin  wrote:


Hi,

1. I'm using pseudo object style when I'm coding with Basic. What about
putting my  pseudo basic objects into library ? It looks like I couldn't
use new to create object if I put them into a library ...

2. Can I access global variable into a librarie ?

3. Do you know a trik to simulate reference like "This" pointer ?

4. What about objects with nexts LibreOffice/OpenOffice versions ? Do I
need to use python next ?

Patrick



Hi...

In this example: https://docs.empresalibre.net/f/0bd013d0edcc44f79456/?dl=1

You can see an example how to used classess in Basic, included simulate "self" 
(This)

Best regards



--
M Patrick GELIN
181 roue d'Arzay
Lieu dit "Saint Martin"
38440 Lieudieu
06 80 32 87 18


--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy


[libreoffice-users] About pseudo objects with Basic code ...

2018-07-07 Thread Patrick Gelin

Hi,

1. I'm using pseudo object style when I'm coding with Basic. What about 
putting my  pseudo basic objects into library ? It looks like I couldn't 
use new to create object if I put them into a library ...


2. Can I access global variable into a librarie ?

3. Do you know a trik to simulate reference like "This" pointer ?

4. What about objects with nexts LibreOffice/OpenOffice versions ? Do I 
need to use python next ?


Patrick

--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy


[libreoffice-users] Basic : How to throw an events ?

2018-07-07 Thread Patrick Gelin

Hi,

I know how to catch Event from formula by exemple, but I would like to 
throw events myself with my code. I know also I've got the possibility 
to use patterns like observator but if I could throw event it will be 
nice ! Do you know an Uno service to use to throw events ?


Patrick

--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy


[libreoffice-users] Basic : How to write a CopyValue() recursive function ?

2018-06-06 Thread Patrick Gelin
(aVariant)
        Case 8 'String
            result = Left(aVariant, Len(aVariant)) 'Copy value avec la 
fonction 'Left()'...

        Case 0 'Empty
            'exit sans aucune affectation vaut la valeur retour empty...
            'Ne surtout pas essayer d'affecter l'objet 'Nothing'
            Exit Function
        Case 1 'Null
            result = Null
        Case else
            result = aVariant
        End Select
    EndIf

    CopyValue = result

Exit_Function:
    Exit Function
Erreur:
    TraceError("ERROR", Err, Name, Erl)
    Goto Exit_Function
End Function

--
M Patrick GELIN
181 roue d'Arzay
Lieu dit "Saint Martin"
38440 Lieudieu
06 80 32 87 18


--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy


[libreoffice-users] Macros : How to solve concurrency/Reentrancy in events procedures ?

2018-01-12 Thread Patrick Gelin

Hi,

I'm using LibreOffice 5.2.7.2 with HSQLDB database server (not embeded).

I've got a problem with form events management, so I'm looking best 
practice to manage reantrancy :


1) I'm asking myself if each event is a different trhead ?

2) Do you know sample of code with uno API to manage Mutex 
 in Thread that I 
could use with Basic macros ? I couldn't find anything like this into 
"Marcelyy, B., Godard, L. - Programmation OpenOffice.org 3 - Eyrolles, 
2009" Do you know a other book more closer with Uni APIs ?


3) Is it possible to replace default Form listners by handlers, in order 
to refuse reantrancy by rejecting unecessary events ?


4) Do I prefer modify the default Form controler in order to manage at 
source level the reantrancy problem ? Do you sample of code to do?


5) Is it possible to write a mutex by home, I could use into my Forms 
listners ? For exemple, using a global variable as counter events and a 
wait() call to manage priorities ...


By the way, I noticed in my macro a global variable instanciated into 
one of my form listner may disappear... I was reading into "Useful Macro 
Information For OpenOffice.org By Andrew Pitonyak (p.373) 
" 
that controlers may be replaced by others ones, and listners detached... 
So I'm asking myself if there is something similar explaining my 
problem. But I'm only moving from one record to next one, and my 
variable is global ...


Thank you for your help !

Patrick


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


[libreoffice-users] Macros : ByVal doesn't work with parameters in a class object modul ...

2018-01-06 Thread Patrick Gelin

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 ...

---

REM  *  BASIC  *
Option Compatible
Option ClassModule

Option Explicit

Type __TDuolet
key As String   'l'etiquette de l'objet
item As Variant 'un objet quelconque
End Type

Private _Items As Variant
Private _n As Long
Private _Titre As String
Private _StepSize As Long

' #PROCEDURE# ==
' Name...: Class_Initialize
' Description ...:
' Parameters :
' Syntax : Class_Initialize
' Return values .: Success - void
'  Failure - sets @error
' Author ....: Patrick GELIN
' Modified...:
' Remarks ...:
' Related ...:
' Link ..:
' Example ...:
Private Sub Class_Initialize()
_n = 0
_Titre = Name
_StepSize = 30
_Items = DimArray(_StepSize+1)  
End Sub

' #PROCEDURE# ==
' Name...: Class_Terminate
' Description ...:
' Parameters :
' Syntax : Class_Terminate
' Return values .: Success - void
'  Failure - sets @error
' Author ....: Patrick GELIN
' Modified...:
' Remarks ...:
' Related ...:
' Link ..:
' Example ...:
Private Sub Class_Terminate()
End Sub

Rem ***
Rem
Rem PROPRIETES
Rem
Rem ***
Public Property Let Titre(unTitre As String)
_Titre  = unTitre
End Property

Public Property Get Titre As String
Titre  = _Titre
End Property

Public Property Get AllItems As Variant
AllItems = _Items
End Property

Public Property Let StepSize(ByVal delta As Long)
_StepSize  = delta
End Property

Public Property Get StepSize As Long
StepSize = _StepSize
End Property

Public Property Get NbElements As Long
NbElements = _n
End Property

Public Property Get Taille As Long
Taille = UBound(_Items) - LBound(_Items) + 1
End Property

Public Property Get UBound As Long
UBound(_Items)
End Property

Public Property Get LBound As Long
LBound(_Items)
End Property

Rem ***
Rem
Rem METHODES PRIVEES
Rem
Rem ***
Public Sub _Expend(Optional StepSize As Long, Optional isPresserved As Boolean 
= True)

Dim IndexMax As Long

If IsMissing(StepSize) Then StepSize = _StepSize
IndexMax = UBound(_Items()) + StepSize
If isPresserved Then
Redim Preserve _Items(IndexMax) As Variant
Else
Redim _Items(IndexMax) As Variant
EndIf
End Sub


Rem ***
Rem
Rem METHODES PUBLIQUES
Rem
Rem ***
' #PROCEDURE# ==
' Name...: Ajouter
' Description ...: Ajouter un variant au vecteur.
' Parameters : Item (variant) : Un variant au vecteur.
' Syntax : Ajouter(Item)
' Return values .: N/A
' Author ....: Patrick GELIN
' Modified...: 06/01/2018
' Remarks ...: ATTENTION : L'attribut ByVal ne fonctionne pas !
'Le parametre Item doit donc avoir une 
instance spécifique,
'sans réutiliser l'instance d'un autre 
Item déjà ajouté au vecteur
'sinon ce premier aura la valeur de la 
dernière modification !
' Related ...:
' Link ..:
' Example ...:
Public Sub Ajo

[libreoffice-users] Base document doesn't sent DocumentLoeded event ...

2017-12-07 Thread Patrick Gelin

Good evening,

I'm writing a base application with LibreOffice Version: 5.2.7.2 and 
Java 1.8.0_144 and Linux Debian Stretch.


I writed a macro to catch DocumentLoaded event. I understand this event 
will be trhown only one time, after document finished to load... But it 
looks like this event is never throw, because my macro is never called.


I succeded to catch DocumentActivated event, but it's throw multi times 
by session. My goal is to use DocumentLoaded event to manage singletons 
instances. If I can't catch this event, do you know an other way to 
manage singletons with basic base application ?


Thank you for your help.
Patrick

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