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
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;
......
......@@ -119,7 +119,7 @@ namespace accessibility
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_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 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;
......
......@@ -27,6 +27,7 @@
#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
#include <com/sun/star/lang/IllegalArgumentException.idl>
#include <com/sun/star/beans/PropertyValue.idl>
#include <com/sun/star/beans/UnknownPropertyException.idl>
#include <com/sun/star/accessibility/TextSegment.idl>
module com { module sun { module star { module accessibility {
......@@ -167,7 +168,8 @@ interface XAccessibleText : ::com::sun::star::uno::XInterface
getCharacterAttributes (
[in] long nIndex,
[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.
......
......@@ -444,6 +444,10 @@ public class _XAccessibleEditableText extends MultiMethodTest {
} catch(com.sun.star.lang.IndexOutOfBoundsException e) {
log.println("expected exception => OK");
res &= true;
} catch(com.sun.star.beans.UnknownPropertyException e) {
log.println("unexpected exception => FAILED");
e.printStackTrace(log);
res &= false;
}
try {
......@@ -483,6 +487,10 @@ public class _XAccessibleEditableText extends MultiMethodTest {
log.println("unexpected exception => FAILED");
e.printStackTrace(log);
res &= false;
} catch(com.sun.star.beans.UnknownPropertyException e) {
log.println("unexpected exception => FAILED");
e.printStackTrace(log);
res &= false;
}
tRes.tested("setAttributes()", res);
......@@ -532,4 +540,4 @@ public class _XAccessibleEditableText extends MultiMethodTest {
protected void after() {
oObj.setText(initialText);
}
}
\ No newline at end of file
}
......@@ -292,6 +292,10 @@ public class _XAccessibleText extends MultiMethodTest {
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
log.println("Expected exception");
res &= true;
} catch(com.sun.star.beans.UnknownPropertyException e) {
log.println("unexpected exception => FAILED");
e.printStackTrace(log);
res &= false;
}
try {
......@@ -302,6 +306,10 @@ public class _XAccessibleText extends MultiMethodTest {
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
log.println("Expected exception");
res &= true;
} catch(com.sun.star.beans.UnknownPropertyException e) {
log.println("unexpected exception => FAILED");
e.printStackTrace(log);
res &= false;
}
try {
......@@ -315,6 +323,10 @@ public class _XAccessibleText extends MultiMethodTest {
log.println("Unexpected exception");
e.printStackTrace(log);
res &= false;
} catch(com.sun.star.beans.UnknownPropertyException e) {
log.println("unexpected exception => FAILED");
e.printStackTrace(log);
res &= false;
}
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