}
-string const InsetQuotes::dispString(Language const * doclang) const
+string const InsetQuotes::dispString(Language const * loclang) const
{
string disp;
disp += quote_char[quote_index[side_][language_]];
disp = 'ยป';
// in french, spaces are added inside double quotes
- if (times_ == DoubleQ && doclang->code() == "fr") {
+ if (times_ == DoubleQ && prefixIs(loclang->code(), "fr")) {
if (side_ == LeftQ)
disp += " ";
else
}
-int InsetQuotes::width(BufferView * bv, LyXFont const & font) const
+int InsetQuotes::width(BufferView *, LyXFont const & font) const
{
- string text = dispString(bv->buffer()->getLanguage());
+ string const text = dispString(font.language());
int w = 0;
for (string::size_type i = 0; i < text.length(); ++i) {
void InsetQuotes::draw(BufferView * bv, LyXFont const & font,
int baseline, float & x, bool) const
{
- string text = dispString(bv->buffer()->getLanguage());
+ string const text = dispString(font.language());
bv->painter().text(int(x), baseline, text, font);
x += width(bv, font);
lex.nextToken();
parseString(lex.GetString());
lex.next();
- string tmp(lex.GetString());
- if (tmp != "\\end_inset")
- lyxerr << "LyX Warning: Missing \\end_inset "
- "in InsetQuotes::Read." << endl;
+ if (lex.GetString() != "\\end_inset")
+ lex.printError("Missing \\end_inset at this point");
}
int InsetQuotes::latex(Buffer const * buf, ostream & os,
bool /*fragile*/, bool) const
{
+#ifdef WITH_WARNINGS
+#warning How do we get the local language here??
+#endif
string const doclang = buf->getLanguage()->babel();
- int quoteind = quote_index[side_][language_];
+ const int quoteind = quote_index[side_][language_];
string qstr;
if (language_ == FrenchQ && times_ == DoubleQ) {
if (side_ == LeftQ)
qstr = "\\og "; //the spaces are important here
else
- qstr = " \\fg "; //and here
+ qstr = " \\fg{}"; //and here
} else if (doclang == "french") {
if (side_ == LeftQ)
qstr = "<< "; //the spaces are important here
{
char type = quote_char[quote_index[side_][language_]];
+#ifdef DO_USE_DEFAULT_LANGUAGE
if (features.bufferParams().language->lang() == "default"
+#else
+ if (!use_babel
+#endif
&& lyxrc.fontenc != "T1") {
if (times_ == SingleQ)
switch (type) {