Commit Graph

689 Commits

Author SHA1 Message Date
Jürgen Spitzmüller
f27d5aa9ae * Allow to set language package on a per-document basis (fixes bug 2909).
File format change. Commit approved by Pavel on trac.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37457 a592a061-630c-0410-9148-cb99ea01b6c8
2011-02-03 14:17:31 +00:00
Enrico Forestieri
1ef605f625 Introduce a wrapper class for odocstream to help ensuring that no
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
2011-01-29 02:41:13 +00:00
Pavel Sanda
b01f5549f3 .lyx as symlinks killed when saving because of #6587 workarounds.
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
2011-01-28 12:39:50 +00:00
Jean-Marc Lasgouttes
996079334b Fix default buffer output format for literate documents.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37339 a592a061-630c-0410-9148-cb99ea01b6c8
2011-01-27 16:33:00 +00:00
Peter Kümmel
654b342e3f make a copy of Converters because this function is used by our export/preview threads
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
2011-01-22 09:30:03 +00:00
Enrico Forestieri
ca2ee03ba1 Fix bug #7231 (Math macro arguments miss braces when input into a file)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37205 a592a061-630c-0410-9148-cb99ea01b6c8
2011-01-13 21:01:29 +00:00
Abdelrazak Younes
a07d9f2192 Clear undo/redo stack when reloading buffer. This fixes #7208.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37155 a592a061-630c-0410-9148-cb99ea01b6c8
2011-01-09 17:55:16 +00:00
Jürgen Spitzmüller
0a34b1e047 fix some typos. Patch by Yuri Chornoivan.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37039 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-29 16:57:04 +00:00
Enrico Forestieri
c203112890 Fix bug #7194 (Crash closing master while child documents are opened)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37021 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-28 15:47:05 +00:00
Pavel Sanda
285a41066b Whitespace
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37001 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-26 23:33:28 +00:00
Enrico Forestieri
89c1d25250 Avoid const casts by making mutable the usermacros member.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36984 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-21 14:52:18 +00:00
Enrico Forestieri
8b88c3edde Refine fix for bug #7183.
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
2010-12-20 18:15:39 +00:00
Enrico Forestieri
280f7a7ced Fix bug #7183 (User math macros defined in child documents are shadowed on loading)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36930 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-18 02:27:25 +00:00
Jürgen Spitzmüller
aec686905b * Buffer.cpp (doExport): rebuild the Graph to fix a crash due to an invalid pointer.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36837 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-12 10:56:55 +00:00
Jürgen Spitzmüller
1e98a4f240 Add the option to select the output format in Source View.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36806 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-10 10:34:24 +00:00
Jürgen Spitzmüller
f255f93b9e * Follow Vincent's advice to keep constness. Thanks Vincent.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36759 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-07 09:00:50 +00:00
Jürgen Spitzmüller
2653011613 * Use default output flavor for View Source.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36758 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-07 08:36:42 +00:00
Richard Heck
3fffe51506 Revert r36696: We can't collect BibTeX information during the
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
2010-12-04 03:15:53 +00:00
Richard Heck
0114564eff Mark the cache valid once we have been through updateBuffer().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36702 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-03 21:22:18 +00:00
Richard Heck
840f2baf91 Simplify some of the bibliography update code. There is really no reason
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
2010-12-03 20:08:04 +00:00
Richard Heck
66be58b074 Proper fix now for bug #6846. The idea, due to JMarc, is to collect
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
2010-12-03 19:29:46 +00:00
Richard Heck
ab47822680 Towards a proper fix for bug #6846, this just disentangles a couple
things we will ultimately want to do separately.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36694 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-03 19:00:55 +00:00
Richard Heck
7f5c037df3 Slight re-organization.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36688 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-03 18:01:37 +00:00
Vincent van Ravesteijn
5eb7add409 Fix bug #6315: counters in insets that don't produce output have ghost values.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36603 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-29 19:11:38 +00:00
Vincent van Ravesteijn
b81550b459 Remove unused #include.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36602 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-29 18:49:04 +00:00
Jürgen Spitzmüller
7538a23c15 * Buffer.cpp (makeLaTeXFile):
- 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
2010-11-28 17:43:22 +00:00
Jürgen Spitzmüller
e14b6a280d whitespace only.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36553 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-28 13:49:14 +00:00
Jürgen Spitzmüller
ff20f7ebe9 Allow to use XeTeX and LuaTeX with tex fonts.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36537 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-27 13:43:13 +00:00
Pavel Sanda
f5ad7f949e Kill leading blankspaces in new strings, its weird to encounter them in .po.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36531 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-27 03:04:53 +00:00
Richard Heck
4540c4a18e Final batch of BufferParam renaming.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36525 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-26 18:42:53 +00:00
Richard Heck
fc3b06eac8 Rename a bunch of BufferParams to conform to our usual style.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36524 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-26 18:32:29 +00:00
Richard Heck
7f8b868f4a Fix bug #2607.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36520 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-26 17:21:17 +00:00
Jürgen Spitzmüller
2dc2e4770b Implement GUI for LuaTeX. File format change due to the renaming of the \use_xetex buffer param.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36500 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-26 09:42:03 +00:00
Vincent van Ravesteijn
7073502308 Do not overwrite read-only files. We now move the file to the backup directory and write a new file. However, when the file is read-only it now appears as the file is overwritten anyway. Therefore we check wether the file is read-only before moving it.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36499 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-26 04:17:20 +00:00
Vincent van Ravesteijn
3508aaf2db Fix bug #7035: Read-only status and compressed status not set correctly when an autosave or emergency file is loaded, or when the file is been converted by lyx2lyx.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36497 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-26 02:01:04 +00:00
Vincent van Ravesteijn
3f6e6aff90 Fix also the other occurence of the strange language that was corrected in r36489. Also fix the english.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36491 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-25 14:55:21 +00:00
Pavel Sanda
4d0e8cb5f0 This message looked strange.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36489 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-25 14:37:10 +00:00
Jürgen Spitzmüller
2868ff7a52 add basic LuaTeX backend.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36448 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-23 16:07:42 +00:00
Jürgen Spitzmüller
d165b5ea51 * Buffer.cpp: correctly set the flavor.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36444 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-23 11:53:27 +00:00
Jürgen Spitzmüller
7cbeed2e40 * Introduce polyglossia support (bug 6576).
Please test this.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36433 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-22 12:10:16 +00:00
Georg Baum
d89bde0652 Load mhchem if it is requested unconditionally, fix some typos
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36425 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-21 18:07:04 +00:00
Georg Baum
dea050cb93 fix bug 3008: Add subscript/superscript inset for text
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36424 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-21 17:00:12 +00:00
Vincent van Ravesteijn
b3d7a10410 Call Buffer::saveCheckSum() from Buffer::setFileName(). This fixes the bug that if the user wants to overwrite an already existing file, LyX asks whether he want to overwrite the existing file _and_ whether he wants to overwrite an externally modified file.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36376 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-18 17:56:00 +00:00
Vincent van Ravesteijn
1f38406536 Buffer::setFileName() can now be private. The only way to change the filename of a buffer is to save it as a different file using Buffer::saveAs().
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
2010-11-18 17:50:33 +00:00
Vincent van Ravesteijn
7bf7fabb13 Correct bug number and typo.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36329 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-17 03:22:37 +00:00
Vincent van Ravesteijn
208acbc728 Generalize Buffer::autoSave() for both the threaded as the forked process call. Also move out the resetAutosaveTimers as this is the task of the frontend as the core shouldn't know about any timer.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36325 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-17 02:18:12 +00:00
Vincent van Ravesteijn
8e7d7e4295 Move the buffer related part from GuiView::renameBuffer to Buffer::saveAs.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36202 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-07 21:26:02 +00:00
Uwe Stöhr
86b99f8f32 GuiTabular: support for multirow offset; fileformat change
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36182 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-07 05:32:28 +00:00
Jean-Marc Lasgouttes
b9b619641b This patch implements proper ERT behaviour for normal layouts.
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
2010-11-06 15:06:19 +00:00
Vincent van Ravesteijn
38e43ce4ca Clarify comment.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36146 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-05 21:23:26 +00:00