#include "insets/insetspecialchar.h"
#include "insets/insettext.h"
#include "insets/insetfloat.h"
+#include "insets/insetwrap.h"
#include "support/LAssert.h"
#include "support/textutils.h"
while (par && par_depth && !tmpfont.resolved()) {
par = par->outerHook();
if (par) {
-#ifndef INHERIT_LANGUAGE
tmpfont.realize(par->layout()->font);
-#else
- tmpfont.realize(tclass[par->layout()]->font,
- buf->params.language);
-#endif
par_depth = par->getDepth();
}
}
-#ifndef INHERIT_LANGUAGE
tmpfont.realize(tclass.defaultfont());
-#else
- tmpfont.realize(tclass.defaultfont(), buf->params.language);
-#endif
return tmpfont;
}
LyXFont f = par->getFontSettings(buf->params, pos);
if (par->inInset())
par->inInset()->getDrawFont(f);
-#ifndef INHERIT_LANGUAGE
return f.realize(layout->reslabelfont);
-#else
- return f.realize(layout.reslabelfont, buf->params.language);
-#endif
} else {
LyXFont f = par->getFontSettings(buf->params, pos);
if (par->inInset())
par->inInset()->getDrawFont(f);
-#ifndef INHERIT_LANGUAGE
return f.realize(layout->resfont);
-#else
- return f.realize(layout.resfont, buf->params.language);
-#endif
}
}
}
LyXFont tmpfont = par->getFontSettings(buf->params, pos);
-#ifndef INHERIT_LANGUAGE
tmpfont.realize(layoutfont);
-#else
- tmpfont.realize(layoutfont, buf->params.language);
-#endif
+
if (par->inInset())
par->inInset()->getDrawFont(tmpfont);
while (!layoutfont.resolved() && tp && tp->getDepth()) {
tp = tp->outerHook();
if (tp)
-#ifndef INHERIT_LANGUAGE
layoutfont.realize(tp->layout()->font);
-#else
- layoutfont.realize(tclass[tp->layout()].font,
- buf->params.language);
-#endif
}
}
-#ifndef INHERIT_LANGUAGE
layoutfont.realize(tclass.defaultfont());
-#else
- layoutfont.realize(tclass.defaultfont(), buf->params.language);
-#endif
// Now, reduce font against full layout font
font.reduce(layoutfont);
// and sel_end cursor
cursor = selection.start;
- bool anything_changed = false;
-
while (true) {
// NOTE: you can't change the depth of a bibliography entry
if (cursor.par()->layout()->labeltype != LABEL_BIBLIO) {
if (cursor.par()->getDepth()
< prev->getMaxDepthAfter()) {
cursor.par()->params().depth(cursor.par()->getDepth() + 1);
- anything_changed = true;
}
}
}
cursor.par(cursor.par()->next());
}
- // if nothing changed set all depth to 0
- if (!anything_changed) {
- cursor = selection.start;
- while (cursor.par() != selection.end.par()) {
- cursor.par()->params().depth(0);
- cursor.par(cursor.par()->next());
- }
- cursor.par()->params().depth(0);
- }
-
redoParagraphs(bview, selection.start, endpar);
// we have to reset the selection, because the
current_font = real_current_font;
current_font.reduce(layoutfont);
// And resolve it completely
-#ifndef INHERIT_LANGUAGE
real_current_font.realize(layoutfont);
-#else
- real_current_font.realize(layoutfont,
- bview->buffer()->params.language);
-#endif
+
return;
}
while (tmppar && tmppar->inInset()
// the single '=' is intended below
&& (in = tmppar->inInset()->owner())) {
- if (in->lyxCode() == Inset::FLOAT_CODE) {
+ if (in->lyxCode() == Inset::FLOAT_CODE ||
+ in->lyxCode() == Inset::WRAP_CODE) {
isOK = true;
break;
} else {