Do not access name_[0] if name_ has size 0.
see r33290 and r33292.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@33337 a592a061-630c-0410-9148-cb99ea01b6c8
If we check whether a cursor is valid, we should also check the anchor_.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@33281 a592a061-630c-0410-9148-cb99ea01b6c8
The GuiCompleter? has to have a parent, otherwise it is not destroyed when a GuiWorkArea? is destroyed.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@33280 a592a061-630c-0410-9148-cb99ea01b6c8
- more improvements as suggested by Abdel.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@33245 a592a061-630c-0410-9148-cb99ea01b6c8
- Fix crash when performing word-replace while the cursor has a selection
in mathed (bug 6437)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@33205 a592a061-630c-0410-9148-cb99ea01b6c8
- While in ERT, disable non-functional sub- and superscript functions that
crashed LyX (bug 6459).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@33090 a592a061-630c-0410-9148-cb99ea01b6c8
- implement event filter and allow selection of suggestions with the keyboard
(second part of bug 6460).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@33079 a592a061-630c-0410-9148-cb99ea01b6c8
- accept Kazakh as document language
- fix a few comments
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@32861 a592a061-630c-0410-9148-cb99ea01b6c8
Update the view also when the document is read-only.
see r32694.
Update the GuiInfo dialog also when the document is read-only. A dialog that does not dispatch a single LFUN (see getLfun()) but is buffer dependent (see isBufferDependent()) should implement the canApply function (if I'm correct).
see r32695.
Update the GuiLabel view when the document is read-only. Also disable the text field.
see r32696.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@32802 a592a061-630c-0410-9148-cb99ea01b6c8
Shift+mouse click loses the existing selection instead of extending it.
see r32578.
After selecting a word by double-clicking it, extending the selection by a single mouse-click should also select only whole words.
see r32580.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@32799 a592a061-630c-0410-9148-cb99ea01b6c8
Now also when the user tries to load the document when it's already loaded.
see r32170 and r32485.
(No status entry needed).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@32497 a592a061-630c-0410-9148-cb99ea01b6c8
Everything is ok while reading the file, but when the lyxfile is written, only the first byte of a double-byte character is written to the file. This is because t.character() is sort of defined as cs_[0] in which cs_ is a docstring. This thus seems to fail for multi-byte characters.
see r32441.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@32442 a592a061-630c-0410-9148-cb99ea01b6c8
It seems we realized the font in the wrong order. If the layout font specifies "Font Size Small", we should be able to make it large if we want to.
see: r32129 and r32413, and
http://thread.gmane.org/gmane.editors.lyx.devel/122682
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@32437 a592a061-630c-0410-9148-cb99ea01b6c8
- Add a FileName::refresh function and replace one call to lastModified which was just meant to refresh the file info.
- Refresh the file info, otherwise InsetGraphics::latex might still think that the file does not exist.
see r32354 and r32355.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@32415 a592a061-630c-0410-9148-cb99ea01b6c8
- #6161: Wrong cursor position in RTL text
- #6165: Assertion when clicking on left side of inset in RTL text
If the first character is a separator, we are in RTL text. This character will not be painted on screen and thus we should not count it and skip to the next.
This bug pretty much destroyed cursor placement in RTL text on a row with large gaps.
see r32116.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@32121 a592a061-630c-0410-9148-cb99ea01b6c8
Set the boundary member correctly when the cursor goes to an 'empty' row.
No status.16x entry needed as this was introduced by r31880.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@32111 a592a061-630c-0410-9148-cb99ea01b6c8
The fix consists in not updating the macro while it is being edited,
and this is accomplished by the changes in MathData::updateMacros().
However, when clicking away with the mouse I was getting another crash,
which is cured by the changes in MathMacro::notifyCursorLeaves().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@32050 a592a061-630c-0410-9148-cb99ea01b6c8
(I added a small extra safety measure to not change the logic resulting from r31864. I'm not sure it can harm.)
see r31863, r31864.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31880 a592a061-630c-0410-9148-cb99ea01b6c8
defined macros, so better use a brace inset only when strictly needed.
No status.16x line is necessary.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31871 a592a061-630c-0410-9148-cb99ea01b6c8
This is another ad-hoc solution for the problem of a zero buffer pointer while reading a document or when using cut&paste.
This simple solution would be suitable for branch.
see also e.g. r29085, r28319, bug #5688, r31861.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31862 a592a061-630c-0410-9148-cb99ea01b6c8
* LengthCombo.{cpp,h}:
- new method to reset the combo to initial state
* GuiBox.cpp (setSpecial):
- reset width length combo properly
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31840 a592a061-630c-0410-9148-cb99ea01b6c8
- do not eat space at the beginning of \lyxadded macro (bug 6282).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31693 a592a061-630c-0410-9148-cb99ea01b6c8
- when languages are given in the documentclass options _and_ the babel options, babel takes the last language option of the \usepackage call
- there is no quote language "ngerman", it is in both cases "german"
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31688 a592a061-630c-0410-9148-cb99ea01b6c8
Input did not preserve the loading order of modules.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31639 a592a061-630c-0410-9148-cb99ea01b6c8
C-M-a now selects the contents of an inset, if the whole inset is already selected, it will jump out the inset and selects everything in that inset.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31598 a592a061-630c-0410-9148-cb99ea01b6c8
* GuiExternal.cpp:
- do not crash if the list of external templates is empty (bug #3974).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31570 a592a061-630c-0410-9148-cb99ea01b6c8
- do not use invalid index if a template is not found. Fixes crash bug #6259.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31568 a592a061-630c-0410-9148-cb99ea01b6c8
The wrong context menu is being expanded, because the location where the context menu is requested is computed wrongly by Qt.
Actually, the problem seemed to be in InputMethodQuery??. For some reason, the box of the cursor is shifted right under the cursor box.
The menu key uses InputMethodQuery?? to locate the context menu, just as he Japanese input method locates the box with possibilities.
1.6.x shows the same behaviour, but in that case it doesn't crash because the spellchecker entry does not exist there, but there might be another case in which it will crash.
see r30797.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31531 a592a061-630c-0410-9148-cb99ea01b6c8
- make sure a child is re-allocated to its master after reloading (bug 6233).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31511 a592a061-630c-0410-9148-cb99ea01b6c8
- stop iterating over the list of labels after the label was found.
This also prevents a crash if the found label is in a child (and the
pointers become invalid) [bug 6252].
Trunk already has this change.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31503 a592a061-630c-0410-9148-cb99ea01b6c8
We have to prevent that two views share the same ID, also when an id was supplied (because we can open the same document twice).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31466 a592a061-630c-0410-9148-cb99ea01b6c8
No status entry needed, this bug slipped in after 1.6.4.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31454 a592a061-630c-0410-9148-cb99ea01b6c8
In order to enable the server, specify the LyXServer pipe in
Tools->Preferences->Paths. The path to be entered there must have the
form "\\.\pipe\nameofyourchoice" (without quotes). After that, you can
send commands to LyX. For example, if the pipe path is \\.\pipe\lyxpipe,
typing the following in a terminal:
echo LYXCMD:test:file-open > \\.\pipe\lyxpipe.in
type \\.\pipe\lyxpipe.out
brings up the file dialog and returns the acknowledgment from LyX.
Beware of spaces when using cmd.exe. For example, the following:
echo LYXCMD:test:file-open:foo.lyx> \\.\pipe\lyxpipe.in
will correctly load the document named foo.lyx, but
echo LYXCMD:test:file-open:foo.lyx > \\.\pipe\lyxpipe.in
(notice the space before the redirection) will try to load a
document whose name is "foo.lyx .lyx" because cmd.exe will also
pass the space (sigh).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31389 a592a061-630c-0410-9148-cb99ea01b6c8
* OutputParams.{cpp,h}:
- new param inIndexEntry
* InsetIndex.cpp (latex):
- set param.
* InsetErt.cpp (plainText):
- output active chars in IndexInsets
* lib/lyx2lyx/lyx_1_6.py:
- embrace "|" in ERT when converting old index entries to collapsables.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31361 a592a061-630c-0410-9148-cb99ea01b6c8
The first thing that bformat does is to check whether the string contains "%1$s". Otherwise it asserts.
Why didn't we see this happen before ? This was revealed by the emergency saves that Richard introduced in the Buffer dtor.
see also r31062.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31344 a592a061-630c-0410-9148-cb99ea01b6c8
This reverts part of r10553. There, an extra '//' was added when the last line was empty. However, this really makes an extra line and that is visible when the lines have a line number. The bug #2067 that would have been fixed by this does not seem to 'exist' anymore.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31333 a592a061-630c-0410-9148-cb99ea01b6c8
In the computation of the row width, the last space on a row was included. However, this space is not drawn on screen and shouldn't contribute to the width. As a result all rows in a paragraph were painted slightly too far to the left, except the last on.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31327 a592a061-630c-0410-9148-cb99ea01b6c8
Store the position for the context menu on mouse press. This is also done in qt but then only on the widget level.
This avoids that e.g. the edit menu will call getStatus() of math (which causes a crash actually).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31326 a592a061-630c-0410-9148-cb99ea01b6c8
- use itemDoubleClicked() instead of itemActivated(). The latter is traditionally defined as single click
on UNIX, which is not desired here (bug 6204)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31320 a592a061-630c-0410-9148-cb99ea01b6c8
The lfuns, LFUN_FLOAT_INSERT and LFUN_WRAP_INSERT are now only enabled when they should be.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31318 a592a061-630c-0410-9148-cb99ea01b6c8
Author: spitz
Date: Mon Jun 15 17:57:54 2009
New Revision: 30112
URL: http://www.lyx.org/trac/changeset/30112
Log:
* Paragraph.cpp:
- do not embrace list items. According to the comment,
this was only done to escape brackets, but brackets
are embraced anyway.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31271 a592a061-630c-0410-9148-cb99ea01b6c8
This should re-enable the prefs and aboutlyx menu items on the Mac, but re-introduce bug 1720.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31244 a592a061-630c-0410-9148-cb99ea01b6c8
A copy-paste error. GuiView::disconnectBuffer() was exactly the same as GuiView::disconnectBufferView().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31165 a592a061-630c-0410-9148-cb99ea01b6c8
We have to determine whether we are in an empty cell before we dispatch the lfun to the inset. Otherwise we determine whether the math is empty and if so, we then go to the next cell in the math inset. This cell doesn't exist probably.
see r31121.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31139 a592a061-630c-0410-9148-cb99ea01b6c8
Just for safety.
(Are they turned off in the Windows release version yet).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31009 a592a061-630c-0410-9148-cb99ea01b6c8
If we correct the row where we put the cursor after a PgDn or PgUp command, then we should also adjust the y-coordinate that is used later for checkInsetHit and inset->editXY.
However, this code doesn't function like it should, but that is bug #4382.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31008 a592a061-630c-0410-9148-cb99ea01b6c8
This simply changes the appearance of the display path (in the tab header) in one detail: if the file suffix is not "lyx" (but "lyx15" etc.), the file is displayed with the extension. This fixes the problem (which is due to identical display paths), and it adds, IMHO, useful information to the GUI.
Patch reviewed by vfr.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@30978 a592a061-630c-0410-9148-cb99ea01b6c8
- hide "Number this line" for single line equations,
- set flag for LFUN_MATH_MUTATE.
see r29762 and r29764.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@30906 a592a061-630c-0410-9148-cb99ea01b6c8
- set header, set first-header-empty, unset first-header-empty,
- set header, set first-header-empty, unset header
The same also for footers.
see r29716.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@30905 a592a061-630c-0410-9148-cb99ea01b6c8
* MathStream{.cpp, h}:
- replace bool dryrun() by enum output that also knows whether the stream is for instant preview
* InsetMathHull.cpp:
- tell the stream whether we use it for instant preview.
* MathString.cpp (write):
- gracefully catch encoding exception for instant preview.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@30894 a592a061-630c-0410-9148-cb99ea01b6c8
Fixes bug #5690: Hebrew file cannot be exported to dvi or pdf.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@30849 a592a061-630c-0410-9148-cb99ea01b6c8
This is a hack necessary because \\textcolor is a bit buggy.
see r30773.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@30774 a592a061-630c-0410-9148-cb99ea01b6c8
- perform updateLabels also after dissolving an empty inset (bug 6003).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@30772 a592a061-630c-0410-9148-cb99ea01b6c8
- make sure there are no pending key sequences when applying the prefs,
since the key bindings are changed and this will make the status bar
messages go crazy and crash (bug 6064).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@30770 a592a061-630c-0410-9148-cb99ea01b6c8
see r29108, r29109, r29110, r29111, and r29115.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@30597 a592a061-630c-0410-9148-cb99ea01b6c8
The row in editXY is corrected when we're scrolling with PgUp and PgDn to make sure that the row where the cursor is places, is completely in the view.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@30552 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/branches/BRANCH_1_6_X@30509 a592a061-630c-0410-9148-cb99ea01b6c8
When the clipboard contains a tabular selection, dirty_tabular_stack_ is true. However, it is set to false when the user clears a selection (without copying). After this (mostly accidental) action, pasting the tabular contents goes wrong.
So, we only clear the dirty_tabular_stack_ flag when a 'real' copy to clipboard has been made.
see r29717, r29718, r29719
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@30499 a592a061-630c-0410-9148-cb99ea01b6c8
When closing the macromode, do the same trick as in lines 835--838.
see r29686
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@30492 a592a061-630c-0410-9148-cb99ea01b6c8
6047: Lyx 1.6.3 unable to typeset the third chemical equation of the
file mhchem.lyx (package mhchem)
4043: mhchem support
5394: support for the mhchems's \ce command
The \ce and \cf insets are text mode environments that allow entering
spaces and mathmode commands. LyX leaves them alone and doesn't try to
be smart, i.e., the behaviour is exactly the same we had in the old days
with text-in-math mode environments, before the introduction of the
\ensuremath and \lyxmathsym macros. This means that in those environments
one has to know what he is doing, as LyX will not offer any protection.
The hack of enclosing \ce and \cf in a \text{} environment in order to
be able to enter spaces is no longer necessary.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@30439 a592a061-630c-0410-9148-cb99ea01b6c8
Also fix display of centered vertical alignment status and smash
unnecessary debug output.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@30374 a592a061-630c-0410-9148-cb99ea01b6c8