'This will set the joinedWith property to the posn of rootElement
for all the elements that rootElement joins with to make a single
large merged element.
@todo: parameter description'

def joinElements(self, rootElement):

    row = rootElement.row
    col = rootElement.col
    posn = rootElement.posn()
    for v in xrange((rootElement.mergeV + 1)):
        for h in xrange((rootElement.mergeH + 1)):
            newPosn = ('%s,%s' % ((row + v), (col + h)))
            if (newPosn == posn):
                continue
            if (newPosn in self.matrix):
                if (self.matrix[newPosn].joinedWith == posn):
                    continue
                msg = ('Attempting    to    merge    element    at    posn    %s.    The    following    data    will    be    lost    %s' % (newPosn, self.matrix[newPosn]))
                self.matrix[newPosn].joinedWith = posn
            else:
                childElement = survey_MatrixElement(row, col, '', [])
                childElement.joinedWith = posn
                self.matrix[newPosn] = childElement
