'Function to add a bounding box around the elements contained by
the elements (startrow, startcol) and (endrow, endcol)
This uses standard style names:
boxL, boxB, boxR, boxT
for Left, Bottom, Right and Top borders respectively
@todo: parameter description'

def boxRange(self, startrow, startcol, endrow, endcol, width=1):

    for r in xrange(startrow, endrow):
        posn = ('%s,%s' % (r, startcol))
        if (posn in self.matrix):
            self.matrix[posn].styleList.append(('boxL%s' % width))
        else:
            self.addElement(survey_MatrixElement(r, startcol, '', ('boxL%s' % width)))
        posn = ('%s,%s' % (r, endcol))
        if (posn in self.matrix):
            self.matrix[posn].styleList.append(('boxR%s' % width))
        else:
            self.addElement(survey_MatrixElement(r, endcol, '', ('boxR%s' % width)))
    for c in xrange(startcol, (endcol + 1)):
        posn = ('%s,%s' % (startrow, c))
        if (posn in self.matrix):
            self.matrix[posn].styleList.append(('boxT%s' % width))
        else:
            self.addElement(survey_MatrixElement(startrow, c, '', ('boxT%s' % width)))
        posn = ('%s,%s' % ((endrow - 1), c))
        if (posn in self.matrix):
            self.matrix[posn].styleList.append(('boxB%s' % width))
        else:
            self.addElement(survey_MatrixElement((endrow - 1), c, '', ('boxB%s' % width)))
