Kaydet (Commit) 0ba7b36a authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Retrieve and store broadcasters into data table.

Change-Id: I107ccbbc61a5e8024f21a7a30fae9fea00c90bde
üst e729c45b
......@@ -514,6 +514,8 @@ public:
SvtBroadcaster* GetBroadcaster( SCROW nRow );
const SvtBroadcaster* GetBroadcaster( SCROW nRow ) const;
const SvtBroadcaster* GetBroadcaster( sc::ColumnBlockConstPosition& rBlockPos, SCROW nRow ) const;
void DeleteBroadcasters( sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2 );
void PrepareBroadcastersForDestruction();
bool HasBroadcaster() const;
......
......@@ -1794,6 +1794,17 @@ const SvtBroadcaster* ScColumn::GetBroadcaster(SCROW nRow) const
return maBroadcasters.get<SvtBroadcaster*>(nRow);
}
const SvtBroadcaster* ScColumn::GetBroadcaster( sc::ColumnBlockConstPosition& rBlockPos, SCROW nRow ) const
{
sc::BroadcasterStoreType::const_position_type aPos = maBroadcasters.position(rBlockPos.miBroadcasterPos, nRow);
rBlockPos.miBroadcasterPos = aPos.first;
if (aPos.first->type != sc::element_type_broadcaster)
return NULL;
return sc::broadcaster_block::at(*aPos.first->data, aPos.second);
}
void ScColumn::DeleteBroadcasters( sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2 )
{
rBlockPos.miBroadcasterPos =
......
......@@ -226,8 +226,9 @@ public:
{
ScRefCellValue maCell;
const sc::CellTextAttr* mpAttr;
const SvtBroadcaster* mpBroadcaster;
Cell() : mpAttr(NULL) {}
Cell() : mpAttr(NULL), mpBroadcaster(NULL) {}
};
typedef std::vector<Cell> RowType;
......@@ -353,6 +354,7 @@ ScSortInfoArray* ScTable::CreateSortInfoArray( SCCOLROW nInd1, SCCOLROW nInd2 )
rCell.maCell = rCol.GetCellValue(aBlockPos, nRow);
rCell.mpAttr = rCol.GetCellTextAttr(aBlockPos, nRow);
rCell.mpBroadcaster = rCol.GetBroadcaster(aBlockPos, nRow);
}
}
}
......
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