Skip to content

Commit

Permalink
incubates #6889
Browse files Browse the repository at this point in the history
Fixes #6889 and #3044
Merge branch 'i6889-fixExcelMergedCellRegression' into next
  • Loading branch information
feerrenrut committed Feb 20, 2017
2 parents 02d8767 + 46a5676 commit f60d783
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions source/NVDAObjects/window/excel.py
Original file line number Diff line number Diff line change
Expand Up @@ -988,10 +988,18 @@ def _getFormatFieldAndOffsets(self,offset,formatConfig,calculateOffsets=True):
except COMError:
pass
if formatConfig["reportBorderStyle"]:
if self.obj.excelCellObject.mergeCells:
cellObj=self.obj.excelCellObject.mergeArea.DisplayFormat
borders = None
hasMergedCells = self.obj.excelCellObject.mergeCells
if hasMergedCells:
mergeArea = self.obj.excelCellObject.mergeArea
try:
borders = mergeArea.DisplayFormat.borders # for later versions of office
except COMError:
borders = mergeArea.borders # for office 2007
else:
borders = cellObj.borders
try:
formatField['border-style']=getCellBorderStyleDescription(cellObj.borders,reportBorderColor=formatConfig['reportBorderColor'])
formatField['border-style']=getCellBorderStyleDescription(borders,reportBorderColor=formatConfig['reportBorderColor'])
except COMError:
pass
return formatField,(self._startOffset,self._endOffset)
Expand Down

0 comments on commit f60d783

Please sign in to comment.