How to do "Continue previous numbering" in a macro? [closed]

asked 2015-02-08 00:35:53 +0100

attila.lendvai gravatar image

updated 2020-08-15 16:06:52 +0100

Alex Kemp gravatar image

LibreOffice Writer Version: 4.3.3.2

I wrote a macro that turns manually numbered paragraphs into a numbering. The only problem left is that when it applies my custom paragraph style, then the numbering restarts (selecting the "Continue previous numbering" from the context menu fixes the issue).

I'm looking for a way to either tell the system to continue numbering by default, or somehow issue the same command from my macro.

This is the interesting part of my macro:

     text = oFound.Text
     cursor = text.createTextCursorByRange(oFound)
     cursor.string = ""
     cursor.collapseToEnd()
     cursor.gotoNextParagraph(true)
     cursor.string = ""
     cursor.paraStyleName = "Quote"
     rem these attempts don't do what i want:
     rem cursor.ParaIsNumberingRestart = false
     rem cursor.NumberingLevel = 0
     cursor.gotoNextParagraph(true)
     cursor.collapseToEnd()
     cursor.paraStyleName = "Quote Author"
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2020-08-15 16:07:02.285432