]> git.lyx.org Git - lyx.git/blobdiff - src/TextMetrics.cpp
InsetTabular.cpp: multirows inherit the width and the alignment from the column;...
[lyx.git] / src / TextMetrics.cpp
index 675f8ee11a00ff9ae11494afa3e3f3b08c4e1580..ea8e07fae67ddf732c4f377f918455cf4a3e6a67 100644 (file)
@@ -27,7 +27,6 @@
 #include "CoordCache.h"
 #include "Cursor.h"
 #include "CutAndPaste.h"
-#include "FuncRequest.h"
 #include "HSpace.h"
 #include "InsetList.h"
 #include "Layout.h"
@@ -134,8 +133,6 @@ TextMetrics::TextMetrics(BufferView * bv, Text * text)
        dim_.wid = max_width_;
        dim_.asc = 10;
        dim_.des = 10;
-
-       //text_->updateBuffer(bv->buffer());
 }
 
 
@@ -401,6 +398,9 @@ bool TextMetrics::redoParagraph(pit_type const pit)
                LYXERR(Debug::INFO, "MacroContext not initialised!"
                        << " Going through the buffer again and hope"
                        << " the context is better then.");
+               // FIXME audit updateBuffer calls
+               // This should not be here, but it is not clear yet where else it
+               // should be.
                bv_->buffer().updateBuffer();
                parPos = text_->macrocontextPosition();
                LASSERT(!parPos.empty(), /**/);
@@ -2132,15 +2132,7 @@ void TextMetrics::drawParagraph(PainterInfo & pi, pit_type pit, int x, int y) co
 
                // Take this opportunity to spellcheck the row contents.
                if (row_has_changed && lyxrc.spellcheck_continuously) {
-                       WordLangTuple wl;
-                       // dummy variable, not used.
-                       static docstring_list suggestions;
-                       pos_type from = row.pos();
-                       pos_type to = row.endpos();
-                       while (from < row.endpos()) {
-                               text_->getPar(pit).spellCheck(from, to, wl, suggestions, false);
-                               from = to + 1;
-                       }
+                       text_->getPar(pit).spellCheck();
                }
 
                // Don't paint the row if a full repaint has not been requested