Mostly just a simple switch-over, but some small other things as well.

Have a look.

? src/less
? src/frontends/xforms/lyx_forms.h
? src/frontends/xforms/lyx_xpm.h
Index: src/CutAndPaste.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/CutAndPaste.h,v
retrieving revision 1.25
diff -u -p -r1.25 CutAndPaste.h
--- src/CutAndPaste.h	20 May 2003 16:51:29 -0000	1.25
+++ src/CutAndPaste.h	27 May 2003 23:03:28 -0000
@@ -59,7 +59,7 @@ int nrOfParagraphs();
 */
 int SwitchLayoutsBetweenClasses(lyx::textclass_type c1,
 				lyx::textclass_type c2,
-				ParagraphList & par, 
+				ParagraphList & par,
 				ErrorList &);
 ///
 bool checkPastePossible();
Index: src/ParagraphList.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ParagraphList.h,v
retrieving revision 1.18
diff -u -p -r1.18 ParagraphList.h
--- src/ParagraphList.h	27 May 2003 22:41:02 -0000	1.18
+++ src/ParagraphList.h	27 May 2003 23:03:29 -0000
@@ -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
 
Index: src/paragraph.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/paragraph.h,v
retrieving revision 1.83
diff -u -p -r1.83 paragraph.h
--- src/paragraph.h	27 May 2003 22:41:03 -0000	1.83
+++ src/paragraph.h	27 May 2003 23:03:30 -0000
@@ -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  {
@@ -337,6 +338,7 @@ inline bool isDeletedText(Paragraph cons
 {
 	return par.lookupChange(pos) == Change::DELETED;
 }
+
 
 bool operator==(Paragraph const & lhs, Paragraph const & rhs);
 
Index: src/paragraph_funcs.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/paragraph_funcs.C,v
retrieving revision 1.42
diff -u -p -r1.42 paragraph_funcs.C
--- src/paragraph_funcs.C	27 May 2003 22:41:03 -0000	1.42
+++ src/paragraph_funcs.C	27 May 2003 23:03:30 -0000
@@ -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!!!
Index: src/insets/inset.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/inset.C,v
retrieving revision 1.94
diff -u -p -r1.94 inset.C
--- src/insets/inset.C	26 May 2003 09:13:53 -0000	1.94
+++ src/insets/inset.C	27 May 2003 23:03:33 -0000
@@ -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;
Index: src/insets/inset.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/inset.h,v
retrieving revision 1.92
diff -u -p -r1.92 inset.h
--- src/insets/inset.h	26 May 2003 09:13:53 -0000	1.92
+++ src/insets/inset.h	27 May 2003 23:03:33 -0000
@@ -30,10 +30,10 @@ class LatexRunParams;
 class LyXText;
 class LyXLex;
 class Paragraph;
-class ParagraphList;
 class LyXCursor;
 class FuncRequest;
 class WordLangTuple;
+class ParagraphList;
 
 struct LaTeXFeatures;
 
Index: src/insets/insetbibitem.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetbibitem.C,v
retrieving revision 1.13
diff -u -p -r1.13 insetbibitem.C
--- src/insets/insetbibitem.C	27 May 2003 22:41:04 -0000	1.13
+++ src/insets/insetbibitem.C	27 May 2003 23:03:33 -0000
@@ -174,6 +174,7 @@ string const bibitemWidest(Buffer const 
 
 	ParagraphList::const_iterator it = buffer->paragraphs.begin();
 	ParagraphList::const_iterator end = buffer->paragraphs.end();
+
 	for (; it != end; ++it) {
 		if (it->bibitem()) {
 			int const wx =
Index: src/insets/insetspace.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetspace.C,v
retrieving revision 1.6
diff -u -p -r1.6 insetspace.C
--- src/insets/insetspace.C	27 May 2003 13:54:59 -0000	1.6
+++ src/insets/insetspace.C	27 May 2003 23:03:33 -0000
@@ -29,6 +29,10 @@ using std::ostream;
 using std::max;
 
 
+InsetSpace::InsetSpace()
+{}
+
+
 InsetSpace::InsetSpace(Kind k)
 	: kind_(k)
 {}
Index: src/insets/insetspace.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetspace.h,v
retrieving revision 1.5
diff -u -p -r1.5 insetspace.h
--- src/insets/insetspace.h	26 May 2003 09:13:53 -0000	1.5
+++ src/insets/insetspace.h	27 May 2003 23:03:33 -0000
@@ -46,7 +46,8 @@ public:
 	};
 
 	///
-	InsetSpace() {}
+	InsetSpace();
+
 	///
 	explicit
 	InsetSpace(Kind k);
-- 
        Lgb

Reply via email to