summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-11-25 19:29:37 +0100
committerEike Rathke <erack@redhat.com>2016-11-25 20:04:40 +0100
commit6fee9755f6ec6f61c024af193adfc09eac6fd03e (patch)
treecf51399e8d4f3ee4f043dc93576d927d60f84caa
parent86bf3f8b69692a82fdf0d9d408f0690028e6e3e0 (diff)
give us a chance to see *which* property failed
Change-Id: If0c89760230eebc873bbc57511e44d7706af1c1e
-rw-r--r--svx/source/table/cell.cxx8
-rw-r--r--svx/source/table/propertyset.cxx2
-rw-r--r--svx/source/table/tablecolumn.cxx4
-rw-r--r--svx/source/table/tablerow.cxx4
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx2
-rw-r--r--svx/source/unodraw/unopool.cxx4
-rw-r--r--svx/source/unodraw/unoshap2.cxx2
-rw-r--r--svx/source/unodraw/unoshape.cxx12
8 files changed, 19 insertions, 19 deletions
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<cppu::OWeakObject*>(this));
}
@@ -1206,7 +1206,7 @@ Any SAL_CALL Cell::getPropertyValue( const OUString& PropertyName ) throw(Unknow
}
}
}
- throw UnknownPropertyException();
+ throw UnknownPropertyException( PropertyName, static_cast<cppu::OWeakObject*>(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<cppu::OWeakObject*>(this));
}
@@ -1526,7 +1526,7 @@ Any SAL_CALL Cell::getPropertyDefault( const OUString& aPropertyName ) throw(Unk
}
}
}
- throw UnknownPropertyException();
+ throw UnknownPropertyException( aPropertyName, static_cast<cppu::OWeakObject*>(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<cppu::OWeakObject*>(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<cppu::OWeakObject*>(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<cppu::OWeakObject*>(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<cppu::OWeakObject*>(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<cppu::OWeakObject*>(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<cppu::OWeakObject*>(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<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));