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


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+unsubscribe@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

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.