Kaydet (Commit) 277b3393 authored tarafından Niklas Johansson's avatar Niklas Johansson Kaydeden (comit) Caolán McNamara

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/5739Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 90744561
......@@ -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);
}
......
......@@ -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")) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment