#include "insetquotes.h"
#include "support/lyxlib.h"
-#include "error.h"
+#include "debug.h"
#include "lyxfont.h"
#include "lyxrc.h"
#include "buffer.h"
{
int i;
if (str.length() != 3) {
- lyxerr.print("ERROR (InsetQuotes::InsetQuotes):"
- " bad string length.");
+ lyxerr << "ERROR (InsetQuotes::InsetQuotes):"
+ " bad string length." << endl;
str = "eld";
}
}
}
if (i>=6) {
- lyxerr.print("ERROR (InsetQuotes::InsetQuotes):"
- " bad language specification.");
+ lyxerr << "ERROR (InsetQuotes::InsetQuotes):"
+ " bad language specification." << endl;
language = InsetQuotes::EnglishQ;
}
}
}
if (i>=2) {
- lyxerr.print("ERROR (InsetQuotes::InsetQuotes):"
- " bad side specification.");
+ lyxerr << "ERROR (InsetQuotes::InsetQuotes):"
+ " bad side specification." << endl;
side = InsetQuotes::LeftQ;
}
}
}
if (i>=2) {
- lyxerr.print("ERROR (InsetQuotes::InsetQuotes):"
- " bad times specification.");
+ lyxerr << "ERROR (InsetQuotes::InsetQuotes):"
+ " bad times specification." << endl;
times = InsetQuotes::DoubleQ;
}
}
{
string disp;
- disp += quote_char[quote_index[side][language]];
-
+ disp = quote_char[quote_index[side][language]];
if (times == InsetQuotes::DoubleQ)
disp += disp;
{
string text = DispString();
- for (string::size_type i = 0; i < text.length(); ++i) {
- if (text[i] == ' ')
- x += font.width('i');
- else if (i == text.length()-1 || text[i] != text[i+1]) {
- scr.drawString(font, &text[i], baseline, int(x));
- x += font.width(text[i]);
- } else {
- scr.drawString(font, &text[i+1], baseline, int(x));
- x += font.width(',');
- }
- }
-
+ scr.drawString(font, text, baseline, int(x));
+ x += Width(font);
}