diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-08-23 15:06:53 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-08-23 15:06:53 +0200 |
commit | 6e4894c2019dc9c442dce738d3f0423d8d74973f (patch) | |
tree | e3734a287f4c02ecb120e54aa32141f95f484236 /accessibility | |
parent | b84e1626f6fcb29fe784933dee51079c3447a50c (diff) |
recreated tag libreoffice-3.3.3.1 which had these commits:
commit d7e53cee633ec1c583c72e6d9c01122195c4383c (tag: refs/tags/libreoffice-3.3.3.1)
Author: Petr Mladek <pmladek@suse.cz>
Date: Tue May 31 17:39:04 2011 +0200
Version 3.3.3.1, tag libreoffice-3.3.3.1 (3.3.3-rc1)
Notes
split repo tag: components_libreoffice-3.3.3.1
split repo tag: components_libreoffice-3.3.4.1
Diffstat (limited to 'accessibility')
232 files changed, 2652 insertions, 2652 deletions
diff --git a/accessibility/bridge/org/openoffice/accessibility/AccessBridge.java b/accessibility/bridge/org/openoffice/accessibility/AccessBridge.java index 454cd15154d4..a5b230cd73cf 100755 --- a/accessibility/bridge/org/openoffice/accessibility/AccessBridge.java +++ b/accessibility/bridge/org/openoffice/accessibility/AccessBridge.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -50,13 +50,13 @@ import javax.accessibility.Accessible; public class AccessBridge { - // + // protected static java.util.Hashtable topWindowMap = new java.util.Hashtable(); private static java.awt.Window getTopWindowImpl(XAccessible xAccessible) { - // Because it can not be garantied that - // WindowsAccessBridgeAdapter.registerTopWindow() is called - // before windowOpened(), we have to make this operation + // Because it can not be garantied that + // WindowsAccessBridgeAdapter.registerTopWindow() is called + // before windowOpened(), we have to make this operation // atomic. synchronized (topWindowMap) { String oid = UnoRuntime.generateOid(xAccessible); @@ -85,13 +85,13 @@ public class AccessBridge { case AccessibleRole.ROOT_PANE: case AccessibleRole.POPUP_MENU: return getTopWindow(xAccessibleContext.getAccessibleParent()); - + case AccessibleRole.WINDOW: case AccessibleRole.FRAME: case AccessibleRole.DIALOG: case AccessibleRole.ALERT: return getTopWindowImpl(xAccessible); - + default: break; } @@ -112,12 +112,12 @@ public class AccessBridge { case AccessibleRole.ROOT_PANE: case AccessibleRole.POPUP_MENU: return removeTopWindow(xAccessibleContext.getAccessibleParent()); - + case AccessibleRole.WINDOW: case AccessibleRole.FRAME: case AccessibleRole.DIALOG: return (java.awt.Window) topWindowMap.remove(UnoRuntime.generateOid(xAccessible)); - + default: break; } @@ -171,7 +171,7 @@ public class AccessBridge { unoToolkit.addTopWindowListener(this); String os = (String) System.getProperty("os.name"); - + // Try to initialize the WindowsAccessBridgeAdapter if (os.startsWith("Windows")) { WindowsAccessBridgeAdapter.attach(xComponentContext); @@ -224,17 +224,17 @@ public class AccessBridge { public void disposing(com.sun.star.lang.EventObject event) { } - + /* * XComponent */ - + public void addEventListener(com.sun.star.lang.XEventListener listener) { } - + public void removeEventListener(com.sun.star.lang.XEventListener listener) { } - + public void dispose() { try { java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue().invokeAndWait( diff --git a/accessibility/bridge/org/openoffice/accessibility/KeyHandler.java b/accessibility/bridge/org/openoffice/accessibility/KeyHandler.java index 1e9f2f6520ae..655399c65273 100755 --- a/accessibility/bridge/org/openoffice/accessibility/KeyHandler.java +++ b/accessibility/bridge/org/openoffice/accessibility/KeyHandler.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -39,7 +39,7 @@ import javax.accessibility.*; public class KeyHandler extends Component implements XKeyHandler, java.awt.KeyEventDispatcher { EventQueue eventQueue; - + public class VCLKeyEvent extends KeyEvent implements Runnable { boolean consumed = true; @@ -59,13 +59,13 @@ public class KeyHandler extends Component implements XKeyHandler, java.awt.KeyEv return consumed; } } - + public KeyHandler() { eventQueue = Toolkit.getDefaultToolkit().getSystemEventQueue(); java.awt.KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(this); } - - /** This method is called by the current KeyboardFocusManager requesting that this KeyEventDispatcher + + /** This method is called by the current KeyboardFocusManager requesting that this KeyEventDispatcher * dispatch the specified event on its behalf */ public boolean dispatchKeyEvent(java.awt.event.KeyEvent e) { @@ -73,34 +73,34 @@ public class KeyHandler extends Component implements XKeyHandler, java.awt.KeyEv VCLKeyEvent event = (VCLKeyEvent) e; event.setConsumed(false); return true; - } + } return false; } - + /** Handler for KeyPressed events */ public boolean keyPressed(com.sun.star.awt.KeyEvent event) { // try { - VCLKeyEvent vke = new VCLKeyEvent(this, KeyEvent.KEY_PRESSED, - AccessibleKeyBinding.convertModifiers(event.Modifiers), + VCLKeyEvent vke = new VCLKeyEvent(this, KeyEvent.KEY_PRESSED, + AccessibleKeyBinding.convertModifiers(event.Modifiers), AccessibleKeyBinding.convertKeyCode(event.KeyCode), event.KeyChar != 0 ? event.KeyChar : KeyEvent.CHAR_UNDEFINED); - + eventQueue.postEvent(vke); - - // VCL events for TABs have empty KeyChar + + // VCL events for TABs have empty KeyChar if (event.KeyCode == com.sun.star.awt.Key.TAB ) { event.KeyChar = '\t'; } // Synthesize KEY_TYPED event to emulate Java behavior if (event.KeyChar != 0) { - eventQueue.postEvent(new VCLKeyEvent(this, - KeyEvent.KEY_TYPED, - AccessibleKeyBinding.convertModifiers(event.Modifiers), - KeyEvent.VK_UNDEFINED, + eventQueue.postEvent(new VCLKeyEvent(this, + KeyEvent.KEY_TYPED, + AccessibleKeyBinding.convertModifiers(event.Modifiers), + KeyEvent.VK_UNDEFINED, event.KeyChar)); } - + // Wait until the key event is processed return false; // eventQueue.invokeAndWait(vke); @@ -111,16 +111,16 @@ public class KeyHandler extends Component implements XKeyHandler, java.awt.KeyEv // return false; // } } - + /** Handler for KeyReleased events */ public boolean keyReleased(com.sun.star.awt.KeyEvent event) { // try { - VCLKeyEvent vke = new VCLKeyEvent(this, KeyEvent.KEY_RELEASED, + VCLKeyEvent vke = new VCLKeyEvent(this, KeyEvent.KEY_RELEASED, AccessibleKeyBinding.convertModifiers(event.Modifiers), - AccessibleKeyBinding.convertKeyCode(event.KeyCode), + AccessibleKeyBinding.convertKeyCode(event.KeyCode), event.KeyChar != 0 ? event.KeyChar : KeyEvent.CHAR_UNDEFINED); eventQueue.postEvent(vke); - + // Wait until the key event is processed return false; // eventQueue.invokeAndWait(vke); @@ -131,7 +131,7 @@ public class KeyHandler extends Component implements XKeyHandler, java.awt.KeyEv // return false; // } } - + public void disposing(com.sun.star.lang.EventObject event) { java.awt.KeyboardFocusManager.getCurrentKeyboardFocusManager().removeKeyEventDispatcher(this); } diff --git a/accessibility/bridge/org/openoffice/accessibility/PopupWindow.java b/accessibility/bridge/org/openoffice/accessibility/PopupWindow.java index a63b0589b4fa..291fd8c097d9 100644 --- a/accessibility/bridge/org/openoffice/accessibility/PopupWindow.java +++ b/accessibility/bridge/org/openoffice/accessibility/PopupWindow.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/bridge/org/openoffice/accessibility/WindowsAccessBridgeAdapter.java b/accessibility/bridge/org/openoffice/accessibility/WindowsAccessBridgeAdapter.java index 28e58940867d..299c5cc831ae 100644 --- a/accessibility/bridge/org/openoffice/accessibility/WindowsAccessBridgeAdapter.java +++ b/accessibility/bridge/org/openoffice/accessibility/WindowsAccessBridgeAdapter.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -49,7 +49,7 @@ public class WindowsAccessBridgeAdapter { protected static native boolean createMapping(long jvmaccess); - // On Windows all native frames must be registered to the access bridge. + // On Windows all native frames must be registered to the access bridge. // Therefor the bridge exports two methods that we try to find here. protected static void attach(XComponentContext xComponentContext) { try { @@ -65,7 +65,7 @@ public class WindowsAccessBridgeAdapter { revokeVirtualFrame = bridge.getMethod("revokeVirtualFrame", parameterTypes); - // load the native dll + // load the native dll System.loadLibrary("java_uno_accessbridge"); Object any = xComponentContext.getValueByName( @@ -124,7 +124,7 @@ public class WindowsAccessBridgeAdapter { protected static boolean isAttached() { return frameMap != null; } - + protected static Accessible getAccessibleWrapper(XAccessible xAccessible) { Accessible a = null; @@ -156,7 +156,7 @@ public class WindowsAccessBridgeAdapter { case AccessibleRole.TOOL_TIP: a = PopupWindow.create(xAccessible); break; - + default: a = (Accessible) AccessBridge.getTopWindow(xAccessible); break; @@ -232,7 +232,7 @@ public class WindowsAccessBridgeAdapter { e.getMessage()); } } - + if (a instanceof PopupWindow) { PopupWindow toolTipWindow = (PopupWindow) a; toolTipWindow.removeAll(); @@ -249,7 +249,7 @@ public class WindowsAccessBridgeAdapter { PopupMenuProxy(AccessibleContext ac) { menu = ac; menuComponent = menu.getAccessibleComponent(); - + /** calculate the bounding rectangle by iterating over the * the children. */ @@ -263,11 +263,11 @@ public class WindowsAccessBridgeAdapter { if (childAC != null) { AccessibleComponent comp = ac.getAccessibleComponent(); - + if (comp != null) { java.awt.Point p = comp.getLocationOnScreen(); java.awt.Dimension d = comp.getSize(); - + if (p != null && d != null) { if (p.x < x) { x = p.x; @@ -286,7 +286,7 @@ public class WindowsAccessBridgeAdapter { } } } - + width = x2 - x; height = y2 - y; } @@ -454,8 +454,8 @@ public class WindowsAccessBridgeAdapter { // Not supported by UNO accessibility API } - /** Returns the Accessible child, if one exists, contained at the local - * coordinate Point + /** Returns the Accessible child, if one exists, contained at the local + * coordinate Point */ public javax.accessibility.Accessible getAccessibleAt(java.awt.Point p) { java.awt.Point p2 = menuComponent.getLocationOnScreen(); @@ -471,7 +471,7 @@ public class WindowsAccessBridgeAdapter { menuComponent.requestFocus(); } } - + protected static class ListProxy extends AccessibleContext implements Accessible, AccessibleComponent { AccessibleContext list; @@ -601,7 +601,7 @@ public class WindowsAccessBridgeAdapter { } /** Gets the location of this component in the form of a point specifying - * the component's top-left corner + * the component's top-left corner */ public java.awt.Point getLocation() { // This object represents a toplevel object, so getLocation() should @@ -636,8 +636,8 @@ public class WindowsAccessBridgeAdapter { // Not supported by UNO accessibility API } - /** Returns the Accessible child, if one exists, contained at the local - * coordinate Point + /** Returns the Accessible child, if one exists, contained at the local + * coordinate Point */ public javax.accessibility.Accessible getAccessibleAt(java.awt.Point p) { return listComponent.getAccessibleAt(p); diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AbstractButton.java b/accessibility/bridge/org/openoffice/java/accessibility/AbstractButton.java index be7b72df8732..1540ba8f745f 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/AbstractButton.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/AbstractButton.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -32,41 +32,41 @@ import javax.accessibility.AccessibleState; import com.sun.star.uno.*; import com.sun.star.accessibility.*; -/** +/** */ public abstract class AbstractButton extends Component { - + protected AbstractButton(XAccessible xAccessible, XAccessibleContext xAccessibleContext) { super(xAccessible, xAccessibleContext); } - - protected abstract class AccessibleAbstractButton extends AccessibleUNOComponent + + protected abstract class AccessibleAbstractButton extends AccessibleUNOComponent implements javax.accessibility.AccessibleAction { - + /** * Though the class is abstract, this should be called by all sub-classes */ protected AccessibleAbstractButton() { super(); } - + /* * AccessibleContext */ - + /** Gets the AccessibleAction associated with this object that supports one or more actions */ public javax.accessibility.AccessibleAction getAccessibleAction() { return this; } - + /** Gets the AccessibleText associated with this object presenting text on the display */ public javax.accessibility.AccessibleText getAccessibleText() { - + if (disposed) return null; - + try { - XAccessibleText unoAccessibleText = (XAccessibleText) + XAccessibleText unoAccessibleText = (XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class,unoAccessibleComponent); if (unoAccessibleText != null) { return new AccessibleTextImpl(unoAccessibleText); @@ -77,7 +77,7 @@ public abstract class AbstractButton extends Component { return null; } } - + /** Returns the relation set of this object */ public javax.accessibility.AccessibleRelationSet getAccessibleRelationSet() { try { @@ -123,7 +123,7 @@ public abstract class AbstractButton extends Component { /* * AccessibleAction */ - + /** Performs the specified Action on the object */ public boolean doAccessibleAction(int param) { if (param == 0) { @@ -146,7 +146,7 @@ public abstract class AbstractButton extends Component { XAccessibleContext xAccessibleContext = unoAccessibleContext; if (xAccessibleContext != null) { // Query for XAccessibleAction interface - XAccessibleAction xAccessibleAction = (XAccessibleAction) + XAccessibleAction xAccessibleAction = (XAccessibleAction) UnoRuntime.queryInterface(XAccessibleAction.class, xAccessibleContext); if (xAccessibleAction != null) { @@ -158,15 +158,15 @@ public abstract class AbstractButton extends Component { } } } - + return false; } - + /** Returns a description of the specified action of the object */ public java.lang.String getAccessibleActionDescription(int param) { - return javax.swing.UIManager.getString("AbstractButton.clickText"); + return javax.swing.UIManager.getString("AbstractButton.clickText"); } - + /** Returns the number of accessible actions available in this object */ public int getAccessibleActionCount() { return 1; diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleActionImpl.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleActionImpl.java index e4905752d833..ec250f68ac3b 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleActionImpl.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleActionImpl.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -33,14 +33,14 @@ import com.sun.star.accessibility.XAccessibleAction; * to the corresponding methods of the UNO XAccessibleAction interface. */ public class AccessibleActionImpl implements javax.accessibility.AccessibleAction { - + protected XAccessibleAction unoObject; - + /** Creates new AccessibleActionWrapper */ public AccessibleActionImpl(XAccessibleAction xAccessibleAction) { unoObject = xAccessibleAction; } - + public boolean doAccessibleAction(int param) { try { return unoObject.doAccessibleAction(param); @@ -50,7 +50,7 @@ public class AccessibleActionImpl implements javax.accessibility.AccessibleActio return false; } } - + public java.lang.String getAccessibleActionDescription(int param) { try { return unoObject.getAccessibleActionDescription(param); @@ -60,7 +60,7 @@ public class AccessibleActionImpl implements javax.accessibility.AccessibleActio return null; } } - + public int getAccessibleActionCount() { try { return unoObject.getAccessibleActionCount(); diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleComponentImpl.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleComponentImpl.java index 5bac982756a2..93df646e87a1 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleComponentImpl.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleComponentImpl.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,20 +34,20 @@ import com.sun.star.accessibility.XAccessibleComponent; import com.sun.star.uno.UnoRuntime; public class AccessibleComponentImpl implements javax.accessibility.AccessibleComponent { - + protected XAccessibleComponent unoObject; // protected XAccessibleExtendedComponent unoAccessibleExtendedComponent = null; - + /** Creates new AccessibleComponentImpl */ public AccessibleComponentImpl(XAccessibleComponent xAccessibleComponent) { unoObject = xAccessibleComponent; } - + protected boolean hasState(short state) { try { - XAccessibleContext unoAccessibleContext = (XAccessibleContext) + XAccessibleContext unoAccessibleContext = (XAccessibleContext) UnoRuntime.queryInterface(XAccessibleContext.class, unoObject); - // All UNO accessibility implementations must support XAccessibleContext + // All UNO accessibility implementations must support XAccessibleContext // and return a valid XAccessibleStateSet .. return unoAccessibleContext.getAccessibleStateSet().contains(state); } catch (com.sun.star.uno.RuntimeException e) { @@ -57,11 +57,11 @@ public class AccessibleComponentImpl implements javax.accessibility.AccessibleCo return false; } } - + /* * XAccessibleComponent */ - + /** Returns the background color of the object */ public java.awt.Color getBackground() { try { @@ -70,11 +70,11 @@ public class AccessibleComponentImpl implements javax.accessibility.AccessibleCo return null; } } - + public void setBackground(java.awt.Color c) { // Not supported by UNO accessibility API } - + /** Returns the foreground color of the object */ public java.awt.Color getForeground() { try { @@ -83,141 +83,141 @@ public class AccessibleComponentImpl implements javax.accessibility.AccessibleCo return null; } } - + public void setForeground(java.awt.Color c) { // Not supported by UNO accessibility API } - + public java.awt.Cursor getCursor() { // Not supported by UNO accessibility API return null; } - + public void setCursor(java.awt.Cursor cursor) { // Not supported by UNO accessibility API } - + public java.awt.Font getFont() { // FIXME return null; } - + public void setFont(java.awt.Font f) { // Not supported by UNO accessibility API } - + public java.awt.FontMetrics getFontMetrics(java.awt.Font f) { // FIXME return null; } - + public boolean isEnabled() { return hasState(AccessibleStateType.ENABLED); } - + public void setEnabled(boolean b) { // Not supported by UNO accessibility API } - + public boolean isVisible() { return hasState(AccessibleStateType.VISIBLE); } - + public void setVisible(boolean b) { // Not supported by UNO accessibility API } - + public boolean isShowing() { return hasState(AccessibleStateType.SHOWING); } - + public boolean contains(java.awt.Point p) { try { - return unoObject.containsPoint(new com.sun.star.awt.Point(p.x, p.y)); + return unoObject.containsPoint(new com.sun.star.awt.Point(p.x, p.y)); } catch (com.sun.star.uno.RuntimeException e) { return false; } } - + /** Returns the location of the object on the screen. */ public java.awt.Point getLocationOnScreen() { try { - com.sun.star.awt.Point unoPoint = unoObject.getLocationOnScreen(); + com.sun.star.awt.Point unoPoint = unoObject.getLocationOnScreen(); return new java.awt.Point(unoPoint.X, unoPoint.Y); } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Gets the location of this component in the form of a point specifying the component's top-left corner */ public java.awt.Point getLocation() { try { - com.sun.star.awt.Point unoPoint = unoObject.getLocation(); + com.sun.star.awt.Point unoPoint = unoObject.getLocation(); return new java.awt.Point( unoPoint.X, unoPoint.Y ); } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Moves this component to a new location */ public void setLocation(java.awt.Point p) { // Not supported by UNO accessibility API } - + /** Gets the bounds of this component in the form of a Rectangle object */ public java.awt.Rectangle getBounds() { try { - com.sun.star.awt.Rectangle unoRect = unoObject.getBounds(); + com.sun.star.awt.Rectangle unoRect = unoObject.getBounds(); return new java.awt.Rectangle(unoRect.X, unoRect.Y, unoRect.Width, unoRect.Height); } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Moves and resizes this component to conform to the new bounding rectangle r */ public void setBounds(java.awt.Rectangle r) { // Not supported by UNO accessibility API } - + /** Returns the size of this component in the form of a Dimension object */ public java.awt.Dimension getSize() { try { - com.sun.star.awt.Size unoSize = unoObject.getSize(); + com.sun.star.awt.Size unoSize = unoObject.getSize(); return new java.awt.Dimension(unoSize.Width, unoSize.Height); } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Resizes this component so that it has width d.width and height d.height */ public void setSize(java.awt.Dimension d) { // Not supported by UNO accessibility API } - + public javax.accessibility.Accessible getAccessibleAt(java.awt.Point p) { // Not supported by this implementation return null; } - + public boolean isFocusTraversable() { return hasState(AccessibleStateType.FOCUSABLE); } - + public void requestFocus() { unoObject.grabFocus(); } - + /** * Adds the specified focus listener to receive focus events from * this component when this component gains input focus. * If listener <code>l</code> is <code>null</code>, * no exception is thrown and no action is performed. */ - + public void addFocusListener(java.awt.event.FocusListener l) { // Not supported by this implementation } - + /** * Removes the specified focus listener so that it no longer * receives focus events from this component. This method performs @@ -226,7 +226,7 @@ public class AccessibleComponentImpl implements javax.accessibility.AccessibleCo * If listener <code>l</code> is <code>null</code>, * no exception is thrown and no action is performed. */ - + public void removeFocusListener(java.awt.event.FocusListener l) { // Not supported by this implementation } diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleEditableTextImpl.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleEditableTextImpl.java index 4863b560ef71..6749aaad5519 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleEditableTextImpl.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleEditableTextImpl.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -41,12 +41,12 @@ import javax.swing.text.StyleConstants; */ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements javax.accessibility.AccessibleEditableText { final static double toPointFactor = 1 / (7/10 + 34.5); - + /** Creates new GenericAccessibleEditableText object */ public AccessibleEditableTextImpl(XAccessibleEditableText xAccessibleEditableText) { super(xAccessibleEditableText); } - + /** Cuts the text between two indices into the system clipboard */ public void cut(int startIndex, int endIndex) { try { @@ -55,7 +55,7 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja } catch (com.sun.star.uno.RuntimeException e) { } } - + /** Deletes the text between two indices */ public void delete(int startIndex, int endIndex) { try { @@ -64,7 +64,7 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja } catch (com.sun.star.uno.RuntimeException e) { } } - + /** Returns the text range between two indices */ public String getTextRange(int startIndex, int endIndex) { try { @@ -74,7 +74,7 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja } return null; } - + /** Inserts the specified string at the given index */ public void insertTextAtIndex(int index, String s){ try { @@ -83,7 +83,7 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja } catch (com.sun.star.uno.RuntimeException e) { } } - + /** Pastes the text form the system clipboard into the text starting at the specified index */ public void paste(int startIndex) { try { @@ -92,35 +92,35 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja } catch (com.sun.star.uno.RuntimeException e) { } } - + /** Replaces the text between two indices with the specified string */ public void replaceText(int startIndex, int endIndex, String s) { try { ((XAccessibleEditableText) unoObject).replaceText(startIndex, endIndex, s); } catch (com.sun.star.lang.IndexOutOfBoundsException e) { } catch (com.sun.star.uno.RuntimeException e) { - } + } } - + /** Selects the text between two indices */ public void selectText(int startIndex, int endIndex) { try { unoObject.setSelection(startIndex, endIndex); } catch (com.sun.star.lang.IndexOutOfBoundsException e) { } catch (com.sun.star.uno.RuntimeException e) { - } + } } - + /** Sets the attributes for the text between two indices */ public void setAttributes(int startIndex, int endIndex, javax.swing.text.AttributeSet as) { java.util.Vector propertyValues = new java.util.Vector(); - + // Convert Alignment attribute Object attribute = as.getAttribute(StyleConstants.Alignment); if (null != attribute) { com.sun.star.beans.PropertyValue propertyValue = new com.sun.star.beans.PropertyValue(); propertyValue.Name = "ParaAdjust"; - + switch (StyleConstants.getAlignment(as)) { case StyleConstants.ALIGN_RIGHT: propertyValue.Value = ParagraphAdjust.RIGHT; @@ -137,7 +137,7 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja } propertyValues.add(propertyValue); } - + // Convert Background attribute attribute = as.getAttribute(StyleConstants.Background); if (null != attribute) { @@ -146,9 +146,9 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja propertyValue.Value = new Integer(StyleConstants.getBackground(as).getRGB()); propertyValues.add(propertyValue); } - + // FIXME: BidiLevel - + // Set Bold attribute attribute = as.getAttribute(StyleConstants.Bold); if (null != attribute) { @@ -161,9 +161,9 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja } propertyValues.add(propertyValue); } - + // FIXME: Java 1.4 ComponentAttribute, ComponentElementName, ComposedTextAttribute - + // Set FirstLineIndent attribute attribute = as.getAttribute(StyleConstants.FirstLineIndent); if (null != attribute) { @@ -172,13 +172,13 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja propertyValue.Value = new Double(StyleConstants.getFirstLineIndent(as) / toPointFactor); propertyValues.add(propertyValue); } - + // Set font family attribute 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 { @@ -186,7 +186,7 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja } propertyValues.add(propertyValue); } - + // Set font size attribute attribute = as.getAttribute(StyleConstants.FontSize); if (null != attribute) { @@ -195,7 +195,7 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja propertyValue.Value = new Integer(StyleConstants.getFontSize(as)); propertyValues.add(propertyValue); } - + // Map foreground color attribute = as.getAttribute(StyleConstants.Foreground); if (null != attribute) { @@ -204,15 +204,15 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja propertyValue.Value = new Integer (StyleConstants.getForeground(as).getRGB()); propertyValues.add(propertyValue); } - + // FIXME: IconAttribute, IconElementName - + // Set italic attribute attribute = as.getAttribute(StyleConstants.Italic); if (null != attribute) { com.sun.star.beans.PropertyValue propertyValue = new com.sun.star.beans.PropertyValue(); propertyValue.Name = "CharPosture"; - + if (StyleConstants.isItalic(as)) { propertyValue.Value = FontSlant.ITALIC; } else { @@ -220,7 +220,7 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja } propertyValues.add(propertyValue); } - + // Set left indent attribute attribute = as.getAttribute(StyleConstants.LeftIndent); if (null != attribute) { @@ -229,7 +229,7 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja propertyValue.Value = new Integer(new Double(StyleConstants.getLeftIndent(as) / toPointFactor).intValue()); propertyValues.add(propertyValue); } - + // Set right indent attribute attribute = as.getAttribute(StyleConstants.RightIndent); if (null != attribute) { @@ -238,7 +238,7 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja propertyValue.Value = new Integer(new Double(StyleConstants.getRightIndent(as) / toPointFactor).intValue()); propertyValues.add(propertyValue); } - + // Set line spacing attribute attribute = as.getAttribute(StyleConstants.LineSpacing); if (null != attribute) { @@ -247,9 +247,9 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja propertyValue.Value = new Integer(new Double(StyleConstants.getLineSpacing(as) / toPointFactor).intValue()); propertyValues.add(propertyValue); } - - // FIXME: Java 1.4 NameAttribute, Orientation, ResolveAttribute - + + // FIXME: Java 1.4 NameAttribute, Orientation, ResolveAttribute + // Set space above attribute attribute = as.getAttribute(StyleConstants.SpaceAbove); if (null != attribute) { @@ -258,7 +258,7 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja propertyValue.Value = new Integer(new Double( StyleConstants.getSpaceAbove(as) / toPointFactor).intValue()); propertyValues.add(propertyValue); } - + // Set space below attribute attribute = as.getAttribute(StyleConstants.SpaceBelow); if (null != attribute) { @@ -267,7 +267,7 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja propertyValue.Value = new Integer(new Double(StyleConstants.getSpaceBelow(as) / toPointFactor).intValue()); propertyValues.add(propertyValue); } - + // Set strike through attribute attribute = as.getAttribute(StyleConstants.StrikeThrough); if (null != attribute) { @@ -280,7 +280,7 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja } propertyValues.add(propertyValue); } - + // Set sub-/superscript attribute attribute = as.getAttribute(StyleConstants.Superscript); if (null == attribute) { @@ -289,7 +289,7 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja if (null != attribute) { com.sun.star.beans.PropertyValue propertyValue = new com.sun.star.beans.PropertyValue(); propertyValue.Name = "CharEscapement"; - + if (StyleConstants.isSuperscript(as)) { propertyValue.Value = new Short( "1" ); } else if (StyleConstants.isSubscript(as)) { @@ -299,49 +299,49 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja } propertyValues.add(propertyValue); } - + // Set tabset attribute attribute = as.getAttribute(StyleConstants.TabSet); if (null != attribute) { com.sun.star.beans.PropertyValue propertyValue = new com.sun.star.beans.PropertyValue(); propertyValue.Name = "ParaTabStops"; - + javax.swing.text.TabSet tabSet = StyleConstants.getTabSet(as); - java.util.ArrayList tabStops = new java.util.ArrayList(tabSet.getTabCount()); - + java.util.ArrayList tabStops = new java.util.ArrayList(tabSet.getTabCount()); + for (int i = 0, max = tabSet.getTabCount(); i < max; i++) { javax.swing.text.TabStop tab = tabSet.getTab(i); com.sun.star.style.TabStop unoTab = new com.sun.star.style.TabStop(); - + unoTab.Position = new Double(tab.getPosition() / toPointFactor).intValue(); - + switch (tab.getAlignment()) { - case javax.swing.text.TabStop.ALIGN_CENTER: + case javax.swing.text.TabStop.ALIGN_CENTER: unoTab.Alignment = TabAlign.CENTER; break; - case javax.swing.text.TabStop.ALIGN_RIGHT: + case javax.swing.text.TabStop.ALIGN_RIGHT: unoTab.Alignment = TabAlign.RIGHT; break; - case javax.swing.text.TabStop.ALIGN_DECIMAL: + case javax.swing.text.TabStop.ALIGN_DECIMAL: unoTab.Alignment = TabAlign.DECIMAL; break; - default: + default: unoTab.Alignment = TabAlign.LEFT; break; } - + tabStops.add(unoTab); } propertyValue.Value = (com.sun.star.style.TabStop[]) tabStops.toArray(); propertyValues.add(propertyValue); } - + // Set underline attribute attribute = as.getAttribute(StyleConstants.Underline); if (null != attribute) { com.sun.star.beans.PropertyValue propertyValue = new com.sun.star.beans.PropertyValue(); propertyValue.Name = "CharUnderline"; - + if (StyleConstants.isUnderline(as)) { propertyValue.Value = new Short(FontUnderline.SINGLE); } else { @@ -349,14 +349,14 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja } propertyValues.add(propertyValue); } - + try { ((XAccessibleEditableText) unoObject).setAttributes(startIndex, endIndex, (com.sun.star.beans.PropertyValue[]) propertyValues.toArray()); } catch (com.sun.star.lang.IndexOutOfBoundsException e) { } catch (com.sun.star.uno.RuntimeException e) { } } - + /** Sets the text contents to the specified string */ public void setTextContents(String s) { try { diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleExtendedState.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleExtendedState.java index 3d4500d322df..a6eb653ef470 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleExtendedState.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleExtendedState.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -35,10 +35,10 @@ public class AccessibleExtendedState extends AccessibleState { public static final AccessibleState MANAGES_DESCENDANTS; public static final AccessibleState SENSITIVE; public static final AccessibleState STALE; - + static { DEFUNCT = new AccessibleExtendedState("defunct"); - + // JAVA 1.5: will come with manages_descendants and indeterminate INDETERMINATE = new AccessibleExtendedState("indeterminate"); MANAGES_DESCENDANTS = new AccessibleExtendedState("managesDescendants"); @@ -46,7 +46,7 @@ public class AccessibleExtendedState extends AccessibleState { SENSITIVE = new AccessibleExtendedState("sensitive"); STALE = new AccessibleExtendedState("stale"); } - + protected AccessibleExtendedState(String key) { super(key); } diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleHypertextImpl.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleHypertextImpl.java index 1bb3bc5961ad..3927f78de86b 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleHypertextImpl.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleHypertextImpl.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -33,19 +33,19 @@ import com.sun.star.accessibility.*; import com.sun.star.uno.*; /** The AccessibleHypertextImpl mapps all calls to the java AccessibleHypertext - * interface to the corresponding methods of the UNO XAccessibleHypertext + * interface to the corresponding methods of the UNO XAccessibleHypertext * interface. */ -public class AccessibleHypertextImpl extends AccessibleTextImpl +public class AccessibleHypertextImpl extends AccessibleTextImpl implements javax.accessibility.AccessibleHypertext { protected class Hyperlink extends javax.accessibility.AccessibleHyperlink { protected XAccessibleHyperlink unoObject; - + public Hyperlink(XAccessibleHyperlink xHyperlink) { unoObject = xHyperlink; } - + public int getStartIndex() { try { System.err.println("StartIndex: " + unoObject.getStartIndex()); @@ -54,7 +54,7 @@ public class AccessibleHypertextImpl extends AccessibleTextImpl return -1; } } - + public Object getAccessibleActionObject(int param) { System.err.println("getActionObject"); try { @@ -73,7 +73,7 @@ public class AccessibleHypertextImpl extends AccessibleTextImpl return null; } - + public int getEndIndex() { try { System.err.println("StartIndex: " + unoObject.getEndIndex()); @@ -82,7 +82,7 @@ public class AccessibleHypertextImpl extends AccessibleTextImpl return -1; } } - + public Object getAccessibleActionAnchor(int param) { System.err.println("getActionAnchor"); try { @@ -97,11 +97,11 @@ public class AccessibleHypertextImpl extends AccessibleTextImpl } return null; } - + public boolean isValid() { return unoObject.isValid(); } - + public boolean doAccessibleAction(int param) { try { return unoObject.doAccessibleAction(param); @@ -111,7 +111,7 @@ public class AccessibleHypertextImpl extends AccessibleTextImpl return false; } } - + public String getAccessibleActionDescription(int param) { try { return unoObject.getAccessibleActionDescription(param); @@ -119,7 +119,7 @@ public class AccessibleHypertextImpl extends AccessibleTextImpl return null; } } - + public int getAccessibleActionCount() { try { return unoObject.getAccessibleActionCount(); @@ -128,7 +128,7 @@ public class AccessibleHypertextImpl extends AccessibleTextImpl } } } - + /** Creates new AccessibleHypertextImpl */ public AccessibleHypertextImpl(XAccessibleHypertext xAccessibleHypertext) { if (Build.PRODUCT) { @@ -142,16 +142,16 @@ public class AccessibleHypertextImpl extends AccessibleTextImpl } } } - + public static javax.accessibility.AccessibleText get(com.sun.star.uno.XInterface unoObject) { try { XAccessibleHypertext unoAccessibleHypertext = (XAccessibleHypertext) UnoRuntime.queryInterface(XAccessibleHypertext.class, unoObject); if (unoAccessibleHypertext != null) { return new AccessibleHypertextImpl(unoAccessibleHypertext); - } - - XAccessibleText unoAccessibleText = (XAccessibleText) + } + + XAccessibleText unoAccessibleText = (XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class, unoObject); if (unoAccessibleText != null) { return new AccessibleTextImpl(unoAccessibleText); @@ -170,7 +170,7 @@ public class AccessibleHypertextImpl extends AccessibleTextImpl throw new IndexOutOfBoundsException(exception.getMessage()); } } - + public int getLinkCount() { try { return ((XAccessibleHypertext) unoObject).getHyperLinkCount(); @@ -178,7 +178,7 @@ public class AccessibleHypertextImpl extends AccessibleTextImpl return 0; } } - + public int getLinkIndex(int param) { try { return ((XAccessibleHypertext) unoObject).getHyperLinkIndex(param); diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleIconImpl.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleIconImpl.java index ba41534f245b..c79fbae89b68 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleIconImpl.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleIconImpl.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -29,16 +29,16 @@ package org.openoffice.java.accessibility; import com.sun.star.accessibility.XAccessibleImage; -/** +/** */ public class AccessibleIconImpl implements javax.accessibility.AccessibleIcon { - + XAccessibleImage unoAccessibleImage; - + public AccessibleIconImpl(XAccessibleImage xImage) { unoAccessibleImage = xImage; } - + /** Gets the description of the icon */ public String getAccessibleIconDescription() { try { @@ -47,7 +47,7 @@ public class AccessibleIconImpl implements javax.accessibility.AccessibleIcon { return null; } } - + /** Gets the height of the icon */ public int getAccessibleIconHeight() { try { @@ -56,7 +56,7 @@ public class AccessibleIconImpl implements javax.accessibility.AccessibleIcon { return 0; } } - + /** Gets the width of the icon */ public int getAccessibleIconWidth() { try { @@ -65,7 +65,7 @@ public class AccessibleIconImpl implements javax.accessibility.AccessibleIcon { return 0; } } - + /** Sets the description of the icon */ public void setAccessibleIconDescription(String s) { // Not supported diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleKeyBinding.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleKeyBinding.java index 1eb3201c5d68..fc58e6b384e4 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleKeyBinding.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleKeyBinding.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -30,27 +30,27 @@ package org.openoffice.java.accessibility; import com.sun.star.accessibility.*; import com.sun.star.awt.KeyStroke; -/** - * +/** + * */ -public class AccessibleKeyBinding extends Object implements javax.accessibility.AccessibleKeyBinding { - +public class AccessibleKeyBinding extends Object implements javax.accessibility.AccessibleKeyBinding { + XAccessibleKeyBinding unoAccessibleKeybinding; - + public AccessibleKeyBinding(XAccessibleKeyBinding unoKB) { unoAccessibleKeybinding = unoKB; } - + public static int convertModifiers(short s) { int modifiers = 0; if ((s & com.sun.star.awt.KeyModifier.SHIFT) != 0) { modifiers = modifiers | java.awt.event.KeyEvent.SHIFT_DOWN_MASK; } - + if ((s & com.sun.star.awt.KeyModifier.MOD1) != 0) { modifiers = modifiers | java.awt.event.KeyEvent.CTRL_DOWN_MASK; } - + if ((s & com.sun.star.awt.KeyModifier.MOD2) != 0) { modifiers = modifiers | java.awt.event.KeyEvent.ALT_DOWN_MASK; } @@ -61,10 +61,10 @@ public class AccessibleKeyBinding extends Object implements javax.accessibility. return modifiers; } - + public static int convertKeyCode(short s) { int keycode = java.awt.event.KeyEvent.VK_UNDEFINED; - + switch(s) { case com.sun.star.awt.Key.NUM0: keycode = java.awt.event.KeyEvent.VK_0; @@ -344,11 +344,11 @@ public class AccessibleKeyBinding extends Object implements javax.accessibility. } return keycode; } - + /* * AccessibleKeyBinding */ - + /** Returns a key binding for this object */ public Object getAccessibleKeyBinding(int i) { try { @@ -362,19 +362,19 @@ public class AccessibleKeyBinding extends Object implements javax.accessibility. data[j] = null; } } - + if (keys.length == 1) { return data[0]; } else { return data; - } + } } catch (com.sun.star.lang.IndexOutOfBoundsException e) { return null; } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Returns the number of key bindings for this object */ public int getAccessibleKeyBindingCount() { try { diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleObjectFactory.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleObjectFactory.java index 129a3b820993..aa227692a813 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleObjectFactory.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleObjectFactory.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -40,25 +40,25 @@ import org.openoffice.java.accessibility.logging.XAccessibleEventLog; public class AccessibleObjectFactory { // This type is needed for conversions from/to uno Any public static final Type XAccessibleType = new Type(XAccessible.class); - + private static java.util.Hashtable objectList = new java.util.Hashtable(); private static java.awt.FocusTraversalPolicy focusTraversalPolicy = new FocusTraversalPolicy(); - + private static java.awt.EventQueue theEventQueue = java.awt.Toolkit.getDefaultToolkit(). getSystemEventQueue(); - + public static java.awt.EventQueue getEventQueue() { return theEventQueue; } - + public static void postFocusGained(java.awt.Component c) { getEventQueue().postEvent(new java.awt.event.FocusEvent(c, java.awt.event.FocusEvent.FOCUS_GAINED)); } - + public static void postWindowGainedFocus(java.awt.Window w) { postWindowEvent(w, java.awt.event.WindowEvent.WINDOW_GAINED_FOCUS); } - + public static void postWindowLostFocus(java.awt.Window w) { postWindowEvent(w, java.awt.event.WindowEvent.WINDOW_LOST_FOCUS); } @@ -70,15 +70,15 @@ public class AccessibleObjectFactory { public static void postWindowDeactivated(java.awt.Window w) { postWindowEvent(w, java.awt.event.WindowEvent.WINDOW_DEACTIVATED); } - + public static void postWindowOpened(java.awt.Window w) { postWindowEvent(w, java.awt.event.WindowEvent.WINDOW_OPENED); } - + public static void postWindowClosed(java.awt.Window w) { postWindowEvent(w, java.awt.event.WindowEvent.WINDOW_CLOSED); } - + public static void invokeAndWait() { try { theEventQueue.invokeAndWait( new java.lang.Runnable () { @@ -89,17 +89,17 @@ public class AccessibleObjectFactory { } catch (java.lang.InterruptedException e) { } } - + private static void postWindowEvent(java.awt.Window w, int i) { theEventQueue.postEvent(new java.awt.event.WindowEvent(w, i)); } - + public static java.awt.Component getAccessibleComponent(XAccessible xAccessible) { java.awt.Component c = null; if (xAccessible != null) { // Retrieve unique id for the original UNO object to be used as a hash key String oid = UnoRuntime.generateOid(xAccessible); - + // Check if we already have a wrapper object for this context synchronized (objectList) { WeakReference r = (WeakReference) objectList.get(oid); @@ -118,7 +118,7 @@ public class AccessibleObjectFactory { System.err.println(e.getClass().getName() + " caught: " + e.getMessage()); } } - + public static void addChild(java.awt.Container parent, XAccessible child) { try { if (child != null) { @@ -127,19 +127,19 @@ public class AccessibleObjectFactory { XAccessibleStateSet stateSet = childAC.getAccessibleStateSet(); if (stateSet != null) { java.awt.Component c = getAccessibleComponent(child); - + // Re-use existing wrapper if possible, create a new one otherwise if (c != null) { // Seems to be already in child list if (parent.equals(c.getParent())) return; - // Update general component states + // Update general component states c.setEnabled(stateSet.contains(AccessibleStateType.ENABLED)); c.setVisible(stateSet.contains(AccessibleStateType.VISIBLE)); } else { c = createAccessibleComponentImpl(child, childAC, stateSet); } - + if (c != null) { if (c instanceof java.awt.Container) { populateContainer((java.awt.Container) c, childAC); @@ -163,7 +163,7 @@ public class AccessibleObjectFactory { try { XAccessible xAccessible = (XAccessible) AnyConverter.toObject(XAccessibleType, any); java.awt.Component c = getAccessibleComponent(xAccessible); - + if (c != null) { parent.remove(c); @@ -176,8 +176,8 @@ public class AccessibleObjectFactory { } } - - /** + + /** * Removes all children from the container parent */ @@ -189,11 +189,11 @@ public class AccessibleObjectFactory { if (c instanceof java.awt.Container) { clearContainer((java.awt.Container) c); } - } - parent.removeAll(); + } + parent.removeAll(); } - - + + /** * Populates the given Container parent with wrapper objects for all children of parentAC. This method is * intended to be called when a container is added using a CHILDREN_CHANGED event. @@ -212,7 +212,7 @@ public class AccessibleObjectFactory { } } } - + /** * Populates the given Container parent with wrapper objects for all children of parentAC. This method is * intended to be called when a new window has been opened. @@ -237,17 +237,17 @@ public class AccessibleObjectFactory { } } } - + catch (java.lang.Exception e) { System.err.println(e.getClass().getName() + " caught: " + e.getMessage()); e.printStackTrace(); } } } - + protected static java.awt.Component createAccessibleComponent(XAccessible xAccessible) { try { - XAccessibleContext xAccessibleContext = xAccessible.getAccessibleContext(); + XAccessibleContext xAccessibleContext = xAccessible.getAccessibleContext(); if (xAccessibleContext != null) { return createAccessibleComponentImpl(xAccessible, xAccessibleContext, xAccessibleContext.getAccessibleStateSet()); } @@ -257,8 +257,8 @@ public class AccessibleObjectFactory { } return null; } - - protected static java.awt.Component createAccessibleComponent(XAccessible xAccessible, XAccessibleContext xAccessibleContext, + + protected static java.awt.Component createAccessibleComponent(XAccessible xAccessible, XAccessibleContext xAccessibleContext, java.awt.Window frame) { if (xAccessibleContext != null) { try { @@ -269,7 +269,7 @@ public class AccessibleObjectFactory { if (xAccessibleStateSet.contains(AccessibleStateType.FOCUSED)) { if (frame instanceof NativeFrame) { ((NativeFrame) frame).setInitialComponent(c); - } + } } return c; } @@ -280,8 +280,8 @@ public class AccessibleObjectFactory { } return null; } - - protected static java.awt.Component createAccessibleComponentImpl(XAccessible xAccessible, XAccessibleContext xAccessibleContext, + + protected static java.awt.Component createAccessibleComponentImpl(XAccessible xAccessible, XAccessibleContext xAccessibleContext, XAccessibleStateSet xAccessibleStateSet) { java.awt.Component c = null; short role = xAccessibleContext.getAccessibleRole(); @@ -411,7 +411,7 @@ public class AccessibleObjectFactory { case AccessibleRole.COLUMN_HEADER: case AccessibleRole.TABLE: if (xAccessibleStateSet.contains(AccessibleStateType.MANAGES_DESCENDANTS)) { - c = new Table(xAccessible, xAccessibleContext, + c = new Table(xAccessible, xAccessibleContext, xAccessibleStateSet.contains(AccessibleStateType.MULTI_SELECTABLE)); } else { c = new Container(javax.accessibility.AccessibleRole.TABLE, @@ -464,20 +464,20 @@ public class AccessibleObjectFactory { // System.out.println("Object cache now contains " + objectList.size() + " objects."); } } - + AccessibleStateAdapter.setComponentState(c, xAccessibleStateSet); - + if (! Build.PRODUCT) { String property = System.getProperty("AccessBridgeLogging"); if ((property != null) && (property.indexOf("event") != -1)) { XAccessibleEventLog.addEventListener(xAccessibleContext, c); - } + } } } - + return c; } - + protected static void disposing(java.awt.Component c) { if (c != null) { synchronized (objectList) { @@ -488,29 +488,29 @@ public class AccessibleObjectFactory { public static java.awt.Window getTopWindow(XAccessible xAccessible) { XAccessibleContext xAccessibleContext = xAccessible.getAccessibleContext(); - + if (xAccessibleContext != null) { short role = xAccessibleContext.getAccessibleRole(); XAccessibleStateSet xAccessibleStateSet = xAccessibleContext.getAccessibleStateSet(); - XAccessibleComponent xAccessibleComponent = (XAccessibleComponent) + XAccessibleComponent xAccessibleComponent = (XAccessibleComponent) UnoRuntime.queryInterface(XAccessibleComponent.class, xAccessibleContext); java.awt.Window w; if (role == AccessibleRole.DIALOG) { - w = new Dialog(new Application(), - xAccessibleContext.getAccessibleName(), + w = new Dialog(new Application(), + xAccessibleContext.getAccessibleName(), xAccessibleStateSet.contains(AccessibleStateType.MODAL), xAccessibleComponent); } else if (role == AccessibleRole.ALERT) { - w = new Alert(new Application(), - xAccessibleContext.getAccessibleName(), + w = new Alert(new Application(), + xAccessibleContext.getAccessibleName(), xAccessibleStateSet.contains(AccessibleStateType.MODAL), xAccessibleComponent); } else if (role == AccessibleRole.FRAME) { - w = new Frame(xAccessibleContext.getAccessibleName(), + w = new Frame(xAccessibleContext.getAccessibleName(), xAccessibleComponent); } else if (role == AccessibleRole.WINDOW) { - java.awt.Window activeWindow = + java.awt.Window activeWindow = java.awt.KeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow(); if (activeWindow != null) { w = new Window(activeWindow, xAccessibleComponent); @@ -529,7 +529,7 @@ public class AccessibleObjectFactory { populateContainer(w, xAccessibleContext, w); w.setFocusTraversalPolicy(focusTraversalPolicy); w.setVisible(true); - + // Make the new window the focused one if it has an initialy focused object set. java.awt.Component c = ((NativeFrame) w).getInitialComponent(); if (c != null) { @@ -537,7 +537,7 @@ public class AccessibleObjectFactory { } return w; } - + return null; } } diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleRelationAdapter.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleRelationAdapter.java index 2f1709acac45..18f3638eebe4 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleRelationAdapter.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleRelationAdapter.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -31,11 +31,11 @@ import javax.accessibility.Accessible; import com.sun.star.accessibility.AccessibleRelation; import com.sun.star.accessibility.XAccessible; -/** +/** */ public abstract class AccessibleRelationTypeMap { - - final static String[] data = { + + final static String[] data = { null, javax.accessibility.AccessibleRelation.CONTROLLED_BY, javax.accessibility.AccessibleRelation.CONTROLLED_BY, @@ -48,14 +48,14 @@ public abstract class AccessibleRelationTypeMap { javax.accessibility.AccessibleRelation.MEMBER_OF, javax.accessibility.AccessibleRelation.MEMBER_OF }; - + public static void fillAccessibleRelationSet(javax.accessibility.AccessibleRelationSet s, AccessibleRelation[] relations) { AccessibleObjectFactory factory = AccessibleObjectFactory.getDefault(); for(int i=0; i<relations.length; i++) { if( relations[i].RelationType < data.length && data[relations[i].RelationType] != null ) { - javax.accessibility.AccessibleRelation r = + javax.accessibility.AccessibleRelation r = new javax.accessibility.AccessibleRelation(data[relations[i].RelationType]); - + r.setTarget(factory.getAccessibleObjectSet(relations[i].TargetSet)); s.add(r); } diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleRoleAdapter.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleRoleAdapter.java index c7f630fdd3ab..468b641c937e 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleRoleAdapter.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleRoleAdapter.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -33,20 +33,20 @@ import com.sun.star.accessibility.XAccessibleContext; /** This class maps the AccessibleRole(s) of the UNO accessibility API * to the corresponding javax.accessibility objects. */ -public abstract class AccessibleRoleAdapter { - +public abstract class AccessibleRoleAdapter { + /* This array is used as a mapping between the UNO AccessibleRole * and the AccessibleRole objects of the Java accessibility API. */ - public static final javax.accessibility.AccessibleRole[] data = { + public static final javax.accessibility.AccessibleRole[] data = { javax.accessibility.AccessibleRole.UNKNOWN, - javax.accessibility.AccessibleRole.ALERT, + javax.accessibility.AccessibleRole.ALERT, javax.accessibility.AccessibleRole.COLUMN_HEADER, javax.accessibility.AccessibleRole.CANVAS, javax.accessibility.AccessibleRole.CHECK_BOX, javax.accessibility.AccessibleRole.CHECK_BOX, // CHECK_MENU_ITEM javax.accessibility.AccessibleRole.COLOR_CHOOSER, - javax.accessibility.AccessibleRole.COMBO_BOX, + javax.accessibility.AccessibleRole.COMBO_BOX, javax.accessibility.AccessibleRole.DATE_EDITOR, javax.accessibility.AccessibleRole.DESKTOP_ICON, javax.accessibility.AccessibleRole.DESKTOP_PANE, @@ -96,7 +96,7 @@ public abstract class AccessibleRoleAdapter { javax.accessibility.AccessibleRole.SLIDER, javax.accessibility.AccessibleRole.SPIN_BOX, javax.accessibility.AccessibleRole.SPLIT_PANE, - javax.accessibility.AccessibleRole.STATUS_BAR, + javax.accessibility.AccessibleRole.STATUS_BAR, javax.accessibility.AccessibleRole.TABLE, javax.accessibility.AccessibleRole.LABEL, // TABLE_CELL - required by ZoomText javax.accessibility.AccessibleRole.TEXT, @@ -119,9 +119,9 @@ public abstract class AccessibleRoleAdapter { javax.accessibility.AccessibleRole.RULER, javax.accessibility.AccessibleRole.PANEL, // SECTION javax.accessibility.AccessibleRole.LABEL, // TREE_ITEM - javax.accessibility.AccessibleRole.TABLE // TREE_TABLE + javax.accessibility.AccessibleRole.TABLE // TREE_TABLE }; - + public static javax.accessibility.AccessibleRole getAccessibleRole(short role) { if(role < data.length) { if(data[role] == null) { @@ -133,7 +133,7 @@ public abstract class AccessibleRoleAdapter { System.err.println("Unmappable role: " + role); return null; } - + public static javax.accessibility.AccessibleRole getAccessibleRole(XAccessible unoAccessible) { try { XAccessibleContext unoAccessibleContext = unoAccessible.getAccessibleContext(); diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleSelectionImpl.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleSelectionImpl.java index 6e40c1e7a78d..312460f23fa0 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleSelectionImpl.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleSelectionImpl.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -31,11 +31,11 @@ import com.sun.star.accessibility.*; class AccessibleSelectionImpl implements javax.accessibility.AccessibleSelection { XAccessibleSelection unoAccessibleSelection; - + AccessibleSelectionImpl(XAccessibleSelection xAccessibleSelection) { unoAccessibleSelection = xAccessibleSelection; } - + /** Returns an Accessible representing the specified selected child of the object */ public javax.accessibility.Accessible getAccessibleSelection(int i) { try { @@ -95,5 +95,5 @@ class AccessibleSelectionImpl implements javax.accessibility.AccessibleSelection } catch (com.sun.star.uno.RuntimeException e) { } } - + } diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleStateAdapter.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleStateAdapter.java index ea1979a545ed..36ed08466636 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleStateAdapter.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleStateAdapter.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -69,11 +69,11 @@ public class AccessibleStateAdapter { AccessibleState.VERTICAL, AccessibleState.VISIBLE }; - + private static void printToplevelStateMessage(AccessibleState s, java.awt.Component c) { System.err.println("*** ERROR *** " + s + " state is a toplevel window state " + c); } - + private static String getDisplayName(java.awt.Component c) { javax.accessibility.Accessible a = (javax.accessibility.Accessible) c; if( a != null) { @@ -83,11 +83,11 @@ public class AccessibleStateAdapter { return c.toString(); } } - + private static void printOutOfSyncMessage(AccessibleState s, java.awt.Component c, boolean enabled) { System.err.println("*** ERROR *** " + s + " state out of sync (UNO state set: " + !enabled + ", Java component state: " + enabled + ") for " + getDisplayName(c)); } - + public static AccessibleState getAccessibleState(Object any) { try { if (AnyConverter.isShort(any)) { @@ -97,24 +97,24 @@ public class AccessibleStateAdapter { } catch (com.sun.star.lang.IllegalArgumentException e) { return null; } - } - + } + public static AccessibleState getAccessibleState(short unoStateType) { if (unoStateType > 0 && unoStateType < stateTypeMap.length) { return stateTypeMap[unoStateType]; } return null; } - + public static AccessibleStateSet getDefunctStateSet() { AccessibleStateSet ass = new AccessibleStateSet(); ass.add(AccessibleExtendedState.DEFUNCT); return ass; } - + public static void setComponentState(java.awt.Component c, XAccessibleStateSet xAccessibleStateSet) { - + try { if (xAccessibleStateSet != null) { // Set the boundings of the component if it is visible .. @@ -132,28 +132,28 @@ public class AccessibleStateAdapter { } } catch (com.sun.star.uno.RuntimeException e) { } - } + } public static AccessibleStateSet getAccessibleStateSet(java.awt.Component c, XAccessibleStateSet xAccessibleStateSet) { - + try { if (xAccessibleStateSet != null) { AccessibleStateSet as = new AccessibleStateSet(); short[] unoStateTypes = xAccessibleStateSet.getStates(); for (int i=0; i<unoStateTypes.length; i++) { - if (unoStateTypes[i] > 0 && + if (unoStateTypes[i] > 0 && unoStateTypes[i] < stateTypeMap.length) { as.add(stateTypeMap[unoStateTypes[i]]); } } - + // Note: COLLAPSED does not exists in the UAA. if (as.contains(AccessibleState.EXPANDABLE) && ! as.contains(AccessibleState.EXPANDED)) { as.add(AccessibleState.COLLAPSED); } - + // Sync office and Java FOCUSED state boolean isFocusInSync; if (c.isFocusOwner()) { @@ -161,8 +161,8 @@ public class AccessibleStateAdapter { } else { isFocusInSync = !as.remove(AccessibleState.FOCUSED); } - - // Sync office and Java ACTIVE state + + // Sync office and Java ACTIVE state boolean isActiveInSync; if (c instanceof java.awt.Window && ((java.awt.Window) c).isActive()) { isActiveInSync = !as.add(AccessibleState.ACTIVE); @@ -190,7 +190,7 @@ public class AccessibleStateAdapter { if (as.contains(AccessibleState.VISIBLE) != c.isVisible()) { printOutOfSyncMessage(AccessibleState.VISIBLE, c, c.isVisible()); } - + // The following states are for toplevel windows only if (! (c instanceof java.awt.Window)) { if (as.contains(AccessibleState.ACTIVE)) { diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java index c3bcbde2a71a..112b7744b867 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -52,7 +52,7 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText { "ParaLeftMargin", "ParaLineSpacing", "ParaTopMargin", "ParaBottomMargin", "CharStrikeout", "CharEscapement", "ParaTabStops", "CharUnderline" }; - + final static String[] localeAttributeList = { "CharLocale", "CharLocaleAsian", "CharLocaleComplex" }; @@ -65,7 +65,7 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText { /** Creates new GenericAccessibleEditableText object */ public AccessibleTextImpl(XAccessibleText xAccessibleText) { - + if (Build.PRODUCT) { unoObject = xAccessibleText; } else { @@ -77,13 +77,13 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText { } } } - + public AccessibleTextImpl() { } - + public static javax.accessibility.AccessibleText get(com.sun.star.uno.XInterface unoObject) { try { - XAccessibleText unoAccessibleText = (XAccessibleText) + XAccessibleText unoAccessibleText = (XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class, unoObject); if (unoAccessibleText != null) { return new AccessibleTextImpl(unoAccessibleText); @@ -96,7 +96,7 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText { protected static Object convertTextSegment(Object any) { try { if (AnyConverter.isObject(any)) { - TextSegment ts = (TextSegment) + TextSegment ts = (TextSegment) AnyConverter.toObject(TextSegmentType, any); if (ts != null) { // Since there is nothing like a "range" object in the JAA yet, @@ -108,7 +108,7 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText { } } catch (com.sun.star.lang.IllegalArgumentException e) { } - + return null; } @@ -126,9 +126,9 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText { protected java.util.Locale getLocale(int index) { try { - com.sun.star.beans.PropertyValue[] propertyValues = + com.sun.star.beans.PropertyValue[] propertyValues = unoObject.getCharacterAttributes(index, localeAttributeList); - + if (null != propertyValues) { for (int i = 0; i < propertyValues.length; i++) { com.sun.star.lang.Locale unoLocale = (com.sun.star.lang.Locale) @@ -146,11 +146,11 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText { return java.util.Locale.getDefault(); } } + - - /** Returns the string after a given index + /** Returns the string after a given index * - * The Java word iterator has a different understanding of what + * The Java word iterator has a different understanding of what * a word is than the word iterator used by OOo, so we use the * Java iterators to ensure maximal compatibility with Java. */ @@ -185,7 +185,7 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText { case AccessibleText.SENTENCE: try { String s = unoObject.getText(); - BreakIterator sentence = + BreakIterator sentence = BreakIterator.getSentenceInstance(getLocale(index)); sentence.setText(s); int start = sentence.following(index); @@ -366,7 +366,7 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText { (float) (toPointFactor * ls.Height)); } } - // FIXME: Java 1.4 NameAttribute, Orientation, ResolveAttribute + // FIXME: Java 1.4 NameAttribute, Orientation, ResolveAttribute // Set space above attribute else if (property.Name.equals("ParaTopMargin")) { StyleConstants.setSpaceAbove(as, @@ -497,7 +497,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 + * The Java word iterator has a different understanding of what * a word is than the word iterator used by OOo, so we use the * Java iterators to ensure maximal compatibility with Java. */ @@ -530,7 +530,7 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText { case AccessibleText.SENTENCE: try { String s = unoObject.getText(); - BreakIterator sentence = + BreakIterator sentence = BreakIterator.getSentenceInstance(getLocale(index)); sentence.setText(s); int end = sentence.following(index); @@ -575,7 +575,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 + * The Java word iterator has a different understanding of what * a word is than the word iterator used by OOo, so we use the * Java iterators to ensure maximal compatibility with Java. */ @@ -603,7 +603,7 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText { case AccessibleText.SENTENCE: try { String s = unoObject.getText(); - BreakIterator sentence = + BreakIterator sentence = BreakIterator.getSentenceInstance(getLocale(index)); sentence.setText(s); int end = sentence.following(index); @@ -635,7 +635,7 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText { } catch (com.sun.star.lang.IllegalArgumentException e) { return null; } - + default: return null; } diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleValueImpl.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleValueImpl.java index cabbf3f5d323..d386e9bcc942 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleValueImpl.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleValueImpl.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -35,12 +35,12 @@ import com.sun.star.uno.AnyConverter; */ public class AccessibleValueImpl implements javax.accessibility.AccessibleValue { protected XAccessibleValue unoObject; - + /** Creates new AccessibleValueImpl */ public AccessibleValueImpl(XAccessibleValue xAccessibleValue) { unoObject = xAccessibleValue; } - + public static java.lang.Number toNumber(java.lang.Object any) { try { if(AnyConverter.isByte(any)) { @@ -58,10 +58,10 @@ public class AccessibleValueImpl implements javax.accessibility.AccessibleValue } } catch (com.sun.star.lang.IllegalArgumentException e) { } - + return null; } - + public java.lang.Number getMinimumAccessibleValue() { try { return toNumber(unoObject.getMinimumValue()); @@ -69,7 +69,7 @@ public class AccessibleValueImpl implements javax.accessibility.AccessibleValue return null; } } - + public java.lang.Number getCurrentAccessibleValue() { try { return toNumber(unoObject.getCurrentValue()); @@ -77,7 +77,7 @@ public class AccessibleValueImpl implements javax.accessibility.AccessibleValue return null; } } - + public java.lang.Number getMaximumAccessibleValue() { try { return toNumber(unoObject.getMaximumValue()); @@ -85,7 +85,7 @@ public class AccessibleValueImpl implements javax.accessibility.AccessibleValue return null; } } - + public boolean setCurrentAccessibleValue(java.lang.Number number) { try { return unoObject.setCurrentValue(number); diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Alert.java b/accessibility/bridge/org/openoffice/java/accessibility/Alert.java index e853fabecba0..158fb0d7c81c 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/Alert.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/Alert.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -24,22 +24,22 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ - + package org.openoffice.java.accessibility; import javax.accessibility.AccessibleRole; import com.sun.star.accessibility.*; public class Alert extends Dialog { - + protected Alert(java.awt.Frame owner, XAccessibleComponent xAccessibleComponent) { super(owner, xAccessibleComponent); } - + protected Alert(java.awt.Frame owner, String name, XAccessibleComponent xAccessibleComponent) { super(owner, name, xAccessibleComponent); } - + protected Alert(java.awt.Frame owner, String name, boolean modal, XAccessibleComponent xAccessibleComponent) { super(owner, name, modal, xAccessibleComponent); } @@ -52,13 +52,13 @@ public class Alert extends Dialog { } return accessibleContext; } - + protected class AccessibleAlert extends AccessibleDialog { - + protected AccessibleAlert() { super(); } - + public AccessibleRole getAccessibleRole() { return AccessibleRole.ALERT; } diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Application.java b/accessibility/bridge/org/openoffice/java/accessibility/Application.java index c67da714f4df..c16f30c37e40 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/Application.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/Application.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -31,13 +31,13 @@ import javax.accessibility.Accessible; import javax.accessibility.AccessibleContext; public class Application extends java.awt.Frame implements Accessible { - + protected AccessibleContext accessibleContext = null; - + protected Application() { super(); } - + public boolean isShowing() { return true; } diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Button.java b/accessibility/bridge/org/openoffice/java/accessibility/Button.java index 44bccc30ffc1..08cf7d7c67ca 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/Button.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/Button.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -45,21 +45,21 @@ class Button extends AbstractButton implements javax.accessibility.Accessible { protected AccessibleButtonListener() { super(); } - + protected javax.accessibility.AccessibleContext getContext( Object any ) { try { - XAccessible xAccessible = (XAccessible) + XAccessible xAccessible = (XAccessible) AnyConverter.toObject( AccessibleObjectFactory.XAccessibleType, any ); - - javax.accessibility.Accessible accessible = + + javax.accessibility.Accessible accessible = (javax.accessibility.Accessible) Button.this.getComponent( xAccessible ); - + return accessible.getAccessibleContext(); } catch( com.sun.star.uno.Exception e ) { return null; } } - + /** Called by OpenOffice process to notify property changes */ public void notifyEvent(AccessibleEventObject event) { switch (event.EventId) { @@ -67,7 +67,7 @@ class Button extends AbstractButton implements javax.accessibility.Accessible { java.awt.Component c = getComponent(unoAccessible); Object values[] = { null, null }; - + if (AnyConverter.isObject(event.OldValue)) { values[0] = getContext( event.OldValue ); } @@ -85,7 +85,7 @@ class Button extends AbstractButton implements javax.accessibility.Accessible { } } } - + /** Creates the AccessibleContext associated with this object */ public javax.accessibility.AccessibleContext createAccessibleContext() { return new AccessibleButton(); @@ -109,14 +109,14 @@ class Button extends AbstractButton implements javax.accessibility.Accessible { return c; } - + protected class AccessibleButton extends AccessibleAbstractButton { /** Gets the role of this object */ public javax.accessibility.AccessibleRole getAccessibleRole() { return javax.accessibility.AccessibleRole.PUSH_BUTTON; } - + /** Returns the number of accessible children of the object */ public int getAccessibleChildrenCount() { try { @@ -135,7 +135,7 @@ class Button extends AbstractButton implements javax.accessibility.Accessible { } return null; } - + /* * AccessibleComponent */ @@ -151,7 +151,7 @@ class Button extends AbstractButton implements javax.accessibility.Accessible { return null; } } - + } } diff --git a/accessibility/bridge/org/openoffice/java/accessibility/CheckBox.java b/accessibility/bridge/org/openoffice/java/accessibility/CheckBox.java index 624dfd048c89..b7a401497d87 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/CheckBox.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/CheckBox.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -31,7 +31,7 @@ import com.sun.star.uno.*; import com.sun.star.accessibility.*; class CheckBox extends ToggleButton { - + public CheckBox(XAccessible xAccessible, XAccessibleContext xAccessibleContext) { super(xAccessible, xAccessibleContext); } diff --git a/accessibility/bridge/org/openoffice/java/accessibility/ComboBox.java b/accessibility/bridge/org/openoffice/java/accessibility/ComboBox.java index 5f5cf4a34374..5f36ff42a450 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/ComboBox.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/ComboBox.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -48,7 +48,7 @@ public class ComboBox extends Container { /** Appends the specified component to the end of this container */ public java.awt.Component add(java.awt.Component c) { - // List should be always the first child + // List should be always the first child if (c instanceof List) { return super.add(c, 0); } else { diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Component.java b/accessibility/bridge/org/openoffice/java/accessibility/Component.java index 21043e1f5098..5101080f9ab7 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/Component.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/Component.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -36,18 +36,18 @@ import com.sun.star.accessibility.*; public abstract class Component extends java.awt.Component { public static final Type RectangleType = new Type(com.sun.star.awt.Rectangle.class); public static final Type SelectionType = new Type(com.sun.star.awt.Selection.class); - + protected XAccessible unoAccessible; protected XAccessibleContext unoAccessibleContext; protected XAccessibleComponent unoAccessibleComponent; - + protected boolean disposed = false; - + protected Component(XAccessible xAccessible, XAccessibleContext xAccessibleContext) { super(); unoAccessible = xAccessible; unoAccessibleContext = xAccessibleContext; - unoAccessibleComponent = (XAccessibleComponent) + unoAccessibleComponent = (XAccessibleComponent) UnoRuntime.queryInterface(XAccessibleComponent.class, xAccessibleContext); // Add the event listener right away, because the global focus notification doesn't // work yet .. @@ -58,10 +58,10 @@ public abstract class Component extends java.awt.Component { broadcaster.addEventListener(createEventListener()); } } - + /** - * Determines whether this <code>Component</code> is showing on screen. - * This means that the component must be visible, and it must be in a + * 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 @@ -74,10 +74,10 @@ public abstract class Component extends java.awt.Component { } return false; } - + /** * Makes this <code>Component</code> displayable by connecting it to a - * native screen resource. + * native screen resource. * This method is called internally by the toolkit and should * not be called directly by programs. * @see #isDisplayable @@ -86,10 +86,10 @@ public abstract class Component extends java.awt.Component { */ public void addNotify() { } - - /** + + /** * Makes this <code>Component</code> undisplayable by destroying it native - * screen resource. + * screen resource. * This method is called by the toolkit internally and should * not be called directly by programs. * @see #isDisplayable @@ -98,37 +98,37 @@ public abstract class Component extends java.awt.Component { */ public void removeNotify() { } - + /* * Fake the java focus handling. This is necessary to keep OOo focus * in sync with the java focus. See java.awt.DefaultKeyboardFocusManager * for implementation details. **/ - + /** Requests focus for this object */ public void requestFocus() { } - + /** Requests focus for this object */ public boolean requestFocus(boolean temporary) { // Must be a no-op to make focus handling work return true; } - + /** Requests the focus for this object in the containing window */ public boolean requestFocusInWindow() { return requestFocusInWindow(false); } - + /** Requests the focus for this object in the containing window */ protected boolean requestFocusInWindow(boolean temporary) { if (isFocusable() && isVisible()) { - getEventQueue().postEvent(new java.awt.event.FocusEvent(this, java.awt.event.FocusEvent.FOCUS_GAINED, temporary)); + getEventQueue().postEvent(new java.awt.event.FocusEvent(this, java.awt.event.FocusEvent.FOCUS_GAINED, temporary)); return true; } return false; } - + public Object[] getAccessibleComponents(Object[] targetSet) { try { java.util.ArrayList list = new java.util.ArrayList(targetSet.length); @@ -145,22 +145,22 @@ public abstract class Component extends java.awt.Component { return null; } } - + protected java.awt.EventQueue getEventQueue() { return java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue(); } - + protected class PropertyChangeBroadcaster implements Runnable { String propertyName; Object oldValue; Object newValue; - + public PropertyChangeBroadcaster(String name, Object param1, Object param2) { propertyName = name; oldValue = param1; newValue = param2; } - + public void run() { // Because this code is executed in the DispatchThread, it is better to catch every // exception that might occur @@ -177,19 +177,19 @@ public abstract class Component extends java.awt.Component { } } } - + protected void firePropertyChange(String property, Object oldValue, Object newValue) { getEventQueue().invokeLater(new PropertyChangeBroadcaster(property, oldValue, newValue)); } - + 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 (set) { broadcaster = new PropertyChangeBroadcaster( accessibleContext.ACCESSIBLE_STATE_PROPERTY, @@ -201,15 +201,15 @@ public abstract class Component extends java.awt.Component { } getEventQueue().invokeLater(broadcaster); } - + /** * Update the proxy objects appropriatly on property change events */ protected class AccessibleUNOComponentListener implements XAccessibleEventListener { - + protected AccessibleUNOComponentListener() { } - + protected void setComponentState(short state, boolean enable) { switch (state) { case AccessibleStateType.ACTIVE: @@ -229,8 +229,8 @@ public abstract class Component extends java.awt.Component { break; case AccessibleStateType.FOCUSED: getEventQueue().postEvent(new java.awt.event.FocusEvent( - Component.this, enable ? - java.awt.event.FocusEvent.FOCUS_GAINED : + Component.this, enable ? + java.awt.event.FocusEvent.FOCUS_GAINED : java.awt.event.FocusEvent.FOCUS_LOST)); break; case AccessibleStateType.PRESSED: @@ -255,7 +255,7 @@ public abstract class Component extends java.awt.Component { break; } } - + /** Updates the accessible name and fires the appropriate PropertyChangedEvent */ protected void handleNameChangedEvent(Object any) { try { @@ -268,7 +268,7 @@ public abstract class Component extends java.awt.Component { } catch (com.sun.star.lang.IllegalArgumentException e) { } } - + /** Updates the accessible description and fires the appropriate PropertyChangedEvent */ protected void handleDescriptionChangedEvent(Object any) { try { @@ -281,26 +281,26 @@ public abstract class Component extends java.awt.Component { } catch (com.sun.star.lang.IllegalArgumentException e) { } } - + /** Updates the internal states and fires the appropriate PropertyChangedEvent */ protected void handleStateChangedEvent(Object any1, Object any2) { try { if (AnyConverter.isShort(any1)) { setComponentState(AnyConverter.toShort(any1), false); } - + if (AnyConverter.isShort(any2)) { setComponentState(AnyConverter.toShort(any2), true); } } catch (com.sun.star.lang.IllegalArgumentException e) { } } - + /** Called by OpenOffice process to notify property changes */ public void notifyEvent(AccessibleEventObject event) { - + if ( !disposed ) { - + switch (event.EventId) { case AccessibleEventId.ACTION_CHANGED: firePropertyChange(accessibleContext.ACCESSIBLE_ACTION_PROPERTY, @@ -331,7 +331,7 @@ public abstract class Component extends java.awt.Component { break; case AccessibleEventId.TEXT_CHANGED: firePropertyChange(AccessibleContext.ACCESSIBLE_TEXT_PROPERTY, - AccessibleTextImpl.convertTextSegment(event.OldValue), + AccessibleTextImpl.convertTextSegment(event.OldValue), AccessibleTextImpl.convertTextSegment(event.NewValue)); break; /* @@ -354,20 +354,20 @@ public abstract class Component extends java.awt.Component { } } } - + /** Called by OpenOffice process to notify that the UNO component is disposing */ public void disposing(com.sun.star.lang.EventObject eventObject) { disposed = true; AccessibleObjectFactory.disposing(Component.this); } } - + protected XAccessibleEventListener createEventListener() { return new AccessibleUNOComponentListener(); } - + protected javax.accessibility.AccessibleContext accessibleContext = null; - + /** This method actually creates the AccessibleContext object returned by * getAccessibleContext(). */ @@ -381,7 +381,7 @@ public abstract class Component extends java.awt.Component { try { AccessibleContext ac = createAccessibleContext(); if (ac != null) { - // Set accessible name and description here to avoid + // Set accessible name and description here to avoid // unnecessary property change events later .. ac.setAccessibleName(unoAccessibleContext.getAccessibleName()); ac.setAccessibleDescription(unoAccessibleContext.getAccessibleDescription()); @@ -392,12 +392,12 @@ public abstract class Component extends java.awt.Component { } return accessibleContext; } - - protected abstract class AccessibleUNOComponent extends java.awt.Component.AccessibleAWTComponent + + protected abstract class AccessibleUNOComponent extends java.awt.Component.AccessibleAWTComponent implements javax.accessibility.AccessibleExtendedComponent { - + protected java.awt.event.ComponentListener accessibleComponentHandler = null; - + /** * Fire PropertyChange listener, if one is registered, * when shown/hidden.. @@ -408,22 +408,22 @@ public abstract class Component extends java.awt.Component { AccessibleContext.ACCESSIBLE_STATE_PROPERTY, AccessibleState.VISIBLE, null); } - + 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 componentResized(java.awt.event.ComponentEvent e) { } } // inner class AccessibleComponentHandler - + protected java.awt.event.FocusListener accessibleFocusHandler = null; - + /** * Fire PropertyChange listener, if one is registered, * when focus events happen @@ -446,9 +446,9 @@ public abstract class Component extends java.awt.Component { } } } // inner class AccessibleFocusHandler - + protected int propertyChangeListenerCount = 0; - + /** * Add a PropertyChangeListener to the listener list. * @@ -458,13 +458,13 @@ public abstract class Component extends java.awt.Component { if (propertyChangeListenerCount++ == 0) { accessibleComponentHandler = new AccessibleComponentHandler(); Component.this.addComponentListener(accessibleComponentHandler); - + accessibleFocusHandler = new AccessibleFocusHandler(); Component.this.addFocusListener(accessibleFocusHandler); } super.addPropertyChangeListener(listener); } - + /** * Remove a PropertyChangeListener from the listener list. * This removes a PropertyChangeListener that was registered @@ -476,7 +476,7 @@ public abstract class Component extends java.awt.Component { if (--propertyChangeListenerCount == 0) { Component.this.removeComponentListener(accessibleComponentHandler); accessibleComponentHandler = null; - + Component.this.removeFocusListener(accessibleFocusHandler); accessibleFocusHandler = null; } @@ -501,7 +501,7 @@ public abstract class Component extends java.awt.Component { return AccessibleStateAdapter.getDefunctStateSet(); } } - + /** Gets the locale of the component */ public java.util.Locale getLocale() throws java.awt.IllegalComponentStateException { try { @@ -513,11 +513,11 @@ public abstract class Component extends java.awt.Component { return java.util.Locale.getDefault(); } } - + /* * AccessibleExtendedComponent */ - + /** Returns the background color of the object */ public java.awt.Color getBackground() { try { @@ -526,11 +526,11 @@ public abstract class Component extends java.awt.Component { return null; } } - + public void setBackground(java.awt.Color c) { // Not supported by UNO accessibility API } - + /** Returns the foreground color of the object */ public java.awt.Color getForeground() { try { @@ -539,62 +539,62 @@ public abstract class Component extends java.awt.Component { return null; } } - + public void setForeground(java.awt.Color c) { // Not supported by UNO accessibility API } - + public java.awt.Cursor getCursor() { // Not supported by UNO accessibility API return null; } - + public void setCursor(java.awt.Cursor cursor) { // Not supported by UNO accessibility API } - + public java.awt.Font getFont() { // FIXME return null; } - + public void setFont(java.awt.Font f) { // Not supported by UNO accessibility API } - + public java.awt.FontMetrics getFontMetrics(java.awt.Font f) { // FIXME return null; } - + public boolean isEnabled() { return Component.this.isEnabled(); } - + public void setEnabled(boolean b) { // Not supported by UNO accessibility API } - + public boolean isVisible() { return Component.this.isVisible(); } - + public void setVisible(boolean b) { // Not supported by UNO accessibility API } - + public boolean isShowing() { return Component.this.isShowing(); } - + public boolean contains(java.awt.Point p) { try { - return unoAccessibleComponent.containsPoint(new com.sun.star.awt.Point(p.x, p.y)); + return unoAccessibleComponent.containsPoint(new com.sun.star.awt.Point(p.x, p.y)); } catch (com.sun.star.uno.RuntimeException e) { return false; } } - + /** Returns the location of the object on the screen. */ public java.awt.Point getLocationOnScreen() { try { @@ -607,68 +607,68 @@ public abstract class Component extends java.awt.Component { return null; } } - + /** Gets the location of this component in the form of a point specifying the component's top-left corner */ public java.awt.Point getLocation() { try { - com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocation(); + com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocation(); return new java.awt.Point( unoPoint.X, unoPoint.Y ); } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Moves this component to a new location */ public void setLocation(java.awt.Point p) { // Not supported by UNO accessibility API } - + /** Gets the bounds of this component in the form of a Rectangle object */ public java.awt.Rectangle getBounds() { try { - com.sun.star.awt.Rectangle unoRect = unoAccessibleComponent.getBounds(); + com.sun.star.awt.Rectangle unoRect = unoAccessibleComponent.getBounds(); return new java.awt.Rectangle(unoRect.X, unoRect.Y, unoRect.Width, unoRect.Height); } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Moves and resizes this component to conform to the new bounding rectangle r */ public void setBounds(java.awt.Rectangle r) { // Not supported by UNO accessibility API } - + /** Returns the size of this component in the form of a Dimension object */ public java.awt.Dimension getSize() { try { - com.sun.star.awt.Size unoSize = unoAccessibleComponent.getSize(); + com.sun.star.awt.Size unoSize = unoAccessibleComponent.getSize(); return new java.awt.Dimension(unoSize.Width, unoSize.Height); } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Resizes this component so that it has width d.width and height d.height */ public void setSize(java.awt.Dimension d) { // Not supported by UNO accessibility API } - + public javax.accessibility.Accessible getAccessibleAt(java.awt.Point p) { // Not supported by this implementation return null; } - + public boolean isFocusTraversable() { return Component.this.isFocusable(); } - + public void requestFocus() { unoAccessibleComponent.grabFocus(); } - + public String getToolTipText() { try { - XAccessibleExtendedComponent unoAccessibleExtendedComponent = (XAccessibleExtendedComponent) + XAccessibleExtendedComponent unoAccessibleExtendedComponent = (XAccessibleExtendedComponent) UnoRuntime.queryInterface(XAccessibleExtendedComponent.class, unoAccessibleComponent); if (unoAccessibleExtendedComponent != null) { return unoAccessibleExtendedComponent.getToolTipText(); @@ -678,10 +678,10 @@ public abstract class Component extends java.awt.Component { } return null; } - + public String getTitledBorderText() { try { - XAccessibleExtendedComponent unoAccessibleExtendedComponent = (XAccessibleExtendedComponent) + XAccessibleExtendedComponent unoAccessibleExtendedComponent = (XAccessibleExtendedComponent) UnoRuntime.queryInterface(XAccessibleExtendedComponent.class, unoAccessibleComponent); if (unoAccessibleExtendedComponent != null) { return unoAccessibleExtendedComponent.getTitledBorderText(); @@ -691,10 +691,10 @@ public abstract class Component extends java.awt.Component { } return null; } - + public javax.accessibility.AccessibleKeyBinding getAccessibleKeyBinding() { try { - XAccessibleAction unoAccessibleAction = (XAccessibleAction) + XAccessibleAction unoAccessibleAction = (XAccessibleAction) UnoRuntime.queryInterface(XAccessibleAction.class, unoAccessibleComponent); if (unoAccessibleAction != null) { XAccessibleKeyBinding unoAccessibleKeyBinding = unoAccessibleAction.getAccessibleActionKeyBinding(0); @@ -710,7 +710,7 @@ public abstract class Component extends java.awt.Component { return null; } } - + // Extract a number from a UNO any public static java.lang.Number toNumber(java.lang.Object any) { try { @@ -732,7 +732,7 @@ public abstract class Component extends java.awt.Component { } return null; } - + public String toString() { return UnoRuntime.generateOid(unoAccessible); } diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Container.java b/accessibility/bridge/org/openoffice/java/accessibility/Container.java index 257cdab8b757..b047075607ae 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/Container.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/Container.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,7 +34,7 @@ import com.sun.star.uno.*; import com.sun.star.accessibility.*; public class Container extends java.awt.Container implements javax.accessibility.Accessible { - + protected XAccessible unoAccessible; protected XAccessibleContext unoAccessibleContext; protected XAccessibleComponent unoAccessibleComponent = null; @@ -42,14 +42,14 @@ public class Container extends java.awt.Container implements javax.accessibility protected javax.accessibility.AccessibleRole accessibleRole; protected javax.accessibility.AccessibleText accessibleText; protected boolean disposed = false; - + protected Container(javax.accessibility.AccessibleRole role, XAccessible xAccessible, XAccessibleContext xAccessibleContext) { accessibleRole = role; unoAccessible = xAccessible; unoAccessibleContext = xAccessibleContext; - unoAccessibleComponent = (XAccessibleComponent) - UnoRuntime.queryInterface(XAccessibleComponent.class, + unoAccessibleComponent = (XAccessibleComponent) + UnoRuntime.queryInterface(XAccessibleComponent.class, xAccessibleContext); // Add the event listener right away, because the global focus notification doesn't @@ -61,10 +61,10 @@ public class Container extends java.awt.Container implements javax.accessibility broadcaster.addEventListener(createEventListener()); } } - + /** - * Determines whether this <code>Container</code> is showing on screen. - * This means that the component must be visible, and it must be in a + * 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 @@ -77,10 +77,10 @@ public class Container extends java.awt.Container implements javax.accessibility } return false; } - + /** * Makes this <code>Container</code> displayable by connecting it to a - * native screen resource. + * native screen resource. * This method is called internally by the toolkit and should * not be called directly by programs. * @see #isDisplayable @@ -89,10 +89,10 @@ public class Container extends java.awt.Container implements javax.accessibility */ public void addNotify() { } - - /** + + /** * Makes this <code>Container</code> undisplayable by destroying it native - * screen resource. + * screen resource. * This method is called by the toolkit internally and should * not be called directly by programs. * @see #isDisplayable @@ -111,27 +111,27 @@ public class Container extends java.awt.Container implements javax.accessibility /** Requests focus for this object */ public void requestFocus() { } - + /** Requests focus for this object */ public boolean requestFocus(boolean temporary) { // Must be a no-op to make focus handling work return true; } - + /** Requests the focus for this object in the containing window */ public boolean requestFocusInWindow() { return requestFocusInWindow(false); } - + /** Requests the focus for this object in the containing window */ protected boolean requestFocusInWindow(boolean temporary) { if (isFocusable() && isVisible()) { - getEventQueue().postEvent(new java.awt.event.FocusEvent(this, java.awt.event.FocusEvent.FOCUS_GAINED, temporary)); + getEventQueue().postEvent(new java.awt.event.FocusEvent(this, java.awt.event.FocusEvent.FOCUS_GAINED, temporary)); return true; } return false; } - + public Object[] getAccessibleComponents(Object[] targetSet) { try { java.util.ArrayList list = new java.util.ArrayList(targetSet.length); @@ -148,22 +148,22 @@ public class Container extends java.awt.Container implements javax.accessibility return null; } } - + protected java.awt.EventQueue getEventQueue() { return java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue(); } - + protected class PropertyChangeBroadcaster implements Runnable { String propertyName; Object oldValue; Object newValue; - + public PropertyChangeBroadcaster(String name, Object param1, Object param2) { propertyName = name; oldValue = param1; newValue = param2; } - + public void run() { // Because this code is executed in the DispatchThread, it is better tocatch every // exception that might occur @@ -180,11 +180,11 @@ public class Container extends java.awt.Container implements javax.accessibility } } } - + protected void firePropertyChange(String property, Object oldValue, Object newValue) { getEventQueue().invokeLater(new PropertyChangeBroadcaster(property, oldValue, newValue)); } - + protected void fireStatePropertyChange(AccessibleState state, boolean set) { PropertyChangeBroadcaster broadcaster; if (set) { @@ -198,19 +198,19 @@ public class Container extends java.awt.Container implements javax.accessibility } getEventQueue().invokeLater(broadcaster); } - + /** * Update the proxy objects appropriatly on property change events */ protected class AccessibleContainerListener implements XAccessibleEventListener { - + protected AccessibleContainerListener() { } - + protected java.awt.EventQueue getEventQueue() { return java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue(); } - + protected void setComponentState(short state, boolean enable) { switch (state) { case AccessibleStateType.ACTIVE: @@ -224,8 +224,8 @@ public class Container extends java.awt.Container implements javax.accessibility break; case AccessibleStateType.FOCUSED: getEventQueue().postEvent(new java.awt.event.FocusEvent( - Container.this, enable ? - java.awt.event.FocusEvent.FOCUS_GAINED : + Container.this, enable ? + java.awt.event.FocusEvent.FOCUS_GAINED : java.awt.event.FocusEvent.FOCUS_LOST)); break; case AccessibleStateType.SELECTED: @@ -257,7 +257,7 @@ public class Container extends java.awt.Container implements javax.accessibility } catch (com.sun.star.lang.IllegalArgumentException e) { } } - + /** Updates the accessible description and fires the appropriate PropertyChangedEvent */ protected void handleDescriptionChangedEvent(Object any) { try { @@ -270,21 +270,21 @@ public class Container extends java.awt.Container implements javax.accessibility } catch (com.sun.star.lang.IllegalArgumentException e) { } } - + /** Updates the internal states and fires the appropriate PropertyChangedEvent */ protected void handleStateChangedEvent(Object any1, Object any2) { try { if (AnyConverter.isShort(any1)) { setComponentState(AnyConverter.toShort(any1), false); } - + if (AnyConverter.isShort(any2)) { setComponentState(AnyConverter.toShort(any2), true); } } catch (com.sun.star.lang.IllegalArgumentException e) { } } - + /* 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. */ @@ -293,15 +293,15 @@ public class Container extends java.awt.Container implements javax.accessibility if (parent != null) { javax.accessibility.AccessibleContext parentAC = parent.getAccessibleContext(); if (parentAC != null) { - + parentAC.firePropertyChange( javax.accessibility.AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, Container.this, null); - - AccessibleObjectFactory.clearContainer(Container.this); + + AccessibleObjectFactory.clearContainer(Container.this); AccessibleObjectFactory.populateContainer(Container.this, unoAccessibleContext); - + parentAC.firePropertyChange( javax.accessibility.AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, null, @@ -309,12 +309,12 @@ public class Container extends java.awt.Container implements javax.accessibility } } } - + /** Called by OpenOffice process to notify property changes */ public void notifyEvent(AccessibleEventObject event) { - + if ( !disposed ) { - + switch (event.EventId) { case AccessibleEventId.NAME_CHANGED: // Set the accessible name for the corresponding context, which will fire a property @@ -332,7 +332,7 @@ public class Container extends java.awt.Container implements javax.accessibility break; case AccessibleEventId.TEXT_CHANGED: firePropertyChange(AccessibleContext.ACCESSIBLE_TEXT_PROPERTY, - AccessibleTextImpl.convertTextSegment(event.OldValue), + AccessibleTextImpl.convertTextSegment(event.OldValue), AccessibleTextImpl.convertTextSegment(event.NewValue)); break; case AccessibleEventId.CHILD: @@ -365,20 +365,20 @@ public class Container extends java.awt.Container implements javax.accessibility } } } - + /** Called by OpenOffice process to notify that the UNO component is disposing */ public void disposing(com.sun.star.lang.EventObject eventObject) { disposed = true; AccessibleObjectFactory.disposing(Container.this); } } - + protected XAccessibleEventListener createEventListener() { return new AccessibleContainerListener(); } - + protected javax.accessibility.AccessibleContext accessibleContext = null; - + /** This method actually creates the AccessibleContext object returned by * getAccessibleContext(). */ @@ -392,7 +392,7 @@ public class Container extends java.awt.Container implements javax.accessibility try { AccessibleContext ac = createAccessibleContext(); if (ac != null) { - // Set accessible name and description here to avoid + // Set accessible name and description here to avoid // unnecessary property change events later .. ac.setAccessibleName(unoAccessibleContext.getAccessibleName()); ac.setAccessibleDescription(unoAccessibleContext.getAccessibleDescription()); @@ -403,11 +403,11 @@ public class Container extends java.awt.Container implements javax.accessibility } return accessibleContext; } - - protected class AccessibleContainer extends java.awt.Container.AccessibleAWTContainer { + + protected class AccessibleContainer extends java.awt.Container.AccessibleAWTContainer { protected AccessibleContainer() { - /* Since getAccessibleText() is heavily used by the java access + /* Since getAccessibleText() is heavily used by the java access * bridge for gnome and the gnome at-tools, we do a query interface * here and remember the result. */ @@ -416,13 +416,13 @@ public class Container extends java.awt.Container implements javax.accessibility protected AccessibleContainer(boolean query) { /* This constructor is explicitly for subclasses that implement - * AccessibleHypertext and therefor the default constructor would + * AccessibleHypertext and therefor the default constructor would * bring unnecessary overhead. */ } - + protected java.awt.event.ComponentListener accessibleComponentHandler = null; - + /** * Fire PropertyChange listener, if one is registered, * when shown/hidden.. @@ -433,22 +433,22 @@ public class Container extends java.awt.Container implements javax.accessibility AccessibleContext.ACCESSIBLE_STATE_PROPERTY, AccessibleState.VISIBLE, null); } - + 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 componentResized(java.awt.event.ComponentEvent e) { } } // inner class AccessibleContainerHandler - + protected java.awt.event.FocusListener accessibleFocusHandler = null; - + /** * Fire PropertyChange listener, if one is registered, * when focus events happen @@ -471,20 +471,20 @@ public class Container extends java.awt.Container implements javax.accessibility } } } // inner class AccessibleFocusHandler - + protected java.awt.event.ContainerListener accessibleContainerHandler = null; - + /** * Fire PropertyChange listener, if one is registered, * when children added/removed. */ - + protected class AccessibleContainerHandler implements java.awt.event.ContainerListener { public void componentAdded(java.awt.event.ContainerEvent e) { java.awt.Component c = e.getChild(); if (c != null && c instanceof javax.accessibility.Accessible) { AccessibleContainer.this.firePropertyChange( - AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, + AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, null, ((javax.accessibility.Accessible) c).getAccessibleContext()); } } @@ -492,14 +492,14 @@ public class Container extends java.awt.Container implements javax.accessibility java.awt.Component c = e.getChild(); if (c != null && c instanceof javax.accessibility.Accessible) { AccessibleContainer.this.firePropertyChange( - AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, - ((javax.accessibility.Accessible) c).getAccessibleContext(), null); + AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, + ((javax.accessibility.Accessible) c).getAccessibleContext(), null); } } } - + protected int propertyChangeListenerCount = 0; - + /** * Add a PropertyChangeListener to the listener list. * @@ -509,16 +509,16 @@ public class Container extends java.awt.Container implements javax.accessibility if (propertyChangeListenerCount++ == 0) { accessibleFocusHandler = new AccessibleFocusHandler(); Container.this.addFocusListener(accessibleFocusHandler); - + accessibleContainerHandler = new AccessibleContainerHandler(); Container.this.addContainerListener(accessibleContainerHandler); - + accessibleComponentHandler = new AccessibleComponentHandler(); Container.this.addComponentListener(accessibleComponentHandler); } super.addPropertyChangeListener(listener); } - + /** * Remove a PropertyChangeListener from the listener list. * This removes a PropertyChangeListener that was registered @@ -530,30 +530,30 @@ public class Container extends java.awt.Container implements javax.accessibility if (--propertyChangeListenerCount == 0) { Container.this.removeComponentListener(accessibleComponentHandler); accessibleComponentHandler = null; - + Container.this.removeContainerListener(accessibleContainerHandler); accessibleContainerHandler = null; - + Container.this.removeFocusListener(accessibleFocusHandler); accessibleFocusHandler = null; } super.removePropertyChangeListener(listener); } - + /** Gets the role of this object */ public javax.accessibility.AccessibleRole getAccessibleRole() { return accessibleRole; } - + /** Gets the AccessibleText associated with this object presenting text on the display */ public javax.accessibility.AccessibleText getAccessibleText() { - + if (disposed) return null; - + return accessibleText; } - + /** * Gets the current state set of this object. * @@ -572,21 +572,21 @@ public class Container extends java.awt.Container implements javax.accessibility return AccessibleStateAdapter.getDefunctStateSet(); } } - + /** Returns the AccessibleSelection interface for this object */ public javax.accessibility.AccessibleSelection getAccessibleSelection() { try { - XAccessibleSelection unoAccessibleSelection = (XAccessibleSelection) + XAccessibleSelection unoAccessibleSelection = (XAccessibleSelection) UnoRuntime.queryInterface(XAccessibleSelection.class, unoAccessibleContext); if (unoAccessibleSelection != null) { return new AccessibleSelectionImpl(unoAccessibleSelection); } } catch (com.sun.star.uno.RuntimeException e) { } - + return null; } - + /** Gets the locale of the component */ public java.util.Locale getLocale() throws java.awt.IllegalComponentStateException { try { @@ -598,11 +598,11 @@ public class Container extends java.awt.Container implements javax.accessibility return super.getLocale(); } } - + /* * AccessibleComponent */ - + /** Returns the background color of the object */ public java.awt.Color getBackground() { try { @@ -611,11 +611,11 @@ public class Container extends java.awt.Container implements javax.accessibility return null; } } - + public void setBackground(java.awt.Color c) { // Not supported by UNO accessibility API } - + /** Returns the foreground color of the object */ public java.awt.Color getForeground() { try { @@ -624,138 +624,138 @@ public class Container extends java.awt.Container implements javax.accessibility return null; } } - + public void setForeground(java.awt.Color c) { // Not supported by UNO accessibility API } - + public java.awt.Cursor getCursor() { // Not supported by UNO accessibility API return null; } - + public void setCursor(java.awt.Cursor cursor) { // Not supported by UNO accessibility API } - + public java.awt.Font getFont() { // FIXME return null; } - + public void setFont(java.awt.Font f) { // Not supported by UNO accessibility API } - + public java.awt.FontMetrics getFontMetrics(java.awt.Font f) { // FIXME return null; } - + public boolean isEnabled() { return Container.this.isEnabled(); } - + public void setEnabled(boolean b) { // Not supported by UNO accessibility API } - + public boolean isVisible() { return Container.this.isVisible(); } - + public void setVisible(boolean b) { // Not supported by UNO accessibility API } - + public boolean isShowing() { return Container.this.isShowing(); } - + public boolean contains(java.awt.Point p) { try { - return unoAccessibleComponent.containsPoint(new com.sun.star.awt.Point(p.x, p.y)); + return unoAccessibleComponent.containsPoint(new com.sun.star.awt.Point(p.x, p.y)); } catch (com.sun.star.uno.RuntimeException e) { return false; } } - + /** Returns the location of the object on the screen. */ public java.awt.Point getLocationOnScreen() { try { - com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocationOnScreen(); + com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocationOnScreen(); return new java.awt.Point(unoPoint.X, unoPoint.Y); } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Gets the location of this component in the form of a point specifying the component's top-left corner */ public java.awt.Point getLocation() { try { - com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocation(); + com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocation(); return new java.awt.Point( unoPoint.X, unoPoint.Y ); } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Moves this component to a new location */ public void setLocation(java.awt.Point p) { // Not supported by UNO accessibility API } - + /** Gets the bounds of this component in the form of a Rectangle object */ public java.awt.Rectangle getBounds() { try { - com.sun.star.awt.Rectangle unoRect = unoAccessibleComponent.getBounds(); + com.sun.star.awt.Rectangle unoRect = unoAccessibleComponent.getBounds(); return new java.awt.Rectangle(unoRect.X, unoRect.Y, unoRect.Width, unoRect.Height); } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Moves and resizes this component to conform to the new bounding rectangle r */ public void setBounds(java.awt.Rectangle r) { // Not supported by UNO accessibility API } - + /** Returns the size of this component in the form of a Dimension object */ public java.awt.Dimension getSize() { try { - com.sun.star.awt.Size unoSize = unoAccessibleComponent.getSize(); + com.sun.star.awt.Size unoSize = unoAccessibleComponent.getSize(); return new java.awt.Dimension(unoSize.Width, unoSize.Height); } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Resizes this component so that it has width d.width and height d.height */ public void setSize(java.awt.Dimension d) { // Not supported by UNO accessibility API } - /** Returns the Accessible child, if one exists, contained at the local coordinate Point */ + /** Returns the Accessible child, if one exists, contained at the local coordinate Point */ public javax.accessibility.Accessible getAccessibleAt(java.awt.Point p) { try { java.awt.Component c = AccessibleObjectFactory.getAccessibleComponent( unoAccessibleComponent.getAccessibleAtPoint(new com.sun.star.awt.Point(p.x, p.y))); - + return (javax.accessibility.Accessible) c; } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + public boolean isFocusTraversable() { return Container.this.isFocusable(); } - + public void requestFocus() { unoAccessibleComponent.grabFocus(); } } - + public String toString() { return UnoRuntime.generateOid(unoAccessible); } diff --git a/accessibility/bridge/org/openoffice/java/accessibility/DescendantManager.java b/accessibility/bridge/org/openoffice/java/accessibility/DescendantManager.java index 5b8c45b716b4..039eea34ddcb 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/DescendantManager.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/DescendantManager.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Dialog.java b/accessibility/bridge/org/openoffice/java/accessibility/Dialog.java index dcb067368996..64b5572a2fcc 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/Dialog.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/Dialog.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,28 +34,28 @@ import com.sun.star.accessibility.*; public class Dialog extends java.awt.Dialog implements javax.accessibility.Accessible, NativeFrame { protected XAccessibleComponent unoAccessibleComponent; - + boolean opened = false; boolean visible = false; boolean active = false; - + java.awt.EventQueue eventQueue = null; - + protected Dialog(java.awt.Frame owner, XAccessibleComponent xAccessibleComponent) { super(owner); initialize(xAccessibleComponent); } - + protected Dialog(java.awt.Frame owner, String name, XAccessibleComponent xAccessibleComponent) { super(owner, name); initialize(xAccessibleComponent); } - + protected Dialog(java.awt.Frame owner, String name, boolean modal, XAccessibleComponent xAccessibleComponent) { super(owner, name, modal); initialize(xAccessibleComponent); } - + private void initialize(XAccessibleComponent xAccessibleComponent) { unoAccessibleComponent = xAccessibleComponent; eventQueue = java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue(); @@ -66,24 +66,24 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces broadcaster.addEventListener(new AccessibleDialogListener()); } } - + java.awt.Component initialComponent = null; - + public java.awt.Component getInitialComponent() { return initialComponent; } - + public void setInitialComponent(java.awt.Component c) { initialComponent = c; } - + public Integer getHWND() { return null; } - + /** - * Determines whether this <code>Component</code> is showing on screen. - * This means that the component must be visible, and it must be in a + * 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 @@ -96,10 +96,10 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces } return false; } - + /** * Makes this <code>Component</code> displayable by connecting it to a - * native screen resource. + * native screen resource. * This method is called internally by the toolkit and should * not be called directly by programs. * @see #isDisplayable @@ -109,10 +109,10 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces public void addNotify() { // createHierarchyEvents(0, null, null, 0, false); } - - /** + + /** * Makes this <code>Component</code> undisplayable by destroying it native - * screen resource. + * screen resource. * This method is called by the toolkit internally and should * not be called directly by programs. * @see #isDisplayable @@ -121,7 +121,7 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces */ public void removeNotify() { } - + /** * Determines if the object is visible. Note: this means that the * object intends to be visible; however, it may not in fact be @@ -134,7 +134,7 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces public boolean isVisible(){ return visible; } - + /** * Shows or hides this component depending on the value of parameter * <code>b</code>. @@ -158,28 +158,28 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces } } } - + public void dispose() { setVisible(false); postWindowEvent(java.awt.event.WindowEvent.WINDOW_CLOSED); } - + protected void postWindowEvent(int i) { eventQueue.postEvent(new java.awt.event.WindowEvent(this, i)); } - + protected void postComponentEvent(int i) { eventQueue.postEvent(new java.awt.event.ComponentEvent(this, i)); } - + /** * Update the proxy objects appropriatly on property change events */ protected class AccessibleDialogListener implements XAccessibleEventListener { - + protected AccessibleDialogListener() { } - + protected void setComponentState(short state, boolean enable) { switch (state) { case AccessibleStateType.ACTIVE: @@ -191,8 +191,8 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces } break; case AccessibleStateType.ICONIFIED: - postWindowEvent(enable ? - java.awt.event.WindowEvent.WINDOW_ICONIFIED : + postWindowEvent(enable ? + java.awt.event.WindowEvent.WINDOW_ICONIFIED : java.awt.event.WindowEvent.WINDOW_DEICONIFIED); break; case AccessibleStateType.VISIBLE: @@ -205,7 +205,7 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces break; } } - + /** Updates the accessible name and fires the appropriate PropertyChangedEvent */ protected void handleNameChangedEvent(Object any) { try { @@ -221,7 +221,7 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces } catch (com.sun.star.lang.IllegalArgumentException e) { } } - + /** Updates the accessible description and fires the appropriate PropertyChangedEvent */ protected void handleDescriptionChangedEvent(Object any) { try { @@ -235,21 +235,21 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces } catch (com.sun.star.lang.IllegalArgumentException e) { } } - + /** Updates the internal states and fires the appropriate PropertyChangedEvent */ protected void handleStateChangedEvent(Object any1, Object any2) { try { if (AnyConverter.isShort(any1)) { setComponentState(AnyConverter.toShort(any1), false); } - + if (AnyConverter.isShort(any2)) { setComponentState(AnyConverter.toShort(any2), true); } } catch (com.sun.star.lang.IllegalArgumentException e) { } } - + /** Fires a visible data property change event */ protected void handleVisibleDataEvent() { javax.accessibility.AccessibleContext ac = accessibleContext; @@ -257,7 +257,7 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces ac.firePropertyChange(javax.accessibility.AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); } } - + /** Called by OpenOffice process to notify property changes */ public void notifyEvent(AccessibleEventObject event) { switch (event.EventId) { @@ -293,14 +293,14 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces } } } - + /** Called by OpenOffice process to notify that the UNO component is disposing */ public void disposing(com.sun.star.lang.EventObject eventObject) { } } - + javax.accessibility.AccessibleContext accessibleContext = null; - + /** Returns the AccessibleContext associated with this object */ public javax.accessibility.AccessibleContext getAccessibleContext() { if (accessibleContext == null) { @@ -309,14 +309,14 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces } return accessibleContext; } - + protected class AccessibleDialog extends java.awt.Dialog.AccessibleAWTDialog { protected AccessibleDialog() { super(); } - + protected java.awt.event.ComponentListener accessibleComponentHandler = null; - + /** * Fire PropertyChange listener, if one is registered, * when shown/hidden.. @@ -327,22 +327,22 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces javax.accessibility.AccessibleContext.ACCESSIBLE_STATE_PROPERTY, javax.accessibility.AccessibleState.VISIBLE, null); } - + public void componentShown(java.awt.event.ComponentEvent e) { AccessibleDialog.this.firePropertyChange( javax.accessibility.AccessibleContext.ACCESSIBLE_STATE_PROPERTY, null, javax.accessibility.AccessibleState.VISIBLE); } - + public void componentMoved(java.awt.event.ComponentEvent e) { } - + public void componentResized(java.awt.event.ComponentEvent e) { } } // inner class AccessibleComponentHandler - + protected java.awt.event.WindowListener accessibleWindowHandler = null; - + /** * Fire PropertyChange listener, if one is registered, * when window events happen @@ -357,21 +357,21 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces System.err.println("[Dialog] " + getTitle() + " is now active"); } } - + /** Invoked when a window has been closed as the result of calling dispose on the window. */ public void windowClosed(java.awt.event.WindowEvent e) { if (Build.DEBUG) { System.err.println("[Dialog] " + getTitle() + " has been closed"); } } - + /** Invoked when the user attempts to close the window from the window's system menu. */ public void windowClosing(java.awt.event.WindowEvent e) { if (Build.DEBUG) { System.err.println("[Dialog] " + getTitle() + " is closing"); } } - + /** Invoked when a Window is no longer the active Window. */ public void windowDeactivated(java.awt.event.WindowEvent e) { AccessibleDialog.this.firePropertyChange( @@ -381,43 +381,43 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces System.err.println("[Dialog] " + getTitle() + " is no longer active"); } } - + /** Invoked when a window is changed from a minimized to a normal state. */ public void windowDeiconified(java.awt.event.WindowEvent e) { if (Build.DEBUG) { System.err.println("[Dialog] " + getTitle() + " has been deiconified"); } } - + /** Invoked when a window is changed from a normal to a minimized state. */ public void windowIconified(java.awt.event.WindowEvent e) { if (Build.DEBUG) { System.err.println("[Dialog] " + getTitle() + " has been iconified"); } } - + /** Invoked the first time a window is made visible. */ public void windowOpened(java.awt.event.WindowEvent e) { if (Build.DEBUG) { System.err.println("[Dialog] " + getTitle() + " has been opened"); } } - + } // inner class AccessibleWindowHandler - + protected java.awt.event.ContainerListener accessibleContainerHandler = null; - + /** * Fire PropertyChange listener, if one is registered, * when children added/removed. */ - + protected class AccessibleContainerHandler implements java.awt.event.ContainerListener { public void componentAdded(java.awt.event.ContainerEvent e) { java.awt.Component c = e.getChild(); if (c != null && c instanceof javax.accessibility.Accessible) { AccessibleDialog.this.firePropertyChange( - javax.accessibility.AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, + javax.accessibility.AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, null, ((javax.accessibility.Accessible) c).getAccessibleContext()); } } @@ -425,14 +425,14 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces java.awt.Component c = e.getChild(); if (c != null && c instanceof javax.accessibility.Accessible) { AccessibleDialog.this.firePropertyChange( - javax.accessibility.AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, - ((javax.accessibility.Accessible) c).getAccessibleContext(), null); + javax.accessibility.AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, + ((javax.accessibility.Accessible) c).getAccessibleContext(), null); } } } - + protected int propertyChangeListenerCount = 0; - + /** * Add a PropertyChangeListener to the listener list. * @@ -442,16 +442,16 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces if (propertyChangeListenerCount++ == 0) { accessibleWindowHandler = new AccessibleWindowHandler(); Dialog.this.addWindowListener(accessibleWindowHandler); - + accessibleContainerHandler = new AccessibleContainerHandler(); Dialog.this.addContainerListener(accessibleContainerHandler); - + accessibleComponentHandler = new AccessibleComponentHandler(); Dialog.this.addComponentListener(accessibleComponentHandler); } super.addPropertyChangeListener(listener); } - + /** * Remove a PropertyChangeListener from the listener list. * This removes a PropertyChangeListener that was registered @@ -463,20 +463,20 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces if (--propertyChangeListenerCount == 0) { Dialog.this.removeComponentListener(accessibleComponentHandler); accessibleComponentHandler = null; - + Dialog.this.removeContainerListener(accessibleContainerHandler); accessibleContainerHandler = null; - + Dialog.this.removeWindowListener(accessibleWindowHandler); accessibleWindowHandler = null; } super.removePropertyChangeListener(listener); } - + /* * AccessibleComponent */ - + /** Returns the background color of the object */ public java.awt.Color getBackground() { try { @@ -485,11 +485,11 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces return null; } } - + public void setBackground(java.awt.Color c) { // Not supported by UNO accessibility API } - + /** Returns the foreground color of the object */ public java.awt.Color getForeground() { try { @@ -498,118 +498,118 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces return null; } } - + public void setForeground(java.awt.Color c) { // Not supported by UNO accessibility API } - + public java.awt.Cursor getCursor() { // Not supported by UNO accessibility API return null; } - + public void setCursor(java.awt.Cursor cursor) { // Not supported by UNO accessibility API } - + public java.awt.Font getFont() { // FIXME return null; } - + public void setFont(java.awt.Font f) { // Not supported by UNO accessibility API } - + public java.awt.FontMetrics getFontMetrics(java.awt.Font f) { // FIXME return null; } - + public boolean isEnabled() { return Dialog.this.isEnabled(); } - + public void setEnabled(boolean b) { // Not supported by UNO accessibility API } - + public boolean isVisible() { return Dialog.this.isVisible(); } - + public void setVisible(boolean b) { // Not supported by UNO accessibility API } - + public boolean isShowing() { return Dialog.this.isShowing(); } - + public boolean contains(java.awt.Point p) { try { - return unoAccessibleComponent.containsPoint(new com.sun.star.awt.Point(p.x, p.y)); + return unoAccessibleComponent.containsPoint(new com.sun.star.awt.Point(p.x, p.y)); } catch (com.sun.star.uno.RuntimeException e) { return false; } } - + /** Returns the location of the object on the screen. */ public java.awt.Point getLocationOnScreen() { try { - com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocationOnScreen(); + com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocationOnScreen(); return new java.awt.Point(unoPoint.X, unoPoint.Y); } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Gets the location of this component in the form of a point specifying the component's top-left corner */ public java.awt.Point getLocation() { try { - com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocation(); + com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocation(); return new java.awt.Point( unoPoint.X, unoPoint.Y ); } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Moves this component to a new location */ public void setLocation(java.awt.Point p) { // Not supported by UNO accessibility API } - + /** Gets the bounds of this component in the form of a Rectangle object */ public java.awt.Rectangle getBounds() { try { - com.sun.star.awt.Rectangle unoRect = unoAccessibleComponent.getBounds(); + com.sun.star.awt.Rectangle unoRect = unoAccessibleComponent.getBounds(); return new java.awt.Rectangle(unoRect.X, unoRect.Y, unoRect.Width, unoRect.Height); } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Moves and resizes this component to conform to the new bounding rectangle r */ public void setBounds(java.awt.Rectangle r) { // Not supported by UNO accessibility API } - + /** Returns the size of this component in the form of a Dimension object */ public java.awt.Dimension getSize() { try { - com.sun.star.awt.Size unoSize = unoAccessibleComponent.getSize(); + com.sun.star.awt.Size unoSize = unoAccessibleComponent.getSize(); return new java.awt.Dimension(unoSize.Width, unoSize.Height); } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Resizes this component so that it has width d.width and height d.height */ public void setSize(java.awt.Dimension d) { // Not supported by UNO accessibility API } - - /** Returns the Accessible child, if one exists, contained at the local coordinate Point */ + + /** Returns the Accessible child, if one exists, contained at the local coordinate Point */ public javax.accessibility.Accessible getAccessibleAt(java.awt.Point p) { try { java.awt.Component c = AccessibleObjectFactory.getAccessibleComponent( @@ -620,11 +620,11 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces return null; } } - + public boolean isFocusTraversable() { return Dialog.this.isFocusable(); } - + public void requestFocus() { unoAccessibleComponent.grabFocus(); } diff --git a/accessibility/bridge/org/openoffice/java/accessibility/FocusTraversalPolicy.java b/accessibility/bridge/org/openoffice/java/accessibility/FocusTraversalPolicy.java index 75f6c91354f4..0f1c03c94653 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/FocusTraversalPolicy.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/FocusTraversalPolicy.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,17 +42,17 @@ public class FocusTraversalPolicy extends java.awt.FocusTraversalPolicy { } /** Returns the Component that should receive the focus after aComponent */ - public java.awt.Component getComponentAfter(java.awt.Container focusCycleRoot, + public java.awt.Component getComponentAfter(java.awt.Container focusCycleRoot, java.awt.Component aComponent) { return null; } - + /** Returns the Component that should receive the focus before aComponent */ - public java.awt.Component getComponentBefore(java.awt.Container focusCycleRoot, + public java.awt.Component getComponentBefore(java.awt.Container focusCycleRoot, java.awt.Component aComponent) { return null; } - + /** Returns the default Component to focus */ public java.awt.Component getDefaultComponent(java.awt.Container focusCycleRoot) { // getDefaultComponent must not return null for Windows to make them focusable. @@ -68,12 +68,12 @@ public class FocusTraversalPolicy extends java.awt.FocusTraversalPolicy { } return null; } - + /** Returns the first Component in the traversal cycle */ public java.awt.Component getFirstComponent(java.awt.Container focusCycleRoot) { return null; } - + /** Returns the Component that should receive the focus when a Window is made visible for the first time */ public java.awt.Component getInitialComponent(java.awt.Window window) { if (window instanceof NativeFrame) { @@ -81,7 +81,7 @@ public class FocusTraversalPolicy extends java.awt.FocusTraversalPolicy { } return null; } - + /** Returns the last Component in the traversal cycle */ public java.awt.Component getLastComponent(java.awt.Container focusCycleRoot) { return null; diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Frame.java b/accessibility/bridge/org/openoffice/java/accessibility/Frame.java index b7f37b2d6b18..7768afdc8af7 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/Frame.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/Frame.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -32,22 +32,22 @@ import com.sun.star.accessibility.*; public class Frame extends java.awt.Frame implements javax.accessibility.Accessible, NativeFrame { protected XAccessibleComponent unoAccessibleComponent; - + boolean opened = false; boolean visible = false; boolean active = false; - + java.awt.EventQueue eventQueue = null; - + protected Frame(XAccessibleComponent xAccessibleComponent) { initialize(xAccessibleComponent); } - + protected Frame(String name, XAccessibleComponent xAccessibleComponent) { super(name); initialize(xAccessibleComponent); } - + private void initialize(XAccessibleComponent xAccessibleComponent) { unoAccessibleComponent = xAccessibleComponent; eventQueue = java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue(); @@ -58,24 +58,24 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi broadcaster.addEventListener(new AccessibleFrameListener()); } } - + java.awt.Component initialComponent = null; - + public java.awt.Component getInitialComponent() { return initialComponent; } - + public void setInitialComponent(java.awt.Component c) { initialComponent = c; } - + public Integer getHWND() { return null; } - + /** - * Determines whether this <code>Component</code> is showing on screen. - * This means that the component must be visible, and it must be in a + * 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 @@ -88,10 +88,10 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi } return false; } - + /** * Makes this <code>Component</code> displayable by connecting it to a - * native screen resource. + * native screen resource. * This method is called internally by the toolkit and should * not be called directly by programs. * @see #isDisplayable @@ -101,10 +101,10 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi public void addNotify() { // createHierarchyEvents(0, null, null, 0, false); } - - /** + + /** * Makes this <code>Component</code> undisplayable by destroying it native - * screen resource. + * screen resource. * This method is called by the toolkit internally and should * not be called directly by programs. * @see #isDisplayable @@ -113,7 +113,7 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi */ public void removeNotify() { } - + /** * Determines if the object is visible. Note: this means that the * object intends to be visible; however, it may not in fact be @@ -126,7 +126,7 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi public boolean isVisible(){ return visible; } - + /** * Shows or hides this component depending on the value of parameter * <code>b</code>. @@ -150,28 +150,28 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi } } } - + public void dispose() { setVisible(false); postWindowEvent(java.awt.event.WindowEvent.WINDOW_CLOSED); } - + protected void postWindowEvent(int i) { eventQueue.postEvent(new java.awt.event.WindowEvent(this, i)); } - + protected void postComponentEvent(int i) { eventQueue.postEvent(new java.awt.event.ComponentEvent(this, i)); } - + /** * Update the proxy objects appropriatly on property change events */ protected class AccessibleFrameListener implements XAccessibleEventListener { - + protected AccessibleFrameListener() { } - + // The only expected state changes are ACTIVE and VISIBLE protected void setComponentState(short state, boolean enable) { switch (state) { @@ -187,8 +187,8 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi if (Build.DEBUG) { System.err.println("[frame]" + getTitle() + (enable ? " is now " : " is no longer ") + "iconified"); } - postWindowEvent(enable ? - java.awt.event.WindowEvent.WINDOW_ICONIFIED : + postWindowEvent(enable ? + java.awt.event.WindowEvent.WINDOW_ICONIFIED : java.awt.event.WindowEvent.WINDOW_DEICONIFIED); break; case AccessibleStateType.VISIBLE: @@ -201,7 +201,7 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi break; } } - + /** Updates the accessible name and fires the appropriate PropertyChangedEvent */ protected void handleNameChangedEvent(Object any) { try { @@ -217,7 +217,7 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi } catch (com.sun.star.lang.IllegalArgumentException e) { } } - + /** Updates the accessible description and fires the appropriate PropertyChangedEvent */ protected void handleDescriptionChangedEvent(Object any) { try { @@ -231,23 +231,23 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi } catch (com.sun.star.lang.IllegalArgumentException e) { } } - + /** Updates the internal states and fires the appropriate PropertyChangedEvent */ protected void handleStateChangedEvent(Object any1, Object any2) { try { if (AnyConverter.isShort(any1)) { setComponentState(AnyConverter.toShort(any1), false); } - + if (AnyConverter.isShort(any2)) { setComponentState(AnyConverter.toShort(any2), true); } } - + catch (com.sun.star.lang.IllegalArgumentException e) { } } - + /** Fires a visible data property change event */ protected void handleVisibleDataEvent() { javax.accessibility.AccessibleContext ac = accessibleContext; @@ -255,7 +255,7 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi ac.firePropertyChange(javax.accessibility.AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); } } - + /** Called by OpenOffice process to notify property changes */ public void notifyEvent(AccessibleEventObject event) { switch (event.EventId) { @@ -291,14 +291,14 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi } } } - + /** Called by OpenOffice process to notify that the UNO component is disposing */ public void disposing(com.sun.star.lang.EventObject eventObject) { } } - + protected javax.accessibility.AccessibleContext accessibleContext = null; - + /** Returns the AccessibleContext associated with this object */ public javax.accessibility.AccessibleContext getAccessibleContext() { if (accessibleContext == null) { @@ -307,14 +307,14 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi } return accessibleContext; } - + protected class AccessibleFrame extends java.awt.Frame.AccessibleAWTFrame { protected AccessibleFrame() { super(); } - + protected java.awt.event.ComponentListener accessibleComponentHandler = null; - + /** * Fire PropertyChange listener, if one is registered, * when shown/hidden.. @@ -325,22 +325,22 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi javax.accessibility.AccessibleContext.ACCESSIBLE_STATE_PROPERTY, javax.accessibility.AccessibleState.VISIBLE, null); } - + public void componentShown(java.awt.event.ComponentEvent e) { AccessibleFrame.this.firePropertyChange( javax.accessibility.AccessibleContext.ACCESSIBLE_STATE_PROPERTY, null, javax.accessibility.AccessibleState.VISIBLE); } - + public void componentMoved(java.awt.event.ComponentEvent e) { } - + public void componentResized(java.awt.event.ComponentEvent e) { } } // inner class AccessibleComponentHandler - + protected java.awt.event.WindowListener accessibleWindowHandler = null; - + /** * Fire PropertyChange listener, if one is registered, * when window events happen @@ -355,21 +355,21 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi System.err.println("[frame] " + getTitle() + " is now active"); } } - + /** Invoked when a window has been closed as the result of calling dispose on the window. */ public void windowClosed(java.awt.event.WindowEvent e) { if (Build.DEBUG) { System.err.println("[frame] " + getTitle() + " has been closed"); } } - + /** Invoked when the user attempts to close the window from the window's system menu. */ public void windowClosing(java.awt.event.WindowEvent e) { if (Build.DEBUG) { System.err.println("[frame] " + getTitle() + " is closing"); } } - + /** Invoked when a Window is no longer the active Window. */ public void windowDeactivated(java.awt.event.WindowEvent e) { AccessibleFrame.this.firePropertyChange( @@ -379,43 +379,43 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi System.err.println("[frame] " + getTitle() + " is no longer active"); } } - + /** Invoked when a window is changed from a minimized to a normal state. */ public void windowDeiconified(java.awt.event.WindowEvent e) { if (Build.DEBUG) { System.err.println("[frame] " + getTitle() + " is no longer iconified"); } } - + /** Invoked when a window is changed from a normal to a minimized state. */ public void windowIconified(java.awt.event.WindowEvent e) { if (Build.DEBUG) { System.err.println("[frame] " + getTitle() + " has been iconified"); } } - + /** Invoked the first time a window is made visible. */ public void windowOpened(java.awt.event.WindowEvent e) { if (Build.DEBUG) { System.err.println("[frame] " + getTitle() + " has been opened"); } } - + } // inner class AccessibleWindowHandler - + protected java.awt.event.ContainerListener accessibleContainerHandler = null; - + /** * Fire PropertyChange listener, if one is registered, * when children added/removed. */ - + protected class AccessibleContainerHandler implements java.awt.event.ContainerListener { public void componentAdded(java.awt.event.ContainerEvent e) { java.awt.Component c = e.getChild(); if (c != null && c instanceof javax.accessibility.Accessible) { AccessibleFrame.this.firePropertyChange( - javax.accessibility.AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, + javax.accessibility.AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, null, ((javax.accessibility.Accessible) c).getAccessibleContext()); } } @@ -423,14 +423,14 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi java.awt.Component c = e.getChild(); if (c != null && c instanceof javax.accessibility.Accessible) { AccessibleFrame.this.firePropertyChange( - javax.accessibility.AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, - ((javax.accessibility.Accessible) c).getAccessibleContext(), null); + javax.accessibility.AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, + ((javax.accessibility.Accessible) c).getAccessibleContext(), null); } } } - + protected int propertyChangeListenerCount = 0; - + /** * Add a PropertyChangeListener to the listener list. * @@ -440,16 +440,16 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi if (propertyChangeListenerCount++ == 0) { accessibleWindowHandler = new AccessibleWindowHandler(); Frame.this.addWindowListener(accessibleWindowHandler); - + accessibleContainerHandler = new AccessibleContainerHandler(); Frame.this.addContainerListener(accessibleContainerHandler); - + accessibleComponentHandler = new AccessibleComponentHandler(); Frame.this.addComponentListener(accessibleComponentHandler); } super.addPropertyChangeListener(listener); } - + /** * Remove a PropertyChangeListener from the listener list. * This removes a PropertyChangeListener that was registered @@ -461,20 +461,20 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi if (--propertyChangeListenerCount == 0) { Frame.this.removeComponentListener(accessibleComponentHandler); accessibleComponentHandler = null; - + Frame.this.removeContainerListener(accessibleContainerHandler); accessibleContainerHandler = null; - + Frame.this.removeWindowListener(accessibleWindowHandler); accessibleWindowHandler = null; } super.removePropertyChangeListener(listener); } - + /** * Get the state set of this object. * - * @return an instance of AccessibleState containing the current state + * @return an instance of AccessibleState containing the current state * of the object * @see AccessibleState */ @@ -485,11 +485,11 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi } return states; } - + /* * AccessibleComponent */ - + /** Returns the background color of the object */ public java.awt.Color getBackground() { try { @@ -498,11 +498,11 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi return null; } } - + public void setBackground(java.awt.Color c) { // Not supported by UNO accessibility API } - + /** Returns the foreground color of the object */ public java.awt.Color getForeground() { try { @@ -511,118 +511,118 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi return null; } } - + public void setForeground(java.awt.Color c) { // Not supported by UNO accessibility API } - + public java.awt.Cursor getCursor() { // Not supported by UNO accessibility API return null; } - + public void setCursor(java.awt.Cursor cursor) { // Not supported by UNO accessibility API } - + public java.awt.Font getFont() { // FIXME return null; } - + public void setFont(java.awt.Font f) { // Not supported by UNO accessibility API } - + public java.awt.FontMetrics getFontMetrics(java.awt.Font f) { // FIXME return null; } - + public boolean isEnabled() { return Frame.this.isEnabled(); } - + public void setEnabled(boolean b) { // Not supported by UNO accessibility API } - + public boolean isVisible() { return Frame.this.isVisible(); } - + public void setVisible(boolean b) { // Not supported by UNO accessibility API } - + public boolean isShowing() { return Frame.this.isShowing(); } - + public boolean contains(java.awt.Point p) { try { - return unoAccessibleComponent.containsPoint(new com.sun.star.awt.Point(p.x, p.y)); + return unoAccessibleComponent.containsPoint(new com.sun.star.awt.Point(p.x, p.y)); } catch (com.sun.star.uno.RuntimeException e) { return false; } } - + /** Returns the location of the object on the screen. */ public java.awt.Point getLocationOnScreen() { try { - com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocationOnScreen(); + com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocationOnScreen(); return new java.awt.Point(unoPoint.X, unoPoint.Y); } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Gets the location of this component in the form of a point specifying the component's top-left corner */ public java.awt.Point getLocation() { try { - com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocation(); + com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocation(); return new java.awt.Point( unoPoint.X, unoPoint.Y ); } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Moves this component to a new location */ public void setLocation(java.awt.Point p) { // Not supported by UNO accessibility API } - + /** Gets the bounds of this component in the form of a Rectangle object */ public java.awt.Rectangle getBounds() { try { - com.sun.star.awt.Rectangle unoRect = unoAccessibleComponent.getBounds(); + com.sun.star.awt.Rectangle unoRect = unoAccessibleComponent.getBounds(); return new java.awt.Rectangle(unoRect.X, unoRect.Y, unoRect.Width, unoRect.Height); } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Moves and resizes this component to conform to the new bounding rectangle r */ public void setBounds(java.awt.Rectangle r) { // Not supported by UNO accessibility API } - + /** Returns the size of this component in the form of a Dimension object */ public java.awt.Dimension getSize() { try { - com.sun.star.awt.Size unoSize = unoAccessibleComponent.getSize(); + com.sun.star.awt.Size unoSize = unoAccessibleComponent.getSize(); return new java.awt.Dimension(unoSize.Width, unoSize.Height); } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Resizes this component so that it has width d.width and height d.height */ public void setSize(java.awt.Dimension d) { // Not supported by UNO accessibility API } - - /** Returns the Accessible child, if one exists, contained at the local coordinate Point */ + + /** Returns the Accessible child, if one exists, contained at the local coordinate Point */ public javax.accessibility.Accessible getAccessibleAt(java.awt.Point p) { try { java.awt.Component c = AccessibleObjectFactory.getAccessibleComponent( @@ -633,11 +633,11 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi return null; } } - + public boolean isFocusTraversable() { return Frame.this.isFocusable(); } - + public void requestFocus() { unoAccessibleComponent.grabFocus(); } diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Icon.java b/accessibility/bridge/org/openoffice/java/accessibility/Icon.java index 8ccc97def4d8..1dd151eaf074 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/Icon.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/Icon.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Label.java b/accessibility/bridge/org/openoffice/java/accessibility/Label.java index 9afaa0a1ae37..62c2155c71f9 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/Label.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/Label.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -64,10 +64,10 @@ public class Label extends Component implements javax.accessibility.Accessible { /** Gets the AccessibleText associated with this object presenting text on the display */ public javax.accessibility.AccessibleText getAccessibleText() { - + if (disposed) return null; - + try { XAccessibleText unoAccessibleText = (XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class, unoAccessibleContext); diff --git a/accessibility/bridge/org/openoffice/java/accessibility/List.java b/accessibility/bridge/org/openoffice/java/accessibility/List.java index c0583bf9b692..7a0a86d166d2 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/List.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/List.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -35,18 +35,18 @@ import com.sun.star.uno.UnoRuntime; import com.sun.star.accessibility.*; public class List extends DescendantManager implements javax.accessibility.Accessible { - + protected List(XAccessible xAccessible, XAccessibleContext xAccessibleContext) { super(xAccessible, xAccessibleContext); } - + protected void setActiveDescendant(javax.accessibility.Accessible descendant) { javax.accessibility.Accessible oldAD = activeDescendant; activeDescendant = descendant; firePropertyChange(AccessibleContext.ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, oldAD, descendant); } - + protected void setActiveDescendant(Object any) { javax.accessibility.Accessible descendant = null; try { @@ -59,11 +59,11 @@ public class List extends DescendantManager implements javax.accessibility.Acces if (Build.DEBUG) { try { if (Build.DEBUG) { - System.err.println("[List] retrieved active descendant event: new descendant is " + + System.err.println("[List] retrieved active descendant event: new descendant is " + unoAccessible.getAccessibleContext().getAccessibleName()); } } catch (java.lang.NullPointerException e) { - System.err.println("*** ERROR *** new active descendant not accessible"); + System.err.println("*** ERROR *** new active descendant not accessible"); } } } @@ -72,50 +72,50 @@ public class List extends DescendantManager implements javax.accessibility.Acces } catch (com.sun.star.lang.IllegalArgumentException e) { } } - + protected void add(XAccessible unoAccessible) { if (unoAccessible != null) { ListItem item = new ListItem(unoAccessible); - // The AccessBridge for Windows expects an instance of AccessibleContext + // The AccessBridge for Windows expects an instance of AccessibleContext // as parameters firePropertyChange(AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, null, item.getAccessibleContext()); } } - + protected void remove(XAccessible unoAccessible) { if (unoAccessible != null) { ListItem item = new ListItem(unoAccessible); - // The AccessBridge for Windows expects an instance of AccessibleContext + // The AccessBridge for Windows expects an instance of AccessibleContext // as parameters firePropertyChange(AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, item.getAccessibleContext(), null); } } - + protected void add(Object any) { try { add((XAccessible) AnyConverter.toObject(AccessibleObjectFactory.XAccessibleType, any)); } catch (com.sun.star.lang.IllegalArgumentException e) { } } - + protected void remove(Object any) { try { remove((XAccessible) AnyConverter.toObject(AccessibleObjectFactory.XAccessibleType, any)); } catch (com.sun.star.lang.IllegalArgumentException e) { } } - + /** * Update the proxy objects appropriatly on property change events */ protected class AccessibleListListener extends AccessibleDescendantManagerListener { - + protected AccessibleListListener() { super(); } - + /** Called by OpenOffice process to notify property changes */ public void notifyEvent(AccessibleEventObject event) { switch (event.EventId) { @@ -139,23 +139,23 @@ public class List extends DescendantManager implements javax.accessibility.Acces } } } - + protected XAccessibleEventListener createEventListener() { return new AccessibleListListener(); } - + /** Creates the AccessibleContext associated with this object */ public javax.accessibility.AccessibleContext createAccessibleContext() { return new AccessibleList(); } - + protected class AccessibleList extends AccessibleDescendantManager { - + /** Gets the role of this object */ public javax.accessibility.AccessibleRole getAccessibleRole() { return javax.accessibility.AccessibleRole.LIST; } - + /** Returns the specified Accessible child of the object */ public javax.accessibility.Accessible getAccessibleChild(int i) { javax.accessibility.Accessible child = null; @@ -175,12 +175,12 @@ public class List extends DescendantManager implements javax.accessibility.Acces } return child; } - + /* * AccessibleComponent */ - - /** Returns the Accessible child, if one exists, contained at the local coordinate Point */ + + /** Returns the Accessible child, if one exists, contained at the local coordinate Point */ public javax.accessibility.Accessible getAccessibleAt(java.awt.Point p) { javax.accessibility.Accessible child = null; try { @@ -199,11 +199,11 @@ public class List extends DescendantManager implements javax.accessibility.Acces return null; } } - + /* * AccessibleSelection */ - + /** Returns an Accessible representing the specified selected child of the object */ public javax.accessibility.Accessible getAccessibleSelection(int i) { javax.accessibility.Accessible child = null; @@ -229,15 +229,15 @@ public class List extends DescendantManager implements javax.accessibility.Acces return child; } } - + class ListItem extends java.awt.Component implements javax.accessibility.Accessible { - + protected XAccessible unoAccessible; - + public ListItem(XAccessible xAccessible) { unoAccessible = xAccessible; } - + public Object[] create(Object[] targetSet) { try { java.util.ArrayList list = new java.util.ArrayList(targetSet.length); @@ -254,9 +254,9 @@ public class List extends DescendantManager implements javax.accessibility.Acces return null; } } - + javax.accessibility.AccessibleContext accessibleContext = null; - + /** Returns the AccessibleContext associated with this object */ public javax.accessibility.AccessibleContext getAccessibleContext() { if (accessibleContext == null) { @@ -275,15 +275,15 @@ public class List extends DescendantManager implements javax.accessibility.Acces } return accessibleContext; } - + protected class AccessibleListItem extends javax.accessibility.AccessibleContext { - + XAccessibleContext unoAccessibleContext; - + public AccessibleListItem(XAccessibleContext xAccessibleContext) { unoAccessibleContext = xAccessibleContext; } - + /** Returns the accessible name of this object */ public String getAccessibleName() { try { @@ -292,12 +292,12 @@ public class List extends DescendantManager implements javax.accessibility.Acces return null; } } - + /** Sets the accessible name of this object */ public void setAccessibleName(String name) { // Not supported } - + /** Returns the accessible name of this object */ public String getAccessibleDescription() { try { @@ -306,12 +306,12 @@ public class List extends DescendantManager implements javax.accessibility.Acces return null; } } - + /** Sets the accessible name of this object */ public void setAccessibleDescription(String name) { // Not supported } - + /** Returns the accessible role of this object */ public javax.accessibility.AccessibleRole getAccessibleRole() { try { @@ -322,7 +322,7 @@ public class List extends DescendantManager implements javax.accessibility.Acces return null; } } - + /** Gets the locale of the component */ public java.util.Locale getLocale() throws java.awt.IllegalComponentStateException { try { @@ -334,16 +334,16 @@ public class List extends DescendantManager implements javax.accessibility.Acces return List.this.getLocale(); } } - + /** Gets the 0-based index of this object in its accessible parent */ public int getAccessibleIndexInParent() { try { return unoAccessibleContext.getAccessibleIndexInParent(); } catch (com.sun.star.uno.RuntimeException e) { return -1; - } + } } - + /** Returns the number of accessible children of the object. */ public int getAccessibleChildrenCount() { try { @@ -352,7 +352,7 @@ public class List extends DescendantManager implements javax.accessibility.Acces return 0; } } - + /** Returns the specified Accessible child of the object. */ public javax.accessibility.Accessible getAccessibleChild(int i) { javax.accessibility.Accessible child = null; @@ -370,7 +370,7 @@ public class List extends DescendantManager implements javax.accessibility.Acces } return child; } - + /** Returns the state set of this object */ public javax.accessibility.AccessibleStateSet getAccessibleStateSet() { try { @@ -380,68 +380,68 @@ public class List extends DescendantManager implements javax.accessibility.Acces return AccessibleStateAdapter.getDefunctStateSet(); } } - + /** Gets the AccessibleComponent associated with this object that has a graphical representation */ public javax.accessibility.AccessibleComponent getAccessibleComponent() { try { XAccessibleComponent unoAccessibleComponent = (XAccessibleComponent) UnoRuntime.queryInterface(XAccessibleComponent.class, unoAccessibleContext); - return (unoAccessibleComponent != null) ? + return (unoAccessibleComponent != null) ? new AccessibleComponentImpl(unoAccessibleComponent) : null; } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Gets the AccessibleAction associated with this object that has a graphical representation */ public javax.accessibility.AccessibleAction getAccessibleAction() { try { XAccessibleAction unoAccessibleAction = (XAccessibleAction) UnoRuntime.queryInterface(XAccessibleAction.class, unoAccessibleContext); - return (unoAccessibleAction != null) ? + return (unoAccessibleAction != null) ? new AccessibleActionImpl(unoAccessibleAction) : null; } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Gets the AccessibleText associated with this object that has a graphical representation */ public javax.accessibility.AccessibleText getAccessibleText() { - + if (disposed) return null; - + try { XAccessibleText unoAccessibleText = (XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class, unoAccessibleContext); - return (unoAccessibleText != null) ? + return (unoAccessibleText != null) ? new AccessibleTextImpl(unoAccessibleText) : null; } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Gets the AccessibleValue associated with this object that has a graphical representation */ public javax.accessibility.AccessibleValue getAccessibleValue() { try { XAccessibleValue unoAccessibleValue = (XAccessibleValue) UnoRuntime.queryInterface(XAccessibleValue.class, unoAccessibleContext); - return (unoAccessibleValue != null) ? + return (unoAccessibleValue != null) ? new AccessibleValueImpl(unoAccessibleValue) : null; } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Gets the AccessibleText associated with this object presenting text on the display */ public javax.accessibility.AccessibleIcon[] getAccessibleIcon() { try { - XAccessibleImage unoAccessibleImage = (XAccessibleImage) + XAccessibleImage unoAccessibleImage = (XAccessibleImage) UnoRuntime.queryInterface(XAccessibleImage.class, unoAccessibleContext); if (unoAccessibleImage != null) { javax.accessibility.AccessibleIcon[] icons = { new AccessibleIconImpl(unoAccessibleImage) }; return icons; - } + } } catch (com.sun.star.uno.RuntimeException e) { } return null; diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Menu.java b/accessibility/bridge/org/openoffice/java/accessibility/Menu.java index 346baca749b3..7ece90dcc360 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/Menu.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/Menu.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -68,7 +68,7 @@ public class Menu extends AbstractButton } protected synchronized void add(XAccessible unoAccessible) { - // The AccessBridge for Windows expects an instance of AccessibleContext + // The AccessBridge for Windows expects an instance of AccessibleContext // as parameters java.awt.Component c = getComponent(unoAccessible); @@ -85,7 +85,7 @@ public class Menu extends AbstractButton } protected synchronized void remove(XAccessible unoAccessible) { - // The AccessBridge for Windows expects an instance of AccessibleContext + // The AccessBridge for Windows expects an instance of AccessibleContext // as parameters java.awt.Component c = getComponent(unoAccessible); @@ -265,7 +265,7 @@ public class Menu extends AbstractButton public void addAccessibleSelection(int i) { try { javax.accessibility.Accessible a = getAccessibleChild(i); - + // selecting menu items invokes the click action in Java 1.5 if( a instanceof MenuItem ) a.getAccessibleContext().getAccessibleAction().doAccessibleAction(0); diff --git a/accessibility/bridge/org/openoffice/java/accessibility/MenuContainer.java b/accessibility/bridge/org/openoffice/java/accessibility/MenuContainer.java index ccae0ccadd04..090c122f3e9e 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/MenuContainer.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/MenuContainer.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -32,20 +32,20 @@ import javax.accessibility.AccessibleContext; import com.sun.star.uno.*; import com.sun.star.accessibility.*; -/** +/** * Specialized container for MenuBar and Popup-Menu(s) * FIXME: join with Menu ? */ public class MenuContainer extends Container implements javax.accessibility.Accessible { protected XAccessibleSelection unoAccessibleSelection = null; - + protected MenuContainer(javax.accessibility.AccessibleRole role, XAccessible xAccessible, XAccessibleContext xAccessibleContext) { super(role, xAccessible, xAccessibleContext); } - + protected class AccessibleMenuContainerListener extends AccessibleContainerListener { - + protected AccessibleMenuContainerListener() { super(); } @@ -63,18 +63,18 @@ public class MenuContainer extends Container implements javax.accessibility.Acce } } } - + protected XAccessibleEventListener createEventListener() { return new AccessibleMenuContainerListener(); } - + /** Creates the AccessibleContext associated with this object */ public javax.accessibility.AccessibleContext createAccessibleContext() { return new AccessibleMenuContainer(); } protected class AccessibleMenuContainer extends AccessibleContainer implements javax.accessibility.AccessibleSelection { - + protected AccessibleMenuContainer() { unoAccessibleSelection = (XAccessibleSelection) UnoRuntime.queryInterface(XAccessibleSelection.class, unoAccessibleContext); @@ -103,7 +103,7 @@ public class MenuContainer extends Container implements javax.accessibility.Acce public void addAccessibleSelection(int i) { try { javax.accessibility.Accessible a = getAccessibleChild(i); - + // selecting menu items invokes the click action in Java 1.5 if( a instanceof MenuItem ) a.getAccessibleContext().getAccessibleAction().doAccessibleAction(0); diff --git a/accessibility/bridge/org/openoffice/java/accessibility/MenuItem.java b/accessibility/bridge/org/openoffice/java/accessibility/MenuItem.java index 39aa1b73ce30..56886bcb78a2 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/MenuItem.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/MenuItem.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,24 +37,24 @@ class MenuItem extends ToggleButton { } protected class AccessibleMenuItemListener extends AccessibleUNOComponentListener { - + protected AccessibleMenuItemListener() { } - + protected void setComponentState(short state, boolean enable) { - + // #i56538# menu items in Java 1.5 are ARMED, not SELECTED if( state == com.sun.star.accessibility.AccessibleStateType.SELECTED ) fireStatePropertyChange(javax.accessibility.AccessibleState.ARMED, enable); else super.setComponentState(state, enable); - } + } }; protected XAccessibleEventListener createEventListener() { return new AccessibleMenuItemListener(); } - + /** Creates the AccessibleContext associated with this object */ public javax.accessibility.AccessibleContext createAccessibleContext() { return new AccessibleMenuItem(); @@ -74,7 +74,7 @@ class MenuItem extends ToggleButton { return super.getAccessibleIndexInParent(); } } - + /** * Gets the current state set of this object. * @@ -84,16 +84,16 @@ class MenuItem extends ToggleButton { */ public javax.accessibility.AccessibleStateSet getAccessibleStateSet() { javax.accessibility.AccessibleStateSet stateSet = super.getAccessibleStateSet(); - + // #i56538# menu items in Java do not have SELECTABLE .. stateSet.remove(javax.accessibility.AccessibleState.SELECTABLE); - + // .. and also ARMED insted of SELECTED if( stateSet.remove(javax.accessibility.AccessibleState.SELECTED) ) stateSet.add(javax.accessibility.AccessibleState.ARMED); - + return stateSet; } - + } } diff --git a/accessibility/bridge/org/openoffice/java/accessibility/NativeFrame.java b/accessibility/bridge/org/openoffice/java/accessibility/NativeFrame.java index bcc4c0dddebc..d11bf4a440e9 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/NativeFrame.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/NativeFrame.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Paragraph.java b/accessibility/bridge/org/openoffice/java/accessibility/Paragraph.java index 6088bf48eabe..62d5441e9eaf 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/Paragraph.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/Paragraph.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -33,16 +33,16 @@ import javax.accessibility.AccessibleText; import com.sun.star.uno.*; import com.sun.star.accessibility.*; -/** +/** */ public class Paragraph extends Container implements javax.accessibility.Accessible { - + protected Paragraph(XAccessible xAccessible, XAccessibleContext xAccessibleContext) { super(javax.accessibility.AccessibleRole.TEXT, xAccessible, xAccessibleContext); } - + protected class AccessibleParagraphListener extends AccessibleContainerListener { - + protected AccessibleParagraphListener() { super(); } @@ -62,7 +62,7 @@ public class Paragraph extends Container implements javax.accessibility.Accessib break; } } - + protected void handleVisibleDataChanged() { if (Paragraph.this.isFocusOwner()) { @@ -79,13 +79,13 @@ public class Paragraph extends Container implements javax.accessibility.Accessib } } } - + /** Called by OpenOffice process to notify property changes */ public void notifyEvent(AccessibleEventObject event) { switch (event.EventId) { case AccessibleEventId.CARET_CHANGED: firePropertyChange(accessibleContext.ACCESSIBLE_CARET_PROPERTY, - Component.toNumber(event.OldValue), + Component.toNumber(event.OldValue), Component.toNumber(event.NewValue)); break; case AccessibleEventId.VISIBLE_DATA_CHANGED: @@ -99,28 +99,28 @@ public class Paragraph extends Container implements javax.accessibility.Accessib } } } - + protected XAccessibleEventListener createEventListener() { return new AccessibleParagraphListener(); } - + /** Creates the AccessibleContext associated with this object */ public javax.accessibility.AccessibleContext createAccessibleContext() { return new AccessibleParagraph(); } protected class AccessibleParagraph extends AccessibleContainer { - + protected AccessibleParagraph() { // Don't do the queryInterface on XAccessibleText already .. super(false); - /* Since getAccessibleText() is heavily used by the java access + /* Since getAccessibleText() is heavily used by the java access * bridge for gnome and the gnome at-tools, we do a query interface * here and remember the result. */ accessibleText = AccessibleHypertextImpl.get(unoAccessibleContext); } - + /* * AccessibleContext */ @@ -132,12 +132,12 @@ public class Paragraph extends Container implements javax.accessibility.Accessib /** Gets the AccessibleEditableText associated with this object presenting text on the display */ public javax.accessibility.AccessibleEditableText getAccessibleEditableText() { - + if (disposed) return null; - + try { - XAccessibleEditableText unoAccessibleText = (XAccessibleEditableText) + XAccessibleEditableText unoAccessibleText = (XAccessibleEditableText) UnoRuntime.queryInterface(XAccessibleEditableText.class, unoAccessibleComponent); if (unoAccessibleText != null) { @@ -149,28 +149,28 @@ public class Paragraph extends Container implements javax.accessibility.Accessib return null; } } - + /** Gets the AccessibleAction associated with this object that has a graphical representation */ public javax.accessibility.AccessibleAction getAccessibleAction() { try { XAccessibleAction unoAccessibleAction = (XAccessibleAction) UnoRuntime.queryInterface(XAccessibleAction.class, unoAccessibleComponent); - return (unoAccessibleAction != null) ? + return (unoAccessibleAction != null) ? new AccessibleActionImpl(unoAccessibleAction) : null; } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Returns the relation set of this object */ public javax.accessibility.AccessibleRelationSet getAccessibleRelationSet() { try { - XAccessibleRelationSet unoAccessibleRelationSet = + XAccessibleRelationSet unoAccessibleRelationSet = unoAccessible.getAccessibleContext().getAccessibleRelationSet(); if (unoAccessibleRelationSet == null) { return super.getAccessibleRelationSet(); } - + javax.accessibility.AccessibleRelationSet relationSet = new javax.accessibility.AccessibleRelationSet(); int count = unoAccessibleRelationSet.getRelationCount(); for (int i = 0; i < count; i++) { diff --git a/accessibility/bridge/org/openoffice/java/accessibility/RadioButton.java b/accessibility/bridge/org/openoffice/java/accessibility/RadioButton.java index 3daeee6cd8de..53f4bc1285fb 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/RadioButton.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/RadioButton.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/bridge/org/openoffice/java/accessibility/ScrollBar.java b/accessibility/bridge/org/openoffice/java/accessibility/ScrollBar.java index 83b17d698201..68e0a7ab0ff6 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/ScrollBar.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/ScrollBar.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,25 +34,25 @@ import javax.swing.SwingConstants; import com.sun.star.uno.*; import com.sun.star.accessibility.*; -/** +/** */ public class ScrollBar extends Component implements SwingConstants, javax.accessibility.Accessible { - + public ScrollBar(XAccessible xAccessible, XAccessibleContext xAccessibleContext) { super(xAccessible, xAccessibleContext); } - + /** Creates the AccessibleContext associated with this object */ public javax.accessibility.AccessibleContext createAccessibleContext() { return new AccessibleScrollBar(); } - - protected class AccessibleScrollBar extends AccessibleUNOComponent implements - javax.accessibility.AccessibleAction { - + + protected class AccessibleScrollBar extends AccessibleUNOComponent implements + javax.accessibility.AccessibleAction { + protected XAccessibleAction unoAccessibleAction; protected int actionCount = 0; - + /** * Though the class is abstract, this should be called by all sub-classes */ @@ -64,37 +64,37 @@ public class ScrollBar extends Component implements SwingConstants, javax.access actionCount = unoAccessibleAction.getAccessibleActionCount(); } } - + /* * AccessibleContext */ - + /** Gets the role of this object */ public javax.accessibility.AccessibleRole getAccessibleRole() { return javax.accessibility.AccessibleRole.SCROLL_BAR; } - + /** Gets the AccessibleValue associated with this object that has a graphical representation */ public javax.accessibility.AccessibleValue getAccessibleValue() { try { XAccessibleValue unoAccessibleValue = (XAccessibleValue) UnoRuntime.queryInterface(XAccessibleValue.class, unoAccessibleContext); - return (unoAccessibleValue != null) ? + return (unoAccessibleValue != null) ? new AccessibleValueImpl(unoAccessibleValue) : null; } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Gets the AccessibleAction associated with this object that supports one or more actions */ public javax.accessibility.AccessibleAction getAccessibleAction() { return this; } - + /* * AccessibleAction */ - + /** Performs the specified Action on the object */ public boolean doAccessibleAction(int param) { if (param < actionCount) { @@ -105,7 +105,7 @@ public class ScrollBar extends Component implements SwingConstants, javax.access } return false; } - + /** Returns a description of the specified action of the object */ public java.lang.String getAccessibleActionDescription(int param) { if(param < actionCount) { @@ -116,7 +116,7 @@ public class ScrollBar extends Component implements SwingConstants, javax.access } return null; } - + /** Returns the number of accessible actions available in this object */ public int getAccessibleActionCount() { return actionCount; diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Separator.java b/accessibility/bridge/org/openoffice/java/accessibility/Separator.java index 892768e07cbb..54ddcf0b0313 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/Separator.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/Separator.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Table.java b/accessibility/bridge/org/openoffice/java/accessibility/Table.java index 24ea912d4217..d304cb7cd662 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/Table.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/Table.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,18 +34,18 @@ import com.sun.star.uno.UnoRuntime; import com.sun.star.accessibility.*; public class Table extends DescendantManager implements javax.accessibility.Accessible { - + protected Table(XAccessible xAccessible, XAccessibleContext xAccessibleContext, boolean multiselectable) { super(xAccessible, xAccessibleContext, multiselectable); } - + protected void setActiveDescendant(javax.accessibility.Accessible descendant) { javax.accessibility.Accessible oldAD = activeDescendant; activeDescendant = descendant; firePropertyChange(javax.accessibility.AccessibleContext.ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, oldAD, descendant); } - + protected void setActiveDescendant(Object any) { javax.accessibility.Accessible descendant = null; try { @@ -61,50 +61,50 @@ public class Table extends DescendantManager implements javax.accessibility.Acce } catch (com.sun.star.lang.IllegalArgumentException e) { } } - + protected void add(XAccessible unoAccessible) { if (unoAccessible != null) { TableCell cell = new TableCell(unoAccessible); - // The AccessBridge for Windows expects an instance of AccessibleContext + // The AccessBridge for Windows expects an instance of AccessibleContext // as parameters firePropertyChange(javax.accessibility.AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, null, cell.getAccessibleContext()); } } - + protected void remove(XAccessible unoAccessible) { if (unoAccessible != null) { TableCell cell = new TableCell(unoAccessible); - // The AccessBridge for Windows expects an instance of AccessibleContext + // The AccessBridge for Windows expects an instance of AccessibleContext // as parameters firePropertyChange(javax.accessibility.AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, cell.getAccessibleContext(), null); } } - + protected void add(Object any) { try { add((XAccessible) AnyConverter.toObject(AccessibleObjectFactory.XAccessibleType, any)); } catch (com.sun.star.lang.IllegalArgumentException e) { } } - + protected void remove(Object any) { try { remove((XAccessible) AnyConverter.toObject(AccessibleObjectFactory.XAccessibleType, any)); } catch (com.sun.star.lang.IllegalArgumentException e) { } } - + /** * Update the proxy objects appropriatly on property change events */ protected class AccessibleTableListener extends AccessibleDescendantManagerListener { - + protected AccessibleTableListener() { super(); } - + /** Called by OpenOffice process to notify property changes */ public void notifyEvent(AccessibleEventObject event) { switch (event.EventId) { @@ -124,24 +124,24 @@ public class Table extends DescendantManager implements javax.accessibility.Acce } } } - + protected XAccessibleEventListener createEventListener() { return new AccessibleTableListener(); } - + /** Creates the AccessibleContext associated with this object */ public javax.accessibility.AccessibleContext createAccessibleContext() { return new AccessibleTable(); } - + protected class AccessibleTable extends AccessibleDescendantManager implements javax.accessibility.AccessibleExtendedTable { - + protected XAccessibleTable unoAccessibleTable; - + public AccessibleTable() { unoAccessibleTable = (XAccessibleTable) UnoRuntime.queryInterface(XAccessibleTable.class, unoAccessibleContext); } - + /** Gets the role of this object */ public javax.accessibility.AccessibleRole getAccessibleRole() { return javax.accessibility.AccessibleRole.TABLE; @@ -151,7 +151,7 @@ public class Table extends DescendantManager implements javax.accessibility.Acce public javax.accessibility.AccessibleTable getAccessibleTable() { return this; } - + /** Returns the specified Accessible child of the object */ public javax.accessibility.Accessible getAccessibleChild(int i) { javax.accessibility.Accessible child = null; @@ -171,12 +171,12 @@ public class Table extends DescendantManager implements javax.accessibility.Acce } return child; } - + /* * AccessibleComponent */ - /** Returns the Accessible child, if one exists, contained at the local coordinate Point */ + /** Returns the Accessible child, if one exists, contained at the local coordinate Point */ public javax.accessibility.Accessible getAccessibleAt(java.awt.Point p) { javax.accessibility.Accessible child = null; try { @@ -195,11 +195,11 @@ public class Table extends DescendantManager implements javax.accessibility.Acce } return child; } - + /* * AccessibleSelection */ - + /** Returns an Accessible representing the specified selected child of the object */ public javax.accessibility.Accessible getAccessibleSelection(int i) { javax.accessibility.Accessible child = null; @@ -219,11 +219,11 @@ public class Table extends DescendantManager implements javax.accessibility.Acce } return child; } - + /* * AccessibleTable */ - + /** Returns the Accessible at a specified row and column in the table. */ public javax.accessibility.Accessible getAccessibleAt(int r, int c) { javax.accessibility.Accessible child = null; @@ -242,7 +242,7 @@ public class Table extends DescendantManager implements javax.accessibility.Acce } catch (com.sun.star.uno.RuntimeException e) { } return child; - } + } /** Returns the caption for the table. */ public javax.accessibility.Accessible getAccessibleCaption() { @@ -271,7 +271,7 @@ public class Table extends DescendantManager implements javax.accessibility.Acce } } - /** + /** * Returns the number of columns occupied by the Accessible * at a specified row and column in the table. */ @@ -313,7 +313,7 @@ public class Table extends DescendantManager implements javax.accessibility.Acce } /** - * Returns the number of rows occupied by the Accessible + * Returns the number of rows occupied by the Accessible * at a specified row and column in the table. */ public int getAccessibleRowExtentAt(int r, int c) { @@ -378,9 +378,9 @@ public class Table extends DescendantManager implements javax.accessibility.Acce } } - /** - * Returns a boolean value indicating whether the accessible - * at a specified row and column is selected. + /** + * Returns a boolean value indicating whether the accessible + * at a specified row and column is selected. */ public boolean isAccessibleSelected(int r, int c) { try { @@ -453,17 +453,17 @@ public class Table extends DescendantManager implements javax.accessibility.Acce } catch (com.sun.star.uno.RuntimeException e) { return -1; } - } + } } - + class TableCell extends java.awt.Component implements javax.accessibility.Accessible { - + protected XAccessible unoAccessible; - + public TableCell(XAccessible xAccessible) { unoAccessible = xAccessible; } - + public Object[] create(Object[] targetSet) { try { java.util.ArrayList list = new java.util.ArrayList(targetSet.length); @@ -480,9 +480,9 @@ public class Table extends DescendantManager implements javax.accessibility.Acce return null; } } - + javax.accessibility.AccessibleContext accessibleContext = null; - + /** Returns the AccessibleContext associated with this object */ public javax.accessibility.AccessibleContext getAccessibleContext() { if (accessibleContext == null) { @@ -500,15 +500,15 @@ public class Table extends DescendantManager implements javax.accessibility.Acce } return accessibleContext; } - + protected class AccessibleTableCell extends javax.accessibility.AccessibleContext { - + XAccessibleContext unoAccessibleContext; - + public AccessibleTableCell(XAccessibleContext xAccessibleContext) { unoAccessibleContext = xAccessibleContext; } - + /** Returns the accessible name of this object */ public String getAccessibleName() { try { @@ -517,12 +517,12 @@ public class Table extends DescendantManager implements javax.accessibility.Acce return null; } } - + /** Sets the accessible name of this object */ public void setAccessibleName(String name) { // Not supported } - + /** Returns the accessible name of this object */ public String getAccessibleDescription() { try { @@ -531,12 +531,12 @@ public class Table extends DescendantManager implements javax.accessibility.Acce return null; } } - + /** Sets the accessible name of this object */ public void setAccessibleDescription(String name) { // Not supported } - + /** Returns the accessible role of this object */ public javax.accessibility.AccessibleRole getAccessibleRole() { try { @@ -547,7 +547,7 @@ public class Table extends DescendantManager implements javax.accessibility.Acce return null; } } - + /** Gets the locale of the component */ public java.util.Locale getLocale() throws java.awt.IllegalComponentStateException { try { @@ -559,16 +559,16 @@ public class Table extends DescendantManager implements javax.accessibility.Acce return Table.this.getLocale(); } } - + /** Gets the 0-based index of this object in its accessible parent */ public int getAccessibleIndexInParent() { try { return unoAccessibleContext.getAccessibleIndexInParent(); } catch (com.sun.star.uno.RuntimeException e) { return -1; - } + } } - + /** Returns the number of accessible children of the object. */ public int getAccessibleChildrenCount() { try { @@ -577,7 +577,7 @@ public class Table extends DescendantManager implements javax.accessibility.Acce return 0; } } - + /** Returns the specified Accessible child of the object. */ public javax.accessibility.Accessible getAccessibleChild(int i) { javax.accessibility.Accessible child = null; @@ -595,7 +595,7 @@ public class Table extends DescendantManager implements javax.accessibility.Acce } return child; } - + /** Returns the state set of this object */ public javax.accessibility.AccessibleStateSet getAccessibleStateSet() { try { @@ -605,7 +605,7 @@ public class Table extends DescendantManager implements javax.accessibility.Acce return AccessibleStateAdapter.getDefunctStateSet(); } } - + /** Returns the relation set of this object */ public javax.accessibility.AccessibleRelationSet getAccessibleRelationSet() { try { @@ -613,7 +613,7 @@ public class Table extends DescendantManager implements javax.accessibility.Acce if (unoAccessibleRelationSet == null) { return null; } - + javax.accessibility.AccessibleRelationSet relationSet = new javax.accessibility.AccessibleRelationSet(); int count = unoAccessibleRelationSet.getRelationCount(); for (int i = 0; i < count; i++) { @@ -655,68 +655,68 @@ public class Table extends DescendantManager implements javax.accessibility.Acce return null; } } - + /** Gets the AccessibleComponent associated with this object that has a graphical representation */ public javax.accessibility.AccessibleComponent getAccessibleComponent() { try { XAccessibleComponent unoAccessibleComponent = (XAccessibleComponent) UnoRuntime.queryInterface(XAccessibleComponent.class, unoAccessibleContext); - return (unoAccessibleComponent != null) ? + return (unoAccessibleComponent != null) ? new AccessibleComponentImpl(unoAccessibleComponent) : null; } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Gets the AccessibleAction associated with this object that has a graphical representation */ public javax.accessibility.AccessibleAction getAccessibleAction() { try { XAccessibleAction unoAccessibleAction = (XAccessibleAction) UnoRuntime.queryInterface(XAccessibleAction.class, unoAccessibleContext); - return (unoAccessibleAction != null) ? + return (unoAccessibleAction != null) ? new AccessibleActionImpl(unoAccessibleAction) : null; } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Gets the AccessibleText associated with this object that has a graphical representation */ public javax.accessibility.AccessibleText getAccessibleText() { - + if (disposed) return null; - + try { XAccessibleText unoAccessibleText = (XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class, unoAccessibleContext); - return (unoAccessibleText != null) ? + return (unoAccessibleText != null) ? new AccessibleTextImpl(unoAccessibleText) : null; } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Gets the AccessibleValue associated with this object that has a graphical representation */ public javax.accessibility.AccessibleValue getAccessibleValue() { try { XAccessibleValue unoAccessibleValue = (XAccessibleValue) UnoRuntime.queryInterface(XAccessibleValue.class, unoAccessibleContext); - return (unoAccessibleValue != null) ? + return (unoAccessibleValue != null) ? new AccessibleValueImpl(unoAccessibleValue) : null; } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Gets the AccessibleText associated with this object presenting text on the display */ public javax.accessibility.AccessibleIcon[] getAccessibleIcon() { try { - XAccessibleImage unoAccessibleImage = (XAccessibleImage) + XAccessibleImage unoAccessibleImage = (XAccessibleImage) UnoRuntime.queryInterface(XAccessibleImage.class, unoAccessibleContext); if (unoAccessibleImage != null) { javax.accessibility.AccessibleIcon[] icons = { new AccessibleIconImpl(unoAccessibleImage) }; return icons; - } + } } catch (com.sun.star.uno.RuntimeException e) { } return null; diff --git a/accessibility/bridge/org/openoffice/java/accessibility/TextComponent.java b/accessibility/bridge/org/openoffice/java/accessibility/TextComponent.java index a142297c4c12..86fa4e60428e 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/TextComponent.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/TextComponent.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -30,20 +30,20 @@ package org.openoffice.java.accessibility; import com.sun.star.uno.UnoRuntime; import com.sun.star.accessibility.*; -/** +/** */ public class TextComponent extends Component implements javax.accessibility.Accessible { - + protected TextComponent(XAccessible xAccessible, XAccessibleContext xAccessibleContext) { super(xAccessible, xAccessibleContext); } - + protected class AccessibleTextComponentListener extends AccessibleUNOComponentListener { - + protected AccessibleTextComponentListener() { super(); } - + protected void setComponentState(short state, boolean enable) { switch (state) { case AccessibleStateType.EDITABLE: @@ -60,42 +60,42 @@ public class TextComponent extends Component implements javax.accessibility.Acce } } } - + protected XAccessibleEventListener createEventListener() { return new AccessibleTextComponentListener(); } - + /** Creates the AccessibleContext associated with this object */ public javax.accessibility.AccessibleContext createAccessibleContext() { return new AccessibleTextComponent(); } - + protected class AccessibleTextComponent extends AccessibleUNOComponent { - + /** * Though the class is abstract, this should be called by all sub-classes */ protected AccessibleTextComponent() { super(); } - + /* * AccessibleContext */ - + /** Gets the role of this object */ public javax.accessibility.AccessibleRole getAccessibleRole() { return javax.accessibility.AccessibleRole.TEXT; } - + /** Gets the AccessibleText associated with this object presenting text on the display */ public javax.accessibility.AccessibleText getAccessibleText() { - + if (disposed) return null; - + try { - XAccessibleText unoAccessibleText = (XAccessibleText) + XAccessibleText unoAccessibleText = (XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class,unoAccessibleComponent); if (unoAccessibleText != null) { return new AccessibleTextImpl(unoAccessibleText); @@ -106,11 +106,11 @@ public class TextComponent extends Component implements javax.accessibility.Acce return null; } } - + /** Gets the AccessibleEditableText associated with this object presenting text on the display */ public javax.accessibility.AccessibleEditableText getAccessibleEditableText() { try { - XAccessibleEditableText unoAccessibleText = (XAccessibleEditableText) + XAccessibleEditableText unoAccessibleText = (XAccessibleEditableText) UnoRuntime.queryInterface(XAccessibleEditableText.class,unoAccessibleComponent); if (unoAccessibleText != null) { return new AccessibleEditableTextImpl(unoAccessibleText); @@ -121,28 +121,28 @@ public class TextComponent extends Component implements javax.accessibility.Acce return null; } } - + /** Gets the AccessibleAction associated with this object that has a graphical representation */ public javax.accessibility.AccessibleAction getAccessibleAction() { try { XAccessibleAction unoAccessibleAction = (XAccessibleAction) UnoRuntime.queryInterface(XAccessibleAction.class, unoAccessibleComponent); - return (unoAccessibleAction != null) ? + return (unoAccessibleAction != null) ? new AccessibleActionImpl(unoAccessibleAction) : null; } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Returns the relation set of this object */ public javax.accessibility.AccessibleRelationSet getAccessibleRelationSet() { try { - XAccessibleRelationSet unoAccessibleRelationSet = + XAccessibleRelationSet unoAccessibleRelationSet = unoAccessible.getAccessibleContext().getAccessibleRelationSet(); if (unoAccessibleRelationSet == null) { return super.getAccessibleRelationSet(); } - + javax.accessibility.AccessibleRelationSet relationSet = new javax.accessibility.AccessibleRelationSet(); int count = unoAccessibleRelationSet.getRelationCount(); for (int i = 0; i < count; i++) { diff --git a/accessibility/bridge/org/openoffice/java/accessibility/ToggleButton.java b/accessibility/bridge/org/openoffice/java/accessibility/ToggleButton.java index bac8035a2ece..ff8c871373cf 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/ToggleButton.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/ToggleButton.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/bridge/org/openoffice/java/accessibility/ToolTip.java b/accessibility/bridge/org/openoffice/java/accessibility/ToolTip.java index 071a6a37fd98..9391d0f6cc87 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/ToolTip.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/ToolTip.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -58,10 +58,10 @@ public class ToolTip extends Component implements javax.accessibility.Accessible /** Gets the AccessibleText associated with this object presenting text on the display */ public javax.accessibility.AccessibleText getAccessibleText() { - + if (disposed) return null; - + try { XAccessibleText unoAccessibleText = (XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class, unoAccessibleComponent); diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Tree.java b/accessibility/bridge/org/openoffice/java/accessibility/Tree.java index 5fdd5a196397..b93752679190 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/Tree.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/Tree.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -35,18 +35,18 @@ import com.sun.star.uno.UnoRuntime; import com.sun.star.accessibility.*; public class Tree extends DescendantManager implements javax.accessibility.Accessible { - + protected Tree(XAccessible xAccessible, XAccessibleContext xAccessibleContext) { super(xAccessible, xAccessibleContext); } - + protected void setActiveDescendant(javax.accessibility.Accessible descendant) { javax.accessibility.Accessible oldAD = activeDescendant; activeDescendant = descendant; - firePropertyChange(AccessibleContext.ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, + firePropertyChange(AccessibleContext.ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, oldAD, descendant); } - + protected void setActiveDescendant(Object any) { javax.accessibility.Accessible descendant = null; try { @@ -62,28 +62,28 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces } catch (com.sun.star.lang.IllegalArgumentException e) { } } - + protected void add(XAccessible unoAccessible) { if (unoAccessible != null) { firePropertyChange(AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, null, new TreeItem(unoAccessible)); } } - + protected void remove(XAccessible unoAccessible) { if (unoAccessible != null) { firePropertyChange(AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, new TreeItem(unoAccessible), null); } } - + protected void add(Object any) { try { add((XAccessible) AnyConverter.toObject(AccessibleObjectFactory.XAccessibleType, any)); } catch (com.sun.star.lang.IllegalArgumentException e) { } } - + protected void remove(Object any) { try { remove((XAccessible) AnyConverter.toObject(AccessibleObjectFactory.XAccessibleType, any)); @@ -95,11 +95,11 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces * Update the proxy objects appropriatly on property change events */ protected class AccessibleTreeListener extends AccessibleDescendantManagerListener { - + protected AccessibleTreeListener() { super(); } - + /** Called by OpenOffice process to notify property changes */ public void notifyEvent(AccessibleEventObject event) { switch (event.EventId) { @@ -130,20 +130,20 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces } } } - + protected XAccessibleEventListener createEventListener() { return new AccessibleTreeListener(); } - + /** Creates the AccessibleContext associated with this object */ public javax.accessibility.AccessibleContext createAccessibleContext() { return new AccessibleTree(); } - + protected class AccessibleTree extends AccessibleDescendantManager implements javax.accessibility.AccessibleExtendedTable { protected XAccessibleTable unoAccessibleTable; - + public AccessibleTree() { unoAccessibleTable = (XAccessibleTable) UnoRuntime.queryInterface(XAccessibleTable.class, unoAccessibleContext); } @@ -151,7 +151,7 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces /* * AccessibleContext */ - + /** Gets the role of this object */ public javax.accessibility.AccessibleRole getAccessibleRole() { return javax.accessibility.AccessibleRole.TREE; @@ -161,7 +161,7 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces public javax.accessibility.AccessibleTable getAccessibleTable() { return ( unoAccessibleTable != null ) ? this : null; } - + /** Returns the specified Accessible child of the object */ public javax.accessibility.Accessible getAccessibleChild(int i) { javax.accessibility.Accessible child = null; @@ -185,8 +185,8 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces /* * AccessibleComponent */ - - /** Returns the Accessible child, if one exists, contained at the local coordinate Point */ + + /** Returns the Accessible child, if one exists, contained at the local coordinate Point */ public javax.accessibility.Accessible getAccessibleAt(java.awt.Point p) { javax.accessibility.Accessible child = null; try { @@ -205,11 +205,11 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces } return child; } - + /* * AccessibleSelection */ - + /** Returns an Accessible representing the specified selected child of the object */ public javax.accessibility.Accessible getAccessibleSelection(int i) { javax.accessibility.Accessible child = null; @@ -229,11 +229,11 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces } return child; } - + /* * AccessibleTable */ - + /** Returns the Accessible at a specified row and column in the table. */ public javax.accessibility.Accessible getAccessibleAt(int r, int c) { javax.accessibility.Accessible child = null; @@ -252,7 +252,7 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces } catch (com.sun.star.uno.RuntimeException e) { } return child; - } + } /** Returns the caption for the table. */ public javax.accessibility.Accessible getAccessibleCaption() { @@ -281,7 +281,7 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces } } - /** + /** * Returns the number of columns occupied by the Accessible * at a specified row and column in the table. */ @@ -323,7 +323,7 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces } /** - * Returns the number of rows occupied by the Accessible + * Returns the number of rows occupied by the Accessible * at a specified row and column in the table. */ public int getAccessibleRowExtentAt(int r, int c) { @@ -388,9 +388,9 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces } } - /** - * Returns a boolean value indicating whether the accessible - * at a specified row and column is selected. + /** + * Returns a boolean value indicating whether the accessible + * at a specified row and column is selected. */ public boolean isAccessibleSelected(int r, int c) { try { @@ -465,15 +465,15 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces } } } - + class TreeItem extends java.awt.Component implements javax.accessibility.Accessible { - + protected XAccessible unoAccessible; - + public TreeItem(XAccessible xAccessible) { unoAccessible = xAccessible; } - + public Object[] create(Object[] targetSet) { try { java.util.ArrayList list = new java.util.ArrayList(targetSet.length); @@ -490,9 +490,9 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces return null; } } - + javax.accessibility.AccessibleContext accessibleContext = null; - + /** Returns the AccessibleContext associated with this object */ public javax.accessibility.AccessibleContext getAccessibleContext() { if (accessibleContext == null) { @@ -510,19 +510,19 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces } return accessibleContext; } - - protected class AccessibleTreeItem extends javax.accessibility.AccessibleContext + + protected class AccessibleTreeItem extends javax.accessibility.AccessibleContext implements javax.accessibility.AccessibleSelection { - + XAccessibleContext unoAccessibleContext; XAccessibleSelection unoAccessibleSelection; - + public AccessibleTreeItem(XAccessibleContext xAccessibleContext) { unoAccessibleContext = xAccessibleContext; - unoAccessibleSelection = (XAccessibleSelection) + unoAccessibleSelection = (XAccessibleSelection) UnoRuntime.queryInterface(XAccessibleSelection.class, xAccessibleContext); } - + /** Returns the accessible name of this object */ public String getAccessibleName() { try { @@ -531,12 +531,12 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces return null; } } - + /** Sets the accessible name of this object */ public void setAccessibleName(String name) { // Not supported } - + /** Returns the accessible name of this object */ public String getAccessibleDescription() { try { @@ -545,12 +545,12 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces return null; } } - + /** Sets the accessible name of this object */ public void setAccessibleDescription(String name) { // Not supported } - + /** Returns the accessible role of this object */ public javax.accessibility.AccessibleRole getAccessibleRole() { try { @@ -561,7 +561,7 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces return null; } } - + /** Gets the locale of the component */ public java.util.Locale getLocale() throws java.awt.IllegalComponentStateException { try { @@ -573,16 +573,16 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces return Tree.this.getLocale(); } } - + /** Gets the 0-based index of this object in its accessible parent */ public int getAccessibleIndexInParent() { try { return unoAccessibleContext.getAccessibleIndexInParent(); } catch (com.sun.star.uno.RuntimeException e) { return -1; - } + } } - + /** Returns the number of accessible children of the object. */ public int getAccessibleChildrenCount() { try { @@ -591,7 +591,7 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces return 0; } } - + /** Returns the specified Accessible child of the object. */ public javax.accessibility.Accessible getAccessibleChild(int i) { javax.accessibility.Accessible child = null; @@ -609,7 +609,7 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces } return child; } - + /** Returns the state set of this object */ public javax.accessibility.AccessibleStateSet getAccessibleStateSet() { try { @@ -619,82 +619,82 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces return AccessibleStateAdapter.getDefunctStateSet(); } } - + /** Gets the AccessibleComponent associated with this object that has a graphical representation */ public javax.accessibility.AccessibleComponent getAccessibleComponent() { try { XAccessibleComponent unoAccessibleComponent = (XAccessibleComponent) UnoRuntime.queryInterface(XAccessibleComponent.class, unoAccessibleContext); - return (unoAccessibleComponent != null) ? + return (unoAccessibleComponent != null) ? new AccessibleComponentImpl(unoAccessibleComponent) : null; } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Returns the AccessibleSelection interface for this object */ public javax.accessibility.AccessibleSelection getAccessibleSelection() { return (unoAccessibleSelection != null) ? this : null; } - + /** Gets the AccessibleAction associated with this object that has a graphical representation */ public javax.accessibility.AccessibleAction getAccessibleAction() { try { XAccessibleAction unoAccessibleAction = (XAccessibleAction) UnoRuntime.queryInterface(XAccessibleAction.class, unoAccessibleContext); - return (unoAccessibleAction != null) ? + return (unoAccessibleAction != null) ? new AccessibleActionImpl(unoAccessibleAction) : null; } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Gets the AccessibleText associated with this object that has a graphical representation */ public javax.accessibility.AccessibleText getAccessibleText() { - + if (disposed) return null; - + try { XAccessibleText unoAccessibleText = (XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class, unoAccessibleContext); - return (unoAccessibleText != null) ? + return (unoAccessibleText != null) ? new AccessibleTextImpl(unoAccessibleText) : null; } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Gets the AccessibleValue associated with this object that has a graphical representation */ public javax.accessibility.AccessibleValue getAccessibleValue() { try { XAccessibleValue unoAccessibleValue = (XAccessibleValue) UnoRuntime.queryInterface(XAccessibleValue.class, unoAccessibleContext); - return (unoAccessibleValue != null) ? + return (unoAccessibleValue != null) ? new AccessibleValueImpl(unoAccessibleValue) : null; } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Gets the AccessibleText associated with this object presenting text on the display */ public javax.accessibility.AccessibleIcon[] getAccessibleIcon() { try { - XAccessibleImage unoAccessibleImage = (XAccessibleImage) + XAccessibleImage unoAccessibleImage = (XAccessibleImage) UnoRuntime.queryInterface(XAccessibleImage.class, unoAccessibleContext); if (unoAccessibleImage != null) { javax.accessibility.AccessibleIcon[] icons = { new AccessibleIconImpl(unoAccessibleImage) }; return icons; - } + } } catch (com.sun.star.uno.RuntimeException e) { } return null; } - + /* * AccessibleSelection */ - + /** Returns an Accessible representing the specified selected child of the object */ public javax.accessibility.Accessible getAccessibleSelection(int i) { javax.accessibility.Accessible child = null; @@ -708,7 +708,7 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces } return child; } - + /** Adds the specified Accessible child of the object to the object's selection */ public void addAccessibleSelection(int i) { try { diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Window.java b/accessibility/bridge/org/openoffice/java/accessibility/Window.java index ef44c3380a48..22a701963960 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/Window.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/Window.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -32,17 +32,17 @@ import com.sun.star.accessibility.*; public class Window extends java.awt.Window implements javax.accessibility.Accessible, NativeFrame { protected XAccessibleComponent unoAccessibleComponent; - + boolean opened = false; boolean visible = false; - + java.awt.EventQueue eventQueue = null; - + public Window(java.awt.Window owner, XAccessibleComponent xAccessibleComponent) { super(owner); initialize(xAccessibleComponent); } - + private void initialize(XAccessibleComponent xAccessibleComponent) { unoAccessibleComponent = xAccessibleComponent; eventQueue = java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue(); @@ -53,27 +53,27 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces broadcaster.addEventListener(new AccessibleWindowListener()); } } - + java.awt.Component initialComponent = null; - + public java.awt.Component getInitialComponent() { if (Build.DEBUG) { System.err.println("returning initial component object of class: " + initialComponent.getClass().getName()); } return initialComponent; } - + public void setInitialComponent(java.awt.Component c) { initialComponent = c; } - + public Integer getHWND() { return null; } - + /** - * Determines whether this <code>Component</code> is showing on screen. - * This means that the component must be visible, and it must be in a + * 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 @@ -86,10 +86,10 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces } return false; } - + /** * Makes this <code>Component</code> displayable by connecting it to a - * native screen resource. + * native screen resource. * This method is called internally by the toolkit and should * not be called directly by programs. * @see #isDisplayable @@ -99,10 +99,10 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces public void addNotify() { // createHierarchyEvents(0, null, null, 0, false); } - - /** + + /** * Makes this <code>Component</code> undisplayable by destroying it native - * screen resource. + * screen resource. * This method is called by the toolkit internally and should * not be called directly by programs. * @see #isDisplayable @@ -111,7 +111,7 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces */ public void removeNotify() { } - + /** * Determines if the object is visible. Note: this means that the * object intends to be visible; however, it may not in fact be @@ -124,7 +124,7 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces public boolean isVisible(){ return visible; } - + /** * Shows or hides this component depending on the value of parameter * <code>b</code>. @@ -148,41 +148,41 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces } } } - + public void dispose() { setVisible(false); postWindowEvent(java.awt.event.WindowEvent.WINDOW_CLOSED); - + // Transfer window focus back to the owner window if it is still the active frame if ((getOwner() instanceof Frame && ((Frame) getOwner()).active) || (getOwner() instanceof Dialog && ((Dialog) getOwner()).active)) { - eventQueue.postEvent(new java.awt.event.WindowEvent(getOwner(), + eventQueue.postEvent(new java.awt.event.WindowEvent(getOwner(), java.awt.event.WindowEvent.WINDOW_GAINED_FOCUS)); } } - + protected void postWindowEvent(int i) { eventQueue.postEvent(new java.awt.event.WindowEvent(this, i)); } - + protected void postComponentEvent(int i) { eventQueue.postEvent(new java.awt.event.ComponentEvent(this, i)); } - + /** * Update the proxy objects appropriatly on property change events */ protected class AccessibleWindowListener implements XAccessibleEventListener { - + protected AccessibleWindowListener() { } - + // The only expected state changes are ACTIVE and VISIBLE protected void setComponentState(short state, boolean enable) { switch (state) { case AccessibleStateType.ICONIFIED: - postWindowEvent(enable ? - java.awt.event.WindowEvent.WINDOW_ICONIFIED : + postWindowEvent(enable ? + java.awt.event.WindowEvent.WINDOW_ICONIFIED : java.awt.event.WindowEvent.WINDOW_DEICONIFIED); break; case AccessibleStateType.SHOWING: @@ -196,7 +196,7 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces break; } } - + /** Updates the accessible name and fires the appropriate PropertyChangedEvent */ protected void handleNameChangedEvent(Object any) { try { @@ -210,7 +210,7 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces } catch (com.sun.star.lang.IllegalArgumentException e) { } } - + /** Updates the accessible description and fires the appropriate PropertyChangedEvent */ protected void handleDescriptionChangedEvent(Object any) { try { @@ -223,21 +223,21 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces } catch (com.sun.star.lang.IllegalArgumentException e) { } } - + /** Updates the internal states and fires the appropriate PropertyChangedEvent */ protected void handleStateChangedEvent(Object any1, Object any2) { try { if (AnyConverter.isShort(any1)) { setComponentState(AnyConverter.toShort(any1), false); } - + if (AnyConverter.isShort(any2)) { setComponentState(AnyConverter.toShort(any2), true); } } catch (com.sun.star.lang.IllegalArgumentException e) { } } - + /** Fires a visible data property change event */ protected void handleVisibleDataEvent() { javax.accessibility.AccessibleContext ac = accessibleContext; @@ -245,7 +245,7 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces ac.firePropertyChange(javax.accessibility.AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); } } - + /** Called by OpenOffice process to notify property changes */ public void notifyEvent(AccessibleEventObject event) { switch (event.EventId) { @@ -281,14 +281,14 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces } } } - + /** Called by OpenOffice process to notify that the UNO component is disposing */ public void disposing(com.sun.star.lang.EventObject eventObject) { } } - + protected javax.accessibility.AccessibleContext accessibleContext = null; - + /** Returns the AccessibleContext associated with this object */ public javax.accessibility.AccessibleContext getAccessibleContext() { if (accessibleContext == null) { @@ -297,14 +297,14 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces } return accessibleContext; } - + protected class AccessibleWindow extends java.awt.Window.AccessibleAWTWindow { protected AccessibleWindow() { super(); } - + protected java.awt.event.ComponentListener accessibleComponentHandler = null; - + /** * Fire PropertyChange listener, if one is registered, * when shown/hidden.. @@ -315,33 +315,33 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces javax.accessibility.AccessibleContext.ACCESSIBLE_STATE_PROPERTY, javax.accessibility.AccessibleState.VISIBLE, null); } - + public void componentShown(java.awt.event.ComponentEvent e) { AccessibleWindow.this.firePropertyChange( javax.accessibility.AccessibleContext.ACCESSIBLE_STATE_PROPERTY, null, javax.accessibility.AccessibleState.VISIBLE); } - + public void componentMoved(java.awt.event.ComponentEvent e) { } - + public void componentResized(java.awt.event.ComponentEvent e) { } } // inner class AccessibleComponentHandler - + protected java.awt.event.ContainerListener accessibleContainerHandler = null; - + /** * Fire PropertyChange listener, if one is registered, * when children added/removed. */ - + protected class AccessibleContainerHandler implements java.awt.event.ContainerListener { public void componentAdded(java.awt.event.ContainerEvent e) { java.awt.Component c = e.getChild(); if (c != null && c instanceof javax.accessibility.Accessible) { AccessibleWindow.this.firePropertyChange( - javax.accessibility.AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, + javax.accessibility.AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, null, ((javax.accessibility.Accessible) c).getAccessibleContext()); } } @@ -349,14 +349,14 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces java.awt.Component c = e.getChild(); if (c != null && c instanceof javax.accessibility.Accessible) { AccessibleWindow.this.firePropertyChange( - javax.accessibility.AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, - ((javax.accessibility.Accessible) c).getAccessibleContext(), null); + javax.accessibility.AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, + ((javax.accessibility.Accessible) c).getAccessibleContext(), null); } } } - + protected int propertyChangeListenerCount = 0; - + /** * Add a PropertyChangeListener to the listener list. * @@ -366,13 +366,13 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces if (propertyChangeListenerCount++ == 0) { accessibleContainerHandler = new AccessibleContainerHandler(); Window.this.addContainerListener(accessibleContainerHandler); - + accessibleComponentHandler = new AccessibleComponentHandler(); Window.this.addComponentListener(accessibleComponentHandler); } super.addPropertyChangeListener(listener); } - + /** * Remove a PropertyChangeListener from the listener list. * This removes a PropertyChangeListener that was registered @@ -384,17 +384,17 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces if (--propertyChangeListenerCount == 0) { Window.this.removeComponentListener(accessibleComponentHandler); accessibleComponentHandler = null; - + Window.this.removeContainerListener(accessibleContainerHandler); accessibleContainerHandler = null; } super.removePropertyChangeListener(listener); } - + /* * AccessibleComponent */ - + /** Returns the background color of the object */ public java.awt.Color getBackground() { try { @@ -403,11 +403,11 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces return null; } } - + public void setBackground(java.awt.Color c) { // Not supported by UNO accessibility API } - + /** Returns the foreground color of the object */ public java.awt.Color getForeground() { try { @@ -416,118 +416,118 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces return null; } } - + public void setForeground(java.awt.Color c) { // Not supported by UNO accessibility API } - + public java.awt.Cursor getCursor() { // Not supported by UNO accessibility API return null; } - + public void setCursor(java.awt.Cursor cursor) { // Not supported by UNO accessibility API } - + public java.awt.Font getFont() { // FIXME return null; } - + public void setFont(java.awt.Font f) { // Not supported by UNO accessibility API } - + public java.awt.FontMetrics getFontMetrics(java.awt.Font f) { // FIXME return null; } - + public boolean isEnabled() { return Window.this.isEnabled(); } - + public void setEnabled(boolean b) { // Not supported by UNO accessibility API } - + public boolean isVisible() { return Window.this.isVisible(); } - + public void setVisible(boolean b) { // Not supported by UNO accessibility API } - + public boolean isShowing() { return Window.this.isShowing(); } - + public boolean contains(java.awt.Point p) { try { - return unoAccessibleComponent.containsPoint(new com.sun.star.awt.Point(p.x, p.y)); + return unoAccessibleComponent.containsPoint(new com.sun.star.awt.Point(p.x, p.y)); } catch (com.sun.star.uno.RuntimeException e) { return false; } } - + /** Returns the location of the object on the screen. */ public java.awt.Point getLocationOnScreen() { try { - com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocationOnScreen(); + com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocationOnScreen(); return new java.awt.Point(unoPoint.X, unoPoint.Y); } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Gets the location of this component in the form of a point specifying the component's top-left corner */ public java.awt.Point getLocation() { try { - com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocationOnScreen(); + com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocationOnScreen(); return new java.awt.Point( unoPoint.X, unoPoint.Y ); } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Moves this component to a new location */ public void setLocation(java.awt.Point p) { // Not supported by UNO accessibility API } - + /** Gets the bounds of this component in the form of a Rectangle object */ public java.awt.Rectangle getBounds() { try { - com.sun.star.awt.Rectangle unoRect = unoAccessibleComponent.getBounds(); + com.sun.star.awt.Rectangle unoRect = unoAccessibleComponent.getBounds(); return new java.awt.Rectangle(unoRect.X, unoRect.Y, unoRect.Width, unoRect.Height); } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Moves and resizes this component to conform to the new bounding rectangle r */ public void setBounds(java.awt.Rectangle r) { // Not supported by UNO accessibility API } - + /** Returns the size of this component in the form of a Dimension object */ public java.awt.Dimension getSize() { try { - com.sun.star.awt.Size unoSize = unoAccessibleComponent.getSize(); + com.sun.star.awt.Size unoSize = unoAccessibleComponent.getSize(); return new java.awt.Dimension(unoSize.Width, unoSize.Height); } catch (com.sun.star.uno.RuntimeException e) { return null; } } - + /** Resizes this component so that it has width d.width and height d.height */ public void setSize(java.awt.Dimension d) { // Not supported by UNO accessibility API } - - /** Returns the Accessible child, if one exists, contained at the local coordinate Point */ + + /** Returns the Accessible child, if one exists, contained at the local coordinate Point */ public javax.accessibility.Accessible getAccessibleAt(java.awt.Point p) { try { java.awt.Component c = AccessibleObjectFactory.getAccessibleComponent( @@ -538,11 +538,11 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces return null; } } - + public boolean isFocusTraversable() { return Window.this.isFocusable(); } - + public void requestFocus() { unoAccessibleComponent.grabFocus(); } diff --git a/accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleEventLog.java b/accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleEventLog.java index 36bec1cab8fb..365243fe6fc8 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleEventLog.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleEventLog.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,28 +34,28 @@ import com.sun.star.uno.*; * */ public class XAccessibleEventLog implements XAccessibleEventListener { - + private static XAccessibleEventLog theEventListener = null; - + private static java.util.Hashtable proxyList = new java.util.Hashtable(); - + /** Creates a new instance of UNOAccessibleEventListener */ public XAccessibleEventLog() { } - + private static XAccessibleEventListener get() { if (theEventListener == null) { theEventListener = new XAccessibleEventLog(); } return theEventListener; } - + public static void addEventListener(XAccessibleContext xac, java.awt.Component c) { XAccessibleEventBroadcaster broadcaster = (XAccessibleEventBroadcaster) UnoRuntime.queryInterface(XAccessibleEventBroadcaster.class, xac); if (broadcaster != null) { broadcaster.addEventListener(XAccessibleEventLog.get()); - + // remember the proxy objects synchronized (proxyList) { // proxyList.put(UnoRuntime.generateOid(xac), new WeakReference(c)); @@ -65,8 +65,8 @@ public class XAccessibleEventLog implements XAccessibleEventListener { } public void disposing(com.sun.star.lang.EventObject eventObject) { - } - + } + public void notifyEvent(com.sun.star.accessibility.AccessibleEventObject accessibleEventObject) { switch (accessibleEventObject.EventId) { case AccessibleEventId.ACTIVE_DESCENDANT_CHANGED: @@ -74,7 +74,7 @@ public class XAccessibleEventLog implements XAccessibleEventListener { break; case AccessibleEventId.STATE_CHANGED: logStateChange(accessibleEventObject.Source, - accessibleEventObject.OldValue, + accessibleEventObject.OldValue, accessibleEventObject.NewValue); break; case AccessibleEventId.CHILD: @@ -93,7 +93,7 @@ public class XAccessibleEventLog implements XAccessibleEventListener { break; } } - + public void logStateChange(Object o, Object any1, Object any2) { try { if (AnyConverter.isShort(any1)) { @@ -106,7 +106,7 @@ public class XAccessibleEventLog implements XAccessibleEventListener { } catch (com.sun.star.lang.IllegalArgumentException e) { } } - + public void logStateChange(Object o, short n, String s) { switch(n) { case AccessibleStateType.ACTIVE: @@ -144,13 +144,13 @@ public class XAccessibleEventLog implements XAccessibleEventListener { break; } } - + protected static void logMessage(Object o, String s) { XAccessibleContext xac = (XAccessibleContext) UnoRuntime.queryInterface(XAccessibleContext.class, o); if( xac != null ) { String oid = UnoRuntime.generateOid(xac); synchronized (proxyList) { - logMessage( (javax.accessibility.Accessible) proxyList.get( oid ), s ); + logMessage( (javax.accessibility.Accessible) proxyList.get( oid ), s ); // WeakReference r = (WeakReference) proxyList.get( oid ); // if(r != null) { // System.err.println( "*** Warning *** event is " + r.get() ); @@ -159,7 +159,7 @@ public class XAccessibleEventLog implements XAccessibleEventListener { // System.err.println( "*** Warning *** event source not found in broadcaster list" ); // } } - } else + } else System.err.println( "*** Warning *** event source does not implement XAccessibleContext" ); } @@ -170,16 +170,16 @@ public class XAccessibleEventLog implements XAccessibleEventListener { logMessage(s); } } - + protected static void logMessage(javax.accessibility.AccessibleContext ac, String s) { if (ac != null) { - logMessage("[" + ac.getAccessibleRole() + "] " + logMessage("[" + ac.getAccessibleRole() + "] " + ac.getAccessibleName() + ": " + s); } else { logMessage(s); } } - + protected static void logMessage(String s) { System.err.println(s); } diff --git a/accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleHypertextLog.java b/accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleHypertextLog.java index f14da6d8280b..13e9b2f6d222 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleHypertextLog.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleHypertextLog.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -31,12 +31,12 @@ import com.sun.star.accessibility.*; import com.sun.star.uno.*; /** The AccessibleHypertextImpl mapps all calls to the java AccessibleHypertext - * interface to the corresponding methods of the UNO XAccessibleHypertext + * interface to the corresponding methods of the UNO XAccessibleHypertext * interface. */ public class XAccessibleHypertextLog extends XAccessibleTextLog implements com.sun.star.accessibility.XAccessibleHypertext { - + private com.sun.star.accessibility.XAccessibleHypertext unoObject; /** Creates a new instance of XAccessibleTextLog */ @@ -45,15 +45,15 @@ public class XAccessibleHypertextLog extends XAccessibleTextLog unoObject = xAccessibleHypertext; } - public XAccessibleHyperlink getHyperLink(int param) + public XAccessibleHyperlink getHyperLink(int param) throws com.sun.star.lang.IndexOutOfBoundsException { return unoObject.getHyperLink(param); } - + public int getHyperLinkCount() { return unoObject.getHyperLinkCount(); } - + public int getHyperLinkIndex(int param) throws com.sun.star.lang.IndexOutOfBoundsException { return unoObject.getHyperLinkIndex(param); diff --git a/accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleTextLog.java b/accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleTextLog.java index 4b415ee60c74..b7a2ffc70ebf 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleTextLog.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleTextLog.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -181,7 +181,7 @@ public class XAccessibleTextLog public com.sun.star.accessibility.TextSegment getTextAtIndex(int param, short param1) - throws com.sun.star.lang.IndexOutOfBoundsException, + throws com.sun.star.lang.IndexOutOfBoundsException, com.sun.star.lang.IllegalArgumentException { try { com.sun.star.accessibility.TextSegment ts = unoObject.getTextAtIndex(param, @@ -205,7 +205,7 @@ public class XAccessibleTextLog public com.sun.star.accessibility.TextSegment getTextBeforeIndex( int param, short param1) - throws com.sun.star.lang.IndexOutOfBoundsException, + throws com.sun.star.lang.IndexOutOfBoundsException, com.sun.star.lang.IllegalArgumentException { try { com.sun.star.accessibility.TextSegment ts = unoObject.getTextBeforeIndex(param, @@ -230,7 +230,7 @@ public class XAccessibleTextLog public com.sun.star.accessibility.TextSegment getTextBehindIndex( int param, short param1) - throws com.sun.star.lang.IndexOutOfBoundsException, + throws com.sun.star.lang.IndexOutOfBoundsException, com.sun.star.lang.IllegalArgumentException { try { com.sun.star.accessibility.TextSegment ts = unoObject.getTextBehindIndex(param, diff --git a/accessibility/bridge/source/java/WindowsAccessBridgeAdapter.cxx b/accessibility/bridge/source/java/WindowsAccessBridgeAdapter.cxx index 581e5dc71790..cec5e01494c0 100644 --- a/accessibility/bridge/source/java/WindowsAccessBridgeAdapter.cxx +++ b/accessibility/bridge/source/java/WindowsAccessBridgeAdapter.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -87,48 +87,48 @@ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *, void *) return JNI_VERSION_1_2; } -JNIEXPORT jbyteArray JNICALL +JNIEXPORT jbyteArray JNICALL Java_org_openoffice_accessibility_WindowsAccessBridgeAdapter_getProcessID(JNIEnv *pJNIEnv, jclass clazz) { // Initialize global class and method references - g_jcWindowsAccessBridgeAdapter = + g_jcWindowsAccessBridgeAdapter = static_cast< jclass > (pJNIEnv->NewGlobalRef(clazz)); if (NULL == g_jcWindowsAccessBridgeAdapter) { return 0; /* jni error occured */ } - g_jmRegisterTopWindow = + g_jmRegisterTopWindow = pJNIEnv->GetStaticMethodID(clazz, "registerTopWindow", "(ILcom/sun/star/accessibility/XAccessible;)V"); if (0 == g_jmRegisterTopWindow) { return 0; /* jni error occured */ } - g_jmRevokeTopWindow = + g_jmRevokeTopWindow = pJNIEnv->GetStaticMethodID(clazz, "revokeTopWindow", "(ILcom/sun/star/accessibility/XAccessible;)V"); if (0 == g_jmRevokeTopWindow) { return 0; /* jni error occured */ } - + // Use the special protocol of XJavaVM.getJavaVM: If the passed in // process ID has an extra 17th byte of value one, the returned any // contains a pointer to a jvmaccess::UnoVirtualMachine, instead of // the underlying JavaVM pointer: jbyte processID[17]; rtl_getGlobalProcessId(reinterpret_cast<sal_uInt8 *> (processID)); - // #i51265# we need a jvmaccess::UnoVirtualMachine pointer for the - // uno_getEnvironment() call later. + // #i51265# we need a jvmaccess::UnoVirtualMachine pointer for the + // uno_getEnvironment() call later. processID[16] = 1; - + // Copy the result into a java byte[] and return. jbyteArray jbaProcessID = pJNIEnv->NewByteArray(17); pJNIEnv->SetByteArrayRegion(jbaProcessID, 0, 17, processID); return jbaProcessID; } -JNIEXPORT jboolean JNICALL +JNIEXPORT jboolean JNICALL Java_org_openoffice_accessibility_WindowsAccessBridgeAdapter_createMapping(JNIEnv *, jclass, jlong pointer) { uno_Environment * pJava_environment = NULL; uno_Environment * pUno_environment = NULL; - + try { // We get a non-refcounted pointer to a jvmaccess::VirtualMachine // from the XJavaVM service (the pointer is guaranteed to be valid @@ -136,7 +136,7 @@ Java_org_openoffice_accessibility_WindowsAccessBridgeAdapter_createMapping(JNIEn // convert the non-refcounted pointer into a refcounted one // immediately: g_xUnoVirtualMachine = reinterpret_cast< jvmaccess::UnoVirtualMachine * >(pointer); - + if ( g_xUnoVirtualMachine.is() ) { OUString sJava(RTL_CONSTASCII_USTRINGPARAM("java")); @@ -144,21 +144,21 @@ Java_org_openoffice_accessibility_WindowsAccessBridgeAdapter_createMapping(JNIEn OUString sCppu_current_lb_name(RTL_CONSTASCII_USTRINGPARAM(CPPU_CURRENT_LANGUAGE_BINDING_NAME)); uno_getEnvironment(&pUno_environment, sCppu_current_lb_name.pData, NULL); - + if ( pJava_environment && pUno_environment ) { g_unoMapping = Mapping(pUno_environment, pJava_environment); getCppuType((::com::sun::star::uno::Reference< XAccessible > *) 0).getDescription((typelib_TypeDescription **) & g_pTypeDescription); } - + if ( pJava_environment ) { // release java environment pJava_environment->release(pJava_environment); pJava_environment = NULL; } - - if ( pUno_environment ) + + if ( pUno_environment ) { // release uno environment pUno_environment->release(pUno_environment); @@ -166,12 +166,12 @@ Java_org_openoffice_accessibility_WindowsAccessBridgeAdapter_createMapping(JNIEn } } } - + catch ( RuntimeException e) { OSL_TRACE("RuntimeException caught while initializing the mapping"); } - + if ( (0 != g_jmRegisterTopWindow) && (0 != g_jmRevokeTopWindow) ) { ::Application::AddEventListener(g_aEventListenerLink); @@ -192,13 +192,13 @@ JNIEXPORT void JNICALL JNI_OnUnload(JavaVM *jvm, void *) g_jcWindowsAccessBridgeAdapter = NULL; } } - + if ( NULL != g_pTypeDescription ) { typelib_typedescription_release( reinterpret_cast< typelib_TypeDescription * > (g_pTypeDescription) ); g_pTypeDescription = NULL; } - + g_unoMapping.clear(); g_xUnoVirtualMachine.clear(); } @@ -218,13 +218,13 @@ void handleWindowEvent(Window * pWindow, bool bShow) if ( pWindow && pWindow->IsTopWindow() ) { ::com::sun::star::uno::Reference< XAccessible > xAccessible; - + // Test for combo box - drop down floating windows first Window * pParentWindow = pWindow->GetParent(); if ( pParentWindow ) { - try + try { // The parent window of a combo box floating window should have the role COMBO_BOX ::com::sun::star::uno::Reference< XAccessible > xParentAccessible(pParentWindow->GetAccessible()); @@ -261,7 +261,7 @@ void handleWindowEvent(Window * pWindow, bool bShow) } // We have to rely on the fact that Window::GetAccessible()->getAccessibleContext() returns a valid XAccessibleContext - // also for other menus than menubar or toplevel popup window. Otherwise we had to traverse the hierarchy to find the + // also for other menus than menubar or toplevel popup window. Otherwise we had to traverse the hierarchy to find the // context object to this menu floater. This makes the call to Window->IsMenuFloatingWindow() obsolete. if ( ! xAccessible.is() ) xAccessible = pWindow->GetAccessible(); @@ -280,8 +280,8 @@ void handleWindowEvent(Window * pWindow, bool bShow) { // g_jmRegisterTopWindow and g_jmRevokeTopWindow are ensured to be != 0 - otherwise // the event listener would not have been attached. - pJNIEnv->CallStaticVoidMethod(g_jcWindowsAccessBridgeAdapter, - (bShow) ? g_jmRegisterTopWindow : g_jmRevokeTopWindow, + pJNIEnv->CallStaticVoidMethod(g_jcWindowsAccessBridgeAdapter, + (bShow) ? g_jmRegisterTopWindow : g_jmRevokeTopWindow, (jint) GetHWND(pWindow), joXAccessible ); // Clear any exception that might have been occured. @@ -297,7 +297,7 @@ void handleWindowEvent(Window * pWindow, bool bShow) long VCLEventListenerLinkFunc(void *, void * pData) { ::VclSimpleEvent const * pEvent = (::VclSimpleEvent const *) pData; - + switch (pEvent->GetId()) { case VCLEVENT_WINDOW_SHOW: @@ -307,7 +307,7 @@ long VCLEventListenerLinkFunc(void *, void * pData) handleWindowEvent(((::VclWindowEvent const *) pEvent)->GetWindow(), false); break; } - + return 0; } diff --git a/accessibility/inc/accessibility/extended/AccessibleBrowseBox.hxx b/accessibility/inc/accessibility/extended/AccessibleBrowseBox.hxx index 82c09c8b13bc..0944dc679319 100644 --- a/accessibility/inc/accessibility/extended/AccessibleBrowseBox.hxx +++ b/accessibility/inc/accessibility/extended/AccessibleBrowseBox.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -196,7 +196,7 @@ protected: /** This method creates and returns an accessible table. @return An AccessibleBrowseBoxTable. */ - virtual AccessibleBrowseBoxTable* createAccessibleTable(); + virtual AccessibleBrowseBoxTable* createAccessibleTable(); private: // members ---------------------------------------------------------------- @@ -205,12 +205,12 @@ private: // ============================================================================ /** the XAccessible which creates/returns an AccessibleBrowseBox - + <p>The instance holds it's XAccessibleContext with a hard reference, while the contxt holds this instance weak.</p> */ -typedef ::cppu::WeakImplHelper1 < ::com::sun::star::accessibility::XAccessible - > AccessibleBrowseBoxAccess_Base; +typedef ::cppu::WeakImplHelper1 < ::com::sun::star::accessibility::XAccessible + > AccessibleBrowseBoxAccess_Base; class AccessibleBrowseBoxAccess :public AccessibleBrowseBoxAccess_Base ,public ::svt::IAccessibleBrowseBox @@ -298,9 +298,9 @@ protected: } private: - AccessibleBrowseBoxAccess(); // never implemented - AccessibleBrowseBoxAccess( const AccessibleBrowseBoxAccess& ); // never implemented - AccessibleBrowseBoxAccess& operator=( const AccessibleBrowseBoxAccess& ); // never implemented + AccessibleBrowseBoxAccess(); // never implemented + AccessibleBrowseBoxAccess( const AccessibleBrowseBoxAccess& ); // never implemented + AccessibleBrowseBoxAccess& operator=( const AccessibleBrowseBoxAccess& ); // never implemented }; // ============================================================================ diff --git a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxBase.hxx b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxBase.hxx index 67f0574ab436..b246918172df 100644 --- a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxBase.hxx +++ b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxBase.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -365,7 +365,7 @@ public: // public versions of internal helper methods, with access control struct AccessControl { friend class SolarMethodGuard; private: AccessControl() { } }; - inline ::osl::Mutex& getMutex( const AccessControl& ) { return getOslMutex(); } + inline ::osl::Mutex& getMutex( const AccessControl& ) { return getOslMutex(); } inline void ensureIsAlive( const AccessControl& ) { ensureIsAlive(); } protected: @@ -390,15 +390,15 @@ private: /** The type of this object (for names, descriptions, state sets, ...). */ ::svt::AccessibleBrowseBoxObjType meObjType; - ::comphelper::AccessibleEventNotifier::TClientId m_aClientId; + ::comphelper::AccessibleEventNotifier::TClientId m_aClientId; }; // ============================================================================ // a version of AccessibleBrowseBoxBase which implements not only the XAccessibleContext, // but also the XAccessible -typedef ::cppu::ImplHelper1 < ::com::sun::star::accessibility::XAccessible - > BrowseBoxAccessibleElement_Base; +typedef ::cppu::ImplHelper1 < ::com::sun::star::accessibility::XAccessible + > BrowseBoxAccessibleElement_Base; class BrowseBoxAccessibleElement :public AccessibleBrowseBoxBase @@ -458,9 +458,9 @@ protected: throw ( ::com::sun::star::uno::RuntimeException ); private: - BrowseBoxAccessibleElement(); // never implemented - BrowseBoxAccessibleElement( const BrowseBoxAccessibleElement& ); // never implemented - BrowseBoxAccessibleElement& operator=( const BrowseBoxAccessibleElement& ); // never implemented + BrowseBoxAccessibleElement(); // never implemented + BrowseBoxAccessibleElement( const BrowseBoxAccessibleElement& ); // never implemented + BrowseBoxAccessibleElement& operator=( const BrowseBoxAccessibleElement& ); // never implemented }; // ============================================================================ diff --git a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx index 8346c1173fb3..ccfd6e6fd335 100644 --- a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx +++ b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -38,11 +38,11 @@ namespace accessibility { // ============================================================================ - typedef ::cppu::ImplHelper2 < ::com::sun::star::accessibility::XAccessible, + typedef ::cppu::ImplHelper2 < ::com::sun::star::accessibility::XAccessible, ::com::sun::star::accessibility::XAccessibleValue - > AccessibleCheckBoxCell_BASE; + > AccessibleCheckBoxCell_BASE; - class AccessibleCheckBoxCell : public AccessibleBrowseBoxCell + class AccessibleCheckBoxCell : public AccessibleBrowseBoxCell ,public AccessibleCheckBoxCell_BASE { private: diff --git a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxHeaderBar.hxx b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxHeaderBar.hxx index 92cb1b5d2d71..2cf5d0930a8a 100644 --- a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxHeaderBar.hxx +++ b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxHeaderBar.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxHeaderCell.hxx b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxHeaderCell.hxx index 2c55887462cb..f23822f5e2cf 100644 --- a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxHeaderCell.hxx +++ b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxHeaderCell.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,7 +34,7 @@ namespace accessibility { class AccessibleBrowseBoxHeaderCell : public BrowseBoxAccessibleElement { - sal_Int32 m_nColumnRowId; + sal_Int32 m_nColumnRowId; public: AccessibleBrowseBoxHeaderCell(sal_Int32 _nColumnRowId, const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxParent, diff --git a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxTable.hxx b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxTable.hxx index 021f1c614324..0aca86571d86 100644 --- a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxTable.hxx +++ b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxTable.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxTableBase.hxx b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxTableBase.hxx index d775104614c6..c24001f3106f 100644 --- a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxTableBase.hxx +++ b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxTableBase.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -198,7 +198,7 @@ protected: /** @attention This method requires locked mutex's and a living object. @param nColumn the position of the column in the Accessible world - @return + @return the position of the column in VCL the Accessible world */ sal_uInt16 implToVCLColumnPos( sal_Int32 nColumn ) const; diff --git a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxTableCell.hxx b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxTableCell.hxx index b689235908c5..cc2f2d6cce7e 100644 --- a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxTableCell.hxx +++ b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxTableCell.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,12 +34,12 @@ namespace accessibility { - typedef ::cppu::ImplHelper2 < ::com::sun::star::accessibility::XAccessibleText - , ::com::sun::star::accessibility::XAccessible - > AccessibleTextHelper_BASE; + typedef ::cppu::ImplHelper2 < ::com::sun::star::accessibility::XAccessibleText + , ::com::sun::star::accessibility::XAccessible + > AccessibleTextHelper_BASE; // implementation of a table cell of BrowseBox - class AccessibleBrowseBoxTableCell :public AccessibleBrowseBoxCell + class AccessibleBrowseBoxTableCell :public AccessibleBrowseBoxCell ,public AccessibleTextHelper_BASE ,public ::comphelper::OCommonAccessibleText { @@ -48,9 +48,9 @@ namespace accessibility protected: // OCommonAccessibleText - virtual ::rtl::OUString implGetText(); - virtual ::com::sun::star::lang::Locale implGetLocale(); - virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ); + virtual ::rtl::OUString implGetText(); + virtual ::com::sun::star::lang::Locale implGetLocale(); + virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ); public: AccessibleBrowseBoxTableCell( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent, diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControl.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControl.hxx index ff31cb78bfaa..df113fa7a53c 100644 --- a/accessibility/inc/accessibility/extended/AccessibleGridControl.hxx +++ b/accessibility/inc/accessibility/extended/AccessibleGridControl.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -165,7 +165,7 @@ protected: /** This method creates and returns an accessible table. @return An AccessibleGridControlTable. */ - virtual AccessibleGridControlTable* createAccessibleTable(); + virtual AccessibleGridControlTable* createAccessibleTable(); private: // members ---------------------------------------------------------------- @@ -174,11 +174,11 @@ private: // ============================================================================ /** the XAccessible which creates/returns an AccessibleGridControl - + <p>The instance holds it's XAccessibleContext with a hard reference, while the contxt holds this instance weak.</p> */ -typedef ::cppu::WeakImplHelper1 < ::com::sun::star::accessibility::XAccessible > AccessibleGridControlAccess_Base; +typedef ::cppu::WeakImplHelper1 < ::com::sun::star::accessibility::XAccessible > AccessibleGridControlAccess_Base; class AccessibleGridControlAccess :public AccessibleGridControlAccess_Base ,public ::svt::table::IAccessibleTableControl @@ -252,9 +252,9 @@ protected: } private: - AccessibleGridControlAccess(); // never implemented - AccessibleGridControlAccess( const AccessibleGridControlAccess& ); // never implemented - AccessibleGridControlAccess& operator=( const AccessibleGridControlAccess& ); // never implemented + AccessibleGridControlAccess(); // never implemented + AccessibleGridControlAccess( const AccessibleGridControlAccess& ); // never implemented + AccessibleGridControlAccess& operator=( const AccessibleGridControlAccess& ); // never implemented }; // ============================================================================ diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControlBase.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControlBase.hxx index 383c6410eaeb..60bdd0b185fc 100644 --- a/accessibility/inc/accessibility/extended/AccessibleGridControlBase.hxx +++ b/accessibility/inc/accessibility/extended/AccessibleGridControlBase.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -334,7 +334,7 @@ public: // public versions of internal helper methods, with access control struct TC_AccessControl { friend class TC_SolarMethodGuard; private: TC_AccessControl() { } }; - inline ::osl::Mutex& getMutex( const TC_AccessControl& ) { return getOslMutex(); } + inline ::osl::Mutex& getMutex( const TC_AccessControl& ) { return getOslMutex(); } inline void ensureIsAlive( const TC_AccessControl& ) { ensureIsAlive(); } protected: @@ -353,15 +353,15 @@ private: ::rtl::OUString m_aName; /** Localized description text. */ ::rtl::OUString m_aDescription; - ::comphelper::AccessibleEventNotifier::TClientId m_aClientId; + ::comphelper::AccessibleEventNotifier::TClientId m_aClientId; }; // ============================================================================ // a version of AccessibleGridControlBase which implements not only the XAccessibleContext, // but also the XAccessible -typedef ::cppu::ImplHelper1 < ::com::sun::star::accessibility::XAccessible - > GridControlAccessibleElement_Base; +typedef ::cppu::ImplHelper1 < ::com::sun::star::accessibility::XAccessible + > GridControlAccessibleElement_Base; class GridControlAccessibleElement :public AccessibleGridControlBase @@ -400,9 +400,9 @@ protected: throw ( ::com::sun::star::uno::RuntimeException ); private: - GridControlAccessibleElement(); // never implemented - GridControlAccessibleElement( const GridControlAccessibleElement& ); // never implemented - GridControlAccessibleElement& operator=( const GridControlAccessibleElement& ); // never implemented + GridControlAccessibleElement(); // never implemented + GridControlAccessibleElement( const GridControlAccessibleElement& ); // never implemented + GridControlAccessibleElement& operator=( const GridControlAccessibleElement& ); // never implemented }; // ============================================================================ diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControlHeader.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControlHeader.hxx index 6732fa2b6576..21cd9d8bc2f0 100644 --- a/accessibility/inc/accessibility/extended/AccessibleGridControlHeader.hxx +++ b/accessibility/inc/accessibility/extended/AccessibleGridControlHeader.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControlHeaderCell.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControlHeaderCell.hxx index f7f02f5828b0..e8b49520598c 100644 --- a/accessibility/inc/accessibility/extended/AccessibleGridControlHeaderCell.hxx +++ b/accessibility/inc/accessibility/extended/AccessibleGridControlHeaderCell.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,7 +34,7 @@ namespace accessibility { class AccessibleGridControlHeaderCell : public AccessibleGridControlCell, public ::com::sun::star::accessibility::XAccessible { - sal_Int32 m_nColumnRowId; + sal_Int32 m_nColumnRowId; public: AccessibleGridControlHeaderCell(sal_Int32 _nColumnRowId, const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxParent, diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControlTable.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControlTable.hxx index 1d79e1d2d199..63ac7545ea9c 100644 --- a/accessibility/inc/accessibility/extended/AccessibleGridControlTable.hxx +++ b/accessibility/inc/accessibility/extended/AccessibleGridControlTable.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControlTableBase.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControlTableBase.hxx index daa6fd179ef6..92bd1e2e859c 100644 --- a/accessibility/inc/accessibility/extended/AccessibleGridControlTableBase.hxx +++ b/accessibility/inc/accessibility/extended/AccessibleGridControlTableBase.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControlTableCell.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControlTableCell.hxx index 7dd2d982e186..d52aaee2e88f 100644 --- a/accessibility/inc/accessibility/extended/AccessibleGridControlTableCell.hxx +++ b/accessibility/inc/accessibility/extended/AccessibleGridControlTableCell.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -38,13 +38,13 @@ namespace accessibility class AccessibleGridControlCell : public AccessibleGridControlBase { private: - sal_Int32 m_nRowPos; // the row number of the table cell - sal_Int32 m_nColPos; // the column id of the table cell + sal_Int32 m_nRowPos; // the row number of the table cell + sal_Int32 m_nColPos; // the column id of the table cell protected: // attribute access - inline sal_Int32 getRowPos( ) const { return m_nRowPos; } - inline sal_Int32 getColumnPos( ) const { return m_nColPos; } + inline sal_Int32 getRowPos( ) const { return m_nRowPos; } + inline sal_Int32 getColumnPos( ) const { return m_nColPos; } // XAccessibleComponent virtual void SAL_CALL grabFocus() throw ( ::com::sun::star::uno::RuntimeException ); @@ -61,16 +61,16 @@ namespace accessibility virtual ~AccessibleGridControlCell(); private: - AccessibleGridControlCell(); // never implemented - AccessibleGridControlCell( const AccessibleGridControlCell& ); // never implemented - AccessibleGridControlCell& operator=( const AccessibleGridControlCell& ); // never implemented + AccessibleGridControlCell(); // never implemented + AccessibleGridControlCell( const AccessibleGridControlCell& ); // never implemented + AccessibleGridControlCell& operator=( const AccessibleGridControlCell& ); // never implemented }; - typedef ::cppu::ImplHelper2 < ::com::sun::star::accessibility::XAccessibleText - , ::com::sun::star::accessibility::XAccessible - > AccessibleTextHelper_BASE; + typedef ::cppu::ImplHelper2 < ::com::sun::star::accessibility::XAccessibleText + , ::com::sun::star::accessibility::XAccessible + > AccessibleTextHelper_BASE; // implementation of a table cell of GridControl - class AccessibleGridControlTableCell :public AccessibleGridControlCell + class AccessibleGridControlTableCell :public AccessibleGridControlCell ,public AccessibleTextHelper_BASE ,public ::comphelper::OCommonAccessibleText { @@ -79,9 +79,9 @@ namespace accessibility protected: // OCommonAccessibleText - virtual ::rtl::OUString implGetText(); - virtual ::com::sun::star::lang::Locale implGetLocale(); - virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ); + virtual ::rtl::OUString implGetText(); + virtual ::com::sun::star::lang::Locale implGetLocale(); + virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ); virtual Rectangle implGetBoundingBox(); virtual Rectangle implGetBoundingBoxOnScreen(); diff --git a/accessibility/inc/accessibility/extended/AccessibleToolPanelDeck.hxx b/accessibility/inc/accessibility/extended/AccessibleToolPanelDeck.hxx index fb8664e521e4..30eef85cf6ec 100644 --- a/accessibility/inc/accessibility/extended/AccessibleToolPanelDeck.hxx +++ b/accessibility/inc/accessibility/extended/AccessibleToolPanelDeck.hxx @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/inc/accessibility/extended/AccessibleToolPanelDeckTabBar.hxx b/accessibility/inc/accessibility/extended/AccessibleToolPanelDeckTabBar.hxx index 295d6e6624bd..1bdb6c8548f3 100644 --- a/accessibility/inc/accessibility/extended/AccessibleToolPanelDeckTabBar.hxx +++ b/accessibility/inc/accessibility/extended/AccessibleToolPanelDeckTabBar.hxx @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/inc/accessibility/extended/AccessibleToolPanelDeckTabBarItem.hxx b/accessibility/inc/accessibility/extended/AccessibleToolPanelDeckTabBarItem.hxx index 83ca6d8101c7..eb375eb8a906 100644 --- a/accessibility/inc/accessibility/extended/AccessibleToolPanelDeckTabBarItem.hxx +++ b/accessibility/inc/accessibility/extended/AccessibleToolPanelDeckTabBarItem.hxx @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/inc/accessibility/extended/accessiblebrowseboxcell.hxx b/accessibility/inc/accessibility/extended/accessiblebrowseboxcell.hxx index 3314648ac6e7..6c7bd7da5f9d 100644 --- a/accessibility/inc/accessibility/extended/accessiblebrowseboxcell.hxx +++ b/accessibility/inc/accessibility/extended/accessiblebrowseboxcell.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -45,13 +45,13 @@ namespace accessibility class AccessibleBrowseBoxCell : public AccessibleBrowseBoxBase { private: - sal_Int32 m_nRowPos; // the row number of the table cell - sal_uInt16 m_nColPos; // the column id of the table cell + sal_Int32 m_nRowPos; // the row number of the table cell + sal_uInt16 m_nColPos; // the column id of the table cell protected: // attribute access - inline sal_Int32 getRowPos( ) const { return m_nRowPos; } - inline sal_Int32 getColumnPos( ) const { return m_nColPos; } + inline sal_Int32 getRowPos( ) const { return m_nRowPos; } + inline sal_Int32 getColumnPos( ) const { return m_nColPos; } protected: // AccessibleBrowseBoxBase overridables @@ -74,13 +74,13 @@ namespace accessibility virtual ~AccessibleBrowseBoxCell(); private: - AccessibleBrowseBoxCell(); // never implemented - AccessibleBrowseBoxCell( const AccessibleBrowseBoxCell& ); // never implemented - AccessibleBrowseBoxCell& operator=( const AccessibleBrowseBoxCell& ); // never implemented + AccessibleBrowseBoxCell(); // never implemented + AccessibleBrowseBoxCell( const AccessibleBrowseBoxCell& ); // never implemented + AccessibleBrowseBoxCell& operator=( const AccessibleBrowseBoxCell& ); // never implemented }; // ................................................................................. -} // namespace accessibility +} // namespace accessibility // ................................................................................. diff --git a/accessibility/inc/accessibility/extended/accessibleeditbrowseboxcell.hxx b/accessibility/inc/accessibility/extended/accessibleeditbrowseboxcell.hxx index 2abe7d871022..c30c4f768210 100644 --- a/accessibility/inc/accessibility/extended/accessibleeditbrowseboxcell.hxx +++ b/accessibility/inc/accessibility/extended/accessibleeditbrowseboxcell.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -43,7 +43,7 @@ namespace accessibility // ============================================================================= // = EditBrowseBoxTableCell // ============================================================================= - class EditBrowseBoxTableCell :public AccessibleBrowseBoxCell + class EditBrowseBoxTableCell :public AccessibleBrowseBoxCell ,public ::comphelper::OAccessibleContextWrapperHelper { public: @@ -81,7 +81,7 @@ namespace accessibility virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (::com::sun::star::uno::RuntimeException); sal_Int16 SAL_CALL getAccessibleRole() throw ( ::com::sun::star::uno::RuntimeException ); - + virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); @@ -97,16 +97,16 @@ namespace accessibility void notifyTranslatedEvent( const ::com::sun::star::accessibility::AccessibleEventObject& _rEvent ) throw (::com::sun::star::uno::RuntimeException); private: - EditBrowseBoxTableCell(); // never implemented - EditBrowseBoxTableCell( const EditBrowseBoxTableCell& ); // never implemented - EditBrowseBoxTableCell& operator=( const EditBrowseBoxTableCell& ); // never implemented + EditBrowseBoxTableCell(); // never implemented + EditBrowseBoxTableCell( const EditBrowseBoxTableCell& ); // never implemented + EditBrowseBoxTableCell& operator=( const EditBrowseBoxTableCell& ); // never implemented }; // ============================================================================= // = EditBrowseBoxTableCell // ============================================================================= - typedef ::cppu::WeakComponentImplHelper1 < ::com::sun::star::accessibility::XAccessible - > EditBrowseBoxTableCellAccess_Base; + typedef ::cppu::WeakComponentImplHelper1 < ::com::sun::star::accessibility::XAccessible + > EditBrowseBoxTableCellAccess_Base; // XAccessible providing an EditBrowseBoxTableCell class EditBrowseBoxTableCellAccess :public ::comphelper::OBaseMutex @@ -122,8 +122,8 @@ namespace accessibility ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xFocusWindow; ::svt::IAccessibleTableProvider* m_pBrowseBox; - sal_Int32 m_nRowPos; - sal_uInt16 m_nColPos; + sal_Int32 m_nRowPos; + sal_uInt16 m_nColPos; public: EditBrowseBoxTableCellAccess( @@ -145,9 +145,9 @@ namespace accessibility virtual void SAL_CALL disposing(); private: - EditBrowseBoxTableCellAccess(); // never implemented - EditBrowseBoxTableCellAccess( const EditBrowseBoxTableCellAccess& ); // never implemented - EditBrowseBoxTableCellAccess& operator=( const EditBrowseBoxTableCellAccess& ); // never implemented + EditBrowseBoxTableCellAccess(); // never implemented + EditBrowseBoxTableCellAccess( const EditBrowseBoxTableCellAccess& ); // never implemented + EditBrowseBoxTableCellAccess& operator=( const EditBrowseBoxTableCellAccess& ); // never implemented }; } diff --git a/accessibility/inc/accessibility/extended/accessibleiconchoicectrl.hxx b/accessibility/inc/accessibility/extended/accessibleiconchoicectrl.hxx index 2289dd45baec..55758bb80bdd 100644 --- a/accessibility/inc/accessibility/extended/accessibleiconchoicectrl.hxx +++ b/accessibility/inc/accessibility/extended/accessibleiconchoicectrl.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -49,7 +49,7 @@ namespace accessibility /** the class OAccessibleListBoxEntry represents the base class for an accessible object of a listbox entry */ - class AccessibleIconChoiceCtrl :public AccessibleIconChoiceCtrl_BASE + class AccessibleIconChoiceCtrl :public AccessibleIconChoiceCtrl_BASE ,public VCLXAccessibleComponent { protected: @@ -59,17 +59,17 @@ namespace accessibility virtual ~AccessibleIconChoiceCtrl(); /** this function is called upon disposing the component */ - virtual void SAL_CALL disposing(); + virtual void SAL_CALL disposing(); - virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); - virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); + virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); + virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); SvtIconChoiceCtrl* getCtrl(); public: /** OAccessibleBase needs a valid view - @param _rIconCtrl + @param _rIconCtrl is the box for which we implement an accessible object - @param _xParent + @param _xParent is our parent accessible object */ AccessibleIconChoiceCtrl( SvtIconChoiceCtrl& _rIconCtrl, diff --git a/accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx b/accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx index 09af3e2466ca..3e9cec0e71d6 100644 --- a/accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx +++ b/accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -67,14 +67,14 @@ namespace accessibility , ::com::sun::star::lang::XEventListener > AccessibleIconChoiceCtrlEntry_BASE; /** the class AccessibleListBoxEntry represents the class for an accessible object of a listbox entry */ - class AccessibleIconChoiceCtrlEntry : public ::comphelper::OBaseMutex, + class AccessibleIconChoiceCtrlEntry : public ::comphelper::OBaseMutex, public AccessibleIconChoiceCtrlEntry_BASE, public ::comphelper::OCommonAccessibleText { private: /** The treelistbox control */ - SvtIconChoiceCtrl* m_pIconCtrl; - sal_Int32 m_nIndex; + SvtIconChoiceCtrl* m_pIconCtrl; + sal_Int32 m_nIndex; protected: /// client id in the AccessibleEventNotifier queue @@ -87,45 +87,45 @@ namespace accessibility // (the following method is unused currently. If you need it, simply remove the #ifdef thing here and // in the cxx) /** notifies all listeners that this object has changed - @param _nEventId + @param _nEventId is the event id - @param _aOldValue + @param _aOldValue is the old value - @param _aNewValue + @param _aNewValue is the new value */ - void NotifyAccessibleEvent( sal_Int16 _nEventId, + void NotifyAccessibleEvent( sal_Int16 _nEventId, const ::com::sun::star::uno::Any& _aOldValue, const ::com::sun::star::uno::Any& _aNewValue ); #endif - Rectangle GetBoundingBox_Impl() const; - Rectangle GetBoundingBoxOnScreen_Impl() const; - sal_Bool IsAlive_Impl() const; - sal_Bool IsShowing_Impl() const; + Rectangle GetBoundingBox_Impl() const; + Rectangle GetBoundingBoxOnScreen_Impl() const; + sal_Bool IsAlive_Impl() const; + sal_Bool IsShowing_Impl() const; - Rectangle GetBoundingBox() throw ( ::com::sun::star::lang::DisposedException ); - Rectangle GetBoundingBoxOnScreen() throw ( ::com::sun::star::lang::DisposedException ); - void EnsureIsAlive() const throw ( ::com::sun::star::lang::DisposedException ); + Rectangle GetBoundingBox() throw ( ::com::sun::star::lang::DisposedException ); + Rectangle GetBoundingBoxOnScreen() throw ( ::com::sun::star::lang::DisposedException ); + void EnsureIsAlive() const throw ( ::com::sun::star::lang::DisposedException ); protected: virtual ~AccessibleIconChoiceCtrlEntry(); /** this function is called upon disposing the component */ - virtual void SAL_CALL disposing(); + virtual void SAL_CALL disposing(); // OCommonAccessibleText - virtual ::rtl::OUString implGetText(); - virtual ::com::sun::star::lang::Locale implGetLocale(); - virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ); + virtual ::rtl::OUString implGetText(); + virtual ::com::sun::star::lang::Locale implGetLocale(); + virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ); public: /** Ctor() - @param _rListBox + @param _rListBox the view control - @param _pEntry + @param _pEntry the entry - @param _xParent + @param _xParent is our parent accessible object */ AccessibleIconChoiceCtrlEntry( SvtIconChoiceCtrl& _rIconCtrl, diff --git a/accessibility/inc/accessibility/extended/accessiblelistbox.hxx b/accessibility/inc/accessibility/extended/accessiblelistbox.hxx index 9e81e7eed7d4..c7326637542d 100644 --- a/accessibility/inc/accessibility/extended/accessiblelistbox.hxx +++ b/accessibility/inc/accessibility/extended/accessiblelistbox.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -50,11 +50,11 @@ namespace accessibility /** the class OAccessibleListBoxEntry represents the base class for an accessible object of a listbox entry */ - class AccessibleListBox :public AccessibleListBox_BASE + class AccessibleListBox :public AccessibleListBox_BASE ,public VCLXAccessibleComponent { protected: - + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > m_xParent; protected: @@ -62,20 +62,20 @@ namespace accessibility // OComponentHelper overridables /** this function is called upon disposing the component */ - virtual void SAL_CALL disposing(); + virtual void SAL_CALL disposing(); // VCLXAccessibleComponent - virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); + virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); virtual void ProcessWindowChildEvent( const VclWindowEvent& rVclWindowEvent ); - virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); + virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); - SvTreeListBox* getListBox() const; + SvTreeListBox* getListBox() const; public: /** OAccessibleBase needs a valid view - @param _rListBox + @param _rListBox is the box for which we implement an accessible object - @param _xParent + @param _xParent is our parent accessible object */ AccessibleListBox( SvTreeListBox& _rListBox, @@ -107,7 +107,7 @@ namespace accessibility virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getAccessibleDescription( ) throw (::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getAccessibleName( ) throw (::com::sun::star::uno::RuntimeException); - + // XAccessibleSelection void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); diff --git a/accessibility/inc/accessibility/extended/accessiblelistboxentry.hxx b/accessibility/inc/accessibility/extended/accessiblelistboxentry.hxx index 4521c0e0d03e..c7de9472bd33 100644 --- a/accessibility/inc/accessibility/extended/accessiblelistboxentry.hxx +++ b/accessibility/inc/accessibility/extended/accessiblelistboxentry.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -84,8 +84,8 @@ namespace accessibility private: /** The treelistbox control */ - SvTreeListBox* m_pListBox; - ::std::deque< sal_Int32 > m_aEntryPath; + SvTreeListBox* m_pListBox; + ::std::deque< sal_Int32 > m_aEntryPath; protected: /// client id in the AccessibleEventNotifier queue @@ -95,40 +95,40 @@ namespace accessibility m_aParent; private: - Rectangle GetBoundingBox_Impl() const; - Rectangle GetBoundingBoxOnScreen_Impl() const; - sal_Bool IsAlive_Impl() const; - sal_Bool IsShowing_Impl() const; + Rectangle GetBoundingBox_Impl() const; + Rectangle GetBoundingBoxOnScreen_Impl() const; + sal_Bool IsAlive_Impl() const; + sal_Bool IsShowing_Impl() const; - Rectangle GetBoundingBox() throw ( ::com::sun::star::lang::DisposedException ); - Rectangle GetBoundingBoxOnScreen() throw ( ::com::sun::star::lang::DisposedException ); - void EnsureIsAlive() const throw ( ::com::sun::star::lang::DisposedException ); + Rectangle GetBoundingBox() throw ( ::com::sun::star::lang::DisposedException ); + Rectangle GetBoundingBoxOnScreen() throw ( ::com::sun::star::lang::DisposedException ); + void EnsureIsAlive() const throw ( ::com::sun::star::lang::DisposedException ); protected: virtual ~AccessibleListBoxEntry(); /** this function is called upon disposing the component */ - virtual void SAL_CALL disposing(); + virtual void SAL_CALL disposing(); // ListBoxAccessible/XComponent virtual void SAL_CALL dispose() throw ( ::com::sun::star::uno::RuntimeException ); // OCommonAccessibleText - virtual ::rtl::OUString implGetText(); - virtual ::com::sun::star::lang::Locale implGetLocale(); - virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ); + virtual ::rtl::OUString implGetText(); + virtual ::com::sun::star::lang::Locale implGetLocale(); + virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ); public: /** Ctor() - @param _rListBox + @param _rListBox the view control - @param _pEntry + @param _pEntry the entry - @param _xParent + @param _xParent is our parent accessible object */ - AccessibleListBoxEntry( SvTreeListBox& _rListBox, SvLBoxEntry* _pEntry, + AccessibleListBoxEntry( SvTreeListBox& _rListBox, SvLBoxEntry* _pEntry, const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _xParent ); diff --git a/accessibility/inc/accessibility/extended/accessibletabbar.hxx b/accessibility/inc/accessibility/extended/accessibletabbar.hxx index d7b43bc5870c..23c18d90e470 100644 --- a/accessibility/inc/accessibility/extended/accessibletabbar.hxx +++ b/accessibility/inc/accessibility/extended/accessibletabbar.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -45,9 +45,9 @@ namespace accessibility { //......................................................................... - // ---------------------------------------------------- - // class AccessibleTabBar - // ---------------------------------------------------- + // ---------------------------------------------------- + // class AccessibleTabBar + // ---------------------------------------------------- typedef ::cppu::ImplHelper2< ::com::sun::star::accessibility::XAccessible, @@ -57,19 +57,19 @@ namespace accessibility public AccessibleTabBar_BASE { private: - typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > > AccessibleChildren; + typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > > AccessibleChildren; - AccessibleChildren m_aAccessibleChildren; + AccessibleChildren m_aAccessibleChildren; protected: - virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); - virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); + virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); + virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); // OCommonAccessibleComponent - virtual ::com::sun::star::awt::Rectangle SAL_CALL implGetBounds( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::awt::Rectangle SAL_CALL implGetBounds( ) throw (::com::sun::star::uno::RuntimeException); // XComponent - virtual void SAL_CALL disposing(); + virtual void SAL_CALL disposing(); public: AccessibleTabBar( TabBar* pTabBar ); @@ -108,13 +108,13 @@ namespace accessibility virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException); // XAccessibleExtendedComponent - virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > SAL_CALL getFont( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > SAL_CALL getFont( ) throw (::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getTitledBorderText( ) throw (::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getToolTipText( ) throw (::com::sun::star::uno::RuntimeException); }; //......................................................................... -} // namespace accessibility +} // namespace accessibility //......................................................................... #endif // ACCESSIBILITY_EXT_ACCESSIBLETABBAR_HXX_ diff --git a/accessibility/inc/accessibility/extended/accessibletabbarbase.hxx b/accessibility/inc/accessibility/extended/accessibletabbarbase.hxx index b4e62f517d3f..555dada90dfd 100644 --- a/accessibility/inc/accessibility/extended/accessibletabbarbase.hxx +++ b/accessibility/inc/accessibility/extended/accessibletabbarbase.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/inc/accessibility/extended/accessibletabbarpage.hxx b/accessibility/inc/accessibility/extended/accessibletabbarpage.hxx index 756d2fff4b35..07f0945efafb 100644 --- a/accessibility/inc/accessibility/extended/accessibletabbarpage.hxx +++ b/accessibility/inc/accessibility/extended/accessibletabbarpage.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -45,9 +45,9 @@ namespace accessibility { //......................................................................... - // ---------------------------------------------------- - // class AccessibleTabBarPage - // ---------------------------------------------------- + // ---------------------------------------------------- + // class AccessibleTabBarPage + // ---------------------------------------------------- typedef ::cppu::ImplHelper2< ::com::sun::star::accessibility::XAccessible, @@ -59,36 +59,36 @@ namespace accessibility friend class AccessibleTabBarPageList; private: - sal_uInt16 m_nPageId; - sal_Bool m_bEnabled; - sal_Bool m_bShowing; - sal_Bool m_bSelected; - ::rtl::OUString m_sPageText; + sal_uInt16 m_nPageId; + sal_Bool m_bEnabled; + sal_Bool m_bShowing; + sal_Bool m_bSelected; + ::rtl::OUString m_sPageText; - ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > m_xParent; + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > m_xParent; protected: - sal_Bool IsEnabled(); - sal_Bool IsShowing(); - sal_Bool IsSelected(); + sal_Bool IsEnabled(); + sal_Bool IsShowing(); + sal_Bool IsSelected(); - void SetEnabled( sal_Bool bEnabled ); - void SetShowing( sal_Bool bShowing ); - void SetSelected( sal_Bool bSelected ); - void SetPageText( const ::rtl::OUString& sPageText ); + void SetEnabled( sal_Bool bEnabled ); + void SetShowing( sal_Bool bShowing ); + void SetSelected( sal_Bool bSelected ); + void SetPageText( const ::rtl::OUString& sPageText ); - sal_uInt16 GetPageId() const { return m_nPageId; } + sal_uInt16 GetPageId() const { return m_nPageId; } - virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); + virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); - // OCommonAccessibleComponent - virtual ::com::sun::star::awt::Rectangle SAL_CALL implGetBounds( ) throw (::com::sun::star::uno::RuntimeException); + // OCommonAccessibleComponent + virtual ::com::sun::star::awt::Rectangle SAL_CALL implGetBounds( ) throw (::com::sun::star::uno::RuntimeException); // XComponent - virtual void SAL_CALL disposing(); + virtual void SAL_CALL disposing(); public: - AccessibleTabBarPage( TabBar* pTabBar, sal_uInt16 nPageId, + AccessibleTabBarPage( TabBar* pTabBar, sal_uInt16 nPageId, const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxParent ); virtual ~AccessibleTabBarPage(); @@ -125,13 +125,13 @@ namespace accessibility virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException); // XAccessibleExtendedComponent - virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > SAL_CALL getFont( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > SAL_CALL getFont( ) throw (::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getTitledBorderText( ) throw (::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getToolTipText( ) throw (::com::sun::star::uno::RuntimeException); }; //......................................................................... -} // namespace accessibility +} // namespace accessibility //......................................................................... #endif // ACCESSIBILITY_EXT_ACCESSIBLETABBARPAGE_HXX_ diff --git a/accessibility/inc/accessibility/extended/accessibletabbarpagelist.hxx b/accessibility/inc/accessibility/extended/accessibletabbarpagelist.hxx index cc5dc276cd24..67b0ec7d00c0 100644 --- a/accessibility/inc/accessibility/extended/accessibletabbarpagelist.hxx +++ b/accessibility/inc/accessibility/extended/accessibletabbarpagelist.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -46,9 +46,9 @@ namespace accessibility { //......................................................................... - // ---------------------------------------------------- - // class AccessibleTabBarPageList - // ---------------------------------------------------- + // ---------------------------------------------------- + // class AccessibleTabBarPageList + // ---------------------------------------------------- typedef ::cppu::ImplHelper3< ::com::sun::star::accessibility::XAccessible, @@ -59,29 +59,29 @@ namespace accessibility public AccessibleTabBarPageList_BASE { private: - typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > > AccessibleChildren; + typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > > AccessibleChildren; - AccessibleChildren m_aAccessibleChildren; - sal_Int32 m_nIndexInParent; + AccessibleChildren m_aAccessibleChildren; + sal_Int32 m_nIndexInParent; protected: - void UpdateEnabled( sal_Int32 i, sal_Bool bEnabled ); - void UpdateShowing( sal_Bool bShowing ); - void UpdateSelected( sal_Int32 i, sal_Bool bSelected ); - void UpdatePageText( sal_Int32 i ); + void UpdateEnabled( sal_Int32 i, sal_Bool bEnabled ); + void UpdateShowing( sal_Bool bShowing ); + void UpdateSelected( sal_Int32 i, sal_Bool bSelected ); + void UpdatePageText( sal_Int32 i ); - void InsertChild( sal_Int32 i ); - void RemoveChild( sal_Int32 i ); - void MoveChild( sal_Int32 i, sal_Int32 j ); + void InsertChild( sal_Int32 i ); + void RemoveChild( sal_Int32 i ); + void MoveChild( sal_Int32 i, sal_Int32 j ); - virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); - virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); + virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); + virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); - // OCommonAccessibleComponent - virtual ::com::sun::star::awt::Rectangle SAL_CALL implGetBounds( ) throw (::com::sun::star::uno::RuntimeException); + // OCommonAccessibleComponent + virtual ::com::sun::star::awt::Rectangle SAL_CALL implGetBounds( ) throw (::com::sun::star::uno::RuntimeException); // XComponent - virtual void SAL_CALL disposing(); + virtual void SAL_CALL disposing(); public: AccessibleTabBarPageList( TabBar* pTabBar, sal_Int32 nIndexInParent ); @@ -120,7 +120,7 @@ namespace accessibility virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException); // XAccessibleExtendedComponent - virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > SAL_CALL getFont( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > SAL_CALL getFont( ) throw (::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getTitledBorderText( ) throw (::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getToolTipText( ) throw (::com::sun::star::uno::RuntimeException); @@ -135,7 +135,7 @@ namespace accessibility }; //......................................................................... -} // namespace accessibility +} // namespace accessibility //......................................................................... #endif // ACCESSIBILITY_EXT_ACCESSIBLETABBARPAGELIST_HXX_ diff --git a/accessibility/inc/accessibility/extended/accessibletablistbox.hxx b/accessibility/inc/accessibility/extended/accessibletablistbox.hxx index 4e6f03af3c9b..19da7b496260 100644 --- a/accessibility/inc/accessibility/extended/accessibletablistbox.hxx +++ b/accessibility/inc/accessibility/extended/accessibletablistbox.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -52,7 +52,7 @@ class AccessibleTabListBox ,public ::svt::IAccessibleTabListBox { private: - SvHeaderTabListBox* m_pTabListBox; + SvHeaderTabListBox* m_pTabListBox; public: /** ctor() @@ -103,7 +103,7 @@ protected: /** This method creates and returns an accessible table. @return An AccessibleBrowseBoxTable. */ - virtual AccessibleBrowseBoxTable* createAccessibleTable(); + virtual AccessibleBrowseBoxTable* createAccessibleTable(); }; // ============================================================================ diff --git a/accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx b/accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx index 153dc76f2a65..81d2964c795b 100644 --- a/accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx +++ b/accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -46,10 +46,10 @@ typedef ::cppu::ImplHelper1< ::com::sun::star::accessibility::XAccessibleSelecti class AccessibleTabListBoxTable : public AccessibleBrowseBoxTable, public AccessibleTabListBoxTableImplHelper { private: - SvHeaderTabListBox* m_pTabListBox; + SvHeaderTabListBox* m_pTabListBox; - void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); - DECL_LINK( WindowEventListener, VclSimpleEvent* ); + void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); + DECL_LINK( WindowEventListener, VclSimpleEvent* ); // helpers ---------------------------------------------------------------- diff --git a/accessibility/inc/accessibility/extended/listboxaccessible.hxx b/accessibility/inc/accessibility/extended/listboxaccessible.hxx index b82291f91e79..ad8b4eed4954 100644 --- a/accessibility/inc/accessibility/extended/listboxaccessible.hxx +++ b/accessibility/inc/accessibility/extended/listboxaccessible.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -53,12 +53,12 @@ namespace accessibility SvTreeListBox* m_pWindow; protected: - inline SvTreeListBox* getListBox() const + inline SvTreeListBox* getListBox() const { - return const_cast< ListBoxAccessibleBase* >( this )->m_pWindow; + return const_cast< ListBoxAccessibleBase* >( this )->m_pWindow; } - inline bool isAlive() const { return NULL != m_pWindow; } + inline bool isAlive() const { return NULL != m_pWindow; } public: ListBoxAccessibleBase( SvTreeListBox& _rWindow ); @@ -84,13 +84,13 @@ namespace accessibility DECL_LINK( WindowEventListener, VclSimpleEvent* ); private: - ListBoxAccessibleBase( ); // never implemented - ListBoxAccessibleBase( const ListBoxAccessibleBase& ); // never implemented - ListBoxAccessibleBase& operator=( const ListBoxAccessibleBase& ); // never implemented + ListBoxAccessibleBase( ); // never implemented + ListBoxAccessibleBase( const ListBoxAccessibleBase& ); // never implemented + ListBoxAccessibleBase& operator=( const ListBoxAccessibleBase& ); // never implemented }; //........................................................................ -} // namespace accessibility +} // namespace accessibility //........................................................................ #endif // ACCESSIBILITY_EXT_LISTBOX_ACCESSIBLE diff --git a/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx b/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx index 091eebe46d18..3f7bd49a3a35 100644 --- a/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx +++ b/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -170,7 +170,7 @@ public: protected: // OCommonAccessibleText - virtual void implGetParagraphBoundary( ::css::i18n::Boundary& rBoundary, + virtual void implGetParagraphBoundary( ::css::i18n::Boundary& rBoundary, ::sal_Int32 nIndex ); virtual void implGetLineBoundary( ::css::i18n::Boundary& rBoundary, ::sal_Int32 nIndex ); @@ -347,18 +347,18 @@ private: throw (::css::lang::IndexOutOfBoundsException, ::css::uno::RuntimeException); - virtual ::sal_Int32 SAL_CALL getLineNumberAtIndex( ::sal_Int32 nIndex ) - throw (::com::sun::star::lang::IndexOutOfBoundsException, + virtual ::sal_Int32 SAL_CALL getLineNumberAtIndex( ::sal_Int32 nIndex ) + throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - - virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtLineNumber( ::sal_Int32 nLineNo ) + + virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtLineNumber( ::sal_Int32 nLineNo ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - - virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtLineWithCaret( ) + + virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtLineWithCaret( ) throw (::com::sun::star::uno::RuntimeException); - - virtual ::sal_Int32 SAL_CALL getNumberOfLineWithCaret( ) + + virtual ::sal_Int32 SAL_CALL getNumberOfLineWithCaret( ) throw (::com::sun::star::uno::RuntimeException); using cppu::WeakAggComponentImplHelperBase::addEventListener; @@ -552,15 +552,15 @@ public: ::sal_Int32 nBegin, ::sal_Int32 nEnd); ::css::i18n::Boundary - retrieveParagraphLineBoundary( ParagraphImpl const * pParagraph, + retrieveParagraphLineBoundary( ParagraphImpl const * pParagraph, ::sal_Int32 nIndex, ::sal_Int32 *pLineNo = NULL); ::css::i18n::Boundary - retrieveParagraphBoundaryOfLine( ParagraphImpl const * pParagraph, + retrieveParagraphBoundaryOfLine( ParagraphImpl const * pParagraph, ::sal_Int32 nIndex ); sal_Int32 retrieveParagraphLineWithCursor( ParagraphImpl const * pParagraph ); - + ::css::uno::Reference< ::css::accessibility::XAccessibleRelationSet > retrieveParagraphRelationSet( ParagraphImpl const * pParagraph ); diff --git a/accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx b/accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx index a4b09cd83b99..561b2122a00a 100644 --- a/accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx +++ b/accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -43,24 +43,24 @@ namespace accessibility class SAL_NO_VTABLE IComboListBoxHelper { public: - virtual String GetEntry( USHORT nPos ) const = 0; - virtual Rectangle GetDropDownPosSizePixel( ) const = 0; - virtual Rectangle GetBoundingRectangle( USHORT nItem ) const = 0; - virtual Rectangle GetWindowExtentsRelative( Window* pRelativeWindow ) = 0; - virtual BOOL IsActive() const = 0; - virtual BOOL IsEntryVisible( USHORT nPos ) const = 0; - virtual USHORT GetDisplayLineCount() const = 0; + virtual String GetEntry( USHORT nPos ) const = 0; + virtual Rectangle GetDropDownPosSizePixel( ) const = 0; + virtual Rectangle GetBoundingRectangle( USHORT nItem ) const = 0; + virtual Rectangle GetWindowExtentsRelative( Window* pRelativeWindow ) = 0; + virtual BOOL IsActive() const = 0; + virtual BOOL IsEntryVisible( USHORT nPos ) const = 0; + virtual USHORT GetDisplayLineCount() const = 0; virtual void GetMaxVisColumnsAndLines( USHORT& rnCols, USHORT& rnLines ) const = 0; virtual WinBits GetStyle() const = 0; virtual BOOL IsMultiSelectionEnabled() const = 0; - virtual USHORT GetTopEntry() const = 0; - virtual BOOL IsEntryPosSelected( USHORT nPos ) const = 0; + virtual USHORT GetTopEntry() const = 0; + virtual BOOL IsEntryPosSelected( USHORT nPos ) const = 0; virtual USHORT GetEntryCount() const = 0; - virtual void Select() = 0; - virtual void SelectEntryPos( USHORT nPos, BOOL bSelect = TRUE ) = 0; - virtual USHORT GetSelectEntryCount() const = 0; - virtual void SetNoSelection() = 0; - virtual USHORT GetSelectEntryPos( USHORT nSelIndex = 0 ) const = 0; + virtual void Select() = 0; + virtual void SelectEntryPos( USHORT nPos, BOOL bSelect = TRUE ) = 0; + virtual USHORT GetSelectEntryCount() const = 0; + virtual void SetNoSelection() = 0; + virtual USHORT GetSelectEntryPos( USHORT nSelIndex = 0 ) const = 0; virtual BOOL IsInDropDown() const = 0; virtual Rectangle GetEntryCharacterBounds( const sal_Int32 _nEntryPos, const sal_Int32 _nCharacterIndex ) const = 0; virtual long GetIndexForPoint( const Point& rPoint, USHORT& nPos ) const = 0; diff --git a/accessibility/inc/accessibility/helper/acc_factory.hxx b/accessibility/inc/accessibility/helper/acc_factory.hxx index b3dec4607517..b0b0778a011b 100644 --- a/accessibility/inc/accessibility/helper/acc_factory.hxx +++ b/accessibility/inc/accessibility/helper/acc_factory.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/inc/accessibility/helper/accessiblestrings.hrc b/accessibility/inc/accessibility/helper/accessiblestrings.hrc index 1f936e678b98..8040f3588261 100644 --- a/accessibility/inc/accessibility/helper/accessiblestrings.hrc +++ b/accessibility/inc/accessibility/helper/accessiblestrings.hrc @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -31,21 +31,21 @@ //------------------------------------------------------------------------------ -#define RID_TK_ACC_START 1000 +#define RID_TK_ACC_START 1000 // Accessible Action Id's ------------------------------------------------------ -#define RID_STR_ACC_ACTION_CLICK ( RID_TK_ACC_START + 0 ) -#define RID_STR_ACC_ACTION_TOGGLEPOPUP ( RID_TK_ACC_START + 1 ) -#define RID_STR_ACC_ACTION_SELECT ( RID_TK_ACC_START + 2 ) -#define RID_STR_ACC_ACTION_INCLINE ( RID_TK_ACC_START + 3 ) -#define RID_STR_ACC_ACTION_DECLINE ( RID_TK_ACC_START + 4 ) -#define RID_STR_ACC_ACTION_INCBLOCK ( RID_TK_ACC_START + 5 ) -#define RID_STR_ACC_ACTION_DECBLOCK ( RID_TK_ACC_START + 6 ) +#define RID_STR_ACC_ACTION_CLICK ( RID_TK_ACC_START + 0 ) +#define RID_STR_ACC_ACTION_TOGGLEPOPUP ( RID_TK_ACC_START + 1 ) +#define RID_STR_ACC_ACTION_SELECT ( RID_TK_ACC_START + 2 ) +#define RID_STR_ACC_ACTION_INCLINE ( RID_TK_ACC_START + 3 ) +#define RID_STR_ACC_ACTION_DECLINE ( RID_TK_ACC_START + 4 ) +#define RID_STR_ACC_ACTION_INCBLOCK ( RID_TK_ACC_START + 5 ) +#define RID_STR_ACC_ACTION_DECBLOCK ( RID_TK_ACC_START + 6 ) -#define RID_STR_ACC_NAME_BROWSEBUTTON ( RID_TK_ACC_START + 100 ) +#define RID_STR_ACC_NAME_BROWSEBUTTON ( RID_TK_ACC_START + 100 ) #define RID_STR_ACC_DESC_PANELDECL_TABBAR ( RID_TK_ACC_START + 101 ) // ----------------------------------------------------------------------------- diff --git a/accessibility/inc/accessibility/helper/accresmgr.hxx b/accessibility/inc/accessibility/helper/accresmgr.hxx index 4208d6d80f06..079ae6c83c7b 100644 --- a/accessibility/inc/accessibility/helper/accresmgr.hxx +++ b/accessibility/inc/accessibility/helper/accresmgr.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -48,7 +48,7 @@ private: TkResMgr() { } ~TkResMgr() { } - // we'll instantiate one static member of the following class, + // we'll instantiate one static member of the following class, // which in it's dtor ensures that m_pImpl will be deleted class EnsureDelete { diff --git a/accessibility/inc/accessibility/helper/characterattributeshelper.hxx b/accessibility/inc/accessibility/helper/characterattributeshelper.hxx index 16e37f4e103c..4e5cb90dc5cf 100644 --- a/accessibility/inc/accessibility/helper/characterattributeshelper.hxx +++ b/accessibility/inc/accessibility/helper/characterattributeshelper.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -56,6 +56,6 @@ public: ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > GetCharacterAttributes( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes ); }; -#endif // ACCESSIBILITY_HELPER_CHARACTERATTRIBUTESHELPER_HXX +#endif // ACCESSIBILITY_HELPER_CHARACTERATTRIBUTESHELPER_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/helper/listboxhelper.hxx b/accessibility/inc/accessibility/helper/listboxhelper.hxx index 8343d95e9447..ed7e65ab5225 100644 --- a/accessibility/inc/accessibility/helper/listboxhelper.hxx +++ b/accessibility/inc/accessibility/helper/listboxhelper.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -47,7 +47,7 @@ const sal_Int32 DEFAULT_INDEX_IN_PARENT = -1; template< class T > class VCLListBoxHelper : public ::accessibility::IComboListBoxHelper { private: - T& m_aComboListBox; + T& m_aComboListBox; public: inline @@ -55,12 +55,12 @@ public: m_aComboListBox( _pListBox ){} // ----------------------------------------------------------------------------- - virtual String GetEntry( USHORT nPos ) const + virtual String GetEntry( USHORT nPos ) const { return m_aComboListBox.GetEntry( nPos ); } // ----------------------------------------------------------------------------- - virtual Rectangle GetDropDownPosSizePixel() const + virtual Rectangle GetDropDownPosSizePixel() const { Rectangle aTemp = m_aComboListBox.GetWindowExtentsRelative(NULL); Rectangle aRet = m_aComboListBox.GetDropDownPosSizePixel(); @@ -68,7 +68,7 @@ public: return aRet; } // ----------------------------------------------------------------------------- - virtual Rectangle GetBoundingRectangle( USHORT nItem ) const + virtual Rectangle GetBoundingRectangle( USHORT nItem ) const { Rectangle aRect; if ( m_aComboListBox.IsInDropDown() && IsEntryVisible( nItem ) ) @@ -85,24 +85,24 @@ public: return aRect; } // ----------------------------------------------------------------------------- - virtual Rectangle GetWindowExtentsRelative( Window* pRelativeWindow ) + virtual Rectangle GetWindowExtentsRelative( Window* pRelativeWindow ) { return m_aComboListBox.GetWindowExtentsRelative( pRelativeWindow ); } // ----------------------------------------------------------------------------- - virtual BOOL IsActive() const + virtual BOOL IsActive() const { return m_aComboListBox.IsActive(); } // ----------------------------------------------------------------------------- - virtual BOOL IsEntryVisible( USHORT nPos ) const + virtual BOOL IsEntryVisible( USHORT nPos ) const { USHORT nTopEntry = m_aComboListBox.GetTopEntry(); USHORT nLines = m_aComboListBox.GetDisplayLineCount(); return ( nPos >= nTopEntry && nPos < ( nTopEntry + nLines ) ); } // ----------------------------------------------------------------------------- - virtual USHORT GetDisplayLineCount() const + virtual USHORT GetDisplayLineCount() const { return m_aComboListBox.GetDisplayLineCount(); } @@ -122,12 +122,12 @@ public: return m_aComboListBox.IsMultiSelectionEnabled(); } // ----------------------------------------------------------------------------- - virtual USHORT GetTopEntry() const + virtual USHORT GetTopEntry() const { return m_aComboListBox.GetTopEntry(); } // ----------------------------------------------------------------------------- - virtual BOOL IsEntryPosSelected( USHORT nPos ) const + virtual BOOL IsEntryPosSelected( USHORT nPos ) const { return m_aComboListBox.IsEntryPosSelected(nPos); } @@ -142,22 +142,22 @@ public: m_aComboListBox.Select(); } // ----------------------------------------------------------------------------- - virtual void SelectEntryPos( USHORT nPos, BOOL bSelect = TRUE ) + virtual void SelectEntryPos( USHORT nPos, BOOL bSelect = TRUE ) { m_aComboListBox.SelectEntryPos(nPos,bSelect); } // ----------------------------------------------------------------------------- - virtual USHORT GetSelectEntryCount() const + virtual USHORT GetSelectEntryCount() const { return m_aComboListBox.GetSelectEntryCount(); } // ----------------------------------------------------------------------------- - virtual void SetNoSelection() + virtual void SetNoSelection() { m_aComboListBox.SetNoSelection(); } // ----------------------------------------------------------------------------- - virtual USHORT GetSelectEntryPos( USHORT nSelIndex = 0 ) const + virtual USHORT GetSelectEntryPos( USHORT nSelIndex = 0 ) const { return m_aComboListBox.GetSelectEntryPos(nSelIndex); } @@ -193,6 +193,6 @@ public: // ----------------------------------------------------------------------------- }; -#endif // ACCESSIBILITY_HELPER_LISTBOXHELPER_HXX +#endif // ACCESSIBILITY_HELPER_LISTBOXHELPER_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/standard/accessiblemenubasecomponent.hxx b/accessibility/inc/accessibility/standard/accessiblemenubasecomponent.hxx index 9dee945787ff..52ed3e1e43f4 100644 --- a/accessibility/inc/accessibility/standard/accessiblemenubasecomponent.hxx +++ b/accessibility/inc/accessibility/standard/accessiblemenubasecomponent.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -47,11 +47,11 @@ namespace utl { class AccessibleStateSetHelper; } -// ---------------------------------------------------- -// class OAccessibleMenuBaseComponent -// ---------------------------------------------------- +// ---------------------------------------------------- +// class OAccessibleMenuBaseComponent +// ---------------------------------------------------- -typedef ::comphelper::OAccessibleExtendedComponentHelper AccessibleExtendedComponentHelper_BASE; +typedef ::comphelper::OAccessibleExtendedComponentHelper AccessibleExtendedComponentHelper_BASE; typedef ::cppu::ImplHelper2< ::com::sun::star::accessibility::XAccessible, @@ -65,76 +65,76 @@ class OAccessibleMenuBaseComponent : public AccessibleExtendedComponentHelper_BA friend class VCLXAccessibleMenu; private: - VCLExternalSolarLock* m_pExternalLock; + VCLExternalSolarLock* m_pExternalLock; protected: - typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > > AccessibleChildren; + typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > > AccessibleChildren; - AccessibleChildren m_aAccessibleChildren; - Menu* m_pMenu; + AccessibleChildren m_aAccessibleChildren; + Menu* m_pMenu; - sal_Bool m_bEnabled; - sal_Bool m_bFocused; + sal_Bool m_bEnabled; + sal_Bool m_bFocused; sal_Bool m_bVisible; - sal_Bool m_bSelected; - sal_Bool m_bChecked; + sal_Bool m_bSelected; + sal_Bool m_bChecked; - Menu* GetMenu() { return m_pMenu; } + Menu* GetMenu() { return m_pMenu; } - virtual sal_Bool IsEnabled(); - virtual sal_Bool IsFocused(); + virtual sal_Bool IsEnabled(); + virtual sal_Bool IsFocused(); virtual sal_Bool IsVisible(); - virtual sal_Bool IsSelected(); - virtual sal_Bool IsChecked(); + virtual sal_Bool IsSelected(); + virtual sal_Bool IsChecked(); - void SetEnabled( sal_Bool bEnabled ); - void SetFocused( sal_Bool bFocused ); + void SetEnabled( sal_Bool bEnabled ); + void SetFocused( sal_Bool bFocused ); void SetVisible( sal_Bool bVisible ); - void SetSelected( sal_Bool bSelected ); - void SetChecked( sal_Bool bChecked ); + void SetSelected( sal_Bool bSelected ); + void SetChecked( sal_Bool bChecked ); - void UpdateEnabled( sal_Int32 i, sal_Bool bEnabled ); + void UpdateEnabled( sal_Int32 i, sal_Bool bEnabled ); void UpdateFocused( sal_Int32 i, sal_Bool bFocused ); void UpdateVisible(); - void UpdateSelected( sal_Int32 i, sal_Bool bSelected ); - void UpdateChecked( sal_Int32 i, sal_Bool bChecked ); - void UpdateAccessibleName( sal_Int32 i ); - void UpdateItemText( sal_Int32 i ); + void UpdateSelected( sal_Int32 i, sal_Bool bSelected ); + void UpdateChecked( sal_Int32 i, sal_Bool bChecked ); + void UpdateAccessibleName( sal_Int32 i ); + void UpdateItemText( sal_Int32 i ); - sal_Int32 GetChildCount(); + sal_Int32 GetChildCount(); ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > GetChild( sal_Int32 i ); ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > GetChildAt( const ::com::sun::star::awt::Point& rPoint ); - void InsertChild( sal_Int32 i ); - void RemoveChild( sal_Int32 i ); + void InsertChild( sal_Int32 i ); + void RemoveChild( sal_Int32 i ); - virtual sal_Bool IsHighlighted(); + virtual sal_Bool IsHighlighted(); sal_Bool IsChildHighlighted(); - void SelectChild( sal_Int32 i ); - void DeSelectAll(); - sal_Bool IsChildSelected( sal_Int32 i ); + void SelectChild( sal_Int32 i ); + void DeSelectAll(); + sal_Bool IsChildSelected( sal_Int32 i ); - virtual void Select(); - virtual void DeSelect(); + virtual void Select(); + virtual void DeSelect(); virtual void Click(); virtual sal_Bool IsPopupMenuOpen(); DECL_LINK( MenuEventListener, VclSimpleEvent* ); - virtual void ProcessMenuEvent( const VclMenuEvent& rVclMenuEvent ); + virtual void ProcessMenuEvent( const VclMenuEvent& rVclMenuEvent ); - virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) = 0; + virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) = 0; // XComponent - virtual void SAL_CALL disposing(); + virtual void SAL_CALL disposing(); public: OAccessibleMenuBaseComponent( Menu* pMenu ); virtual ~OAccessibleMenuBaseComponent(); - void SetStates(); + void SetStates(); // XInterface DECLARE_XINTERFACE() diff --git a/accessibility/inc/accessibility/standard/accessiblemenucomponent.hxx b/accessibility/inc/accessibility/standard/accessiblemenucomponent.hxx index d33d3e05e0dd..2d292c98fe78 100644 --- a/accessibility/inc/accessibility/standard/accessiblemenucomponent.hxx +++ b/accessibility/inc/accessibility/standard/accessiblemenucomponent.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,11 +34,11 @@ #include <cppuhelper/implbase1.hxx> -// ---------------------------------------------------- -// class OAccessibleMenuComponent -// ---------------------------------------------------- +// ---------------------------------------------------- +// class OAccessibleMenuComponent +// ---------------------------------------------------- -typedef ::comphelper::OAccessibleExtendedComponentHelper AccessibleExtendedComponentHelper_BASE; +typedef ::comphelper::OAccessibleExtendedComponentHelper AccessibleExtendedComponentHelper_BASE; typedef ::cppu::ImplHelper1< ::com::sun::star::accessibility::XAccessibleSelection > OAccessibleMenuComponent_BASE; @@ -47,13 +47,13 @@ class OAccessibleMenuComponent : public OAccessibleMenuBaseComponent, public OAccessibleMenuComponent_BASE { protected: - virtual sal_Bool IsEnabled(); + virtual sal_Bool IsEnabled(); virtual sal_Bool IsVisible(); - virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); + virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); - // OCommonAccessibleComponent - virtual ::com::sun::star::awt::Rectangle SAL_CALL implGetBounds( ) throw (::com::sun::star::uno::RuntimeException); + // OCommonAccessibleComponent + virtual ::com::sun::star::awt::Rectangle SAL_CALL implGetBounds( ) throw (::com::sun::star::uno::RuntimeException); public: OAccessibleMenuComponent( Menu* pMenu ); @@ -77,13 +77,13 @@ public: // XAccessibleComponent virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen( ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL grabFocus( ) throw (::com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL getForeground( ) throw (::com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException); // XAccessibleExtendedComponent - virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > SAL_CALL getFont( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > SAL_CALL getFont( ) throw (::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getTitledBorderText( ) throw (::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getToolTipText( ) throw (::com::sun::star::uno::RuntimeException); diff --git a/accessibility/inc/accessibility/standard/accessiblemenuitemcomponent.hxx b/accessibility/inc/accessibility/standard/accessiblemenuitemcomponent.hxx index 730175e685a2..f35e7ce8cca8 100644 --- a/accessibility/inc/accessibility/standard/accessiblemenuitemcomponent.hxx +++ b/accessibility/inc/accessibility/standard/accessiblemenuitemcomponent.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -32,39 +32,39 @@ #include <accessibility/standard/accessiblemenubasecomponent.hxx> -// ---------------------------------------------------- -// class OAccessibleMenuItemComponent -// ---------------------------------------------------- +// ---------------------------------------------------- +// class OAccessibleMenuItemComponent +// ---------------------------------------------------- class OAccessibleMenuItemComponent : public OAccessibleMenuBaseComponent { friend class OAccessibleMenuBaseComponent; protected: - Menu* m_pParent; - sal_uInt16 m_nItemPos; - ::rtl::OUString m_sAccessibleName; - ::rtl::OUString m_sItemText; - - virtual sal_Bool IsEnabled(); + Menu* m_pParent; + sal_uInt16 m_nItemPos; + ::rtl::OUString m_sAccessibleName; + ::rtl::OUString m_sItemText; + + virtual sal_Bool IsEnabled(); virtual sal_Bool IsVisible(); - virtual void Select(); - virtual void DeSelect(); + virtual void Select(); + virtual void DeSelect(); virtual void Click(); - void SetItemPos( sal_uInt16 nItemPos ); - void SetAccessibleName( const ::rtl::OUString& sAccessibleName ); - ::rtl::OUString GetAccessibleName(); - void SetItemText( const ::rtl::OUString& sItemText ); - ::rtl::OUString GetItemText(); + void SetItemPos( sal_uInt16 nItemPos ); + void SetAccessibleName( const ::rtl::OUString& sAccessibleName ); + ::rtl::OUString GetAccessibleName(); + void SetItemText( const ::rtl::OUString& sItemText ); + ::rtl::OUString GetItemText(); - virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); + virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); - // OCommonAccessibleComponent - virtual ::com::sun::star::awt::Rectangle SAL_CALL implGetBounds( ) throw (::com::sun::star::uno::RuntimeException); + // OCommonAccessibleComponent + virtual ::com::sun::star::awt::Rectangle SAL_CALL implGetBounds( ) throw (::com::sun::star::uno::RuntimeException); // XComponent - virtual void SAL_CALL disposing(); + virtual void SAL_CALL disposing(); public: OAccessibleMenuItemComponent( Menu* pParent, sal_uInt16 nItemPos, Menu* pMenu ); @@ -88,7 +88,7 @@ public: virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException); // XAccessibleExtendedComponent - virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > SAL_CALL getFont( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > SAL_CALL getFont( ) throw (::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getTitledBorderText( ) throw (::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getToolTipText( ) throw (::com::sun::star::uno::RuntimeException); }; diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblebox.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblebox.hxx index 1aa73ab26a2b..f5c8ba01aa73 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessiblebox.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessiblebox.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblebutton.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblebutton.hxx index f1e74db2fb2e..2702f2a5c7e9 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessiblebutton.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessiblebutton.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,9 +37,9 @@ #include <cppuhelper/implbase2.hxx> -// ---------------------------------------------------- -// class VCLXAccessibleButton -// ---------------------------------------------------- +// ---------------------------------------------------- +// class VCLXAccessibleButton +// ---------------------------------------------------- typedef ::cppu::ImplHelper2< ::com::sun::star::accessibility::XAccessibleAction, diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblecheckbox.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblecheckbox.hxx index 7545a7c93756..da1714196e2b 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessiblecheckbox.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessiblecheckbox.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,11 +37,11 @@ #include <cppuhelper/implbase2.hxx> -// ---------------------------------------------------- -// class VCLXAccessibleCheckBox -// ---------------------------------------------------- +// ---------------------------------------------------- +// class VCLXAccessibleCheckBox +// ---------------------------------------------------- -typedef ::cppu::ImplHelper2< +typedef ::cppu::ImplHelper2< ::com::sun::star::accessibility::XAccessibleAction, ::com::sun::star::accessibility::XAccessibleValue > VCLXAccessibleCheckBox_BASE; diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblecombobox.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblecombobox.hxx index 3eba57f58bca..86fd455e07bb 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessiblecombobox.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessiblecombobox.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -48,11 +48,11 @@ public: VCLXAccessibleComboBox (VCLXWindow* pVCLXindow); // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName (void) + virtual ::rtl::OUString SAL_CALL getImplementationName (void) throw (::com::sun::star::uno::RuntimeException); // Return combo box specific services. - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL - getSupportedServiceNames (void) + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL + getSupportedServiceNames (void) throw (::com::sun::star::uno::RuntimeException); protected: diff --git a/accessibility/inc/accessibility/standard/vclxaccessibledropdowncombobox.hxx b/accessibility/inc/accessibility/standard/vclxaccessibledropdowncombobox.hxx index c90e91b179d5..8779fd4ca4c5 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessibledropdowncombobox.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessibledropdowncombobox.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -50,11 +50,11 @@ public: VCLXAccessibleDropDownComboBox (VCLXWindow* pVCLXindow); // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName (void) + virtual ::rtl::OUString SAL_CALL getImplementationName (void) throw (::com::sun::star::uno::RuntimeException); // Return drop down combo box specific services. - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL - getSupportedServiceNames (void) + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL + getSupportedServiceNames (void) throw (::com::sun::star::uno::RuntimeException); protected: diff --git a/accessibility/inc/accessibility/standard/vclxaccessibledropdownlistbox.hxx b/accessibility/inc/accessibility/standard/vclxaccessibledropdownlistbox.hxx index 67e942b7a917..de69facb7ebb 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessibledropdownlistbox.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessibledropdownlistbox.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -49,11 +49,11 @@ public: VCLXAccessibleDropDownListBox (VCLXWindow* pVCLXindow); // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName (void) + virtual ::rtl::OUString SAL_CALL getImplementationName (void) throw (::com::sun::star::uno::RuntimeException); // Return drop down list box specific services. - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL - getSupportedServiceNames (void) + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL + getSupportedServiceNames (void) throw (::com::sun::star::uno::RuntimeException); protected: diff --git a/accessibility/inc/accessibility/standard/vclxaccessibleedit.hxx b/accessibility/inc/accessibility/standard/vclxaccessibleedit.hxx index 9fc77a0c8e7c..3f4117b6d452 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessibleedit.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessibleedit.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -36,11 +36,11 @@ #include <cppuhelper/implbase2.hxx> -// ---------------------------------------------------- -// class VCLXAccessibleEdit -// ---------------------------------------------------- +// ---------------------------------------------------- +// class VCLXAccessibleEdit +// ---------------------------------------------------- -typedef ::cppu::ImplHelper2< +typedef ::cppu::ImplHelper2< ::com::sun::star::accessibility::XAccessibleAction, ::com::sun::star::accessibility::XAccessibleEditableText > VCLXAccessibleEdit_BASE; @@ -50,18 +50,18 @@ class VCLXAccessibleEdit : public VCLXAccessibleTextComponent, friend class VCLXAccessibleBox; private: - sal_Int32 m_nSelectionStart; - sal_Int32 m_nCaretPosition; + sal_Int32 m_nSelectionStart; + sal_Int32 m_nCaretPosition; protected: virtual ~VCLXAccessibleEdit(); - virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); - virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); + virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); + virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); // OCommonAccessibleText - virtual ::rtl::OUString implGetText(); - virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ); + virtual ::rtl::OUString implGetText(); + virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ); public: VCLXAccessibleEdit( VCLXWindow* pVCLXindow ); diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblefixedhyperlink.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblefixedhyperlink.hxx index 9777ed472104..9f9c769d3da4 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessiblefixedhyperlink.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessiblefixedhyperlink.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -31,9 +31,9 @@ #include <accessibility/standard/vclxaccessibletextcomponent.hxx> -// ---------------------------------------------------- +// ---------------------------------------------------- // class VCLXAccessibleFixedHyperlink -// ---------------------------------------------------- +// ---------------------------------------------------- class VCLXAccessibleFixedHyperlink : public VCLXAccessibleTextComponent { diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblefixedtext.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblefixedtext.hxx index 2caaee09f7e6..285ca562f7bb 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessiblefixedtext.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessiblefixedtext.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -31,9 +31,9 @@ #include <accessibility/standard/vclxaccessibletextcomponent.hxx> -// ---------------------------------------------------- -// class VCLXAccessibleFixedText -// ---------------------------------------------------- +// ---------------------------------------------------- +// class VCLXAccessibleFixedText +// ---------------------------------------------------- class VCLXAccessibleFixedText : public VCLXAccessibleTextComponent { diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx index ea08b1b33919..4f4c3de66d12 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -143,21 +143,21 @@ public: virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen( ) throw (::com::sun::star::uno::RuntimeException); protected: - BoxType m_aBoxType; + BoxType m_aBoxType; ::accessibility::IComboListBoxHelper* m_pListBoxHelper; - ListItems m_aAccessibleChildren; - sal_Int32 m_nVisibleLineCount; + ListItems m_aAccessibleChildren; + sal_Int32 m_nVisibleLineCount; /// Index in parent. This is settable from the outside. - sal_Int32 m_nIndexInParent; - sal_Int32 m_nLastTopEntry; - USHORT m_nLastSelectedPos; - bool m_bDisableProcessEvent; - bool m_bVisible; - + sal_Int32 m_nIndexInParent; + sal_Int32 m_nLastTopEntry; + USHORT m_nLastSelectedPos; + bool m_bDisableProcessEvent; + bool m_bVisible; + /// The currently selected item. ::com::sun::star::uno::WeakReference< ::com::sun::star::accessibility::XAccessible> @@ -202,7 +202,7 @@ private: because this method of the base class returns the wrong parent. */ ::com::sun::star::uno::Reference< - ::com::sun::star::accessibility::XAccessible > m_xParent; + ::com::sun::star::accessibility::XAccessible > m_xParent; /** dispose all items aand clears the container diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblelistbox.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblelistbox.hxx index 52c07318c720..41829c0bb18e 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessiblelistbox.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessiblelistbox.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -46,11 +46,11 @@ public: VCLXAccessibleListBox (VCLXWindow* pVCLXindow); // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName (void) + virtual ::rtl::OUString SAL_CALL getImplementationName (void) throw (::com::sun::star::uno::RuntimeException); // Return list box specific services. - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL - getSupportedServiceNames (void) + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL + getSupportedServiceNames (void) throw (::com::sun::star::uno::RuntimeException); protected: diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblelistboxlist.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblelistboxlist.hxx index 436a20f55f28..906f22a0158c 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessiblelistboxlist.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessiblelistboxlist.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -36,8 +36,8 @@ #include <comphelper/uno3.hxx> #include <cppuhelper/implbase1.hxx> -typedef ::cppu::ImplHelper1 < ::com::sun::star::accessibility::XAccessibleSelection - > VCLXAccessibleListBoxList_BASE; +typedef ::cppu::ImplHelper1 < ::com::sun::star::accessibility::XAccessibleSelection + > VCLXAccessibleListBoxList_BASE; class ListBox; @@ -89,9 +89,9 @@ protected: virtual void ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent); private: - sal_Int32 m_nLastTopEntry; - USHORT m_nLastSelectedPos; - bool m_bDisableProcessEvent; + sal_Int32 m_nLastTopEntry; + USHORT m_nLastSelectedPos; + bool m_bDisableProcessEvent; void UpdateEntryRange_Impl (void); using VCLXAccessibleList::UpdateSelection_Impl; diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblelistitem.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblelistitem.hxx index 9dc4936988a8..640f002417c8 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessiblelistitem.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessiblelistitem.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -70,29 +70,29 @@ class VCLXAccessibleListItem : public ::comphelper::OBaseMutex, public VCLXAccessibleListItem_BASE { private: - ::rtl::OUString m_sEntryText; - sal_Int32 m_nIndexInParent; - sal_Bool m_bSelected; - sal_Bool m_bVisible; + ::rtl::OUString m_sEntryText; + sal_Int32 m_nIndexInParent; + sal_Bool m_bSelected; + sal_Bool m_bVisible; protected: /// client id in the AccessibleEventNotifier queue sal_uInt32 m_nClientId; - ::accessibility::IComboListBoxHelper* m_pListBoxHelper; + ::accessibility::IComboListBoxHelper* m_pListBoxHelper; - ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > m_xParent; - ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > m_xParentContext; + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > m_xParent; + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > m_xParentContext; private: /** notifies all listeners that this object has changed - @param _nEventId + @param _nEventId is the event id - @param _aOldValue + @param _aOldValue is the old value - @param _aNewValue + @param _aNewValue is the new value */ - void NotifyAccessibleEvent( sal_Int16 _nEventId, + void NotifyAccessibleEvent( sal_Int16 _nEventId, const ::com::sun::star::uno::Any& _aOldValue, const ::com::sun::star::uno::Any& _aNewValue ); @@ -100,32 +100,32 @@ protected: virtual ~VCLXAccessibleListItem(); /** this function is called upon disposing the component */ - virtual void SAL_CALL disposing(); + virtual void SAL_CALL disposing(); // OCommonAccessibleText - virtual ::rtl::OUString implGetText(); - virtual ::com::sun::star::lang::Locale implGetLocale(); - virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ); + virtual ::rtl::OUString implGetText(); + virtual ::com::sun::star::lang::Locale implGetLocale(); + virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ); public: /** OAccessibleBase needs a valid view - @param _pListBoxHelper + @param _pListBoxHelper is the list- or combobox for which we implement an accessible object - @param _nIndexInParent + @param _nIndexInParent is the position of the entry inside the listbox - @param _xParent + @param _xParent is our parent accessible object */ - VCLXAccessibleListItem( ::accessibility::IComboListBoxHelper* _pListBoxHelper, + VCLXAccessibleListItem( ::accessibility::IComboListBoxHelper* _pListBoxHelper, sal_Int32 _nIndexInParent, const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _xParent ); - inline sal_Bool IsSelected() const { return m_bSelected; } - void SetSelected( sal_Bool _bSelected ); - void SetVisible( sal_Bool _bVisible ); - inline bool DecrementIndexInParent() { OSL_ENSURE(m_nIndexInParent != 0,"Invalid call!");--m_nIndexInParent; return true;} - inline bool IncrementIndexInParent() { ++m_nIndexInParent; return true;} + inline sal_Bool IsSelected() const { return m_bSelected; } + void SetSelected( sal_Bool _bSelected ); + void SetVisible( sal_Bool _bVisible ); + inline bool DecrementIndexInParent() { OSL_ENSURE(m_nIndexInParent != 0,"Invalid call!");--m_nIndexInParent; return true;} + inline bool IncrementIndexInParent() { ++m_nIndexInParent; return true;} // XInterface virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblemenu.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblemenu.hxx index 6103dbeb6fe7..0115d5d13696 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessiblemenu.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessiblemenu.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -35,14 +35,14 @@ #include <cppuhelper/implbase1.hxx> -// ---------------------------------------------------- -// class VCLXAccessibleMenu -// ---------------------------------------------------- +// ---------------------------------------------------- +// class VCLXAccessibleMenu +// ---------------------------------------------------- -typedef ::cppu::ImplHelper1 < - ::com::sun::star::accessibility::XAccessibleSelection > VCLXAccessibleMenu_BASE; +typedef ::cppu::ImplHelper1 < + ::com::sun::star::accessibility::XAccessibleSelection > VCLXAccessibleMenu_BASE; -class VCLXAccessibleMenu : public VCLXAccessibleMenuItem, +class VCLXAccessibleMenu : public VCLXAccessibleMenuItem, public VCLXAccessibleMenu_BASE { protected: diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblemenubar.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblemenubar.hxx index ffe565fcd1db..469fad4e984a 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessiblemenubar.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessiblemenubar.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -36,23 +36,23 @@ class VclWindowEvent; class Window; -// ---------------------------------------------------- -// class VCLXAccessibleMenuBar -// ---------------------------------------------------- +// ---------------------------------------------------- +// class VCLXAccessibleMenuBar +// ---------------------------------------------------- -class VCLXAccessibleMenuBar : public OAccessibleMenuComponent +class VCLXAccessibleMenuBar : public OAccessibleMenuComponent { protected: - Window* m_pWindow; + Window* m_pWindow; - virtual sal_Bool IsFocused(); + virtual sal_Bool IsFocused(); DECL_LINK( WindowEventListener, VclSimpleEvent* ); - virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); + virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); // XComponent - virtual void SAL_CALL disposing(); + virtual void SAL_CALL disposing(); public: VCLXAccessibleMenuBar( Menu* pMenu ); diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblemenuitem.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblemenuitem.hxx index 78e08bc4d0af..f9d3ff12cdfb 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessiblemenuitem.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessiblemenuitem.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -38,32 +38,32 @@ #include <comphelper/accessibletexthelper.hxx> -// ---------------------------------------------------- -// class VCLXAccessibleMenuItem -// ---------------------------------------------------- +// ---------------------------------------------------- +// class VCLXAccessibleMenuItem +// ---------------------------------------------------- typedef ::cppu::ImplHelper3< ::com::sun::star::accessibility::XAccessibleText, ::com::sun::star::accessibility::XAccessibleAction, ::com::sun::star::accessibility::XAccessibleValue > VCLXAccessibleMenuItem_BASE; -class VCLXAccessibleMenuItem : public OAccessibleMenuItemComponent, +class VCLXAccessibleMenuItem : public OAccessibleMenuItemComponent, public ::comphelper::OCommonAccessibleText, public VCLXAccessibleMenuItem_BASE { protected: virtual sal_Bool IsFocused(); virtual sal_Bool IsSelected(); - virtual sal_Bool IsChecked(); + virtual sal_Bool IsChecked(); - virtual sal_Bool IsHighlighted(); + virtual sal_Bool IsHighlighted(); virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); // OCommonAccessibleText - virtual ::rtl::OUString implGetText(); - virtual ::com::sun::star::lang::Locale implGetLocale(); - virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ); + virtual ::rtl::OUString implGetText(); + virtual ::com::sun::star::lang::Locale implGetLocale(); + virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ); public: VCLXAccessibleMenuItem( Menu* pParent, sal_uInt16 nItemPos, Menu* pMenu = 0 ); diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblemenuseparator.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblemenuseparator.hxx index 0cfb3e50545b..15fc571d6ec1 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessiblemenuseparator.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessiblemenuseparator.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -32,11 +32,11 @@ #include <accessibility/standard/accessiblemenuitemcomponent.hxx> -// ---------------------------------------------------- -// class VCLXAccessibleMenuSeparator -// ---------------------------------------------------- +// ---------------------------------------------------- +// class VCLXAccessibleMenuSeparator +// ---------------------------------------------------- -class VCLXAccessibleMenuSeparator : public OAccessibleMenuItemComponent +class VCLXAccessibleMenuSeparator : public OAccessibleMenuItemComponent { public: VCLXAccessibleMenuSeparator( Menu* pParent, sal_uInt16 nItemPos, Menu* pMenu = 0 ); diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblepopupmenu.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblepopupmenu.hxx index 536241abab4e..812bcd831227 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessiblepopupmenu.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessiblepopupmenu.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -32,14 +32,14 @@ #include <accessibility/standard/accessiblemenucomponent.hxx> -// ---------------------------------------------------- -// class VCLXAccessiblePopupMenu -// ---------------------------------------------------- +// ---------------------------------------------------- +// class VCLXAccessiblePopupMenu +// ---------------------------------------------------- -class VCLXAccessiblePopupMenu : public OAccessibleMenuComponent +class VCLXAccessiblePopupMenu : public OAccessibleMenuComponent { protected: - virtual sal_Bool IsFocused(); + virtual sal_Bool IsFocused(); public: VCLXAccessiblePopupMenu( Menu* pMenu ); diff --git a/accessibility/inc/accessibility/standard/vclxaccessibleradiobutton.hxx b/accessibility/inc/accessibility/standard/vclxaccessibleradiobutton.hxx index 649b844a0159..1824bd1eb78f 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessibleradiobutton.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessibleradiobutton.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,11 +37,11 @@ #include <cppuhelper/implbase2.hxx> -// ---------------------------------------------------- -// class VCLXAccessibleRadioButton -// ---------------------------------------------------- +// ---------------------------------------------------- +// class VCLXAccessibleRadioButton +// ---------------------------------------------------- -typedef ::cppu::ImplHelper2< +typedef ::cppu::ImplHelper2< ::com::sun::star::accessibility::XAccessibleAction, ::com::sun::star::accessibility::XAccessibleValue > VCLXAccessibleRadioButton_BASE; diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblescrollbar.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblescrollbar.hxx index b1d26c84f7cb..415887bf3cc1 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessiblescrollbar.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessiblescrollbar.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,9 +37,9 @@ #include <cppuhelper/implbase2.hxx> -// ---------------------------------------------------- -// class VCLXAccessibleScrollBar -// ---------------------------------------------------- +// ---------------------------------------------------- +// class VCLXAccessibleScrollBar +// ---------------------------------------------------- typedef ::cppu::ImplHelper2< ::com::sun::star::accessibility::XAccessibleAction, diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblestatusbar.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblestatusbar.hxx index 60d88e1c9f14..2e1d06dea2fd 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessiblestatusbar.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessiblestatusbar.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -35,30 +35,30 @@ class StatusBar; -// ---------------------------------------------------- -// class VCLXAccessibleStatusBar -// ---------------------------------------------------- +// ---------------------------------------------------- +// class VCLXAccessibleStatusBar +// ---------------------------------------------------- -class VCLXAccessibleStatusBar : public VCLXAccessibleComponent +class VCLXAccessibleStatusBar : public VCLXAccessibleComponent { private: - typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > > AccessibleChildren; + typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > > AccessibleChildren; - AccessibleChildren m_aAccessibleChildren; - StatusBar* m_pStatusBar; + AccessibleChildren m_aAccessibleChildren; + StatusBar* m_pStatusBar; protected: - void UpdateShowing( sal_Int32 i, sal_Bool bShowing ); - void UpdateItemName( sal_Int32 i ); - void UpdateItemText( sal_Int32 i ); + void UpdateShowing( sal_Int32 i, sal_Bool bShowing ); + void UpdateItemName( sal_Int32 i ); + void UpdateItemText( sal_Int32 i ); - void InsertChild( sal_Int32 i ); - void RemoveChild( sal_Int32 i ); + void InsertChild( sal_Int32 i ); + void RemoveChild( sal_Int32 i ); - virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); + virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); // XComponent - virtual void SAL_CALL disposing(); + virtual void SAL_CALL disposing(); public: VCLXAccessibleStatusBar( VCLXWindow* pVCLXWindow ); diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblestatusbaritem.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblestatusbaritem.hxx index 1c7525764c40..77ce83c0546c 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessiblestatusbaritem.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessiblestatusbaritem.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -43,50 +43,50 @@ class AccessibleStateSetHelper; } -// ---------------------------------------------------- -// class VCLXAccessibleStatusBarItem -// ---------------------------------------------------- +// ---------------------------------------------------- +// class VCLXAccessibleStatusBarItem +// ---------------------------------------------------- -typedef ::comphelper::OAccessibleTextHelper AccessibleTextHelper_BASE; +typedef ::comphelper::OAccessibleTextHelper AccessibleTextHelper_BASE; typedef ::cppu::ImplHelper2< ::com::sun::star::accessibility::XAccessible, ::com::sun::star::lang::XServiceInfo > VCLXAccessibleStatusBarItem_BASE; -class VCLXAccessibleStatusBarItem : public AccessibleTextHelper_BASE, +class VCLXAccessibleStatusBarItem : public AccessibleTextHelper_BASE, public VCLXAccessibleStatusBarItem_BASE { friend class VCLXAccessibleStatusBar; private: - VCLExternalSolarLock* m_pExternalLock; - StatusBar* m_pStatusBar; - sal_uInt16 m_nItemId; - ::rtl::OUString m_sItemName; - ::rtl::OUString m_sItemText; - sal_Bool m_bShowing; + VCLExternalSolarLock* m_pExternalLock; + StatusBar* m_pStatusBar; + sal_uInt16 m_nItemId; + ::rtl::OUString m_sItemName; + ::rtl::OUString m_sItemText; + sal_Bool m_bShowing; protected: - sal_Bool IsShowing(); - void SetShowing( sal_Bool bShowing ); - void SetItemName( const ::rtl::OUString& sItemName ); - ::rtl::OUString GetItemName(); - void SetItemText( const ::rtl::OUString& sItemText ); - ::rtl::OUString GetItemText(); - sal_uInt16 GetItemId() const { return m_nItemId; } + sal_Bool IsShowing(); + void SetShowing( sal_Bool bShowing ); + void SetItemName( const ::rtl::OUString& sItemName ); + ::rtl::OUString GetItemName(); + void SetItemText( const ::rtl::OUString& sItemText ); + ::rtl::OUString GetItemText(); + sal_uInt16 GetItemId() const { return m_nItemId; } - virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); + virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); - // OCommonAccessibleComponent - virtual ::com::sun::star::awt::Rectangle SAL_CALL implGetBounds( ) throw (::com::sun::star::uno::RuntimeException); + // OCommonAccessibleComponent + virtual ::com::sun::star::awt::Rectangle SAL_CALL implGetBounds( ) throw (::com::sun::star::uno::RuntimeException); // OCommonAccessibleText - virtual ::rtl::OUString implGetText(); - virtual ::com::sun::star::lang::Locale implGetLocale(); - virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ); + virtual ::rtl::OUString implGetText(); + virtual ::com::sun::star::lang::Locale implGetLocale(); + virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ); // XComponent - virtual void SAL_CALL disposing(); + virtual void SAL_CALL disposing(); public: VCLXAccessibleStatusBarItem( StatusBar* pStatusBar, sal_uInt16 nItemId ); @@ -125,7 +125,7 @@ public: virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException); // XAccessibleExtendedComponent - virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > SAL_CALL getFont( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > SAL_CALL getFont( ) throw (::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getTitledBorderText( ) throw (::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getToolTipText( ) throw (::com::sun::star::uno::RuntimeException); diff --git a/accessibility/inc/accessibility/standard/vclxaccessibletabcontrol.hxx b/accessibility/inc/accessibility/standard/vclxaccessibletabcontrol.hxx index b46eadcd9a23..5097144fddaa 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessibletabcontrol.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessibletabcontrol.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,37 +37,37 @@ class TabControl; -// ---------------------------------------------------- -// class VCLXAccessibleTabControl -// ---------------------------------------------------- +// ---------------------------------------------------- +// class VCLXAccessibleTabControl +// ---------------------------------------------------- -typedef ::cppu::ImplHelper1 < - ::com::sun::star::accessibility::XAccessibleSelection > VCLXAccessibleTabControl_BASE; +typedef ::cppu::ImplHelper1 < + ::com::sun::star::accessibility::XAccessibleSelection > VCLXAccessibleTabControl_BASE; -class VCLXAccessibleTabControl : public VCLXAccessibleComponent, - public VCLXAccessibleTabControl_BASE +class VCLXAccessibleTabControl : public VCLXAccessibleComponent, + public VCLXAccessibleTabControl_BASE { private: - typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > > AccessibleChildren; + typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > > AccessibleChildren; - AccessibleChildren m_aAccessibleChildren; - TabControl* m_pTabControl; + AccessibleChildren m_aAccessibleChildren; + TabControl* m_pTabControl; protected: - void UpdateFocused(); - void UpdateSelected( sal_Int32 i, bool bSelected ); + void UpdateFocused(); + void UpdateSelected( sal_Int32 i, bool bSelected ); void UpdatePageText( sal_Int32 i ); void UpdateTabPage( sal_Int32 i, bool bNew ); - void InsertChild( sal_Int32 i ); - void RemoveChild( sal_Int32 i ); + void InsertChild( sal_Int32 i ); + void RemoveChild( sal_Int32 i ); - virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); - virtual void ProcessWindowChildEvent( const VclWindowEvent& rVclWindowEvent ); - virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); + virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); + virtual void ProcessWindowChildEvent( const VclWindowEvent& rVclWindowEvent ); + virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); // XComponent - virtual void SAL_CALL disposing(); + virtual void SAL_CALL disposing(); public: VCLXAccessibleTabControl( VCLXWindow* pVCLXWindow ); diff --git a/accessibility/inc/accessibility/standard/vclxaccessibletabpage.hxx b/accessibility/inc/accessibility/standard/vclxaccessibletabpage.hxx index 9380d517158c..b29ab16aa5b8 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessibletabpage.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessibletabpage.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -43,9 +43,9 @@ class AccessibleStateSetHelper; } -// ---------------------------------------------------- -// class VCLXAccessibleTabPage -// ---------------------------------------------------- +// ---------------------------------------------------- +// class VCLXAccessibleTabPage +// ---------------------------------------------------- typedef ::comphelper::OAccessibleTextHelper AccessibleTextHelper_BASE; @@ -53,44 +53,44 @@ typedef ::cppu::ImplHelper2< ::com::sun::star::accessibility::XAccessible, ::com::sun::star::lang::XServiceInfo > VCLXAccessibleTabPage_BASE; -class VCLXAccessibleTabPage : public AccessibleTextHelper_BASE, +class VCLXAccessibleTabPage : public AccessibleTextHelper_BASE, public VCLXAccessibleTabPage_BASE { friend class VCLXAccessibleTabControl; private: - VCLExternalSolarLock* m_pExternalLock; - TabControl* m_pTabControl; - sal_uInt16 m_nPageId; - bool m_bFocused; - bool m_bSelected; + VCLExternalSolarLock* m_pExternalLock; + TabControl* m_pTabControl; + sal_uInt16 m_nPageId; + bool m_bFocused; + bool m_bSelected; ::rtl::OUString m_sPageText; protected: - bool IsFocused(); - bool IsSelected(); + bool IsFocused(); + bool IsSelected(); - void SetFocused( bool bFocused ); - void SetSelected( bool bSelected ); + void SetFocused( bool bFocused ); + void SetSelected( bool bSelected ); void SetPageText( const ::rtl::OUString& sPageText ); ::rtl::OUString GetPageText(); - void Update( bool bNew ); + void Update( bool bNew ); - sal_uInt16 GetPageId() const { return m_nPageId; } + sal_uInt16 GetPageId() const { return m_nPageId; } - virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); + virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); - // OCommonAccessibleComponent - virtual ::com::sun::star::awt::Rectangle SAL_CALL implGetBounds( ) throw (::com::sun::star::uno::RuntimeException); + // OCommonAccessibleComponent + virtual ::com::sun::star::awt::Rectangle SAL_CALL implGetBounds( ) throw (::com::sun::star::uno::RuntimeException); // OCommonAccessibleText - virtual ::rtl::OUString implGetText(); - virtual ::com::sun::star::lang::Locale implGetLocale(); - virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ); + virtual ::rtl::OUString implGetText(); + virtual ::com::sun::star::lang::Locale implGetLocale(); + virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ); // XComponent - virtual void SAL_CALL disposing(); + virtual void SAL_CALL disposing(); public: VCLXAccessibleTabPage( TabControl* pTabControl, sal_uInt16 nPageId ); @@ -129,7 +129,7 @@ public: virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException); // XAccessibleExtendedComponent - virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > SAL_CALL getFont( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > SAL_CALL getFont( ) throw (::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getTitledBorderText( ) throw (::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getToolTipText( ) throw (::com::sun::star::uno::RuntimeException); diff --git a/accessibility/inc/accessibility/standard/vclxaccessibletabpagewindow.hxx b/accessibility/inc/accessibility/standard/vclxaccessibletabpagewindow.hxx index cf7c2de10d3c..73586c558adb 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessibletabpagewindow.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessibletabpagewindow.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -36,23 +36,23 @@ class TabControl; class TabPage; -// ---------------------------------------------------- -// class VCLXAccessibleTabPageWindow -// ---------------------------------------------------- +// ---------------------------------------------------- +// class VCLXAccessibleTabPageWindow +// ---------------------------------------------------- -class VCLXAccessibleTabPageWindow : public VCLXAccessibleComponent +class VCLXAccessibleTabPageWindow : public VCLXAccessibleComponent { private: - TabControl* m_pTabControl; + TabControl* m_pTabControl; TabPage* m_pTabPage; sal_uInt16 m_nPageId; protected: - // OCommonAccessibleComponent - virtual ::com::sun::star::awt::Rectangle SAL_CALL implGetBounds( ) throw (::com::sun::star::uno::RuntimeException); + // OCommonAccessibleComponent + virtual ::com::sun::star::awt::Rectangle SAL_CALL implGetBounds( ) throw (::com::sun::star::uno::RuntimeException); // XComponent - virtual void SAL_CALL disposing(); + virtual void SAL_CALL disposing(); public: VCLXAccessibleTabPageWindow( VCLXWindow* pVCLXWindow ); diff --git a/accessibility/inc/accessibility/standard/vclxaccessibletextcomponent.hxx b/accessibility/inc/accessibility/standard/vclxaccessibletextcomponent.hxx index 187bfb107f8a..ea74885e8e37 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessibletextcomponent.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessibletextcomponent.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -33,31 +33,31 @@ #include <comphelper/accessibletexthelper.hxx> -// ---------------------------------------------------- -// class VCLXAccessibleTextComponent -// ---------------------------------------------------- +// ---------------------------------------------------- +// class VCLXAccessibleTextComponent +// ---------------------------------------------------- -typedef ::cppu::ImplHelper1 < - ::com::sun::star::accessibility::XAccessibleText > VCLXAccessibleTextComponent_BASE; +typedef ::cppu::ImplHelper1 < + ::com::sun::star::accessibility::XAccessibleText > VCLXAccessibleTextComponent_BASE; class VCLXAccessibleTextComponent : public VCLXAccessibleComponent, public ::comphelper::OCommonAccessibleText, - public VCLXAccessibleTextComponent_BASE + public VCLXAccessibleTextComponent_BASE { protected: - ::rtl::OUString m_sText; + ::rtl::OUString m_sText; - void SetText( const ::rtl::OUString& sText ); + void SetText( const ::rtl::OUString& sText ); - virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); + virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); // OCommonAccessibleText - virtual ::rtl::OUString implGetText(); - virtual ::com::sun::star::lang::Locale implGetLocale(); - virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ); + virtual ::rtl::OUString implGetText(); + virtual ::com::sun::star::lang::Locale implGetLocale(); + virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ); // XComponent - virtual void SAL_CALL disposing(); + virtual void SAL_CALL disposing(); public: VCLXAccessibleTextComponent( VCLXWindow* pVCLXWindow ); diff --git a/accessibility/inc/accessibility/standard/vclxaccessibletextfield.hxx b/accessibility/inc/accessibility/standard/vclxaccessibletextfield.hxx index b01c63fe8e4e..244ef92c0971 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessibletextfield.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessibletextfield.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -97,7 +97,7 @@ private: because this method of the base class returns the wrong parent. */ ::com::sun::star::uno::Reference< - ::com::sun::star::accessibility::XAccessible > m_xParent; + ::com::sun::star::accessibility::XAccessible > m_xParent; }; #endif diff --git a/accessibility/inc/accessibility/standard/vclxaccessibletoolbox.hxx b/accessibility/inc/accessibility/standard/vclxaccessibletoolbox.hxx index 846dfea93967..110493415f01 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessibletoolbox.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessibletoolbox.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -32,9 +32,9 @@ #include <toolkit/awt/vclxaccessiblecomponent.hxx> #include <com/sun/star/accessibility/XAccessibleSelection.hpp> -// ---------------------------------------------------- -// class VCLXAccessibleToolBox -// ---------------------------------------------------- +// ---------------------------------------------------- +// class VCLXAccessibleToolBox +// ---------------------------------------------------- typedef ::cppu::ImplHelper1 < ::com::sun::star::accessibility::XAccessibleSelection > VCLXAccessibleToolBox_BASE; @@ -48,26 +48,26 @@ class VCLXAccessibleToolBox : public VCLXAccessibleComponent, public VCLXAccessi private: ToolBoxItemsMap m_aAccessibleChildren; - VCLXAccessibleToolBoxItem* GetItem_Impl( sal_Int32 _nPos, bool _bMustHaveFocus ); - - void UpdateFocus_Impl(); - void ReleaseFocus_Impl( sal_Int32 _nPos ); - void UpdateChecked_Impl( sal_Int32 _nPos ); - void UpdateIndeterminate_Impl( sal_Int32 _nPos ); - void UpdateItem_Impl( sal_Int32 _nPos, sal_Bool _bItemAdded ); - void UpdateAllItems_Impl(); - void UpdateItemName_Impl( sal_Int32 _nPos ); - void UpdateItemEnabled_Impl( sal_Int32 _nPos ); - void UpdateCustomPopupItemp_Impl( Window* pWindow, bool bOpen ); + VCLXAccessibleToolBoxItem* GetItem_Impl( sal_Int32 _nPos, bool _bMustHaveFocus ); + + void UpdateFocus_Impl(); + void ReleaseFocus_Impl( sal_Int32 _nPos ); + void UpdateChecked_Impl( sal_Int32 _nPos ); + void UpdateIndeterminate_Impl( sal_Int32 _nPos ); + void UpdateItem_Impl( sal_Int32 _nPos, sal_Bool _bItemAdded ); + void UpdateAllItems_Impl(); + void UpdateItemName_Impl( sal_Int32 _nPos ); + void UpdateItemEnabled_Impl( sal_Int32 _nPos ); + void UpdateCustomPopupItemp_Impl( Window* pWindow, bool bOpen ); void HandleSubToolBarEvent( const VclWindowEvent& rVclWindowEvent, bool _bShow ); void ReleaseSubToolBox( ToolBox* _pSubToolBox ); protected: - virtual ~VCLXAccessibleToolBox(); + virtual ~VCLXAccessibleToolBox(); - virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); - virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); - virtual void ProcessWindowChildEvent( const VclWindowEvent& rVclWindowEvent ); + virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); + virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); + virtual void ProcessWindowChildEvent( const VclWindowEvent& rVclWindowEvent ); virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > GetChildAccessible( const VclWindowEvent& rVclWindowEvent ); ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > GetItemWindowAccessible( const VclWindowEvent& rVclWindowEvent ); diff --git a/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx b/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx index 26070a4e91bb..1593aecd0cb4 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -57,48 +57,48 @@ class VCLXAccessibleToolBoxItem : public AccessibleTextHelper_BASE, public VCLXAccessibleToolBoxItem_BASE { private: - ::rtl::OUString m_sOldName; - ToolBox* m_pToolBox; - VCLExternalSolarLock* m_pExternalLock; - sal_Int32 m_nIndexInParent; - sal_Int16 m_nRole; - USHORT m_nItemId; - sal_Bool m_bHasFocus; - sal_Bool m_bIsChecked; + ::rtl::OUString m_sOldName; + ToolBox* m_pToolBox; + VCLExternalSolarLock* m_pExternalLock; + sal_Int32 m_nIndexInParent; + sal_Int16 m_nRole; + USHORT m_nItemId; + sal_Bool m_bHasFocus; + sal_Bool m_bIsChecked; bool m_bIndeterminate; - ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > m_xChild; + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > m_xChild; public: - inline sal_Int32 getIndexInParent() const { return m_nIndexInParent; } - inline void setIndexInParent( sal_Int32 _nNewIndex ) { m_nIndexInParent = _nNewIndex; } + inline sal_Int32 getIndexInParent() const { return m_nIndexInParent; } + inline void setIndexInParent( sal_Int32 _nNewIndex ) { m_nIndexInParent = _nNewIndex; } protected: virtual ~VCLXAccessibleToolBoxItem(); - virtual void SAL_CALL disposing(); + virtual void SAL_CALL disposing(); /// implements the calculation of the bounding rectangle - virtual ::com::sun::star::awt::Rectangle SAL_CALL implGetBounds( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::awt::Rectangle SAL_CALL implGetBounds( ) throw (::com::sun::star::uno::RuntimeException); // OCommonAccessibleText - virtual ::rtl::OUString implGetText(); - virtual ::com::sun::star::lang::Locale implGetLocale(); - virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ); + virtual ::rtl::OUString implGetText(); + virtual ::com::sun::star::lang::Locale implGetLocale(); + virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ); ::rtl::OUString GetText( bool _bAsName ); public: - VCLXAccessibleToolBoxItem( ToolBox* _pToolBox, sal_Int32 _nPos ); + VCLXAccessibleToolBoxItem( ToolBox* _pToolBox, sal_Int32 _nPos ); - void SetFocus( sal_Bool _bFocus ); - inline sal_Bool HasFocus() const { return m_bHasFocus; } - void SetChecked( sal_Bool _bCheck ); - inline sal_Bool IsChecked() const { return m_bIsChecked; } + void SetFocus( sal_Bool _bFocus ); + inline sal_Bool HasFocus() const { return m_bHasFocus; } + void SetChecked( sal_Bool _bCheck ); + inline sal_Bool IsChecked() const { return m_bIsChecked; } void SetIndeterminate( bool _bIndeterminate ); inline bool IsIndeterminate() const { return m_bIndeterminate; } - inline void ReleaseToolBox() { m_pToolBox = NULL; } - void NameChanged(); + inline void ReleaseToolBox() { m_pToolBox = NULL; } + void NameChanged(); void SetChild( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _xChild ); ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > GetChild() const { return m_xChild; } @@ -145,7 +145,7 @@ public: virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException); // XAccessibleExtendedComponent - virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > SAL_CALL getFont( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > SAL_CALL getFont( ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::awt::FontDescriptor SAL_CALL getFontMetrics( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont >& xFont ) throw (::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getTitledBorderText( ) throw (::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getToolTipText( ) throw (::com::sun::star::uno::RuntimeException); diff --git a/accessibility/inc/pch/precompiled_accessibility.cxx b/accessibility/inc/pch/precompiled_accessibility.cxx index 291aae11e94a..2de9ca22a733 100644 --- a/accessibility/inc/pch/precompiled_accessibility.cxx +++ b/accessibility/inc/pch/precompiled_accessibility.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/inc/pch/precompiled_accessibility.hxx b/accessibility/inc/pch/precompiled_accessibility.hxx index 18f4375ba801..ed7eaf8e405b 100644 --- a/accessibility/inc/pch/precompiled_accessibility.hxx +++ b/accessibility/inc/pch/precompiled_accessibility.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/source/extended/AccessibleBrowseBox.cxx b/accessibility/source/extended/AccessibleBrowseBox.cxx index f0a97b33bb24..282f29a65ae1 100644 --- a/accessibility/source/extended/AccessibleBrowseBox.cxx +++ b/accessibility/source/extended/AccessibleBrowseBox.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -60,17 +60,17 @@ public: /** The data table child. */ Reference< ::com::sun::star::accessibility::XAccessible > mxTable; - AccessibleBrowseBoxTable* m_pTable; + AccessibleBrowseBoxTable* m_pTable; /** The header bar for rows ("handle column"). */ Reference< - ::com::sun::star::accessibility::XAccessible > mxRowHeaderBar; - AccessibleBrowseBoxHeaderBar* m_pRowHeaderBar; + ::com::sun::star::accessibility::XAccessible > mxRowHeaderBar; + AccessibleBrowseBoxHeaderBar* m_pRowHeaderBar; /** The header bar for columns (first row of the table). */ Reference< - ::com::sun::star::accessibility::XAccessible > mxColumnHeaderBar; - AccessibleBrowseBoxHeaderBar* m_pColumnHeaderBar; + ::com::sun::star::accessibility::XAccessible > mxColumnHeaderBar; + AccessibleBrowseBoxHeaderBar* m_pColumnHeaderBar; }; // Ctor/Dtor/disposing -------------------------------------------------------- @@ -109,9 +109,9 @@ void SAL_CALL AccessibleBrowseBox::disposing() { ::osl::MutexGuard aGuard( getOslMutex() ); - m_pImpl->m_pTable = NULL; - m_pImpl->m_pColumnHeaderBar = NULL; - m_pImpl->m_pRowHeaderBar = NULL; + m_pImpl->m_pTable = NULL; + m_pImpl->m_pColumnHeaderBar = NULL; + m_pImpl->m_pRowHeaderBar = NULL; m_pImpl->m_aCreator = Reference< XAccessible >(); Reference< XAccessible > xTable = m_pImpl->mxTable; @@ -281,7 +281,7 @@ AccessibleBrowseBox::implGetHeaderBar( AccessibleBrowseBoxObjType eObjType ) if ( BBTYPE_COLUMNHEADERBAR == eObjType) m_pImpl->m_pColumnHeaderBar = pHeaderBar; else - m_pImpl->m_pRowHeaderBar = pHeaderBar; + m_pImpl->m_pRowHeaderBar = pHeaderBar; *pxMember = pHeaderBar; } @@ -325,7 +325,7 @@ void AccessibleBrowseBox::commitTableEvent(sal_Int16 _nEventId,const Any& _rNewV } } // ----------------------------------------------------------------------------- -void AccessibleBrowseBox::commitHeaderBarEvent( sal_Int16 _nEventId, +void AccessibleBrowseBox::commitHeaderBarEvent( sal_Int16 _nEventId, const Any& _rNewValue, const Any& _rOldValue,sal_Bool _bColumnHeaderBar) { diff --git a/accessibility/source/extended/AccessibleBrowseBoxBase.cxx b/accessibility/source/extended/AccessibleBrowseBoxBase.cxx index 24cc3ce52f2a..56f8c2de8961 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxBase.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxBase.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx b/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx index 2353a25007aa..94b2947ee969 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -121,7 +121,7 @@ namespace accessibility aValue <<= (sal_Int32) 2; else aValue <<= (sal_Int32) 1; - + return aValue; } @@ -131,7 +131,7 @@ namespace accessibility { Any aValue; aValue <<= (sal_Int32) 0; - + return aValue; } // ----------------------------------------------------------------------------- diff --git a/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx b/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx index 77a59ef99fc1..083d8112a2f5 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx b/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx index 4f778f5b8df8..118140de7004 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/source/extended/AccessibleBrowseBoxTable.cxx b/accessibility/source/extended/AccessibleBrowseBoxTable.cxx index ad5594df6987..f94c7fe69ac6 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxTable.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxTable.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx b/accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx index 825689cf3185..ca02551012e7 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx b/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx index 6cdd7e22c4ab..2d1b61d14276 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/source/extended/AccessibleGridControl.cxx b/accessibility/source/extended/AccessibleGridControl.cxx index f48415e518d4..dc5f456619fa 100644 --- a/accessibility/source/extended/AccessibleGridControl.cxx +++ b/accessibility/source/extended/AccessibleGridControl.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -61,17 +61,17 @@ public: /** The data table child. */ Reference< ::com::sun::star::accessibility::XAccessible > m_xTable; - AccessibleGridControlTable* m_pTable; + AccessibleGridControlTable* m_pTable; /** The header bar for rows. */ Reference< - ::com::sun::star::accessibility::XAccessible > m_xRowHeaderBar; - AccessibleGridControlHeader* m_pRowHeaderBar; + ::com::sun::star::accessibility::XAccessible > m_xRowHeaderBar; + AccessibleGridControlHeader* m_pRowHeaderBar; /** The header bar for columns (first row of the table). */ Reference< - ::com::sun::star::accessibility::XAccessible > m_xColumnHeaderBar; - AccessibleGridControlHeader* m_pColumnHeaderBar; + ::com::sun::star::accessibility::XAccessible > m_xColumnHeaderBar; + AccessibleGridControlHeader* m_pColumnHeaderBar; }; DBG_NAME( AccessibleGridControl ) @@ -95,9 +95,9 @@ void SAL_CALL AccessibleGridControl::disposing() { ::osl::MutexGuard aGuard( getOslMutex() ); - m_pImpl->m_pTable = NULL; - m_pImpl->m_pColumnHeaderBar = NULL; - m_pImpl->m_pRowHeaderBar = NULL; + m_pImpl->m_pTable = NULL; + m_pImpl->m_pColumnHeaderBar = NULL; + m_pImpl->m_pRowHeaderBar = NULL; m_pImpl->m_aCreator = Reference< XAccessible >(); Reference< XAccessible > xTable = m_pImpl->m_xTable; @@ -283,7 +283,7 @@ AccessibleGridControl::implGetHeaderBar( AccessibleTableControlObjType eObjType if ( TCTYPE_COLUMNHEADERBAR == eObjType) m_pImpl->m_pColumnHeaderBar = pHeaderBar; else - m_pImpl->m_pRowHeaderBar = pHeaderBar; + m_pImpl->m_pRowHeaderBar = pHeaderBar; *pxMember = pHeaderBar; } diff --git a/accessibility/source/extended/AccessibleGridControlBase.cxx b/accessibility/source/extended/AccessibleGridControlBase.cxx index bf1fb2cca520..db0cf33928b5 100644 --- a/accessibility/source/extended/AccessibleGridControlBase.cxx +++ b/accessibility/source/extended/AccessibleGridControlBase.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/source/extended/AccessibleGridControlHeader.cxx b/accessibility/source/extended/AccessibleGridControlHeader.cxx index 464d5842163d..d217d5330a78 100644 --- a/accessibility/source/extended/AccessibleGridControlHeader.cxx +++ b/accessibility/source/extended/AccessibleGridControlHeader.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/source/extended/AccessibleGridControlHeaderCell.cxx b/accessibility/source/extended/AccessibleGridControlHeaderCell.cxx index 830f1e876aa7..671668ddc510 100644 --- a/accessibility/source/extended/AccessibleGridControlHeaderCell.cxx +++ b/accessibility/source/extended/AccessibleGridControlHeaderCell.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/source/extended/AccessibleGridControlTable.cxx b/accessibility/source/extended/AccessibleGridControlTable.cxx index 18124682ae60..b6ab2017e765 100644 --- a/accessibility/source/extended/AccessibleGridControlTable.cxx +++ b/accessibility/source/extended/AccessibleGridControlTable.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -56,7 +56,7 @@ DBG_NAME( AccessibleGridControlTable ) AccessibleGridControlTable::AccessibleGridControlTable( const Reference< XAccessible >& rxParent, - IAccessibleTable& rTable, + IAccessibleTable& rTable, AccessibleTableControlObjType _eType) : AccessibleGridControlTableBase( rxParent, rTable, _eType ) { diff --git a/accessibility/source/extended/AccessibleGridControlTableBase.cxx b/accessibility/source/extended/AccessibleGridControlTableBase.cxx index 211f2a29d03f..d2a78b2112a9 100644 --- a/accessibility/source/extended/AccessibleGridControlTableBase.cxx +++ b/accessibility/source/extended/AccessibleGridControlTableBase.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/source/extended/AccessibleGridControlTableCell.cxx b/accessibility/source/extended/AccessibleGridControlTableCell.cxx index 68bba16d6a3b..4a3182a514c2 100644 --- a/accessibility/source/extended/AccessibleGridControlTableCell.cxx +++ b/accessibility/source/extended/AccessibleGridControlTableCell.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -121,7 +121,7 @@ namespace accessibility AccessibleGridControlTableCell::AccessibleGridControlTableCell(const Reference<XAccessible >& _rxParent, IAccessibleTable& _rTable, sal_Int32 _nRowPos, - sal_uInt16 _nColPos, + sal_uInt16 _nColPos, AccessibleTableControlObjType eObjType) :AccessibleGridControlCell( _rxParent, _rTable, _nRowPos, _nColPos, eObjType ) { diff --git a/accessibility/source/extended/AccessibleToolPanelDeck.cxx b/accessibility/source/extended/AccessibleToolPanelDeck.cxx index be2245474174..9dcb47ccaa2e 100644 --- a/accessibility/source/extended/AccessibleToolPanelDeck.cxx +++ b/accessibility/source/extended/AccessibleToolPanelDeck.cxx @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -362,17 +362,17 @@ namespace accessibility { DBG_UNHANDLED_EXCEPTION(); } - + return NULL; } - + //------------------------------------------------------------------------------------------------------------------ void SAL_CALL AccessibleToolPanelDeck::grabFocus( ) throw (RuntimeException) { MethodGuard aGuard( *m_pImpl ); m_pImpl->m_pPanelDeck->GrabFocus(); } - + //------------------------------------------------------------------------------------------------------------------ void SAL_CALL AccessibleToolPanelDeck::disposing() { diff --git a/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx b/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx index f4864c95a860..386a60d9bdf9 100644 --- a/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx +++ b/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx b/accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx index b621124cbe5f..5344a51fe76f 100644 --- a/accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx +++ b/accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -290,41 +290,41 @@ namespace accessibility { return 0; } - + //-------------------------------------------------------------------- Reference< XAccessible > SAL_CALL AccessibleToolPanelDeckTabBarItem::getAccessibleChild( sal_Int32 i ) throw (IndexOutOfBoundsException, RuntimeException) { (void)i; throw IndexOutOfBoundsException( ::rtl::OUString(), *this ); } - + //-------------------------------------------------------------------- Reference< XAccessible > SAL_CALL AccessibleToolPanelDeckTabBarItem::getAccessibleParent( ) throw (RuntimeException) { ItemMethodGuard aGuard( *m_pImpl ); return m_pImpl->getAccessibleParent(); } - + //-------------------------------------------------------------------- sal_Int16 SAL_CALL AccessibleToolPanelDeckTabBarItem::getAccessibleRole( ) throw (RuntimeException) { return AccessibleRole::PAGE_TAB; } - + //-------------------------------------------------------------------- ::rtl::OUString SAL_CALL AccessibleToolPanelDeckTabBarItem::getAccessibleDescription( ) throw (RuntimeException) { ItemMethodGuard aGuard( *m_pImpl ); return m_pImpl->getPanelDisplayName(); } - + //-------------------------------------------------------------------- ::rtl::OUString SAL_CALL AccessibleToolPanelDeckTabBarItem::getAccessibleName( ) throw (RuntimeException) { ItemMethodGuard aGuard( *m_pImpl ); return m_pImpl->getPanelDisplayName(); } - + //-------------------------------------------------------------------- Reference< XAccessibleRelationSet > SAL_CALL AccessibleToolPanelDeckTabBarItem::getAccessibleRelationSet( ) throw (RuntimeException) { @@ -332,7 +332,7 @@ namespace accessibility ::utl::AccessibleRelationSetHelper* pRelationSet = new utl::AccessibleRelationSetHelper; return pRelationSet; } - + //-------------------------------------------------------------------- Reference< XAccessibleStateSet > SAL_CALL AccessibleToolPanelDeckTabBarItem::getAccessibleStateSet( ) throw (RuntimeException) { @@ -373,14 +373,14 @@ namespace accessibility (void)i_rLocation; return NULL; } - + //-------------------------------------------------------------------- void SAL_CALL AccessibleToolPanelDeckTabBarItem::grabFocus( ) throw (RuntimeException) { ItemMethodGuard aGuard( *m_pImpl ); m_pImpl->getTabBar()->FocusPanelItem( m_pImpl->getItemPos() ); } - + //-------------------------------------------------------------------- ::sal_Int32 SAL_CALL AccessibleToolPanelDeckTabBarItem::getForeground( ) throw (RuntimeException) { @@ -388,7 +388,7 @@ namespace accessibility Reference< XAccessibleComponent > xParentComponent( m_pImpl->getParentAccessibleComponent(), UNO_SET_THROW ); return xParentComponent->getForeground(); } - + //-------------------------------------------------------------------- ::sal_Int32 SAL_CALL AccessibleToolPanelDeckTabBarItem::getBackground( ) throw (RuntimeException) { @@ -396,7 +396,7 @@ namespace accessibility Reference< XAccessibleComponent > xParentComponent( m_pImpl->getParentAccessibleComponent(), UNO_SET_THROW ); return xParentComponent->getBackground(); } - + //-------------------------------------------------------------------- Reference< XFont > SAL_CALL AccessibleToolPanelDeckTabBarItem::getFont( ) throw (RuntimeException) { @@ -406,7 +406,7 @@ namespace accessibility // a different font ... return xParentComponent->getFont(); } - + //-------------------------------------------------------------------- ::rtl::OUString SAL_CALL AccessibleToolPanelDeckTabBarItem::getTitledBorderText( ) throw (RuntimeException) { @@ -414,7 +414,7 @@ namespace accessibility // no support return ::rtl::OUString(); } - + //-------------------------------------------------------------------- ::rtl::OUString SAL_CALL AccessibleToolPanelDeckTabBarItem::getToolTipText( ) throw (RuntimeException) { @@ -438,7 +438,7 @@ namespace accessibility aItemScreenRect.GetHeight() ); } - + //-------------------------------------------------------------------- void SAL_CALL AccessibleToolPanelDeckTabBarItem::disposing() { diff --git a/accessibility/source/extended/accessiblebrowseboxcell.cxx b/accessibility/source/extended/accessiblebrowseboxcell.cxx index addbcaaa7cf8..4caad5693d96 100644 --- a/accessibility/source/extended/accessiblebrowseboxcell.cxx +++ b/accessibility/source/extended/accessiblebrowseboxcell.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -87,7 +87,7 @@ namespace accessibility } // ................................................................................. -} // namespace accessibility +} // namespace accessibility // ................................................................................. diff --git a/accessibility/source/extended/accessibleeditbrowseboxcell.cxx b/accessibility/source/extended/accessibleeditbrowseboxcell.cxx index 5312717034ee..765ee2e1fc82 100644 --- a/accessibility/source/extended/accessibleeditbrowseboxcell.cxx +++ b/accessibility/source/extended/accessibleeditbrowseboxcell.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -70,7 +70,7 @@ namespace accessibility { if ( !rBHelper.bDisposed ) { - acquire(); // to prevent duplicate dtor calls + acquire(); // to prevent duplicate dtor calls dispose(); } @@ -123,7 +123,7 @@ namespace accessibility } // ----------------------------------------------------------------------------- - ::rtl::OUString SAL_CALL EditBrowseBoxTableCell::getAccessibleDescription() throw ( RuntimeException ) + ::rtl::OUString SAL_CALL EditBrowseBoxTableCell::getAccessibleDescription() throw ( RuntimeException ) { SolarMethodGuard aGuard( *this ); return m_xInnerContext->getAccessibleDescription(); @@ -149,7 +149,7 @@ namespace accessibility } // ----------------------------------------------------------------------------- - Reference< XAccessibleRelationSet > SAL_CALL EditBrowseBoxTableCell::getAccessibleRelationSet() throw ( RuntimeException ) + Reference< XAccessibleRelationSet > SAL_CALL EditBrowseBoxTableCell::getAccessibleRelationSet() throw ( RuntimeException ) { SolarMethodGuard aGuard( *this ); return OAccessibleContextWrapperHelper::getAccessibleRelationSet( ); diff --git a/accessibility/source/extended/accessibleiconchoicectrl.cxx b/accessibility/source/extended/accessibleiconchoicectrl.cxx index dddb38fcbea1..875191e93328 100644 --- a/accessibility/source/extended/accessibleiconchoicectrl.cxx +++ b/accessibility/source/extended/accessibleiconchoicectrl.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -59,7 +59,7 @@ namespace accessibility AccessibleIconChoiceCtrl::AccessibleIconChoiceCtrl( SvtIconChoiceCtrl& _rIconCtrl, const Reference< XAccessible >& _xParent ) : VCLXAccessibleComponent( _rIconCtrl.GetWindowPeer() ), - m_xParent ( _xParent ) + m_xParent ( _xParent ) { DBG_CTOR( AccessibleIconChoiceCtrl, NULL ); } diff --git a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx index 2a4b90affd54..6a613dede454 100644 --- a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx +++ b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -49,8 +49,8 @@ #include <comphelper/accessibleeventnotifier.hxx> #define ACCESSIBLE_ACTION_COUNT 1 -#define AID_EXPAND 0 -#define AID_COLLAPSE 1 +#define AID_EXPAND 0 +#define AID_COLLAPSE 1 namespace { @@ -82,12 +82,12 @@ namespace accessibility ULONG _nPos, const Reference< XAccessible >& _xParent ) : - AccessibleIconChoiceCtrlEntry_BASE ( m_aMutex ), + AccessibleIconChoiceCtrlEntry_BASE ( m_aMutex ), - m_pIconCtrl ( &_rIconCtrl ), - m_nIndex ( _nPos ), + m_pIconCtrl ( &_rIconCtrl ), + m_nIndex ( _nPos ), m_nClientId ( 0 ), - m_xParent ( _xParent ) + m_xParent ( _xParent ) { osl_incrementInterlockedCount( &m_refCount ); @@ -443,7 +443,7 @@ throw(RuntimeException) // do nothing, because no focus for each item } // ----------------------------------------------------------------------------- - sal_Int32 AccessibleIconChoiceCtrlEntry::getForeground( ) throw (RuntimeException) + sal_Int32 AccessibleIconChoiceCtrlEntry::getForeground( ) throw (RuntimeException) { SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); @@ -535,7 +535,7 @@ throw(RuntimeException) ::osl::MutexGuard aGuard( m_aMutex ); String sText = getText(); - if ( ( 0 > nStartIndex ) || ( sText.Len() <= nStartIndex ) + if ( ( 0 > nStartIndex ) || ( sText.Len() <= nStartIndex ) || ( 0 > nEndIndex ) || ( sText.Len() <= nEndIndex ) ) throw IndexOutOfBoundsException(); diff --git a/accessibility/source/extended/accessiblelistbox.cxx b/accessibility/source/extended/accessiblelistbox.cxx index 95e52056e1da..129638e486d1 100644 --- a/accessibility/source/extended/accessiblelistbox.cxx +++ b/accessibility/source/extended/accessiblelistbox.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -83,7 +83,7 @@ namespace accessibility // ----------------------------------------------------------------------------- SvTreeListBox* AccessibleListBox::getListBox() const { - return static_cast< SvTreeListBox* >( const_cast<AccessibleListBox*>(this)->GetWindow() ); + return static_cast< SvTreeListBox* >( const_cast<AccessibleListBox*>(this)->GetWindow() ); } // ----------------------------------------------------------------------------- void AccessibleListBox::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx index 71c52a90b1db..7ab28367b3d4 100644 --- a/accessibility/source/extended/accessiblelistboxentry.cxx +++ b/accessibility/source/extended/accessiblelistboxentry.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -50,7 +50,7 @@ #include <comphelper/accessibleeventnotifier.hxx> #include <toolkit/helper/vclunohelper.hxx> -#define ACCESSIBLE_ACTION_COUNT 1 +#define ACCESSIBLE_ACTION_COUNT 1 namespace { @@ -81,11 +81,11 @@ namespace accessibility SvLBoxEntry* _pEntry, const Reference< XAccessible >& _xParent ) : - AccessibleListBoxEntry_BASE ( m_aMutex ), + AccessibleListBoxEntry_BASE ( m_aMutex ), ListBoxAccessibleBase( _rListBox ), m_nClientId ( 0 ), - m_aParent ( _xParent ) + m_aParent ( _xParent ) { DBG_CTOR( AccessibleListBoxEntry, NULL ); @@ -348,13 +348,13 @@ namespace accessibility { DBG_ASSERT( m_aEntryPath.size(), "AccessibleListBoxEntry::getAccessibleParent: invalid path!" ); if ( 1 == m_aEntryPath.size() ) - { // we're a top level entry + { // we're a top level entry // -> our parent is the tree listbox itself if ( getListBox() ) xParent = getListBox()->GetAccessible( ); } else - { // we have a entry as parent -> get it's accessible + { // we have a entry as parent -> get it's accessible // shorten our access path by one ::std::deque< sal_Int32 > aParentPath( m_aEntryPath ); @@ -514,7 +514,7 @@ namespace accessibility // do nothing, because no focus for each item } // ----------------------------------------------------------------------------- - sal_Int32 AccessibleListBoxEntry::getForeground( ) throw (RuntimeException) + sal_Int32 AccessibleListBoxEntry::getForeground( ) throw (RuntimeException) { SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); @@ -604,7 +604,7 @@ namespace accessibility EnsureIsAlive(); String sText = getText(); - if ( ( 0 > nStartIndex ) || ( sText.Len() <= nStartIndex ) + if ( ( 0 > nStartIndex ) || ( sText.Len() <= nStartIndex ) || ( 0 > nEndIndex ) || ( sText.Len() <= nEndIndex ) ) throw IndexOutOfBoundsException(); diff --git a/accessibility/source/extended/accessibletabbar.cxx b/accessibility/source/extended/accessibletabbar.cxx index 88a04c5584bc..c0b043efd5b6 100644 --- a/accessibility/source/extended/accessibletabbar.cxx +++ b/accessibility/source/extended/accessibletabbar.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -56,9 +56,9 @@ namespace accessibility DBG_NAME( AccessibleTabBar ) - // ---------------------------------------------------- - // class AccessibleTabBar - // ---------------------------------------------------- + // ---------------------------------------------------- + // class AccessibleTabBar + // ---------------------------------------------------- AccessibleTabBar::AccessibleTabBar( TabBar* pTabBar ) :AccessibleTabBarBase( pTabBar ) @@ -115,13 +115,13 @@ namespace accessibility case VCLEVENT_WINDOW_SHOW: { aNewValue <<= AccessibleStateType::SHOWING; - NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue ); + NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue ); } break; case VCLEVENT_WINDOW_HIDE: { aOldValue <<= AccessibleStateType::SHOWING; - NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue ); + NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue ); } break; default: @@ -160,7 +160,7 @@ namespace accessibility } // ----------------------------------------------------------------------------- - // OCommonAccessibleComponent + // OCommonAccessibleComponent // ----------------------------------------------------------------------------- awt::Rectangle AccessibleTabBar::implGetBounds() throw (RuntimeException) @@ -345,7 +345,7 @@ namespace accessibility // ----------------------------------------------------------------------------- - ::rtl::OUString AccessibleTabBar::getAccessibleDescription( ) throw (RuntimeException) + ::rtl::OUString AccessibleTabBar::getAccessibleDescription( ) throw (RuntimeException) { OExternalLockGuard aGuard( this ); @@ -423,8 +423,8 @@ namespace accessibility { Reference< XAccessible > xAcc = getAccessibleChild( i ); if ( xAcc.is() ) - { - Reference< XAccessibleComponent > xComp( xAcc->getAccessibleContext(), UNO_QUERY ); + { + Reference< XAccessibleComponent > xComp( xAcc->getAccessibleContext(), UNO_QUERY ); if ( xComp.is() ) { Rectangle aRect = VCLRectangle( xComp->getBounds() ); @@ -453,7 +453,7 @@ namespace accessibility // ----------------------------------------------------------------------------- - sal_Int32 AccessibleTabBar::getForeground( ) throw (RuntimeException) + sal_Int32 AccessibleTabBar::getForeground( ) throw (RuntimeException) { OExternalLockGuard aGuard( this ); @@ -551,7 +551,7 @@ namespace accessibility // ----------------------------------------------------------------------------- //......................................................................... -} // namespace accessibility +} // namespace accessibility //......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/source/extended/accessibletabbarbase.cxx b/accessibility/source/extended/accessibletabbarbase.cxx index 4fa22f9bc602..8c485c4f3104 100644 --- a/accessibility/source/extended/accessibletabbarbase.cxx +++ b/accessibility/source/extended/accessibletabbarbase.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/source/extended/accessibletabbarpage.cxx b/accessibility/source/extended/accessibletabbarpage.cxx index 898d2435b10a..e84085803967 100644 --- a/accessibility/source/extended/accessibletabbarpage.cxx +++ b/accessibility/source/extended/accessibletabbarpage.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -59,8 +59,8 @@ namespace accessibility ,m_nPageId( nPageId ) ,m_xParent( rxParent ) { - m_bEnabled = IsEnabled(); - m_bShowing = IsShowing(); + m_bEnabled = IsEnabled(); + m_bShowing = IsShowing(); m_bSelected = IsSelected(); if ( m_pTabBar ) @@ -82,7 +82,7 @@ namespace accessibility sal_Bool bEnabled = sal_False; if ( m_pTabBar ) bEnabled = m_pTabBar->IsPageEnabled( m_nPageId ); - + return bEnabled; } @@ -202,12 +202,12 @@ namespace accessibility } // ----------------------------------------------------------------------------- - // OCommonAccessibleComponent + // OCommonAccessibleComponent // ----------------------------------------------------------------------------- awt::Rectangle AccessibleTabBarPage::implGetBounds() throw (RuntimeException) { - awt::Rectangle aBounds; + awt::Rectangle aBounds; if ( m_pTabBar ) { // get bounding rectangle relative to the AccessibleTabBar @@ -217,7 +217,7 @@ namespace accessibility Reference< XAccessible > xParent = getAccessibleParent(); if ( xParent.is() ) { - Reference< XAccessibleComponent > xParentComponent( xParent->getAccessibleContext(), UNO_QUERY ); + Reference< XAccessibleComponent > xParentComponent( xParent->getAccessibleContext(), UNO_QUERY ); if ( xParentComponent.is() ) { awt::Point aParentLoc = xParentComponent->getLocation(); @@ -352,7 +352,7 @@ namespace accessibility // ----------------------------------------------------------------------------- - ::rtl::OUString AccessibleTabBarPage::getAccessibleDescription( ) throw (RuntimeException) + ::rtl::OUString AccessibleTabBarPage::getAccessibleDescription( ) throw (RuntimeException) { OExternalLockGuard aGuard( this ); @@ -369,7 +369,7 @@ namespace accessibility { OExternalLockGuard aGuard( this ); - return m_sPageText; + return m_sPageText; } // ----------------------------------------------------------------------------- @@ -433,7 +433,7 @@ namespace accessibility // ----------------------------------------------------------------------------- - sal_Int32 AccessibleTabBarPage::getForeground( ) throw (RuntimeException) + sal_Int32 AccessibleTabBarPage::getForeground( ) throw (RuntimeException) { OExternalLockGuard aGuard( this ); @@ -443,7 +443,7 @@ namespace accessibility { Reference< XAccessibleComponent > xParentComp( xParent->getAccessibleContext(), UNO_QUERY ); if ( xParentComp.is() ) - nColor = xParentComp->getForeground(); + nColor = xParentComp->getForeground(); } return nColor; @@ -461,7 +461,7 @@ namespace accessibility { Reference< XAccessibleComponent > xParentComp( xParent->getAccessibleContext(), UNO_QUERY ); if ( xParentComp.is() ) - nColor = xParentComp->getBackground(); + nColor = xParentComp->getBackground(); } return nColor; @@ -481,7 +481,7 @@ namespace accessibility { Reference< XAccessibleExtendedComponent > xParentComp( xParent->getAccessibleContext(), UNO_QUERY ); if ( xParentComp.is() ) - xFont = xParentComp->getFont(); + xFont = xParentComp->getFont(); } return xFont; @@ -493,7 +493,7 @@ namespace accessibility { OExternalLockGuard aGuard( this ); - return m_sPageText; + return m_sPageText; } // ----------------------------------------------------------------------------- @@ -508,7 +508,7 @@ namespace accessibility // ----------------------------------------------------------------------------- //......................................................................... -} // namespace accessibility +} // namespace accessibility //......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/source/extended/accessibletabbarpagelist.cxx b/accessibility/source/extended/accessibletabbarpagelist.cxx index 60589218ae47..89015b0ae7a6 100644 --- a/accessibility/source/extended/accessibletabbarpagelist.cxx +++ b/accessibility/source/extended/accessibletabbarpagelist.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -534,7 +534,7 @@ namespace accessibility // ----------------------------------------------------------------------------- - ::rtl::OUString AccessibleTabBarPageList::getAccessibleDescription( ) throw (RuntimeException) + ::rtl::OUString AccessibleTabBarPageList::getAccessibleDescription( ) throw (RuntimeException) { OExternalLockGuard aGuard( this ); @@ -631,7 +631,7 @@ namespace accessibility // ----------------------------------------------------------------------------- - sal_Int32 AccessibleTabBarPageList::getForeground( ) throw (RuntimeException) + sal_Int32 AccessibleTabBarPageList::getForeground( ) throw (RuntimeException) { OExternalLockGuard aGuard( this ); @@ -802,7 +802,7 @@ namespace accessibility // ----------------------------------------------------------------------------- //......................................................................... -} // namespace accessibility +} // namespace accessibility //......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/source/extended/accessibletablistbox.cxx b/accessibility/source/extended/accessibletablistbox.cxx index 1b22c0b87565..a50001d59202 100644 --- a/accessibility/source/extended/accessibletablistbox.cxx +++ b/accessibility/source/extended/accessibletablistbox.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/source/extended/accessibletablistboxtable.cxx b/accessibility/source/extended/accessibletablistboxtable.cxx index 3cd3c333148a..3863d8aab27e 100644 --- a/accessibility/source/extended/accessibletablistboxtable.cxx +++ b/accessibility/source/extended/accessibletablistboxtable.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -56,7 +56,7 @@ namespace accessibility AccessibleBrowseBoxTable( rxParent, rBox ), - m_pTabListBox ( &rBox ) + m_pTabListBox ( &rBox ) { DBG_CTOR( AccessibleTabListBoxTable, NULL ); diff --git a/accessibility/source/extended/listboxaccessible.cxx b/accessibility/source/extended/listboxaccessible.cxx index ff7fc77d4069..04a67146a49b 100644 --- a/accessibility/source/extended/listboxaccessible.cxx +++ b/accessibility/source/extended/listboxaccessible.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -100,7 +100,7 @@ namespace accessibility } //........................................................................ -} // namespace accessibility +} // namespace accessibility //........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx index f8462e144633..cd31df1cb391 100644 --- a/accessibility/source/extended/textwindowaccessibility.cxx +++ b/accessibility/source/extended/textwindowaccessibility.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -109,7 +109,7 @@ ParagraphImpl::numberChanged(bool bIncremented) } void ParagraphImpl::textChanged() -{ +{ ::rtl::OUString aParagraphText = implGetText(); ::css::uno::Any aOldValue, aNewValue; if ( implInitTextChangedEvent( m_aParagraphText, aParagraphText, aOldValue, aNewValue ) ) @@ -595,45 +595,45 @@ ParagraphImpl::getRunAttributes(::sal_Int32 Index, const ::css::uno::Sequence< : return m_xDocument->retrieveRunAttributes( this, Index, RequestedAttributes ); } -// virtual -::sal_Int32 SAL_CALL ParagraphImpl::getLineNumberAtIndex( ::sal_Int32 nIndex ) - throw (::css::lang::IndexOutOfBoundsException, +// virtual +::sal_Int32 SAL_CALL ParagraphImpl::getLineNumberAtIndex( ::sal_Int32 nIndex ) + throw (::css::lang::IndexOutOfBoundsException, ::css::uno::RuntimeException) { checkDisposed(); - + ::sal_Int32 nLineNo = -1; - ::css::i18n::Boundary aBoundary = + ::css::i18n::Boundary aBoundary = m_xDocument->retrieveParagraphLineBoundary( this, nIndex, &nLineNo ); - + return nLineNo; } - -// virtual -::css::accessibility::TextSegment SAL_CALL ParagraphImpl::getTextAtLineNumber( ::sal_Int32 nLineNo ) + +// virtual +::css::accessibility::TextSegment SAL_CALL ParagraphImpl::getTextAtLineNumber( ::sal_Int32 nLineNo ) throw (::css::lang::IndexOutOfBoundsException, ::css::uno::RuntimeException) { checkDisposed(); - - ::css::i18n::Boundary aBoundary = + + ::css::i18n::Boundary aBoundary = m_xDocument->retrieveParagraphBoundaryOfLine( this, nLineNo ); - + return ::css::accessibility::TextSegment( getTextRange(aBoundary.startPos, aBoundary.endPos), aBoundary.startPos, aBoundary.endPos); } // virtual -::css::accessibility::TextSegment SAL_CALL ParagraphImpl::getTextAtLineWithCaret( ) +::css::accessibility::TextSegment SAL_CALL ParagraphImpl::getTextAtLineWithCaret( ) throw (::css::uno::RuntimeException) { checkDisposed(); - + sal_Int32 nLineNo = getNumberOfLineWithCaret(); - + try { - return ( nLineNo >= 0 ) ? - getTextAtLineNumber( nLineNo ) : + return ( nLineNo >= 0 ) ? + getTextAtLineNumber( nLineNo ) : ::css::accessibility::TextSegment(); } catch (const ::css::lang::IndexOutOfBoundsException&) { throw ::css::uno::RuntimeException( @@ -644,9 +644,9 @@ ParagraphImpl::getRunAttributes(::sal_Int32 Index, const ::css::uno::Sequence< : static_cast< ::css::uno::XWeak * >( this ) ); } } - + // virtual -::sal_Int32 SAL_CALL ParagraphImpl::getNumberOfLineWithCaret( ) +::sal_Int32 SAL_CALL ParagraphImpl::getNumberOfLineWithCaret( ) throw (::css::uno::RuntimeException) { checkDisposed(); @@ -737,7 +737,7 @@ void ParagraphImpl::implGetSelection(::sal_Int32 & rStartIndex, } // virtual -void ParagraphImpl::implGetParagraphBoundary( ::css::i18n::Boundary& rBoundary, +void ParagraphImpl::implGetParagraphBoundary( ::css::i18n::Boundary& rBoundary, ::sal_Int32 nIndex ) { ::rtl::OUString sText( implGetText() ); @@ -764,7 +764,7 @@ void ParagraphImpl::implGetLineBoundary( ::css::i18n::Boundary& rBoundary, if ( implIsValidIndex( nIndex, nLength ) || nIndex == nLength ) { - ::css::i18n::Boundary aBoundary = + ::css::i18n::Boundary aBoundary = m_xDocument->retrieveParagraphLineBoundary( this, nIndex ); rBoundary.startPos = aBoundary.startPos; rBoundary.endPos = aBoundary.endPos; @@ -916,8 +916,8 @@ void Document::retrieveParagraphSelection(ParagraphImpl const * pParagraph, if ( nNumber >= aMinPaM.GetPara() && nNumber <= aMaxPaM.GetPara() ) { - *pBegin = nNumber > aMinPaM.GetPara() - ? 0 + *pBegin = nNumber > aMinPaM.GetPara() + ? 0 : static_cast< ::sal_Int32 >( aMinPaM.GetIndex() ); // XXX numeric overflow *pEnd = nNumber < aMaxPaM.GetPara() @@ -926,7 +926,7 @@ void Document::retrieveParagraphSelection(ParagraphImpl const * pParagraph, // XXX numeric overflow (3x) if ( aStartPaM > aEndPaM ) - ::std::swap( *pBegin, *pEnd ); + ::std::swap( *pBegin, *pEnd ); } else { @@ -943,7 +943,7 @@ void Document::retrieveParagraphSelection(ParagraphImpl const * pParagraph, Paragraphs::size_type nNumber = pParagraph->getNumber(); TextPaM aEndPaM( rSelection.GetEnd() ); - return aEndPaM.GetPara() == nNumber + return aEndPaM.GetPara() == nNumber ? static_cast< ::sal_Int32 >(aEndPaM.GetIndex()) : -1; } @@ -1314,7 +1314,7 @@ Document::retrieveParagraphLineBoundary( ParagraphImpl const * pParagraph, ::USHORT nLineCount = m_rEngine.GetLineCount( nNumber ); for ( ::USHORT nLine = 0; nLine < nLineCount; ++nLine ) { - ::sal_Int32 nLineLength = static_cast< ::sal_Int32 >( + ::sal_Int32 nLineLength = static_cast< ::sal_Int32 >( m_rEngine.GetLineLen( nNumber, nLine ) ); nLineStart = nLineEnd; nLineEnd += nLineLength; @@ -1355,12 +1355,12 @@ Document::retrieveParagraphBoundaryOfLine( ParagraphImpl const * pParagraph, ::sal_Int32 nLineEnd = 0; for ( ::USHORT nLine = 0; nLine <= nLineNo; ++nLine ) { - ::sal_Int32 nLineLength = static_cast< ::sal_Int32 >( + ::sal_Int32 nLineLength = static_cast< ::sal_Int32 >( m_rEngine.GetLineLen( nNumber, nLine ) ); nLineStart = nLineEnd; nLineEnd += nLineLength; } - + aBoundary.startPos = nLineStart; aBoundary.endPos = nLineEnd; } @@ -1376,7 +1376,7 @@ sal_Int32 Document::retrieveParagraphLineWithCursor( ParagraphImpl const * pPara Paragraphs::size_type nNumber = pParagraph->getNumber(); TextPaM aEndPaM( rSelection.GetEnd() ); - return aEndPaM.GetPara() == nNumber + return aEndPaM.GetPara() == nNumber ? m_rView.GetLineNumberOfCursorInSelection() : -1; } @@ -1417,7 +1417,7 @@ void Document::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) case VCLEVENT_WINDOW_GETFOCUS: case VCLEVENT_WINDOW_LOSEFOCUS: { - // #107179# if our parent is a compound control (e.g. MultiLineEdit), + // #107179# if our parent is a compound control (e.g. MultiLineEdit), // suppress the window focus events here if ( !m_bCompoundControlChild ) VCLXAccessibleComponent::ProcessWindowEvent( rVclWindowEvent ); diff --git a/accessibility/source/helper/acc_factory.cxx b/accessibility/source/helper/acc_factory.cxx index 3707209228ed..0c0bf172e599 100644 --- a/accessibility/source/helper/acc_factory.cxx +++ b/accessibility/source/helper/acc_factory.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -392,7 +392,7 @@ inline bool hasFloatingChild(Window *pWindow) { xContext = new FloatingWindowAccessible( _pXWindow ); } - else if ( nType == WINDOW_BORDERWINDOW && hasFloatingChild( pWindow ) ) + else if ( nType == WINDOW_BORDERWINDOW && hasFloatingChild( pWindow ) ) { PopupMenuFloatingWindow* pChild = dynamic_cast<PopupMenuFloatingWindow*>( pWindow->GetAccessibleChildWindow(0)); @@ -405,7 +405,7 @@ inline bool hasFloatingChild(Window *pWindow) } else xContext = new FloatingWindowAccessible( _pXWindow ); - } + } else if ( ( nType == WINDOW_HELPTEXTWINDOW ) || ( nType == WINDOW_FIXEDLINE ) ) { xContext = (accessibility::XAccessibleContext*) new VCLXAccessibleFixedText( _pXWindow ); diff --git a/accessibility/source/helper/accessiblestrings.src b/accessibility/source/helper/accessiblestrings.src index ee7f77f9b502..34f3b381b5f0 100644 --- a/accessibility/source/helper/accessiblestrings.src +++ b/accessibility/source/helper/accessiblestrings.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/source/helper/accresmgr.cxx b/accessibility/source/helper/accresmgr.cxx index c2e5516d6a88..a448c4000c82 100644 --- a/accessibility/source/helper/accresmgr.cxx +++ b/accessibility/source/helper/accresmgr.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/source/helper/characterattributeshelper.cxx b/accessibility/source/helper/characterattributeshelper.cxx index fe06e78dc7a3..7a08bce2738e 100644 --- a/accessibility/source/helper/characterattributeshelper.cxx +++ b/accessibility/source/helper/characterattributeshelper.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/source/inc/floatingwindowaccessible.hxx b/accessibility/source/inc/floatingwindowaccessible.hxx index cc8a91f637d5..d967238fb8ec 100644 --- a/accessibility/source/inc/floatingwindowaccessible.hxx +++ b/accessibility/source/inc/floatingwindowaccessible.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -36,7 +36,7 @@ class FloatingWindowAccessible : public VCLXAccessibleComponent public: FloatingWindowAccessible( VCLXWindow* pWindow ); virtual ~FloatingWindowAccessible(); - + virtual void FillAccessibleRelationSet( utl::AccessibleRelationSetHelper& rRelationSet ); }; diff --git a/accessibility/source/standard/accessiblemenubasecomponent.cxx b/accessibility/source/standard/accessiblemenubasecomponent.cxx index ab02caaa322c..48ff87f7509d 100644 --- a/accessibility/source/standard/accessiblemenubasecomponent.cxx +++ b/accessibility/source/standard/accessiblemenubasecomponent.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -394,8 +394,8 @@ Reference< XAccessible > OAccessibleMenuBaseComponent::GetChildAt( const awt::Po { Reference< XAccessible > xAcc = getAccessibleChild( i ); if ( xAcc.is() ) - { - Reference< XAccessibleComponent > xComp( xAcc->getAccessibleContext(), UNO_QUERY ); + { + Reference< XAccessibleComponent > xComp( xAcc->getAccessibleContext(), UNO_QUERY ); if ( xComp.is() ) { Rectangle aRect = VCLRectangle( xComp->getBounds() ); diff --git a/accessibility/source/standard/accessiblemenucomponent.cxx b/accessibility/source/standard/accessiblemenucomponent.cxx index 973fae780d3f..1773779b3ffd 100644 --- a/accessibility/source/standard/accessiblemenucomponent.cxx +++ b/accessibility/source/standard/accessiblemenucomponent.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -113,7 +113,7 @@ void OAccessibleMenuComponent::FillAccessibleStateSet( utl::AccessibleStateSetHe } // ----------------------------------------------------------------------------- -// OCommonAccessibleComponent +// OCommonAccessibleComponent // ----------------------------------------------------------------------------- awt::Rectangle OAccessibleMenuComponent::implGetBounds() throw (RuntimeException) @@ -133,7 +133,7 @@ awt::Rectangle OAccessibleMenuComponent::implGetBounds() throw (RuntimeException Reference< XAccessible > xParent = getAccessibleParent(); if ( xParent.is() ) { - Reference< XAccessibleComponent > xParentComponent( xParent->getAccessibleContext(), UNO_QUERY ); + Reference< XAccessibleComponent > xParentComponent( xParent->getAccessibleContext(), UNO_QUERY ); if ( xParentComponent.is() ) { awt::Point aParentScreenLoc = xParentComponent->getLocationOnScreen(); @@ -169,7 +169,7 @@ sal_Int32 OAccessibleMenuComponent::getAccessibleChildCount() throw (RuntimeExce { OExternalLockGuard aGuard( this ); - return GetChildCount(); + return GetChildCount(); } // ----------------------------------------------------------------------------- @@ -217,7 +217,7 @@ sal_Int16 OAccessibleMenuComponent::getAccessibleRole( ) throw (RuntimeExceptio // ----------------------------------------------------------------------------- -::rtl::OUString OAccessibleMenuComponent::getAccessibleDescription( ) throw (RuntimeException) +::rtl::OUString OAccessibleMenuComponent::getAccessibleDescription( ) throw (RuntimeException) { OExternalLockGuard aGuard( this ); @@ -286,7 +286,7 @@ awt::Point OAccessibleMenuComponent::getLocationOnScreen( ) throw (RuntimeExcep if ( pWindow ) { Rectangle aRect = pWindow->GetWindowExtentsRelative( NULL ); - aPos = AWTPoint( aRect.TopLeft() ); + aPos = AWTPoint( aRect.TopLeft() ); } } @@ -309,7 +309,7 @@ void OAccessibleMenuComponent::grabFocus( ) throw (RuntimeException) // ----------------------------------------------------------------------------- -sal_Int32 OAccessibleMenuComponent::getForeground( ) throw (RuntimeException) +sal_Int32 OAccessibleMenuComponent::getForeground( ) throw (RuntimeException) { OExternalLockGuard aGuard( this ); @@ -392,13 +392,13 @@ void OAccessibleMenuComponent::selectAccessibleChild( sal_Int32 nChildIndex ) th // ----------------------------------------------------------------------------- sal_Bool OAccessibleMenuComponent::isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException) -{ +{ OExternalLockGuard aGuard( this ); if ( nChildIndex < 0 || nChildIndex >= GetChildCount() ) throw IndexOutOfBoundsException(); - return IsChildSelected( nChildIndex ); + return IsChildSelected( nChildIndex ); } // ----------------------------------------------------------------------------- @@ -426,7 +426,7 @@ sal_Int32 OAccessibleMenuComponent::getSelectedAccessibleChildCount( ) throw (R sal_Int32 nRet = 0; for ( sal_Int32 i = 0, nCount = GetChildCount(); i < nCount; i++ ) - { + { if ( IsChildSelected( i ) ) ++nRet; } @@ -446,7 +446,7 @@ Reference< XAccessible > OAccessibleMenuComponent::getSelectedAccessibleChild( s Reference< XAccessible > xChild; for ( sal_Int32 i = 0, j = 0, nCount = GetChildCount(); i < nCount; i++ ) - { + { if ( IsChildSelected( i ) && ( j++ == nSelectedChildIndex ) ) { xChild = GetChild( i ); diff --git a/accessibility/source/standard/accessiblemenuitemcomponent.cxx b/accessibility/source/standard/accessiblemenuitemcomponent.cxx index 0b34e2efa800..afd9436708c8 100644 --- a/accessibility/source/standard/accessiblemenuitemcomponent.cxx +++ b/accessibility/source/standard/accessiblemenuitemcomponent.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -111,9 +111,9 @@ sal_Bool OAccessibleMenuItemComponent::IsVisible() void OAccessibleMenuItemComponent::Select() { // open the parent menu - Reference< XAccessible > xParent( getAccessibleParent() ); + Reference< XAccessible > xParent( getAccessibleParent() ); if ( xParent.is() ) - { + { OAccessibleMenuBaseComponent* pComp = static_cast< OAccessibleMenuBaseComponent* >( xParent.get() ); if ( pComp && pComp->getAccessibleRole() == AccessibleRole::MENU && !pComp->IsPopupMenuOpen() ) pComp->Click(); @@ -137,9 +137,9 @@ void OAccessibleMenuItemComponent::DeSelect() void OAccessibleMenuItemComponent::Click() { // open the parent menu - Reference< XAccessible > xParent( getAccessibleParent() ); + Reference< XAccessible > xParent( getAccessibleParent() ); if ( xParent.is() ) - { + { OAccessibleMenuBaseComponent* pComp = static_cast< OAccessibleMenuBaseComponent* >( xParent.get() ); if ( pComp && pComp->getAccessibleRole() == AccessibleRole::MENU && !pComp->IsPopupMenuOpen() ) pComp->Click(); @@ -147,7 +147,7 @@ void OAccessibleMenuItemComponent::Click() // click the menu item if ( m_pParent ) - { + { Window* pWindow = m_pParent->GetWindow(); if ( pWindow ) { @@ -183,8 +183,8 @@ void OAccessibleMenuItemComponent::Click() // ----------------------------------------------------------------------------- void OAccessibleMenuItemComponent::SetItemPos( sal_uInt16 nItemPos ) -{ - m_nItemPos = nItemPos; +{ + m_nItemPos = nItemPos; } // ----------------------------------------------------------------------------- @@ -261,7 +261,7 @@ void OAccessibleMenuItemComponent::FillAccessibleStateSet( utl::AccessibleStateS } // ----------------------------------------------------------------------------- -// OCommonAccessibleComponent +// OCommonAccessibleComponent // ----------------------------------------------------------------------------- awt::Rectangle OAccessibleMenuItemComponent::implGetBounds() throw (RuntimeException) @@ -284,7 +284,7 @@ awt::Rectangle OAccessibleMenuItemComponent::implGetBounds() throw (RuntimeExcep Reference< XAccessible > xParent = getAccessibleParent(); if ( xParent.is() ) { - Reference< XAccessibleComponent > xParentComponent( xParent->getAccessibleContext(), UNO_QUERY ); + Reference< XAccessibleComponent > xParentComponent( xParent->getAccessibleContext(), UNO_QUERY ); if ( xParentComponent.is() ) { awt::Point aParentScreenLoc = xParentComponent->getLocationOnScreen(); @@ -365,13 +365,13 @@ sal_Int16 OAccessibleMenuItemComponent::getAccessibleRole( ) throw (RuntimeExce // ----------------------------------------------------------------------------- -::rtl::OUString OAccessibleMenuItemComponent::getAccessibleDescription( ) throw (RuntimeException) +::rtl::OUString OAccessibleMenuItemComponent::getAccessibleDescription( ) throw (RuntimeException) { OExternalLockGuard aGuard( this ); ::rtl::OUString sDescription; if ( m_pParent ) - sDescription = m_pParent->GetHelpText( m_pParent->GetItemId( m_nItemPos ) ); + sDescription = m_pParent->GetHelpText( m_pParent->GetItemId( m_nItemPos ) ); return sDescription; } @@ -425,7 +425,7 @@ void OAccessibleMenuItemComponent::grabFocus( ) throw (RuntimeException) // ----------------------------------------------------------------------------- -sal_Int32 OAccessibleMenuItemComponent::getForeground( ) throw (RuntimeException) +sal_Int32 OAccessibleMenuItemComponent::getForeground( ) throw (RuntimeException) { OExternalLockGuard aGuard( this ); @@ -435,7 +435,7 @@ sal_Int32 OAccessibleMenuItemComponent::getForeground( ) throw (RuntimeExceptio { Reference< XAccessibleComponent > xParentComp( xParent->getAccessibleContext(), UNO_QUERY ); if ( xParentComp.is() ) - nColor = xParentComp->getForeground(); + nColor = xParentComp->getForeground(); } return nColor; @@ -453,7 +453,7 @@ sal_Int32 OAccessibleMenuItemComponent::getBackground( ) throw (RuntimeExceptio { Reference< XAccessibleComponent > xParentComp( xParent->getAccessibleContext(), UNO_QUERY ); if ( xParentComp.is() ) - nColor = xParentComp->getBackground(); + nColor = xParentComp->getBackground(); } return nColor; @@ -473,7 +473,7 @@ Reference< awt::XFont > OAccessibleMenuItemComponent::getFont( ) throw (Runtime { Reference< XAccessibleExtendedComponent > xParentComp( xParent->getAccessibleContext(), UNO_QUERY ); if ( xParentComp.is() ) - xFont = xParentComp->getFont(); + xFont = xParentComp->getFont(); } return xFont; @@ -496,7 +496,7 @@ Reference< awt::XFont > OAccessibleMenuItemComponent::getFont( ) throw (Runtime ::rtl::OUString sRet; if ( m_pParent ) - sRet = m_pParent->GetTipHelpText( m_pParent->GetItemId( m_nItemPos ) ); + sRet = m_pParent->GetTipHelpText( m_pParent->GetItemId( m_nItemPos ) ); return sRet; } diff --git a/accessibility/source/standard/floatingwindowaccessible.cxx b/accessibility/source/standard/floatingwindowaccessible.cxx index af8a89122e32..6bb332fe73d6 100644 --- a/accessibility/source/standard/floatingwindowaccessible.cxx +++ b/accessibility/source/standard/floatingwindowaccessible.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/source/standard/vclxaccessiblebox.cxx b/accessibility/source/standard/vclxaccessiblebox.cxx index c8177943a3f2..a630cb0a4a15 100644 --- a/accessibility/source/standard/vclxaccessiblebox.cxx +++ b/accessibility/source/standard/vclxaccessiblebox.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/source/standard/vclxaccessiblebutton.cxx b/accessibility/source/standard/vclxaccessiblebutton.cxx index de220dea6f08..7f32f17a1e18 100644 --- a/accessibility/source/standard/vclxaccessiblebutton.cxx +++ b/accessibility/source/standard/vclxaccessiblebutton.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -226,7 +226,7 @@ Reference< XAccessibleKeyBinding > VCLXAccessibleButton::getAccessibleActionKeyB if ( nIndex < 0 || nIndex >= getAccessibleActionCount() ) throw IndexOutOfBoundsException(); - + OAccessibleKeyBindingHelper* pKeyBindingHelper = new OAccessibleKeyBindingHelper(); Reference< XAccessibleKeyBinding > xKeyBinding = pKeyBindingHelper; @@ -296,7 +296,7 @@ sal_Bool VCLXAccessibleButton::setCurrentValue( const Any& aNumber ) throw (Runt pButton->SetPressed( (BOOL) nValue ); bReturn = sal_True; } - + return bReturn; } @@ -308,7 +308,7 @@ Any VCLXAccessibleButton::getMaximumValue( ) throw (RuntimeException) Any aValue; aValue <<= (sal_Int32) 1; - + return aValue; } @@ -320,7 +320,7 @@ Any VCLXAccessibleButton::getMinimumValue( ) throw (RuntimeException) Any aValue; aValue <<= (sal_Int32) 0; - + return aValue; } diff --git a/accessibility/source/standard/vclxaccessiblecheckbox.cxx b/accessibility/source/standard/vclxaccessiblecheckbox.cxx index 98698adb7285..7cfc759e5138 100644 --- a/accessibility/source/standard/vclxaccessiblecheckbox.cxx +++ b/accessibility/source/standard/vclxaccessiblecheckbox.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -199,7 +199,7 @@ sal_Int32 VCLXAccessibleCheckBox::getAccessibleActionCount( ) throw (RuntimeExce { OExternalLockGuard aGuard( this ); - return 1; + return 1; } // ----------------------------------------------------------------------------- @@ -254,7 +254,7 @@ Reference< XAccessibleKeyBinding > VCLXAccessibleCheckBox::getAccessibleActionKe if ( nIndex < 0 || nIndex >= getAccessibleActionCount() ) throw IndexOutOfBoundsException(); - + OAccessibleKeyBindingHelper* pKeyBindingHelper = new OAccessibleKeyBindingHelper(); Reference< XAccessibleKeyBinding > xKeyBinding = pKeyBindingHelper; @@ -298,7 +298,7 @@ Any VCLXAccessibleCheckBox::getCurrentValue( ) throw (RuntimeException) VCLXCheckBox* pVCLXCheckBox = static_cast< VCLXCheckBox* >( GetVCLXWindow() ); if ( pVCLXCheckBox ) aValue <<= (sal_Int32) pVCLXCheckBox->getState(); - + return aValue; } @@ -312,7 +312,7 @@ sal_Bool VCLXAccessibleCheckBox::setCurrentValue( const Any& aNumber ) throw (Ru VCLXCheckBox* pVCLXCheckBox = static_cast< VCLXCheckBox* >( GetVCLXWindow() ); if ( pVCLXCheckBox ) - { + { sal_Int32 nValue = 0, nValueMin = 0, nValueMax = 0; OSL_VERIFY( aNumber >>= nValue ); OSL_VERIFY( getMinimumValue() >>= nValueMin ); @@ -326,7 +326,7 @@ sal_Bool VCLXAccessibleCheckBox::setCurrentValue( const Any& aNumber ) throw (Ru pVCLXCheckBox->setState( (sal_Int16) nValue ); bReturn = sal_True; } - + return bReturn; } @@ -343,7 +343,7 @@ Any VCLXAccessibleCheckBox::getMaximumValue( ) throw (RuntimeException) aValue <<= (sal_Int32) 2; else aValue <<= (sal_Int32) 1; - + return aValue; } @@ -355,7 +355,7 @@ Any VCLXAccessibleCheckBox::getMinimumValue( ) throw (RuntimeException) Any aValue; aValue <<= (sal_Int32) 0; - + return aValue; } diff --git a/accessibility/source/standard/vclxaccessiblecombobox.cxx b/accessibility/source/standard/vclxaccessiblecombobox.cxx index 3da67a703e22..8ebba8c56af2 100644 --- a/accessibility/source/standard/vclxaccessiblecombobox.cxx +++ b/accessibility/source/standard/vclxaccessiblecombobox.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -60,7 +60,7 @@ VCLXAccessibleComboBox::~VCLXAccessibleComboBox (void) bool VCLXAccessibleComboBox::IsValid (void) const { return static_cast<ComboBox*>(GetWindow()) != NULL; - + } @@ -76,7 +76,7 @@ void VCLXAccessibleComboBox::ProcessWindowEvent (const VclWindowEvent& rVclWindo //===== XServiceInfo ======================================================== -::rtl::OUString VCLXAccessibleComboBox::getImplementationName (void) +::rtl::OUString VCLXAccessibleComboBox::getImplementationName (void) throw (RuntimeException) { return ::rtl::OUString::createFromAscii ("com.sun.star.comp.toolkit.AccessibleComboBox"); @@ -85,7 +85,7 @@ void VCLXAccessibleComboBox::ProcessWindowEvent (const VclWindowEvent& rVclWindo -Sequence< ::rtl::OUString > VCLXAccessibleComboBox::getSupportedServiceNames (void) +Sequence< ::rtl::OUString > VCLXAccessibleComboBox::getSupportedServiceNames (void) throw (RuntimeException) { Sequence< ::rtl::OUString > aNames = VCLXAccessibleBox::getSupportedServiceNames(); diff --git a/accessibility/source/standard/vclxaccessibledropdowncombobox.cxx b/accessibility/source/standard/vclxaccessibledropdowncombobox.cxx index 370bf2fe70ea..302a7148fce7 100644 --- a/accessibility/source/standard/vclxaccessibledropdowncombobox.cxx +++ b/accessibility/source/standard/vclxaccessibledropdowncombobox.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -57,7 +57,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::accessibility; -VCLXAccessibleDropDownComboBox::VCLXAccessibleDropDownComboBox (VCLXWindow* pVCLWindow) +VCLXAccessibleDropDownComboBox::VCLXAccessibleDropDownComboBox (VCLXWindow* pVCLWindow) : VCLXAccessibleBox (pVCLWindow, VCLXAccessibleBox::COMBOBOX, true) { } @@ -74,7 +74,7 @@ VCLXAccessibleDropDownComboBox::~VCLXAccessibleDropDownComboBox (void) bool VCLXAccessibleDropDownComboBox::IsValid (void) const { return static_cast<ComboBox*>(GetWindow()) != NULL; - + } @@ -87,7 +87,7 @@ void VCLXAccessibleDropDownComboBox::ProcessWindowEvent (const VclWindowEvent& r case VCLEVENT_DROPDOWN_OPEN: case VCLEVENT_DROPDOWN_CLOSE: { - /* // child count changed + /* // child count changed Any aOldValue, aNewValue; // get the listbox child Reference< XAccessible > xChild; @@ -122,7 +122,7 @@ void VCLXAccessibleDropDownComboBox::ProcessWindowEvent (const VclWindowEvent& r //===== XServiceInfo ======================================================== -::rtl::OUString VCLXAccessibleDropDownComboBox::getImplementationName() +::rtl::OUString VCLXAccessibleDropDownComboBox::getImplementationName() throw (RuntimeException) { return ::rtl::OUString::createFromAscii("com.sun.star.comp.toolkit.AccessibleDropDownComboBox"); @@ -131,7 +131,7 @@ void VCLXAccessibleDropDownComboBox::ProcessWindowEvent (const VclWindowEvent& r -Sequence< ::rtl::OUString > VCLXAccessibleDropDownComboBox::getSupportedServiceNames (void) +Sequence< ::rtl::OUString > VCLXAccessibleDropDownComboBox::getSupportedServiceNames (void) throw (RuntimeException) { Sequence< ::rtl::OUString > aNames = VCLXAccessibleBox::getSupportedServiceNames(); diff --git a/accessibility/source/standard/vclxaccessibledropdownlistbox.cxx b/accessibility/source/standard/vclxaccessibledropdownlistbox.cxx index 340567eb967a..1777ef83484f 100644 --- a/accessibility/source/standard/vclxaccessibledropdownlistbox.cxx +++ b/accessibility/source/standard/vclxaccessibledropdownlistbox.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -56,7 +56,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::accessibility; -VCLXAccessibleDropDownListBox::VCLXAccessibleDropDownListBox (VCLXWindow* pVCLWindow) +VCLXAccessibleDropDownListBox::VCLXAccessibleDropDownListBox (VCLXWindow* pVCLWindow) : VCLXAccessibleBox (pVCLWindow, VCLXAccessibleBox::LISTBOX, true) { } @@ -74,7 +74,7 @@ VCLXAccessibleDropDownListBox::~VCLXAccessibleDropDownListBox() bool VCLXAccessibleDropDownListBox::IsValid (void) const { return static_cast<ListBox*>(GetWindow()) != NULL; - + } @@ -90,7 +90,7 @@ void VCLXAccessibleDropDownListBox::ProcessWindowEvent( const VclWindowEvent& rV //===== XServiceInfo ======================================================== -::rtl::OUString VCLXAccessibleDropDownListBox::getImplementationName() +::rtl::OUString VCLXAccessibleDropDownListBox::getImplementationName() throw (RuntimeException) { return ::rtl::OUString::createFromAscii("com.sun.star.comp.toolkit.AccessibleDropDownListBox"); @@ -99,7 +99,7 @@ void VCLXAccessibleDropDownListBox::ProcessWindowEvent( const VclWindowEvent& rV -Sequence< ::rtl::OUString > VCLXAccessibleDropDownListBox::getSupportedServiceNames (void) +Sequence< ::rtl::OUString > VCLXAccessibleDropDownListBox::getSupportedServiceNames (void) throw (RuntimeException) { Sequence< ::rtl::OUString > aNames = VCLXAccessibleBox::getSupportedServiceNames(); diff --git a/accessibility/source/standard/vclxaccessibleedit.cxx b/accessibility/source/standard/vclxaccessibleedit.cxx index e522ce081435..e20ad1e1c30a 100644 --- a/accessibility/source/standard/vclxaccessibleedit.cxx +++ b/accessibility/source/standard/vclxaccessibleedit.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -93,10 +93,10 @@ void VCLXAccessibleEdit::ProcessWindowEvent( const VclWindowEvent& rVclWindowEve { sal_Int32 nOldCaretPosition = m_nCaretPosition; sal_Int32 nOldSelectionStart = m_nSelectionStart; - + m_nCaretPosition = getCaretPosition(); m_nSelectionStart = getSelectionStart(); - + Window* pWindow = GetWindow(); if ( pWindow && pWindow->HasChildPathFocus() ) { @@ -107,7 +107,7 @@ void VCLXAccessibleEdit::ProcessWindowEvent( const VclWindowEvent& rVclWindowEve aNewValue <<= (sal_Int32) m_nCaretPosition; NotifyAccessibleEvent( AccessibleEventId::CARET_CHANGED, aOldValue, aNewValue ); } - + // #i104470# VCL only has SELECTION_CHANGED, but UAA distinguishes between SELECTION_CHANGED and CARET_CHANGED sal_Bool bHasSelection = ( m_nSelectionStart != m_nCaretPosition ); sal_Bool bHadSelection = ( nOldSelectionStart != nOldCaretPosition ); @@ -115,7 +115,7 @@ void VCLXAccessibleEdit::ProcessWindowEvent( const VclWindowEvent& rVclWindowEve { NotifyAccessibleEvent( AccessibleEventId::TEXT_SELECTION_CHANGED, Any(), Any() ); } - + } } break; @@ -603,7 +603,7 @@ sal_Bool VCLXAccessibleEdit::setAttributes( sal_Int32 nStartIndex, sal_Int32 nEn if ( !implIsValidRange( nStartIndex, nEndIndex, implGetText().getLength() ) ) throw IndexOutOfBoundsException(); - return sal_False; // attributes cannot be set for an edit + return sal_False; // attributes cannot be set for an edit } // ----------------------------------------------------------------------------- diff --git a/accessibility/source/standard/vclxaccessiblefixedhyperlink.cxx b/accessibility/source/standard/vclxaccessiblefixedhyperlink.cxx index d23d92065807..e67d45d265c2 100644 --- a/accessibility/source/standard/vclxaccessiblefixedhyperlink.cxx +++ b/accessibility/source/standard/vclxaccessiblefixedhyperlink.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/source/standard/vclxaccessiblefixedtext.cxx b/accessibility/source/standard/vclxaccessiblefixedtext.cxx index 6077efa65e87..ba7174b81d77 100644 --- a/accessibility/source/standard/vclxaccessiblefixedtext.cxx +++ b/accessibility/source/standard/vclxaccessiblefixedtext.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/source/standard/vclxaccessiblelist.cxx b/accessibility/source/standard/vclxaccessiblelist.cxx index accce8440c7e..c7e3d73faa2c 100644 --- a/accessibility/source/standard/vclxaccessiblelist.cxx +++ b/accessibility/source/standard/vclxaccessiblelist.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -62,14 +62,14 @@ namespace VCLXAccessibleList::VCLXAccessibleList (VCLXWindow* pVCLWindow, BoxType aBoxType, const Reference< XAccessible >& _xParent) - : VCLXAccessibleComponent (pVCLWindow), - m_aBoxType (aBoxType), - m_nVisibleLineCount (0), - m_nIndexInParent (DEFAULT_INDEX_IN_PARENT), - m_nLastTopEntry ( 0 ), - m_nLastSelectedPos ( LISTBOX_ENTRY_NOTFOUND ), - m_bDisableProcessEvent ( false ), - m_bVisible ( true ), + : VCLXAccessibleComponent (pVCLWindow), + m_aBoxType (aBoxType), + m_nVisibleLineCount (0), + m_nIndexInParent (DEFAULT_INDEX_IN_PARENT), + m_nLastTopEntry ( 0 ), + m_nLastSelectedPos ( LISTBOX_ENTRY_NOTFOUND ), + m_bDisableProcessEvent ( false ), + m_bVisible ( true ), m_xParent ( _xParent ) { // Because combo boxes and list boxes don't have a common interface for @@ -137,8 +137,8 @@ void VCLXAccessibleList::FillAccessibleStateSet (utl::AccessibleStateSetHelper& VCLXAccessibleComponent::FillAccessibleStateSet( rStateSet ); // check if our list should be visible - if ( m_pListBoxHelper - && (m_pListBoxHelper->GetStyle() & WB_DROPDOWN ) == WB_DROPDOWN + if ( m_pListBoxHelper + && (m_pListBoxHelper->GetStyle() & WB_DROPDOWN ) == WB_DROPDOWN && !m_pListBoxHelper->IsInDropDown() ) { rStateSet.RemoveState (AccessibleStateType::VISIBLE); @@ -185,7 +185,7 @@ void VCLXAccessibleList::notifyVisibleStates(sal_Bool _bSetNew ) sal_Bool bVisible = ( nPos>=nTopEntry && nPos<( nTopEntry + m_nVisibleLineCount ) ); pItem->SetVisible( m_bVisible && bVisible ); } - + } } // ----------------------------------------------------------------------------- @@ -240,7 +240,7 @@ void VCLXAccessibleList::ProcessWindowEvent (const VclWindowEvent& rVclWindowEve VCLXAccessibleComponent::ProcessWindowEvent (rVclWindowEvent); if ( m_pListBoxHelper ) { - uno::Any aOldValue, + uno::Any aOldValue, aNewValue; USHORT nPos = m_pListBoxHelper->GetSelectEntryPos(); if ( nPos == LISTBOX_ENTRY_NOTFOUND ) @@ -248,7 +248,7 @@ void VCLXAccessibleList::ProcessWindowEvent (const VclWindowEvent& rVclWindowEve if ( nPos != LISTBOX_ENTRY_NOTFOUND ) aNewValue <<= CreateChild(nPos); - NotifyAccessibleEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, + NotifyAccessibleEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, aOldValue, aNewValue ); } @@ -318,7 +318,7 @@ Reference<XAccessible> VCLXAccessibleList::CreateChild (sal_Int32 i) { ListItems::iterator aIter = m_aAccessibleChildren.begin() + nPos; ::std::mem_fun_t<bool, VCLXAccessibleListItem> aTemp(&VCLXAccessibleListItem::IncrementIndexInParent); - adjustEntriesIndexInParent( aIter, aTemp); + adjustEntriesIndexInParent( aIter, aTemp); } else { @@ -363,7 +363,7 @@ void VCLXAccessibleList::HandleChangedItemList (bool bItemInserted, sal_Int32 nI { ListItems::iterator aIter = m_aAccessibleChildren.erase(m_aAccessibleChildren.begin()+nIndex); ::std::mem_fun_t<bool, VCLXAccessibleListItem> aTemp(&VCLXAccessibleListItem::DecrementIndexInParent); - adjustEntriesIndexInParent( aIter, aTemp ); + adjustEntriesIndexInParent( aIter, aTemp ); } } } @@ -526,7 +526,7 @@ Sequence< ::rtl::OUString > VCLXAccessibleList::getSupportedServiceNames (void) void VCLXAccessibleList::UpdateVisibleLineCount() { - if ( m_pListBoxHelper ) + if ( m_pListBoxHelper ) { if ( (m_pListBoxHelper->GetStyle() & WB_DROPDOWN ) == WB_DROPDOWN ) m_nVisibleLineCount = m_pListBoxHelper->GetDisplayLineCount(); @@ -790,7 +790,7 @@ void SAL_CALL VCLXAccessibleList::deselectAccessibleChild( sal_Int32 nSelectedCh awt::Rectangle VCLXAccessibleList::implGetBounds() throw (uno::RuntimeException) { awt::Rectangle aBounds ( 0, 0, 0, 0 ); - if ( m_pListBoxHelper + if ( m_pListBoxHelper && (m_pListBoxHelper->GetStyle() & WB_DROPDOWN ) == WB_DROPDOWN ) { if ( m_pListBoxHelper->IsInDropDown() ) @@ -825,7 +825,7 @@ awt::Point VCLXAccessibleList::getLocationOnScreen( ) throw (uno::RuntimeExcept ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); awt::Point aPos; - if ( m_pListBoxHelper + if ( m_pListBoxHelper && (m_pListBoxHelper->GetStyle() & WB_DROPDOWN ) == WB_DROPDOWN ) { if ( m_pListBoxHelper->IsInDropDown() ) diff --git a/accessibility/source/standard/vclxaccessiblelistbox.cxx b/accessibility/source/standard/vclxaccessiblelistbox.cxx index 07aa685aac27..381cdfd8cd4b 100644 --- a/accessibility/source/standard/vclxaccessiblelistbox.cxx +++ b/accessibility/source/standard/vclxaccessiblelistbox.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -72,7 +72,7 @@ VCLXAccessibleListBox::~VCLXAccessibleListBox (void) bool VCLXAccessibleListBox::IsValid (void) const { return static_cast<ListBox*>(GetWindow()) != NULL; - + } @@ -88,7 +88,7 @@ void VCLXAccessibleListBox::ProcessWindowEvent (const VclWindowEvent& rVclWindow //===== XServiceInfo ======================================================== -::rtl::OUString VCLXAccessibleListBox::getImplementationName (void) +::rtl::OUString VCLXAccessibleListBox::getImplementationName (void) throw (RuntimeException) { return ::rtl::OUString::createFromAscii("com.sun.star.comp.toolkit.AccessibleListBox"); @@ -97,7 +97,7 @@ void VCLXAccessibleListBox::ProcessWindowEvent (const VclWindowEvent& rVclWindow -Sequence< ::rtl::OUString > VCLXAccessibleListBox::getSupportedServiceNames (void) +Sequence< ::rtl::OUString > VCLXAccessibleListBox::getSupportedServiceNames (void) throw (RuntimeException) { Sequence< ::rtl::OUString > aNames = VCLXAccessibleBox::getSupportedServiceNames(); diff --git a/accessibility/source/standard/vclxaccessiblelistitem.cxx b/accessibility/source/standard/vclxaccessiblelistitem.cxx index f84188ba8155..a72457061b0f 100644 --- a/accessibility/source/standard/vclxaccessiblelistitem.cxx +++ b/accessibility/source/standard/vclxaccessiblelistitem.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -75,14 +75,14 @@ DBG_NAME(VCLXAccessibleListItem) // ----------------------------------------------------------------------------- VCLXAccessibleListItem::VCLXAccessibleListItem( ::accessibility::IComboListBoxHelper* _pListBoxHelper, sal_Int32 _nIndexInParent, const Reference< XAccessible >& _xParent ) : - VCLXAccessibleListItem_BASE ( m_aMutex ), + VCLXAccessibleListItem_BASE ( m_aMutex ), m_nIndexInParent( _nIndexInParent ), - m_bSelected ( sal_False ), - m_bVisible ( sal_False ), + m_bSelected ( sal_False ), + m_bVisible ( sal_False ), m_nClientId ( 0 ), m_pListBoxHelper( _pListBoxHelper ), - m_xParent ( _xParent ) + m_xParent ( _xParent ) { DBG_CTOR( VCLXAccessibleListItem, NULL ); @@ -210,10 +210,10 @@ void SAL_CALL VCLXAccessibleListItem::disposing() ::osl::MutexGuard aGuard( m_aMutex ); VCLXAccessibleListItem_BASE::disposing(); - m_sEntryText = ::rtl::OUString(); - m_pListBoxHelper = NULL; - m_xParent = NULL; - m_xParentContext = NULL; + m_sEntryText = ::rtl::OUString(); + m_pListBoxHelper = NULL; + m_xParent = NULL; + m_xParentContext = NULL; nId = m_nClientId; m_nClientId = 0; @@ -288,7 +288,7 @@ sal_Int32 SAL_CALL VCLXAccessibleListItem::getAccessibleIndexInParent( ) throw sal_Int16 SAL_CALL VCLXAccessibleListItem::getAccessibleRole( ) throw (RuntimeException) { return AccessibleRole::LIST_ITEM; - // return AccessibleRole::LABEL; + // return AccessibleRole::LABEL; } // ----------------------------------------------------------------------------- ::rtl::OUString SAL_CALL VCLXAccessibleListItem::getAccessibleDescription( ) throw (RuntimeException) diff --git a/accessibility/source/standard/vclxaccessiblemenu.cxx b/accessibility/source/standard/vclxaccessiblemenu.cxx index 2d66d98c9563..c341a6f2ecb4 100644 --- a/accessibility/source/standard/vclxaccessiblemenu.cxx +++ b/accessibility/source/standard/vclxaccessiblemenu.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -124,7 +124,7 @@ sal_Int32 VCLXAccessibleMenu::getAccessibleChildCount( ) throw (RuntimeExceptio { OExternalLockGuard aGuard( this ); - return GetChildCount(); + return GetChildCount(); } // ----------------------------------------------------------------------------- @@ -176,13 +176,13 @@ void VCLXAccessibleMenu::selectAccessibleChild( sal_Int32 nChildIndex ) throw (I // ----------------------------------------------------------------------------- sal_Bool VCLXAccessibleMenu::isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException) -{ +{ OExternalLockGuard aGuard( this ); if ( nChildIndex < 0 || nChildIndex >= GetChildCount() ) throw IndexOutOfBoundsException(); - return IsChildSelected( nChildIndex ); + return IsChildSelected( nChildIndex ); } // ----------------------------------------------------------------------------- @@ -210,7 +210,7 @@ sal_Int32 VCLXAccessibleMenu::getSelectedAccessibleChildCount( ) throw (Runtime sal_Int32 nRet = 0; for ( sal_Int32 i = 0, nCount = GetChildCount(); i < nCount; i++ ) - { + { if ( IsChildSelected( i ) ) ++nRet; } @@ -230,7 +230,7 @@ Reference< XAccessible > VCLXAccessibleMenu::getSelectedAccessibleChild( sal_Int Reference< XAccessible > xChild; for ( sal_Int32 i = 0, j = 0, nCount = GetChildCount(); i < nCount; i++ ) - { + { if ( IsChildSelected( i ) && ( j++ == nSelectedChildIndex ) ) { xChild = GetChild( i ); diff --git a/accessibility/source/standard/vclxaccessiblemenubar.cxx b/accessibility/source/standard/vclxaccessiblemenubar.cxx index 64eee8741f09..6bef6c5b786d 100644 --- a/accessibility/source/standard/vclxaccessiblemenubar.cxx +++ b/accessibility/source/standard/vclxaccessiblemenubar.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/source/standard/vclxaccessiblemenuitem.cxx b/accessibility/source/standard/vclxaccessiblemenuitem.cxx index a8b48a8baedc..b2b633956fda 100644 --- a/accessibility/source/standard/vclxaccessiblemenuitem.cxx +++ b/accessibility/source/standard/vclxaccessiblemenuitem.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -81,14 +81,14 @@ sal_Bool VCLXAccessibleMenuItem::IsFocused() } // ----------------------------------------------------------------------------- - + sal_Bool VCLXAccessibleMenuItem::IsSelected() { return IsHighlighted(); } // ----------------------------------------------------------------------------- - + sal_Bool VCLXAccessibleMenuItem::IsChecked() { sal_Bool bChecked = sal_False; @@ -104,7 +104,7 @@ sal_Bool VCLXAccessibleMenuItem::IsChecked() } // ----------------------------------------------------------------------------- - + sal_Bool VCLXAccessibleMenuItem::IsHighlighted() { sal_Bool bHighlighted = sal_False; @@ -229,8 +229,8 @@ sal_Bool VCLXAccessibleMenuItem::setCaretPosition( sal_Int32 nIndex ) throw (Ind sal_Unicode VCLXAccessibleMenuItem::getCharacter( sal_Int32 nIndex ) throw (IndexOutOfBoundsException, RuntimeException) { OExternalLockGuard aGuard( this ); - - return OCommonAccessibleText::getCharacter( nIndex ); + + return OCommonAccessibleText::getCharacter( nIndex ); } // ----------------------------------------------------------------------------- @@ -282,7 +282,7 @@ sal_Int32 VCLXAccessibleMenuItem::getCharacterCount() throw (RuntimeException) { OExternalLockGuard aGuard( this ); - return OCommonAccessibleText::getCharacterCount(); + return OCommonAccessibleText::getCharacterCount(); } // ----------------------------------------------------------------------------- @@ -311,8 +311,8 @@ sal_Int32 VCLXAccessibleMenuItem::getIndexAtPoint( const awt::Point& aPoint ) th ::rtl::OUString VCLXAccessibleMenuItem::getSelectedText() throw (RuntimeException) { OExternalLockGuard aGuard( this ); - - return OCommonAccessibleText::getSelectedText(); + + return OCommonAccessibleText::getSelectedText(); } // ----------------------------------------------------------------------------- @@ -320,7 +320,7 @@ sal_Int32 VCLXAccessibleMenuItem::getIndexAtPoint( const awt::Point& aPoint ) th sal_Int32 VCLXAccessibleMenuItem::getSelectionStart() throw (RuntimeException) { OExternalLockGuard aGuard( this ); - + return OCommonAccessibleText::getSelectionStart(); } @@ -329,8 +329,8 @@ sal_Int32 VCLXAccessibleMenuItem::getSelectionStart() throw (RuntimeException) sal_Int32 VCLXAccessibleMenuItem::getSelectionEnd() throw (RuntimeException) { OExternalLockGuard aGuard( this ); - - return OCommonAccessibleText::getSelectionEnd(); + + return OCommonAccessibleText::getSelectionEnd(); } // ----------------------------------------------------------------------------- @@ -350,7 +350,7 @@ sal_Bool VCLXAccessibleMenuItem::setSelection( sal_Int32 nStartIndex, sal_Int32 ::rtl::OUString VCLXAccessibleMenuItem::getText() throw (RuntimeException) { OExternalLockGuard aGuard( this ); - + return OCommonAccessibleText::getText(); } @@ -359,8 +359,8 @@ sal_Bool VCLXAccessibleMenuItem::setSelection( sal_Int32 nStartIndex, sal_Int32 ::rtl::OUString VCLXAccessibleMenuItem::getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (IndexOutOfBoundsException, RuntimeException) { OExternalLockGuard aGuard( this ); - - return OCommonAccessibleText::getTextRange( nStartIndex, nEndIndex ); + + return OCommonAccessibleText::getTextRange( nStartIndex, nEndIndex ); } // ----------------------------------------------------------------------------- @@ -368,7 +368,7 @@ sal_Bool VCLXAccessibleMenuItem::setSelection( sal_Int32 nStartIndex, sal_Int32 ::com::sun::star::accessibility::TextSegment VCLXAccessibleMenuItem::getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) { OExternalLockGuard aGuard( this ); - + return OCommonAccessibleText::getTextAtIndex( nIndex, aTextType ); } @@ -377,7 +377,7 @@ sal_Bool VCLXAccessibleMenuItem::setSelection( sal_Int32 nStartIndex, sal_Int32 ::com::sun::star::accessibility::TextSegment VCLXAccessibleMenuItem::getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) { OExternalLockGuard aGuard( this ); - + return OCommonAccessibleText::getTextBeforeIndex( nIndex, aTextType ); } @@ -386,7 +386,7 @@ sal_Bool VCLXAccessibleMenuItem::setSelection( sal_Int32 nStartIndex, sal_Int32 ::com::sun::star::accessibility::TextSegment VCLXAccessibleMenuItem::getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) { OExternalLockGuard aGuard( this ); - + return OCommonAccessibleText::getTextBehindIndex( nIndex, aTextType ); } @@ -400,7 +400,7 @@ sal_Bool VCLXAccessibleMenuItem::copyText( sal_Int32 nStartIndex, sal_Int32 nEnd if ( m_pParent ) { - Window* pWindow = m_pParent->GetWindow(); + Window* pWindow = m_pParent->GetWindow(); if ( pWindow ) { Reference< datatransfer::clipboard::XClipboard > xClipboard = pWindow->GetClipboard(); @@ -415,7 +415,7 @@ sal_Bool VCLXAccessibleMenuItem::copyText( sal_Int32 nStartIndex, sal_Int32 nEnd Reference< datatransfer::clipboard::XFlushableClipboard > xFlushableClipboard( xClipboard, uno::UNO_QUERY ); if( xFlushableClipboard.is() ) xFlushableClipboard->flushClipboard(); - + Application::AcquireSolarMutex( nRef ); bReturn = sal_True; @@ -434,7 +434,7 @@ sal_Int32 VCLXAccessibleMenuItem::getAccessibleActionCount( ) throw (RuntimeExce { OExternalLockGuard aGuard( this ); - return 1; + return 1; } // ----------------------------------------------------------------------------- @@ -471,7 +471,7 @@ Reference< XAccessibleKeyBinding > VCLXAccessibleMenuItem::getAccessibleActionKe if ( nIndex < 0 || nIndex >= getAccessibleActionCount() ) throw IndexOutOfBoundsException(); - + OAccessibleKeyBindingHelper* pKeyBindingHelper = new OAccessibleKeyBindingHelper(); Reference< XAccessibleKeyBinding > xKeyBinding = pKeyBindingHelper; @@ -510,7 +510,7 @@ Reference< XAccessibleKeyBinding > VCLXAccessibleMenuItem::getAccessibleActionKe { Reference< XAccessibleKeyBinding > xKeyB( xAction->getAccessibleActionKeyBinding( 0 ) ); if ( xKeyB.is() && xKeyB->getAccessibleKeyBindingCount() > 1 ) - aSeq = xKeyB->getAccessibleKeyBinding( 1 ); + aSeq = xKeyB->getAccessibleKeyBinding( 1 ); } } } @@ -589,7 +589,7 @@ Any VCLXAccessibleMenuItem::getMaximumValue( ) throw (RuntimeException) Any aValue; aValue <<= (sal_Int32) 1; - + return aValue; } @@ -601,7 +601,7 @@ Any VCLXAccessibleMenuItem::getMinimumValue( ) throw (RuntimeException) Any aValue; aValue <<= (sal_Int32) 0; - + return aValue; } diff --git a/accessibility/source/standard/vclxaccessiblemenuseparator.cxx b/accessibility/source/standard/vclxaccessiblemenuseparator.cxx index 70130243e54e..5dca9676f3d0 100644 --- a/accessibility/source/standard/vclxaccessiblemenuseparator.cxx +++ b/accessibility/source/standard/vclxaccessiblemenuseparator.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/source/standard/vclxaccessiblepopupmenu.cxx b/accessibility/source/standard/vclxaccessiblepopupmenu.cxx index 073ebd80f844..0f65f732b728 100644 --- a/accessibility/source/standard/vclxaccessiblepopupmenu.cxx +++ b/accessibility/source/standard/vclxaccessiblepopupmenu.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -56,7 +56,7 @@ VCLXAccessiblePopupMenu::~VCLXAccessiblePopupMenu() // ----------------------------------------------------------------------------- sal_Bool VCLXAccessiblePopupMenu::IsFocused() -{ +{ return !IsChildHighlighted(); } diff --git a/accessibility/source/standard/vclxaccessibleradiobutton.cxx b/accessibility/source/standard/vclxaccessibleradiobutton.cxx index 5ad9053e9ea5..13c9f251cfcd 100644 --- a/accessibility/source/standard/vclxaccessibleradiobutton.cxx +++ b/accessibility/source/standard/vclxaccessibleradiobutton.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -175,7 +175,7 @@ sal_Int32 VCLXAccessibleRadioButton::getAccessibleActionCount( ) throw (RuntimeE { OExternalLockGuard aGuard( this ); - return 1; + return 1; } // ----------------------------------------------------------------------------- @@ -214,7 +214,7 @@ Reference< XAccessibleKeyBinding > VCLXAccessibleRadioButton::getAccessibleActio if ( nIndex < 0 || nIndex >= getAccessibleActionCount() ) throw IndexOutOfBoundsException(); - + OAccessibleKeyBindingHelper* pKeyBindingHelper = new OAccessibleKeyBindingHelper(); Reference< XAccessibleKeyBinding > xKeyBinding = pKeyBindingHelper; @@ -258,7 +258,7 @@ Any VCLXAccessibleRadioButton::getCurrentValue( ) throw (RuntimeException) VCLXRadioButton* pVCLXRadioButton = static_cast< VCLXRadioButton* >( GetVCLXWindow() ); if ( pVCLXRadioButton ) aValue <<= (sal_Int32) pVCLXRadioButton->getState(); - + return aValue; } @@ -284,7 +284,7 @@ sal_Bool VCLXAccessibleRadioButton::setCurrentValue( const Any& aNumber ) throw pVCLXRadioButton->setState( (sal_Bool) nValue ); bReturn = sal_True; } - + return bReturn; } @@ -296,7 +296,7 @@ Any VCLXAccessibleRadioButton::getMaximumValue( ) throw (RuntimeException) Any aValue; aValue <<= (sal_Int32) 1; - + return aValue; } @@ -308,7 +308,7 @@ Any VCLXAccessibleRadioButton::getMinimumValue( ) throw (RuntimeException) Any aValue; aValue <<= (sal_Int32) 0; - + return aValue; } diff --git a/accessibility/source/standard/vclxaccessiblescrollbar.cxx b/accessibility/source/standard/vclxaccessiblescrollbar.cxx index 2d9a6dd6bebc..c73caadb51d2 100644 --- a/accessibility/source/standard/vclxaccessiblescrollbar.cxx +++ b/accessibility/source/standard/vclxaccessiblescrollbar.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -119,7 +119,7 @@ IMPLEMENT_FORWARD_XTYPEPROVIDER2( VCLXAccessibleScrollBar, VCLXAccessibleCompone ::rtl::OUString VCLXAccessibleScrollBar::getImplementationName() throw (RuntimeException) { - return ::rtl::OUString::createFromAscii( "com.sun.star.comp.toolkit.AccessibleScrollBar" ); + return ::rtl::OUString::createFromAscii( "com.sun.star.comp.toolkit.AccessibleScrollBar" ); } // ----------------------------------------------------------------------------- @@ -158,11 +158,11 @@ sal_Bool VCLXAccessibleScrollBar::doAccessibleAction ( sal_Int32 nIndex ) throw ScrollType eScrollType; switch ( nIndex ) { - case 0: eScrollType = SCROLL_LINEUP; break; - case 1: eScrollType = SCROLL_LINEDOWN; break; - case 2: eScrollType = SCROLL_PAGEUP; break; - case 3: eScrollType = SCROLL_PAGEDOWN; break; - default: eScrollType = SCROLL_DONTKNOW; break; + case 0: eScrollType = SCROLL_LINEUP; break; + case 1: eScrollType = SCROLL_LINEDOWN; break; + case 2: eScrollType = SCROLL_PAGEUP; break; + case 3: eScrollType = SCROLL_PAGEDOWN; break; + default: eScrollType = SCROLL_DONTKNOW; break; } if ( pScrollBar->DoScrollAction( eScrollType ) ) bReturn = sal_True; @@ -184,11 +184,11 @@ sal_Bool VCLXAccessibleScrollBar::doAccessibleAction ( sal_Int32 nIndex ) throw switch ( nIndex ) { - case 0: sDescription = ::rtl::OUString( TK_RES_STRING( RID_STR_ACC_ACTION_DECLINE ) ); break; - case 1: sDescription = ::rtl::OUString( TK_RES_STRING( RID_STR_ACC_ACTION_INCLINE ) ); break; - case 2: sDescription = ::rtl::OUString( TK_RES_STRING( RID_STR_ACC_ACTION_DECBLOCK ) ); break; - case 3: sDescription = ::rtl::OUString( TK_RES_STRING( RID_STR_ACC_ACTION_INCBLOCK ) ); break; - default: break; + case 0: sDescription = ::rtl::OUString( TK_RES_STRING( RID_STR_ACC_ACTION_DECLINE ) ); break; + case 1: sDescription = ::rtl::OUString( TK_RES_STRING( RID_STR_ACC_ACTION_INCLINE ) ); break; + case 2: sDescription = ::rtl::OUString( TK_RES_STRING( RID_STR_ACC_ACTION_DECBLOCK ) ); break; + case 3: sDescription = ::rtl::OUString( TK_RES_STRING( RID_STR_ACC_ACTION_INCBLOCK ) ); break; + default: break; } return sDescription; @@ -203,7 +203,7 @@ Reference< XAccessibleKeyBinding > VCLXAccessibleScrollBar::getAccessibleActionK if ( nIndex < 0 || nIndex >= getAccessibleActionCount() ) throw IndexOutOfBoundsException(); - return Reference< XAccessibleKeyBinding >(); + return Reference< XAccessibleKeyBinding >(); } // ----------------------------------------------------------------------------- @@ -262,7 +262,7 @@ Any VCLXAccessibleScrollBar::getMaximumValue( ) throw (RuntimeException) VCLXScrollBar* pVCLXScrollBar = static_cast< VCLXScrollBar* >( GetVCLXWindow() ); if ( pVCLXScrollBar ) aValue <<= (sal_Int32) pVCLXScrollBar->getMaximum(); - + return aValue; } @@ -274,7 +274,7 @@ Any VCLXAccessibleScrollBar::getMinimumValue( ) throw (RuntimeException) Any aValue; aValue <<= (sal_Int32) 0; - + return aValue; } diff --git a/accessibility/source/standard/vclxaccessiblestatusbar.cxx b/accessibility/source/standard/vclxaccessiblestatusbar.cxx index 9a3fb29b7b31..97b687e1e968 100644 --- a/accessibility/source/standard/vclxaccessiblestatusbar.cxx +++ b/accessibility/source/standard/vclxaccessiblestatusbar.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,9 +42,9 @@ using namespace ::com::sun::star::accessibility; using namespace ::comphelper; -// ---------------------------------------------------- -// class VCLXAccessibleStatusBar -// ---------------------------------------------------- +// ---------------------------------------------------- +// class VCLXAccessibleStatusBar +// ---------------------------------------------------- VCLXAccessibleStatusBar::VCLXAccessibleStatusBar( VCLXWindow* pVCLXWindow ) :VCLXAccessibleComponent( pVCLXWindow ) @@ -168,7 +168,7 @@ void VCLXAccessibleStatusBar::ProcessWindowEvent( const VclWindowEvent& rVclWind switch ( rVclWindowEvent.GetId() ) { case VCLEVENT_STATUSBAR_ITEMADDED: - { + { if ( m_pStatusBar ) { sal_uInt16 nItemId = (sal_uInt16)(sal_IntPtr) rVclWindowEvent.GetData(); @@ -206,7 +206,7 @@ void VCLXAccessibleStatusBar::ProcessWindowEvent( const VclWindowEvent& rVclWind break; case VCLEVENT_STATUSBAR_SHOWITEM: case VCLEVENT_STATUSBAR_HIDEITEM: - { + { if ( m_pStatusBar ) { sal_uInt16 nItemId = (sal_uInt16)(sal_IntPtr) rVclWindowEvent.GetData(); @@ -217,28 +217,28 @@ void VCLXAccessibleStatusBar::ProcessWindowEvent( const VclWindowEvent& rVclWind break; case VCLEVENT_STATUSBAR_SHOWALLITEMS: case VCLEVENT_STATUSBAR_HIDEALLITEMS: - { + { for ( sal_uInt32 i = 0; i < m_aAccessibleChildren.size(); ++i ) UpdateShowing( i, rVclWindowEvent.GetId() == VCLEVENT_STATUSBAR_SHOWALLITEMS ); } break; case VCLEVENT_STATUSBAR_NAMECHANGED: - { + { if ( m_pStatusBar ) { sal_uInt16 nItemId = (sal_uInt16)(sal_IntPtr) rVclWindowEvent.GetData(); sal_uInt16 nItemPos = m_pStatusBar->GetItemPos( nItemId ); - UpdateItemName( nItemPos ); + UpdateItemName( nItemPos ); } } break; case VCLEVENT_STATUSBAR_DRAWITEM: - { + { if ( m_pStatusBar ) { sal_uInt16 nItemId = (sal_uInt16)(sal_IntPtr) rVclWindowEvent.GetData(); sal_uInt16 nItemPos = m_pStatusBar->GetItemPos( nItemId ); - UpdateItemText( nItemPos ); + UpdateItemText( nItemPos ); } } break; @@ -255,7 +255,7 @@ void VCLXAccessibleStatusBar::ProcessWindowEvent( const VclWindowEvent& rVclWind if ( xComponent.is() ) xComponent->dispose(); } - m_aAccessibleChildren.clear(); + m_aAccessibleChildren.clear(); } VCLXAccessibleComponent::ProcessWindowEvent( rVclWindowEvent ); @@ -285,7 +285,7 @@ void VCLXAccessibleStatusBar::disposing() if ( xComponent.is() ) xComponent->dispose(); } - m_aAccessibleChildren.clear(); + m_aAccessibleChildren.clear(); } } @@ -315,7 +315,7 @@ sal_Int32 VCLXAccessibleStatusBar::getAccessibleChildCount() throw (RuntimeExcep { OExternalLockGuard aGuard( this ); - return m_aAccessibleChildren.size(); + return m_aAccessibleChildren.size(); } // ----------------------------------------------------------------------------- diff --git a/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx b/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx index 5f6cca43ca9a..fc7ff7c35b34 100644 --- a/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx +++ b/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -70,7 +70,7 @@ VCLXAccessibleStatusBarItem::VCLXAccessibleStatusBarItem( StatusBar* pStatusBar, m_sItemName = GetItemName(); m_sItemText = GetItemText(); - m_bShowing = IsShowing(); + m_bShowing = IsShowing(); } // ----------------------------------------------------------------------------- @@ -176,12 +176,12 @@ void VCLXAccessibleStatusBarItem::FillAccessibleStateSet( utl::AccessibleStateSe } // ----------------------------------------------------------------------------- -// OCommonAccessibleComponent +// OCommonAccessibleComponent // ----------------------------------------------------------------------------- awt::Rectangle VCLXAccessibleStatusBarItem::implGetBounds() throw (RuntimeException) { - awt::Rectangle aBounds( 0, 0, 0, 0 ); + awt::Rectangle aBounds( 0, 0, 0, 0 ); if ( m_pStatusBar ) aBounds = AWTRectangle( m_pStatusBar->GetItemRect( m_nItemId ) ); @@ -340,13 +340,13 @@ sal_Int16 VCLXAccessibleStatusBarItem::getAccessibleRole( ) throw (RuntimeExcep // ----------------------------------------------------------------------------- -::rtl::OUString VCLXAccessibleStatusBarItem::getAccessibleDescription( ) throw (RuntimeException) +::rtl::OUString VCLXAccessibleStatusBarItem::getAccessibleDescription( ) throw (RuntimeException) { OExternalLockGuard aGuard( this ); ::rtl::OUString sDescription; if ( m_pStatusBar ) - sDescription = m_pStatusBar->GetHelpText( m_nItemId ); + sDescription = m_pStatusBar->GetHelpText( m_nItemId ); return sDescription; } @@ -421,7 +421,7 @@ void VCLXAccessibleStatusBarItem::grabFocus( ) throw (RuntimeException) // ----------------------------------------------------------------------------- -sal_Int32 VCLXAccessibleStatusBarItem::getForeground( ) throw (RuntimeException) +sal_Int32 VCLXAccessibleStatusBarItem::getForeground( ) throw (RuntimeException) { OExternalLockGuard aGuard( this ); @@ -431,7 +431,7 @@ sal_Int32 VCLXAccessibleStatusBarItem::getForeground( ) throw (RuntimeExceptio { Reference< XAccessibleComponent > xParentComp( xParent->getAccessibleContext(), UNO_QUERY ); if ( xParentComp.is() ) - nColor = xParentComp->getForeground(); + nColor = xParentComp->getForeground(); } return nColor; @@ -449,7 +449,7 @@ sal_Int32 VCLXAccessibleStatusBarItem::getBackground( ) throw (RuntimeException { Reference< XAccessibleComponent > xParentComp( xParent->getAccessibleContext(), UNO_QUERY ); if ( xParentComp.is() ) - nColor = xParentComp->getBackground(); + nColor = xParentComp->getBackground(); } return nColor; @@ -469,7 +469,7 @@ Reference< awt::XFont > VCLXAccessibleStatusBarItem::getFont( ) throw (RuntimeE { Reference< XAccessibleExtendedComponent > xParentComp( xParent->getAccessibleContext(), UNO_QUERY ); if ( xParentComp.is() ) - xFont = xParentComp->getFont(); + xFont = xParentComp->getFont(); } return xFont; @@ -617,7 +617,7 @@ sal_Bool VCLXAccessibleStatusBarItem::copyText( sal_Int32 nStartIndex, sal_Int32 Reference< datatransfer::clipboard::XFlushableClipboard > xFlushableClipboard( xClipboard, uno::UNO_QUERY ); if( xFlushableClipboard.is() ) xFlushableClipboard->flushClipboard(); - + Application::AcquireSolarMutex( nRef ); bReturn = sal_True; diff --git a/accessibility/source/standard/vclxaccessibletabcontrol.cxx b/accessibility/source/standard/vclxaccessibletabcontrol.cxx index 417fcf03daf8..e199584b67d1 100644 --- a/accessibility/source/standard/vclxaccessibletabcontrol.cxx +++ b/accessibility/source/standard/vclxaccessibletabcontrol.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -47,9 +47,9 @@ using namespace ::com::sun::star::accessibility; using namespace ::comphelper; -// ---------------------------------------------------- -// class VCLXAccessibleTabControl -// ---------------------------------------------------- +// ---------------------------------------------------- +// class VCLXAccessibleTabControl +// ---------------------------------------------------- VCLXAccessibleTabControl::VCLXAccessibleTabControl( VCLXWindow* pVCLXWindow ) :VCLXAccessibleComponent( pVCLXWindow ) @@ -262,7 +262,7 @@ void VCLXAccessibleTabControl::ProcessWindowEvent( const VclWindowEvent& rVclWin if ( xComponent.is() ) xComponent->dispose(); } - m_aAccessibleChildren.clear(); + m_aAccessibleChildren.clear(); } VCLXAccessibleComponent::ProcessWindowEvent( rVclWindowEvent ); @@ -345,7 +345,7 @@ void VCLXAccessibleTabControl::disposing() if ( xComponent.is() ) xComponent->dispose(); } - m_aAccessibleChildren.clear(); + m_aAccessibleChildren.clear(); } } @@ -375,7 +375,7 @@ sal_Int32 VCLXAccessibleTabControl::getAccessibleChildCount() throw (RuntimeExce { OExternalLockGuard aGuard( this ); - return m_aAccessibleChildren.size(); + return m_aAccessibleChildren.size(); } // ----------------------------------------------------------------------------- @@ -440,7 +440,7 @@ void VCLXAccessibleTabControl::selectAccessibleChild( sal_Int32 nChildIndex ) th // ----------------------------------------------------------------------------- sal_Bool VCLXAccessibleTabControl::isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException) -{ +{ OExternalLockGuard aGuard( this ); if ( nChildIndex < 0 || nChildIndex >= getAccessibleChildCount() ) @@ -490,7 +490,7 @@ Reference< XAccessible > VCLXAccessibleTabControl::getSelectedAccessibleChild( s Reference< XAccessible > xChild; for ( sal_Int32 i = 0, j = 0, nCount = getAccessibleChildCount(); i < nCount; i++ ) - { + { if ( isAccessibleChildSelected( i ) && ( j++ == nSelectedChildIndex ) ) { xChild = getAccessibleChild( i ); diff --git a/accessibility/source/standard/vclxaccessibletabpage.cxx b/accessibility/source/standard/vclxaccessibletabpage.cxx index 5bb372884591..aa7cba0f7798 100644 --- a/accessibility/source/standard/vclxaccessibletabpage.cxx +++ b/accessibility/source/standard/vclxaccessibletabpage.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -67,7 +67,7 @@ VCLXAccessibleTabPage::VCLXAccessibleTabPage( TabControl* pTabControl, sal_uInt1 ,m_nPageId( nPageId ) { m_pExternalLock = static_cast< VCLExternalSolarLock* >( getExternalLock() ); - m_bFocused = IsFocused(); + m_bFocused = IsFocused(); m_bSelected = IsSelected(); m_sPageText = GetPageText(); } @@ -175,14 +175,14 @@ void VCLXAccessibleTabPage::Update( bool bNew ) Reference< XAccessible > xChild( pTabPage->GetAccessible( bNew ) ); if ( xChild.is() ) { - Any aOldValue, aNewValue; + Any aOldValue, aNewValue; if ( bNew ) aNewValue <<= xChild; else aOldValue <<= xChild; NotifyAccessibleEvent( AccessibleEventId::CHILD, aOldValue, aNewValue ); } - } + } } } @@ -209,12 +209,12 @@ void VCLXAccessibleTabPage::FillAccessibleStateSet( utl::AccessibleStateSetHelpe } // ----------------------------------------------------------------------------- -// OCommonAccessibleComponent +// OCommonAccessibleComponent // ----------------------------------------------------------------------------- awt::Rectangle VCLXAccessibleTabPage::implGetBounds() throw (RuntimeException) { - awt::Rectangle aBounds( 0, 0, 0, 0 ); + awt::Rectangle aBounds( 0, 0, 0, 0 ); if ( m_pTabControl ) aBounds = AWTRectangle( m_pTabControl->GetTabBounds( m_nPageId ) ); @@ -388,7 +388,7 @@ sal_Int16 VCLXAccessibleTabPage::getAccessibleRole( ) throw (RuntimeException) // ----------------------------------------------------------------------------- -::rtl::OUString VCLXAccessibleTabPage::getAccessibleDescription( ) throw (RuntimeException) +::rtl::OUString VCLXAccessibleTabPage::getAccessibleDescription( ) throw (RuntimeException) { OExternalLockGuard aGuard( this ); @@ -462,8 +462,8 @@ Reference< XAccessible > VCLXAccessibleTabPage::getAccessibleAtPoint( const awt: { Reference< XAccessible > xAcc = getAccessibleChild( i ); if ( xAcc.is() ) - { - Reference< XAccessibleComponent > xComp( xAcc->getAccessibleContext(), UNO_QUERY ); + { + Reference< XAccessibleComponent > xComp( xAcc->getAccessibleContext(), UNO_QUERY ); if ( xComp.is() ) { Rectangle aRect = VCLRectangle( xComp->getBounds() ); @@ -495,7 +495,7 @@ void VCLXAccessibleTabPage::grabFocus( ) throw (RuntimeException) // ----------------------------------------------------------------------------- -sal_Int32 VCLXAccessibleTabPage::getForeground( ) throw (RuntimeException) +sal_Int32 VCLXAccessibleTabPage::getForeground( ) throw (RuntimeException) { OExternalLockGuard aGuard( this ); @@ -505,7 +505,7 @@ sal_Int32 VCLXAccessibleTabPage::getForeground( ) throw (RuntimeException) { Reference< XAccessibleComponent > xParentComp( xParent->getAccessibleContext(), UNO_QUERY ); if ( xParentComp.is() ) - nColor = xParentComp->getForeground(); + nColor = xParentComp->getForeground(); } return nColor; @@ -523,7 +523,7 @@ sal_Int32 VCLXAccessibleTabPage::getBackground( ) throw (RuntimeException) { Reference< XAccessibleComponent > xParentComp( xParent->getAccessibleContext(), UNO_QUERY ); if ( xParentComp.is() ) - nColor = xParentComp->getBackground(); + nColor = xParentComp->getBackground(); } return nColor; @@ -543,7 +543,7 @@ Reference< awt::XFont > VCLXAccessibleTabPage::getFont( ) throw (RuntimeExcepti { Reference< XAccessibleExtendedComponent > xParentComp( xParent->getAccessibleContext(), UNO_QUERY ); if ( xParentComp.is() ) - xFont = xParentComp->getFont(); + xFont = xParentComp->getFont(); } return xFont; @@ -690,7 +690,7 @@ sal_Bool VCLXAccessibleTabPage::copyText( sal_Int32 nStartIndex, sal_Int32 nEndI Reference< datatransfer::clipboard::XFlushableClipboard > xFlushableClipboard( xClipboard, uno::UNO_QUERY ); if( xFlushableClipboard.is() ) xFlushableClipboard->flushClipboard(); - + Application::AcquireSolarMutex( nRef ); bReturn = sal_True; diff --git a/accessibility/source/standard/vclxaccessibletabpagewindow.cxx b/accessibility/source/standard/vclxaccessibletabpagewindow.cxx index 9353c9801991..a9d3afd955c4 100644 --- a/accessibility/source/standard/vclxaccessibletabpagewindow.cxx +++ b/accessibility/source/standard/vclxaccessibletabpagewindow.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -40,9 +40,9 @@ using namespace ::com::sun::star::accessibility; using namespace ::comphelper; -// ---------------------------------------------------- -// class VCLXAccessibleTabPageWindow -// ---------------------------------------------------- +// ---------------------------------------------------- +// class VCLXAccessibleTabPageWindow +// ---------------------------------------------------- VCLXAccessibleTabPageWindow::VCLXAccessibleTabPageWindow( VCLXWindow* pVCLXWindow ) :VCLXAccessibleComponent( pVCLXWindow ) @@ -74,12 +74,12 @@ VCLXAccessibleTabPageWindow::~VCLXAccessibleTabPageWindow() } // ----------------------------------------------------------------------------- -// OCommonAccessibleComponent +// OCommonAccessibleComponent // ----------------------------------------------------------------------------- awt::Rectangle VCLXAccessibleTabPageWindow::implGetBounds() throw (RuntimeException) { - awt::Rectangle aBounds( 0, 0, 0, 0 ); + awt::Rectangle aBounds( 0, 0, 0, 0 ); if ( m_pTabControl ) { diff --git a/accessibility/source/standard/vclxaccessibletextcomponent.cxx b/accessibility/source/standard/vclxaccessibletextcomponent.cxx index 9613234eb732..ead524a34eb7 100644 --- a/accessibility/source/standard/vclxaccessibletextcomponent.cxx +++ b/accessibility/source/standard/vclxaccessibletextcomponent.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -54,9 +54,9 @@ using namespace ::com::sun::star::accessibility; using namespace ::comphelper; -// ---------------------------------------------------- -// class VCLXAccessibleTextComponent -// ---------------------------------------------------- +// ---------------------------------------------------- +// class VCLXAccessibleTextComponent +// ---------------------------------------------------- VCLXAccessibleTextComponent::VCLXAccessibleTextComponent( VCLXWindow* pVCLXWindow ) :VCLXAccessibleComponent( pVCLXWindow ) @@ -176,8 +176,8 @@ sal_Bool VCLXAccessibleTextComponent::setCaretPosition( sal_Int32 nIndex ) throw sal_Unicode VCLXAccessibleTextComponent::getCharacter( sal_Int32 nIndex ) throw (IndexOutOfBoundsException, RuntimeException) { OExternalLockGuard aGuard( this ); - - return OCommonAccessibleText::getCharacter( nIndex ); + + return OCommonAccessibleText::getCharacter( nIndex ); } // ----------------------------------------------------------------------------- @@ -226,8 +226,8 @@ awt::Rectangle VCLXAccessibleTextComponent::getCharacterBounds( sal_Int32 nIndex sal_Int32 VCLXAccessibleTextComponent::getCharacterCount() throw (RuntimeException) { OExternalLockGuard aGuard( this ); - - return OCommonAccessibleText::getCharacterCount(); + + return OCommonAccessibleText::getCharacterCount(); } // ----------------------------------------------------------------------------- @@ -249,8 +249,8 @@ sal_Int32 VCLXAccessibleTextComponent::getIndexAtPoint( const awt::Point& aPoint ::rtl::OUString VCLXAccessibleTextComponent::getSelectedText() throw (RuntimeException) { OExternalLockGuard aGuard( this ); - - return OCommonAccessibleText::getSelectedText(); + + return OCommonAccessibleText::getSelectedText(); } // ----------------------------------------------------------------------------- @@ -258,7 +258,7 @@ sal_Int32 VCLXAccessibleTextComponent::getIndexAtPoint( const awt::Point& aPoint sal_Int32 VCLXAccessibleTextComponent::getSelectionStart() throw (RuntimeException) { OExternalLockGuard aGuard( this ); - + return OCommonAccessibleText::getSelectionStart(); } @@ -267,8 +267,8 @@ sal_Int32 VCLXAccessibleTextComponent::getSelectionStart() throw (RuntimeExcepti sal_Int32 VCLXAccessibleTextComponent::getSelectionEnd() throw (RuntimeException) { OExternalLockGuard aGuard( this ); - - return OCommonAccessibleText::getSelectionEnd(); + + return OCommonAccessibleText::getSelectionEnd(); } // ----------------------------------------------------------------------------- @@ -288,7 +288,7 @@ sal_Bool VCLXAccessibleTextComponent::setSelection( sal_Int32 nStartIndex, sal_I ::rtl::OUString VCLXAccessibleTextComponent::getText() throw (RuntimeException) { OExternalLockGuard aGuard( this ); - + return OCommonAccessibleText::getText(); } @@ -297,8 +297,8 @@ sal_Bool VCLXAccessibleTextComponent::setSelection( sal_Int32 nStartIndex, sal_I ::rtl::OUString VCLXAccessibleTextComponent::getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (IndexOutOfBoundsException, RuntimeException) { OExternalLockGuard aGuard( this ); - - return OCommonAccessibleText::getTextRange( nStartIndex, nEndIndex ); + + return OCommonAccessibleText::getTextRange( nStartIndex, nEndIndex ); } // ----------------------------------------------------------------------------- @@ -306,7 +306,7 @@ sal_Bool VCLXAccessibleTextComponent::setSelection( sal_Int32 nStartIndex, sal_I ::com::sun::star::accessibility::TextSegment VCLXAccessibleTextComponent::getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) { OExternalLockGuard aGuard( this ); - + return OCommonAccessibleText::getTextAtIndex( nIndex, aTextType ); } @@ -315,7 +315,7 @@ sal_Bool VCLXAccessibleTextComponent::setSelection( sal_Int32 nStartIndex, sal_I ::com::sun::star::accessibility::TextSegment VCLXAccessibleTextComponent::getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) { OExternalLockGuard aGuard( this ); - + return OCommonAccessibleText::getTextBeforeIndex( nIndex, aTextType ); } @@ -324,7 +324,7 @@ sal_Bool VCLXAccessibleTextComponent::setSelection( sal_Int32 nStartIndex, sal_I ::com::sun::star::accessibility::TextSegment VCLXAccessibleTextComponent::getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) { OExternalLockGuard aGuard( this ); - + return OCommonAccessibleText::getTextBehindIndex( nIndex, aTextType ); } @@ -350,7 +350,7 @@ sal_Bool VCLXAccessibleTextComponent::copyText( sal_Int32 nStartIndex, sal_Int32 Reference< datatransfer::clipboard::XFlushableClipboard > xFlushableClipboard( xClipboard, uno::UNO_QUERY ); if( xFlushableClipboard.is() ) xFlushableClipboard->flushClipboard(); - + Application::AcquireSolarMutex( nRef ); bReturn = sal_True; diff --git a/accessibility/source/standard/vclxaccessibletextfield.cxx b/accessibility/source/standard/vclxaccessibletextfield.cxx index afc28d3e9e43..7d96e1695b0d 100644 --- a/accessibility/source/standard/vclxaccessibletextfield.cxx +++ b/accessibility/source/standard/vclxaccessibletextfield.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/source/standard/vclxaccessibletoolbox.cxx b/accessibility/source/standard/vclxaccessibletoolbox.cxx index 1b22fddc95fa..9d71f3f1af37 100644 --- a/accessibility/source/standard/vclxaccessibletoolbox.cxx +++ b/accessibility/source/standard/vclxaccessibletoolbox.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -70,7 +70,7 @@ namespace _rxORB, _rxInnerAccessibleContext, _rxOwningAccessible, - _rxParentAccessible ) + _rxParentAccessible ) ,m_nIndexInParent(_nIndexInParent) { } @@ -87,8 +87,8 @@ namespace // ========================================================================= // = OToolBoxWindowItem // ========================================================================= - typedef ::cppu::ImplHelper1 < XUnoTunnel - > OToolBoxWindowItem_Base; + typedef ::cppu::ImplHelper1 < XUnoTunnel + > OToolBoxWindowItem_Base; /** XAccessible implementation for a toolbox item which is represented by a VCL Window */ @@ -100,10 +100,10 @@ namespace sal_Int32 m_nIndexInParent; public: - inline sal_Int32 getIndexInParent() const { return m_nIndexInParent; } - inline void setIndexInParent( sal_Int32 _nNewIndex ) { m_nIndexInParent = _nNewIndex; } + inline sal_Int32 getIndexInParent() const { return m_nIndexInParent; } + inline void setIndexInParent( sal_Int32 _nNewIndex ) { m_nIndexInParent = _nNewIndex; } - static sal_Bool isWindowItem( const Reference< XAccessible >& _rxAcc, OToolBoxWindowItem** /* [out] */ _ppImplementation = NULL ); + static sal_Bool isWindowItem( const Reference< XAccessible >& _rxAcc, OToolBoxWindowItem** /* [out] */ _ppImplementation = NULL ); public: OToolBoxWindowItem(sal_Int32 _nIndexInParent, @@ -178,8 +178,8 @@ namespace //-------------------------------------------------------------------- sal_Int64 SAL_CALL OToolBoxWindowItem::getSomething( const Sequence< sal_Int8 >& _rId ) throw (RuntimeException) { - if ( ( 16 == _rId.getLength() ) - && ( 0 == rtl_compareMemory( getUnoTunnelImplementationId().getConstArray(), _rId.getConstArray(), 16 ) ) + if ( ( 16 == _rId.getLength() ) + && ( 0 == rtl_compareMemory( getUnoTunnelImplementationId().getConstArray(), _rId.getConstArray(), 16 ) ) ) return reinterpret_cast< sal_Int64>( this ); @@ -214,7 +214,7 @@ VCLXAccessibleToolBoxItem* VCLXAccessibleToolBox::GetItem_Impl( sal_Int32 _nPos, ToolBoxItemsMap::iterator aIter = m_aAccessibleChildren.find( _nPos ); // returns only toolbox buttons, not windows if ( aIter != m_aAccessibleChildren.end() && !aIter->second.is()) - pItem = static_cast< VCLXAccessibleToolBoxItem* >( aIter->second.get() ); + pItem = static_cast< VCLXAccessibleToolBoxItem* >( aIter->second.get() ); } return pItem; @@ -369,7 +369,7 @@ void VCLXAccessibleToolBox::UpdateItem_Impl( sal_Int32 _nPos, sal_Bool _bItemAdd if ( pToolBox ) { if ( !_bItemAdded ) - { // the item was removed + { // the item was removed // -> destroy the old item ToolBoxItemsMap::iterator aItemPos = m_aAccessibleChildren.find( _nPos ); if ( m_aAccessibleChildren.end() != aItemPos ) diff --git a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx index 05807cc4317d..d6726a6c117d 100644 --- a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx +++ b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -73,12 +73,12 @@ VCLXAccessibleToolBoxItem::VCLXAccessibleToolBoxItem( ToolBox* _pToolBox, sal_In AccessibleTextHelper_BASE( new VCLExternalSolarLock() ), - m_pToolBox ( _pToolBox ), + m_pToolBox ( _pToolBox ), m_nIndexInParent( _nPos ), - m_nRole ( AccessibleRole::PUSH_BUTTON ), - m_nItemId ( 0 ), - m_bHasFocus ( sal_False ), - m_bIsChecked ( sal_False ), + m_nRole ( AccessibleRole::PUSH_BUTTON ), + m_nItemId ( 0 ), + m_bHasFocus ( sal_False ), + m_bIsChecked ( sal_False ), m_bIndeterminate( false ) { @@ -98,12 +98,12 @@ VCLXAccessibleToolBoxItem::VCLXAccessibleToolBoxItem( ToolBox* _pToolBox, sal_In { ToolBoxItemBits nBits = m_pToolBox->GetItemBits( m_nItemId ); if (( nBits & TIB_DROPDOWN ) == TIB_DROPDOWN) - m_nRole = AccessibleRole::BUTTON_DROPDOWN; + m_nRole = AccessibleRole::BUTTON_DROPDOWN; else if (( ( nBits & TIB_CHECKABLE ) == TIB_CHECKABLE ) || ( ( nBits & TIB_AUTOCHECK ) == TIB_AUTOCHECK ) ) - m_nRole = AccessibleRole::TOGGLE_BUTTON; + m_nRole = AccessibleRole::TOGGLE_BUTTON; else if ( m_pToolBox->GetItemWindow( m_nItemId ) ) - m_nRole = AccessibleRole::PANEL; + m_nRole = AccessibleRole::PANEL; break; } @@ -541,11 +541,11 @@ Reference< XAccessible > SAL_CALL VCLXAccessibleToolBoxItem::getAccessibleAtPoin void SAL_CALL VCLXAccessibleToolBoxItem::grabFocus( ) throw (RuntimeException) { Reference< XAccessible > xParent(getAccessibleParent()); - + if( xParent.is() ) { Reference< XAccessibleSelection > rxAccessibleSelection(xParent->getAccessibleContext(), UNO_QUERY); - + if ( rxAccessibleSelection.is() ) { rxAccessibleSelection -> selectAccessibleChild ( getAccessibleIndexInParent() ); @@ -577,7 +577,7 @@ sal_Int32 SAL_CALL VCLXAccessibleToolBoxItem::getBackground( ) throw (RuntimeEx // ----------------------------------------------------------------------------- // XAccessibleExtendedComponent // ----------------------------------------------------------------------------- -Reference< awt::XFont > SAL_CALL VCLXAccessibleToolBoxItem::getFont( ) throw (RuntimeException) +Reference< awt::XFont > SAL_CALL VCLXAccessibleToolBoxItem::getFont( ) throw (RuntimeException) { return uno::Reference< awt::XFont >(); } diff --git a/accessibility/workben/org/openoffice/accessibility/awb/AccessibilityWorkBench.java b/accessibility/workben/org/openoffice/accessibility/awb/AccessibilityWorkBench.java index 6e8e45bc4e82..fa4fd69d16a7 100644 --- a/accessibility/workben/org/openoffice/accessibility/awb/AccessibilityWorkBench.java +++ b/accessibility/workben/org/openoffice/accessibility/awb/AccessibilityWorkBench.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -79,10 +79,10 @@ import org.openoffice.accessibility.awb.view.ObjectViewContainerWindow; @see Canvas for the graphical view of the accessible objects. */ -public class AccessibilityWorkBench - extends JFrame - implements XTerminateListener, - ActionListener, +public class AccessibilityWorkBench + extends JFrame + implements XTerminateListener, + ActionListener, TreeSelectionListener { public static final String msVersion = "v1.9"; @@ -107,7 +107,7 @@ public class AccessibilityWorkBench sPipeName = args[++i]; } } - + saWorkBench = new AccessibilityWorkBench (sPipeName); } @@ -136,7 +136,7 @@ public class AccessibilityWorkBench OfficeConnection.SetPipeName (sPipeName); Options.Instance().Load (msOptionsFileName); Layout (); - + MessageArea.println (System.getProperty ("os.name") + " / " + System.getProperty ("os.arch") + " / " + System.getProperty ("os.version")); @@ -145,7 +145,7 @@ public class AccessibilityWorkBench maTree.addTreeSelectionListener (this); addWindowListener (new WindowAdapter () - { public void windowClosing (WindowEvent e) {Quit();} } + { public void windowClosing (WindowEvent e) {Quit();} } ); OfficeConnection.Instance().AddConnectionListener (this); @@ -156,7 +156,7 @@ public class AccessibilityWorkBench /** Create and arrange the widgets of the GUI. - */ + */ public void Layout () { setSize (new java.awt.Dimension (800,600)); @@ -171,11 +171,11 @@ public class AccessibilityWorkBench // Accessible Tree. javax.swing.tree.TreeModel treeModel = new DynamicAccessibilityModel(); maTree = new AccessibilityTree(treeModel); - // Add the model as tree listeners to be able to populate/clear the + // Add the model as tree listeners to be able to populate/clear the // child lists on demand. maTree.addTreeExpansionListener((TreeExpansionListener) treeModel); maTree.addTreeWillExpandListener((TreeWillExpandListener) treeModel); - + JScrollPane aTreeScrollPane = new JScrollPane( maTree, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, @@ -200,7 +200,7 @@ public class AccessibilityWorkBench // Split pane for tree view and object view. JSplitPane aLeftViewSplitPane = new JSplitPane ( JSplitPane.VERTICAL_SPLIT, - aTreeScrollPane, + aTreeScrollPane, aObjectViewContainerScrollPane ); aLeftViewSplitPane.setDividerLocation (300); @@ -209,7 +209,7 @@ public class AccessibilityWorkBench // Canvas. maCanvas = new Canvas (); maCanvas.SetTree (maTree); - JScrollPane aScrolledCanvas = new JScrollPane(maCanvas, + JScrollPane aScrolledCanvas = new JScrollPane(maCanvas, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); aScrolledCanvas.getViewport().setBackground (java.awt.Color.RED); @@ -218,7 +218,7 @@ public class AccessibilityWorkBench // Split pane for tree view and canvas. JSplitPane aViewSplitPane = new JSplitPane ( JSplitPane.HORIZONTAL_SPLIT, - aLeftViewSplitPane, + aLeftViewSplitPane, aScrolledCanvas ); aViewSplitPane.setOneTouchExpandable(true); @@ -229,7 +229,7 @@ public class AccessibilityWorkBench MessageArea.Instance().setPreferredSize (new java.awt.Dimension(600,50)); JSplitPane aSplitPane = new JSplitPane ( JSplitPane.VERTICAL_SPLIT, - aViewSplitPane, + aViewSplitPane, MessageArea.Instance()); aSplitPane.setOneTouchExpandable(true); aSplitPane.setContinuousLayout (true); @@ -248,7 +248,7 @@ public class AccessibilityWorkBench // maUpdateButton = createButton ("Update", "update"); // maShapesButton = createButton ("Expand Shapes", "shapes"); maExpandButton = createButton ("Expand All", "expand"); - maQuitButton = createButton ("Quit", "quit"); + maQuitButton = createButton ("Quit", "quit"); UpdateButtonStates (); setJMenuBar (CreateMenuBar ()); @@ -267,10 +267,10 @@ public class AccessibilityWorkBench /** Shortcut method for adding an object to a GridBagLayout. */ - void addGridElement (JComponent object, - int x, int y, - int width, int height, - int weightx, int weighty, + void addGridElement (JComponent object, + int x, int y, + int width, int height, + int weightx, int weighty, int anchor, int fill) { GridBagConstraints constraints = new GridBagConstraints (); @@ -297,7 +297,7 @@ public class AccessibilityWorkBench aButton.setEnabled (false); aButton.setActionCommand (command); aButton.addActionListener (this); - + maButtonBar.add (aButton); return aButton; } @@ -314,7 +314,7 @@ public class AccessibilityWorkBench { // Menu bar. maMenuBar = new JMenuBar (); - + // File menu. JMenu aFileMenu = new JMenu ("File"); maMenuBar.add (aFileMenu); @@ -358,22 +358,22 @@ public class AccessibilityWorkBench JMenu aOptionsMenu = new JMenu ("Options"); maMenuBar.add (aOptionsMenu); JCheckBoxMenuItem aCBItem; - aCBItem = new JCheckBoxMenuItem ("Show Descriptions", + aCBItem = new JCheckBoxMenuItem ("Show Descriptions", Options.GetBoolean("ShowDescriptions")); aOptionsMenu.add (aCBItem); aCBItem.addActionListener (this); - aCBItem = new JCheckBoxMenuItem ("Show Names", + aCBItem = new JCheckBoxMenuItem ("Show Names", Options.GetBoolean ("ShowNames")); aOptionsMenu.add (aCBItem); aCBItem.addActionListener (this); - aCBItem = new JCheckBoxMenuItem ("Show Text", + aCBItem = new JCheckBoxMenuItem ("Show Text", Options.GetBoolean ("ShowText")); aOptionsMenu.add (aCBItem); aCBItem.addActionListener (this); - aCBItem = new JCheckBoxMenuItem ("Antialiased Rendering", + aCBItem = new JCheckBoxMenuItem ("Antialiased Rendering", Options.GetBoolean ("Antialiasing")); aOptionsMenu.add (aCBItem); aCBItem.addActionListener (this); @@ -381,7 +381,7 @@ public class AccessibilityWorkBench // Help menu. JMenu aHelpMenu = new JMenu ("Help"); maMenuBar.add (aHelpMenu); - + aItem = new JMenuItem ("Help"); aHelpMenu.add (aItem); aItem.addActionListener (this); @@ -411,7 +411,7 @@ public class AccessibilityWorkBench protected void Initialize () { maCanvas.SetTree (maTree); - + SimpleOffice aOffice = SimpleOffice.Instance (); if (aOffice != null) { @@ -444,7 +444,7 @@ public class AccessibilityWorkBench /** Callback for GUI actions from the buttons. */ - public void actionPerformed (ActionEvent aEvent) + public void actionPerformed (ActionEvent aEvent) { String sCommand = aEvent.getActionCommand(); if (sCommand.equals("connect")) @@ -458,7 +458,7 @@ public class AccessibilityWorkBench } else if (sCommand.equals("update")) { -// maTree.Dispose(); +// maTree.Dispose(); Initialize (); } else if (sCommand.equals("shapes")) @@ -485,25 +485,25 @@ public class AccessibilityWorkBench } else if (sCommand.equals ("Show Descriptions")) { - Options.SetBoolean ("ShowDescriptions", + Options.SetBoolean ("ShowDescriptions", ((JCheckBoxMenuItem)aEvent.getSource()).getState()); maCanvas.repaint(); } else if (sCommand.equals ("Show Names")) { - Options.SetBoolean ("ShowNames", + Options.SetBoolean ("ShowNames", ((JCheckBoxMenuItem)aEvent.getSource()).getState()); maCanvas.repaint(); } else if (sCommand.equals ("Show Text")) { - Options.SetBoolean ("ShowText", + Options.SetBoolean ("ShowText", ((JCheckBoxMenuItem)aEvent.getSource()).getState()); maCanvas.repaint(); } else if (sCommand.equals ("Antialiased Rendering")) { - Options.SetBoolean ("Antialiasing", + Options.SetBoolean ("Antialiasing", ((JCheckBoxMenuItem)aEvent.getSource()).getState()); maCanvas.repaint(); } @@ -560,7 +560,7 @@ public class AccessibilityWorkBench TreePath aSelectionPath = maTree.getSelectionPath(); if (aSelectionPath != null) { - javax.swing.tree.TreeNode aSelectedNode = + javax.swing.tree.TreeNode aSelectedNode = (javax.swing.tree.TreeNode)aSelectionPath.getLastPathComponent(); if (aSelectedNode instanceof XAccessible) { new ObjectViewContainerWindow (((XAccessible) aSelectedNode).getAccessibleContext()); @@ -580,7 +580,7 @@ public class AccessibilityWorkBench Tell the object view and the canvas about the selected object. */ public void valueChanged (TreeSelectionEvent aEvent) { - + if (aEvent.isAddedPath()) { Cursor aCursor = getCursor(); setCursor (new Cursor (Cursor.WAIT_CURSOR)); @@ -664,7 +664,7 @@ public class AccessibilityWorkBench // maTree.expandRow (0); // Register the top window listener. - XExtendedToolkit xToolkit = + XExtendedToolkit xToolkit = SimpleOffice.Instance().GetExtendedToolkit(); if (xToolkit != null) { @@ -682,15 +682,15 @@ public class AccessibilityWorkBench } /// The Singleton Workbench object. - private static AccessibilityWorkBench + private static AccessibilityWorkBench saWorkBench = null; - + private JPanel maMainPanel; private JPanel maButtonBar; private Canvas maCanvas; private AccessibilityTree maTree; private ObjectViewContainer maObjectViewContainer; - private JButton + private JButton maConnectButton, maQuitButton, maUpdateButton, diff --git a/accessibility/workben/org/openoffice/accessibility/awb/HelpWindow.java b/accessibility/workben/org/openoffice/accessibility/awb/HelpWindow.java index 2f9671d191e5..9aae024ffb70 100644 --- a/accessibility/workben/org/openoffice/accessibility/awb/HelpWindow.java +++ b/accessibility/workben/org/openoffice/accessibility/awb/HelpWindow.java @@ -120,7 +120,7 @@ public class HelpWindow {} } - public void actionPerformed (java.awt.event.ActionEvent e) + public void actionPerformed (java.awt.event.ActionEvent e) { if (e.getActionCommand().equals("Prev")) { diff --git a/accessibility/workben/org/openoffice/accessibility/awb/canvas/Canvas.java b/accessibility/workben/org/openoffice/accessibility/awb/canvas/Canvas.java index 86b642e8091c..78855b5a3d48 100644 --- a/accessibility/workben/org/openoffice/accessibility/awb/canvas/Canvas.java +++ b/accessibility/workben/org/openoffice/accessibility/awb/canvas/Canvas.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -56,7 +56,7 @@ import org.openoffice.accessibility.misc.Options; <p>The canvas listens to selection events of the associated JTree and highlights the first selected node of that tree.</p> */ -public class Canvas +public class Canvas extends JPanel { // This constant can be passed to SetZoomMode to always show the whole screen. @@ -77,7 +77,7 @@ public class Canvas /** Tell the canvas which tree to use to highlight accessible - objects and to observe for changes in the tree structure. + objects and to observe for changes in the tree structure. */ public void SetTree (javax.swing.JTree aTree) { @@ -116,10 +116,10 @@ public class Canvas Graphics2D g2 = (Graphics2D)g; if (Options.GetBoolean("Antialiasing")) - g2.setRenderingHint (RenderingHints.KEY_ANTIALIASING, + g2.setRenderingHint (RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); else - g2.setRenderingHint (RenderingHints.KEY_ANTIALIASING, + g2.setRenderingHint (RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); setupTransformation (); @@ -139,7 +139,7 @@ public class Canvas g2.fill (aScreen); g2.setColor (Color.BLACK); g2.draw (aScreen); - + synchronized (maShapeList) { Iterator aShapeIterator = maShapeList.GetIterator(); @@ -148,7 +148,7 @@ public class Canvas boolean bShowText = Options.GetBoolean ("ShowText"); while (aShapeIterator.hasNext()) { - CanvasShape aCanvasShape = + CanvasShape aCanvasShape = (CanvasShape)aShapeIterator.next(); try { @@ -158,13 +158,13 @@ public class Canvas } catch (Exception aException) { - System.err.println ("caught exception while painting a shape:" + System.err.println ("caught exception while painting a shape:" + aException); aException.printStackTrace (System.err); } } } - + // Paint highlighted frame around active object as the last thing. if (maActiveObject != null) maActiveObject.paint_highlight (g2); @@ -216,11 +216,11 @@ public class Canvas // Calculate the scales that would map the screen onto the // widget in both of the coordinate axes and select the // smaller - // of the two: it maps the screen onto the widget in both + // of the two: it maps the screen onto the widget in both // axes at the same time. - double nHScale = (aWidgetSize.getWidth() - 10) + double nHScale = (aWidgetSize.getWidth() - 10) / aScreenSize.getWidth(); - double nVScale = (aWidgetSize.getHeight() - 10) + double nVScale = (aWidgetSize.getHeight() - 10) / aScreenSize.getHeight(); if (nHScale < nVScale) mnScale = nHScale; @@ -234,15 +234,15 @@ public class Canvas // Calculate offsets that center the scaled screen inside // the widget. - mnHOffset = (aWidgetSize.getWidth() + mnHOffset = (aWidgetSize.getWidth() - mnScale*aScreenSize.getWidth()) / 2.0; - mnVOffset = (aWidgetSize.getHeight() + mnVOffset = (aWidgetSize.getHeight() - mnScale*aScreenSize.getHeight()) / 2.0; if (mnHOffset < 0) mnHOffset = 0; if (mnVOffset < 0) mnVOffset = 0; - + setPreferredSize (new Dimension ( (int)(2*mnHOffset + mnScale * aScreenSize.getWidth()), (int)(2*mnVOffset + mnScale * aScreenSize.getHeight()))); @@ -259,8 +259,8 @@ public class Canvas } maLastWidgetSize = aWidgetSize; } - - + + protected boolean HighlightObject (CanvasShape aNewActiveObject) { @@ -268,7 +268,7 @@ public class Canvas { if (maActiveObject != null) maActiveObject.Highlight (false); - + maActiveObject = aNewActiveObject; if (maActiveObject != null) { @@ -292,7 +292,7 @@ public class Canvas - + /** Called when the selection of the tree changes. Highlight the corresponding graphical representation of the object. */ @@ -305,7 +305,7 @@ public class Canvas - private int + private int mnXAnchor, mnYAnchor, maResizeFlag; diff --git a/accessibility/workben/org/openoffice/accessibility/awb/canvas/CanvasShape.java b/accessibility/workben/org/openoffice/accessibility/awb/canvas/CanvasShape.java index f2595351a4f5..14059046625c 100644 --- a/accessibility/workben/org/openoffice/accessibility/awb/canvas/CanvasShape.java +++ b/accessibility/workben/org/openoffice/accessibility/awb/canvas/CanvasShape.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -48,7 +48,7 @@ class CanvasShape implements XAccessibleEventListener public final Color maHighlightColor = Color.red; public final Color maSelectionColor = Color.green; public final Color maFocusColor = Color.blue; - + public CanvasShape (javax.swing.tree.TreeNode aNode, Canvas aCanvas) { maNode = aNode; @@ -74,7 +74,7 @@ class CanvasShape implements XAccessibleEventListener public javax.swing.tree.TreePath getNodePath (javax.swing.tree.TreeNode node) { javax.swing.tree.TreeNode parent = node.getParent(); - return (parent != null) ? + return (parent != null) ? getNodePath(parent).pathByAddingChild(node) : new javax.swing.tree.TreePath(node); } @@ -86,7 +86,7 @@ class CanvasShape implements XAccessibleEventListener - /** Update the data obtained from the <type>AccessibilityNode</type> + /** Update the data obtained from the <type>AccessibilityNode</type> object. */ public void Update () @@ -111,7 +111,7 @@ class CanvasShape implements XAccessibleEventListener mbFocused = xStateSet.contains (AccessibleStateType.FOCUSED); } } - + UpdateGeometry (); if (mxComponent != null) @@ -137,7 +137,7 @@ class CanvasShape implements XAccessibleEventListener { if (mxComponent != null) { - com.sun.star.awt.Point aLocationOnScreen = + com.sun.star.awt.Point aLocationOnScreen = mxComponent.getLocationOnScreen(); com.sun.star.awt.Size aSizeOnScreen = mxComponent.getSize(); maPosition = new Point ( @@ -155,9 +155,9 @@ class CanvasShape implements XAccessibleEventListener according to the specified offset and scale. */ public void paint ( - Graphics2D g, - boolean bShowDescription, - boolean bShowName, + Graphics2D g, + boolean bShowDescription, + boolean bShowName, boolean bShowText) { try{ @@ -185,7 +185,7 @@ class CanvasShape implements XAccessibleEventListener color = new Color (maFgColor.getRed(), maFgColor.getGreen(), maFgColor.getBlue()); g.setColor (color); g.draw (maShape); - + if (mbFocused) { g.setColor (maFocusColor); @@ -240,18 +240,18 @@ class CanvasShape implements XAccessibleEventListener private void paintName (Graphics2D g) { - g.drawString ("Name: " + msName, - (float)maShape.x+5, - (float)maShape.y+15); + g.drawString ("Name: " + msName, + (float)maShape.x+5, + (float)maShape.y+15); } private void paintDescription (Graphics2D g) { - g.drawString ("Description: " + msDescription, - (float)maShape.x+5, - (float)maShape.y+35); + g.drawString ("Description: " + msDescription, + (float)maShape.x+5, + (float)maShape.y+35); } @@ -274,10 +274,10 @@ class CanvasShape implements XAccessibleEventListener { com.sun.star.awt.Rectangle aRect = xText.getCharacterBounds(i); - + double x = maShape.x + aRect.X; double y = maShape.y + aRect.Y + aRect.Height; - + g.drawString (sText.substring(i, i+1), (float)x, (float)y); } } @@ -319,7 +319,7 @@ class CanvasShape implements XAccessibleEventListener { return new Rectangle (maPosition, maSize); } - + public Point getOrigin () { return maPosition; @@ -364,12 +364,12 @@ class CanvasShape implements XAccessibleEventListener break; } } catch (Exception aException) { - System.err.println ("caught exception while updating a shape:" + System.err.println ("caught exception while updating a shape:" + aException); aException.printStackTrace (System.err); } } - + /** Callback for disposing events. */ public void disposing (com.sun.star.lang.EventObject e) @@ -379,8 +379,8 @@ class CanvasShape implements XAccessibleEventListener - - private Canvas + + private Canvas maCanvas; private javax.swing.tree.TreeNode maNode; diff --git a/accessibility/workben/org/openoffice/accessibility/awb/canvas/MouseObserver.java b/accessibility/workben/org/openoffice/accessibility/awb/canvas/MouseObserver.java index 3e7e2807906d..c2468ec38005 100644 --- a/accessibility/workben/org/openoffice/accessibility/awb/canvas/MouseObserver.java +++ b/accessibility/workben/org/openoffice/accessibility/awb/canvas/MouseObserver.java @@ -12,7 +12,7 @@ import javax.swing.tree.TreePath; /** Observe the mouse and highlight shapes of the canvas when clicked. */ public class MouseObserver - implements MouseListener, + implements MouseListener, MouseMotionListener { public MouseObserver (Canvas aCanvas) @@ -66,7 +66,7 @@ public class MouseObserver } - /** Search for the smallest shape that contains the mouse position. + /** Search for the smallest shape that contains the mouse position. */ protected CanvasShape FindCanvasShapeUnderMouse (MouseEvent e) { diff --git a/accessibility/workben/org/openoffice/accessibility/awb/canvas/ShapeContainer.java b/accessibility/workben/org/openoffice/accessibility/awb/canvas/ShapeContainer.java index 03ad4bf38c46..86e92cafed06 100644 --- a/accessibility/workben/org/openoffice/accessibility/awb/canvas/ShapeContainer.java +++ b/accessibility/workben/org/openoffice/accessibility/awb/canvas/ShapeContainer.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -87,18 +87,18 @@ public class ShapeContainer if (aShape == null) { aShape = new CanvasShape (aNode, maCanvas); - + if (aNode instanceof XAccessibleEventBroadcaster) ((XAccessibleEventBroadcaster) aNode).addEventListener(aShape); - + // Update bounding box that includes all objects. if (maShapeList.size() == 0) maBoundingBox = aShape.GetBBox(); else maBoundingBox = maBoundingBox.union (aShape.GetBBox()); - + maShapeList.put (aNode, aShape); - + maCanvas.repaint(); return true; @@ -117,7 +117,7 @@ public class ShapeContainer { if (aNode instanceof XAccessibleEventBroadcaster) ((XAccessibleEventBroadcaster) aNode).removeEventListener(aShape); - + maShapeList.remove (aNode); maCanvas.SelectObject (null); maCanvas.repaint (); diff --git a/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityModel.java b/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityModel.java index 159467778554..fa9afae92995 100644 --- a/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityModel.java +++ b/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityModel.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -48,7 +48,7 @@ import com.sun.star.accessibility.XAccessibleEventListener; public abstract class AccessibilityModel extends javax.swing.tree.DefaultTreeModel { protected java.util.Hashtable nodeList; - protected static DefaultMutableTreeNode disconnectedRootNode = + protected static DefaultMutableTreeNode disconnectedRootNode = new DefaultMutableTreeNode("<not connected>"); /** Creates a new instance of AccessibilityModel */ @@ -57,7 +57,7 @@ public abstract class AccessibilityModel extends javax.swing.tree.DefaultTreeMod nodeList = new java.util.Hashtable(); } - /* Convenience method that creates a new Toolkit node from xToolkit + /* Convenience method that creates a new Toolkit node from xToolkit * and sets as the new root object of the tree. */ public synchronized void setRoot(XExtendedToolkit xToolkit) { @@ -78,7 +78,7 @@ public abstract class AccessibilityModel extends javax.swing.tree.DefaultTreeMod } } } - + /* Appends the new child to parent's child list */ public void addNodeInto(MutableTreeNode newChild, MutableTreeNode parent) { int index = parent.getChildCount(); @@ -87,14 +87,14 @@ public abstract class AccessibilityModel extends javax.swing.tree.DefaultTreeMod } insertNodeInto(newChild, parent, index); } - + /** Adds listener to the listener chain of node */ public static void addEventListener(TreeNode node, XAccessibleEventListener listener) { if (node instanceof AccessibilityNode) { ((AccessibilityNode) node).addEventListener(listener); } } - + /** Removes listener from the listener chain of node */ public static void removeEventListener(TreeNode node, XAccessibleEventListener listener) { if (node instanceof AccessibilityNode) { @@ -102,7 +102,7 @@ public abstract class AccessibilityModel extends javax.swing.tree.DefaultTreeMod } } - protected abstract AccessibilityNode createWindowNode(XAccessible xAccessible, + protected abstract AccessibilityNode createWindowNode(XAccessible xAccessible, XAccessibleContext xAccessibleContext); protected abstract AccessibilityNode createNode(XAccessible xAccessible); @@ -110,7 +110,7 @@ public abstract class AccessibilityModel extends javax.swing.tree.DefaultTreeMod public AccessibilityNode putNode(XAccessible xAccessible, AccessibilityNode node) { if (xAccessible != null) { String oid = UnoRuntime.generateOid(xAccessible); - java.lang.ref.WeakReference ref = (java.lang.ref.WeakReference) + java.lang.ref.WeakReference ref = (java.lang.ref.WeakReference) nodeList.put(oid, new java.lang.ref.WeakReference(node)); if (ref != null) { return (AccessibilityNode) ref.get(); @@ -118,12 +118,12 @@ public abstract class AccessibilityModel extends javax.swing.tree.DefaultTreeMod } return null; } - + /** Returns the AccessibilityNode for xAccessible */ public AccessibilityNode findNode(XAccessible xAccessible) { if (xAccessible != null) { String oid = UnoRuntime.generateOid(xAccessible); - java.lang.ref.WeakReference ref = + java.lang.ref.WeakReference ref = (java.lang.ref.WeakReference) nodeList.get(oid); if (ref != null) { return (AccessibilityNode) ref.get(); @@ -131,12 +131,12 @@ public abstract class AccessibilityModel extends javax.swing.tree.DefaultTreeMod } return null; } - + /** Removes the AccessibilityNode for xAccessible from the internal hashtable */ public AccessibilityNode removeNode(XAccessible xAccessible) { if (xAccessible != null) { String oid = UnoRuntime.generateOid(xAccessible); - java.lang.ref.WeakReference ref = + java.lang.ref.WeakReference ref = (java.lang.ref.WeakReference) nodeList.remove(oid); if (ref != null) { return (AccessibilityNode) ref.get(); @@ -144,7 +144,7 @@ public abstract class AccessibilityModel extends javax.swing.tree.DefaultTreeMod } return null; } - + public AccessibilityNode removeNode(Object o) { if (o instanceof XAccessible) { return removeNode((XAccessible) o); diff --git a/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityNode.java b/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityNode.java index 81a499aabf0d..4ca87d616d5a 100644 --- a/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityNode.java +++ b/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityNode.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -41,12 +41,12 @@ import com.sun.star.accessibility.XAccessibleEventListener; import com.sun.star.uno.UnoRuntime; -class AccessibilityNode extends DefaultMutableTreeNode implements XAccessible, +class AccessibilityNode extends DefaultMutableTreeNode implements XAccessible, XAccessibleEventListener, XAccessibleEventBroadcaster { protected AccessibilityModel treeModel; protected XAccessibleContext unoAccessibleContext; - + private XAccessibleEventListener listener; public AccessibilityNode(AccessibilityModel treeModel) { @@ -63,18 +63,18 @@ class AccessibilityNode extends DefaultMutableTreeNode implements XAccessible, public void setAccessibleContext(XAccessibleContext xAccessibleContext) { unoAccessibleContext = xAccessibleContext; } - + /** Returns the XAccessibleContext object of this node */ public XAccessibleContext getAccessibleContext() { return unoAccessibleContext; } - + /** Attaches or Detaches the itself as listener to unoAccessibleContext */ protected void setAttached(boolean attach) { XAccessibleContext xAccessibleContext = unoAccessibleContext; if (xAccessibleContext != null) { try { - XAccessibleEventBroadcaster xAccessibleEventBroadcaster = + XAccessibleEventBroadcaster xAccessibleEventBroadcaster = UnoRuntime.queryInterface( XAccessibleEventBroadcaster.class, xAccessibleContext ); if (xAccessibleEventBroadcaster != null) { if (attach) { @@ -87,20 +87,20 @@ class AccessibilityNode extends DefaultMutableTreeNode implements XAccessible, // FIXME: error message ! } } - } + } public void disposing(com.sun.star.lang.EventObject eventObject) { XAccessibleEventListener localListener = this.listener; if (localListener != null) { localListener.disposing(eventObject); } - + treeModel.removeNode(userObject); userObject = null; unoAccessibleContext = null; // FIXME: mark the object as being disposed in the tree view ! } - + protected void handleChildRemoved(XAccessible xAccessible) { final AccessibilityNode node = treeModel.findNode(xAccessible); if (node != null) { @@ -121,7 +121,7 @@ class AccessibilityNode extends DefaultMutableTreeNode implements XAccessible, try { XAccessibleContext xAC = node.getAccessibleContext(); if (xAC != null) { - treeModel.insertNodeInto(node, parent, + treeModel.insertNodeInto(node, parent, xAC.getAccessibleIndexInParent()); } } catch (com.sun.star.uno.RuntimeException e) { @@ -131,7 +131,7 @@ class AccessibilityNode extends DefaultMutableTreeNode implements XAccessible, }); } } - + public void notifyEvent(AccessibleEventObject accessibleEventObject) { if (accessibleEventObject.EventId == AccessibleEventId.CHILD) { XAccessible xAccessible = UnoRuntime.queryInterface( XAccessible.class, accessibleEventObject.OldValue ); @@ -144,17 +144,17 @@ class AccessibilityNode extends DefaultMutableTreeNode implements XAccessible, handleChildAdded(xAccessible); } } - + XAccessibleEventListener localListener = this.listener; if (localListener != null) { localListener.notifyEvent(accessibleEventObject); } } - + public synchronized void addEventListener(com.sun.star.accessibility.XAccessibleEventListener xAccessibleEventListener) { listener = AccessibleEventMulticaster.add(listener, xAccessibleEventListener); } - + public synchronized void removeEventListener(com.sun.star.accessibility.XAccessibleEventListener xAccessibleEventListener) { listener = AccessibleEventMulticaster.remove(listener, xAccessibleEventListener); } diff --git a/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityTree.java b/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityTree.java index e485c993706a..59257702c88a 100644 --- a/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityTree.java +++ b/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityTree.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -40,14 +40,14 @@ import com.sun.star.accessibility.XAccessibleContext; * */ public class AccessibilityTree extends javax.swing.JTree { - + /** Creates a new instance of AccessibilityTree */ public AccessibilityTree(javax.swing.tree.TreeModel model) { super(model); // always show handles to indicate expandable / collapsable showsRootHandles = true; } - + public void setToolkit(XExtendedToolkit xToolkit) { AccessibilityModel model = (AccessibilityModel) getModel(); if (model != null) { @@ -58,8 +58,8 @@ public class AccessibilityTree extends javax.swing.JTree { model.reload(); } } - - public String convertValueToText(Object value, boolean selected, + + public String convertValueToText(Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { if (value instanceof DefaultMutableTreeNode) { @@ -82,7 +82,7 @@ public class AccessibilityTree extends javax.swing.JTree { } } } - + return super.convertValueToText(value, selected, expanded, leaf, row, hasFocus); } diff --git a/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityTreeModel.java b/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityTreeModel.java index 6069c8f5f5ee..ad59cf8c9829 100644 --- a/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityTreeModel.java +++ b/accessibility/workben/org/openoffice/accessibility/awb/tree/AccessibilityTreeModel.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -62,7 +62,7 @@ public class AccessibilityTreeModel /** Calls to this method are dispatched to the given node but are - observed for exceptions. + observed for exceptions. */ synchronized public boolean isLeaf (Object aObject) { @@ -89,7 +89,7 @@ public class AccessibilityTreeModel } catch (Exception aException) { - System.err.println ("caught exception in AccessibilityTreeModel.isLeaf():" + System.err.println ("caught exception in AccessibilityTreeModel.isLeaf():" + aException); aException.printStackTrace (System.err); } @@ -116,7 +116,7 @@ public class AccessibilityTreeModel synchronized public Object getChild (Object aParent, final int nIndex) { AccessibilityNode aChild = null; - + final AccessibilityNode aParentNode = (AccessibilityNode)aParent; // Try to get an existing child from the super class object. @@ -173,7 +173,7 @@ public class AccessibilityTreeModel } - + /** Add a new child to the root node. */ diff --git a/accessibility/workben/org/openoffice/accessibility/awb/tree/DynamicAccessibilityModel.java b/accessibility/workben/org/openoffice/accessibility/awb/tree/DynamicAccessibilityModel.java index f2b4c6f0e97f..a0037ba69d69 100644 --- a/accessibility/workben/org/openoffice/accessibility/awb/tree/DynamicAccessibilityModel.java +++ b/accessibility/workben/org/openoffice/accessibility/awb/tree/DynamicAccessibilityModel.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -43,11 +43,11 @@ import com.sun.star.accessibility.XAccessibleContext; public class DynamicAccessibilityModel extends AccessibilityModel implements TreeExpansionListener, TreeWillExpandListener { /* Creates a AccessibilityNode object for a window */ - protected AccessibilityNode createWindowNode(XAccessible xAccessible, + protected AccessibilityNode createWindowNode(XAccessible xAccessible, XAccessibleContext xAccessibleContext) { if (xAccessible != null) { - // Some objects inherit XAccessible, but should not appear in - // the hierarchy as toplevels (like sub-menus), so they don't + // Some objects inherit XAccessible, but should not appear in + // the hierarchy as toplevels (like sub-menus), so they don't // return an accessible context. if (xAccessibleContext != null) { AccessibilityNode node = new AccessibilityNode(this); @@ -59,12 +59,12 @@ public class DynamicAccessibilityModel extends AccessibilityModel implements Tre } return null; } - + /* Creates a DynamicAccessibilityNode object */ protected AccessibilityNode createNode(XAccessible xAccessible) { if (xAccessible != null) { try { - // Some objects inherit XAccessible, but should not appear in + // Some objects inherit XAccessible, but should not appear in // the hierarchy as toplevels (like sub-menus), so they don't // return an accessible context. XAccessibleContext xAccessibleContext = xAccessible.getAccessibleContext(); @@ -80,7 +80,7 @@ public class DynamicAccessibilityModel extends AccessibilityModel implements Tre } return null; } - + public void treeCollapsed(javax.swing.event.TreeExpansionEvent treeExpansionEvent) { TreeNode node = (TreeNode) treeExpansionEvent.getPath().getLastPathComponent(); if (node instanceof DynamicAccessibilityNode) { @@ -88,7 +88,7 @@ public class DynamicAccessibilityModel extends AccessibilityModel implements Tre dynode.clear(); } } - + public void treeExpanded(javax.swing.event.TreeExpansionEvent treeExpansionEvent) { TreeNode node = (TreeNode) treeExpansionEvent.getPath().getLastPathComponent(); if (node instanceof AccessibilityNode) { @@ -99,7 +99,7 @@ public class DynamicAccessibilityModel extends AccessibilityModel implements Tre } } } - + public void treeWillCollapse(javax.swing.event.TreeExpansionEvent treeExpansionEvent) throws javax.swing.tree.ExpandVetoException { TreeNode node = (TreeNode) treeExpansionEvent.getPath().getLastPathComponent(); @@ -111,8 +111,8 @@ public class DynamicAccessibilityModel extends AccessibilityModel implements Tre } } } - - public void treeWillExpand(javax.swing.event.TreeExpansionEvent treeExpansionEvent) + + public void treeWillExpand(javax.swing.event.TreeExpansionEvent treeExpansionEvent) throws javax.swing.tree.ExpandVetoException { TreeNode node = (TreeNode) treeExpansionEvent.getPath().getLastPathComponent(); if (node instanceof DynamicAccessibilityNode) { diff --git a/accessibility/workben/org/openoffice/accessibility/awb/tree/DynamicAccessibilityNode.java b/accessibility/workben/org/openoffice/accessibility/awb/tree/DynamicAccessibilityNode.java index a982ad71c4d5..da6f10c96191 100644 --- a/accessibility/workben/org/openoffice/accessibility/awb/tree/DynamicAccessibilityNode.java +++ b/accessibility/workben/org/openoffice/accessibility/awb/tree/DynamicAccessibilityNode.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -66,14 +66,14 @@ class DynamicAccessibilityNode extends AccessibilityNode { // FIXME: error message } catch (com.sun.star.uno.RuntimeException e) { // FIXME: error message - } + } } - + // Clears the child list. Called by AccessibilityModel.treeCollapsed(). protected void clear() { removeAllChildren(); } - + /* This is called whenever the node is painted, no matter if collapsed * or expanded. Making this a "life" value seems to be appropriate. */ diff --git a/accessibility/workben/org/openoffice/accessibility/awb/tree/ToolkitNode.java b/accessibility/workben/org/openoffice/accessibility/awb/tree/ToolkitNode.java index 8eaa9dab6c02..2599dfc7f0c1 100644 --- a/accessibility/workben/org/openoffice/accessibility/awb/tree/ToolkitNode.java +++ b/accessibility/workben/org/openoffice/accessibility/awb/tree/ToolkitNode.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,19 +42,19 @@ import javax.swing.tree.DefaultMutableTreeNode; /** * */ -public class ToolkitNode extends DefaultMutableTreeNode +public class ToolkitNode extends DefaultMutableTreeNode implements com.sun.star.awt.XTopWindowListener { - + protected XExtendedToolkit xToolkit; - + private AccessibilityModel treeModel; - + /** Creates a new instance of TopWindowListener */ public ToolkitNode(XExtendedToolkit xToolkit, AccessibilityModel treeModel) { super("<connected>"); this.xToolkit = xToolkit; this.treeModel = treeModel; - + // Initially fill the child list try { for (int i=0,j=xToolkit.getTopWindowCount(); i<j; i++) { @@ -70,11 +70,11 @@ public class ToolkitNode extends DefaultMutableTreeNode } } } catch (com.sun.star.lang.IndexOutOfBoundsException e) { - // This should never happen since we properly check the count + // This should never happen since we properly check the count // before - anyway returning what we got so far. } } - + /** Returns an AccessibilityNode if xAccessible has a valid toplevel */ private AccessibilityNode getTopWindowNode(XAccessible xAccessible) { XAccessibleContext xAC = xAccessible.getAccessibleContext(); @@ -103,7 +103,7 @@ public class ToolkitNode extends DefaultMutableTreeNode } } } catch (com.sun.star.lang.IndexOutOfBoundsException e) { - + } } return parent; @@ -111,13 +111,13 @@ public class ToolkitNode extends DefaultMutableTreeNode } return null; } - + /** Returns the XAccessible interface corresponding to the toplevel window */ private AccessibilityNode getTopWindowNode(XTopWindow w) { - XAccessible xAccessible = (XAccessible) + XAccessible xAccessible = (XAccessible) UnoRuntime.queryInterface(XAccessible.class, w); if (xAccessible != null) { - // XTopWindows usually have an accessible parent, which is the + // XTopWindows usually have an accessible parent, which is the // native container window .. XAccessibleContext xAC = xAccessible.getAccessibleContext(); if (xAC != null) { @@ -158,7 +158,7 @@ public class ToolkitNode extends DefaultMutableTreeNode if (node != null && node.getParent() != this) { node = (AccessibilityNode) node.getParent(); } - + if (node != null) { final AccessibilityNode an = node; Runnable removeRun = new Runnable() { @@ -169,7 +169,7 @@ public class ToolkitNode extends DefaultMutableTreeNode // deadlocks, so removing the listeners here. an.setAttached(false); } catch (IllegalArgumentException e) { - // for some toplevel we get more than one event - + // for some toplevel we get more than one event - // ignoring } } diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/ComponentView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/ComponentView.java index d4c0e102b7a9..42c0a5d82783 100644 --- a/accessibility/workben/org/openoffice/accessibility/awb/view/ComponentView.java +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/ComponentView.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -45,7 +45,7 @@ import com.sun.star.uno.UnoRuntime; import org.openoffice.accessibility.misc.NameProvider; /** The <type>ContextView</type> class displays information accessible over - the <type>XAccessibleContext</type> interface. This includes name, + the <type>XAccessibleContext</type> interface. This includes name, description, and role. */ public class ComponentView @@ -77,7 +77,7 @@ public class ComponentView maBackgroundColorLabel = aLayout.AddLabeledEntry ("Background Color: "); } - + public void SetObject (XAccessibleContext xContext) { mxComponent = (XAccessibleComponent)UnoRuntime.queryInterface( @@ -102,7 +102,7 @@ public class ComponentView com.sun.star.awt.Point aLocation = mxComponent.getLocation(); maRelativeLocationLabel.setText ( aLocation.X + ", " + aLocation.Y); - com.sun.star.awt.Point aLocationOnScreen = + com.sun.star.awt.Point aLocationOnScreen = mxComponent.getLocationOnScreen(); maAbsoluteLocationLabel.setText ( aLocationOnScreen.X + ", " + aLocationOnScreen.Y); @@ -111,7 +111,7 @@ public class ComponentView aSize.Width + ", " + aSize.Height); com.sun.star.awt.Rectangle aBBox = mxComponent.getBounds(); maBoundingBoxLabel.setText ( - aBBox.X + ", " + aBBox.Y + "," + aBBox.X + ", " + aBBox.Y + "," + aBBox.Width + ", " + aBBox.Height); int nColor = mxComponent.getForeground(); maForegroundColorLabel.setText ( @@ -135,7 +135,7 @@ public class ComponentView sConsistency += (sConsistency.length()!=0?", ":"") + "Bounding box conflicts with size"; XAccessible xParent = mxContext.getAccessibleParent(); - XAccessibleComponent xParentComponent = + XAccessibleComponent xParentComponent = (XAccessibleComponent)UnoRuntime.queryInterface( XAccessibleComponent.class, xParent); if (xParentComponent == null) @@ -148,9 +148,9 @@ public class ComponentView } else { - com.sun.star.awt.Point aParentLocationOnScreen = + com.sun.star.awt.Point aParentLocationOnScreen = xParentComponent.getLocationOnScreen(); - if (aLocation.X+aParentLocationOnScreen.X + if (aLocation.X+aParentLocationOnScreen.X != aLocationOnScreen.X || aLocation.Y+aParentLocationOnScreen.Y != aLocationOnScreen.Y) diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/ContextView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/ContextView.java index a8588cd18ca6..6989f414233a 100644 --- a/accessibility/workben/org/openoffice/accessibility/awb/view/ContextView.java +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/ContextView.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -43,7 +43,7 @@ import com.sun.star.accessibility.XAccessibleContext; import org.openoffice.accessibility.misc.NameProvider; /** The <type>ContextView</type> class displays information accessible over - the <type>XAccessibleContext</type> interface. This includes name, + the <type>XAccessibleContext</type> interface. This includes name, description, and role. */ public class ContextView diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/EditableTextView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/EditableTextView.java index 2e39f117f62e..ae8b9cd47434 100644 --- a/accessibility/workben/org/openoffice/accessibility/awb/view/EditableTextView.java +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/EditableTextView.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -49,7 +49,7 @@ public class EditableTextView ObjectViewContainer aContainer, XAccessibleContext xContext) { - XAccessibleEditableText xEditableText = + XAccessibleEditableText xEditableText = (XAccessibleEditableText)UnoRuntime.queryInterface( XAccessibleEditableText.class, xContext); if (xEditableText != null) diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/EventMonitorView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/EventMonitorView.java index 67e8091e027f..f3228e36d5fd 100644 --- a/accessibility/workben/org/openoffice/accessibility/awb/view/EventMonitorView.java +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/EventMonitorView.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/FocusView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/FocusView.java index 4dec27958d71..5a68a9294107 100644 --- a/accessibility/workben/org/openoffice/accessibility/awb/view/FocusView.java +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/FocusView.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/LayoutManager.java b/accessibility/workben/org/openoffice/accessibility/awb/view/LayoutManager.java index 728b3dc426d7..0bbe0bd3e444 100644 --- a/accessibility/workben/org/openoffice/accessibility/awb/view/LayoutManager.java +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/LayoutManager.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/ObjectView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/ObjectView.java index 3c1b8e90ff26..ada74f6dba0a 100644 --- a/accessibility/workben/org/openoffice/accessibility/awb/view/ObjectView.java +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/ObjectView.java @@ -80,7 +80,7 @@ abstract public class ObjectView /** Implement this method if you are interested in accessible events. */ - public void notifyEvent (AccessibleEventObject aEvent) + public void notifyEvent (AccessibleEventObject aEvent) {} /// Reference to the current object to display information about. diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/ObjectViewContainer.java b/accessibility/workben/org/openoffice/accessibility/awb/view/ObjectViewContainer.java index 54855cbaf885..bc86cb3eef9e 100644 --- a/accessibility/workben/org/openoffice/accessibility/awb/view/ObjectViewContainer.java +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/ObjectViewContainer.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -126,7 +126,7 @@ public class ObjectViewContainer Class aViewClass = (Class)maViewTemplates.elementAt (i); Method aCreateMethod = aViewClass.getDeclaredMethod ( "Create", new Class[] { - ObjectViewContainer.class, + ObjectViewContainer.class, XAccessibleContext.class}); if (aCreateMethod != null) { @@ -137,13 +137,13 @@ public class ObjectViewContainer } } catch (NoSuchMethodException e) - {System.err.println ("Caught exception while creating view " + {System.err.println ("Caught exception while creating view " + i + " : " + e);} catch (IllegalAccessException e) - {System.err.println ("Caught exception while creating view " + {System.err.println ("Caught exception while creating view " + i + " : " + e);} catch (InvocationTargetException e) - {System.err.println ("Caught exception while creating view " + {System.err.println ("Caught exception while creating view " + i + " : " + e);} } @@ -227,7 +227,7 @@ public class ObjectViewContainer /** Update the layout manager by setting the vertical weight of the bottom entry to 1 and so make it strech to over the available space. - + */ private void UpdateLayoutManager () { @@ -250,10 +250,10 @@ public class ObjectViewContainer */ public void notifyEvent (final AccessibleEventObject aEvent) { - SwingUtilities.invokeLater( - new Runnable() + SwingUtilities.invokeLater( + new Runnable() { - public void run() + public void run() { DispatchEvent (aEvent); } @@ -282,14 +282,14 @@ public class ObjectViewContainer public void disposing (EventObject aEvent) { mxContext = null; - SwingUtilities.invokeLater( + SwingUtilities.invokeLater( new Runnable() { public void run() { SetObject (null); } - } + } ); } diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/ParentView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/ParentView.java index 216bc3a82bfc..828c3fd1a34a 100644 --- a/accessibility/workben/org/openoffice/accessibility/awb/view/ParentView.java +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/ParentView.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -87,13 +87,13 @@ public class ParentView if (xParent != null) { maParentLabel.setText ("yes"); - XAccessibleContext xParentContext = + XAccessibleContext xParentContext = xParent.getAccessibleContext(); if (xParentContext != null) { try { - XAccessible xChild = + XAccessible xChild = xParentContext.getAccessibleChild(nIndex); if (xChild != mxContext) maValidLabel.setText ("yes"); diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/SelectionView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/SelectionView.java index ad5a83467372..4970546fd1ff 100644 --- a/accessibility/workben/org/openoffice/accessibility/awb/view/SelectionView.java +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/SelectionView.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -184,20 +184,20 @@ class SelectionView { XAccessible xChild = mxContext.getAccessibleChild(i); XAccessibleContext xChildContext = xChild.getAccessibleContext(); - + String sName = i + " " + xChildContext.getAccessibleName(); JToggleButton aChild; aChild = new JCheckBox (sName); aChild.setFont (maContainer.GetViewFont()); - XAccessibleStateSet aChildStateSet = + XAccessibleStateSet aChildStateSet = mxContext.getAccessibleStateSet(); - aChild.setSelected (aChildStateSet!=null + aChild.setSelected (aChildStateSet!=null && aChildStateSet.contains(AccessibleStateType.SELECTED)); - + aChild.addActionListener (this); maChildrenSelector.add (aChild); - + } catch (IndexOutOfBoundsException e) { @@ -216,7 +216,7 @@ class SelectionView { mxSelection.clearAccessibleSelection(); } - + /** Call the function associated with the pressed button. diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/ServiceInterfaceView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/ServiceInterfaceView.java index 7c41ff01c97e..a6292d00be71 100644 --- a/accessibility/workben/org/openoffice/accessibility/awb/view/ServiceInterfaceView.java +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/ServiceInterfaceView.java @@ -95,12 +95,12 @@ public class ServiceInterfaceView { maImplementationNameRoot.add ( new DefaultMutableTreeNode ( - (xServiceInfo!=null + (xServiceInfo!=null ? xServiceInfo.getImplementationName() : "<XServiceInfo not supported>"))); } } - + private void CreateServiceTree () { XServiceInfo xServiceInfo = (XServiceInfo)UnoRuntime.queryInterface( diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/StateSetView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/StateSetView.java index 44638b099edc..a8c6b23b33c5 100644 --- a/accessibility/workben/org/openoffice/accessibility/awb/view/StateSetView.java +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/StateSetView.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -59,7 +59,7 @@ public class StateSetView ObjectView aView = null; if (xContext != null) aView = new StateSetView (aContainer); - + return aView; } @@ -112,7 +112,7 @@ public class StateSetView Color aTextColor = g.getColor(); g.setRenderingHint ( - RenderingHints.KEY_ANTIALIASING, + RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); XAccessibleStateSet xStateSet = ( mxContext != null ) ? mxContext.getAccessibleStateSet() : null; diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/TableView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/TableView.java index 07b5d2bb9b78..35f037916482 100644 --- a/accessibility/workben/org/openoffice/accessibility/awb/view/TableView.java +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/TableView.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,7 +42,7 @@ import com.sun.star.uno.UnoRuntime; /** The <type>ContextView</type> class displays information accessible over - the <type>XAccessibleContext</type> interface. This includes name, + the <type>XAccessibleContext</type> interface. This includes name, description, and role. */ public class TableView @@ -72,7 +72,7 @@ public class TableView maSelectedColumnsLabel = aLayout.AddLabeledEntry ("Selected Columns: "); } - + public void SetObject (XAccessibleContext xContext) { mxTable = (XAccessibleTable)UnoRuntime.queryInterface( diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/TextView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/TextView.java index 4a838aa85884..451097b5d6f3 100644 --- a/accessibility/workben/org/openoffice/accessibility/awb/view/TextView.java +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/TextView.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -70,7 +70,7 @@ public class TextView extends ObjectView implements ActionListener { - + /** Create a TextView when the given object supports the XAccessibleText interface. */ @@ -171,8 +171,8 @@ public class TextView Integer.toString(mxText.getCharacterCount())); // Selection. maSelectionLabel.setText ( - "[" + mxText.getSelectionStart() - + "," + mxText.getSelectionEnd() + "[" + mxText.getSelectionStart() + + "," + mxText.getSelectionEnd() + "] \"" + mxText.getSelectedText() + "\""); // Character bounds. @@ -185,7 +185,7 @@ public class TextView XAccessibleMultiLineText xMultiText = (XAccessibleMultiLineText) UnoRuntime.queryInterface( XAccessibleMultiLineText.class, mxText ); - if( null != xMultiText ) { + if( null != xMultiText ) { try { maCaretLineNoLabel.setText ( Integer.toString( xMultiText.getNumberOfLineWithCaret() ) ); TextSegment ts = xMultiText.getTextAtLineWithCaret(); @@ -267,7 +267,7 @@ public class TextView aCharacterArray.append (","); nIndex ++; } - if (nMaxDisplayCount < nCharacterCount) + if (nMaxDisplayCount < nCharacterCount) aCharacterArray.append (", ..."); } catch (IndexOutOfBoundsException e) @@ -280,7 +280,7 @@ public class TextView - /** Iterate over all characters and translate their positions + /** Iterate over all characters and translate their positions back and forth. */ private String GetTextBoundsString () @@ -310,14 +310,14 @@ public class TextView } } catch (IndexOutOfBoundsException aEvent) - { + { // Ignore errors. } return aBuffer.toString(); } - + private final static int BEFORE = -1; @@ -346,7 +346,7 @@ public class TextView DefaultMutableTreeNode aSegmentNode = new DefaultMutableTreeNode ( new StringBuffer ( Integer.toString (nIndex) + " -> " - + Integer.toString (aSegment.SegmentStart) + " - " + + Integer.toString (aSegment.SegmentStart) + " - " + Integer.toString (aSegment.SegmentEnd) + " : " + aSegment.SegmentText.toString())); aNode.add (aSegmentNode); @@ -373,18 +373,18 @@ public class TextView case BEFORE: aSegment = mxText.getTextBeforeIndex (nIndex, nTextType); break; - + case AT: aSegment = mxText.getTextAtIndex (nIndex, nTextType); break; - + case BEHIND: aSegment = mxText.getTextBehindIndex (nIndex, nTextType); break; default: aSegment = new TextSegment(); - aSegment.SegmentText = new String ("unknown position " + nWhere); + aSegment.SegmentText = new String ("unknown position " + nWhere); aSegment.SegmentStart = nIndex; aSegment.SegmentStart = nIndex+1; break; @@ -414,7 +414,7 @@ public class TextView /** Add to the given node one node for every attribute of the given segment. */ private void AddAttributeNodes ( - DefaultMutableTreeNode aNode, + DefaultMutableTreeNode aNode, TextSegment aSegment) { try @@ -433,7 +433,7 @@ public class TextView } private XAccessibleText mxText; - private JLabel + private JLabel maTextLabel, maCharacterArrayLabel, maCharacterCountLabel, diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/ViewGridLayout.java b/accessibility/workben/org/openoffice/accessibility/awb/view/ViewGridLayout.java index bc598dcaf2fa..196ec3ccdc64 100644 --- a/accessibility/workben/org/openoffice/accessibility/awb/view/ViewGridLayout.java +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/ViewGridLayout.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -78,7 +78,7 @@ class ViewGridLayout constraints.fill = GridBagConstraints.NONE; aComponent.setFont (saFont); maComponent.add (aComponent, constraints); - + mnCurrentLine += 1; return aComponent; diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/text/CaretSpinnerModel.java b/accessibility/workben/org/openoffice/accessibility/awb/view/text/CaretSpinnerModel.java index c210b0eff086..c6d7e09ea3cc 100644 --- a/accessibility/workben/org/openoffice/accessibility/awb/view/text/CaretSpinnerModel.java +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/text/CaretSpinnerModel.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,7 +42,7 @@ import com.sun.star.lang.IndexOutOfBoundsException; */ public class CaretSpinnerModel implements SpinnerModel -{ +{ public CaretSpinnerModel (XAccessibleText xText) { mxText = xText; @@ -86,7 +86,7 @@ public class CaretSpinnerModel { if (mxText != null) return new Integer (mxText.getCaretPosition()); - else + else return null; } diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextActionDialog.java b/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextActionDialog.java index f37969d5ee59..257cd34e33be 100644 --- a/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextActionDialog.java +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextActionDialog.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -51,13 +51,13 @@ import com.sun.star.uno.UnoRuntime; /** * Display a dialog with a text field and a pair of cancel/do-it buttons */ -class TextActionDialog +class TextActionDialog extends JDialog implements ActionListener { public TextActionDialog ( XAccessibleContext xContext, - String sExplanation, + String sExplanation, String sTitle) { super();// AccessibilityWorkBench.Instance() ); @@ -96,7 +96,7 @@ class TextActionDialog maText.setText (sText); maText.setRows (sText.length() / 40 + 1); maText.setColumns (Math.min (Math.max (40, sText.length()), 20)); - + JPanel aButtons = new JPanel(); aButtons.setLayout (new FlowLayout()); maIndexToggle = new JCheckBox ("reverse selection"); @@ -133,17 +133,17 @@ class TextActionDialog } - protected int GetSelectionStart() - { - return GetSelection(true); + protected int GetSelectionStart() + { + return GetSelection(true); } - protected int GetSelectionEnd() + protected int GetSelectionEnd() { - return GetSelection(false); + return GetSelection(false); } private int GetSelection (boolean bStart) { - if (bStart ^ maIndexToggle.isSelected()) + if (bStart ^ maIndexToggle.isSelected()) return maText.getSelectionStart(); else return maText.getSelectionEnd(); @@ -157,18 +157,18 @@ class TextActionDialog boolean bSuccess = true; try { - XAccessibleText xText = + XAccessibleText xText = (XAccessibleText)UnoRuntime.queryInterface( XAccessibleText.class, mxContext); if (xText != null) bSuccess = bSuccess && TextAction (xText); - XAccessibleEditableText xEditableText = + XAccessibleEditableText xEditableText = (XAccessibleEditableText)UnoRuntime.queryInterface( XAccessibleEditableText.class, mxContext); if (xEditableText != null) bSuccess = bSuccess && EditableTextAction (xEditableText); - + if ( ! bSuccess) sError = "Can't execute"; } @@ -179,9 +179,9 @@ class TextActionDialog if (sError != null) JOptionPane.showMessageDialog ( - this,// AccessibilityWorkBench.Instance(), - sError, - msTitle, + this,// AccessibilityWorkBench.Instance(), + sError, + msTitle, JOptionPane.ERROR_MESSAGE); Cancel(); @@ -194,7 +194,7 @@ class TextActionDialog return true; } - boolean EditableTextAction (XAccessibleEditableText xText) + boolean EditableTextAction (XAccessibleEditableText xText) throws IndexOutOfBoundsException { return true; diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextAttributeDialog.java b/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextAttributeDialog.java index dad548ca730e..05d8ff480cee 100644 --- a/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextAttributeDialog.java +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextAttributeDialog.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -48,7 +48,7 @@ import com.sun.star.lang.IndexOutOfBoundsException; import com.sun.star.uno.UnoRuntime; -class TextAttributeDialog +class TextAttributeDialog extends TextActionDialog { public TextAttributeDialog (XAccessibleContext xContext) @@ -61,7 +61,7 @@ class TextAttributeDialog protected void Layout () { super.Layout (); - + maForeground = Color.black; maBackground = Color.white; @@ -72,28 +72,28 @@ class TextAttributeDialog maUnderlineCheckBox = new JCheckBox ("underline"); maItalicsCheckBox = new JCheckBox ("italics"); - JButton aForegroundButton = new JButton ("Foreground", + JButton aForegroundButton = new JButton ("Foreground", new TextAttributeDialog.ColorIcon(true)); - aForegroundButton.addActionListener (new ActionListener() + aForegroundButton.addActionListener (new ActionListener() { - public void actionPerformed (ActionEvent aEvent) - { + public void actionPerformed (ActionEvent aEvent) + { maForeground = JColorChooser.showDialog ( - TextAttributeDialog.this, - "Select Foreground Color", + TextAttributeDialog.this, + "Select Foreground Color", maForeground); } } ); - - JButton aBackgroundButton = new JButton("Background", + + JButton aBackgroundButton = new JButton("Background", new TextAttributeDialog.ColorIcon(false)); - aBackgroundButton.addActionListener (new ActionListener() + aBackgroundButton.addActionListener (new ActionListener() { public void actionPerformed (ActionEvent eEvent) - { + { maBackground = JColorChooser.showDialog( - TextAttributeDialog.this, - "Select Background Color", + TextAttributeDialog.this, + "Select Background Color", maBackground); } } ); @@ -131,14 +131,14 @@ class TextAttributeDialog aSequence[5] = new PropertyValue(); aSequence[5].Name = "CharBackTransparent"; aSequence[5].Value = new Boolean (false); - + return xText.setAttributes ( - GetSelectionStart(), + GetSelectionStart(), GetSelectionEnd(), aSequence); } - class ColorIcon + class ColorIcon implements Icon { public ColorIcon(boolean bWhich) { bForeground = bWhich; } @@ -158,21 +158,21 @@ class TextAttributeDialog else return maBackground; } - + private static final int nHeight = 16; private static final int nWidth = 16; private boolean bForeground; } + - - private JCheckBox - maBoldCheckBox, - maUnderlineCheckBox, + private JCheckBox + maBoldCheckBox, + maUnderlineCheckBox, maItalicsCheckBox; - private Color - maForeground, + private Color + maForeground, maBackground; } diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextDialogFactory.java b/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextDialogFactory.java index cdb3f26b5e55..70371324d1bd 100644 --- a/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextDialogFactory.java +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextDialogFactory.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -36,14 +36,14 @@ import com.sun.star.accessibility.XAccessibleText; import com.sun.star.lang.IndexOutOfBoundsException; import com.sun.star.uno.UnoRuntime; - + /** Factory for dialogs of the text views. -*/ +*/ public class TextDialogFactory { static public JDialog CreateSelectionDialog (XAccessibleContext xContext) { - JDialog aDialog = new TextActionDialog( + JDialog aDialog = new TextActionDialog( xContext, "Select range:", "select") @@ -51,8 +51,8 @@ public class TextDialogFactory boolean TextAction (XAccessibleText xText) throws IndexOutOfBoundsException { - return xText.setSelection( - GetSelectionStart(), + return xText.setSelection( + GetSelectionStart(), GetSelectionEnd() ); } }; @@ -71,8 +71,8 @@ public class TextDialogFactory boolean TextAction (XAccessibleText xText) throws IndexOutOfBoundsException { - return xText.copyText( - GetSelectionStart(), + return xText.copyText( + GetSelectionStart(), GetSelectionEnd()); } }; @@ -90,8 +90,8 @@ public class TextDialogFactory boolean EditableTextAction (XAccessibleEditableText xText) throws IndexOutOfBoundsException { - return xText.cutText( - GetSelectionStart(), + return xText.cutText( + GetSelectionStart(), GetSelectionEnd() ); } }; @@ -120,7 +120,7 @@ public class TextDialogFactory { JDialog aDialog = new TextEditDialog ( xContext, - "Edit text:", + "Edit text:", "edit"); if (aDialog != null) aDialog.show(); diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextEditDialog.java b/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextEditDialog.java index a8710cbad7cc..9d5aec4649f5 100644 --- a/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextEditDialog.java +++ b/accessibility/workben/org/openoffice/accessibility/awb/view/text/TextEditDialog.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -35,12 +35,12 @@ import com.sun.star.lang.IndexOutOfBoundsException; import com.sun.star.uno.UnoRuntime; -class TextEditDialog +class TextEditDialog extends TextActionDialog { public TextEditDialog ( XAccessibleContext xContext, - String sExplanation, + String sExplanation, String sTitle ) { super (xContext, sExplanation, sTitle); @@ -83,7 +83,7 @@ class TextEditDialog nFront++; int nBack = 0; while ((nBack < nMinLength) && - (sNew.charAt(sNew.length()-nBack-1) == + (sNew.charAt(sNew.length()-nBack-1) == sOld.charAt(sOld.length()-nBack-1) )) nBack++; if (nFront + nBack > nMinLength) @@ -94,7 +94,7 @@ class TextEditDialog String sDel = sOld.substring (nFront, sOld.length() - nBack); String sIns = sNew.substring (nFront, sNew.length() - nBack); - System.out.println ("edit text: " + + System.out.println ("edit text: " + sOld.substring(0, nFront) + " [ " + sDel + " -> " + sIns + " ] " + sOld.substring(sOld.length() - nBack)); diff --git a/accessibility/workben/org/openoffice/accessibility/misc/AccessibleEventMulticaster.java b/accessibility/workben/org/openoffice/accessibility/misc/AccessibleEventMulticaster.java index 0f56117e1fdf..74780b9710f6 100644 --- a/accessibility/workben/org/openoffice/accessibility/misc/AccessibleEventMulticaster.java +++ b/accessibility/workben/org/openoffice/accessibility/misc/AccessibleEventMulticaster.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,17 +37,17 @@ import com.sun.star.accessibility.XAccessibleEventListener; * */ public class AccessibleEventMulticaster implements XAccessibleEventListener { - + private final XAccessibleEventListener a; private final XAccessibleEventListener b; - + /** Creates a new instance of AccessibleEventMulticaster */ - protected AccessibleEventMulticaster(XAccessibleEventListener a, + protected AccessibleEventMulticaster(XAccessibleEventListener a, XAccessibleEventListener b) { this.a = a; this.b = b; } - + protected XAccessibleEventListener remove(XAccessibleEventListener l) { if (l == a) return b; @@ -60,25 +60,25 @@ public class AccessibleEventMulticaster implements XAccessibleEventListener { } return add(a2, b2); } - + public void notifyEvent(AccessibleEventObject accessibleEventObject) { a.notifyEvent(accessibleEventObject); b.notifyEvent(accessibleEventObject); } - + public void disposing(EventObject eventObject) { a.disposing(eventObject); b.disposing(eventObject); } - + public static XAccessibleEventListener add(XAccessibleEventListener a, XAccessibleEventListener b) { if (a == null) return b; - if (b == null) + if (b == null) return a; return new AccessibleEventMulticaster(a,b); } - + public static XAccessibleEventListener remove(XAccessibleEventListener l, XAccessibleEventListener oldl) { if (l == oldl || l == null) { return null; @@ -88,5 +88,5 @@ public class AccessibleEventMulticaster implements XAccessibleEventListener { return l; } } - + } diff --git a/accessibility/workben/org/openoffice/accessibility/misc/InformationWriter.java b/accessibility/workben/org/openoffice/accessibility/misc/InformationWriter.java index fbd1455cd295..f6cf042d93f9 100644 --- a/accessibility/workben/org/openoffice/accessibility/misc/InformationWriter.java +++ b/accessibility/workben/org/openoffice/accessibility/misc/InformationWriter.java @@ -76,7 +76,7 @@ public class InformationWriter { XPropertySet xPropertySet = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, xObject); - maOut.println (prefix + + maOut.println (prefix + xPropertySet.getPropertyValue (name)); } catch (Exception e) @@ -86,7 +86,7 @@ public class InformationWriter } } - + public void showShapes (XDrawPage xPage) { @@ -94,24 +94,24 @@ public class InformationWriter { XIndexAccess xShapeList = (XIndexAccess) UnoRuntime.queryInterface( XIndexAccess.class, xPage); - - maOut.println ("There are " + xShapeList.getCount() + + maOut.println ("There are " + xShapeList.getCount() + " shapes"); for (int i=0; i<xShapeList.getCount(); i++) { XShape xShape = (XShape) UnoRuntime.queryInterface( XShape.class, xShapeList.getByIndex (i)); - - XShapeDescriptor xShapeDescriptor = + + XShapeDescriptor xShapeDescriptor = (XShapeDescriptor) UnoRuntime.queryInterface( XShapeDescriptor.class, xShape); String sName = xShapeDescriptor.getShapeType (); maOut.println (" shape " + i + " : " + sName); - - XPropertySet xPropertySet = + + XPropertySet xPropertySet = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, xShape); - Integer nZOrder = + Integer nZOrder = (Integer) xPropertySet.getPropertyValue ("ZOrder"); maOut.println (" zorder = " + nZOrder); } @@ -121,11 +121,11 @@ public class InformationWriter maOut.println ("caught exception in showShapes: " + e); } } + - - /** @descr Print all available services of the given object to the + /** @descr Print all available services of the given object to the standard output. */ public void showServices (XInterface xObject) @@ -142,7 +142,7 @@ public class InformationWriter else { String[] sServiceNames = xMSF.getAvailableServiceNames (); - maOut.println (" object can create " + maOut.println (" object can create " + sServiceNames.length + " services"); for (int i=0; i<sServiceNames.length; i++) maOut.println (" service " + i + " : " + sServiceNames[i]); @@ -153,7 +153,7 @@ public class InformationWriter maOut.println ("caught exception in showServices : " + e); } } - + /** @descr Print the service and implementation name of the given object. */ @@ -171,7 +171,7 @@ public class InformationWriter { maOut.println (" Service name : " + xSN.getServiceName ()); } - + // Use interface XServiceInfo to retrieve information about // supported services. XServiceInfo xSI = (XServiceInfo) UnoRuntime.queryInterface ( @@ -180,8 +180,8 @@ public class InformationWriter maOut.println (" interface XServiceInfo not supported"); else { - maOut.println (" Implementation name : " - + xSI.getImplementationName ()); + maOut.println (" Implementation name : " + + xSI.getImplementationName ()); } } catch (Exception e) @@ -189,10 +189,10 @@ public class InformationWriter maOut.println ("caught exception in showInfo : " + e); } } - - - - + + + + /** @descr Print information about supported interfaces. */ public void showInterfaces (XInterface xObject) @@ -209,10 +209,10 @@ public class InformationWriter else { Type[] aTypeList = xTP.getTypes (); - maOut.println (" object supports " + aTypeList.length + maOut.println (" object supports " + aTypeList.length + " interfaces"); for (int i=0; i<aTypeList.length; i++) - maOut.println (" " + i + " : " + maOut.println (" " + i + " : " + aTypeList[i].getTypeName()); } } @@ -221,8 +221,8 @@ public class InformationWriter maOut.println ("caught exception in showInterfaces : " + e); } } - - + + /** @descr Print information concerning the accessibility of the given object. */ @@ -237,46 +237,46 @@ public class InformationWriter // Get XAccessibleContext object if given object does not // already support this interface. - XAccessibleContext xContext + XAccessibleContext xContext = (XAccessibleContext) UnoRuntime.queryInterface ( XAccessibleContext.class, xObject); if (xContext == null) { - XAccessible xAccessible + XAccessible xAccessible = (XAccessible) UnoRuntime.queryInterface ( XAccessible.class, xObject); if (xAccessible == null) { - maOut.println (sIndent + "given object " + xObject + maOut.println (sIndent + "given object " + xObject + " is not accessible"); return false; } else xContext = xAccessible.getAccessibleContext(); } - + // Print information about the accessible context. if (xContext != null) { - maOut.println (sIndent + "Name : " + maOut.println (sIndent + "Name : " + xContext.getAccessibleName()); - maOut.println (sIndent + "Description : " + maOut.println (sIndent + "Description : " + xContext.getAccessibleDescription()); - maOut.println (sIndent + "Role : " + maOut.println (sIndent + "Role : " + xContext.getAccessibleRole()); String sHasParent; if (xContext.getAccessibleParent() != null) { maOut.println (sIndent + "Has parent : yes"); - maOut.println (sIndent + "Parent index : " + maOut.println (sIndent + "Parent index : " + xContext.getAccessibleIndexInParent()); } else maOut.println (sIndent + "Has parent : no"); - maOut.println (sIndent + "Child count : " + maOut.println (sIndent + "Child count : " + xContext.getAccessibleChildCount()); maOut.print (sIndent + "Relation set : "); - XAccessibleRelationSet xRelationSet + XAccessibleRelationSet xRelationSet = xContext.getAccessibleRelationSet(); if (xRelationSet != null) { @@ -291,13 +291,13 @@ public class InformationWriter } else maOut.println ("no relation set"); - + maOut.print (sIndent + "State set : "); - XAccessibleStateSet xStateSet = + XAccessibleStateSet xStateSet = xContext.getAccessibleStateSet(); if (xStateSet != null) { - XIndexAccess xStates = + XIndexAccess xStates = (XIndexAccess) UnoRuntime.queryInterface ( XIndexAccess.class, xStateSet); maOut.print (xStates.getCount() + " ("); @@ -316,7 +316,7 @@ public class InformationWriter } else maOut.println ("object has no accessible context."); - + // showInfo (xContext); // showServices (xContext); // showInterfaces (xContext); @@ -327,7 +327,7 @@ public class InformationWriter } return true; } - + @@ -337,20 +337,20 @@ public class InformationWriter { try { - XAccessibleComponent xComponent = + XAccessibleComponent xComponent = (XAccessibleComponent) UnoRuntime.queryInterface ( XAccessibleComponent.class, xObject); - + // Print information about the accessible context. if (xComponent != null) { - maOut.println (sIndent + "Position : " + maOut.println (sIndent + "Position : " + xComponent.getLocation().X+", " + xComponent.getLocation().Y); - maOut.println (sIndent + "Screen position : " + maOut.println (sIndent + "Screen position : " + xComponent.getLocationOnScreen().X+", " + xComponent.getLocationOnScreen().Y); - maOut.println (sIndent + "Size : " + maOut.println (sIndent + "Size : " + xComponent.getSize().Width+", " + xComponent.getSize().Height); } @@ -372,7 +372,7 @@ public class InformationWriter { if ( ! showAccessibility (xRoot, depth)) return false; - + String sIndent = ""; for (int i=0; i<depth; i++) sIndent += " "; diff --git a/accessibility/workben/org/openoffice/accessibility/misc/MessageArea.java b/accessibility/workben/org/openoffice/accessibility/misc/MessageArea.java index d990a517dfc1..1060d91eb422 100644 --- a/accessibility/workben/org/openoffice/accessibility/misc/MessageArea.java +++ b/accessibility/workben/org/openoffice/accessibility/misc/MessageArea.java @@ -11,7 +11,7 @@ import javax.swing.JScrollBar; /** A message area displays text in a scrollable text widget. It is a - singleton. Other objects can access it directly to display messages. + singleton. Other objects can access it directly to display messages. */ public class MessageArea extends JScrollPane diff --git a/accessibility/workben/org/openoffice/accessibility/misc/NameProvider.java b/accessibility/workben/org/openoffice/accessibility/misc/NameProvider.java index 736bc2c7f17b..db8d2b0ab85d 100644 --- a/accessibility/workben/org/openoffice/accessibility/misc/NameProvider.java +++ b/accessibility/workben/org/openoffice/accessibility/misc/NameProvider.java @@ -102,7 +102,7 @@ public class NameProvider maStateMap.put (new Integer (AccessibleStateType.OPAQUE), "OPAQUE"); maStateMap.put (new Integer (AccessibleStateType.PRESSED), "PRESSED"); maStateMap.put (new Integer (AccessibleStateType.RESIZABLE), "RESIZABLE"); - maStateMap.put (new Integer (AccessibleStateType.SELECTABLE), "SELECTABLE"); + maStateMap.put (new Integer (AccessibleStateType.SELECTABLE), "SELECTABLE"); maStateMap.put (new Integer (AccessibleStateType.SELECTED), "SELECTED"); maStateMap.put (new Integer (AccessibleStateType.SENSITIVE), "SENSITIVE"); maStateMap.put (new Integer (AccessibleStateType.SHOWING), "SHOWING"); diff --git a/accessibility/workben/org/openoffice/accessibility/misc/OfficeConnection.java b/accessibility/workben/org/openoffice/accessibility/misc/OfficeConnection.java index d9f77d9e4e07..03e086f1d44c 100644 --- a/accessibility/workben/org/openoffice/accessibility/misc/OfficeConnection.java +++ b/accessibility/workben/org/openoffice/accessibility/misc/OfficeConnection.java @@ -55,7 +55,7 @@ public class OfficeConnection { return maServiceManager; } - + @@ -69,16 +69,16 @@ public class OfficeConnection - - /** Connect to a already running StarOffice application that has - been started with a command line argument like + + /** Connect to a already running StarOffice application that has + been started with a command line argument like "-accept=pipe,name=<username>;urp;" */ private boolean Connect () { mbInitialized = true; // Set up connection string. - String sConnectString = "uno:pipe,name=" + msPipeName + String sConnectString = "uno:pipe,name=" + msPipeName + ";urp;StarOffice.ServiceManager"; // connect to a running office and get the ServiceManager @@ -87,14 +87,14 @@ public class OfficeConnection // Create a URL Resolver. XMultiServiceFactory aLocalServiceManager = Bootstrap.createSimpleServiceManager(); - XUnoUrlResolver aURLResolver = + XUnoUrlResolver aURLResolver = (XUnoUrlResolver) UnoRuntime.queryInterface ( XUnoUrlResolver.class, aLocalServiceManager.createInstance ( "com.sun.star.bridge.UnoUrlResolver") ); - - maServiceManager = + + maServiceManager = (XMultiServiceFactory) UnoRuntime.queryInterface ( XMultiServiceFactory.class, aURLResolver.resolve (sConnectString) @@ -105,7 +105,7 @@ public class OfficeConnection { if (maOut != null) { - maOut.println ("Could not connect with " + maOut.println ("Could not connect with " + sConnectString + " : " + e); maOut.println ("Please start OpenOffice/StarOffice with " + "\"-accept=pipe,name=" + msPipeName + ";urp;\""); @@ -149,19 +149,19 @@ public class OfficeConnection maTimer = new Timer (true); maTimer.schedule (this, 0, snDelay); } - + private static OfficeConnection saInstance = null; private static String ssDefaultPipeName = System.getenv( "USER" ); private XMultiServiceFactory maServiceManager; String msPipeName; - + /** A value of true just indicates that it has been tried to establish a connection, not that that has been successfull. */ private boolean mbInitialized = false; - + /// Stream used to print messages. private PrintStream maOut; private Timer maTimer; diff --git a/accessibility/workben/org/openoffice/accessibility/misc/Options.java b/accessibility/workben/org/openoffice/accessibility/misc/Options.java index e3c358264a1d..a40031156c55 100644 --- a/accessibility/workben/org/openoffice/accessibility/misc/Options.java +++ b/accessibility/workben/org/openoffice/accessibility/misc/Options.java @@ -64,7 +64,7 @@ public class Options } catch (java.io.IOException e) { - // Ignore a non-existing options file. + // Ignore a non-existing options file. } } @@ -87,7 +87,7 @@ public class Options } } } - + private Options () { maFile = null; diff --git a/accessibility/workben/org/openoffice/accessibility/misc/SimpleOffice.java b/accessibility/workben/org/openoffice/accessibility/misc/SimpleOffice.java index 3a2dcdf21926..343ccfc4013c 100644 --- a/accessibility/workben/org/openoffice/accessibility/misc/SimpleOffice.java +++ b/accessibility/workben/org/openoffice/accessibility/misc/SimpleOffice.java @@ -54,7 +54,7 @@ public class SimpleOffice { if (saInstance == null) saInstance = new SimpleOffice (); - + return saInstance; } @@ -62,7 +62,7 @@ public class SimpleOffice { saInstance = null; } - + public XModel LoadDocument (String URL) { @@ -70,7 +70,7 @@ public class SimpleOffice try { // Load the document from the specified URL. - XComponentLoader xLoader = + XComponentLoader xLoader = (XComponentLoader)UnoRuntime.queryInterface( XComponentLoader.class, mxDesktop); @@ -105,7 +105,7 @@ public class SimpleOffice XModel xModel = null; try { - XTasksSupplier xTasksSupplier = + XTasksSupplier xTasksSupplier = (XTasksSupplier) UnoRuntime.queryInterface( XTasksSupplier.class, mxDesktop); XEnumerationAccess xEA = xTasksSupplier.getTasks(); @@ -149,7 +149,7 @@ public class SimpleOffice try { // Get the factory of the connected office. - XMultiServiceFactory xMSF = + XMultiServiceFactory xMSF = OfficeConnection.Instance().GetServiceManager (); if (xMSF == null) { @@ -158,7 +158,7 @@ public class SimpleOffice } else MessageArea.println ("Connected successfully."); - + // Create a new desktop. mxDesktop = (XDesktop) UnoRuntime.queryInterface( XDesktop.class, @@ -185,7 +185,7 @@ public class SimpleOffice try { // Get the factory of the connected office. - XMultiServiceFactory xMSF = + XMultiServiceFactory xMSF = OfficeConnection.Instance().GetServiceManager (); if (xMSF != null) { @@ -261,7 +261,7 @@ public class SimpleOffice - /** @descr Return the current window associated with the given + /** @descr Return the current window associated with the given model. */ public XWindow GetCurrentWindow () @@ -277,8 +277,8 @@ public class SimpleOffice public XWindow GetCurrentWindow (XModel xModel) { XWindow xWindow = null; - try - { + try + { if (xModel == null) MessageArea.println ("invalid model (==null)"); XController xController = xModel.getCurrentController(); @@ -295,7 +295,7 @@ public class SimpleOffice { MessageArea.println ("caught exception while getting current window" + e); } - + return xWindow; } @@ -306,7 +306,7 @@ public class SimpleOffice { return GetCurrentDrawPage ( (XDrawView) UnoRuntime.queryInterface( - XDrawView.class, + XDrawView.class, GetCurrentView())); } @@ -316,8 +316,8 @@ public class SimpleOffice public XDrawPage GetCurrentDrawPage (XDrawView xView) { XDrawPage xPage = null; - try - { + try + { if (xView == null) MessageArea.println ("can't get current draw page from null view"); else @@ -327,7 +327,7 @@ public class SimpleOffice { MessageArea.println ("caught exception while getting current draw page : " + e); } - + return xPage; } @@ -347,8 +347,8 @@ public class SimpleOffice MessageArea.println ("can't get desktop to retrieve current view"); XDrawView xView = null; - try - { + try + { XComponent xComponent = xDesktop.getCurrentComponent(); if (xComponent == null) MessageArea.println ("can't get component to retrieve current view"); @@ -360,7 +360,7 @@ public class SimpleOffice XController xController = xFrame.getController(); if (xController == null) MessageArea.println ("can't get controller to retrieve current view"); - + xView = (XDrawView) UnoRuntime.queryInterface( XDrawView.class, xController); if (xView == null) @@ -370,7 +370,7 @@ public class SimpleOffice { MessageArea.println ("caught exception while getting current view : " + e); } - + return xView; } |