FIx minor bugs from impress
This commit is contained in:
@@ -267,19 +267,17 @@ def check_left_panel(accessibility_tree):
|
||||
root = ET.fromstring(accessibility_tree)
|
||||
|
||||
for root_pane in root.iter('root-pane'):
|
||||
for split_pane in root_pane.iter('split-pane'):
|
||||
for panel in split_pane.iter('panel'):
|
||||
for scroll_panel in panel.iter('scroll-pane'):
|
||||
for document_frame in scroll_panel.iter('document-frame'):
|
||||
# Get the left panel
|
||||
panel_name = document_frame.get("name")
|
||||
# visible = scroll_bar.attrib.get(f"{{{namespaces['st']}}}visible")
|
||||
if panel_name == "Slides View":
|
||||
# Left panel is open
|
||||
return 1.0
|
||||
for panel in root_pane.iter('panel'):
|
||||
for split_pane in panel.iter('split-pane'):
|
||||
# Get the left panel
|
||||
if split_pane.attrib.get("{{{}}}parentcoord".format(namespaces['cp'])) == "(0, 0)":
|
||||
# Get the visible attribute
|
||||
visible = split_pane.attrib.get("{{{}}}visible".format(namespaces['st']))
|
||||
if visible:
|
||||
# decide if it is left panel
|
||||
return 1.
|
||||
|
||||
# Left panel is not open
|
||||
return 0.0
|
||||
return 0.
|
||||
|
||||
|
||||
def check_transition(pptx_file, rules):
|
||||
|
||||
Reference in New Issue
Block a user