Kaydet (Commit) d2a3b21a authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1132709 Uncaught exception

Change-Id: If828f82e36d12ceca7e6392de5757a131c99462c
üst 7a3f0921
...@@ -1231,7 +1231,7 @@ namespace accessibility ...@@ -1231,7 +1231,7 @@ namespace accessibility
return OCommonAccessibleText::getCharacter( nIndex ); return OCommonAccessibleText::getCharacter( nIndex );
} }
uno::Sequence< beans::PropertyValue > SAL_CALL AccessibleEditableTextPara::getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< OUString >& rRequestedAttributes ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception) uno::Sequence< beans::PropertyValue > SAL_CALL AccessibleEditableTextPara::getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< OUString >& rRequestedAttributes ) throw (lang::IndexOutOfBoundsException, beans::UnknownPropertyException, uno::RuntimeException, std::exception)
{ {
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
......
...@@ -119,7 +119,7 @@ namespace accessibility ...@@ -119,7 +119,7 @@ namespace accessibility
virtual sal_Int32 SAL_CALL getCaretPosition() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Int32 SAL_CALL getCaretPosition() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< OUString >& aRequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< OUString >& aRequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual ::com::sun::star::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Int32 SAL_CALL getCharacterCount() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Int32 SAL_CALL getCharacterCount() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Int32 SAL_CALL getIndexAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Int32 SAL_CALL getIndexAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <com/sun/star/lang/IndexOutOfBoundsException.idl> #include <com/sun/star/lang/IndexOutOfBoundsException.idl>
#include <com/sun/star/lang/IllegalArgumentException.idl> #include <com/sun/star/lang/IllegalArgumentException.idl>
#include <com/sun/star/beans/PropertyValue.idl> #include <com/sun/star/beans/PropertyValue.idl>
#include <com/sun/star/beans/UnknownPropertyException.idl>
#include <com/sun/star/accessibility/TextSegment.idl> #include <com/sun/star/accessibility/TextSegment.idl>
module com { module sun { module star { module accessibility { module com { module sun { module star { module accessibility {
...@@ -167,7 +168,8 @@ interface XAccessibleText : ::com::sun::star::uno::XInterface ...@@ -167,7 +168,8 @@ interface XAccessibleText : ::com::sun::star::uno::XInterface
getCharacterAttributes ( getCharacterAttributes (
[in] long nIndex, [in] long nIndex,
[in] sequence<string> aRequestedAttributes) [in] sequence<string> aRequestedAttributes)
raises (::com::sun::star::lang::IndexOutOfBoundsException); raises (::com::sun::star::lang::IndexOutOfBoundsException,
::com::sun::star::beans::UnknownPropertyException);
/** Return the bounding box of the specified position. /** Return the bounding box of the specified position.
......
...@@ -444,6 +444,10 @@ public class _XAccessibleEditableText extends MultiMethodTest { ...@@ -444,6 +444,10 @@ public class _XAccessibleEditableText extends MultiMethodTest {
} catch(com.sun.star.lang.IndexOutOfBoundsException e) { } catch(com.sun.star.lang.IndexOutOfBoundsException e) {
log.println("expected exception => OK"); log.println("expected exception => OK");
res &= true; res &= true;
} catch(com.sun.star.beans.UnknownPropertyException e) {
log.println("unexpected exception => FAILED");
e.printStackTrace(log);
res &= false;
} }
try { try {
...@@ -483,6 +487,10 @@ public class _XAccessibleEditableText extends MultiMethodTest { ...@@ -483,6 +487,10 @@ public class _XAccessibleEditableText extends MultiMethodTest {
log.println("unexpected exception => FAILED"); log.println("unexpected exception => FAILED");
e.printStackTrace(log); e.printStackTrace(log);
res &= false; res &= false;
} catch(com.sun.star.beans.UnknownPropertyException e) {
log.println("unexpected exception => FAILED");
e.printStackTrace(log);
res &= false;
} }
tRes.tested("setAttributes()", res); tRes.tested("setAttributes()", res);
......
...@@ -292,6 +292,10 @@ public class _XAccessibleText extends MultiMethodTest { ...@@ -292,6 +292,10 @@ public class _XAccessibleText extends MultiMethodTest {
} catch (com.sun.star.lang.IndexOutOfBoundsException e) { } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
log.println("Expected exception"); log.println("Expected exception");
res &= true; res &= true;
} catch(com.sun.star.beans.UnknownPropertyException e) {
log.println("unexpected exception => FAILED");
e.printStackTrace(log);
res &= false;
} }
try { try {
...@@ -302,6 +306,10 @@ public class _XAccessibleText extends MultiMethodTest { ...@@ -302,6 +306,10 @@ public class _XAccessibleText extends MultiMethodTest {
} catch (com.sun.star.lang.IndexOutOfBoundsException e) { } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
log.println("Expected exception"); log.println("Expected exception");
res &= true; res &= true;
} catch(com.sun.star.beans.UnknownPropertyException e) {
log.println("unexpected exception => FAILED");
e.printStackTrace(log);
res &= false;
} }
try { try {
...@@ -315,6 +323,10 @@ public class _XAccessibleText extends MultiMethodTest { ...@@ -315,6 +323,10 @@ public class _XAccessibleText extends MultiMethodTest {
log.println("Unexpected exception"); log.println("Unexpected exception");
e.printStackTrace(log); e.printStackTrace(log);
res &= false; res &= false;
} catch(com.sun.star.beans.UnknownPropertyException e) {
log.println("unexpected exception => FAILED");
e.printStackTrace(log);
res &= false;
} }
tRes.tested("getCharacterAttributes()", res); tRes.tested("getCharacterAttributes()", res);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment