def test_ooo_ns(self):
    ' Check that ooo exists in namespace declarations '
    calcdoc = OpenDocumentSpreadsheet()
    table = odf.table.Table(name='Costs')
    forms = odf.office.Forms()
    form = odf.form.Form(controlimplementation='ooo:com.sun.star.form.component.Form')
    lb = odf.form.Listbox(controlimplementation='ooo:com.sun.star.form.component.ListBox', dropdown='true', id='control1')
    form.addElement(lb)
    forms.addElement(form)
    table.addElement(forms)
    tr = odf.table.TableRow()
    table.addElement(tr)
    tr = odf.table.TableRow()
    cell = odf.table.TableCell()
    tr.addElement(cell)
    cell = odf.table.TableCell()
    draw = odf.draw.Control(control='control1', height='0.1126in', width='0.798in', x='0.0303in', y='0.0205in', endcelladdress='Costs.B2', endx='0.8283in', endy='0.1331in')
    cell.addElement(draw)
    tr.addElement(cell)
    table.addElement(tr)
    calcdoc.spreadsheet.addElement(table)
    result = calcdoc.contentxml()
    self.assertNotEqual((- 1), result.find(b'xmlns:ooo="http://openoffice.org/2004/office"'))
Check that ooo exists in namespace declarations
def test_ooo_ns(self):
    '  '
    calcdoc = OpenDocumentSpreadsheet()
    table = odf.table.Table(name='Costs')
    forms = odf.office.Forms()
    form = odf.form.Form(controlimplementation='ooo:com.sun.star.form.component.Form')
    lb = odf.form.Listbox(controlimplementation='ooo:com.sun.star.form.component.ListBox', dropdown='true', id='control1')
    form.addElement(lb)
    forms.addElement(form)
    table.addElement(forms)
    tr = odf.table.TableRow()
    table.addElement(tr)
    tr = odf.table.TableRow()
    cell = odf.table.TableCell()
    tr.addElement(cell)
    cell = odf.table.TableCell()
    draw = odf.draw.Control(control='control1', height='0.1126in', width='0.798in', x='0.0303in', y='0.0205in', endcelladdress='Costs.B2', endx='0.8283in', endy='0.1331in')
    cell.addElement(draw)
    tr.addElement(cell)
    table.addElement(tr)
    calcdoc.spreadsheet.addElement(table)
    result = calcdoc.contentxml()
    self.assertNotEqual((- 1), result.find(b'xmlns:ooo="http://openoffice.org/2004/office"'))