diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-26 14:52:33 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-26 18:32:25 +0200 |
commit | b56a4eaf5eb856c36d3539dc7d2e6fa94b6551f8 (patch) | |
tree | d37ee64847c6e4eb5f748ef1d180d2651226ec53 /sw/source/uibase | |
parent | e51a2917ab19156f5a5d2b9474a5a46a52e9e527 (diff) |
add property name when throwing css::uno::UnknownPropertyException
Change-Id: I17f06c9415b9d43b6d8896360e07216c2856367a
Reviewed-on: https://gerrit.libreoffice.org/79627
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/uno/SwXDocumentSettings.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/uno/unoatxt.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/uno/unomailmerge.cxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/uno/unomod.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/uno/unotxdoc.cxx | 22 | ||||
-rw-r--r-- | sw/source/uibase/uno/unotxvw.cxx | 4 |
6 files changed, 24 insertions, 24 deletions
diff --git a/sw/source/uibase/uno/SwXDocumentSettings.cxx b/sw/source/uibase/uno/SwXDocumentSettings.cxx index 3844ba0969d4..1d5cc277b1b5 100644 --- a/sw/source/uibase/uno/SwXDocumentSettings.cxx +++ b/sw/source/uibase/uno/SwXDocumentSettings.cxx @@ -926,7 +926,7 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf } break; default: - throw UnknownPropertyException(); + throw UnknownPropertyException(OUString::number(rInfo.mnHandle)); } } @@ -1382,7 +1382,7 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf } break; default: - throw UnknownPropertyException(); + throw UnknownPropertyException(OUString::number(rInfo.mnHandle)); } } diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx index 1e3fe183463b..6151fb1d785c 100644 --- a/sw/source/uibase/uno/unoatxt.cxx +++ b/sw/source/uibase/uno/unoatxt.cxx @@ -586,7 +586,7 @@ void SwXAutoTextGroup::setPropertyValue( const SfxItemPropertySimpleEntry* pEntry = pPropSet->getPropertyMap().getByName( rPropertyName ); if(!pEntry) - throw beans::UnknownPropertyException(); + throw beans::UnknownPropertyException(rPropertyName); std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr); if(!pGlosGroup || pGlosGroup->GetError()) @@ -614,7 +614,7 @@ uno::Any SwXAutoTextGroup::getPropertyValue(const OUString& rPropertyName) const SfxItemPropertySimpleEntry* pEntry = pPropSet->getPropertyMap().getByName( rPropertyName); if(!pEntry) - throw beans::UnknownPropertyException(); + throw beans::UnknownPropertyException(rPropertyName); std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr); if(!pGlosGroup || pGlosGroup->GetError()) throw uno::RuntimeException(); diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx index 8ea1a82934d6..9208c2644ab4 100644 --- a/sw/source/uibase/uno/unomailmerge.cxx +++ b/sw/source/uibase/uno/unomailmerge.cxx @@ -869,7 +869,7 @@ void SAL_CALL SwXMailMerge::setPropertyValue( const SfxItemPropertySimpleEntry* pCur = m_pPropSet->getPropertyMap().getByName( rPropertyName ); if (!pCur) - throw UnknownPropertyException(); + throw UnknownPropertyException(rPropertyName); else if (pCur->nFlags & PropertyAttribute::READONLY) throw PropertyVetoException(); else @@ -1024,7 +1024,7 @@ uno::Any SAL_CALL SwXMailMerge::getPropertyValue( const SfxItemPropertySimpleEntry* pCur = m_pPropSet->getPropertyMap().getByName( rPropertyName ); if (!pCur) - throw UnknownPropertyException(); + throw UnknownPropertyException(rPropertyName); switch (pCur->nWID) { @@ -1075,7 +1075,7 @@ void SAL_CALL SwXMailMerge::addPropertyChangeListener( { const SfxItemPropertySimpleEntry* pCur = m_pPropSet->getPropertyMap().getByName( rPropertyName ); if (!pCur) - throw UnknownPropertyException(); + throw UnknownPropertyException(rPropertyName); m_aPropListeners.addInterface( pCur->nWID, rListener ); } } @@ -1089,7 +1089,7 @@ void SAL_CALL SwXMailMerge::removePropertyChangeListener( { const SfxItemPropertySimpleEntry* pCur = m_pPropSet->getPropertyMap().getByName( rPropertyName ); if (!pCur) - throw UnknownPropertyException(); + throw UnknownPropertyException(rPropertyName); m_aPropListeners.removeInterface( pCur->nWID, rListener ); } } diff --git a/sw/source/uibase/uno/unomod.cxx b/sw/source/uibase/uno/unomod.cxx index 393a7dd26dbf..5df0c5af9d89 100644 --- a/sw/source/uibase/uno/unomod.cxx +++ b/sw/source/uibase/uno/unomod.cxx @@ -392,7 +392,7 @@ void SwXPrintSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, } break; default: - throw UnknownPropertyException(); + throw UnknownPropertyException(OUString::number(rInfo.mnHandle)); } } @@ -487,7 +487,7 @@ void SwXPrintSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, } break; default: - throw UnknownPropertyException(); + throw UnknownPropertyException(OUString::number(rInfo.mnHandle)); } } @@ -750,7 +750,7 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c } break; default: - throw UnknownPropertyException(); + throw UnknownPropertyException(OUString::number(rInfo.mnHandle)); } } diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index dad23f90c389..4ec9e293f74b 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -1840,7 +1840,7 @@ void SwXTextDocument::setPropertyValue(const OUString& rPropertyName, const Any& const SfxItemPropertySimpleEntry* pEntry = pPropSet->getPropertyMap().getByName( rPropertyName); if(!pEntry) - throw UnknownPropertyException(); + throw UnknownPropertyException(rPropertyName); if(pEntry->nFlags & PropertyAttribute::READONLY) throw PropertyVetoException(); switch(pEntry->nWID) @@ -2016,7 +2016,7 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName) const SfxItemPropertySimpleEntry* pEntry = pPropSet->getPropertyMap().getByName( rPropertyName); if(!pEntry) - throw UnknownPropertyException(); + throw UnknownPropertyException(rPropertyName); Any aAny; switch(pEntry->nWID) { @@ -2261,7 +2261,7 @@ PropertyState SAL_CALL SwXTextDocument::getPropertyState( const OUString& rPrope const SfxItemPropertySimpleEntry* pEntry = pPropSet->getPropertyMap().getByName( rPropertyName); if(!pEntry) - throw UnknownPropertyException(); + throw UnknownPropertyException(rPropertyName); return PropertyState_DIRECT_VALUE; } @@ -2284,7 +2284,7 @@ void SAL_CALL SwXTextDocument::setPropertyToDefault( const OUString& rPropertyNa const SfxItemPropertySimpleEntry* pEntry = pPropSet->getPropertyMap().getByName( rPropertyName); if(!pEntry) - throw UnknownPropertyException(); + throw UnknownPropertyException(rPropertyName); switch(pEntry->nWID) { case 0:default:break; @@ -2299,7 +2299,7 @@ Any SAL_CALL SwXTextDocument::getPropertyDefault( const OUString& rPropertyName const SfxItemPropertySimpleEntry* pEntry = pPropSet->getPropertyMap().getByName( rPropertyName); if(!pEntry) - throw UnknownPropertyException(); + throw UnknownPropertyException(rPropertyName); Any aAny; switch(pEntry->nWID) { @@ -4135,9 +4135,9 @@ Reference< XPropertySetInfo > SwXLinkNameAccessWrapper::getPropertySetInfo() } void SwXLinkNameAccessWrapper::setPropertyValue( - const OUString& , const Any& ) + const OUString& rPropName, const Any& ) { - throw UnknownPropertyException(); + throw UnknownPropertyException(rPropName); } static Any lcl_GetDisplayBitmap(const OUString& _sLinkSuffix) @@ -4182,7 +4182,7 @@ Any SwXLinkNameAccessWrapper::getPropertyValue(const OUString& rPropertyName) aRet = lcl_GetDisplayBitmap(sLinkSuffix); } else - throw UnknownPropertyException(); + throw UnknownPropertyException(rPropertyName); return aRet; } @@ -4240,15 +4240,15 @@ Reference< XPropertySetInfo > SwXOutlineTarget::getPropertySetInfo() } void SwXOutlineTarget::setPropertyValue( - const OUString& /*PropertyName*/, const Any& /*aValue*/) + const OUString& rPropertyName, const Any& /*aValue*/) { - throw UnknownPropertyException(); + throw UnknownPropertyException(rPropertyName); } Any SwXOutlineTarget::getPropertyValue(const OUString& rPropertyName) { if(rPropertyName != UNO_LINK_DISPLAY_NAME) - throw UnknownPropertyException(); + throw UnknownPropertyException(rPropertyName); return Any(sOutlineText); } diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx index e2430d14ee86..fcbaee259716 100644 --- a/sw/source/uibase/uno/unotxvw.cxx +++ b/sw/source/uibase/uno/unotxvw.cxx @@ -730,7 +730,7 @@ void SAL_CALL SwXTextView::setPropertyValue( SolarMutexGuard aGuard; const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName ); if (!pEntry) - throw UnknownPropertyException(); + throw UnknownPropertyException(rPropertyName); else if (pEntry->nFlags & PropertyAttribute::READONLY) throw PropertyVetoException(); else @@ -767,7 +767,7 @@ uno::Any SAL_CALL SwXTextView::getPropertyValue( const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName ); if (!pEntry) - throw UnknownPropertyException(); + throw UnknownPropertyException(rPropertyName); sal_Int16 nWID = pEntry->nWID; switch (nWID) |