mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 03:36:39 +00:00
s/cellstruct/CellData/g
s/rowstruct/RowData/g s/columnstruct/ColumnData/g closer to the current naming convention. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23290 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
db8c16d554
commit
f3e89bc3c9
@ -472,7 +472,7 @@ string const featureAsString(Tabular::Feature feature)
|
|||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
Tabular::cellstruct::cellstruct(Buffer const & buffer)
|
Tabular::CellData::CellData(Buffer const & buffer)
|
||||||
: cellno(0),
|
: cellno(0),
|
||||||
width(0),
|
width(0),
|
||||||
multicolumn(Tabular::CELL_NORMAL),
|
multicolumn(Tabular::CELL_NORMAL),
|
||||||
@ -491,7 +491,7 @@ Tabular::cellstruct::cellstruct(Buffer const & buffer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Tabular::cellstruct::cellstruct(cellstruct const & cs)
|
Tabular::CellData::CellData(CellData const & cs)
|
||||||
: cellno(cs.cellno),
|
: cellno(cs.cellno),
|
||||||
width(cs.width),
|
width(cs.width),
|
||||||
multicolumn(cs.multicolumn),
|
multicolumn(cs.multicolumn),
|
||||||
@ -509,14 +509,14 @@ Tabular::cellstruct::cellstruct(cellstruct const & cs)
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
Tabular::cellstruct & Tabular::cellstruct::operator=(cellstruct cs)
|
Tabular::CellData & Tabular::CellData::operator=(CellData cs)
|
||||||
{
|
{
|
||||||
swap(cs);
|
swap(cs);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Tabular::cellstruct::swap(cellstruct & rhs)
|
void Tabular::CellData::swap(CellData & rhs)
|
||||||
{
|
{
|
||||||
std::swap(cellno, rhs.cellno);
|
std::swap(cellno, rhs.cellno);
|
||||||
std::swap(width, rhs.width);
|
std::swap(width, rhs.width);
|
||||||
@ -535,7 +535,7 @@ void Tabular::cellstruct::swap(cellstruct & rhs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Tabular::rowstruct::rowstruct()
|
Tabular::RowData::RowData()
|
||||||
: ascent(0),
|
: ascent(0),
|
||||||
descent(0),
|
descent(0),
|
||||||
top_line(true),
|
top_line(true),
|
||||||
@ -551,7 +551,7 @@ Tabular::rowstruct::rowstruct()
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
Tabular::columnstruct::columnstruct()
|
Tabular::ColumnData::ColumnData()
|
||||||
: alignment(LYX_ALIGN_CENTER),
|
: alignment(LYX_ALIGN_CENTER),
|
||||||
valignment(LYX_VALIGN_TOP),
|
valignment(LYX_VALIGN_TOP),
|
||||||
left_line(true),
|
left_line(true),
|
||||||
@ -587,7 +587,7 @@ void Tabular::init(Buffer const & buf, row_type rows_arg,
|
|||||||
buffer_ = &buf;
|
buffer_ = &buf;
|
||||||
row_info = row_vector(rows_arg);
|
row_info = row_vector(rows_arg);
|
||||||
column_info = column_vector(columns_arg);
|
column_info = column_vector(columns_arg);
|
||||||
cell_info = cell_vvector(rows_arg, cell_vector(columns_arg, cellstruct(buf)));
|
cell_info = cell_vvector(rows_arg, cell_vector(columns_arg, CellData(buf)));
|
||||||
row_info.reserve(10);
|
row_info.reserve(10);
|
||||||
column_info.reserve(10);
|
column_info.reserve(10);
|
||||||
cell_info.reserve(100);
|
cell_info.reserve(100);
|
||||||
@ -626,7 +626,7 @@ void Tabular::appendRow(idx_type const cell)
|
|||||||
row_type const row = cellRow(cell);
|
row_type const row = cellRow(cell);
|
||||||
|
|
||||||
row_vector::iterator rit = row_info.begin() + row;
|
row_vector::iterator rit = row_info.begin() + row;
|
||||||
row_info.insert(rit, rowstruct());
|
row_info.insert(rit, RowData());
|
||||||
// now set the values of the row before
|
// now set the values of the row before
|
||||||
row_info[row] = row_info[row + 1];
|
row_info[row] = row_info[row + 1];
|
||||||
|
|
||||||
@ -637,7 +637,7 @@ void Tabular::appendRow(idx_type const cell)
|
|||||||
for (row_type i = 0; i < nrows - 1; ++i)
|
for (row_type i = 0; i < nrows - 1; ++i)
|
||||||
swap(cell_info[i], old[i]);
|
swap(cell_info[i], old[i]);
|
||||||
|
|
||||||
cell_info = cell_vvector(nrows, cell_vector(ncols, cellstruct(buffer())));
|
cell_info = cell_vvector(nrows, cell_vector(ncols, CellData(buffer())));
|
||||||
|
|
||||||
for (row_type i = 0; i <= row; ++i)
|
for (row_type i = 0; i <= row; ++i)
|
||||||
swap(cell_info[i], old[i]);
|
swap(cell_info[i], old[i]);
|
||||||
@ -682,13 +682,13 @@ void Tabular::appendColumn(idx_type const cell)
|
|||||||
col_type const column = cellColumn(cell);
|
col_type const column = cellColumn(cell);
|
||||||
col_type const ncols = columnCount();
|
col_type const ncols = columnCount();
|
||||||
column_vector::iterator cit = column_info.begin() + column + 1;
|
column_vector::iterator cit = column_info.begin() + column + 1;
|
||||||
column_info.insert(cit, columnstruct());
|
column_info.insert(cit, ColumnData());
|
||||||
// set the column values of the column before
|
// set the column values of the column before
|
||||||
column_info[column + 1] = column_info[column];
|
column_info[column + 1] = column_info[column];
|
||||||
|
|
||||||
BufferParams const & bp = buffer().params();
|
BufferParams const & bp = buffer().params();
|
||||||
for (row_type i = 0; i < rowCount(); ++i) {
|
for (row_type i = 0; i < rowCount(); ++i) {
|
||||||
cell_info[i].insert(cell_info[i].begin() + column + 1, cellstruct(buffer()));
|
cell_info[i].insert(cell_info[i].begin() + column + 1, CellData(buffer()));
|
||||||
|
|
||||||
// care about multicolumns
|
// care about multicolumns
|
||||||
if (cell_info[i][column + 1].multicolumn == CELL_BEGIN_OF_MULTICOLUMN)
|
if (cell_info[i][column + 1].multicolumn == CELL_BEGIN_OF_MULTICOLUMN)
|
||||||
@ -1589,7 +1589,7 @@ bool Tabular::isMultiColumnReal(idx_type cell) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Tabular::cellstruct & Tabular::cellinfo_of_cell(idx_type cell) const
|
Tabular::CellData & Tabular::cellinfo_of_cell(idx_type cell) const
|
||||||
{
|
{
|
||||||
return cell_info[cellRow(cell)][cellColumn(cell)];
|
return cell_info[cellRow(cell)][cellColumn(cell)];
|
||||||
}
|
}
|
||||||
@ -1597,7 +1597,7 @@ Tabular::cellstruct & Tabular::cellinfo_of_cell(idx_type cell) const
|
|||||||
|
|
||||||
void Tabular::setMultiColumn(idx_type cell, idx_type number)
|
void Tabular::setMultiColumn(idx_type cell, idx_type number)
|
||||||
{
|
{
|
||||||
cellstruct & cs = cellinfo_of_cell(cell);
|
CellData & cs = cellinfo_of_cell(cell);
|
||||||
cs.multicolumn = CELL_BEGIN_OF_MULTICOLUMN;
|
cs.multicolumn = CELL_BEGIN_OF_MULTICOLUMN;
|
||||||
cs.alignment = column_info[cellColumn(cell)].alignment;
|
cs.alignment = column_info[cellColumn(cell)].alignment;
|
||||||
cs.top_line = row_info[cellRow(cell)].top_line;
|
cs.top_line = row_info[cellRow(cell)].top_line;
|
||||||
@ -1605,7 +1605,7 @@ void Tabular::setMultiColumn(idx_type cell, idx_type number)
|
|||||||
cs.left_line = column_info[cellColumn(cell)].left_line;
|
cs.left_line = column_info[cellColumn(cell)].left_line;
|
||||||
cs.right_line = column_info[cellColumn(cell+number-1)].right_line;
|
cs.right_line = column_info[cellColumn(cell+number-1)].right_line;
|
||||||
for (idx_type i = 1; i < number; ++i) {
|
for (idx_type i = 1; i < number; ++i) {
|
||||||
cellstruct & cs1 = cellinfo_of_cell(cell + i);
|
CellData & cs1 = cellinfo_of_cell(cell + i);
|
||||||
cs1.multicolumn = CELL_PART_OF_MULTICOLUMN;
|
cs1.multicolumn = CELL_PART_OF_MULTICOLUMN;
|
||||||
cs.inset->appendParagraphs(cs1.inset->paragraphs());
|
cs.inset->appendParagraphs(cs1.inset->paragraphs());
|
||||||
cs1.inset->clear();
|
cs1.inset->clear();
|
||||||
|
@ -459,16 +459,16 @@ public:
|
|||||||
///
|
///
|
||||||
//private:
|
//private:
|
||||||
///
|
///
|
||||||
class cellstruct {
|
class CellData {
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
cellstruct(Buffer const &);
|
CellData(Buffer const &);
|
||||||
///
|
///
|
||||||
cellstruct(cellstruct const &);
|
CellData(CellData const &);
|
||||||
///
|
///
|
||||||
cellstruct & operator=(cellstruct);
|
CellData & operator=(CellData);
|
||||||
///
|
///
|
||||||
void swap(cellstruct & rhs);
|
void swap(CellData & rhs);
|
||||||
///
|
///
|
||||||
idx_type cellno;
|
idx_type cellno;
|
||||||
///
|
///
|
||||||
@ -498,17 +498,17 @@ public:
|
|||||||
///
|
///
|
||||||
boost::shared_ptr<InsetText> inset;
|
boost::shared_ptr<InsetText> inset;
|
||||||
};
|
};
|
||||||
cellstruct & cellinfo_of_cell(idx_type cell) const;
|
CellData & cellinfo_of_cell(idx_type cell) const;
|
||||||
///
|
///
|
||||||
typedef std::vector<cellstruct> cell_vector;
|
typedef std::vector<CellData> cell_vector;
|
||||||
///
|
///
|
||||||
typedef std::vector<cell_vector> cell_vvector;
|
typedef std::vector<cell_vector> cell_vvector;
|
||||||
|
|
||||||
///
|
///
|
||||||
class rowstruct {
|
class RowData {
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
rowstruct();
|
RowData();
|
||||||
///
|
///
|
||||||
int ascent;
|
int ascent;
|
||||||
///
|
///
|
||||||
@ -542,13 +542,13 @@ public:
|
|||||||
bool newpage;
|
bool newpage;
|
||||||
};
|
};
|
||||||
///
|
///
|
||||||
typedef std::vector<rowstruct> row_vector;
|
typedef std::vector<RowData> row_vector;
|
||||||
|
|
||||||
///
|
///
|
||||||
class columnstruct {
|
class ColumnData {
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
columnstruct();
|
ColumnData();
|
||||||
///
|
///
|
||||||
LyXAlignment alignment;
|
LyXAlignment alignment;
|
||||||
///
|
///
|
||||||
@ -565,7 +565,7 @@ public:
|
|||||||
docstring align_special;
|
docstring align_special;
|
||||||
};
|
};
|
||||||
///
|
///
|
||||||
typedef std::vector<columnstruct> column_vector;
|
typedef std::vector<ColumnData> column_vector;
|
||||||
|
|
||||||
///
|
///
|
||||||
idx_type numberofcells;
|
idx_type numberofcells;
|
||||||
|
Loading…
Reference in New Issue
Block a user