Fix an error in impress
This commit is contained in:
@@ -190,8 +190,7 @@ def compare_pptx_files(file1_path, file2_path, **options):
|
|||||||
if run1.font.underline != run2.font.underline and examine_font_underline:
|
if run1.font.underline != run2.font.underline and examine_font_underline:
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
if ('strike' in run1.font._element.attrib) != (
|
if run1.font._element.attrib.get('strike', 'noStrike') != run2.font._element.attrib.get('strike', 'noStrike') and examine_strike_through:
|
||||||
'strike' in run2.font._element.attrib) and examine_strike_through:
|
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
# fixme: Actually there are more properties to be compared, but we cannot get them through pptx
|
# fixme: Actually there are more properties to be compared, but we cannot get them through pptx
|
||||||
@@ -373,4 +372,5 @@ def check_page_number_colors(pptx_file, rules):
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
print(evaluate_presentation_fill_to_rgb_distance(r"C:\Users\tianbaox\Desktop\DesktopEnv\cache\3b27600c-3668-4abd-8f84-7bcdebbccbdb\lec17-gui-events.pptx", {"rgb": (0, 0, 255)}))
|
print(compare_pptx_files(r"C:\Users\tianbaox\Desktop\DesktopEnv\cache\550ce7e7-747b-495f-b122-acdc4d0b8e54\New_Club_Spring_2018_Training_Gold.pptx", r"C:\Users\tianbaox\Desktop\DesktopEnv\cache\550ce7e7-747b-495f-b122-acdc4d0b8e54\New_Club_Spring_2018_Training_Gold.pptx"))
|
||||||
|
# print(evaluate_presentation_fill_to_rgb_distance(r"C:\Users\tianbaox\Desktop\DesktopEnv\cache\3b27600c-3668-4abd-8f84-7bcdebbccbdb\lec17-gui-events.pptx", {"rgb": (0, 0, 255)}))
|
||||||
Reference in New Issue
Block a user