]> git.lyx.org Git - lyx.git/blobdiff - src/text.C
removed a warning from screen and added CFLAGS in lyx.spec.in.
[lyx.git] / src / text.C
index 6d8b9ca4d25bbeb97304813f6ec3094ea1f58e74..c497f3f259cb869a893c2a1cec05bc82999e571a 100644 (file)
@@ -27,6 +27,7 @@
 #include "buffer.h"
 #include "lyxscreen.h"
 #include "minibuffer.h"
+#include "debug.h"
 
 static const int LYX_PAPER_MARGIN = 20;
 
@@ -283,7 +284,7 @@ int LyXText::LeftMargin(Row* row)
 
    /* table stuff -- begin*/ 
    if (row->par->table)
-      parindent.erase();
+      parindent.clear();
    /* table stuff -- end*/       
 
    x = LYX_PAPER_MARGIN;
@@ -306,7 +307,7 @@ int LyXText::LeftMargin(Row* row)
         if (row->par->FirstPhysicalPar()->Previous()) {
            newpar = row->par->DepthHook(row->par->GetDepth());
            if (newpar && lyxstyle.Style(parameters->textclass, newpar->GetLayout())->nextnoindent)
-              parindent.erase();
+              parindent.clear();
         }
       }
    }
@@ -336,7 +337,7 @@ int LyXText::LeftMargin(Row* row)
       
       if (newpar && !row->par->GetLayout()) {
         if (newpar->FirstPhysicalPar()->noindent)
-           parindent.erase();
+           parindent.clear();
         else
            parindent = lyxstyle.Style(parameters->textclass, 
                                       newpar->GetLayout())->parindent;
@@ -513,8 +514,7 @@ int LyXText::RightMargin(Row *row)
       }
    }
 
-   //fprintf(stderr,"rightmargin: %s\n", layout->rightmargin.c_str());
-   //fflush(stderr);
+   //lyxerr << "rightmargin: " << layout->rightmargin << endl;
    x += (lyxstyle.TextClass(parameters->textclass)->defaultfont.signedStringWidth(layout->rightmargin) * 4
         / (row->par->GetDepth() + 4));
    return x;
@@ -3255,8 +3255,7 @@ void LyXText::GetVisibleRow(LyXScreen &scr, int offset,
        LyXFont font;
        int maxdesc;
        if (row_ptr->height <= 0) {
-               fprintf(stderr, "LYX_ERROR: row.height: %d \n",
-                       row_ptr->height);
+               lyxerr << "LYX_ERROR: row.height: " << row_ptr->height << endl;
                return;
        }
        left_margin = LabelEnd(row_ptr);