* Inset::canTrackChange() had two meanings: can it deal with change tracking?
Will it paint its own CT status? The latter information is now given by
Inset::canPaintChange().
* Line thickness computation is moved from RowPainter to MetricsBase.
* Painting function for Changes moved to lyx::Change. (One new, that strikes
diagonally.)
(#8738)
For efficiency, we add a new flag to the buffer indicating when changes are
present. This flag is updated at each buffer update, and also when explicitly
requested via a dispatch result flag.
This resolves a dependency of src/support/docstream.cpp on src/TexRow.cpp,
which is the wrong way round. This fixes the linking
src/tests/check_ExternalTransforms with MSVC where the linker is not clever
enough to detect that the whole otexstream class is unused.
Of course this will only work if output_changes was true when creating the
.tex file.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40139 a592a061-630c-0410-9148-cb99ea01b6c8
blank lines may be inadvertently output. This is achieved by using two
special iomanip-like variables (breakln and safebreakln) in the lyx::
namespace. When they are inserted in the stream, a newline is output
only if not already at the beginning of a line. The difference between
breakln and safebreakln is that, if needed, the former outputs '\n'
and the latter "%\n".
In future, the new class will also be used for counting the number of
newlines issued. Even if the infractrure for doing that is already in
place, the counting is essentially still done the old way.
There are still places in the code where the functionality of the
class could be used, most probably. ATM, it is used for InsetTabular,
InsetListings, InsetFloat, and InsetText.
The Comment and GreyedOut insets required a special treatment and a
new InsetLayout parameter (Display) has been introduced. The default
for Display is "true", meaning that the corresponding latex
environment is of "display" type, i.e., it stands on its own, whereas
"false" means that the contents appear inline with the text. The
latter is the case for both Comment and GreyedOut insets.
Mostly, the only visible effects on latex exports should be the
disappearing of some redundant % chars and the appearing/disappearing
of null {} latex groups after a comment or lyxgreyedout environments
(they are related to the presence or absence of a space immediately
after those environments), as well as the fact that math environments
are now started on their own lines.
As a last thing, only the latex code between \begin{document} and
\end{document} goes through the new class, the preamble being directly
output through odocstream, as usual.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37360 a592a061-630c-0410-9148-cb99ea01b6c8
* no one has to know that the current author has by default id 0,
Forgot this in the previous commit.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30863 a592a061-630c-0410-9148-cb99ea01b6c8
This patch makes sure that there are minimal changes when loading and saving a file with change tracking.
- the authors are assigned a buffer_id, such that when the file is saved, they get the same id,
- the authorlist is sorted according to the buffer_id,
- the buffer_id is written to the file in the author list (file format change)
- the ids start with 1, because 0 is internally reserved for the current Author,
- when writing the file, the current author is assigned an id if he didn't already have it.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30756 a592a061-630c-0410-9148-cb99ea01b6c8
Do not accept the changes in the selection, if it is completely deleted.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29672 a592a061-630c-0410-9148-cb99ea01b6c8
Hard to distinguish between added and deleted text.
* Changes.cpp/h: add a merge_color for deletions and change the return type to Color.
* ColorCode.h/Color.cpp: add a new customizable color that indicates the merge color for deletion.
See:
http://thread.gmane.org/gmane.editors.lyx.devel/114189
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28423 a592a061-630c-0410-9148-cb99ea01b6c8
Changes::addToToc(): New method to insert changes sorted by authors. The symbols 0x2702 and 0x270d are used to represent deletion and insertion.
TocBackend::item(): new method to lookup for a given item.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26639 a592a061-630c-0410-9148-cb99ea01b6c8
hope there are only conforming implementaions out there ;-}
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21312 a592a061-630c-0410-9148-cb99ea01b6c8
* src/Changes.cpp:
* src/support/userinfo.cpp:
* src/Paragraph.cpp:
* src/Changes.h:
* src/Buffer.cpp:
* src/Paragraph.h:
* src/BufferParams.cpp: do not save the name of authors
in LyX documents, who have not made a single change in
change tracking mode
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19019 a592a061-630c-0410-9148-cb99ea01b6c8
introduce 'semantic' TeX commands \lyxinserted and \lyxdeleted in order to decouple change tracking
output from dvipost. Raise user warning if dvipost is not installed (i.e. no changes are shown in TeX output)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18237 a592a061-630c-0410-9148-cb99ea01b6c8