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

simplify

Change-Id: I1893f53d1bc4996db862301fc4350339802858ff
üst 8e3c3adb
......@@ -2141,24 +2141,19 @@ uno::Sequence<OUString> SwXTextTable::getCellNames(void) throw( uno::RuntimeExce
return comphelper::containerToSequence<OUString>(aAllNames);
}
uno::Reference< text::XTextTableCursor > SwXTextTable::createCursorByCellName(const OUString& sCellName)
uno::Reference<text::XTextTableCursor> SwXTextTable::createCursorByCellName(const OUString& sCellName)
throw (uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
uno::Reference< text::XTextTableCursor > xRet;
SwFrmFmt* pFmt = GetFrmFmt();
if(pFmt)
{
SwTable* pTable = SwTable::FindTable( pFmt );
SwTableBox* pBox = const_cast<SwTableBox*>(pTable->GetTblBox( sCellName ));
if(pBox && pBox->getRowSpan() > 0 )
{
xRet = new SwXTextTableCursor(pFmt, pBox);
}
}
if(!xRet.is())
SwFrmFmt* pFmt(GetFrmFmt());
if(!pFmt)
throw uno::RuntimeException();
return xRet;
uno::Reference<text::XTextTableCursor> xRet;
SwTable* pTable = SwTable::FindTable(pFmt);
SwTableBox* pBox = const_cast<SwTableBox*>(pTable->GetTblBox(sCellName));
if(!pBox || pBox->getRowSpan() == 0)
throw uno::RuntimeException();
return new SwXTextTableCursor(pFmt, pBox);
}
void SwXTextTable::attachToRange(const uno::Reference< text::XTextRange > & xTextRange)
......
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