mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
* src/OutputParams.h:
* src/Paragraph.cpp: * src/OutputParams.cpp: fix LaTeX output in change tracking mode: text inside logically deleted insets must always be output as logically deleted git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19164 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
cce9cfc975
commit
31494ad259
@ -23,6 +23,7 @@ OutputParams::OutputParams(Encoding const * enc)
|
||||
linelen(0), depth(0),
|
||||
exportdata(new ExportData),
|
||||
inComment(false),
|
||||
inDeletedInset(0), changeOfDeletedInset(Change::UNCHANGED),
|
||||
par_begin(0), par_end(0),
|
||||
dryrun(false)
|
||||
{}
|
||||
|
@ -16,6 +16,7 @@
|
||||
|
||||
#include "support/types.h"
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include "Changes.h"
|
||||
|
||||
|
||||
namespace lyx {
|
||||
@ -120,6 +121,16 @@ public:
|
||||
*/
|
||||
bool inComment;
|
||||
|
||||
/** Whether we are inside an inset that is logically deleted.
|
||||
* A value > 0 indicates a deleted inset.
|
||||
*/
|
||||
int inDeletedInset;
|
||||
|
||||
/** The change information of the outermost logically deleted inset.
|
||||
* changeOfDeletedInset shall only be evaluated if inDeletedInset > 0.
|
||||
*/
|
||||
Change changeOfDeletedInset;
|
||||
|
||||
/** allow output of only part of the top-level paragraphs
|
||||
* par_begin: beginning paragraph
|
||||
*/
|
||||
|
@ -726,6 +726,11 @@ void Paragraph::Pimpl::simpleTeXSpecialChars(Buffer const & buf,
|
||||
break;
|
||||
}
|
||||
|
||||
if (lookupChange(i).type == Change::DELETED) {
|
||||
if( ++runparams.inDeletedInset == 1)
|
||||
runparams.changeOfDeletedInset = lookupChange(i);
|
||||
}
|
||||
|
||||
if (inset->canTrackChanges()) {
|
||||
column += Changes::latexMarkChange(os, bparams, running_change,
|
||||
Change(Change::UNCHANGED));
|
||||
@ -801,6 +806,10 @@ void Paragraph::Pimpl::simpleTeXSpecialChars(Buffer const & buf,
|
||||
} else {
|
||||
column += os.tellp() - len;
|
||||
}
|
||||
|
||||
if (lookupChange(i).type == Change::DELETED) {
|
||||
--runparams.inDeletedInset;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@ -2039,7 +2048,8 @@ bool Paragraph::simpleTeXOnePar(Buffer const & buf,
|
||||
runparams.moving_arg);
|
||||
}
|
||||
|
||||
Change const & change = pimpl_->lookupChange(i);
|
||||
Change const & change = runparams.inDeletedInset ? runparams.changeOfDeletedInset
|
||||
: pimpl_->lookupChange(i);
|
||||
|
||||
if (bparams.outputChanges && runningChange != change) {
|
||||
if (open_font) {
|
||||
|
Loading…
Reference in New Issue
Block a user