How to find/replace/tag paragraph styles (regular expressions)?

tdf#70142

And this would not be possible at any case, even after the issue above is resolved. Lists are metadata of paragraphs, and you can’t just change automatically computed things.

You could possibly use a macro to convert lists to text, before the replacement. See How to convert numbered/bulleted lists to plain text in Writer? - #4 by mikekaganski.

This is possible only if your items are formatted with styles, here a combination of a paragraph style and list style. Formally, only the list style is necessary.

You must first understand what is the identity (or family) of a list, because you may have many lists in your document. Lists belong in the same “family” when their numbering/bullet is defined by the same list style. This excludes Format>Bullet & Numbering or equivalently toolbar buttons which are in fact direct formatting.

You can change in a single step the numbering/bullet of a family by customising the list style. The change will be instantly applied to all lists of the family, hence the importance of attributing a different list style to lists which have different semantic values.

  • open the list style configuration dialog just like you would do for any other style
  • go to Customize tab
  • choose from Number drop-down menu the kind of numbering you want for this level
  • in case of Bullet, you can assign any character as bullet with button Select aside Character

This can be done separately on all levels of the list.

Caveat: don’t use Unordered, Ordered, Outline, Image tabs once you have begun customising. They preset value in Position and Customize which erases your own customisation.

@mikekaganski, solution you have provided converts the ‘fields’ to plain text. Then I can replace new plain text with regular expression in Find field: ^\d+\. with & in Replace field.

I am posting solution here, because it was little bit unclear first for me what to do.

But when above macro is executed the side effect: it adds horizontal tab at my existing document Heading 2 styles. But I can remove that with:
a) Check Paragraph Style. Find field: Heading 2 and click on Find All button.
b) Uncheck Paragraph Style. Check Current selection only and check Regular expressions. Find field: \t and Replace field empty and Replace All.
@ajlittoz, I am not using List Styles, but Ordered List which is direct formatting.

Now I have one more problem… For each of transformation I have recorded macro that is running without an issue. Excellent. But now I would like to write a macro that calls other macros, so I need to run only one single macro manually and all others are run but this master macro. I have named this master macro RUN_ALL_MACROS and it is pretty simple to run other macros just execute “call <macro_name>”, but how do I run ConvertOrderedListFieldsToPainText that is not in My Macros section?

When I run above RUN_ALL_MACROS macro I get error: