def document(self, document):
        self._document = document
        self.caption.document = document
        for row in self.headings:
            for cell in row:
                cell.document = document
        for row in self.rows:
            for cell in row:
                cell.document = document