From 6fee9755f6ec6f61c024af193adfc09eac6fd03e Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Fri, 25 Nov 2016 19:29:37 +0100 Subject: give us a chance to see *which* property failed Change-Id: If0c89760230eebc873bbc57511e44d7706af1c1e --- svx/source/table/cell.cxx | 8 ++++---- svx/source/table/propertyset.cxx | 2 +- svx/source/table/tablecolumn.cxx | 4 ++-- svx/source/table/tablerow.cxx | 4 ++-- .../textconversiondlgs/chinese_translation_unodialog.cxx | 2 +- svx/source/unodraw/unopool.cxx | 4 ++-- svx/source/unodraw/unoshap2.cxx | 2 +- svx/source/unodraw/unoshape.cxx | 12 ++++++------ 8 files changed, 19 insertions(+), 19 deletions(-) (limited to 'svx') diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx index 5eaa3f99b5b9..9a96ec963083 100644 --- a/svx/source/table/cell.cxx +++ b/svx/source/table/cell.cxx @@ -1123,7 +1123,7 @@ void SAL_CALL Cell::setPropertyValue( const OUString& rPropertyName, const Any& } } } - throw UnknownPropertyException(); + throw UnknownPropertyException( rPropertyName, static_cast(this)); } @@ -1206,7 +1206,7 @@ Any SAL_CALL Cell::getPropertyValue( const OUString& PropertyName ) throw(Unknow } } } - throw UnknownPropertyException(); + throw UnknownPropertyException( PropertyName, static_cast(this)); } @@ -1484,7 +1484,7 @@ void SAL_CALL Cell::setPropertyToDefault( const OUString& PropertyName ) throw(U GetModel()->SetChanged(); return; } - throw UnknownPropertyException(); + throw UnknownPropertyException( PropertyName, static_cast(this)); } @@ -1526,7 +1526,7 @@ Any SAL_CALL Cell::getPropertyDefault( const OUString& aPropertyName ) throw(Unk } } } - throw UnknownPropertyException(); + throw UnknownPropertyException( aPropertyName, static_cast(this)); } diff --git a/svx/source/table/propertyset.cxx b/svx/source/table/propertyset.cxx index 36b2ec78e407..687da1b31937 100644 --- a/svx/source/table/propertyset.cxx +++ b/svx/source/table/propertyset.cxx @@ -56,7 +56,7 @@ const Property& FastPropertySetInfo::getProperty( const OUString& aName ) throw { PropertyMap::iterator aIter( maMap.find( aName ) ); if( aIter == maMap.end() ) - throw UnknownPropertyException(); + throw UnknownPropertyException( aName, static_cast(this)); return maProperties[(*aIter).second]; } diff --git a/svx/source/table/tablecolumn.cxx b/svx/source/table/tablecolumn.cxx index 44536f50499f..6dc825b39159 100644 --- a/svx/source/table/tablecolumn.cxx +++ b/svx/source/table/tablecolumn.cxx @@ -201,7 +201,7 @@ void SAL_CALL TableColumn::setFastPropertyValue( sal_Int32 nHandle, const Any& a } default: delete pUndo; - throw UnknownPropertyException(); + throw UnknownPropertyException( OUString::number(nHandle), static_cast(this)); } if( !bOk ) { @@ -231,7 +231,7 @@ Any SAL_CALL TableColumn::getFastPropertyValue( sal_Int32 nHandle ) throw (Unkno case Property_OptimalWidth: return Any( mbOptimalWidth ); case Property_IsVisible: return Any( mbIsVisible ); case Property_IsStartOfNewPage: return Any( mbIsStartOfNewPage ); - default: throw UnknownPropertyException(); + default: throw UnknownPropertyException( OUString::number(nHandle), static_cast(this)); } } diff --git a/svx/source/table/tablerow.cxx b/svx/source/table/tablerow.cxx index 6984a8047544..8f96b59767ac 100644 --- a/svx/source/table/tablerow.cxx +++ b/svx/source/table/tablerow.cxx @@ -273,7 +273,7 @@ void SAL_CALL TableRow::setFastPropertyValue( sal_Int32 nHandle, const Any& aVal } default: delete pUndo; - throw UnknownPropertyException(); + throw UnknownPropertyException( OUString::number(nHandle), static_cast(this)); } if( !bOk ) { @@ -303,7 +303,7 @@ Any SAL_CALL TableRow::getFastPropertyValue( sal_Int32 nHandle ) throw (UnknownP case Property_OptimalHeight: return Any( mbOptimalHeight ); case Property_IsVisible: return Any( mbIsVisible ); case Property_IsStartOfNewPage: return Any( mbIsStartOfNewPage ); - default: throw UnknownPropertyException(); + default: throw UnknownPropertyException( OUString::number(nHandle), static_cast(this)); } } diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx index 1ec7821a5c92..2023bc6bc438 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx @@ -224,7 +224,7 @@ uno::Any SAL_CALL ChineseTranslation_UnoDialog::getPropertyValue( const OUString } else { - throw beans::UnknownPropertyException(); + throw beans::UnknownPropertyException( rPropertyName, static_cast(this)); } return aRet; diff --git a/svx/source/unodraw/unopool.cxx b/svx/source/unodraw/unopool.cxx index 74bc8e260143..2a56da4fbcca 100644 --- a/svx/source/unodraw/unopool.cxx +++ b/svx/source/unodraw/unopool.cxx @@ -207,7 +207,7 @@ void SvxUnoDrawPool::_setPropertyValues( const comphelper::PropertyMapEntry** pp DBG_ASSERT( pPool, "I need a SfxItemPool!" ); if( nullptr == pPool ) - throw beans::UnknownPropertyException(); + throw beans::UnknownPropertyException( "no pool, no properties..", static_cast(this)); while( *ppEntries ) putAny( pPool, *ppEntries++, *pValues++ ); @@ -222,7 +222,7 @@ void SvxUnoDrawPool::_getPropertyValues( const comphelper::PropertyMapEntry** pp DBG_ASSERT( pPool, "I need a SfxItemPool!" ); if( nullptr == pPool ) - throw beans::UnknownPropertyException(); + throw beans::UnknownPropertyException( "no pool, no properties..", static_cast(this)); while( *ppEntries ) getAny( pPool, *ppEntries++, *pValue++ ); diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index 2086253c0519..00d1b62f4030 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -947,7 +947,7 @@ uno::Any SAL_CALL SvxShapeControl::getPropertyDefault( const OUString& aProperty return aDefault; } - throw beans::UnknownPropertyException(); + throw beans::UnknownPropertyException( aPropertyName, static_cast(this)); } else { diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index a93e1eb3b973..12b93a8e1ac6 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -1630,7 +1630,7 @@ void SAL_CALL SvxShape::_setPropertyValue( const OUString& rPropertyName, const } if (!pMap) - throw beans::UnknownPropertyException(); + throw beans::UnknownPropertyException( rPropertyName, static_cast(this)); if ((pMap->nFlags & beans::PropertyAttribute::READONLY) != 0) throw beans::PropertyVetoException( @@ -1739,7 +1739,7 @@ uno::Any SvxShape::_getPropertyValue( const OUString& PropertyName ) if( mpObj.is() && mpModel ) { if(pMap == nullptr ) - throw beans::UnknownPropertyException(); + throw beans::UnknownPropertyException( PropertyName, static_cast(this)); if( !getPropertyValueImpl( PropertyName, pMap, aAny ) ) { @@ -2016,7 +2016,7 @@ beans::PropertyState SAL_CALL SvxShape::_getPropertyState( const OUString& Prope const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName); if( !mpObj.is() || pMap == nullptr ) - throw beans::UnknownPropertyException(); + throw beans::UnknownPropertyException( PropertyName, static_cast(this)); beans::PropertyState eState; if( !getPropertyStateImpl( pMap, eState ) ) @@ -2993,7 +2993,7 @@ void SAL_CALL SvxShape::_setPropertyToDefault( const OUString& PropertyName ) const SfxItemPropertySimpleEntry* pProperty = mpPropSet->getPropertyMapEntry(PropertyName); if( !mpObj.is() || mpModel == nullptr || pProperty == nullptr ) - throw beans::UnknownPropertyException(); + throw beans::UnknownPropertyException( PropertyName, static_cast(this)); if( !setPropertyToDefaultImpl( pProperty ) ) { @@ -3025,7 +3025,7 @@ uno::Any SAL_CALL SvxShape::_getPropertyDefault( const OUString& aPropertyName ) const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(aPropertyName); if( !mpObj.is() || pMap == nullptr || mpModel == nullptr ) - throw beans::UnknownPropertyException(); + throw beans::UnknownPropertyException( aPropertyName, static_cast(this)); if(( pMap->nWID >= OWN_ATTR_VALUE_START && pMap->nWID <= OWN_ATTR_VALUE_END ) || ( pMap->nWID >= SDRATTR_NOTPERSIST_FIRST && pMap->nWID <= SDRATTR_NOTPERSIST_LAST )) @@ -3035,7 +3035,7 @@ uno::Any SAL_CALL SvxShape::_getPropertyDefault( const OUString& aPropertyName ) // get default from ItemPool if(!SfxItemPool::IsWhich(pMap->nWID)) - throw beans::UnknownPropertyException(); + throw beans::UnknownPropertyException( "No WhichID " + OUString::number(pMap->nWID) + " for " + aPropertyName, static_cast(this)); SfxItemSet aSet( mpModel->GetItemPool(), pMap->nWID, pMap->nWID); aSet.Put(mpModel->GetItemPool().GetDefaultItem(pMap->nWID)); -- cgit