OSDN Git Service

Normalise underline and strikethrough attributes for IA2 text.
authorJames Teh <jamie@jantrid.net>
Thu, 4 Aug 2011 23:26:30 +0000 (09:26 +1000)
committerJames Teh <jamie@jantrid.net>
Thu, 4 Aug 2011 23:26:30 +0000 (09:26 +1000)
source/NVDAObjects/IAccessible/__init__.py
user_docs/en/changes.t2t

index 38e28b7..8474f52 100644 (file)
@@ -98,6 +98,14 @@ def normalizeIA2TextFormatField(formatField):
                        formatField['background-color']=colors.RGB.fromString(backgroundColor)\r
                except ValueError:\r
                        pass\r
+       lineStyle=formatField.get("text-underline-style")\r
+       lineType=formatField.get("text-underline-type")\r
+       if lineStyle or lineType:\r
+               formatField["underline"]=lineStyle!="none" and lineType!="none"\r
+       lineStyle=formatField.get("text-line-through-style")\r
+       lineType=formatField.get("text-line-through-type")\r
+       if lineStyle or lineType:\r
+               formatField["strikethrough"]=lineStyle!="none" and lineType!="none"\r
 \r
 class IA2TextTextInfo(textInfos.offsets.OffsetsTextInfo):\r
 \r
index 74715d6..9a4057d 100644 (file)
@@ -8,6 +8,7 @@
 == New Features ==\r
 - In Mozilla Gecko (e.g. Firefox) Heading levels are now announced  when using object navigation.\r
 - Text formatting can now be reported when using browse mode in Mozilla Gecko (e.g. Firefox and Thunderbird). (#394)\r
+- Text with underline and/or strikethrough can now be detected and reported in standard IAccessible2 text controls such as in Mozilla applications.\r
 \r
 \r
 == Bug Fixes ==\r