#include "lyxtext.h"
#include "lyx_gui_misc.h"
#include "LyXView.h"
-#include "lyxfunc.h"
#include "insets/insettext.h"
#include "frontends/Dialogs.h"
#include "debug.h"
-#include "lyxfunc.h"
#include "WorkArea.h"
#include "gettext.h"
#include "language.h"
rows = 1;
if (columns <= 0)
columns = 1;
- //tabular = new LyXTabular(this, rows,columns);
tabular.reset(new LyXTabular(this, rows,columns));
// for now make it always display as display() inset
// just for test!!!
the_locking_inset = 0;
locked = no_selection = false;
-#if 0
- cursor_visible = false;
-#endif
oldcell = -1;
actrow = actcell = 0;
clearSelection();
InsetTabular::InsetTabular(InsetTabular const & tab, Buffer const & buf)
: buffer(&buf)
{
- //tabular = new LyXTabular(this, *(tab.tabular));
tabular.reset(new LyXTabular(this, *(tab.tabular)));
the_locking_inset = 0;
locked = no_selection = false;
-#if 0
- cursor_visible = false;
-#endif
oldcell = -1;
actrow = actcell = 0;
sel_cell_start = sel_cell_end = 0;
UpdatableInset::draw(bv, font, baseline, x, cleared);
#else
if (!owner())
- x += (float)scroll();
+ x += static_cast<float>(scroll());
#endif
if (!cleared && ((need_update == INIT) || (need_update == FULL) ||
(top_x != int(x)) || (top_baseline != baseline))) {
if (!copySelection(bv))
break;
bv->text->SetUndo(bv->buffer(), Undo::DELETE,
-#ifndef NEW_INSETS
- bv->text->cursor.par()->ParFromPos(bv->text->cursor.pos())->previous_,
- bv->text->cursor.par()->ParFromPos(bv->text->cursor.pos())->next_
-#else
bv->text->cursor.par()->previous(),
- bv->text->cursor.par()->next()
-#endif
- );
+ bv->text->cursor.par()->next());
cutSelection();
UpdateLocal(bv, INIT, true);
break;
break;
case LFUN_PASTESELECTION:
{
- string clip(bv->workarea()->getClipboard());
+ string clip(bv->getClipboard());
if (clip.empty())
break;
case LFUN_PASTE:
if (hasPasteBuffer()) {
bv->text->SetUndo(bv->buffer(), Undo::INSERT,
-#ifndef NEW_INSETS
- bv->text->cursor.par()->ParFromPos(bv->text->cursor.pos())->previous_,
- bv->text->cursor.par()->ParFromPos(bv->text->cursor.pos())->next_
-#else
bv->text->cursor.par()->previous(),
- bv->text->cursor.par()->next()
-#endif
- );
+ bv->text->cursor.par()->next());
pasteSelection(bv);
UpdateLocal(bv, INIT, true);
break;
int lx = tabular->GetWidthOfColumn(actcell) -
tabular->GetAdditionalWidth(actcell);
#if 0
+#ifdef WITH_WARNINGS
#warning Jürgen, can you rewrite this to _not_ use the sequencing operator. (Lgb)
+#endif
for (; !tabular->IsLastCellInRow(actcell) && (lx < x);
++actcell,lx += tabular->GetWidthOfColumn(actcell) +
tabular->GetAdditionalWidth(actcell - 1));
sel_row_start = sel_row_end = tabular->row_of_cell(actcell);
}
bv->text->SetUndo(bv->buffer(), Undo::FINISH,
-#ifndef NEW_INSETS
- bv->text->cursor.par()->ParFromPos(bv->text->cursor.pos())->previous_,
- bv->text->cursor.par()->ParFromPos(bv->text->cursor.pos())->next_
-#else
bv->text->cursor.par()->previous(),
- bv->text->cursor.par()->next()
-#endif
- );
+ bv->text->cursor.par()->next());
int row = tabular->row_of_cell(actcell);
int column = tabular->column_of_cell(actcell);