X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ftext.C;h=c497f3f259cb869a893c2a1cec05bc82999e571a;hb=a858be7332e331e0244e4dba7b0931b6072ffd3d;hp=6d8b9ca4d25bbeb97304813f6ec3094ea1f58e74;hpb=0eccdd1c3613e5170deb77b22174dd0afde833e9;p=lyx.git diff --git a/src/text.C b/src/text.C index 6d8b9ca4d2..c497f3f259 100644 --- a/src/text.C +++ b/src/text.C @@ -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);