- Preamble.cpp/:
- move list definition out of anon namespace
- declare lists and a function in the class
- remove ancientgreek since this is LyX 2.1-only
- XeTeX-polyglossia.tex: remove ancientgreek
(backported from master)
The idea is to record undo at the place where the document is modified:
1/ in Buffer::updateBuffer, add a recordUndo, with the caveat that a
const_cast has to be used (because updateBuffer is const but
modifies the document, go figure).
2/ in GuiApplication::dispatch, add an extra undo group that
encompasses the updateBuffer call. Some other undo groups may be
redundant now, but it is not a problem since they do not cost
anything.
For some unknown reason, the paste code likes to call Cursor::setSelection(), which is not appropriate here since we are not trying to set a selection at this point.
These are completely safe, and it seems best to me to keep trunk
and branch in sync whenever possible, as it makes backporting
easier.
(cherry picked from commit a756403301ff8fb78df4dc1e131e4cd50cd976e1)
Conflicts:
src/BufferParams.cpp
src/tex2lyx/Preamble.cpp
src/tex2lyx/text.cpp
We always have to call 'notifyCursorLeaves', but we only have to make sure
that we call the 'fixIfBroken()' functions first.
(cherry picked from commit d20cb73b874a30b82fe01d3b8f385ef066fafedf)
Only user of this function is code that has been commented out, comment
out this function as well.
Signed-off-by: Lars Gullik Bjønnes <larsbj@gullik.org>
(cherry picked from commit fb3ecca01cdd1e3f5af05e429801f7ef2abdf84e)
The check whether fname != oldname does not work for unnamed buffers.
Therefore, we check explicitly whether the Buffer that already exists with
the same name isn't really the buffer we are trying to save.
(cherry picked from commit 30475664d380474f4ea0666e9aaf006cf22c1c7e)
Text::outerFont looks recursively for paragraphs before the current one
which has a lower depth. If such a paragraph cannot be found, depthHook
and outerHook return the current paragraph. As such, we end up in an
infinite loop. So, if we find a par_depth that was the same as the
previous one, we apparently can't find a suitable paragraph and we should
quit the loop.
(cherry picked from commit b17250d7eb46cdc58c7288e177282c3ab4448dac)
hard disk drive like D:\.
In this case, the working dir has already a slash at the end.
Appending another one would result in a path ending with a double slash,
which has a special meaning when used in TEXINPUTS (all subdirs would
be recursively scanned). So, avoid doing that.
(cherry picked from commit 93ebb7a863377f6dbcaf724972b747b5c3f20c24)
As long as leftMargin() is not correctly implemented for
MARGIN_RIGHT_ADDRESS_BOX, we should also not do this here. Otherwise, long
rows will be painted off the screen and will not be editable.
(cherry picked from commit 92ac678715b07ff7c7adc4b32674382b5e224a44)
This solves the problem that newBuffer() already use Buffer::isInternal
but there was no chance to set it yet.
(cherry picked from commit 6cf1847b31617cd2ad190919d0ceaa51e1601ad8)
We want the key as id, not the label (which is optional).
We also need a kind of namespace for the citation ids.
We should also clean the id tag before using it.
(cherry picked from commit 207d7e4ada31d521b75e9290575b97b6bb1e8c38)
This is a patch from Scott Kostyshak. The problem it solves is as follows:
1. enable continuous spell check.
2. type a misspelled word and press space so that it has a wavy red underline.
3. right-click and choose a suggested replacement word.
4. press the backspace button.
Result: nothing happens. If you press the backspace button again, then it works as normal.
The selection code was added for the benefit of the spellchecker, but the code has been rewritten since then.
(cherry picked from commit 98a810c9d8b8d6bc0086779b7fa2d5be434bdbe2)
Forgot the return value.
(cherry picked from commit 0459c43769e507a68f2ec6e053350d4a77d19534)
Checking the extension of the temporary filename doesn't work anymore
since the naming of temporary files was corrected.
(cherry picked from commit 5279d5a8a58b9e59442b9f3f504ea397274e2b19)
When using, e.g., a 'mathcal' inset in math, the inline completion and
other special characters like '\#', '{..}' are are painted in the
'mathcal' font as well. This is overcome by setting the mathnormal font
before painted these characters.
(cherry picked from commit 63772964923f765e4ab975946215725086a9c838)
If no mask is supplied or the mask is attached to the end of the filename, we end up with unexpected names like
<system-temp-dir>\lyx_tmpdir.qHp780.vcr780_<mask>
instead of a temporary file in the lyx temporary directory like
<system-temp-dir>\lyx_tmpdir.qHp780\<mask>.vcr780.
(cherry picked from commit 5e4e4b674c00bc546213d42258f19e13a2b28bc3)
I introduced this bug in r40091 where support for empty dates was added.
I also noticed that the title_layout_found flag was not properly passed down
to all variants of parse_text*. Since this is rather a global variable I
placed it into the preamble class.
The test case of bug #8104 shows other problems as well, but those are no
regressions and will be fixed separately.
OK for branch?
is intended for us, i.e., if the first argument is "box". Maybe we
should also check to make sure that the rest of the arguments are
good, but we used just to return true no matter what the argument
was, so this is an improvement.
LFUN_INSET_MODIFY is really kind of a mess.
The LATEX_LIST_ENVIRONMENT and LATEX_BIB_ENVIRONMENT type paragraphs are
not yet implemented in DocBook export. However, we need to actively skip
these paragraphs in order not to end up in an endless loop.
(cherry picked from commit fa9bd04ea48bc7a3101bedcf8bab9b5e00d009bc)