Skip to content

Excel: stop freeze when detecting overflow/cropped text#6526

Merged
michaelDCurran merged 3 commits into
masterfrom
i6216
Jan 9, 2017
Merged

Excel: stop freeze when detecting overflow/cropped text#6526
michaelDCurran merged 3 commits into
masterfrom
i6216

Conversation

@michaelDCurran
Copy link
Copy Markdown
Member

@michaelDCurran michaelDCurran commented Oct 31, 2016

Fixes #6216, Fixes #6472

…re row is merged.

Specifically:
* rename _getCellWidthAndTextWidth to _getCellTextWidth and no longer return the cell width.
* In __overlapInfo:  No longer use a for loop to calculate the total column width for a merge area, instead just use the first and last column's left and width to calculate it.
* in __overlapInfo: Fetch coordinates and widths as points rather than units, and use Excel's own pointsToScreenPixelsX, which may solve the DPI issue.
@michaelDCurran
Copy link
Copy Markdown
Member Author

@feerrenrut: A review please. I confirmed this fixes Derek's testcase mentioned on #6216, and @Qchristensen confirms this fixes #6472

Copy link
Copy Markdown
Contributor

@feerrenrut feerrenrut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Comment thread source/NVDAObjects/window/excel.py Outdated
cellWidth = self.excelCellObject.ColumnWidth * xlCellWidthUnitToPixels #Conversion factor to convert the cellwidth to pixels
return (cellWidth,textWidth)
textWidth = StructText.width
return textWidth #ctypes.windll.kernel32.MulDiv(textWidth, 96, dpi)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont understand the comment on the end of this. Was it left there by mistake?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, left there by mistake, I shall remove.

@michaelDCurran michaelDCurran merged commit 87764c5 into master Jan 9, 2017
@nvaccessAuto nvaccessAuto added this to the 2017.1 milestone Jan 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants