inline void
GRaggedFloatTableData::CreateCellIfNeeded
	(
	const JPoint cell
	)
{
	CreateCellIfNeeded(cell.y, cell.x);
}
void
GRaggedFloatTableData::SetElement
	(
	const JIndex	row,
	const JIndex	col,
	const JFloat	data
	)
{
	CreateCellIfNeeded(row, col);
	JArray<JFloat>* dataCol = itsCols->NthElement(col);
	dataCol->SetElement(row, data);
	if (itsBroadcast)
		{
		Broadcast(JTableData::RectChanged(row,col));
		}
}
예제 #3
0
void CRTFTablePostProcessor::MigrateCellsContent_CellEnd(RTFTable* pTable, int i, bool& bThisObjectIsContent, bool& bContentFound, IntFastVector& vCellPositions, RTFCell*& pCurrentCell, int& iColumn)
{
	delete pTable->DetachObject(i); // Implicit due to the collection

	if(int(pTable->theRowRTFformatting.size()) <= pTable->m_iRows)
		CellEndSeenBeforeTabledefInThisRow(pTable);

	CreateCellIfNeeded(pTable, pCurrentCell); //RG - reading word docs we can have 2 consecutive cell marks with nothing between
											  // this is not an error, but would have caused an exception here as nothing triggered the
											  // creation of pCurrentCell - I presume that in RTF we had a chrfmt content at minimum

	pCurrentCell->m_iColumn = iColumn;
	pCurrentCell->m_iRow = pTable->m_iRows;
	pTable->SetAt(i,pCurrentCell);   //=pCurrentCell;

	vCellPositions.push_back(i); // index place keeper for the formatting when known

	pCurrentCell = NULL;
	iColumn++;
}
void
GRaggedFloatTableData::SetCol
	(
	const JIndex			index,
	const JOrderedSet<JFloat>&	colData
	)
{
	JArray<JFloat>* dataCol = itsCols->NthElement(index);
	const JSize rowCount = colData.GetElementCount();
	CreateCellIfNeeded(rowCount, index);

	for (JIndex i=1; i<=rowCount; i++)
		{
		dataCol->SetElement(i, colData.GetElement(i));
		}

	JRect rect(1, index, rowCount + 1, index + 1);
	if (itsBroadcast)
		{
		Broadcast(JTableData::RectChanged(rect));
		}
}
예제 #5
0
void CRTFTablePostProcessor::AddContentObjectToCurrentCell(RTFTable* pTable, int i, RTFCell*& pCurrentCell)
{
	CreateCellIfNeeded(pTable, pCurrentCell);
	pCurrentCell->AddObject(pTable->DetachObject(i), 1);
}