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

simplify

Change-Id: I2bd8e4e121c9919b52b69a6672aaa7f061d986bb
üst 2326a221
......@@ -4343,28 +4343,18 @@ void SwXCellRange::setColumnDescriptions(const uno::Sequence< OUString >& Column
SolarMutexGuard aGuard;
const sal_uInt16 nColCount = getColumnCount();
SwFrmFmt* pFmt = GetFrmFmt();
if(pFmt)
{
if(!pFmt)
return;
const OUString* pArray = ColumnDesc.getConstArray();
if(bFirstRowAsLabel && ColumnDesc.getLength() >= nColCount - (bFirstColumnAsLabel ? 1 : 0))
{
const sal_uInt16 nStart = bFirstColumnAsLabel ? 1 : 0;
for(sal_uInt16 i = nStart; i < nColCount; i++)
if(bFirstColumnAsLabel || ColumnDesc.getLength() < nColCount)
throw uno::RuntimeException("Illegal arguments", static_cast<cppu::OWeakObject*>(this));
for(sal_uInt16 i = 0; i < nColCount; i++)
{
uno::Reference< table::XCell > xCell = getCellByPosition(i, 0);
uno::Reference<table::XCell> xCell = getCellByPosition(i, 0);
if(!xCell.is())
{
throw uno::RuntimeException();
}
uno::Reference< text::XText > xText(xCell, uno::UNO_QUERY);
xText->setString(pArray[i - nStart]);
}
}
else
{
OSL_FAIL("Where to put theses labels?");
}
uno::Reference<text::XText> xText(xCell, uno::UNO_QUERY);
xText->setString(pArray[i]);
}
}
......
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