]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insettabular.C
fix compilation pb ; update eu.po
[lyx.git] / src / insets / insettabular.C
index 752e0d8565d2430c8d5a308930257dbab41df786..679698de1e1329bf7de6b5248e1469cf3a7deb30 100644 (file)
 #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"
@@ -126,15 +124,11 @@ InsetTabular::InsetTabular(Buffer const & buf, int rows, int columns)
                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();
@@ -145,13 +139,9 @@ InsetTabular::InsetTabular(Buffer const & buf, int rows, int columns)
 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;
@@ -247,7 +237,7 @@ void InsetTabular::draw(BufferView * bv, LyXFont const & font, int baseline,
        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))) {
@@ -1236,7 +1226,9 @@ void InsetTabular::setPos(BufferView * bv, int x, int y) const
        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));