[Libreoffice-commits] core.git: 3 commits - connectivity/source extensions/source include/svx svx/source
Caolán McNamara
caolanm at redhat.com
Fri Jun 13 05:38:53 PDT 2014
connectivity/source/drivers/dbase/DTable.cxx | 2 -
extensions/source/propctrlr/buttonnavigationhandler.cxx | 12 ++++----
extensions/source/propctrlr/cellbindinghandler.cxx | 12 ++++----
extensions/source/propctrlr/editpropertyhandler.cxx | 6 ++--
extensions/source/propctrlr/eformspropertyhandler.cxx | 16 +++++------
extensions/source/propctrlr/formcomponenthandler.cxx | 10 +++---
extensions/source/propctrlr/formgeometryhandler.cxx | 6 ++--
extensions/source/propctrlr/propertyhandler.cxx | 12 ++++++--
extensions/source/propctrlr/propertyhandler.hxx | 9 +++++-
extensions/source/propctrlr/submissionhandler.cxx | 14 ++++-----
extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx | 16 +++++------
include/svx/unopool.hxx | 4 +-
svx/source/unodraw/unopool.cxx | 4 +-
13 files changed, 69 insertions(+), 54 deletions(-)
New commits:
commit 1beabeb55c3c1898788a724d798ceb380cf96ca1
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jun 13 13:27:23 2014 +0100
coverity#706304 Uncaught exception
also
coverity#706301
Change-Id: Ie6eba530c9a2f822226fbd1b1a6aa49deaf99659
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 937a3a1..7294970 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -1071,11 +1071,11 @@ bool ODbaseTable::CreateImpl()
{
OUString aExt = aURL.getExtension();
aURL.setExtension("dbt"); // extension for memo file
- Content aMemo1Content(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
bool bMemoAlreadyExists = false;
try
{
+ Content aMemo1Content(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
bMemoAlreadyExists = aMemo1Content.isDocument();
}
catch(const Exception&) // an exception is thrown when no file exists
commit a7e184e81e4fa8ee201fd17acebe937144cfa533
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jun 13 13:19:14 2014 +0100
coverity#706514 Uncaught exception
also
coverity#706515
coverity#706516
coverity#706517
coverity#706528
coverity#706529
Change-Id: I5beb753d5cc8ed976b3c11319cc36415adebd1e6
diff --git a/extensions/source/propctrlr/buttonnavigationhandler.cxx b/extensions/source/propctrlr/buttonnavigationhandler.cxx
index 46b72ff..d78194e 100644
--- a/extensions/source/propctrlr/buttonnavigationhandler.cxx
+++ b/extensions/source/propctrlr/buttonnavigationhandler.cxx
@@ -85,7 +85,7 @@ namespace pcr
PropertyState SAL_CALL ButtonNavigationHandler::getPropertyState( const OUString& _rPropertyName ) throw (UnknownPropertyException, RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
- PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) );
+ PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
PropertyState eState = PropertyState_DIRECT_VALUE;
switch ( nPropId )
{
@@ -114,7 +114,7 @@ namespace pcr
Any SAL_CALL ButtonNavigationHandler::getPropertyValue( const OUString& _rPropertyName ) throw (UnknownPropertyException, RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
- PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) );
+ PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
Any aReturn;
switch ( nPropId )
@@ -145,7 +145,7 @@ namespace pcr
void SAL_CALL ButtonNavigationHandler::setPropertyValue( const OUString& _rPropertyName, const Any& _rValue ) throw (UnknownPropertyException, RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
- PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) );
+ PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
switch ( nPropId )
{
case PROPERTY_ID_BUTTONTYPE:
@@ -208,7 +208,7 @@ namespace pcr
InteractiveSelectionResult SAL_CALL ButtonNavigationHandler::onInteractivePropertySelection( const OUString& _rPropertyName, sal_Bool _bPrimary, Any& _rData, const Reference< XObjectInspectorUI >& _rxInspectorUI ) throw (UnknownPropertyException, NullPointerException, RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
- PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) );
+ PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
InteractiveSelectionResult eReturn( InteractiveSelectionResult_Cancelled );
@@ -229,7 +229,7 @@ namespace pcr
void SAL_CALL ButtonNavigationHandler::actuatingPropertyChanged( const OUString& _rActuatingPropertyName, const Any& /*_rNewValue*/, const Any& /*_rOldValue*/, const Reference< XObjectInspectorUI >& _rxInspectorUI, sal_Bool /*_bFirstTimeInit*/ ) throw (NullPointerException, RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
- PropertyId nPropId( impl_getPropertyId_throw( _rActuatingPropertyName ) );
+ PropertyId nPropId( impl_getPropertyId_throwRuntime( _rActuatingPropertyName ) );
switch ( nPropId )
{
case PROPERTY_ID_BUTTONTYPE:
@@ -255,7 +255,7 @@ namespace pcr
LineDescriptor SAL_CALL ButtonNavigationHandler::describePropertyLine( const OUString& _rPropertyName, const Reference< XPropertyControlFactory >& _rxControlFactory ) throw (UnknownPropertyException, NullPointerException, RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
- PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) );
+ PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
LineDescriptor aReturn;
diff --git a/extensions/source/propctrlr/cellbindinghandler.cxx b/extensions/source/propctrlr/cellbindinghandler.cxx
index 5782ff8..6bd77b8 100644
--- a/extensions/source/propctrlr/cellbindinghandler.cxx
+++ b/extensions/source/propctrlr/cellbindinghandler.cxx
@@ -103,9 +103,9 @@ namespace pcr
void SAL_CALL CellBindingPropertyHandler::actuatingPropertyChanged( const OUString& _rActuatingPropertyName, const Any& _rNewValue, const Any& /*_rOldValue*/, const Reference< XObjectInspectorUI >& _rxInspectorUI, sal_Bool _bFirstTimeInit ) throw (NullPointerException, RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
- PropertyId nActuatingPropId( impl_getPropertyId_throw( _rActuatingPropertyName ) );
+ PropertyId nActuatingPropId( impl_getPropertyId_throwRuntime( _rActuatingPropertyName ) );
OSL_PRECOND( m_pHelper.get(), "CellBindingPropertyHandler::actuatingPropertyChanged: inconsistentcy!" );
- // if we survived impl_getPropertyId_throw, we should have a helper, since no helper implies no properties
+ // if we survived impl_getPropertyId_throwRuntime, we should have a helper, since no helper implies no properties
OSL_PRECOND( _rxInspectorUI.is(), "FormComponentPropertyHandler::actuatingPropertyChanged: no access to the UI!" );
if ( !_rxInspectorUI.is() )
@@ -231,10 +231,10 @@ namespace pcr
Any SAL_CALL CellBindingPropertyHandler::getPropertyValue( const OUString& _rPropertyName ) throw (UnknownPropertyException, RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
- PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) );
+ PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
OSL_ENSURE( m_pHelper.get(), "CellBindingPropertyHandler::getPropertyValue: inconsistency!" );
- // if we survived impl_getPropertyId_throw, we should have a helper, since no helper implies no properties
+ // if we survived impl_getPropertyId_throwUnknownProperty, we should have a helper, since no helper implies no properties
Any aReturn;
switch ( nPropId )
@@ -277,10 +277,10 @@ namespace pcr
void SAL_CALL CellBindingPropertyHandler::setPropertyValue( const OUString& _rPropertyName, const Any& _rValue ) throw (UnknownPropertyException, RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
- PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) );
+ PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
OSL_ENSURE( m_pHelper.get(), "CellBindingPropertyHandler::setPropertyValue: inconsistency!" );
- // if we survived impl_getPropertyId_throw, we should have a helper, since no helper implies no properties
+ // if we survived impl_getPropertyId_throwUnknownProperty, we should have a helper, since no helper implies no properties
try
{
diff --git a/extensions/source/propctrlr/editpropertyhandler.cxx b/extensions/source/propctrlr/editpropertyhandler.cxx
index 207c7f1..2f2429a 100644
--- a/extensions/source/propctrlr/editpropertyhandler.cxx
+++ b/extensions/source/propctrlr/editpropertyhandler.cxx
@@ -79,7 +79,7 @@ namespace pcr
Any SAL_CALL EditPropertyHandler::getPropertyValue( const OUString& _rPropertyName ) throw (UnknownPropertyException, RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
- PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) );
+ PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
Any aReturn;
try
@@ -135,7 +135,7 @@ namespace pcr
void SAL_CALL EditPropertyHandler::setPropertyValue( const OUString& _rPropertyName, const Any& _rValue ) throw (UnknownPropertyException, RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
- PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) );
+ PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
try
{
@@ -264,7 +264,7 @@ namespace pcr
throw NullPointerException();
::osl::MutexGuard aGuard( m_aMutex );
- PropertyId nActuatingPropId( impl_getPropertyId_throw( _rActuatingPropertyName ) );
+ PropertyId nActuatingPropId( impl_getPropertyId_throwRuntime( _rActuatingPropertyName ) );
switch ( nActuatingPropId )
{
case PROPERTY_ID_TEXTTYPE:
diff --git a/extensions/source/propctrlr/eformspropertyhandler.cxx b/extensions/source/propctrlr/eformspropertyhandler.cxx
index 97929de..5af990f 100644
--- a/extensions/source/propctrlr/eformspropertyhandler.cxx
+++ b/extensions/source/propctrlr/eformspropertyhandler.cxx
@@ -96,10 +96,10 @@ namespace pcr
Any SAL_CALL EFormsPropertyHandler::getPropertyValue( const OUString& _rPropertyName ) throw (UnknownPropertyException, RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
- PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) );
+ PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
OSL_ENSURE( m_pHelper.get(), "EFormsPropertyHandler::getPropertyValue: we don't have any SupportedProperties!" );
- // if we survived impl_getPropertyId_throw, we should have a helper, since no helper implies no properties
+ // if we survived impl_getPropertyId_throwUnknownProperty, we should have a helper, since no helper implies no properties
Any aReturn;
try
@@ -159,10 +159,10 @@ namespace pcr
void SAL_CALL EFormsPropertyHandler::setPropertyValue( const OUString& _rPropertyName, const Any& _rValue ) throw (UnknownPropertyException, RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
- PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) );
+ PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
OSL_ENSURE( m_pHelper.get(), "EFormsPropertyHandler::setPropertyValue: we don't have any SupportedProperties!" );
- // if we survived impl_getPropertyId_throw, we should have a helper, since no helper implies no properties
+ // if we survived impl_getPropertyId_throwUnknownProperty, we should have a helper, since no helper implies no properties
try
{
@@ -418,7 +418,7 @@ namespace pcr
LineDescriptor aDescriptor;
sal_Int16 nControlType = PropertyControlType::TextField;
::std::vector< OUString > aListEntries;
- PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) );
+ PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
switch ( nPropId )
{
case PROPERTY_ID_LIST_BINDING:
@@ -482,7 +482,7 @@ namespace pcr
if ( !m_pHelper.get() )
return InteractiveSelectionResult_Cancelled;
- PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) );
+ PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
(void)nPropId;
OSL_ENSURE( ( PROPERTY_ID_BINDING_NAME == nPropId )
|| ( PROPERTY_ID_BIND_EXPRESSION == nPropId )
@@ -555,9 +555,9 @@ namespace pcr
throw NullPointerException();
::osl::MutexGuard aGuard( m_aMutex );
- PropertyId nActuatingPropId( impl_getPropertyId_throw( _rActuatingPropertyName ) );
+ PropertyId nActuatingPropId( impl_getPropertyId_throwRuntime( _rActuatingPropertyName ) );
OSL_PRECOND( m_pHelper.get(), "EFormsPropertyHandler::actuatingPropertyChanged: inconsistentcy!" );
- // if we survived impl_getPropertyId_throw, we should have a helper, since no helper implies no properties
+ // if we survived impl_getPropertyId_throwRuntime, we should have a helper, since no helper implies no properties
DBG_ASSERT( _rxInspectorUI.is(), "EFormsPropertyHandler::actuatingPropertyChanged: invalid callback!" );
if ( !_rxInspectorUI.is() )
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index 7f487a6..b0f4283 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -244,7 +244,7 @@ namespace pcr
Any FormComponentPropertyHandler::impl_getPropertyValue_throw( const OUString& _rPropertyName ) const
{
- const PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) );
+ const PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
Any aPropertyValue( m_xComponent->getPropertyValue( _rPropertyName ) );
@@ -322,7 +322,7 @@ namespace pcr
}
::osl::MutexGuard aGuard( m_aMutex );
- PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) ); // check if property is known by the handler
+ PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) ); // check if property is known by the handler
Reference< graphic::XGraphicObject > xGrfObj;
if ( PROPERTY_ID_IMAGE_URL == nPropId && ( _rValue >>= xGrfObj ) )
@@ -492,7 +492,7 @@ namespace pcr
Any SAL_CALL FormComponentPropertyHandler::convertToPropertyValue( const OUString& _rPropertyName, const Any& _rControlValue ) throw (UnknownPropertyException, RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
- PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) );
+ PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
Property aProperty( impl_getPropertyFromId_throw( nPropId ) );
Any aPropertyValue( _rControlValue );
@@ -968,7 +968,7 @@ namespace pcr
throw NullPointerException();
::osl::MutexGuard aGuard( m_aMutex );
- PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) );
+ PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
Property aProperty( impl_getPropertyFromId_throw( nPropId ) );
@@ -1418,7 +1418,7 @@ namespace pcr
throw NullPointerException();
::osl::ClearableMutexGuard aGuard( m_aMutex );
- PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) );
+ PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
InteractiveSelectionResult eResult = InteractiveSelectionResult_Cancelled;
switch ( nPropId )
diff --git a/extensions/source/propctrlr/formgeometryhandler.cxx b/extensions/source/propctrlr/formgeometryhandler.cxx
index bf4650c..f8e8ae7 100644
--- a/extensions/source/propctrlr/formgeometryhandler.cxx
+++ b/extensions/source/propctrlr/formgeometryhandler.cxx
@@ -330,7 +330,7 @@ namespace pcr
Any SAL_CALL FormGeometryHandler::getPropertyValue( const OUString& _rPropertyName ) throw (UnknownPropertyException, RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
- PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) );
+ PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
ENSURE_OR_THROW2( m_xAssociatedShape.is(), "internal error: properties, but no shape!", *this );
ENSURE_OR_THROW2( m_xShapeProperties.is(), "internal error: no shape properties!", *this );
@@ -379,7 +379,7 @@ namespace pcr
void SAL_CALL FormGeometryHandler::setPropertyValue( const OUString& _rPropertyName, const Any& _rValue ) throw (UnknownPropertyException, RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
- PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) );
+ PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
ENSURE_OR_THROW2( m_xAssociatedShape.is(), "internal error: properties, but no shape!", *this );
ENSURE_OR_THROW2( m_xShapeProperties.is(), "internal error: properties, but no shape!", *this );
@@ -447,7 +447,7 @@ namespace pcr
throw (UnknownPropertyException, NullPointerException, RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
- PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) );
+ PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
LineDescriptor aLineDesc( PropertyHandler::describePropertyLine( _rPropertyName, _rxControlFactory ) );
try
diff --git a/extensions/source/propctrlr/propertyhandler.cxx b/extensions/source/propctrlr/propertyhandler.cxx
index 2a209371..8bc0651 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 );
diff --git a/extensions/source/propctrlr/propertyhandler.hxx b/extensions/source/propctrlr/propertyhandler.hxx
index 9cc754d..c086b5d 100644
--- a/extensions/source/propctrlr/propertyhandler.hxx
+++ b/extensions/source/propctrlr/propertyhandler.hxx
@@ -144,7 +144,14 @@ namespace pcr
@throw com::sun::star::beans::UnknownPropertyException
if the property name is not known to our ->m_pInfoService
*/
- PropertyId impl_getPropertyId_throw( const OUString& _rPropertyName ) const;
+ PropertyId impl_getPropertyId_throwUnknownProperty( const OUString& _rPropertyName ) const;
+
+ /** retrieves the property id for a given property name
+ @throw com::sun::star::uno::RuntimeException
+ if the property name is not known to our ->m_pInfoService
+ */
+ PropertyId impl_getPropertyId_throwRuntime( const OUString& _rPropertyName ) const;
+
/** retrieves the property id for a given property name
@returns -1
diff --git a/extensions/source/propctrlr/submissionhandler.cxx b/extensions/source/propctrlr/submissionhandler.cxx
index 6696845..dd7432a 100644
--- a/extensions/source/propctrlr/submissionhandler.cxx
+++ b/extensions/source/propctrlr/submissionhandler.cxx
@@ -121,10 +121,10 @@ namespace pcr
Any SAL_CALL SubmissionPropertyHandler::getPropertyValue( const OUString& _rPropertyName ) throw (UnknownPropertyException, RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
- PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) );
+ PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
OSL_ENSURE( m_pHelper.get(), "SubmissionPropertyHandler::getPropertyValue: inconsistency!" );
- // if we survived impl_getPropertyId_throw, we should have a helper, since no helper implies no properties
+ // if we survived impl_getPropertyId_throwUnknownProperty, we should have a helper, since no helper implies no properties
Any aReturn;
try
@@ -170,10 +170,10 @@ namespace pcr
void SAL_CALL SubmissionPropertyHandler::setPropertyValue( const OUString& _rPropertyName, const Any& _rValue ) throw (UnknownPropertyException, RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
- PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) );
+ PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
OSL_ENSURE( m_pHelper.get(), "SubmissionPropertyHandler::setPropertyValue: inconsistency!" );
- // if we survived impl_getPropertyId_throw, we should have a helper, since no helper implies no properties
+ // if we survived impl_getPropertyId_throwUnknownProperty, we should have a helper, since no helper implies no properties
try
{
@@ -288,7 +288,7 @@ namespace pcr
RuntimeException();
::std::vector< OUString > aListEntries;
- PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) );
+ PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
switch ( nPropId )
{
case PROPERTY_ID_SUBMISSION_ID:
@@ -324,9 +324,9 @@ namespace pcr
throw NullPointerException();
::osl::MutexGuard aGuard( m_aMutex );
- PropertyId nActuatingPropId( impl_getPropertyId_throw( _rActuatingPropertyName ) );
+ PropertyId nActuatingPropId( impl_getPropertyId_throwRuntime( _rActuatingPropertyName ) );
OSL_PRECOND( m_pHelper.get(), "SubmissionPropertyHandler::actuatingPropertyChanged: inconsistentcy!" );
- // if we survived impl_getPropertyId_throw, we should have a helper, since no helper implies no properties
+ // if we survived impl_getPropertyId_throwRuntime, we should have a helper, since no helper implies no properties
switch ( nActuatingPropId )
{
diff --git a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx
index ee3df95..9ac5f57 100644
--- a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx
+++ b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx
@@ -102,10 +102,10 @@ namespace pcr
Any SAL_CALL XSDValidationPropertyHandler::getPropertyValue( const OUString& _rPropertyName ) throw (UnknownPropertyException, RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
- PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) );
+ PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
OSL_ENSURE( m_pHelper.get(), "XSDValidationPropertyHandler::getPropertyValue: inconsistency!" );
- // if we survived impl_getPropertyId_throw, we should have a helper, since no helper implies no properties
+ // if we survived impl_getPropertyId_throwUnknownProperty, we should have a helper, since no helper implies no properties
Any aReturn;
::rtl::Reference< XSDDataType > pType = m_pHelper->getValidatingDataType();
@@ -132,10 +132,10 @@ namespace pcr
void SAL_CALL XSDValidationPropertyHandler::setPropertyValue( const OUString& _rPropertyName, const Any& _rValue ) throw (UnknownPropertyException, RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
- PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) );
+ PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
OSL_ENSURE( m_pHelper.get(), "XSDValidationPropertyHandler::getPropertyValue: inconsistency!" );
- // if we survived impl_getPropertyId_throw, we should have a helper, since no helper implies no properties
+ // if we survived impl_getPropertyId_throwUnknownProperty, we should have a helper, since no helper implies no properties
if ( PROPERTY_ID_XSD_DATA_TYPE == nPropId )
{
@@ -300,7 +300,7 @@ namespace pcr
if ( !m_pHelper.get() )
throw RuntimeException();
- PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) );
+ PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
LineDescriptor aDescriptor;
if ( nPropId != PROPERTY_ID_XSD_DATA_TYPE )
@@ -436,7 +436,7 @@ namespace pcr
if ( !m_pHelper.get() )
return InteractiveSelectionResult_Cancelled;
- PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) );
+ PropertyId nPropId( impl_getPropertyId_throwUnknownProperty( _rPropertyName ) );
switch ( nPropId )
{
@@ -569,10 +569,10 @@ namespace pcr
throw NullPointerException();
::osl::MutexGuard aGuard( m_aMutex );
- PropertyId nActuatingPropId( impl_getPropertyId_throw( _rActuatingPropertyName ) );
+ PropertyId nActuatingPropId( impl_getPropertyId_throwRuntime( _rActuatingPropertyName ) );
if ( !m_pHelper.get() )
throw RuntimeException();
- // if we survived impl_getPropertyId_throw, we should have a helper, since no helper implies no properties
+ // if we survived impl_getPropertyId_throwRuntime, we should have a helper, since no helper implies no properties
switch ( nActuatingPropId )
{
commit 120a04d678dfa01d1a8414f8d4b75e0843f43e1e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jun 13 13:07:52 2014 +0100
coverity#983928 Uncaught exception
Change-Id: Ib3b25a0aab2389be68fc8339f9b08a87de419b33
diff --git a/include/svx/unopool.hxx b/include/svx/unopool.hxx
index 5914559..348f97a 100644
--- a/include/svx/unopool.hxx
+++ b/include/svx/unopool.hxx
@@ -40,10 +40,10 @@ class SVX_DLLPUBLIC SvxUnoDrawPool : public ::cppu::OWeakAggObject,
public comphelper::PropertySetHelper
{
public:
- SvxUnoDrawPool( SdrModel* pModel, sal_Int32 nServiceId ) throw();
+ SvxUnoDrawPool(SdrModel* pModel, sal_Int32 nServiceId);
/** deprecated */
- SvxUnoDrawPool( SdrModel* pModel ) throw();
+ SvxUnoDrawPool(SdrModel* pModel);
virtual ~SvxUnoDrawPool() throw();
/** This returns the item pool from the given model, or the default pool if there is no model and bReadOnly is true.
diff --git a/svx/source/unodraw/unopool.cxx b/svx/source/unodraw/unopool.cxx
index b86da09..9afeabb 100644
--- a/svx/source/unodraw/unopool.cxx
+++ b/svx/source/unodraw/unopool.cxx
@@ -44,14 +44,14 @@ using namespace ::com::sun::star;
using namespace ::rtl;
using namespace ::cppu;
-SvxUnoDrawPool::SvxUnoDrawPool( SdrModel* pModel, sal_Int32 nServiceId ) throw()
+SvxUnoDrawPool::SvxUnoDrawPool(SdrModel* pModel, sal_Int32 nServiceId)
: PropertySetHelper( SvxPropertySetInfoPool::getOrCreate( nServiceId ) ), mpModel( pModel )
{
init();
}
/* deprecated */
-SvxUnoDrawPool::SvxUnoDrawPool( SdrModel* pModel ) throw()
+SvxUnoDrawPool::SvxUnoDrawPool(SdrModel* pModel)
: PropertySetHelper( SvxPropertySetInfoPool::getOrCreate( SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS ) ), mpModel( pModel )
{
init();
More information about the Libreoffice-commits
mailing list