RichText: Fixed bug in bug reporting

git-svn-id: svn://ultimatepp.org/upp/trunk@2165 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2010-03-03 06:22:05 +00:00
parent 61a699b874
commit cb7badb0d3

View file

@ -321,8 +321,13 @@ void RichQtfParser::Error(const char *s) {
RichPara::CharFormat ef;
(Font&) ef = Arial(84).Bold().Underline();
ef.ink = Red;
paragraph.Cat(("ERROR: " + String(s) + ": " +
Filter(String(term, min<int>((int)strlen(term), 20)), NoLow)).ToWString(), ef);
WString e;
e << "ERROR: " << s;
if(*term)
e << ": " << Filter(String(term, min<int>((int)strlen(term), 20)), NoLow).ToWString();
else
e << ".";
paragraph.Cat(e, ef);
target.Cat(paragraph);
FlushStyles();
throw Exc();
@ -361,6 +366,9 @@ void RichQtfParser::TableFormat(bool bw)
t.hspan = GetNumber();
}
else
if(*term == '\0')
Error("Unexpected end of text in cell format");
else
switch(*term++) {
case ' ': return;
case ';': break;