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

coverity#706523 Uncaught exception

Change-Id: I20515693bed76163433421f7fd05b319ed472a54
üst a9d67869
...@@ -521,7 +521,7 @@ namespace pcr ...@@ -521,7 +521,7 @@ namespace pcr
throw NullPointerException(); throw NullPointerException();
::osl::MutexGuard aGuard( m_aMutex ); ::osl::MutexGuard aGuard( m_aMutex );
PropertyId nActuatingPropId( impl_getPropertyId_throw( _rActuatingPropertyName ) ); PropertyId nActuatingPropId( impl_getPropertyId_nothrow( _rActuatingPropertyName ) );
switch ( nActuatingPropId ) switch ( nActuatingPropId )
{ {
...@@ -532,6 +532,9 @@ namespace pcr ...@@ -532,6 +532,9 @@ namespace pcr
_rxInspectorUI->enablePropertyUI( PROPERTY_POSITIONX, eAnchorType != TextContentAnchorType_AS_CHARACTER ); _rxInspectorUI->enablePropertyUI( PROPERTY_POSITIONX, eAnchorType != TextContentAnchorType_AS_CHARACTER );
} }
break; break;
case -1:
throw RuntimeException();
break;
default: default:
OSL_FAIL( "FormGeometryHandler::actuatingPropertyChanged: not registered for this property!" ); OSL_FAIL( "FormGeometryHandler::actuatingPropertyChanged: not registered for this property!" );
break; break;
......
...@@ -320,6 +320,11 @@ namespace pcr ...@@ -320,6 +320,11 @@ namespace pcr
return nPropId; return nPropId;
} }
PropertyId PropertyHandler::impl_getPropertyId_nothrow( const OUString& _rPropertyName ) const
{
return m_pInfoService->getPropertyId( _rPropertyName );
}
void PropertyHandler::impl_setContextDocumentModified_nothrow() const void PropertyHandler::impl_setContextDocumentModified_nothrow() const
{ {
Reference< XModifiable > xModifiable( impl_getContextDocument_nothrow(), UNO_QUERY ); Reference< XModifiable > xModifiable( impl_getContextDocument_nothrow(), UNO_QUERY );
......
...@@ -146,6 +146,11 @@ namespace pcr ...@@ -146,6 +146,11 @@ namespace pcr
*/ */
PropertyId impl_getPropertyId_throw( const OUString& _rPropertyName ) const; 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 // helper for implementing doDescribeSupportedProperties
/** adds a description for the given string property to the given property vector /** adds a description for the given string property to the given property vector
......
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