sort file headers (with the text under header)

It’s possible to order not all the text of an (odt) file, but only the headers (e.g. h2) keeping under each header “his” text?
E.g. sort the following:

b header

some text b

a header

other text a

in the following:

a header

other text a

b header

some text b

Thank you

I suppose there’s no built-in method in Writer to sort by headings; but you may use Navigator (F5) and drag-and-drop headings there (which would move the chapters with all their contents) - which should be still much easier than without Navigator.

Thank you! It’s works! Even it’s not exactly what I asked for (but probably you’re right: maybe is natively impossible)