#include <cctype>
#include <algorithm>
+#include "lyxtext.h"
#include "layout.h"
#include "lyxparagraph.h"
-#include "lyxtext.h"
#include "support/textutils.h"
#include "insets/insetbib.h"
#include "insets/insettext.h"
#include "gettext.h"
#include "bufferparams.h"
#include "buffer.h"
-#include "minibuffer.h"
#include "debug.h"
#include "lyxrc.h"
#include "LyXView.h"
-#include "lyxrow.h"
#include "Painter.h"
#include "tracer.h"
#include "font.h"
#include "encoding.h"
#include "lyxscreen.h"
#include "bufferview_funcs.h"
+#include "language.h"
+#include "lyxfunc.h"
using std::max;
using std::min;
int LyXText::Fill(BufferView * bview, Row * row, int paper_width) const
{
if (paper_width < 0)
- return 0;
+ return 20;
int w;
// get the pure distance
}
int const fill = paper_width - w - RightMargin(bview->buffer(), row);
+ if (fill < 0)
+ return 0;
return fill;
}
tmpfont = GetFont(bview->buffer(), row_ptr->par(), pos);
tmpinset = row_ptr->par()->GetInset(pos);
if (tmpinset) {
- tmpinset->update(bview, tmpfont);
+// tmpinset->update(bview, tmpfont);
asc = tmpinset->ascent(bview, tmpfont);
desc = tmpinset->descent(bview, tmpfont);
maxwidth += tmpinset->width(bview, tmpfont);
#endif
)) {
if (cursor.pos() == 0 )
- bview->owner()->getMiniBuffer()->Set(_("You cannot insert a space at the beginning of a paragraph. Please read the Tutorial."));
+ bview->owner()->getLyXFunc()
+ ->Dispatch(LFUN_MESSAGE,
+ _("You cannot insert a space at the beginning of a paragraph. Please read the Tutorial."));
else
- bview->owner()->getMiniBuffer()->Set(_("You cannot type two spaces this way. Please read the Tutorial."));
+ bview->owner()->getLyXFunc()
+ ->Dispatch(LFUN_MESSAGE,
+ _("You cannot type two spaces this way. Please read the Tutorial."));
charInserted();
return;
}