]> git.lyx.org Git - lyx.git/blobdiff - src/CutAndPaste.C
form para crash fix from John
[lyx.git] / src / CutAndPaste.C
index fbfa1689821e7efea37f047a0f817e834cafb1e7..058ee2d6a4ba562d142a7fce29e1b3b6a7bab096 100644 (file)
@@ -23,6 +23,7 @@
 #endif
 
 using std::pair;
+using lyx::pos_type;
 
 extern BufferView * current_view;
 
@@ -88,7 +89,7 @@ bool CutAndPaste::cutSelection(Paragraph * startpar, Paragraph ** endpar,
                // only within one paragraph
                if (realcut)
                        buf = new Paragraph;
-               Paragraph::size_type i = start;
+               pos_type i = start;
                if (end > startpar->size())
                        end = startpar->size();
                for (; i < end; ++i) {
@@ -151,11 +152,10 @@ bool CutAndPaste::copySelection(Paragraph * startpar, Paragraph * endpar,
        
        textclass = tc;
        
-       if (!endpar ||
-           startpar == endpar) {
+       if (!endpar || startpar == endpar) {
                // only within one paragraph
                buf = new Paragraph;
-               Paragraph::size_type i = start;
+               pos_type i = start;
                if (end > startpar->size())
                        end = startpar->size();
                for (; i < end; ++i) {
@@ -179,7 +179,7 @@ bool CutAndPaste::copySelection(Paragraph * startpar, Paragraph * endpar,
                tmppar2->next(0);
                
                // the buf paragraph is too big
-               Paragraph::size_type tmpi2 = start;
+               pos_type tmpi2 = start;
                for (; tmpi2; --tmpi2)
                        buf->erase(0);