mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-12 16:50:39 +00:00
* src/paragraph.h (public): new enum ChangeTracking,
indicating if ct is used in the current buffer. (cleanChanges): pass enum ChangeTracking. * src/paragraph_pimpl.C (cleanChanges): delete ct marks from paste content if ct is of in the buffer. Set content INSERTED if ct is on (bug 2207). * src/CutAndPaste.C (pasteSelectionHelper): pass information about the current change tracking state to cleanChanges. * src/paragraph_pimpl.h (cleanChanges): pass enum ChangeTracking. * src/paragraph.C (cleanChanges): pass enum ChangeTracking. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@13667 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
86b7e5701b
commit
c0aadd8443
@ -1,3 +1,20 @@
|
||||
2006-04-13 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||
|
||||
* src/paragraph.h (public): new enum ChangeTracking,
|
||||
indicating if ct is used in the current buffer.
|
||||
(cleanChanges): pass enum ChangeTracking.
|
||||
|
||||
* src/paragraph_pimpl.C (cleanChanges): delete ct marks from
|
||||
paste content if ct is of in the buffer. Set content INSERTED
|
||||
if ct is on (bug 2207).
|
||||
|
||||
* src/CutAndPaste.C (pasteSelectionHelper): pass information
|
||||
about the current change tracking state to cleanChanges.
|
||||
|
||||
* src/paragraph_pimpl.h (cleanChanges): pass enum ChangeTracking.
|
||||
|
||||
* src/paragraph.C (cleanChanges): pass enum ChangeTracking.
|
||||
|
||||
2006-04-11 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||
|
||||
* version.C.in: update date for 1.4.1.
|
||||
|
@ -172,6 +172,12 @@ pasteSelectionHelper(Buffer const & buffer,
|
||||
!pars[pit].insetAllowed(tmpbuf->getInset(i)->lyxCode()))
|
||||
tmpbuf->erase(i--);
|
||||
}
|
||||
|
||||
// reset change tracking status
|
||||
if (buffer.params().tracking_changes)
|
||||
tmpbuf->cleanChanges(Paragraph::trackingOn);
|
||||
else
|
||||
tmpbuf->cleanChanges(Paragraph::trackingOff);
|
||||
}
|
||||
|
||||
bool const empty = pars[pit].empty();
|
||||
|
@ -1620,9 +1620,9 @@ void Paragraph::untrackChanges()
|
||||
}
|
||||
|
||||
|
||||
void Paragraph::cleanChanges()
|
||||
void Paragraph::cleanChanges(ChangeTracking ct)
|
||||
{
|
||||
pimpl_->cleanChanges();
|
||||
pimpl_->cleanChanges(ct);
|
||||
}
|
||||
|
||||
|
||||
|
@ -71,6 +71,15 @@ public:
|
||||
/// all these places.
|
||||
META_INSET = 1
|
||||
};
|
||||
enum ChangeTracking
|
||||
{
|
||||
/// Change tracking is "on" in this buffer
|
||||
trackingOn,
|
||||
/// Change tracking is "off" in this buffer
|
||||
trackingOff,
|
||||
/// Change tracking is "unknown" in this buffer
|
||||
trackingUnknown
|
||||
};
|
||||
///
|
||||
typedef char value_type;
|
||||
///
|
||||
@ -208,7 +217,7 @@ public:
|
||||
void untrackChanges();
|
||||
|
||||
/// set entire paragraph to new text for change tracking
|
||||
void cleanChanges();
|
||||
void cleanChanges(ChangeTracking ct = trackingUnknown);
|
||||
|
||||
/// look up change type at given pos
|
||||
Change::Type lookupChange(lyx::pos_type pos) const;
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include <config.h>
|
||||
|
||||
#include "paragraph_pimpl.h"
|
||||
#include "paragraph.h"
|
||||
|
||||
#include "bufferparams.h"
|
||||
#include "debug.h"
|
||||
@ -109,12 +110,20 @@ void Paragraph::Pimpl::untrackChanges()
|
||||
}
|
||||
|
||||
|
||||
void Paragraph::Pimpl::cleanChanges()
|
||||
void Paragraph::Pimpl::cleanChanges(Paragraph::ChangeTracking ct)
|
||||
{
|
||||
// if we're not tracking, we don't want to reset...
|
||||
if (!tracking())
|
||||
// if the paragraph was not tracked and we don't know the buffer's
|
||||
// change tracking state, we do nothing
|
||||
if ((ct == Paragraph::trackingUnknown) && !tracking())
|
||||
return;
|
||||
|
||||
// untrack everything if we are in a buffer where ct is disabled
|
||||
else if (ct == Paragraph::trackingOff) {
|
||||
untrackChanges();
|
||||
return;
|
||||
}
|
||||
|
||||
// in a buffer where ct is enabled, set everything to INSERTED
|
||||
changes_.reset(new Changes(Change::INSERTED));
|
||||
changes_->set(Change::INSERTED, 0, size() + 1);
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ public:
|
||||
/// stop tracking
|
||||
void untrackChanges();
|
||||
/// set all text as new for change mode
|
||||
void cleanChanges();
|
||||
void cleanChanges(Paragraph::ChangeTracking ct = Paragraph::trackingUnknown);
|
||||
/// look up change type at given pos
|
||||
Change::Type lookupChange(lyx::pos_type pos) const;
|
||||
/// look up change at given pos
|
||||
|
@ -43,6 +43,9 @@ What's new
|
||||
- When pasting contents to a tabular with the middle mouse, the language has sometimes
|
||||
be changed. This is fixed now.
|
||||
|
||||
- Set change tracking marks properly when copying between documents with different change
|
||||
tracking status (bug 2207).
|
||||
|
||||
* Configuration/Installation:
|
||||
|
||||
- Make LyX/Win work under windows 98.
|
||||
|
Loading…
Reference in New Issue
Block a user