Skip to content

Commit

Permalink
textInfos.TextInfo.getPresentationCategory: applications and dialogs …
Browse files Browse the repository at this point in the history
…should not be reported as a marker if they themselves are the root of the content.
  • Loading branch information
michaelDCurran committed Aug 2, 2017
1 parent eda678b commit 86331b3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/textInfos/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,11 @@ def getPresentationCategory(self, ancestors, formatConfig, reason=controlTypes.R
or (role == controlTypes.ROLE_LIST and controlTypes.STATE_READONLY not in states)
):
return self.PRESCAT_SINGLELINE
elif role in (controlTypes.ROLE_SEPARATOR, controlTypes.ROLE_FOOTNOTE, controlTypes.ROLE_ENDNOTE, controlTypes.ROLE_EMBEDDEDOBJECT, controlTypes.ROLE_APPLICATION, controlTypes.ROLE_DIALOG, controlTypes.ROLE_MATH):
elif role in (controlTypes.ROLE_SEPARATOR, controlTypes.ROLE_FOOTNOTE, controlTypes.ROLE_ENDNOTE, controlTypes.ROLE_EMBEDDEDOBJECT, controlTypes.ROLE_MATH):
return self.PRESCAT_MARKER
elif role in (controlTypes.ROLE_APPLICATION, controlTypes.ROLE_DIALOG):
# Applications and dialogs should be reported as markers when embedded within content, but not when they themselves are the root
return self.PRESCAT_MARKER if ancestors else self.PRESCAT_LAYOUT
elif role in (controlTypes.ROLE_TABLECELL, controlTypes.ROLE_TABLECOLUMNHEADER, controlTypes.ROLE_TABLEROWHEADER):
return self.PRESCAT_CELL
elif (
Expand Down

0 comments on commit 86331b3

Please sign in to comment.