Support non-default styles in multirow

This commit is contained in:
Juergen Spitzmueller 2021-01-23 14:53:51 +01:00
parent 5979a01b1d
commit 8d09fb5bf0
3 changed files with 10 additions and 24 deletions

View File

@ -4198,12 +4198,6 @@ InsetTableCell::InsetTableCell(Buffer * buf)
isMultiColumn(false), isMultiRow(false), contentAlign(LYX_ALIGN_CENTER)
{}
bool InsetTableCell::forcePlainLayout(idx_type) const
{
return isMultiRow;
}
bool InsetTableCell::allowParagraphCustomization(idx_type) const
{
return isFixedWidth;
@ -7398,12 +7392,6 @@ bool InsetTabular::allowParagraphCustomization(idx_type cell) const
}
bool InsetTabular::forcePlainLayout(idx_type cell) const
{
return tabular.isMultiRow(cell);
}
bool InsetTabular::insertPlaintextString(BufferView & bv, docstring const & buf,
bool usePaste)
{

View File

@ -136,8 +136,6 @@ private:
///
bool usePlainLayout() const override { return true; }
///
bool forcePlainLayout(idx_type = 0) const override;
///
bool allowParagraphCustomization(idx_type = 0) const override;
///
bool forceLocalFontSwitch() const override;
@ -1034,8 +1032,6 @@ public:
/// should all paragraphs be output with "Standard" layout?
bool allowParagraphCustomization(idx_type cell = 0) const override;
///
bool forcePlainLayout(idx_type cell = 0) const override;
///
void addPreview(DocIterator const & inset_pos,
graphics::PreviewLoader &) const override;

View File

@ -1455,12 +1455,7 @@ void TeXOnePar(Buffer const & buf,
// Note from JMarc: we will re-add a \n explicitly in
// TeXEnvironment, because it is needed in this case
if (nextpar && !os.afterParbreak() && !last_was_separator) {
if (runparams.isNonLong)
// This is to allow parbreak in multirow
// It could also be used for other non-long
// contexts
os << "\\endgraf";
else if (!text.inset().getLayout().parbreakIgnored() && !merged_par)
if (!text.inset().getLayout().parbreakIgnored() && !merged_par)
// Make sure to start a new line
os << breakln;
// A newline '\n' is always output before a command,
@ -1507,8 +1502,15 @@ void TeXOnePar(Buffer const & buf,
&& tclass.isDefaultLayout(next_layout))) {
// and omit paragraph break if it has been deleted with ct
// and changes are not shown in output
if (!merged_par)
os << '\n';
if (!merged_par) {
if (runparams.isNonLong)
// This is to allow parbreak in multirow
// It could also be used for other non-long
// contexts
os << "\\endgraf\n";
else
os << '\n';
}
}
}
}