diff options
author | Niklas Johansson <sleeping.pillow@gmail.com> | 2013-08-25 18:29:59 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-09-01 19:38:26 +0000 |
commit | 277b339371727134851da1b695d9d8d30889a961 (patch) | |
tree | 7161ebc80ff126414139d2ecde47034209826174 /accessibility | |
parent | 907445612298aae4f3322a7d9cdc6871d54ba47a (diff) |
fdo#68346 Accessibility bridge should exspose the font name.
At the moment it tells the user if the font is proportional or monospaced.
Change-Id: I5073fed730aab1435fd9cc3bd4a897e95f97e783
Reviewed-on: https://gerrit.libreoffice.org/5739
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'accessibility')
-rw-r--r-- | accessibility/bridge/org/openoffice/java/accessibility/AccessibleEditableTextImpl.java | 9 | ||||
-rw-r--r-- | accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java | 8 |
2 files changed, 5 insertions, 12 deletions
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleEditableTextImpl.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleEditableTextImpl.java index c7202bc5f60e..8dd7e36049d2 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleEditableTextImpl.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleEditableTextImpl.java @@ -166,13 +166,8 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja attribute = as.getAttribute(StyleConstants.FontFamily); if (null != attribute) { com.sun.star.beans.PropertyValue propertyValue = new com.sun.star.beans.PropertyValue(); - propertyValue.Name = "CharFontPitch"; - - if (StyleConstants.getFontFamily(as).equals( "Proportional" )) { - propertyValue.Value = new Short("2"); - } else { - propertyValue.Value = new Short("1"); - } + propertyValue.Name = "CharFontName"; + propertyValue.Value = new String(StyleConstants.getFontFamily(as)); propertyValues.add(propertyValue); } diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java index c22eebe0a0ec..92c10de8432e 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java @@ -36,7 +36,7 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText { final static double toPointFactor = 1 / ((7 / 10) + 34.5); final static String[] attributeList = { "ParaAdjust", "CharBackColor", "CharWeight", "ParaFirstLineIndent", - "CharFontPitch", "CharHeight", "CharColor", "CharPosture", + "CharFontName", "CharHeight", "CharColor", "CharPosture", "ParaLeftMargin", "ParaLineSpacing", "ParaTopMargin", "ParaBottomMargin", "CharStrikeout", "CharEscapement", "ParaTabStops", "CharUnderline" }; @@ -296,10 +296,8 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText { (float) (toPointFactor * AnyConverter.toInt(property.Value))); // Set font family attribute - } else if (property.Name.equals("CharFontPitch")) { - if (AnyConverter.toShort(property.Value) == 2) { - StyleConstants.setFontFamily(as, "Proportional"); - } + } else if (property.Name.equals("CharFontName")) { + StyleConstants.setFontFamily(as, AnyConverter.toString(property.Value)); // Set font size attribute } else if (property.Name.equals("CharHeight")) { |