Writing numbered headings in Writer

In Libreoffice Writer, I am trying to make all my numbered headings in the following form:

1. First title
     1.1 Subtitle
     1.2 Subtitle
2. Second title
     2.1 Subtitle
     2.2 Subtitle
         2.2.1 Subsubtitle

I tried playing around with Tools > Outline Numbering, but the best I can only get one of the following:

1. First title
     1.1 Subtitle
     1.2 Subtitle
2. Second title
     1.3 Subtitle
     1.4 Subtitle

Or

1. First title
     1.1 Subtitle
     1.2 Subtitle
2. Second title
     1.2 Subtitle
     1.3 Subtitle

Is there any way for me to put the subheading's numbering as a function of the numbering of the heading above, like in the example on the top?

I am running a .docx file in LibreOffice 4.0.3.3.

Edit: I edited this question as per suggestions in the comments.

Problem solved:

It seems like the big problem was the following. All the headings in the original file had a correct format (i.e. Heading 1, Heading 2, etc). However, they had not been correctly converted to the "corresponding" Heading 1, Heading 2, etc that Libreoffice uses (Thanks @gertvdijk). Thus, followin the steps in the accepted answer gets the job done.

Thanks!


Solution 1:

Just

  1. Hit F11 which opens the styles and apply the styles to heading 1 to 3.
  2. Put your cursor in one of the headings and hit Format/Bullets and Numbering... (update: and not Tools/Outline Numbering... as mentioned before) in the menu bar.
  3. Then select the tab outline and choose the option numeric with all sublevels (see image)

enter image description here

In the position tab of 'Bullets and Numbering' you can choose... their position of course. If you want the typical indent you suggest, just click default in the three different levels.

Enjoy.

enter image description here

Solution 2:

If you follow the answer of @don.joey, you will make the WHOLE YOUR DOCUMENT A NUMBERED LIST! Better avoid it! There are more natural native ways to number the headings. The Tools -> Chapter (Outline) Numbering is a much better way to go!

If you encounter some unexplainable problems sometimes you might need to reset the problematic heading style (change it to Default and back to Heading).