]> git.lyx.org Git - lyx.git/blobdiff - src/paragraph_funcs.C
cleanup some debug messages
[lyx.git] / src / paragraph_funcs.C
index a5d3a5e777313f0e4c6220e2a320855903ea2cd7..a43217cc055591222a2b62d954aecafec8812a6d 100644 (file)
@@ -58,8 +58,8 @@ using std::pair;
 namespace {
 
 bool moveItem(Paragraph & from, Paragraph & to,
-       BufferParams const & params, pos_type i, pos_type j, 
-       Change change = Change(Change::INSERTED)); 
+       BufferParams const & params, pos_type i, pos_type j,
+       Change change = Change(Change::INSERTED));
 
 bool moveItem(Paragraph & from, Paragraph & to,
        BufferParams const & params, pos_type i, pos_type j,
@@ -83,8 +83,6 @@ bool moveItem(Paragraph & from, Paragraph & to,
                if (tmpinset)
                        to.insertInset(j, tmpinset, tmpfont, change);
        } else {
-               if (!to.checkInsertChar(tmpfont))
-                       return false;
                to.insertChar(j, tmpchar, tmpfont, change);
        }
        return true;
@@ -168,10 +166,11 @@ void breakParagraph(BufferParams const & bparams,
                return;
        }
 
-       par.params().clear();
-
-       par.layout(bparams.getLyXTextClass().defaultLayout());
-
+        if (!isempty) {
+                par.params().clear();
+                par.layout(bparams.getLyXTextClass().defaultLayout());
+        }
+        
        // layout stays the same with latex-environments
        if (flag) {
                par.layout(tmp->layout());
@@ -214,9 +213,9 @@ void breakParagraphConservative(BufferParams const & bparams,
                        if (moveItem(par, tmp, bparams, i, j - pos, change))
                                ++j;
                }
-               // If tracking changes, set all the text that is to be  
-               // erased to Type::INSERTED.  
-               for (pos_type k = pos_end; k >= pos; --k) { 
+               // If tracking changes, set all the text that is to be
+               // erased to Type::INSERTED.
+               for (pos_type k = pos_end; k >= pos; --k) {
                        if (bparams.tracking_changes)
                                par.setChange(k, Change::INSERTED);
                        par.erase(k);