removed insets/buffer from this as it is not needed!

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@716 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Vigna 2000-05-05 09:41:35 +00:00
parent 3d097a163f
commit 5e79e0d5c6
3 changed files with 16 additions and 34 deletions

View File

@ -1,3 +1,8 @@
2000-05-05 Juergen Vigna <jug@sad.it>
* src/table.[Ch]: removed the inset and buffer stuff as this is now
neede only in tabular.[Ch].
2000-05-05 Lars Gullik Bjønnes <larsbj@lyx.org>
* src/insets/insetspecialchar.C (Read): allow command == '~' for

View File

@ -24,8 +24,8 @@
#include "layout.h"
#include "support/lstrings.h"
#include "support/lyxmanip.h"
#include "support/LAssert.h"
#include "lyx_gui_misc.h"
#include "insets/insettext.h"
using std::ostream;
using std::istream;
@ -37,7 +37,7 @@ static int const WIDTH_OF_LINE = 5;
/// Define a few methods for the inner structs
LyXTable::cellstruct::cellstruct(Buffer * buf)
LyXTable::cellstruct::cellstruct()
{
cellno = 0; //should be initilaized correctly later.
width_of_cell = 0;
@ -48,14 +48,10 @@ LyXTable::cellstruct::cellstruct(Buffer * buf)
has_cont_row = false;
rotate = false;
linebreaks = false;
buf ? inset = new InsetText(buf): inset = 0;
}
LyXTable::cellstruct::~cellstruct()
{
if (inset)
delete inset;
}
LyXTable::cellstruct &
@ -125,25 +121,22 @@ LyXTable::columnstruct &
}
/* konstruktor */
LyXTable::LyXTable(int rows_arg, int columns_arg, Buffer *buf)
LyXTable::LyXTable(int rows_arg, int columns_arg)
{
buffer = buf;
Init(rows_arg, columns_arg);
}
LyXTable::LyXTable(LyXTable const & lt, Buffer * buf)
LyXTable::LyXTable(LyXTable const & lt)
{
buffer = buf;
Init(lt.rows, lt.columns);
operator=(lt);
}
LyXTable::LyXTable(LyXLex & lex, Buffer *buf)
LyXTable::LyXTable(LyXLex & lex)
{
istream & is = lex.getStream();
buffer = buf;
Read(is);
}
@ -233,7 +226,7 @@ void LyXTable::Init(int rows_arg, int columns_arg)
int cellno = 0;
for (i = 0; i < rows; ++i) {
cell_info[i] = new cellstruct[columns](buffer);
cell_info[i] = new cellstruct[columns];
for (j = 0; j < columns; ++j) {
cell_info[i][j].cellno = cellno++;
}
@ -2084,8 +2077,3 @@ int LyXTable::Latex(ostream &)
{
return 0;
}
InsetText * LyXTable::GetCellInset(int cell) const
{
return cell_info[row_of_cell(cell)][column_of_cell(cell)].inset;
}

View File

@ -20,9 +20,6 @@
#include "lyxlex.h"
#include "LString.h"
class InsetText;
class Buffer;
/* The features the text class offers for tables */
///
@ -70,13 +67,13 @@ public:
};
/* konstruktor */
///
LyXTable(int columns_arg, int rows_arg, Buffer *buf = 0);
LyXTable(int columns_arg, int rows_arg);
///
///
LyXTable(LyXTable const &, Buffer *buf = 0);
LyXTable(LyXTable const &);
///
explicit
LyXTable(LyXLex & lex, Buffer *buf = 0);
LyXTable(LyXLex & lex);
///
~LyXTable();
///
@ -271,21 +268,17 @@ public:
///
bool LTNewPage(int cell);
///
InsetText * GetCellInset(int cell) const;
///
private: //////////////////////////////////////////////////////////////////
///
struct cellstruct {
///
cellstruct(Buffer * buf = 0);
cellstruct();
///
~cellstruct();
///
cellstruct & operator=(cellstruct const &);
///
void setBuffer(Buffer * buf);
///
int cellno;
///
int width_of_cell;
@ -307,8 +300,6 @@ private: //////////////////////////////////////////////////////////////////
string align_special;
///
string p_width; // this is only set for multicolumn!!!
///
InsetText *inset;
};
///
struct rowstruct {
@ -365,9 +356,7 @@ private: //////////////////////////////////////////////////////////////////
int endfoot; // row of endfoot
int endlastfoot; // row of endlastfoot
///
Buffer *buffer;
///
void set_row_column_number_info();
/// Returns true if a complete update is necessary, otherwise false
bool SetWidthOfMulticolCell(int cell, int new_width);