How do I auto-populate a new row from an existing row?

So I thought it could be done using Events but I could only find the following
Document related events
https://help.libreoffice.org/latest/en-US/text/sbasic/shared/01040000.html
Monitoring events using Python but I don’t understand how to trigger/load the macro
https://help.libreoffice.org/latest/en-US/text/sbasic/python/python_document_events.html?&DbPAR=WRITER&System=UNIX

  1. Where are the events related to adding/deleting a row? (‘Insert Rows Above|Below’)
  2. Also, how do I copy the style info from one cell into another when I Copy/Paste?
  3. Is this related? Module awt
  1. The quick and easy (dirty?) way of
    having an event fire when a row or
    column is inserted/deleted is to use
    the “Formulae Calculated” event. Not
    ideal, I will admit because it will
    be fired many more times than
    needed, and not suitable for
    everyone, but with a little care it
    may be useful. You will need to
    insert the formula =ROW()+COLUMN()
    into a cell far to the right and
    down from where the “main action” is
    taking place, then whenever a row or
    column is inserted/deleted, the
    formula will be calculated and the
    event will fire. At this point, you
    then need to go through the rows and
    columns to see what, if anything,
    has changed. In my case, because of
    the structure of the data on the
    sheet it was quite easy to detect
    insertions and deletions, but of
    course YMMV.
  2. The easiest way is to
    use styles and then just copy the
    range’s CellStyle. Alternatively, if
    you don’t mind using the clipboard,
    you could use Paste Special
    with just pasting the formats. The
    easiest way to get this into a macro
    is to use the macro recorder as the
    parameters are quite complex.

A)
I’m not a user of events and listeners except the few events accessible directly from the UI, but you may try XEventListener for which there is LibreOffice: Events Service Reference. where you find the event names OnInsertStart and OnInsertDone. I don’t know what cases of insertion they actually are made for.

B)
If I needed to fill newly created rows in spreadsheets automatically, i would use the >Tools>Customize feature to remove the respective items from their menus, and by that force the user to trigger the insertion using a toolbar wich calls in turn a routine I wrote myself and which checks the current selection or the focus, and acts on the results.
I would thoroughly consider whether to save that all to the document or to the local LibO Calc settings and scripts.
But I also am not a user of Python and don’t know the specifics therefore. (This kind of customization would, however, not be sensitive concerning efficiency. You can do it without any problem in Basic.)