The Insert Index/Table box (menu Insert | Indexes and tables | Indexes and tables), has four tabs or pages. The first one, Index/Table, has a section titled Create index/table with the options For, where you select either the whole document or a chapter, and Evaluate up to level followed by a number box.
Click on the image to open a full-resolution version.
The TOC is created with 10 levels of headings, or the number of levels used in the document, whichever is smaller. To change the default setting, just enter the desired number in the box.
Since you have already created specific heading and subheading styles for the Annexes, from the same Insert Index/Table box, check the option Additional styles under the Create from section.
Next, click on the button with the ellipsis or three dots (…) to open the Assign styles dialog box.
For simplicity, let’s suppose that your Annex heading styles are named
anx3, and so on, but you want only the first two to appear on the TOC.
Then you select
anx1 and click on the double-arrow button to the right (">>") once (at the bottom of the dialog box), and then select
anx2 and click on the double-arrow button twice.
Accept and your TOC will list, in addition to the regular scheme, headings of type
You can find further information on customizing the tables of contents, bibliographies and other indices in Chapter 12 of the Writer Guide.