]> git.lyx.org Git - lyx.git/blobdiff - src/paragraph_funcs.C
Fix bug 2474; partial fix for 1777. Added last_reference_ member to QRef class and...
[lyx.git] / src / paragraph_funcs.C
index 75a2a5a58d039f58b1fcf99d3e4dd800d4763dbe..76c99d685f8c0fdbbe3ccac026f747d7c50dae6f 100644 (file)
 #include "paragraph_funcs.h"
 
 #include "bufferparams.h"
-#include "lyxtext.h"
-#include "paragraph_pimpl.h"
 #include "debug.h"
+#include "lyxtext.h"
+#include "paragraph.h"
+#include "ParagraphParameters.h"
 
 
 namespace lyx {
@@ -188,7 +189,7 @@ void mergeParagraph(BufferParams const & bparams,
        // marked as unmodified. Otherwise, its change is adopted by the first
        // character of the next paragraph.
        if (par.lookupChange(par.size()).type != Change::UNCHANGED) {
-               lyxerr[Debug::CHANGES] <<
+               LYXERR(Debug::CHANGES) <<
                   "merging par with inserted/deleted end-of-par character" << endl;
                par.setChange(par.size(), Change(Change::UNCHANGED));
        }
@@ -242,10 +243,12 @@ bool isFirstInSequence(pit_type par_offset, ParagraphList const & pars)
 
        pit_type dhook_offset = depthHook(par_offset, pars, par.getDepth());
 
+       if (dhook_offset == par_offset)
+               return true;
+
        Paragraph const & dhook = pars[dhook_offset];
 
-       return dhook_offset == par_offset
-               || dhook.layout() != par.layout()
+       return dhook.layout() != par.layout()
                || dhook.getDepth() != par.getDepth();
 }