How to display indent level numerically

I want to create something like a numbered list, but where the item number reflects the indent level. This is to represent a multi-branching hierarchy of questions. Example:

1 Why am you confused?
  Because I am a newbie
  2 Why are you a newbie?
    Because I don't write a lot of documents and have never had to do this before
     3 Why don't you write a lot of documents?
        Because that's not my main job function
       4 Why is that not your main job function?
          Because I find it mind-numbing and I have pursued a career where I mostly do other things
          5 Why do you find it mind-numbing?
             Because it's not analytical enough for me
          5 Why have you pursued a career where you mostly do other things?
             Because I find writing mind-numbing
     3 Why have you not had to do this before?
        Because this is never come up
        4 Why has this never come up?
           Because I mostly write simple documents
           5 Why do you mostly write simple documents?
              Because I want to get it over with as quickly as possible

I want the lines auto-numbered based on indentation level. Is there an easy way to do this in LibreOffice?

(extra points if you can guess from this example what company I work for)

Thanks,
Bob

You can “hack” a bullet list to provide such order. First insert a normal bullet list. Then go to its configuration and then to the Customize tab to finally choose the character for the “bullet”: just pick the proper number for each level as “symbol”

This proved to be very simple, if not very flexible (I’ve decided I’d prefer to use “1.” for example instead of “1”).

This is the proper way of doing it. You can even refine the solution by defining a dedicated paragraph style linked to a so-called list style to only need to “type” your paragraphs with this single paragraph style, thus minimising manual fiddling on text.

The attached example is containing the code I sketched.

Sub aboutParaIndent()
indentStep = 1250 
REM (1.25cm) 1251 actually for unknown reasons in Writer.No effect in this context.
REM I don't know a way to change the value.
REM If you know one and made a change, you need to set the correct value above.
theDoc  = ThisComponent
theText = theDoc.Text
theParaEnum = theText.CreateEnumeration
Do While theParaEnum.HasMoreElements
	thePara = theParaEnum.NextElement
	theTC = theText.CreateTextCursorByRange(thePara)
	theTC.GotoStartOfParagraph(False)
	theText.InsertString(theTC,""&Format((thePara.ParaLeftMargin \ 1250) + 1,"00") & ": ",False)
Loop	
End Sub

Thanks, but this is way over my head. I don’t know how to add code to LiberOffice.

I also posted this question and got an additional answer here:

https://forum.openoffice.org/en/forum/viewtopic.php?f=7&t=90841&sid=163647a806f53b9f5f700c3ac9192143

But that’s still more work than hacking the bullet list as suggested by RGB-es