]> git.lyx.org Git - lyx.git/blobdiff - src/text2.C
- Link against qt-mt333.lib which is what the current qt3 cvs produces
[lyx.git] / src / text2.C
index e406a65f6649c4eb6050cf3250a92c9b158ba660..324d3cbef4d63f0f27407680b2870c52789bfb85 100644 (file)
@@ -58,7 +58,7 @@
 
 #include "support/lstrings.h"
 #include "support/textutils.h"
-#include "support/tostr.h"
+#include "support/convert.h"
 
 #include <sstream>
 
@@ -74,7 +74,8 @@ using std::string;
 LyXText::LyXText(BufferView * bv)
        : maxwidth_(bv ? bv->workWidth() : 100),
          background_color_(LColor::background),
-         bv_owner(bv)
+         bv_owner(bv),
+         autoBreakRows_(false)
 {}
 
 
@@ -335,7 +336,7 @@ void LyXText::setLayout(LCursor & cur, string const & layout)
 
        pit_type start = cur.selBegin().pit();
        pit_type end = cur.selEnd().pit() + 1;
-       pit_type endpit = setLayout(start, end, layout);
+       setLayout(start, end, layout);
        updateCounters();
 }
 
@@ -893,7 +894,8 @@ void LyXText::insertStringAsLines(LCursor & cur, string const & str)
 
        // only to be sure, should not be neccessary
        cur.clearSelection();
-       cur.buffer().insertStringAsLines(pars_, pit, pos, current_font, str);
+       cur.buffer().insertStringAsLines(pars_, pit, pos, current_font, str,
+               autoBreakRows_);
 
        cur.resetAnchor();
        setCursor(cur, cur.pit(), pos);
@@ -1182,7 +1184,7 @@ InsetBase * LyXText::editXY(LCursor & cur, int x, int y) const
                const_cast<LyXText *>(this)->setCurrentFont(cur);
                return 0;
        }
-       
+
        // This should be just before or just behind the
        // cursor position set above.
        BOOST_ASSERT((pos != 0 && inset == pars_[pit].getInset(pos - 1))
@@ -1271,7 +1273,7 @@ void LyXText::cursorUp(LCursor & cur)
        } else if (cur.pit() > 0) {
                --cur.pit();
                setCursor(cur, cur.pit(), x2pos(cur.pit(), cur.paragraph().rows().size() - 1, x));
-               
+
        }
 
        cur.x_target() = x;
@@ -1280,7 +1282,7 @@ void LyXText::cursorUp(LCursor & cur)
 
 void LyXText::cursorDown(LCursor & cur)
 {
+
 
        Paragraph const & par = cur.paragraph();
        int const row = par.pos2row(cur.pos());
@@ -1291,14 +1293,14 @@ void LyXText::cursorDown(LCursor & cur)
                editXY(cur, x, y + par.rows()[row].descent() + 1);
                return;
        }
-       
+
        if (row + 1 < int(par.rows().size())) {
                setCursor(cur, cur.pit(), x2pos(cur.pit(), row + 1, x));
        } else if (cur.pit() + 1 < int(paragraphs().size())) {
                ++cur.pit();
                setCursor(cur, cur.pit(), x2pos(cur.pit(), 0, x));
        }
-       
+
        cur.x_target() = x;
 }
 
@@ -1421,8 +1423,6 @@ bool LyXText::deleteEmptyParagraphMechanism(LCursor & cur, LCursor const & old)
 
        if (oldpar.empty() || (oldpar.size() == 1 && oldpar.isLineSeparator(0))) {
                // ok, we will delete something
-               CursorSlice tmpcursor;
-
                deleted = true;
 
                bool selection_position_was_oldcursor_position =