mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Revert "DocBook: eat a bit of that spaghetti code."
This reverts commit 25bcbe7666
.
This commit is contained in:
parent
42eca3d8d6
commit
c2be69187c
@ -202,10 +202,14 @@ void openParTag(XMLStream & xs, const Paragraph * par, const Paragraph * prevpar
|
||||
// first paragraph of an author, then merging with the previous tag does not make sense. Say the
|
||||
// next paragraph is the affiliation, then it should be output in the same <author> tag (different
|
||||
// layout, same wrapper tag).
|
||||
bool openWrapper = lay.docbookwrappertag() != "NONE";
|
||||
if (prevpar != nullptr) {
|
||||
bool openWrapper = false;
|
||||
if (prevpar == nullptr) {
|
||||
openWrapper = lay.docbookwrappertag() != "NONE";
|
||||
} else {
|
||||
Layout const & prevlay = prevpar->layout();
|
||||
if (prevlay.docbookwrappertag() != "NONE") {
|
||||
if (prevlay.docbookwrappertag() == "NONE") {
|
||||
openWrapper = lay.docbookwrappertag() != "NONE";
|
||||
} else {
|
||||
openWrapper = prevlay.docbookwrappertag() == lay.docbookwrappertag()
|
||||
&& !lay.docbookwrappermergewithprevious();
|
||||
}
|
||||
@ -234,10 +238,14 @@ void closeTag(XMLStream & xs, Paragraph const * par, Paragraph const * nextpar)
|
||||
nextpar = nullptr;
|
||||
|
||||
// See comment in openParTag.
|
||||
bool closeWrapper = lay.docbookwrappertag() != "NONE";
|
||||
if (nextpar != nullptr) {
|
||||
bool closeWrapper = false;
|
||||
if (nextpar == nullptr) {
|
||||
closeWrapper = lay.docbookwrappertag() != "NONE";
|
||||
} else {
|
||||
Layout const & nextlay = nextpar->layout();
|
||||
if (nextlay.docbookwrappertag() != "NONE") {
|
||||
if (nextlay.docbookwrappertag() == "NONE") {
|
||||
closeWrapper = lay.docbookwrappertag() != "NONE";
|
||||
} else {
|
||||
closeWrapper = nextlay.docbookwrappertag() == lay.docbookwrappertag()
|
||||
&& !nextlay.docbookwrappermergewithprevious();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user