[orca] Handle some common variations in values for absent text attributes



commit 54c73250cf15d80f0de1f3cf9f03e0f87c6a65a0
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Thu May 1 21:08:02 2014 -0400

    Handle some common variations in values for absent text attributes

 src/orca/scripts/default.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index c18de06..55cdb08 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -1307,11 +1307,15 @@ class Script(script.Script):
             # Always include size and family-name. For the others, if the
             # value is the default, then ignore it.
             #
+            nullValues = ['0', '0mm', 'none', 'false']
             attributes = {}
             for key in userAttrList:
                 if key in allAttributes:
                     textAttr = allAttributes.get(key)
                     userAttr = userAttrDict.get(key)
+                    if textAttr in nullValues and userAttr in nullValues:
+                        continue
+
                     if textAttr != userAttr or len(userAttr) == 0:
                         attributes[key] = textAttr
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]