]> git.lyx.org Git - lyx.git/blobdiff - src/buffer.C
Reduce Michael's buglist.
[lyx.git] / src / buffer.C
index ac4a50196ad8d47796a400ab1617842418568eb0..d58ef540abba0bab9621b472228b1c90bf14e4af 100644 (file)
@@ -123,6 +123,8 @@ using std::set;
 using std::stack;
 using std::list;
 
+using lyx::pos_type;
+
 // all these externs should eventually be removed.
 extern BufferList bufferlist;
 
@@ -1338,7 +1340,7 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par,
 }
 
 // needed to insert the selection
-void Buffer::insertStringAsLines(Paragraph *& par, Paragraph::pos_type & pos,
+void Buffer::insertStringAsLines(Paragraph *& par, pos_type & pos,
                                  LyXFont const & fn,string const & str) const
 {
        LyXLayout const & layout = textclasslist.Style(params.textclass, 
@@ -1372,9 +1374,8 @@ void Buffer::insertStringAsLines(Paragraph *& par, Paragraph::pos_type & pos,
                                ++pos;
                                space_inserted = true;
                        } else {
-                               const Paragraph::pos_type nb = 8 - pos % 8;
-                               for (Paragraph::pos_type a = 0; 
-                                    a < nb ; ++a) {
+                               const pos_type nb = 8 - pos % 8;
+                               for (pos_type a = 0; a < nb ; ++a) {
                                        par->insertChar(pos, ' ', font);
                                        ++pos;
                                }
@@ -1812,7 +1813,7 @@ string const Buffer::asciiParagraph(Paragraph const * par,
                lyxerr << "Should this ever happen?" << endl;
        }
 
-       for (Paragraph::pos_type i = 0; i < par->size(); ++i) {
+       for (pos_type i = 0; i < par->size(); ++i) {
                if (!i && !noparbreak) {
                        if (linelen > 0)
                                buffer << "\n\n";
@@ -2795,7 +2796,7 @@ void Buffer::simpleLinuxDocOnePar(ostream & os,
 
        stack<PAR_TAG> tag_state;
        // parsing main loop
-       for (Paragraph::pos_type i = 0; i < par->size(); ++i) {
+       for (pos_type i = 0; i < par->size(); ++i) {
 
                PAR_TAG tag_close = NONE;
                list < PAR_TAG > tag_open;
@@ -3288,8 +3289,7 @@ void Buffer::simpleDocBookOnePar(ostream & os,
        //      os << string(depth,' ');
 
        // parsing main loop
-       for (Paragraph::pos_type i = 0;
-            i < par->size(); ++i) {
+       for (pos_type i = 0; i < par->size(); ++i) {
                LyXFont font = par->getFont(params, i);
 
                // handle <emphasis> tag
@@ -3698,8 +3698,7 @@ bool Buffer::isMultiLingual()
 }
 
 
-Buffer::inset_iterator::inset_iterator(Paragraph * paragraph,
-                                      Paragraph::pos_type pos)
+Buffer::inset_iterator::inset_iterator(Paragraph * paragraph, pos_type pos)
        : par(paragraph)
 {
        it = par->InsetIterator(pos);