Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't disable table navigation commands for layout tables if the user has explicitly chosen to have layout tables reported. #7464

Merged
merged 6 commits into from Aug 2, 2017
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