LFUN_INSERT_PLAINTEXT is handled in GuiView because it might need to ask for a filename. But if the filename is given as a paramater we can handle it in BufferView immediately. Also, when we've asked for the filename in GuiView we should dispatch the LFUN to BufferView in order to properly use the Undo mechanism.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40377 a592a061-630c-0410-9148-cb99ea01b6c8
"from-dialog" is added to the LFUN_INSET_MODIFY function when it is issued from the table settings dialog. This is done to prevent the checking of the individual parameters, because it has to consider all parameters alltogether. Besides, when issued from the dialog it is already guaranteed that the parameters are valid.
This parameter should not be passed onto tabularfeatures.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40376 a592a061-630c-0410-9148-cb99ea01b6c8
The trick is to rely on Cursor::selHandle instead of fiddling with the selection
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40372 a592a061-630c-0410-9148-cb99ea01b6c8
A complete fix is currently impossible because LyX assumes that all longtable
captions are in the first head.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40361 a592a061-630c-0410-9148-cb99ea01b6c8
We split Buffer::clone() into various routines that know whether
to clone the children.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40357 a592a061-630c-0410-9148-cb99ea01b6c8
we will be cautious, of course). The problem was that we were issuing
the Buffer::changed() signal before we did updateBuffer(), and this
caused an inconsistency. The idea here is to defer issuing this signal
until we call processUpdateFlags(). We know we need a redraw if we've
deleted a whole paragraph.
This should work properly, so long as checkDepm is called from within
the dispatch mechanism. There may, however, be other paths, and I've
noted one explicitly with a FIXME in Text2.cpp. I've tested a few
different variations, however, and I haven't seen any problems. But if
we do run into problems, we can go ahead and do the update there that we
were previously doing in checkDepm itself.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40352 a592a061-630c-0410-9148-cb99ea01b6c8
It is valid for a label to be empty, but up to now the bibliography
information was not updated when a label was emptied.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40347 a592a061-630c-0410-9148-cb99ea01b6c8
from the context menu. As mentioned in the FIXME, we cannot now
handle the case where the branches are held in a master buffer.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40334 a592a061-630c-0410-9148-cb99ea01b6c8
registration mechanism, so that they are only swallowed if LyX will load them.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40315 a592a061-630c-0410-9148-cb99ea01b6c8
In this case, the inset parameters win in case there is any conflict. The only
exception is "type=eps", since I was too lazy to make the full keyval parser
of tex2lyx available to InsetGraphics in order to parse the special parameter.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40298 a592a061-630c-0410-9148-cb99ea01b6c8
we've put something into it. (We also don't need to copy an
empty string into it.)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40240 a592a061-630c-0410-9148-cb99ea01b6c8
If we want to look at the token after the next token, it may be needed
to call tokenize_one() twice and not only once as done in good().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40234 a592a061-630c-0410-9148-cb99ea01b6c8
The global list of cloned buffers was a bad idea. We don't have multiple
export threads, but we can have multiple autosave threads. So now we keep
more than one of these lists at the same time, and each cloned buffer has
a pointer to the relevant list. Note that this would make multiple export
possible, if we wanted to do that at some time.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40227 a592a061-630c-0410-9148-cb99ea01b6c8
the destructor since we could, in some cases, end up deleting them
multiple times. So we need to keep a list of the Buffers we need to
delete, kind of like the BufferList.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40205 a592a061-630c-0410-9148-cb99ea01b6c8
replace home made keyval parsing with the more robust process_keyval_opt().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40185 a592a061-630c-0410-9148-cb99ea01b6c8
to occur in pairs.
If you change something in tex2lyx please don't commit without running the
tests and ensuring that no warnings or errors are written on stderr.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40177 a592a061-630c-0410-9148-cb99ea01b6c8
- support for \makebox
- fix import of boxes without an inner box (the on-screen display was broken because of wrong default width setting)
- fix parsing of \framebox{content}, which LyX does not support yet - we have to use ERT
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40150 a592a061-630c-0410-9148-cb99ea01b6c8
This is a candidate for branch too, although the bug is minor.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40149 a592a061-630c-0410-9148-cb99ea01b6c8
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
Also a warning "\end{foo} does not match \begin{bar}" is gone.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40133 a592a061-630c-0410-9148-cb99ea01b6c8
file names with a proper one: Only replace dots in the base name, and only
request the lyxdot feature if it is needed. This is a partial fix of bug #7650.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40115 a592a061-630c-0410-9148-cb99ea01b6c8
We need to have a special callback for when the autosave thread is finished
such that we can process the return values properly (and different as in
case of export or preview).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40103 a592a061-630c-0410-9148-cb99ea01b6c8
under Document>Settings>Output.
It turns out that we always want this list to be sorted when we get it,
so we can sort it in BufferParams rather than in three different places.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40101 a592a061-630c-0410-9148-cb99ea01b6c8
the complete document whether LyX will load them or not.
Use the mechanism for the color package (fixes the color part of bug #7845).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40095 a592a061-630c-0410-9148-cb99ea01b6c8
but the title commands in the preamble are still not recognized.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40093 a592a061-630c-0410-9148-cb99ea01b6c8
- Let all doExport calls honor maintain_unincluded_children
- Also don't let the behaviour depend on supplying the result_file parameter
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40085 a592a061-630c-0410-9148-cb99ea01b6c8
Documentation (and perhaps menu items) need still to be a bit
clarified in order to distinguish the various paste options
for the average user.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40060 a592a061-630c-0410-9148-cb99ea01b6c8
for later calls. The check is only performed on the major version
number, such as to avoid using python 3.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40049 a592a061-630c-0410-9148-cb99ea01b6c8
TODO:
- Also let the public function return an error value,
- Move all user interaction (Alerts etc.) out of Buffer.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40044 a592a061-630c-0410-9148-cb99ea01b6c8
TODO:
- Also let the public function return an error value,
- Move all user interaction (Alerts etc.) out of Buffer.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40043 a592a061-630c-0410-9148-cb99ea01b6c8
All calls to doExport from outside of Buffer have the same algorithm to
determine whether the included children parameter should be true. Moreover,
this decision is only based on information from the Buffer itself.
Now, Buffer only has 1 public function doExport and preview.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40041 a592a061-630c-0410-9148-cb99ea01b6c8
- This preference was used for specifying the papersize to xdvi, dvipdfm,
dvips. However, I can't seem to see any effect on the result.
- The papersize should instead be defined in the document settings.
- The global papersize default was misused to also change the tex
output by specifying the papersize as if it was specified in the
document settings. This caused the same lyx document to be outputted
differently on different pcs.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40028 a592a061-630c-0410-9148-cb99ea01b6c8
- update preamble to the features used in the file
- add some floats
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40024 a592a061-630c-0410-9148-cb99ea01b6c8
The LyX buffer is cloned before autosaving, but the unnamed_ member was not
copied. This causes the autosave files to end up in the wrong location and
consequently they were never removed afterwards.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40008 a592a061-630c-0410-9148-cb99ea01b6c8
and menus. The newline we were writing previously caused all kinds
of problems. Writing a whole array in some cases would also cause
problems. So we do less.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39971 a592a061-630c-0410-9148-cb99ea01b6c8
(info I missed in r39965: beraserif.sty does not exist on CTAN, Bera's sansserif is named "berasans" and is already supported by tex2lyx)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39968 a592a061-630c-0410-9148-cb99ea01b6c8
(the tex2lyx support in branch for \printnomenclature is currently broken so this must be backported to branch for 2.0.2, OK Richard?)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39960 a592a061-630c-0410-9148-cb99ea01b6c8
- support for box background color, document fontcolor and background color (note_fontcolor was already supported)
- add colors and a nested box to the testfile
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39949 a592a061-630c-0410-9148-cb99ea01b6c8
I also added 2 FIXME where we should not call GuiView directly.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39948 a592a061-630c-0410-9148-cb99ea01b6c8
- Interpret argument of LFUN_SPACE_INSERT correctly
- Use InsetMathSpace instead of InsetMathSpecialChar for "\ " (bug # 7728)
- Use InsetMathSpace instead of InsetMathChar for ~ (bug # 7728).
This fixes also the display in LyX (previously a literal ~ was displayed).
Using InsetMathSpace enables also the "Insert Formatting" menu entries.
No file format change is needed, since the LaTeX export is unchanged.
Note that there are still some bugs related to spaces in math:
#7746, #7747, #7749, #7842
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39947 a592a061-630c-0410-9148-cb99ea01b6c8
utf8 strings, and not only if they contain encoding changes. This is
because if the output encoding was previously changed and an utf8
string is inserted in the stream, the encoding changes cannot occur.
This was not a problem until now because normal strings could not be
inserted in a odocstream, as them would have been exchanged with encoding
changes. Indeed, the SetEnc struct has only a std::string member and
outputting a std::string would be interpreted by the compiler the same
as inserting setEncoding(std::string). However, a std::string can be
inserted in an otexstream and it is better to account for this.
I wonder whether trying "os << std::string", where os is an odocstream,
should produce an error instead of actually trying to change the stream
output encoding, but this has not been a problem until now...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39944 a592a061-630c-0410-9148-cb99ea01b6c8
and not for utf8 ones. But the simple solution is to convert to a
docstring before outputting to the underlying docstream.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39930 a592a061-630c-0410-9148-cb99ea01b6c8
on the fly are only available for ucs4 encoded strings and not for utf8
ones. So, it does only work with docstrings.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39928 a592a061-630c-0410-9148-cb99ea01b6c8
406: Convert noweb layouts to new syntax (untested, see bug #7838)
407: Nothing to do (empty lyx2lyx conversion)
408: Activated the already existing script inset code
409: Nothing to do (tex2lyx does not support XeTeX)
410: Nothing to do (the old code already used the new layouts)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39923 a592a061-630c-0410-9148-cb99ea01b6c8
402: Nothing to do (tex2lyx does not support bibtotoc)
403: Nothing to do (the old code already used the new layouts, bug #7780)
404: Nothing to do (write new prettyref syntax)
405: Nothing to do (empty lyx2lyx conversion)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39920 a592a061-630c-0410-9148-cb99ea01b6c8
400: Convert \lyxline to new InsetLine syntax
401: Nothing to do (empty lyx2lyx conversion)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39919 a592a061-630c-0410-9148-cb99ea01b6c8