#include "Buffer.h"
#include "BufferParams.h"
-#include "support/debug.h"
#include "Encoding.h"
#include "InsetList.h"
#include "Language.h"
#include "insets/InsetBibitem.h"
#include "insets/InsetOptArg.h"
+#include "support/debug.h"
#include "support/lstrings.h"
#include <boost/next_prior.hpp>
BufferParams const & bparams = buf.params();
- LayoutPtr const & style = pit->layout();
+ LayoutPtr const & style = pit->forceEmptyLayout() ?
+ bparams.getTextClass().emptyLayout() :
+ pit->layout();
ParagraphList const & paragraphs = text.paragraphs();
LYXERR(Debug::LATEX, "TeXOnePar... " << &*pit << " '"
<< everypar << "'");
BufferParams const & bparams = buf.params();
- LayoutPtr style;
ParagraphList const & paragraphs = text.paragraphs();
if (runparams_in.verbatim) {
return ++pit;
}
+ // FIXME This comment doesn't make sense. What's the
+ // length got to do with forceEmptyLayout()? I.e., what
+ // was forceDefaultParagraphs()?
// In an inset with unlimited length (all in one row),
// force layout to default
- if (!pit->forceDefaultParagraphs())
- style = pit->layout();
- else
- style = bparams.getTextClass().defaultLayout();
+ LayoutPtr const style = pit->forceEmptyLayout() ?
+ bparams.getTextClass().emptyLayout() :
+ pit->layout();
OutputParams runparams = runparams_in;
runparams.moving_arg |= style->needprotect;
}
}
- // In an inset with unlimited length (all in one row),
- // don't allow any special options in the paragraph
bool const useSetSpace = bparams.getTextClass().provides("SetSpace");
- if (!pit->forceDefaultParagraphs()) {
+ if (pit->allowParagraphCustomization()) {
if (pit->params().startOfAppendix()) {
os << "\\appendix\n";
texrow.newline();
pending_newline = true;
}
- if (!pit->forceDefaultParagraphs()) {
+ if (pit->allowParagraphCustomization()) {
if (!pit->params().spacing().isDefault()
&& (boost::next(pit) == paragraphs.end()
|| !boost::next(pit)->hasSameLayout(*pit)))
// any special options in the paragraph and also we don't allow
// any environment other than the default layout of the
// text class to be valid!
- if (!par->forceDefaultParagraphs()) {
- LayoutPtr const & layout = par->layout();
+ if (par->allowParagraphCustomization()) {
+ LayoutPtr const & layout = par->forceEmptyLayout() ?
+ tclass.emptyLayout() :
+ par->layout();
if (layout->intitle) {
if (already_title) {