mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
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:
parent
3d097a163f
commit
5e79e0d5c6
@ -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>
|
2000-05-05 Lars Gullik Bjønnes <larsbj@lyx.org>
|
||||||
|
|
||||||
* src/insets/insetspecialchar.C (Read): allow command == '~' for
|
* src/insets/insetspecialchar.C (Read): allow command == '~' for
|
||||||
|
24
src/table.C
24
src/table.C
@ -24,8 +24,8 @@
|
|||||||
#include "layout.h"
|
#include "layout.h"
|
||||||
#include "support/lstrings.h"
|
#include "support/lstrings.h"
|
||||||
#include "support/lyxmanip.h"
|
#include "support/lyxmanip.h"
|
||||||
|
#include "support/LAssert.h"
|
||||||
#include "lyx_gui_misc.h"
|
#include "lyx_gui_misc.h"
|
||||||
#include "insets/insettext.h"
|
|
||||||
|
|
||||||
using std::ostream;
|
using std::ostream;
|
||||||
using std::istream;
|
using std::istream;
|
||||||
@ -37,7 +37,7 @@ static int const WIDTH_OF_LINE = 5;
|
|||||||
|
|
||||||
/// Define a few methods for the inner structs
|
/// Define a few methods for the inner structs
|
||||||
|
|
||||||
LyXTable::cellstruct::cellstruct(Buffer * buf)
|
LyXTable::cellstruct::cellstruct()
|
||||||
{
|
{
|
||||||
cellno = 0; //should be initilaized correctly later.
|
cellno = 0; //should be initilaized correctly later.
|
||||||
width_of_cell = 0;
|
width_of_cell = 0;
|
||||||
@ -48,14 +48,10 @@ LyXTable::cellstruct::cellstruct(Buffer * buf)
|
|||||||
has_cont_row = false;
|
has_cont_row = false;
|
||||||
rotate = false;
|
rotate = false;
|
||||||
linebreaks = false;
|
linebreaks = false;
|
||||||
buf ? inset = new InsetText(buf): inset = 0;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LyXTable::cellstruct::~cellstruct()
|
LyXTable::cellstruct::~cellstruct()
|
||||||
{
|
{
|
||||||
if (inset)
|
|
||||||
delete inset;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LyXTable::cellstruct &
|
LyXTable::cellstruct &
|
||||||
@ -125,25 +121,22 @@ LyXTable::columnstruct &
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* konstruktor */
|
/* 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);
|
Init(rows_arg, columns_arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LyXTable::LyXTable(LyXTable const & lt, Buffer * buf)
|
LyXTable::LyXTable(LyXTable const & lt)
|
||||||
{
|
{
|
||||||
buffer = buf;
|
|
||||||
Init(lt.rows, lt.columns);
|
Init(lt.rows, lt.columns);
|
||||||
|
|
||||||
operator=(lt);
|
operator=(lt);
|
||||||
}
|
}
|
||||||
|
|
||||||
LyXTable::LyXTable(LyXLex & lex, Buffer *buf)
|
LyXTable::LyXTable(LyXLex & lex)
|
||||||
{
|
{
|
||||||
istream & is = lex.getStream();
|
istream & is = lex.getStream();
|
||||||
buffer = buf;
|
|
||||||
Read(is);
|
Read(is);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -233,7 +226,7 @@ void LyXTable::Init(int rows_arg, int columns_arg)
|
|||||||
|
|
||||||
int cellno = 0;
|
int cellno = 0;
|
||||||
for (i = 0; i < rows; ++i) {
|
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) {
|
for (j = 0; j < columns; ++j) {
|
||||||
cell_info[i][j].cellno = cellno++;
|
cell_info[i][j].cellno = cellno++;
|
||||||
}
|
}
|
||||||
@ -2084,8 +2077,3 @@ int LyXTable::Latex(ostream &)
|
|||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
InsetText * LyXTable::GetCellInset(int cell) const
|
|
||||||
{
|
|
||||||
return cell_info[row_of_cell(cell)][column_of_cell(cell)].inset;
|
|
||||||
}
|
|
||||||
|
19
src/table.h
19
src/table.h
@ -20,9 +20,6 @@
|
|||||||
#include "lyxlex.h"
|
#include "lyxlex.h"
|
||||||
#include "LString.h"
|
#include "LString.h"
|
||||||
|
|
||||||
class InsetText;
|
|
||||||
class Buffer;
|
|
||||||
|
|
||||||
/* The features the text class offers for tables */
|
/* The features the text class offers for tables */
|
||||||
|
|
||||||
///
|
///
|
||||||
@ -70,13 +67,13 @@ public:
|
|||||||
};
|
};
|
||||||
/* konstruktor */
|
/* 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
|
explicit
|
||||||
LyXTable(LyXLex & lex, Buffer *buf = 0);
|
LyXTable(LyXLex & lex);
|
||||||
///
|
///
|
||||||
~LyXTable();
|
~LyXTable();
|
||||||
///
|
///
|
||||||
@ -271,21 +268,17 @@ public:
|
|||||||
///
|
///
|
||||||
bool LTNewPage(int cell);
|
bool LTNewPage(int cell);
|
||||||
///
|
///
|
||||||
InsetText * GetCellInset(int cell) const;
|
|
||||||
///
|
|
||||||
|
|
||||||
private: //////////////////////////////////////////////////////////////////
|
private: //////////////////////////////////////////////////////////////////
|
||||||
///
|
///
|
||||||
struct cellstruct {
|
struct cellstruct {
|
||||||
///
|
///
|
||||||
cellstruct(Buffer * buf = 0);
|
cellstruct();
|
||||||
///
|
///
|
||||||
~cellstruct();
|
~cellstruct();
|
||||||
///
|
///
|
||||||
cellstruct & operator=(cellstruct const &);
|
cellstruct & operator=(cellstruct const &);
|
||||||
///
|
///
|
||||||
void setBuffer(Buffer * buf);
|
|
||||||
///
|
|
||||||
int cellno;
|
int cellno;
|
||||||
///
|
///
|
||||||
int width_of_cell;
|
int width_of_cell;
|
||||||
@ -307,8 +300,6 @@ private: //////////////////////////////////////////////////////////////////
|
|||||||
string align_special;
|
string align_special;
|
||||||
///
|
///
|
||||||
string p_width; // this is only set for multicolumn!!!
|
string p_width; // this is only set for multicolumn!!!
|
||||||
///
|
|
||||||
InsetText *inset;
|
|
||||||
};
|
};
|
||||||
///
|
///
|
||||||
struct rowstruct {
|
struct rowstruct {
|
||||||
@ -365,9 +356,7 @@ private: //////////////////////////////////////////////////////////////////
|
|||||||
int endfoot; // row of endfoot
|
int endfoot; // row of endfoot
|
||||||
int endlastfoot; // row of endlastfoot
|
int endlastfoot; // row of endlastfoot
|
||||||
///
|
///
|
||||||
Buffer *buffer;
|
|
||||||
|
|
||||||
///
|
|
||||||
void set_row_column_number_info();
|
void set_row_column_number_info();
|
||||||
/// Returns true if a complete update is necessary, otherwise false
|
/// Returns true if a complete update is necessary, otherwise false
|
||||||
bool SetWidthOfMulticolCell(int cell, int new_width);
|
bool SetWidthOfMulticolCell(int cell, int new_width);
|
||||||
|
Loading…
Reference in New Issue
Block a user