diff --git a/RELEASE-NOTES b/RELEASE-NOTES index b8d8186428..8943dd7d16 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -35,8 +35,3 @@ they have not yet been applied because of incomplete testing. making latex. http://bugzilla.lyx.org/show_bug.cgi?id=1973 -- Bookmarks and links to LaTeX errors are broken after paragraph - deletion/insertion. - http://bugzilla.lyx.org/show_bug.cgi?id=2284 - http://bugzilla.lyx.org/show_bug.cgi?id=2242 - diff --git a/src/CutAndPaste.C b/src/CutAndPaste.C index 9c78a841ed..373ee6c01b 100644 --- a/src/CutAndPaste.C +++ b/src/CutAndPaste.C @@ -214,14 +214,16 @@ pasteSelectionHelper(Buffer const & buffer, // Paste it! if (empty) { - pars.insert(pars.begin() + pit, insertion.begin(), + pars.insert(boost::next(pars.begin(), pit), + insertion.begin(), insertion.end()); // merge the empty par with the last par of the insertion mergeParagraph(buffer.params(), pars, pit + insertion.size() - 1); } else { - pars.insert(pars.begin() + pit + 1, insertion.begin(), + pars.insert(boost::next(pars.begin(), pit + 1), + insertion.begin(), insertion.end()); // merge the first par of the insertion with the current par @@ -314,7 +316,8 @@ void copySelectionHelper(ParagraphList & pars, BOOST_ASSERT(startpit != endpit || start <= end); // Clone the paragraphs within the selection. - ParagraphList paragraphs(pars.begin() + startpit, pars.begin() + endpit + 1); + ParagraphList paragraphs(boost::next(pars.begin(), startpit), + boost::next(pars.begin(), endpit + 1)); for_each(paragraphs.begin(), paragraphs.end(), resetOwnerAndChanges()); diff --git a/src/CutAndPaste.h b/src/CutAndPaste.h index ff9ec902b3..3831a04ab7 100644 --- a/src/CutAndPaste.h +++ b/src/CutAndPaste.h @@ -14,6 +14,8 @@ #ifndef CUTANDPASTE_H #define CUTANDPASTE_H +#include "ParagraphList_fwd.h" + #include "support/types.h" #include @@ -23,7 +25,6 @@ class Buffer; class ErrorList; class LyXTextClass; class LCursor; -class ParagraphList; /// namespace lyx { diff --git a/src/ParagraphList.h b/src/ParagraphList.h new file mode 100644 index 0000000000..70c0ff1066 --- /dev/null +++ b/src/ParagraphList.h @@ -0,0 +1,22 @@ +// -*- C++ -*- +/** + * \file ParagraphList_fwd.h + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author Angus Leeming + * + * Full author contact details are available in file CREDITS. + */ + +#ifndef PARAGRAPH_LIST_H +#define PARAGRAPH_LIST_H + +#include "paragraph.h" + +#include "support/RandomAccessList.h" + +/// Container for all kind of Paragraphs used in Lyx. +typedef RandomAccessList ParagraphList; + +#endif diff --git a/src/ParagraphList_fwd.h b/src/ParagraphList_fwd.h index df6d55041d..6784768525 100644 --- a/src/ParagraphList_fwd.h +++ b/src/ParagraphList_fwd.h @@ -12,22 +12,11 @@ #ifndef PARAGRAPH_LIST_FWD_H #define PARAGRAPH_LIST_FWD_H -#include "paragraph.h" +template +class RandomAccessList; -#include +class Paragraph; -class ParagraphList : public std::vector -{ -public: - /// - typedef std::vector BaseType; - /// - ParagraphList(); - /// - template - ParagraphList(Iter beg, Iter end) - : BaseType(beg, end) - {} -}; +typedef RandomAccessList ParagraphList; #endif diff --git a/src/buffer.h b/src/buffer.h index ba3ec7c40c..1eb455fc81 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -15,6 +15,7 @@ #include "InsetList.h" #include "dociterator.h" +#include "ParagraphList_fwd.h" #include "support/limited_stack.h" #include "support/types.h" @@ -42,7 +43,6 @@ class LaTeXFeatures; class Language; class MacroData; class OutputParams; -class ParagraphList; class ParConstIterator; class ParIterator; class TeXErrors; diff --git a/src/buffer_funcs.C b/src/buffer_funcs.C index d13042f063..e55f7e8337 100644 --- a/src/buffer_funcs.C +++ b/src/buffer_funcs.C @@ -27,7 +27,7 @@ #include "lyxtextclass.h" #include "paragraph.h" #include "paragraph_funcs.h" -#include "ParagraphList_fwd.h" +#include "ParagraphList.h" #include "ParagraphParameters.h" #include "pariterator.h" #include "lyxvc.h" diff --git a/src/bufferlist.C b/src/bufferlist.C index 2ae3df6687..3292f26c57 100644 --- a/src/bufferlist.C +++ b/src/bufferlist.C @@ -22,7 +22,7 @@ #include "lyx_main.h" #include "output_latex.h" #include "paragraph.h" -#include "ParagraphList_fwd.h" +#include "ParagraphList.h" #include "frontends/Alert.h" diff --git a/src/insets/insetbibitem.C b/src/insets/insetbibitem.C index c26cb17a6e..4e1c5979f3 100644 --- a/src/insets/insetbibitem.C +++ b/src/insets/insetbibitem.C @@ -19,7 +19,7 @@ #include "lyxfont.h" #include "lyxlex.h" #include "paragraph.h" -#include "ParagraphList_fwd.h" +#include "ParagraphList.h" #include "frontends/font_metrics.h" diff --git a/src/insets/insetcharstyle.C b/src/insets/insetcharstyle.C index df6efba2db..0077b56228 100644 --- a/src/insets/insetcharstyle.C +++ b/src/insets/insetcharstyle.C @@ -289,6 +289,7 @@ int InsetCharStyle::linuxdoc(Buffer const & buf, ostream & os, int InsetCharStyle::docbook(Buffer const & buf, ostream & os, OutputParams const & runparams) const { + ParagraphList::const_iterator beg = paragraphs().begin(); ParagraphList::const_iterator par = paragraphs().begin(); ParagraphList::const_iterator end = paragraphs().end(); @@ -298,7 +299,7 @@ int InsetCharStyle::docbook(Buffer const & buf, ostream & os, for (; par != end; ++par) { par->simpleDocBookOnePar(buf, os, runparams, - outerFont(par - paragraphs().begin(), + outerFont(std::distance(beg, par), paragraphs())); } diff --git a/src/insets/insettext.C b/src/insets/insettext.C index 99ff0b3186..94f03fdb9d 100644 --- a/src/insets/insettext.C +++ b/src/insets/insettext.C @@ -412,7 +412,8 @@ void InsetText::appendParagraphs(Buffer * buffer, ParagraphList & plist) ParagraphList::iterator pit = plist.begin(); ParagraphList::iterator ins = pl.insert(pl.end(), *pit); ++pit; - mergeParagraph(buffer->params(), pl, ins - pl.begin() - 1); + mergeParagraph(buffer->params(), pl, + std::distance(pl.begin(), ins) - 1); for_each(pit, plist.end(), bind(&ParagraphList::push_back, ref(pl), _1)); diff --git a/src/insets/insettext.h b/src/insets/insettext.h index c6ba640afb..19ed3d8abc 100644 --- a/src/insets/insettext.h +++ b/src/insets/insettext.h @@ -16,6 +16,7 @@ #include "RowList_fwd.h" #include "lyxfont.h" #include "lyxtext.h" +#include "ParagraphList_fwd.h" #include "support/types.h" @@ -27,7 +28,6 @@ class BufferView; class CursorSlice; class Dimension; class LColor_color; -class ParagraphList; /** diff --git a/src/lyxtext.h b/src/lyxtext.h index e5cc72d738..d2c99999ab 100644 --- a/src/lyxtext.h +++ b/src/lyxtext.h @@ -21,7 +21,7 @@ #include "lyxfont.h" #include "layout.h" #include "lyxlayout_ptr_fwd.h" -#include "ParagraphList_fwd.h" +#include "ParagraphList.h" #include diff --git a/src/output_docbook.C b/src/output_docbook.C index ddb95b0842..45c2aa78d5 100644 --- a/src/output_docbook.C +++ b/src/output_docbook.C @@ -20,7 +20,7 @@ #include "debug.h" #include "paragraph.h" #include "paragraph_funcs.h" -#include "ParagraphList_fwd.h" +#include "ParagraphList.h" #include "ParagraphParameters.h" #include "sgml.h" @@ -47,7 +47,7 @@ namespace { ParagraphList::const_iterator searchParagraph(ParagraphList::const_iterator const & par, ParagraphList::const_iterator const & pend) { - ParagraphList::const_iterator p = par + 1; + ParagraphList::const_iterator p = boost::next(par); for( ; p != pend && p->layout()->latextype == LATEX_PARAGRAPH; ++p); @@ -59,7 +59,7 @@ ParagraphList::const_iterator searchCommand(ParagraphList::const_iterator const ParagraphList::const_iterator const & pend) { LyXLayout_ptr const & bstyle = par->layout(); - ParagraphList::const_iterator p = par + 1; + ParagraphList::const_iterator p = boost::next(par); for( ; p != pend; ++p) { LyXLayout_ptr const & style = p->layout(); @@ -74,7 +74,7 @@ ParagraphList::const_iterator searchEnvironment(ParagraphList::const_iterator co ParagraphList::const_iterator const & pend) { LyXLayout_ptr const & bstyle = par->layout(); - ParagraphList::const_iterator p = par + 1; + ParagraphList::const_iterator p = boost::next(par); for( ; p != pend; ++p) { LyXLayout_ptr const & style = p->layout(); if( style->latextype == LATEX_COMMAND) @@ -108,10 +108,10 @@ ParagraphList::const_iterator makeParagraph(Buffer const & buf, if (par != pbegin) os << '\n'; if (par->layout() == defaultstyle && par->emptyTag()) { - par->simpleDocBookOnePar(buf, os, runparams, outerFont(par - paragraphs.begin(), paragraphs)); + par->simpleDocBookOnePar(buf, os, runparams, outerFont(std::distance(paragraphs.begin(), par), paragraphs)); } else { sgml::openTag(buf, os, runparams, *par); - par->simpleDocBookOnePar(buf, os, runparams, outerFont(par - paragraphs.begin(), paragraphs)); + par->simpleDocBookOnePar(buf, os, runparams, outerFont(std::distance(paragraphs.begin(), par), paragraphs)); sgml::closeTag(os, *par); } } @@ -170,7 +170,7 @@ ParagraphList::const_iterator makeEnvironment(Buffer const & buf, case LATEX_ITEM_ENVIRONMENT: { if(par->params().depth() == pbegin->params().depth()) { sgml::openTag(os, wrapper); - par->simpleDocBookOnePar(buf, os, runparams, outerFont(par - paragraphs.begin(), paragraphs), sep); + par->simpleDocBookOnePar(buf, os, runparams, outerFont(std::distance(paragraphs.begin(), par), paragraphs), sep); sgml::closeTag(os, wrapper); ++par; } @@ -239,7 +239,7 @@ ParagraphList::const_iterator makeCommand(Buffer const & buf, // Opend inner tag and close inner tags sgml::openTag(os, bstyle->innertag()); - par->simpleDocBookOnePar(buf, os, runparams, outerFont(par - paragraphs.begin(), paragraphs)); + par->simpleDocBookOnePar(buf, os, runparams, outerFont(std::distance(paragraphs.begin(), par), paragraphs)); sgml::closeTag(os, bstyle->innertag()); os << '\n'; diff --git a/src/output_docbook.h b/src/output_docbook.h index 41657ade8b..45949f809c 100644 --- a/src/output_docbook.h +++ b/src/output_docbook.h @@ -13,11 +13,12 @@ #ifndef OUTPUT_DOCBOOK_H #define OUTPUT_DOCBOOK_H +#include "ParagraphList_fwd.h" + #include class Buffer; class OutputParams; -class ParagraphList; /// void docbookParagraphs(ParagraphList const & subset, diff --git a/src/output_latex.C b/src/output_latex.C index bca30a6547..92f5d2da02 100644 --- a/src/output_latex.C +++ b/src/output_latex.C @@ -333,7 +333,7 @@ TeXOnePar(Buffer const & buf, os << everypar; bool need_par = pit->simpleTeXOnePar(buf, bparams, - outerFont(pit - paragraphs.begin(), paragraphs), + outerFont(std::distance(paragraphs.begin(), pit), paragraphs), os, texrow, runparams); // Make sure that \\par is done with the font of the last @@ -346,8 +346,8 @@ TeXOnePar(Buffer const & buf, // We do not need to use to change the font for the last paragraph // or for a command. LyXFont const outerfont = - outerFont(pit - paragraphs.begin(), -paragraphs); + outerFont(std::distance(paragraphs.begin(), pit), + paragraphs); LyXFont const font = (pit->empty() diff --git a/src/output_latex.h b/src/output_latex.h index 1bd15a03ea..f2a47b0de3 100644 --- a/src/output_latex.h +++ b/src/output_latex.h @@ -12,11 +12,12 @@ #ifndef OUTPUT_LATEX_H #define OUTPUT_LATEX_H +#include "ParagraphList_fwd.h" + #include class Buffer; class OutputParams; -class ParagraphList; class TexRow; /// Just a wrapper for the method below, first creating the ofstream. diff --git a/src/output_linuxdoc.C b/src/output_linuxdoc.C index 7db9ab81cb..f704556fca 100644 --- a/src/output_linuxdoc.C +++ b/src/output_linuxdoc.C @@ -17,7 +17,7 @@ #include "bufferparams.h" #include "paragraph.h" #include "paragraph_funcs.h" -#include "ParagraphList_fwd.h" +#include "ParagraphList.h" #include "ParagraphParameters.h" #include "sgml.h" @@ -133,7 +133,7 @@ void linuxdocParagraphs(Buffer const & buf, } pit->simpleLinuxDocOnePar(buf, os, - outerFont(pit - paragraphs.begin(), paragraphs), + outerFont(std::distance(paragraphs.begin(), pit), paragraphs), runparams, depth); os << "\n"; diff --git a/src/output_linuxdoc.h b/src/output_linuxdoc.h index 37a9012611..625bf47926 100644 --- a/src/output_linuxdoc.h +++ b/src/output_linuxdoc.h @@ -13,10 +13,11 @@ #ifndef OUTPUT_LINUXDOC_H #define OUTPUT_LINUXDOC_H +#include "ParagraphList_fwd.h" + #include class Buffer; -class ParagraphList; class OutputParams; /// diff --git a/src/output_plaintext.C b/src/output_plaintext.C index 3a99a8eb2a..5c7c32c390 100644 --- a/src/output_plaintext.C +++ b/src/output_plaintext.C @@ -19,7 +19,7 @@ #include "output.h" #include "outputparams.h" #include "paragraph.h" -#include "ParagraphList_fwd.h" +#include "ParagraphList.h" #include "ParagraphParameters.h" #include "support/lstrings.h" diff --git a/src/paragraph.C b/src/paragraph.C index 4bfe0db3fe..6cf2afa1c4 100644 --- a/src/paragraph.C +++ b/src/paragraph.C @@ -66,10 +66,6 @@ using std::ostream; using std::ostringstream; -ParagraphList::ParagraphList() -{} - - Paragraph::Paragraph() : begin_of_body_(0), pimpl_(new Paragraph::Pimpl(this)) { diff --git a/src/paragraph_funcs.C b/src/paragraph_funcs.C index b5b43d87d7..c18169af5b 100644 --- a/src/paragraph_funcs.C +++ b/src/paragraph_funcs.C @@ -96,7 +96,8 @@ void breakParagraph(BufferParams const & bparams, { // create a new paragraph, and insert into the list ParagraphList::iterator tmp = - pars.insert(pars.begin() + par_offset + 1, Paragraph()); + pars.insert(boost::next(pars.begin(), par_offset + 1), + Paragraph()); Paragraph & par = pars[par_offset]; @@ -193,7 +194,8 @@ void breakParagraphConservative(BufferParams const & bparams, ParagraphList & pars, pit_type par_offset, pos_type pos) { // create a new paragraph - Paragraph & tmp = *pars.insert(pars.begin() + par_offset + 1, Paragraph()); + Paragraph & tmp = *pars.insert(boost::next(pars.begin(), par_offset + 1), + Paragraph()); Paragraph & par = pars[par_offset]; if (bparams.tracking_changes) @@ -259,7 +261,7 @@ void mergeParagraph(BufferParams const & bparams, // Move the change status of "carriage return" over par.setChange(par.size(), cr); - pars.erase(pars.begin() + par_offset + 1); + pars.erase(boost::next(pars.begin(), par_offset + 1)); } diff --git a/src/paragraph_funcs.h b/src/paragraph_funcs.h index 3686b36c84..0953a6dd1c 100644 --- a/src/paragraph_funcs.h +++ b/src/paragraph_funcs.h @@ -12,6 +12,8 @@ #ifndef PARAGRAPH_FUNCS_H #define PARAGRAPH_FUNCS_H +#include "ParagraphList_fwd.h" + #include "support/types.h" class Buffer; @@ -19,7 +21,6 @@ class BufferParams; class InsetBase; class LyXFont; class Paragraph; -class ParagraphList; /** * This breaks a paragraph at the specified position. diff --git a/src/pariterator.h b/src/pariterator.h index 1dbd705d7b..304faaf599 100644 --- a/src/pariterator.h +++ b/src/pariterator.h @@ -13,6 +13,7 @@ #define PARITERATOR_H #include "dociterator.h" +#include "ParagraphList_fwd.h" #include "support/types.h" @@ -24,7 +25,6 @@ class InsetBase; class LyXText; -class ParagraphList; class ParIterator : public std::iterator, diff --git a/src/support/RandomAccessList.h b/src/support/RandomAccessList.h new file mode 100644 index 0000000000..2e419bd700 --- /dev/null +++ b/src/support/RandomAccessList.h @@ -0,0 +1,279 @@ +// -*- C++ -*- +/** + * \file RandomAccessList.h + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author Abdelrazak Younes + * + * Full author contact details are available in file CREDITS. + * + */ + +#ifndef RANDOM_ACESS_LIST_H +#define RANDOM_ACESS_LIST_H + +//#include "debug.h" + +#include + +#include +#include +#include + +#define USE_OLD_ITERATOR 1 + +/// Random Access List. +/** +This templatized class provide a std::vector like interface to a +standard std::list underneath. An important property is that it +keeps the std::list::iterator interface. A typical use would be: + + typedef RandomAccessList MyContainer; + +Then you can use MyContainer as if it was a standard +std::vector for operator[] access and as if it was a +standard std::list for iterator access. The main difference with +std::vector is that insertion of elements is much less costly. Compared +to a standard list alone, there is of course a small overhead because +the class always keeps its internal vector of iterator (it_vector_) up +to date. +*/ +template +class RandomAccessList { +public: + // types + typedef std::list Container; + typedef typename Container::reference reference; + typedef typename Container::const_reference const_reference; +#if USE_OLD_ITERATOR + // iterator (below) + typedef typename Container::iterator iterator; + // const_iterator (below) + typedef typename Container::const_iterator const_iterator; +#else + // wip +#endif + typedef typename Container::size_type size_type; + typedef typename Container::difference_type difference_type; + typedef typename Container::value_type value_type; + typedef typename Container::allocator_type allocator_type; + typedef typename Container::pointer pointer; + typedef typename Container::const_pointer const_pointer; + // reverse_iterator + // const_reverse_iterator + + typedef std::vector IterCont; + + // construct/copy/destroy + + RandomAccessList() + {} + + // RandomAccessList(size_type n T const & value = T()) + + template + RandomAccessList(InputIterator first, InputIterator last) + { + assign(first, last); + } + + + + RandomAccessList(RandomAccessList const & x) + { + assign(x.begin(), x.end()); + } + + // ~RandomAccessList() + + /// + RandomAccessList & operator=(RandomAccessList const & x) + { + assign(x.begin(), x.end()); + return *this; + } + + template + void assign(InputIterator first, InputIterator last) + { + container_.assign(first, last); + recreateVector(); + } + + + // void assign(size_type n, T const & u); + + // iterators + + iterator begin() + { + return container_.begin(); + } + + const_iterator begin() const + { + return container_.begin(); + } + + iterator end() + { + return container_.end(); + } + + const_iterator end() const + { + return container_.end(); + } + + // reverse_iterator rbegin(); + // const_reverse_iterator rbegin() const; + // reverse_iterator rend(); + // const_reverse_iterator rend() const; + + // capacity + size_type size() const + { + return iterCont_.size(); + } + + size_type max_size() const + { + return iterCont_.max_size(); + } + + // void resize(size_type sz, T c = T()); + + size_type capacity() const + { + return iterCont_.capacity(); + } + + bool empty() const + { + return container_.empty(); + } + + // void reserve(size_type n); + + // element access + + reference operator[](size_type pos) + { + return *iterCont_[pos]; + } + + /// + const_reference operator[](size_type pos) const + { + return *iterCont_[pos]; + } + + reference at(size_type pos) + { + return *iterCont_.at(pos); + } + + const_reference at(size_type pos) const + { + return *iterCont_.at(pos); + } + + reference front() + { + return container_.front(); + } + + const_reference front() const + { + return container_.front(); + } + + reference back() + { + return container_.back(); + } + + const_reference back() const + { + return container_.back(); + } + + // modifiers + + void push_back(T const & x) + { + typename Container::iterator it = + container_.insert(container_.end(), x); + iterCont_.push_back(it); + } + + void pop_back() + { + container_.pop_back(); + iterCont_.pop_back(); + } + + iterator insert(iterator position, T const & x) + { + typename Container::iterator it = + container_.insert(position, x); + recreateVector(); + return it; + } + + // void insert(iterator position, size_type n, T const & x); + + template + void insert(iterator position, + InputIterator first, InputIterator last) + { + container_.insert(position, first, last); + recreateVector(); + } + + iterator erase(iterator position) + { + typename Container::iterator it = + container_.erase(position); + recreateVector(); + return it; + } + + iterator erase(iterator first, iterator last) + { + typename Container::iterator it = + container_.erase(first, last); + recreateVector(); + return it; + } + + void swap(RandomAccessList & x) + { + std::swap(container_, x.container_); + std::swap(iterCont_, x.iterCont_); + } + + void clear() + { + container_.clear(); + iterCont_.clear(); + } + +private: + void recreateVector() + { + iterCont_.clear(); + typename Container::iterator beg = container_.begin(); + typename Container::iterator end = container_.end(); + for (; beg != end; ++beg) + iterCont_.push_back(beg); + } + + /// Our container. + Container container_; + /// Our container of iterators. + IterCont iterCont_; +}; + +#endif diff --git a/src/text.C b/src/text.C index f8cc42b480..2ef4adb2a1 100644 --- a/src/text.C +++ b/src/text.C @@ -1414,8 +1414,8 @@ void LyXText::acceptChange(LCursor & cur) if (type == Change::DELETED) { ParagraphList & plist = paragraphs(); if (it.pit() + 1 < et.pit()) - pars_.erase(plist.begin() + it.pit() + 1, - plist.begin() + et.pit()); + pars_.erase(boost::next(plist.begin(), it.pit() + 1), + boost::next(plist.begin(), et.pit())); // Paragraph merge if appropriate: if (pars_[it.pit()].lookupChange(pars_[it.pit()].size()) @@ -1451,8 +1451,8 @@ void LyXText::rejectChange(LCursor & cur) if (type == Change::INSERTED) { ParagraphList & plist = paragraphs(); if (it.pit() + 1 < et.pit()) - pars_.erase(plist.begin() + it.pit() + 1, - plist.begin() + et.pit()); + pars_.erase(boost::next(plist.begin(), it.pit() + 1), + boost::next(plist.begin(), et.pit())); // Paragraph merge if appropriate: if (pars_[it.pit()].lookupChange(pars_[it.pit()].size()) == Change::INSERTED) { diff --git a/src/text2.C b/src/text2.C index 42ee4e5358..feb5749ce4 100644 --- a/src/text2.C +++ b/src/text2.C @@ -1258,7 +1258,7 @@ bool LyXText::deleteEmptyParagraphMechanism(LCursor & cur, LCursor & old) max(old.pit() - 1, pit_type(0)), min(old.pit() + 1, old.lastpit())); ParagraphList & plist = old.text()->paragraphs(); - plist.erase(plist.begin() + old.pit()); + plist.erase(boost::next(plist.begin(), old.pit())); // see #warning above if (cur.depth() >= old.depth()) { diff --git a/src/undo.C b/src/undo.C index 8e5fcc334f..536a2e4d5c 100644 --- a/src/undo.C +++ b/src/undo.C @@ -22,6 +22,7 @@ #include "BufferView.h" #include "lyxtext.h" #include "paragraph.h" +#include "ParagraphList.h" #include "mathed/math_support.h" #include "insets/inset.h" diff --git a/src/undo.h b/src/undo.h index fe677a8a4b..14fcb4b18e 100644 --- a/src/undo.h +++ b/src/undo.h @@ -17,7 +17,7 @@ #define UNDO_H #include "dociterator.h" -#include "ParagraphList_fwd.h" +#include "ParagraphList.h" #include "bufferparams.h" #include "support/types.h" diff --git a/status.14x b/status.14x index 552b6d0200..a9ba7e54f3 100644 --- a/status.14x +++ b/status.14x @@ -107,3 +107,6 @@ What's new - Compilation fix (gtk frontend) for gcc 4.1. +- Bookmarks and links to LaTeX errors are broken after paragraph + deletion/insertion (bugs 2284 and 2242). +