So, two problems that I see:
(1) OpenOffice has both internal and external (display) style names. The main difference is that spaces are replaced with '_20_', so that 'Text body' becomes 'Text_20_body' in the XML representation. Given your request, the updateStyle code eventually asks for a style with attribute style:name="Text body"--and there is no such style. There is, however, a style with style:display-name="Text body" and style:name="Text_20_body" attributes. Solution: Ask for the internal style name (which you can easily arrive at with a simple substitution).
(2) I don't know where your variable $content is defined, but it isn't properly initialized in the code you provided.
Try this code, instead:
(4)
]
