Conversions of frames to HTML in writer is incorrect

I’ve constructed a frame contained a graphic object. The HTML output does not have a frame, just garbage.What I have in the writer is:

-------------- frame ---------------
| -----------   -                  |
| | text box |                     |
| -----------                      |
|                                  |
}  ----------------------          |
||  rectangle containing|          |
||  a text  box, 'o' and|          |
|| arccs                |          |
| -----------------------

| ----------- -                    |
| | text box |                     |
| -----------                      |
-------------- frame ---------------

what I get is something like

       |   text layer    | output layer |   colored rectangle | graphic 'ooo'

Any way of getting correct html?