'This is an adaption from ODF2XHTML. It adds a step between
load and parse of the document where the Element tree can be
modified.'

def filter_load(self, odffile, mi, log):

    self.lines = []
    self._wfunc = self._wlines
    if (isinstance(odffile, basestring) or hasattr(odffile, 'read')):
        self.document = odLoad(odffile)
    else:
        self.document = odffile
    self.search_page_img(mi, log)
    try:
        self.filter_cover(mi, log)
    except:
        pass
    self._walknode(self.document.topnode)
