The PreviewLoader is created directly by Buffer on demand. The PreviewLoader cache was complex and unneeded because there is one and only one PreviewLoader per Buffer.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39276 a592a061-630c-0410-9148-cb99ea01b6c8
It's amazing we haven't seen problems with this before. The basic problem is that buf.errorList("whatever") would always return the same global, static error list, if it did not already exist. So, to a significant extent, there was only one global error list!
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38980 a592a061-630c-0410-9148-cb99ea01b6c8
It's amazing we haven't seen problems with this before. The basic problem is that buf.errorList("whatever") would always return the same global, static error list, if it did not already exist. So, to a significant extent, there was only one global error list!
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38978 a592a061-630c-0410-9148-cb99ea01b6c8
the same document could not be rendered.
Problem was that we were using children_positions to deal with the
included documents. That structure only includes each child once.
We need to use position_to_children, instead.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38842 a592a061-630c-0410-9148-cb99ea01b6c8
the macros declared in the parent do not work. This is because we were
cloning only the child, which then didn't have a parent.
The solution is to clone the whole structure, starting with the master
document. As a side effect, we only clone each child once.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38837 a592a061-630c-0410-9148-cb99ea01b6c8
variable. This is done in the preferences, much like as the PATH prefix.
A single '.' in the paths will get replaced with the current document dir
and also non-absolute paths will be prefixed with that dir.
The default semantics of TEXINPUTS apply, such that, for example, if a
path is terminated with a double slash, all subdirectories will be also
searched by both the TeX engine and ancillary programs such as dvi
previewers or dvips. As an example, if the prefix is set to ".:figs", the
TEXINPUTS variable will be set as ".:<docdir>:<docdir>/figs:$ORIGTEXINPUTS",
where <docdir> is the document directory.
The initial '.' is necessary to address the actual current dir (this will
be the temp dir at preview time), while if TEXINPUTS was initially unset,
such that $ORIGTEXINPUTS is empty, a colon (or semicolon on Windows) will
end the path list. This is very important, because we don't want to replace
the system directories but to complement them and, in order to do that, an
empty element has to be present in the list. Indeed, according to the
TEXINPUTS semantics, an empty element means the standard search path.
This works whether TEXINPUTS is originally set or not, because if the
original TEXINPUTS starts with a colon (meaning that the standard search
path is wanted there) we will have an empty element at that point,
otherwise the final colon will simply serve as a path separator.
Of course, on Windows a ';' has to be used as a path separator. LyX will
take care of transforming the platform path list into one understandable
by the TeX engine. For example, this will be the case for a Cygwin version
of LyX using a native Windows TeX engine or viceversa. I tested all of
this and it works for me.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38681 a592a061-630c-0410-9148-cb99ea01b6c8
inset to know that the BibTeX data had changed. So we introduce a
Buffer-wide variable that we can query for that information.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38619 a592a061-630c-0410-9148-cb99ea01b6c8
calls into the file writing routines and out of doExport(). They were in
both places before: Called once in doExport, and then again in the e.g.
writeLaTeXSource()---and then again, actually, in validate().
It is possible this will reveal some missing updateBuffer() calls
somewhere. But it should somewhat speed up View>Source, since we now do
not do an extra set of such calls in that routine. Rather, we rely upon
the Buffer's having been made up to date first, by the updateBuffer()
call after dispatch.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38596 a592a061-630c-0410-9148-cb99ea01b6c8
http://www.mail-archive.com/lyx-
for the reason it needs to be here.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38497 a592a061-630c-0410-9148-cb99ea01b6c8
to be a set. Not that speed will really be an issue here, but....
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38178 a592a061-630c-0410-9148-cb99ea01b6c8
as a whole gets highlighted. Now, the error list carries information
about the starting id/pos and ending pos, but not about the ending id.
So, when computing the range to be highlighted as range = pos_end - pos_start,
if id_start != id_end, the result 1 means one inset and only the first
character in the inset would be highlighted. Thus, when id_start != id_end,
let pos_end = 0, such that the whole content will be highlighted.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37900 a592a061-630c-0410-9148-cb99ea01b6c8
child, the returned list had no master and twice the child itself).
(was causing misbehavior in Advanced Find & Replace with scope=Document).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37852 a592a061-630c-0410-9148-cb99ea01b6c8
at the same line. Given that we know where the error occurred, don't
unnecessarily check the master first.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37846 a592a061-630c-0410-9148-cb99ea01b6c8
counting when exporting to latex. This is done for the code comprised
between \begin{document} and \end{document}, while the preamble code
still needs manual calls to TexRow::newline() for registering new lines.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37584 a592a061-630c-0410-9148-cb99ea01b6c8
not release level. File format does not change for a single minor (branch), so
this info has small value.
On the other hand the first line of header is causing unnecessary merge
conflicts for users of LyX VCS.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37579 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
At the end escape for fsync would be the least hackish solution
but it needs somebody with ext4 to test with.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37348 a592a061-630c-0410-9148-cb99ea01b6c8
and the converters is also used by the main thread (getStatus).
LyX.exe!lyx::Buffer::doExport
LyX.exe!lyx::Buffer::preview(
LyX.exe!std::tr1::_Pmf_caller3<
LyX.exe!std::tr1::_Pmf_caller3<
LyX.exe!std::tr1::_Callable_pmf<
LyX.exe!std::tr1::_Bind3<
LyX.exe!std::tr1::_Bind_base<
LyX.exe!lyx::frontend::GuiView::GuiViewPrivate::runAndDestroy<
LyX.exe!lyx::frontend::GuiView::GuiViewPrivate::previewAndDestroy(
LyX.exe!QtConcurrent::StoredFunctorCall3<
LyX.exe!QtConcurrent::RunFunctionTask(
QtCored4.dll!QThreadPoolThread::run(
QtCored4.dll!QThreadPrivate::start(
msvcr100d.dll!_callthreadstartex()
msvcr100d.dll!_threadstartex(void * ptd)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37292 a592a061-630c-0410-9148-cb99ea01b6c8
Using updateMacros() entails a performance hit when loading a document
with really a lot of macros. So, revert to the original strategy of
tracking macros at creation time. In order to also account for macros
defined in a child document, the child is now loaded by the include inset
at construction time instead of after the master has finished loading.
This strategy mimics what updateMacros() was accomplishing without
incurring in its drawbacks, such that loading time is practically
unchanged even with a thousand macros.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36968 a592a061-630c-0410-9148-cb99ea01b6c8
updateBuffer() traversal. The reason is simple: InsetCitation needs
access to the BibTeX info to calculate its label. But we won't have it
until we get to the bibliography.
I don't think there is any way around that.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36710 a592a061-630c-0410-9148-cb99ea01b6c8
to be passing the BiblioInfo structure around this way. (That's an old
holdover.) That lets us get rid of the non-const masterBibInfo() again.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36697 a592a061-630c-0410-9148-cb99ea01b6c8
bibliography information in updateBuffer(), rather than doing a wholly
separate traversal. We still do a separate traversal in two cases, as a
full updateBuffer() call just isn't needed there.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36696 a592a061-630c-0410-9148-cb99ea01b6c8
- With XeTeX/LuaTeX and tex fonts, we need to force the encoding to utf8-plain manually.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36558 a592a061-630c-0410-9148-cb99ea01b6c8
Change its parameter type to support::FileName for convenience.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36375 a592a061-630c-0410-9148-cb99ea01b6c8
In particular, it makes paragraph breaks generate single \n in latex output
when ParbreakIsNewline is true
This means that it is not necessary anymore to use newlines to break lines.
Plain paragraph breaks can be used instead, like is done now in ERT/Listings.
This is mainly aimed at sweave support.
lyx2lyx support courtesy of Richard Heck
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36163 a592a061-630c-0410-9148-cb99ea01b6c8
Computes a hash value for the authors when using change tracking.
Text.cpp, BufferParams.h, Author.h:
Change unsigned int to int because the hash values can be negative.
lyx2lyx:
Allow to convert negative author_ids.
See also: r30756.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36134 a592a061-630c-0410-9148-cb99ea01b6c8
Also move the saveCheckSum declaration to the section of functions involving reading/writing. And note that it should be made private.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35925 a592a061-630c-0410-9148-cb99ea01b6c8
argument from that function. We are always saving the checksum for the
Buffer's file. The argument is a left-over from a time when we did the
wrong thing and saved it for e.g. the emergency file.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35890 a592a061-630c-0410-9148-cb99ea01b6c8