diff options
author | Matthias Seidel <mseidel@apache.org> | 2019-01-31 12:21:22 +0000 |
---|---|---|
committer | Matthias Seidel <mseidel@apache.org> | 2019-01-31 12:21:22 +0000 |
commit | 11b218c9be3de2694b442d462a072baacf27b396 (patch) | |
tree | 99a4aef69b1dcbffd24cb89274a56c8f101c5083 /accessibility | |
parent | ae736f657b9372ad164e3ebb652df9ac6f19f0f2 (diff) |
Removed whitespace, fixed branding in comments (OOo -> AOO)
Notes
Notes:
ignore: aoo
Diffstat (limited to 'accessibility')
4 files changed, 63 insertions, 65 deletions
diff --git a/accessibility/java/java_uno_accessbridge/src/main/java/org/openoffice/java/accessibility/AccessibleTextImpl.java b/accessibility/java/java_uno_accessbridge/src/main/java/org/openoffice/java/accessibility/AccessibleTextImpl.java index 979ee54b6a1d..8acf84e65622 100644 --- a/accessibility/java/java_uno_accessbridge/src/main/java/org/openoffice/java/accessibility/AccessibleTextImpl.java +++ b/accessibility/java/java_uno_accessbridge/src/main/java/org/openoffice/java/accessibility/AccessibleTextImpl.java @@ -20,6 +20,7 @@ *************************************************************/ + package org.openoffice.java.accessibility; import com.sun.star.accessibility.*; @@ -147,7 +148,7 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText { /** Returns the string after a given index * * The Java word iterator has a different understanding of what - * a word is than the word iterator used by OOo, so we use the + * a word is than the word iterator used by AOO, so we use the * Java iterators to ensure maximal compatibility with Java. */ public String getAfterIndex(int part, int index) { @@ -346,7 +347,7 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText { StyleConstants.setRightIndent(as, (float) (toPointFactor * AnyConverter.toInt(property.Value))); } - // Set line spacing attribute + // Set line spacing attribute else if (property.Name.equals("ParaLineSpacing")) { LineSpacing ls = null; @@ -362,13 +363,13 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText { (float) (toPointFactor * ls.Height)); } } - // FIXME: Java 1.4 NameAttribute, Orientation, ResolveAttribute - // Set space above attribute + // FIXME: Java 1.4 NameAttribute, Orientation, ResolveAttribute + // Set space above attribute else if (property.Name.equals("ParaTopMargin")) { StyleConstants.setSpaceAbove(as, (float) (toPointFactor * AnyConverter.toInt(property.Value))); } - // Set space below attribute + // Set space below attribute else if (property.Name.equals("ParaBottomMargin")) { StyleConstants.setSpaceBelow(as, (float) (toPointFactor * AnyConverter.toInt(property.Value))); @@ -439,7 +440,7 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText { System.err.println("*** ERROR *** " + e.getClass().getName() + " caught for property " + property.Name + ": " + e.getMessage()); - System.err.println(" value is of type " + + System.err.println(" value is of type " + property.Value.getClass().getName()); } } @@ -494,7 +495,7 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText { /** Returns the string before a given index * * The Java word iterator has a different understanding of what - * a word is than the word iterator used by OOo, so we use the + * a word is than the word iterator used by AOO, so we use the * Java iterators to ensure maximal compatibility with Java. */ public java.lang.String getBeforeIndex(int part, int index) { @@ -572,7 +573,7 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText { /** Returns the string at a given index * * The Java word iterator has a different understanding of what - * a word is than the word iterator used by OOo, so we use the + * a word is than the word iterator used by AOO, so we use the * Java iterators to ensure maximal compatibility with Java. */ public java.lang.String getAtIndex(int part, int index) { diff --git a/accessibility/java/java_uno_accessbridge/src/main/java/org/openoffice/java/accessibility/Component.java b/accessibility/java/java_uno_accessbridge/src/main/java/org/openoffice/java/accessibility/Component.java index 4255399270ad..85c3915db099 100644 --- a/accessibility/java/java_uno_accessbridge/src/main/java/org/openoffice/java/accessibility/Component.java +++ b/accessibility/java/java_uno_accessbridge/src/main/java/org/openoffice/java/accessibility/Component.java @@ -46,7 +46,7 @@ public abstract class Component extends java.awt.Component { unoAccessibleComponent = (XAccessibleComponent) UnoRuntime.queryInterface(XAccessibleComponent.class, xAccessibleContext); // Add the event listener right away, because the global focus notification doesn't - // work yet .. + // work yet... XAccessibleEventBroadcaster broadcaster = (XAccessibleEventBroadcaster) UnoRuntime.queryInterface(XAccessibleEventBroadcaster.class, unoAccessibleComponent); @@ -59,8 +59,8 @@ public abstract class Component extends java.awt.Component { * Determines whether this <code>Component</code> is showing on screen. * This means that the component must be visible, and it must be in a * <code>container</code> that is visible and showing. - * @see #addNotify - * @see #removeNotify + * @see #addNotify + * @see #removeNotify * @since JDK1.0 */ public boolean isShowing() { @@ -76,8 +76,8 @@ public abstract class Component extends java.awt.Component { * native screen resource. * This method is called internally by the toolkit and should * not be called directly by programs. - * @see #isDisplayable - * @see #removeNotify + * @see #isDisplayable + * @see #removeNotify * @since JDK1.0 */ public void addNotify() { @@ -88,15 +88,15 @@ public abstract class Component extends java.awt.Component { * screen resource. * This method is called by the toolkit internally and should * not be called directly by programs. - * @see #isDisplayable - * @see #addNotify + * @see #isDisplayable + * @see #addNotify * @since JDK1.0 */ public void removeNotify() { } /* - * Fake the java focus handling. This is necessary to keep OOo focus + * Fake the java focus handling. This is necessary to keep AOO focus * in sync with the java focus. See java.awt.DefaultKeyboardFocusManager * for implementation details. **/ @@ -181,10 +181,10 @@ public abstract class Component extends java.awt.Component { protected void fireStatePropertyChange(AccessibleState state, boolean set) { PropertyChangeBroadcaster broadcaster; -// if (Build.DEBUG) { -// System.err.println("[" + AccessibleRoleAdapter.getAccessibleRole(unoAccessibleContext.getAccessibleRole()) + "] " + -// unoAccessibleContext.getAccessibleName() + " is " + (set ? "now " : "no longer ") + state); -// } +// if (Build.DEBUG) { +// System.err.println("[" + AccessibleRoleAdapter.getAccessibleRole(unoAccessibleContext.getAccessibleRole()) + "] " + +// unoAccessibleContext.getAccessibleName() + " is " + (set ? "now " : "no longer ") + state); +// } if (set) { broadcaster = new PropertyChangeBroadcaster( @@ -220,7 +220,7 @@ public abstract class Component extends java.awt.Component { case AccessibleStateType.ENABLED: setEnabled(enable); // Since we can't access awt.Componet.accessibleContext, we need to fire - // this event manually .. + // this event manually... fireStatePropertyChange(AccessibleState.ENABLED, enable); break; case AccessibleStateType.FOCUSED: @@ -236,7 +236,7 @@ public abstract class Component extends java.awt.Component { fireStatePropertyChange(AccessibleState.SELECTED, enable); break; case AccessibleStateType.SENSITIVE: - // This state equals ENABLED in OOo (but not in Gtk+) and does not exist in Java 1.5 + // This state equals ENABLED in AOO (but not in Gtk+) and does not exist in Java 1.5 break; case AccessibleStateType.SHOWING: // fireStatePropertyChange(AccessibleState.SHOWING, enable); @@ -257,7 +257,7 @@ public abstract class Component extends java.awt.Component { try { // This causes the property change event to be fired in the VCL thread // context. If this causes problems, it has to be deligated to the java - // dispatch thread .. + // dispatch thread... if (accessibleContext != null) { accessibleContext.setAccessibleName(AnyConverter.toString(any)); } @@ -270,7 +270,7 @@ public abstract class Component extends java.awt.Component { try { // This causes the property change event to be fired in the VCL thread // context. If this causes problems, it has to be deligated to the java - // dispatch thread .. + // dispatch thread... if (accessibleContext != null) { accessibleContext.setAccessibleDescription(AnyConverter.toString(any)); } @@ -378,7 +378,7 @@ public abstract class Component extends java.awt.Component { AccessibleContext ac = createAccessibleContext(); if (ac != null) { // Set accessible name and description here to avoid - // unnecessary property change events later .. + // unnecessary property change events later... ac.setAccessibleName(unoAccessibleContext.getAccessibleName()); ac.setAccessibleDescription(unoAccessibleContext.getAccessibleDescription()); accessibleContext = ac; @@ -396,25 +396,25 @@ public abstract class Component extends java.awt.Component { /** * Fire PropertyChange listener, if one is registered, - * when shown/hidden.. + * when shown/hidden... */ protected class AccessibleComponentHandler implements java.awt.event.ComponentListener { - public void componentHidden(java.awt.event.ComponentEvent e) { + public void componentHidden(java.awt.event.ComponentEvent e) { AccessibleUNOComponent.this.firePropertyChange( AccessibleContext.ACCESSIBLE_STATE_PROPERTY, AccessibleState.VISIBLE, null); } - public void componentShown(java.awt.event.ComponentEvent e) { + public void componentShown(java.awt.event.ComponentEvent e) { AccessibleUNOComponent.this.firePropertyChange( AccessibleContext.ACCESSIBLE_STATE_PROPERTY, null, AccessibleState.VISIBLE); } - public void componentMoved(java.awt.event.ComponentEvent e) { + public void componentMoved(java.awt.event.ComponentEvent e) { } - public void componentResized(java.awt.event.ComponentEvent e) { + public void componentResized(java.awt.event.ComponentEvent e) { } } // inner class AccessibleComponentHandler @@ -448,7 +448,7 @@ public abstract class Component extends java.awt.Component { /** * Add a PropertyChangeListener to the listener list. * - * @param listener The PropertyChangeListener to be added + * @param listener The PropertyChangeListener to be added */ public void addPropertyChangeListener(java.beans.PropertyChangeListener listener) { if (propertyChangeListenerCount++ == 0) { @@ -466,7 +466,7 @@ public abstract class Component extends java.awt.Component { * This removes a PropertyChangeListener that was registered * for all properties. * - * @param listener The PropertyChangeListener to be removed + * @param listener The PropertyChangeListener to be removed */ public void removePropertyChangeListener(java.beans.PropertyChangeListener listener) { if (--propertyChangeListenerCount == 0) { @@ -483,7 +483,7 @@ public abstract class Component extends java.awt.Component { * Gets the current state set of this object. * * @return an instance of <code>AccessibleStateSet</code> - * containing the current state set of the object + * containing the current state set of the object * @see AccessibleState */ public javax.accessibility.AccessibleStateSet getAccessibleStateSet() { @@ -595,9 +595,9 @@ public abstract class Component extends java.awt.Component { public java.awt.Point getLocationOnScreen() { try { com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocationOnScreen(); -// if (Build.DEBUG) { -// System.err.println("Returning location on screen( " + unoPoint.X + ", " + unoPoint.Y + " )" ); -// } +// if (Build.DEBUG) { +// System.err.println("Returning location on screen( " + unoPoint.X + ", " + unoPoint.Y + " )" ); +// } return new java.awt.Point(unoPoint.X, unoPoint.Y); } catch (com.sun.star.uno.RuntimeException e) { return null; @@ -733,4 +733,3 @@ public abstract class Component extends java.awt.Component { return UnoRuntime.generateOid(unoAccessible); } } - diff --git a/accessibility/java/java_uno_accessbridge/src/main/java/org/openoffice/java/accessibility/Container.java b/accessibility/java/java_uno_accessbridge/src/main/java/org/openoffice/java/accessibility/Container.java index 97ca3288917d..37214e5e034e 100644 --- a/accessibility/java/java_uno_accessbridge/src/main/java/org/openoffice/java/accessibility/Container.java +++ b/accessibility/java/java_uno_accessbridge/src/main/java/org/openoffice/java/accessibility/Container.java @@ -49,7 +49,7 @@ public class Container extends java.awt.Container implements javax.accessibility xAccessibleContext); // Add the event listener right away, because the global focus notification doesn't - // work yet .. + // work yet... XAccessibleEventBroadcaster broadcaster = (XAccessibleEventBroadcaster) UnoRuntime.queryInterface(XAccessibleEventBroadcaster.class, unoAccessibleContext); @@ -62,8 +62,8 @@ public class Container extends java.awt.Container implements javax.accessibility * Determines whether this <code>Container</code> is showing on screen. * This means that the component must be visible, and it must be in a * <code>container</code> that is visible and showing. - * @see #addNotify - * @see #removeNotify + * @see #addNotify + * @see #removeNotify * @since JDK1.0 */ public boolean isShowing() { @@ -79,8 +79,8 @@ public class Container extends java.awt.Container implements javax.accessibility * native screen resource. * This method is called internally by the toolkit and should * not be called directly by programs. - * @see #isDisplayable - * @see #removeNotify + * @see #isDisplayable + * @see #removeNotify * @since JDK1.0 */ public void addNotify() { @@ -91,15 +91,15 @@ public class Container extends java.awt.Container implements javax.accessibility * screen resource. * This method is called by the toolkit internally and should * not be called directly by programs. - * @see #isDisplayable - * @see #addNotify + * @see #isDisplayable + * @see #addNotify * @since JDK1.0 */ public void removeNotify() { } /* - * Fake the java focus handling. This is necessary to keep OOo focus + * Fake the java focus handling. This is necessary to keep AOO focus * in sync with the java focus. See java.awt.DefaultKeyboardFocusManager * for implementation details. **/ @@ -161,7 +161,7 @@ public class Container extends java.awt.Container implements javax.accessibility } public void run() { - // Because this code is executed in the DispatchThread, it is better tocatch every + // Because this code is executed in the DispatchThread, it is better to catch every // exception that might occur try { AccessibleContext ac = Container.this.accessibleContext; @@ -215,7 +215,7 @@ public class Container extends java.awt.Container implements javax.accessibility case AccessibleStateType.ENABLED: setEnabled(enable); // Since we can't access awt.Componet.accessibleContext, we need to fire - // this event manually .. + // this event manually... fireStatePropertyChange(AccessibleState.ENABLED, enable); break; case AccessibleStateType.FOCUSED: @@ -228,7 +228,7 @@ public class Container extends java.awt.Container implements javax.accessibility fireStatePropertyChange(AccessibleState.SELECTED, enable); break; case AccessibleStateType.SENSITIVE: - // This state equals ENABLED in OOo (but not in Gtk+) and does not exist in Java 1.5 + // This state equals ENABLED in AOO (but not in Gtk+) and does not exist in Java 1.5 break; case AccessibleStateType.SHOWING: case AccessibleStateType.VISIBLE: @@ -245,8 +245,8 @@ public class Container extends java.awt.Container implements javax.accessibility protected void handleNameChangedEvent(Object any) { try { // This causes the property change event to be fired in the VCL thread - // context. If this causes problems, it has to be deligated to the java - // dispatch thread .. + // context. If this causes problems, it has to be delegated to the java + // dispatch thread... if (accessibleContext != null) { accessibleContext.setAccessibleName(AnyConverter.toString(any)); } @@ -258,8 +258,8 @@ public class Container extends java.awt.Container implements javax.accessibility protected void handleDescriptionChangedEvent(Object any) { try { // This causes the property change event to be fired in the VCL thread - // context. If this causes problems, it has to be deligated to the java - // dispatch thread .. + // context. If this causes problems, it has to be delegated to the java + // dispatch thread... if (accessibleContext != null) { accessibleContext.setAccessibleDescription(AnyConverter.toString(any)); } @@ -282,7 +282,7 @@ public class Container extends java.awt.Container implements javax.accessibility } /* This event is only necessary because some objects in the office don't know their parent - * and are therefor unable to revoke and re-insert themselves. + * and are therefor unable to revoke and re-insert themselves. */ protected void handleAllChildrenChangedEvent() { javax.accessibility.Accessible parent = (javax.accessibility.Accessible) getParent(); @@ -389,7 +389,7 @@ public class Container extends java.awt.Container implements javax.accessibility AccessibleContext ac = createAccessibleContext(); if (ac != null) { // Set accessible name and description here to avoid - // unnecessary property change events later .. + // unnecessary property change events later... ac.setAccessibleName(unoAccessibleContext.getAccessibleName()); ac.setAccessibleDescription(unoAccessibleContext.getAccessibleDescription()); accessibleContext = ac; @@ -421,25 +421,25 @@ public class Container extends java.awt.Container implements javax.accessibility /** * Fire PropertyChange listener, if one is registered, - * when shown/hidden.. + * when shown/hidden... */ protected class AccessibleComponentHandler implements java.awt.event.ComponentListener { - public void componentHidden(java.awt.event.ComponentEvent e) { + public void componentHidden(java.awt.event.ComponentEvent e) { AccessibleContainer.this.firePropertyChange( AccessibleContext.ACCESSIBLE_STATE_PROPERTY, AccessibleState.VISIBLE, null); } - public void componentShown(java.awt.event.ComponentEvent e) { + public void componentShown(java.awt.event.ComponentEvent e) { AccessibleContainer.this.firePropertyChange( AccessibleContext.ACCESSIBLE_STATE_PROPERTY, null, AccessibleState.VISIBLE); } - public void componentMoved(java.awt.event.ComponentEvent e) { + public void componentMoved(java.awt.event.ComponentEvent e) { } - public void componentResized(java.awt.event.ComponentEvent e) { + public void componentResized(java.awt.event.ComponentEvent e) { } } // inner class AccessibleContainerHandler @@ -499,7 +499,7 @@ public class Container extends java.awt.Container implements javax.accessibility /** * Add a PropertyChangeListener to the listener list. * - * @param listener The PropertyChangeListener to be added + * @param listener The PropertyChangeListener to be added */ public void addPropertyChangeListener(java.beans.PropertyChangeListener listener) { if (propertyChangeListenerCount++ == 0) { @@ -520,7 +520,7 @@ public class Container extends java.awt.Container implements javax.accessibility * This removes a PropertyChangeListener that was registered * for all properties. * - * @param listener The PropertyChangeListener to be removed + * @param listener The PropertyChangeListener to be removed */ public void removePropertyChangeListener(java.beans.PropertyChangeListener listener) { if (--propertyChangeListenerCount == 0) { @@ -554,7 +554,7 @@ public class Container extends java.awt.Container implements javax.accessibility * Gets the current state set of this object. * * @return an instance of <code>AccessibleStateSet</code> - * containing the current state set of the object + * containing the current state set of the object * @see AccessibleState */ public javax.accessibility.AccessibleStateSet getAccessibleStateSet() { @@ -756,4 +756,3 @@ public class Container extends java.awt.Container implements javax.accessibility return UnoRuntime.generateOid(unoAccessible); } } - diff --git a/accessibility/java/java_uno_accessbridge/src/main/java/org/openoffice/java/accessibility/Paragraph.java b/accessibility/java/java_uno_accessbridge/src/main/java/org/openoffice/java/accessibility/Paragraph.java index c10a012762fa..6bdd48f10094 100644 --- a/accessibility/java/java_uno_accessbridge/src/main/java/org/openoffice/java/accessibility/Paragraph.java +++ b/accessibility/java/java_uno_accessbridge/src/main/java/org/openoffice/java/accessibility/Paragraph.java @@ -68,7 +68,7 @@ public class Paragraph extends Container implements javax.accessibility.Accessib if (at != null) { int pos = at.getCaretPosition(); // Simulating a caret event here should help at tools - // that re not aware of the paragraph approach of OOo. + // that re not aware of the paragraph approach of AOO. firePropertyChange(ac.ACCESSIBLE_CARET_PROPERTY, new Integer(-1), new Integer(pos)); } @@ -215,4 +215,3 @@ public class Paragraph extends Container implements javax.accessibility.Accessib } } } - |