Esempio n. 1
0
int Column::findRow(const RowId& rowId) const
{
  int row = -1;

  ICell* pCell = nullptr;
  foreach(pCell, m_cells)
  {
    ++row;
    if (pCell && pCell->rowId() == rowId)
      return row;
  }
Esempio n. 2
0
numeric_t SplitComponent::getCellValue(const ICell & cell, const numeric_t & value) const
{
  //
  //1 - handle custom inputs
  //
  //TODO move here code from InputColumn::getInputValue, InputColumn::setCustomInputValue


  //
  //2 - handle implicit inter-split dependencies:
  //

  //if 'counted' is null, don't consider 'divided'
  if (getTitle() == SplitDivided)
  {
    SplitComponent* pSplitCounted = m_ownerCol.getSplitComponent(SplitCounted);
    if (pSplitCounted)
      if (!pSplitCounted->getRowInputUnits(cell.rowId()))
        return 0;
  }

  return value;
}