]> git.lyx.org Git - features.git/commitdiff
* src/text.C: remove empty namespace; fix change tracking
authorMichael Schmitt <michael.schmitt@teststep.org>
Sun, 26 Nov 2006 11:53:33 +0000 (11:53 +0000)
committerMichael Schmitt <michael.schmitt@teststep.org>
Sun, 26 Nov 2006 11:53:33 +0000 (11:53 +0000)
in breakParagraph()

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16059 a592a061-630c-0410-9148-cb99ea01b6c8

src/text.C

index 09a490fc40f473d51552ec19f0e36a43a6342be5..fc23249c0e4f05f9b34efe63ebe7fdff65469408 100644 (file)
@@ -1074,10 +1074,6 @@ void LyXText::setHeightOfRow(BufferView const & bv, pit_type const pit,
 }
 
 
-namespace {
-
-}
-
 void LyXText::breakParagraph(LCursor & cur, bool keep_layout)
 {
        BOOST_ASSERT(this == cur.text());
@@ -1090,8 +1086,8 @@ void LyXText::breakParagraph(LCursor & cur, bool keep_layout)
 
        // this is only allowed, if the current paragraph is not empty
        // or caption and if it has not the keepempty flag active
-       if (cur.lastpos() == 0 && !cpar.allowEmpty()
-          && layout->labeltype != LABEL_SENSITIVE)
+       if (cur.lastpos() == 0 && !cpar.allowEmpty() &&
+           layout->labeltype != LABEL_SENSITIVE)
                return;
 
        // a layout change may affect also the following paragraph
@@ -1100,10 +1096,9 @@ void LyXText::breakParagraph(LCursor & cur, bool keep_layout)
        // Always break behind a space
        // It is better to erase the space (Dekel)
        if (cur.pos() != cur.lastpos() && cpar.isLineSeparator(cur.pos()))
-               // FIXME: change tracking (MG)
                cpar.eraseChar(cur.pos(), cur.buffer().params().trackChanges);
 
-       // How should the layout for the new paragraph be?
+       // What should the layout for the new paragraph be?
        int preserve_layout = 0;
        if (keep_layout)
                preserve_layout = 2;
@@ -1136,7 +1131,6 @@ void LyXText::breakParagraph(LCursor & cur, bool keep_layout)
        }
 
        while (!pars_[next_par].empty() && pars_[next_par].isNewline(0))
-               // FIXME: change tracking (MG)
                pars_[next_par].eraseChar(0, cur.buffer().params().trackChanges);
 
        ParIterator current_it(cur);
@@ -1146,13 +1140,6 @@ void LyXText::breakParagraph(LCursor & cur, bool keep_layout)
 
        updateLabels(cur.buffer(), current_it, last_it);
 
-       // Mark "carriage return" as inserted if change tracking:
-       if (cur.buffer().params().trackChanges) {
-               // FIXME: Change tracking (MG)
-               cur.paragraph().setChange(cur.paragraph().size(),
-                       Change(Change::INSERTED));
-       }
-
        // FIXME: Breaking a paragraph has nothing to do with setting a cursor.
        // Because of the mix between the model (the paragraph contents) and the
        // view (the paragraph breaking in rows, we have to do this here before
@@ -1163,7 +1150,6 @@ void LyXText::breakParagraph(LCursor & cur, bool keep_layout)
                // A singlePar update is not enough in this case.
                cur.updateFlags(Update::Force);
 
-
        // This check is necessary. Otherwise the new empty paragraph will
        // be deleted automatically. And it is more friendly for the user!
        if (cur.pos() != 0 || isempty)