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

throw instead of returning an empty Any

Change-Id: I299ac48e480517289348c651f28b5c7fc7653362
üst c78449c8
......@@ -1388,44 +1388,41 @@ uno::Any SwXTextTableRow::getPropertyValue(const OUString& rPropertyName) throw(
{
SolarMutexGuard aGuard;
uno::Any aRet;
SwFrmFmt* pFmt = GetFrmFmt();
if(pFmt)
SwFrmFmt* pFmt = lcl_EnsureCoreConnected(GetFrmFmt());
SwTable* pTable = SwTable::FindTable( pFmt );
SwTableLine* pLn = SwXTextTableRow::FindLine(pTable, pLine);
if(pLn)
{
SwTable* pTable = SwTable::FindTable( pFmt );
SwTableLine* pLn = SwXTextTableRow::FindLine(pTable, pLine);
if(pLn)
{
const SfxItemPropertySimpleEntry* pEntry =
m_pPropSet->getPropertyMap().getByName(rPropertyName);
if (!pEntry)
throw beans::UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
const SfxItemPropertySimpleEntry* pEntry =
m_pPropSet->getPropertyMap().getByName(rPropertyName);
if (!pEntry)
throw beans::UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
switch(pEntry->nWID)
switch(pEntry->nWID)
{
case FN_UNO_ROW_HEIGHT:
case FN_UNO_ROW_AUTO_HEIGHT:
{
case FN_UNO_ROW_HEIGHT:
case FN_UNO_ROW_AUTO_HEIGHT:
const SwFmtFrmSize& rSize = pLn->GetFrmFmt()->GetFrmSize();
if(FN_UNO_ROW_AUTO_HEIGHT== pEntry->nWID)
{
const SwFmtFrmSize& rSize = pLn->GetFrmFmt()->GetFrmSize();
if(FN_UNO_ROW_AUTO_HEIGHT== pEntry->nWID)
{
aRet <<= ATT_VAR_SIZE == rSize.GetHeightSizeType();
}
else
aRet <<= (sal_Int32)(convertTwipToMm100(rSize.GetSize().Height()));
aRet <<= ATT_VAR_SIZE == rSize.GetHeightSizeType();
}
break;
else
aRet <<= (sal_Int32)(convertTwipToMm100(rSize.GetSize().Height()));
}
break;
case FN_UNO_TABLE_COLUMN_SEPARATORS:
{
lcl_GetTblSeparators(aRet, pTable, pLine->GetTabBoxes()[0], true);
}
break;
case FN_UNO_TABLE_COLUMN_SEPARATORS:
{
lcl_GetTblSeparators(aRet, pTable, pLine->GetTabBoxes()[0], true);
}
break;
default:
{
const SwAttrSet& rSet = pLn->GetFrmFmt()->GetAttrSet();
m_pPropSet->getPropertyValue(*pEntry, rSet, aRet);
}
default:
{
const SwAttrSet& rSet = pLn->GetFrmFmt()->GetAttrSet();
m_pPropSet->getPropertyValue(*pEntry, rSet, aRet);
}
}
}
......
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