parlist-24-a.diff

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7057 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2003-05-28 06:47:15 +00:00
parent 850ec37318
commit d5f3bad9bb
9 changed files with 28 additions and 14 deletions

View File

@ -59,7 +59,7 @@ int nrOfParagraphs();
*/
int SwitchLayoutsBetweenClasses(lyx::textclass_type c1,
lyx::textclass_type c2,
ParagraphList & par,
ParagraphList & par,
ErrorList &);
///
bool checkPastePossible();

View File

@ -3,7 +3,7 @@
#ifndef PARAGRAPH_LIST_H
#define PARAGRAPH_LIST_H
#define NO_STD_LIST 1
//#define NO_STD_LIST 1
#ifndef NO_STD_LIST
@ -11,7 +11,11 @@
#include <list>
typedef std::list<Paragraph> ParagraphList;
struct ParagraphList : public std::list<Paragraph>
{
};
typedef std::pair<ParagraphList::iterator, int> PitPosPair;
#else

View File

@ -26,8 +26,6 @@
#include "support/lstrings.h"
using std::endl;
// Initialization of the counter for the inset id's,
unsigned int Inset::inset_id = 0;

View File

@ -30,10 +30,10 @@ class LatexRunParams;
class LyXText;
class LyXLex;
class Paragraph;
class ParagraphList;
class LyXCursor;
class FuncRequest;
class WordLangTuple;
class ParagraphList;
struct LaTeXFeatures;

View File

@ -174,6 +174,7 @@ string const bibitemWidest(Buffer const * buffer)
ParagraphList::const_iterator it = buffer->paragraphs.begin();
ParagraphList::const_iterator end = buffer->paragraphs.end();
for (; it != end; ++it) {
if (it->bibitem()) {
int const wx =

View File

@ -29,6 +29,10 @@ using std::ostream;
using std::max;
InsetSpace::InsetSpace()
{}
InsetSpace::InsetSpace(Kind k)
: kind_(k)
{}

View File

@ -46,7 +46,8 @@ public:
};
///
InsetSpace() {}
InsetSpace();
///
explicit
InsetSpace(Kind k);

View File

@ -18,11 +18,11 @@
#include "support/types.h"
#include "changes.h"
#include "ParagraphList.h"
#include "LString.h"
#include <boost/optional.hpp>
class Buffer;
class BufferParams;
class BufferView;
class Counters;
@ -32,11 +32,12 @@ class LaTeXFeatures;
class LatexRunParams;
class ParagraphParameters;
class TexRow;
class ParagraphList;
// Define this if you want to try out the new storage container for
// paragraphs. (Lgb)
// This is non working and far from finished.
#define NO_STD_LIST 1
//#define NO_STD_LIST 1
/// A Paragraph holds all text, attributes and insets in a text paragraph
class Paragraph {
@ -338,6 +339,7 @@ inline bool isDeletedText(Paragraph const & par, lyx::pos_type pos)
return par.lookupChange(pos) == Change::DELETED;
}
bool operator==(Paragraph const & lhs, Paragraph const & rhs);
#endif // PARAGRAPH_H

View File

@ -379,7 +379,7 @@ TeXEnvironment(Buffer const * buf,
do {
par = TeXOnePar(buf, paragraphs, par, os, texrow, runparams);
if (par != const_cast<ParagraphList&>(paragraphs).end()&& par->params().depth() > pit->params().depth()) {
if (par != const_cast<ParagraphList&>(paragraphs).end() && par->params().depth() > pit->params().depth()) {
if (par->layout()->isParagraph()) {
// Thinko!
@ -610,13 +610,17 @@ TeXOnePar(Buffer const * buf,
texrow.newline();
}
break;
case LATEX_ENVIRONMENT:
case LATEX_ENVIRONMENT: {
// if its the last paragraph of the current environment
// skip it otherwise fall through
if (boost::next(pit) != const_cast<ParagraphList&>(paragraphs).end()
&& (boost::next(pit)->layout() != pit->layout()
|| boost::next(pit)->params().depth() != pit->params().depth()))
ParagraphList::iterator next = boost::next(pit);
if (next != const_cast<ParagraphList&>(paragraphs).end()
&& (next->layout() != pit->layout()
|| next->params().depth() != pit->params().depth()))
break;
}
// fall through possible
default:
// we don't need it for the last paragraph!!!