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 | |
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')
-rw-r--r-- | sw/source/core/unocore/unochart.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/unocore/unorefmk.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/unocore/unosett.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/unocore/unosrch.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/unocore/unostyle.cxx | 8 | ||||
-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 |
11 files changed, 36 insertions, 36 deletions
diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx index 11efa6a692ec..ffb53f9c7f69 100644 --- a/sw/source/core/unocore/unochart.cxx +++ b/sw/source/core/unocore/unochart.cxx @@ -2114,7 +2114,7 @@ void SAL_CALL SwChartDataSequence::setPropertyValue( throw lang::DisposedException(); if (rPropertyName != UNO_NAME_ROLE) - throw beans::UnknownPropertyException(); + throw beans::UnknownPropertyException(rPropertyName); if ( !(rValue >>= m_aRole) ) throw lang::IllegalArgumentException(); @@ -2128,7 +2128,7 @@ uno::Any SAL_CALL SwChartDataSequence::getPropertyValue( throw lang::DisposedException(); if (!(rPropertyName == UNO_NAME_ROLE)) - throw beans::UnknownPropertyException(); + throw beans::UnknownPropertyException(rPropertyName); return uno::Any(m_aRole); } diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx index d69f7ab1ad10..adab40c9d319 100644 --- a/sw/source/core/unocore/unorefmk.cxx +++ b/sw/source/core/unocore/unorefmk.cxx @@ -459,7 +459,7 @@ SwXReferenceMark::getPropertyValue(const OUString& rPropertyName) uno::Any aRet; if (! ::sw::GetDefaultTextContentValue(aRet, rPropertyName)) { - throw beans::UnknownPropertyException(); + throw beans::UnknownPropertyException(rPropertyName); } return aRet; } @@ -1359,7 +1359,7 @@ SwXMetaField::setPropertyValue( } else { - throw beans::UnknownPropertyException(); + throw beans::UnknownPropertyException(rPropertyName); } } @@ -1385,7 +1385,7 @@ SwXMetaField::getPropertyValue(const OUString& rPropertyName) } else { - throw beans::UnknownPropertyException(); + throw beans::UnknownPropertyException(rPropertyName); } return any; diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx index 2da70bd5cdcc..c41d13dea3a8 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -2139,7 +2139,7 @@ void SwXNumberingRules::setPropertyValue( const OUString& rPropertyName, const A throw IllegalArgumentException(); } else - throw UnknownPropertyException(); + throw UnknownPropertyException(rPropertyName); if(pDocRule) { @@ -2189,7 +2189,7 @@ Any SwXNumberingRules::getPropertyValue( const OUString& rPropertyName ) aRet <<= pRule->GetDefaultListId(); } else - throw UnknownPropertyException(); + throw UnknownPropertyException(rPropertyName); return aRet; } diff --git a/sw/source/core/unocore/unosrch.cxx b/sw/source/core/unocore/unosrch.cxx index 8926602e8a80..4af7377f4c73 100644 --- a/sw/source/core/unocore/unosrch.cxx +++ b/sw/source/core/unocore/unosrch.cxx @@ -83,7 +83,7 @@ void SwSearchProperties_Impl::SetProperties(const uno::Sequence< beans::Property auto aIt = std::find_if(aPropertyEntries.begin(), aPropertyEntries.end(), [&sName](const SfxItemPropertyNamedEntry& rProp) { return rProp.sName == sName; }); if( aIt == aPropertyEntries.end() ) - throw beans::UnknownPropertyException(); + throw beans::UnknownPropertyException(sName); auto nIndex = static_cast<sal_uInt32>(std::distance(aPropertyEntries.begin(), aIt)); pValueArr[nIndex].reset( new beans::PropertyValue(rSearchAttrib) ); } diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 02c07eac0b1e..dde6652ff130 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -4497,7 +4497,7 @@ css::uno::Any SAL_CALL SwXTextTableStyle::getPropertyValue(const OUString& rProp else if (rPropertyName == UNO_NAME_DISPLAY_NAME) return uno::makeAny(m_pTableAutoFormat->GetName()); else - throw css::beans::UnknownPropertyException(); + throw css::beans::UnknownPropertyException(rPropertyName); return uno::makeAny(bIsRow ? OUString("row") : OUString("column")); } @@ -5020,7 +5020,7 @@ void SAL_CALL SwXTextCellStyle::setPropertyValue(const OUString& rPropertyName, } } - throw css::beans::UnknownPropertyException(); + throw css::beans::UnknownPropertyException(rPropertyName); } css::uno::Any SAL_CALL SwXTextCellStyle::getPropertyValue(const OUString& rPropertyName) @@ -5184,7 +5184,7 @@ css::uno::Any SAL_CALL SwXTextCellStyle::getPropertyValue(const OUString& rPrope } } - throw css::beans::UnknownPropertyException(); + throw css::beans::UnknownPropertyException(rPropertyName); } void SAL_CALL SwXTextCellStyle::addPropertyChangeListener( const OUString& /*aPropertyName*/, const css::uno::Reference< css::beans::XPropertyChangeListener >& /*xListener*/ ) @@ -5360,7 +5360,7 @@ css::uno::Sequence<css::beans::PropertyState> SAL_CALL SwXTextCellStyle::getProp else { SAL_WARN("sw.uno", "SwXTextCellStyle unknown property:" + sPropName); - throw css::beans::UnknownPropertyException(); + throw css::beans::UnknownPropertyException(sPropName); } } return aRet; 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) |