diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-20 11:02:23 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-20 11:45:28 +0200 |
commit | 34352e7f1b0fe55da4d1d43921674344ae6deafc (patch) | |
tree | fe859a60f336c14c05a23eb70c2d52f12419a8be /toolkit/test/accessibility | |
parent | 4fe377ad6dce2f5dcbbf7a989030b27bedf1077f (diff) |
fix exception not caught
Change-Id: Idf1942d76f3c13e207f2e54494557ee01013c833
Diffstat (limited to 'toolkit/test/accessibility')
-rw-r--r-- | toolkit/test/accessibility/AccessibleTextHandler.java | 49 |
1 files changed, 27 insertions, 22 deletions
diff --git a/toolkit/test/accessibility/AccessibleTextHandler.java b/toolkit/test/accessibility/AccessibleTextHandler.java index acd2f0208005..b8bf1a2217b5 100644 --- a/toolkit/test/accessibility/AccessibleTextHandler.java +++ b/toolkit/test/accessibility/AccessibleTextHandler.java @@ -16,38 +16,39 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -import com.sun.star.accessibility.AccessibleTextType; -import com.sun.star.accessibility.TextSegment; -import com.sun.star.accessibility.XAccessibleContext; -import com.sun.star.accessibility.XAccessibleText; -import com.sun.star.accessibility.XAccessibleEditableText; - -import com.sun.star.awt.Rectangle; -import com.sun.star.awt.Point; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.lang.IndexOutOfBoundsException; -import com.sun.star.beans.PropertyValue; - -import java.awt.Container; -import java.awt.FlowLayout; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; +import java.awt.Container; +import java.awt.FlowLayout; import java.awt.Graphics; -import java.awt.event.ActionListener; import java.awt.event.ActionEvent; -import javax.swing.JDialog; -import javax.swing.JButton; -import javax.swing.JPanel; -import javax.swing.JLabel; +import java.awt.event.ActionListener; + +import javax.swing.BoxLayout; import javax.swing.Icon; -import javax.swing.JTextArea; -import javax.swing.JOptionPane; +import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JColorChooser; -import javax.swing.BoxLayout; +import javax.swing.JDialog; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JTextArea; import javax.swing.text.JTextComponent; +import com.sun.star.accessibility.AccessibleTextType; +import com.sun.star.accessibility.TextSegment; +import com.sun.star.accessibility.XAccessibleContext; +import com.sun.star.accessibility.XAccessibleEditableText; +import com.sun.star.accessibility.XAccessibleText; +import com.sun.star.awt.Point; +import com.sun.star.awt.Rectangle; +import com.sun.star.beans.PropertyValue; +import com.sun.star.beans.UnknownPropertyException; +import com.sun.star.lang.IndexOutOfBoundsException; +import com.sun.star.uno.UnoRuntime; + class AccessibleTextHandler extends NodeHandler { @@ -366,6 +367,10 @@ class AccessibleTextHandler extends NodeHandler aRet = aPortions; } + catch( UnknownPropertyException e ) + { + aRet = new StringNode( "Exception caught:" + e, aParent ); + } catch( IndexOutOfBoundsException e ) { aRet = new StringNode( "Exception caught:" + e, aParent ); |