diff options
author | Eike Rathke <erack@redhat.com> | 2016-11-25 19:29:37 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-11-25 20:04:40 +0100 |
commit | 6fee9755f6ec6f61c024af193adfc09eac6fd03e (patch) | |
tree | cf51399e8d4f3ee4f043dc93576d927d60f84caa /svx/source/unodraw | |
parent | 86bf3f8b69692a82fdf0d9d408f0690028e6e3e0 (diff) |
give us a chance to see *which* property failed
Change-Id: If0c89760230eebc873bbc57511e44d7706af1c1e
Diffstat (limited to 'svx/source/unodraw')
-rw-r--r-- | svx/source/unodraw/unopool.cxx | 4 | ||||
-rw-r--r-- | svx/source/unodraw/unoshap2.cxx | 2 | ||||
-rw-r--r-- | svx/source/unodraw/unoshape.cxx | 12 |
3 files changed, 9 insertions, 9 deletions
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<cppu::OWeakObject*>(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<cppu::OWeakObject*>(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<cppu::OWeakObject*>(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<cppu::OWeakObject*>(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<cppu::OWeakObject*>(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<cppu::OWeakObject*>(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<cppu::OWeakObject*>(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<cppu::OWeakObject*>(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<cppu::OWeakObject*>(this)); SfxItemSet aSet( mpModel->GetItemPool(), pMap->nWID, pMap->nWID); aSet.Put(mpModel->GetItemPool().GetDefaultItem(pMap->nWID)); |