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