diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-04-05 12:43:01 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-04-05 20:34:33 +0100 |
commit | f2810ae4a738d4129b62c6a323ffbba011e9767c (patch) | |
tree | 518c33002b55a5ba1e1bf754a172d71bd85931b3 /extensions | |
parent | a9d67869402c8dc2ed34ba59fec5a72ea821a4e0 (diff) |
coverity#706523 Uncaught exception
Change-Id: I20515693bed76163433421f7fd05b319ed472a54
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/propctrlr/formgeometryhandler.cxx | 5 | ||||
-rw-r--r-- | extensions/source/propctrlr/propertyhandler.cxx | 5 | ||||
-rw-r--r-- | extensions/source/propctrlr/propertyhandler.hxx | 5 |
3 files changed, 14 insertions, 1 deletions
diff --git a/extensions/source/propctrlr/formgeometryhandler.cxx b/extensions/source/propctrlr/formgeometryhandler.cxx index 91ad0f2c47c7..091c0466b894 100644 --- a/extensions/source/propctrlr/formgeometryhandler.cxx +++ b/extensions/source/propctrlr/formgeometryhandler.cxx @@ -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; diff --git a/extensions/source/propctrlr/propertyhandler.cxx b/extensions/source/propctrlr/propertyhandler.cxx index 5225c91b3279..c655850223f5 100644 --- a/extensions/source/propctrlr/propertyhandler.cxx +++ b/extensions/source/propctrlr/propertyhandler.cxx @@ -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 ); diff --git a/extensions/source/propctrlr/propertyhandler.hxx b/extensions/source/propctrlr/propertyhandler.hxx index ab557008eff5..916f8db6306f 100644 --- a/extensions/source/propctrlr/propertyhandler.hxx +++ b/extensions/source/propctrlr/propertyhandler.hxx @@ -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 |