Skip to content

Commit

Permalink
Still enable table navigation for layout tables if the user has confi…
Browse files Browse the repository at this point in the history
…gured layout tables to be reported.
  • Loading branch information
michaelDCurran committed Aug 2, 2017
1 parent f8ba66f commit 99ef8a8
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions source/browseMode.py
Expand Up @@ -1557,13 +1557,14 @@ def _getTableCellCoords(self, info):
info = info.copy()
info.expand(textInfos.UNIT_CHARACTER)
fields=list(info.getTextWithFields())
# First record the ID of all layout tables so that we can skip them when searching for the deepest table
# If layout tables should not be reported, we should First record the ID of all layout tables so that we can skip them when searching for the deepest table
layoutIDs=set()
for field in fields:
if isinstance(field, textInfos.FieldCommand) and field.command == "controlStart" and field.field.get('table-layout'):
tableID=field.field.get('table-id')
if tableID is not None:
layoutIDs.add(tableID)
if not config.conf["documentFormatting"]["includeLayoutTables"]:
for field in fields:
if isinstance(field, textInfos.FieldCommand) and field.command == "controlStart" and field.field.get('table-layout'):
tableID=field.field.get('table-id')
if tableID is not None:
layoutIDs.add(tableID)
for field in reversed(fields):
if not (isinstance(field, textInfos.FieldCommand) and field.command == "controlStart"):
# Not a control field.
Expand Down

0 comments on commit 99ef8a8

Please sign in to comment.