]> git.lyx.org Git - lyx.git/blobdiff - src/text2.C
add missing writeNormal() methods to some insets
[lyx.git] / src / text2.C
index dab824fb143f6faae5da6f9ff077ffa4f3b2ab3d..500b2a7a536e3447f96ff8985b158979741aa150 100644 (file)
@@ -1137,8 +1137,7 @@ void LyXText::toggleFree(BufferView * bview,
 }
 
 
-string
-LyXText::getStringToIndex(BufferView * bview)
+string LyXText::getStringToIndex(BufferView * bview)
 {
        string idxstring;
        
@@ -1170,8 +1169,8 @@ LyXText::getStringToIndex(BufferView * bview)
        return idxstring;
 }
 
-Paragraph::size_type
-LyXText::beginningOfMainBody(Buffer const * buf,
+
+Paragraph::size_type LyXText::beginningOfMainBody(Buffer const * buf,
                             Paragraph const * par) const
 {
        if (textclasslist.Style(buf->params.textclass,
@@ -1193,7 +1192,7 @@ void LyXText::setParagraph(BufferView * bview,
                           bool pagebreak_top, bool pagebreak_bottom,
                           VSpace const & space_top,
                           VSpace const & space_bottom,
-                           Spacing const & spacing,
+                          Spacing const & spacing,
                           LyXAlignment align, 
                           string labelwidthstring,
                           bool noindent) 
@@ -1760,16 +1759,16 @@ void LyXText::cutSelection(BufferView * bview, bool doclear, bool realcut)
                int pos = selection.end.pos();
                CutAndPaste::cutSelection(selection.start.par(), &endpar,
                                          selection.start.pos(), pos,
-                                         bview->buffer()->params.textclass, doclear,
-                                         realcut);
+                                         bview->buffer()->params.textclass,
+                                         doclear, realcut);
                selection.end.pos(pos);
        } else {
                endpar = selection.end.par();
                int pos = selection.end.pos();
                CutAndPaste::cutSelection(selection.start.par(), &endpar,
                                          selection.start.pos(), pos,
-                                         bview->buffer()->params.textclass, doclear,
-                                                                 realcut);
+                                         bview->buffer()->params.textclass,
+                                         doclear, realcut);
                cursor.par(endpar);
                selection.end.par(endpar);
                selection.end.pos(pos);
@@ -1985,7 +1984,7 @@ bool LyXText::gotoNextInset(BufferView * bview,
 
 
 void LyXText::checkParagraph(BufferView * bview, Paragraph * par,
-                            Paragraph::size_type pos)
+                             Paragraph::size_type pos)
 {
        LyXCursor tmpcursor;                    
 
@@ -2028,7 +2027,8 @@ void LyXText::checkParagraph(BufferView * bview, Paragraph * par,
        // check the special right address boxes
        if (textclasslist.Style(bview->buffer()->params.textclass,
                                par->getLayout()).margintype
-           == MARGIN_RIGHT_ADDRESS_BOX) {
+           == MARGIN_RIGHT_ADDRESS_BOX)
+       {
                tmpcursor.par(par);
                tmpcursor.row(row);
                tmpcursor.y(y);
@@ -2070,7 +2070,7 @@ bool LyXText::updateInset(BufferView * bview, Inset * inset)
 {
        // first check the current paragraph
        int pos = cursor.par()->getPositionOfInset(inset);
-       if (pos != -1){
+       if (pos != -1) {
                checkParagraph(bview, cursor.par(), pos);
                return true;
        }
@@ -2080,7 +2080,7 @@ bool LyXText::updateInset(BufferView * bview, Inset * inset)
        Paragraph * par = firstParagraph();
        do {
                pos = par->getPositionOfInset(inset);
-               if (pos != -1){
+               if (pos != -1) {
                        checkParagraph(bview, par, pos);
                        return true;
                }
@@ -2273,7 +2273,8 @@ void LyXText::setCursorFromCoordinates(BufferView * bview, LyXCursor & cur,
    
        Row * row = getRowNearY(y);
        bool bound = false;
-       int const column = getColumnNearX(bview, row, x, bound);
+       Paragraph::size_type const column = getColumnNearX(bview, row, x,
+                                                          bound);
    
        cur.par(row->par());
        cur.pos(row->pos() + column);
@@ -2575,17 +2576,17 @@ Paragraph * LyXText::ownerParagraph() const
 }
 
 
-Paragraph * LyXText::ownerParagraph(Paragraph * p) const
+void LyXText::ownerParagraph(Paragraph * p) const
 {
        if (inset_owner) {
                inset_owner->paragraph(p);
        } else {
                bv_owner->buffer()->paragraph = p;
        }
-       return 0;
 }
 
-Paragraph * LyXText::ownerParagraph(int id, Paragraph * p) const
+
+void LyXText::ownerParagraph(int id, Paragraph * p) const
 {
        Paragraph * op = bv_owner->buffer()->getParFromID(id);
        if (op && op->inInset()) {
@@ -2597,7 +2598,6 @@ Paragraph * LyXText::ownerParagraph(int id, Paragraph * p) const
                        bv_owner->buffer()->paragraph = p;
                }
        }
-       return 0;
 }