Kaydet (Commit) 9f3aaa5c authored tarafından Bjoern Michaelsen's avatar Bjoern Michaelsen

simplify

Change-Id: I1b1f9d544e00e7900232ff9416a99fc0c5faa4e5
üst b137dfce
...@@ -1088,24 +1088,16 @@ void SwXCell::setPropertyValue(const OUString& rPropertyName, const uno::Any& aV ...@@ -1088,24 +1088,16 @@ void SwXCell::setPropertyValue(const OUString& rPropertyName, const uno::Any& aV
{ {
auto pEntry(m_pPropSet->getPropertyMap().getByName(rPropertyName)); auto pEntry(m_pPropSet->getPropertyMap().getByName(rPropertyName));
if(!pEntry) if(!pEntry)
{ throw beans::UnknownPropertyException(rPropertyName, static_cast<cppu::OWeakObject*>(this));
beans::UnknownPropertyException aEx; if(pEntry->nWID != FN_UNO_CELL_ROW_SPAN)
aEx.Message = rPropertyName;
throw(aEx);
}
if(pEntry->nWID == FN_UNO_CELL_ROW_SPAN)
{
sal_Int32 nRowSpan = 0;
if(aValue >>= nRowSpan)
pBox->setRowSpan(nRowSpan);
}
else
{ {
SwFrmFmt* pBoxFmt = pBox->ClaimFrmFmt(); SwFrmFmt* pBoxFmt = pBox->ClaimFrmFmt();
SwAttrSet aSet(pBoxFmt->GetAttrSet()); SwAttrSet aSet(pBoxFmt->GetAttrSet());
m_pPropSet->setPropertyValue(rPropertyName, aValue, aSet); m_pPropSet->setPropertyValue(rPropertyName, aValue, aSet);
pBoxFmt->GetDoc()->SetAttr(aSet, *pBoxFmt); pBoxFmt->GetDoc()->SetAttr(aSet, *pBoxFmt);
} }
else if(aValue.isExtractableTo(cppu::UnoType<sal_Int32>::get()))
pBox->setRowSpan(aValue.get<sal_Int32>());
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment