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

getCount() should throw exceptions on complex table like others

Change-Id: Ie504426209601695131e4c684bde7ee27fac87d8
üst e0bc0b7a
......@@ -4695,21 +4695,15 @@ SwXTableColumns::~SwXTableColumns()
sal_Int32 SwXTableColumns::getCount(void) throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
sal_Int32 nRet = 0;
SwFrmFmt* pFrmFmt = GetFrmFmt();
SwFrmFmt* pFrmFmt(GetFrmFmt());
if(!pFrmFmt)
throw uno::RuntimeException();
else
{
SwTable* pTable = SwTable::FindTable( pFrmFmt );
if(!pTable->IsTblComplex())
{
SwTableLines& rLines = pTable->GetTabLines();
SwTableLine* pLine = rLines.front();
nRet = pLine->GetTabBoxes().size();
}
}
return nRet;
SwTable* pTable = SwTable::FindTable( pFrmFmt );
if(!pTable->IsTblComplex())
throw uno::RuntimeException("Table too complex", static_cast<cppu::OWeakObject*>(this));
SwTableLines& rLines = pTable->GetTabLines();
SwTableLine* pLine = rLines.front();
return pLine->GetTabBoxes().size();
}
uno::Any SwXTableColumns::getByIndex(sal_Int32 nIndex)
......
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