[Libreoffice-commits] core.git: accessibility/bridge
Niklas Johansson
sleeping.pillow at gmail.com
Sun Sep 1 12:38:46 PDT 2013
accessibility/bridge/org/openoffice/java/accessibility/AccessibleEditableTextImpl.java | 9 ++-------
accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java | 8 +++-----
2 files changed, 5 insertions(+), 12 deletions(-)
New commits:
commit 277b339371727134851da1b695d9d8d30889a961
Author: Niklas Johansson <sleeping.pillow at gmail.com>
Date: Sun Aug 25 18:29:59 2013 +0200
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 at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleEditableTextImpl.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleEditableTextImpl.java
index c7202bc..8dd7e36 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 c22eebe0..92c10de 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")) {
More information about the Libreoffice-commits
mailing list