summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-12-15 22:46:08 +0100
committerMichael Stahl <mstahl@redhat.com>2016-12-19 19:46:27 +0000
commit0dd9e51abc5705b7ae253d3f9b284136cf1597d6 (patch)
treece748a57a1a5b37ab1ebed2e224f8cc9b9f9ab7c /svx
parent962e70501e4351761a9e521faed9506d865bcc63 (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. (cherry picked from commit 5a3b2111172f106378cbf78aba0fde1db3642275) loplugin:unnecessaryoverride (cherry picked from commit 10bf49c18d56f198e63514953a1c6e2ea17fcc9c) Change-Id: I000149cf9bb0fd13f69650ad8224a8daf26f7bee Reviewed-on: https://gerrit.libreoffice.org/32187 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'svx')
-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 bcbebd314048..3821216cc34b 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.