summaryrefslogtreecommitdiff
path: root/svx/source/accessibility/AccessibleShape.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-12-15 22:46:08 +0100
committerMichael Stahl <mstahl@redhat.com>2016-12-16 10:20:50 +0100
commit5a3b2111172f106378cbf78aba0fde1db3642275 (patch)
tree3e374fa848381ecb57a59c6a4fc6f2df3bf90547 /svx/source/accessibility/AccessibleShape.cxx
parent657bca91b115b380af16c13e5ca5d6a0f0f4a562 (diff)
tdf#104488 editeng,svx: throw less Accessible exceptions
For some of these functions it doesn't make sense to throw DisposedException as they can return a sensible default value. Particularly AccessibleShape::getAccessibleChildCount() was throwing an exception that was never caught. Change-Id: I000149cf9bb0fd13f69650ad8224a8daf26f7bee
Diffstat (limited to 'svx/source/accessibility/AccessibleShape.cxx')
-rw-r--r--svx/source/accessibility/AccessibleShape.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx
index 2313dbe6c1de..b7a23a85aaad 100644
--- a/svx/source/accessibility/AccessibleShape.cxx
+++ b/svx/source/accessibility/AccessibleShape.cxx
@@ -326,7 +326,11 @@ sal_Int32 SAL_CALL
AccessibleShape::getAccessibleChildCount ()
throw (css::uno::RuntimeException, std::exception)
{
- ThrowIfDisposed ();
+ if (IsDisposed())
+ {
+ return 0;
+ }
+
sal_Int32 nChildCount = 0;
// Add the number of shapes that are children of this shape.