[prev in list] [next in list] [prev in thread] [next in thread]
List: lyx-devel
Subject: [PATCH] Change tracking hacking
From: Johnathan Burchill <jkerrb () users ! sourceforge ! net>
Date: 2005-02-14 19:22:29
Message-ID: 200502141222.34415.jkerrb () users ! sourceforge ! net
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
Hi folks,
Please find attached three files: a change-tracking patch, and a new inset
declaration and implementation.
Use -p0 from the top-level source dir for applying the patch.
insetnewparagraph.{C,h} need to be placed in src/insets/.
This patch addresses bug#1277, and adds functionality to ct.
The bug-fix addresses pasting while change-tracking. The main modification is
the "Change" parameter that has been added to moveItem().
The new functionality is to let the user break a paragraph within
Change::UNCHANGED text. Currently, you can't do this:
i.e. from src/text.C:
void LyXText::breakParagraph(LCursor & cur, bool keep_layout)
{
BOOST_ASSERT(this == cur.text());
// allow only if at start or end, or all previous is new text
Paragraph & cpar = cur.paragraph();
pit_type cpit = cur.pit();
if (cur.pos() != 0 && cur.pos() != cur.lastpos()
&& cpar.isChangeEdited(0, cur.pos()))
return;
...
}
Is there a copy-editing reason for this? I think it's an important feature to
have in change tracking.
A new inset, InsetNewparagraph, is placed at the end of the old paragraph to
indicate that a new paragraph has been added. I copied InsetNewline, and used
the existing "newline" arrow, but it's now blue. Anyone have an idea for a
better symbol? How about a stylized "P"?
What is the purpose of inset->isSpace()? I don't notice any difference between
returning true and false.
Undoing a rejected merge causes a crash. I don't know what the problem is.
This patch is probably neither robust nor optimized, so I'd appreciate an
audit from some lyx-engine gurus.
Cheers,
JB
--
Johnathan K. Burchill, Ph.D.
jkerrb@users.sourceforge.net
[Attachment #5 (application/pgp-signature)]
["cvs-head-ct-improvements.diff.gz" (application/x-gzip)]
["insetnewparagraph.h.gz" (application/x-gzip)]
["insetnewparagraph.C.gz" (application/x-gzip)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic