coverity#706523 Uncaught exception

Change-Id: I20515693bed76163433421f7fd05b319ed472a54
This commit is contained in:
Caolán McNamara 2014-04-05 12:43:01 +01:00
parent a9d6786940
commit f2810ae4a7
3 changed files with 14 additions and 1 deletions

View File

@ -521,7 +521,7 @@ namespace pcr
throw NullPointerException();
::osl::MutexGuard aGuard( m_aMutex );
PropertyId nActuatingPropId( impl_getPropertyId_throw( _rActuatingPropertyName ) );
PropertyId nActuatingPropId( impl_getPropertyId_nothrow( _rActuatingPropertyName ) );
switch ( nActuatingPropId )
{
@ -532,6 +532,9 @@ namespace pcr
_rxInspectorUI->enablePropertyUI( PROPERTY_POSITIONX, eAnchorType != TextContentAnchorType_AS_CHARACTER );
}
break;
case -1:
throw RuntimeException();
break;
default:
OSL_FAIL( "FormGeometryHandler::actuatingPropertyChanged: not registered for this property!" );
break;

View File

@ -320,6 +320,11 @@ namespace pcr
return nPropId;
}
PropertyId PropertyHandler::impl_getPropertyId_nothrow( const OUString& _rPropertyName ) const
{
return m_pInfoService->getPropertyId( _rPropertyName );
}
void PropertyHandler::impl_setContextDocumentModified_nothrow() const
{
Reference< XModifiable > xModifiable( impl_getContextDocument_nothrow(), UNO_QUERY );

View File

@ -146,6 +146,11 @@ namespace pcr
*/
PropertyId impl_getPropertyId_throw( const OUString& _rPropertyName ) const;
/** retrieves the property id for a given property name
@returns -1
if the property name is not known to our ->m_pInfoService
*/
PropertyId impl_getPropertyId_nothrow( const OUString& _rPropertyName ) const;
// helper for implementing doDescribeSupportedProperties
/** adds a description for the given string property to the given property vector