summaryrefslogtreecommitdiff
path: root/extensions/source/propctrlr/propertyhandler.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-06-13 13:19:14 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-06-13 13:38:26 +0100
commita7e184e81e4fa8ee201fd17acebe937144cfa533 (patch)
tree892372dc622e0469f8ebdabe6691dbd850f7c915 /extensions/source/propctrlr/propertyhandler.cxx
parent120a04d678dfa01d1a8414f8d4b75e0843f43e1e (diff)
coverity#706514 Uncaught exception
also coverity#706515 coverity#706516 coverity#706517 coverity#706528 coverity#706529 Change-Id: I5beb753d5cc8ed976b3c11319cc36415adebd1e6
Diffstat (limited to 'extensions/source/propctrlr/propertyhandler.cxx')
-rw-r--r--extensions/source/propctrlr/propertyhandler.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/extensions/source/propctrlr/propertyhandler.cxx b/extensions/source/propctrlr/propertyhandler.cxx
index 2a2093710b0c..8bc0651126a9 100644
--- a/extensions/source/propctrlr/propertyhandler.cxx
+++ b/extensions/source/propctrlr/propertyhandler.cxx
@@ -185,7 +185,7 @@ namespace pcr
throw NullPointerException();
::osl::MutexGuard aGuard( m_aMutex );
- PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) );
+ PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
const Property& rProperty( impl_getPropertyFromId_throw( nPropId ) );
LineDescriptor aDescriptor;
@@ -312,7 +312,7 @@ namespace pcr
return PropertyHandlerHelper::getDialogParentWindow( m_xContext );
}
- PropertyId PropertyHandler::impl_getPropertyId_throw( const OUString& _rPropertyName ) const
+ PropertyId PropertyHandler::impl_getPropertyId_throwUnknownProperty( const OUString& _rPropertyName ) const
{
PropertyId nPropId = m_pInfoService->getPropertyId( _rPropertyName );
if ( nPropId == -1 )
@@ -320,6 +320,14 @@ namespace pcr
return nPropId;
}
+ PropertyId PropertyHandler::impl_getPropertyId_throwRuntime( const OUString& _rPropertyName ) const
+ {
+ PropertyId nPropId = m_pInfoService->getPropertyId( _rPropertyName );
+ if ( nPropId == -1 )
+ throw RuntimeException();
+ return nPropId;
+ }
+
PropertyId PropertyHandler::impl_getPropertyId_nothrow( const OUString& _rPropertyName ) const
{
return m_pInfoService->getPropertyId( _rPropertyName );