From 9f3aaa5c8cff4b4991272e1b71666428985d74e6 Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Thu, 2 Apr 2015 18:40:51 +0200 Subject: simplify Change-Id: I1b1f9d544e00e7900232ff9416a99fc0c5faa4e5 --- sw/source/core/unocore/unotbl.cxx | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 578556ab6b5f..9d4570da1f14 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -1088,24 +1088,16 @@ void SwXCell::setPropertyValue(const OUString& rPropertyName, const uno::Any& aV { auto pEntry(m_pPropSet->getPropertyMap().getByName(rPropertyName)); if(!pEntry) - { - beans::UnknownPropertyException aEx; - aEx.Message = rPropertyName; - throw(aEx); - } - if(pEntry->nWID == FN_UNO_CELL_ROW_SPAN) - { - sal_Int32 nRowSpan = 0; - if(aValue >>= nRowSpan) - pBox->setRowSpan(nRowSpan); - } - else + throw beans::UnknownPropertyException(rPropertyName, static_cast(this)); + if(pEntry->nWID != FN_UNO_CELL_ROW_SPAN) { SwFrmFmt* pBoxFmt = pBox->ClaimFrmFmt(); SwAttrSet aSet(pBoxFmt->GetAttrSet()); m_pPropSet->setPropertyValue(rPropertyName, aValue, aSet); pBoxFmt->GetDoc()->SetAttr(aSet, *pBoxFmt); } + else if(aValue.isExtractableTo(cppu::UnoType::get())) + pBox->setRowSpan(aValue.get()); } } -- cgit