Commit Graph

20422 Commits

Author SHA1 Message Date
Georg Baum
c1965123ed Fix bug #8104 (\date argument was eaten)
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?
2012-04-19 20:46:08 +02:00
Pavel Sanda
dce6c8875c Allow Insetlayout for Branch inset (#8106).
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg173659.html
2012-04-19 11:56:32 +02:00
Jean-Marc Lasgouttes
a117a51226 In replaceSelectionWithString, do not select the new string
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.
2012-04-18 12:44:31 +02:00
Jean-Marc Lasgouttes
9059843121 Simpler fix for undo support when entering \hline in an equation
* Avoid undo step when using backspace in macro mode
 * Use recordUndoInset when entering macro mode (if one enters something like \hline, the outer inset itself will be modified)
 * Use recordUndoInset when pasting in an INsetMathGrid (same reason as above)
2012-04-17 22:21:45 +02:00
Jean-Marc Lasgouttes
201dcc8ec3 Revert "Fix undo of entering \hline"
This reverts commit 1fa39e1f95.
2012-04-17 22:21:45 +02:00
Richard Heck
88d9fc574e Use InsetLayout instead of hardcoding forcePlainLayout and
allowParagraphCustomization.
2012-04-17 09:43:29 -04:00
Richard Heck
33022ebb5a Use InsetLayout for LaTeX output. 2012-04-17 09:35:25 -04:00
Richard Heck
1c33d95adf Use InsetLayout to style the XHTML output.
Note that we have also changed the layout name to uppercase, but
this should be fine, since it was so far unused.
2012-04-17 09:16:34 -04:00
Richard Heck
ab873c14a5 Whitespace. 2012-04-17 09:14:53 -04:00
Georg Baum
27733452f7 Native support for \lstlistoflistings 2012-04-16 21:40:59 +02:00
Enrico Forestieri
ea31541848 Fix bugs #6871 and #8119.
Both bugs above were due to a missing screen update. This patch
updates the current view after dispatching a lyxserver command
and thus solves both.

The patch is quite strightforward and the only difficulty was due
to the fact that the lyxserver needs the result of the dispatched
command. Now, GuiApplication::dispatch(FuncRequest const &) does
right this, but does not return the result, while
GuiApplication::dispatch(FuncRequest const &, DispatchResult &)
is called by the former but does not return the result. So, I
split the first one, isolating the code performing the update,
such that the second one can also update the current view when
the caller is the lyx server. When the action is initiated by
anything different from the lyx server, the behavior is unchanged.
2012-04-13 02:57:25 +02:00
Enrico Forestieri
d07f9eec20 Fix bug #8105: Crash when deleting math macro from the inside
It seems that parameterless macros are not wrapped into a MathAtom.
Rather than touching the macro code (which is tantamount to opening
a can of worms, IMHO), I prefer this solution.
2012-04-12 16:28:29 +02:00
Enrico Forestieri
3285ce1d5c Use the right latex backend when a converter needs aux files.
If a converter specifies the needaux flag, latex (or xelatex) is
always run to produce the needed auxiliary files. This is wrong
because there are documents that can only be compiled with a specific
backend and thus the conversion may fail. On the other hand, even if
the document specifies the backend to be used, LyX ignores this info.

This commit rectifies this behavior by letting LyX run the same flavor
of the latex backend that shall be used for previewing the document
also for producing the auxiliary files.
2012-04-11 18:38:32 +02:00
Georg Baum
a2e8cb758b Translations for listings insets
The listings inset and include inset of type listings use two english terms
that are not localized yet: "Listing" for the caption and "Listings" for the
list of listings (not supported natively by LyX yet). The existing layout
translation mechanism has been extended to translate these terms as well:

1) Support [[stuff]] context in lib/layouttranslations
2) Support BabelPreamble and LangPreamble in InsetLayout
3) Use a InsetLayout for InsetInclude of type listings
4) Define BabelPreamble and LangPreamble in the layouts for InsetInclude
   and InsetListings
2012-04-10 20:21:01 +02:00
Vincent van Ravesteijn
f0754582b8 Fix bug #8114: LyX does not retrieve negative bbox parameters
LyX fails to read the bounding box from an EPS file if it has
negative values. Adjusting the regex will overcome this problem.
Negative values do not pose big problems later on, but the GUI
doesn't handle it correctly yet (see bug #5718).
2012-04-08 23:20:01 +02:00
Vincent van Ravesteijn
91bc04946f Fix a copy-paste error introduced in b754fb02 2012-04-08 21:47:40 +02:00
Georg Baum
1fa39e1f95 Fix undo of entering \hline
It was broken with 6d75800f5d as noticed by Enrico. The fix is to use undo
groups (thanks Jean-Marc).
2012-04-08 19:15:49 +02:00
Richard Heck
7c5f28ad26 The logic of the endParagraph() routine is wrong. We should first
check if the parsep_tag is pending.
2012-04-08 10:05:44 -04:00
Richard Heck
8dd436b7dc We need to check, in closeFontTags(), for the case where we haven't
had any content.
2012-04-08 10:05:44 -04:00
Richard Heck
29cf7af6d3 The isTagOpen() routine can be const. 2012-04-08 10:05:44 -04:00
Richard Heck
313c9e0e5a Debugging code for the tag stack, disabled by default. 2012-04-08 10:05:43 -04:00
Richard Heck
d78560832a Fix error output for XHTML a bit. 2012-04-03 18:13:59 -04:00
Richard Heck
7b6b4c4598 Make index comparisons for XHTML output case insensitive. 2012-04-03 17:54:50 -04:00
Richard Heck
5db793ff30 Merge branch 'master' of git.lyx.org:lyx 2012-04-03 15:54:54 -04:00
Richard Heck
33f34e8ffb Clear local layout before reading BufferParams. Otherwise, you can't
delete the local layout.
2012-04-03 15:53:56 -04:00
Richard Heck
ec5735b144 Fix bug #8107. Just an oversight: We need to invalidate the file
cache, not just the BibInfo cache, when we create a new BibTeX
inset.
2012-04-01 18:22:37 -04:00
Georg Baum
d88f7727e9 Fix tex2lyx table output.
It is broken since the latest file format update (neither did Uwe run a test
after updating the file format, nor did I after undoing my accidental change).
The reason it was broken: the bool version of write_attribute() is chosen
for "0" instead of the string version, so each table used rotate="true".
2012-03-25 18:46:00 +02:00
Georg Baum
1a6c599917 Extend the notermination flag to math as well.
Math commands need it as well as text commands. At the same time, this
further unifies the checking for termination and fixes cases of wrong
output (e.g. for 0x2005).
2012-03-25 15:57:38 +02:00
Georg Baum
e63f561c42 Revert unwanted change.
I have no idea how this was created. I hadf changed this file, but reverted
it with git chekout before committing.
2012-03-25 11:25:14 +02:00
Georg Baum
6d75800f5d Fix bug #6936.
If \hline is entered, do not create an unknown inset, but increase the number
of hlines of the current row if that is allowed. The same idea is applied to
copy-paste (not part of the bug report).
This is also a test for committing via git.
2012-03-25 11:16:32 +02:00
Vincent van Ravesteijn
7fbf23d916 Fix monolithic build (bug #8079) 2012-03-24 15:25:30 +01:00
Vincent van Ravesteijn
e409eedc5b Fix more possible crashes due to asInsetRef()
InsetMathHull has no method asInsetRef() and returns therefore 0.

See also 447e0d03.
2012-03-23 23:01:35 +01:00
Richard Heck
447e0d0308 Fix bug #8095.
The crash was due to the otherwise innocent looking 07924ac300. The cast
Vincent replaced was already wrong---it seems to have been a thinko in
7bbd67eb2679---but it worked kind of by accident before. Now it crashes.
2012-03-23 14:37:48 -04:00
Lars Gullik Bjønnes
c7bb190fd3 Setup .gitignore for generated files
Setting up .gitignore or .git/info/excludes is something that should
be done. Not doing it makes it a lot harder to see actual new files
that should be added.

Signed-off-by: Lars Gullik Bjønnes <larsbj@gullik.org>
2012-03-22 02:16:12 +01:00
Uwe Stöhr
138b615a3b again some things which cherry pick did not catch, sorry 2012-03-22 00:02:36 +01:00
Uwe Stöhr
ea54461d85 full support for table rotations; fileformat change 2012-03-21 23:04:45 +01:00
Uwe Stöhr
304655a759 step 1 2012-03-21 22:54:03 +01:00
Uwe Stöhr
e900dc9f73 GuiTabular.cpp: fix bug #8092 2012-03-20 01:40:07 +01:00
Uwe Stöhr
0332e90ed1 - lyx2lyx/lyx_2_1.py: remove wrong info (was a copy/paste mistake)
- GuiTabular.cpp: fix a comment
2012-03-20 01:26:55 +01:00
Richard Heck
9236a93894 Fix bug #7975 following suggestions made by JMarc there. 2012-03-19 18:00:25 -04:00
Uwe Stöhr
bdda095669 InsetTabular.cpp: code optimization; there is no need for a conversion 2012-03-19 01:28:38 +01:00
Vincent van Ravesteijn
96e854ab76 Fix bug #8083: Fix the selection of cells below multirows
Multirows were introduced in 8bb69f24 (Uwe Stoehr, 11 Feb 2010). In the
computation of the nearest cell, it was forgotten to account for the
vertical offset. tabular.cellHeight is the full height of the cell, while
the point that comes from the coordCache is offsetted by VOffset.
Therefore, we have to subtract the VOffset from o.y_.
2012-03-18 00:05:15 +01:00
Vincent van Ravesteijn
1d5204315e Clear the error list from previous errors
We only copied the error list to the cloned buffer when makeLatexfile
failed. This means that a second try will never clear the error list and
the user will be presented the same list again.

Therefore, we unconditionally copy the error list such that we also clear
the list on success.
2012-03-17 19:00:25 +01:00
Vincent van Ravesteijn
ea506d6a67 Replace #warning by something that is understood by MSVC
MSVC gives a warning when using #warning. However, it does
not show the actual warning.
2012-03-16 12:26:54 +01:00
Vincent van Ravesteijn
234ba2c419 Revert commenting the file format warnings
These warnings have been (accidentally) commented out in
42aeab2a (uwestoehr; support for table cell rotations;
16-03-2012). In the next commit the warning will be replaced
by a form which is also understood by MSVC.
2012-03-16 12:25:16 +01:00
Uwe Stöhr
7a46910f04 support for table cell rotations; fileformat change 2012-03-16 02:29:37 +01:00
Juergen Spitzmueller
1e0f2426ce Fix bug #8069: View/Update other formats button disabled with non-TeX fonts 2012-03-15 12:55:40 +01:00
Uwe Stöhr
11adfbf64d GuiTabular.cpp: fix bug #8084 2012-03-15 02:37:20 +01:00
Uwe Stöhr
8e72135a3f tex2lyx/text.cpp: code improvement as proposed by Georg 2012-03-15 02:10:13 +01:00
Richard Heck
0a0a837b70 Address bug 7975 by changing how toggling works, as suggested by
JMarc.
2012-03-13 12:08:25 -04:00
Richard Heck
f0255dae80 Style. 2012-03-13 12:07:48 -04:00
Stephan Witt
8be18455fd #7855 subversion 1.7.x support: use svn info to check if a file is under version control; this works for 1.6.x too; to avoid excessive forks of child processes check for the existence of a .svn directory in current dir and parent directories
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40911 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-11 11:12:12 +00:00
Vincent van Ravesteijn
281799d342 Fix typo
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40910 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-10 21:45:01 +00:00
Vincent van Ravesteijn
1d721b6ea7 Fix typo and whitespace
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40909 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-10 21:20:25 +00:00
Richard Heck
354d9700f6 Accidentally removed this code at last commit.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40908 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-10 16:49:20 +00:00
Jürgen Spitzmüller
2cf5de28a9 Add "notermination" flag to unicodesymbols. This tells us not to try any termination of the command (such as '{}' or ' ' ).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40905 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-10 13:34:42 +00:00
Georg Baum
4f6579e9d3 Update tex2lyx to file format 427. InsetIPA is not yet supported, but the
produced output is valid format 427.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40903 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-10 11:53:47 +00:00
Richard Heck
fa0c2d9631 Show backends rather than formats in the View>Source combo box.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40900 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-09 22:24:20 +00:00
Richard Heck
02f28635d3 Change the backends() routine so it only gives us backends that
are appropriate for the current document.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40899 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-09 22:24:17 +00:00
Jürgen Spitzmüller
43e1119a28 Clarify widget description (I had to consult the sources to find out what this does).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40896 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-09 12:31:16 +00:00
Jürgen Spitzmüller
38c29e4fa3 Consider specifics for TIPAs T3 font encoding and allow insertion of straight quote (stress shortcut) to IPA inset.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40893 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-09 11:14:39 +00:00
Jürgen Spitzmüller
84971fb27e * implement possibility to use IPA shortcut notation (the actual shortcuts will follow)
* do not terminate macros by {} if not necessary (prevent kerning violation)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40891 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-09 09:05:13 +00:00
Julien Rioux
d09f87c3ca Don't show citation engines in the list of modules. They are found under the bibliography settings.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40888 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-08 16:43:05 +00:00
Julien Rioux
1a6e951b4f Display the module category in the list of modules.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40887 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-08 16:43:04 +00:00
Julien Rioux
488b9ae3a2 Whitespace only.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40886 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-08 16:43:02 +00:00
Tommaso Cucinotta
9e57044ff1 More useful message (tells the user that ESC cancels the long operation in progress).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40878 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-06 23:26:19 +00:00
Tommaso Cucinotta
c324d6eae6 Now ESC cancels long Advanced Find and Replace operations.
(see #7217 and #7965 for related issues and discussion)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40877 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-06 23:21:12 +00:00
Jürgen Spitzmüller
8d55d452ff InsetIPA: fixes with non-tex-fonts.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40874 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-06 10:39:01 +00:00
Kornel Benko
8c29d00e11 Handling of libmagic for some mime-types leads to incorrect value 'text/plain'.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40873 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-06 09:41:41 +00:00
Jürgen Spitzmüller
d550bb116a Allow superscript (but not subscript) in IPA inset.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40869 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-06 09:14:24 +00:00
Jürgen Spitzmüller
f626cfb7a3 Implement a native IPA inset (bug #2591) with instant preview.
Currently only basic functionality (our math-tipa functionality plus multipar input). Further enhancements (such as proper unicode input and a specific toolbar) are planned. DocBook and XHTML output also need to be audited.

The lyx2lyx reversion routine surely can be improved (help appreciated), and I don't know  tex2lyx enough to handle this file format change.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40867 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-06 07:54:22 +00:00
Uwe Stöhr
408728aed9 tex2lyx: support for inline listings (fixes last part of #8066)
OK also for branch?

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40860 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-05 22:04:22 +00:00
Uwe Stöhr
1a5891e1fd tex2lyx/text.cpp: don't parse catBegin in verbatim environments
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40859 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-05 21:04:21 +00:00
Uwe Stöhr
9c5a8b3224 tex2lyx/text.cpp: clarify a comment and add a question
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40857 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-05 01:51:19 +00:00
Uwe Stöhr
80d0710422 - text.cpp: full tex2lyx support for lstlisting (support for \lstinline will follow soon)
- test/test-insets.tex: add a more advanced examples

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40856 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-05 01:45:14 +00:00
Uwe Stöhr
b2a03f4e67 tex2lyx/text.cpp: whitespace fixes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40853 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-04 14:18:33 +00:00
Uwe Stöhr
06d9238f30 test/test-insets.tex: add examples for listings
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40852 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-04 14:06:13 +00:00
Uwe Stöhr
df95041141 - text.cpp: - fix tex2lyx parsing of verbatim environments
- Parser.cpp: - new function to parse verbatim environments
- test/test-structure.tex: updated example

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40850 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-04 13:27:53 +00:00
Vincent van Ravesteijn
1991488377 Fix handling of the add branch textfield in GuiBranches
- Enter in the textfield adds the branch,
- Make sure the dialog is not closed when pressing enter, 
- Pressing Ctrl+Enter or the Enter on the numpad closes the dialog.

Patch based on a patch from Scott Kostyshak.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40839 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-03 14:39:32 +00:00
Vincent van Ravesteijn
803e7a9cfa GuiCitation: Do not allow to add entries by pressing Enter when the Add button is disabled.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40835 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-03 12:39:19 +00:00
Jürgen Spitzmüller
a7caeda683 Implement access to hunspell's stemming function and let the Thesaurus use that (part of bug #8060).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40830 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-02 10:20:09 +00:00
Jürgen Spitzmüller
44ed83dd86 Work around qt bug that prevents the glyph LATIN CAPITAL LETTER SHARP S from being pasted (bug #8057).
Candidate for branch.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40829 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-02 09:06:09 +00:00
Enrico Forestieri
ae2adc9559 Since version 1.9 SumatraPDF supports forward search without DDE commands.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40828 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-02 02:35:30 +00:00
Georg Baum
c2748157bb Fix parsing of \sindex{stuff} and \sindex[]{stuff}
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40826 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-01 20:37:34 +00:00
Julien Rioux
1e947e3a18 Move the citation engine machinery to layouts.
Add a new layout syntax CiteEngine to define the citation commands
available for a given citation engine.

Also extend the CiteFormat syntax to allow more customization. This
mechanism, previously used to produce bibliography entries in the
citation GUI based on the BibTeX entrytype, is now also used to
produce the textual labels for citation insets in the buffer view.

Thus citation styles are almost completely customizable by modules.
Modules for the basic, jurabib and natbib engines are implemented.

Layout format incremented to 37.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40820 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-01 00:41:30 +00:00
Uwe Stöhr
0d165bf5d6 tex2lyx/text.cpp: a fix and a clarification
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40813 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-29 22:39:21 +00:00
Georg Baum
190ab4774d Import \sindex correctly
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40804 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-28 20:34:50 +00:00
Kornel Benko
3929a71cd0 Avoid crash in call to magic_file() if the checked file does not exist
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40803 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-28 15:21:46 +00:00
Uwe Stöhr
8bca3e510f - text.cpp: escape backslashes in verbatim, fix a thinko
- test-structure.tex: add verbatim testcase

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40798 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-27 00:55:57 +00:00
Pavel Sanda
c73d9adeb7 Simplify & fix InsetGraphics tooltip, DocFileName inherits from FileName.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40797 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-26 23:09:25 +00:00
Pavel Sanda
f27d015fa4 Add tooltip for graphics insets
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40796 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-25 23:05:28 +00:00
Pavel Sanda
78508399bc Greetings to Lars from Scott Kostyshak, cf r40585.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40792 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-22 12:11:21 +00:00
Kornel Benko
f5daafc02b Added libmagic to cmake build. Should to be also adapted to windows
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40791 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-22 10:07:04 +00:00
Georg Baum
de6e4a2937 Make guessFormatFromContents() a bit more private, since it is not supposed
to be used in new code.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40790 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-21 20:46:37 +00:00
Georg Baum
26e5f1a8ec Use libmagic for file format detection if available.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40789 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-21 20:29:44 +00:00
Pavel Sanda
15e42e93ee Fix #7787
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40786 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-21 13:54:55 +00:00
Uwe Stöhr
05446b232f support for verbatim: step 2: tex2lyx support
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40785 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-20 23:38:13 +00:00
Uwe Stöhr
6869d5205f support for verbatim: step 1: the layout and the lyx2lyx code,;fileformat change (next step is the beamer issue and last step tex2lyx support)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40784 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-20 02:10:33 +00:00
Enrico Forestieri
3018614da1 On *nix, a proper forward definition of docstring is necessary for
overriding a pure virtual method (part of bug #8032).
I wonder why it was working on Windows and why it works for QString.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40783 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-19 21:44:47 +00:00
Enrico Forestieri
1eb41a88f2 Fix bug #8032 (timeout when using the Sweave module)
After the timeout elapses, the user is notified that a command is taking
a long time to complete and is given the choice to stop it. If the user
decides to let the command run, the timeout is increased, otherwise the
command is killed. One is prompted a first time after 3 mins, a second
time after 9 mins, a third time after 27 mins, and so on, i.e., the n-th
prompt occurs after 3^n minutes.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40775 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-18 14:16:25 +00:00
Enrico Forestieri
dd2185a4a6 Call lyxpak.py using the original (not mangled) document file name.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40773 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-18 13:49:33 +00:00
Jean-Marc Lasgouttes
586e0e6b8a Set use_non_tex_fonts buffer parameter and default encoding correctly when we detect that xetex or luatex is used.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40765 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-16 10:40:02 +00:00
Georg Baum
481acc66e7 Forgot that in r40694: There is no {} needed after \nobreakdash-
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40758 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-15 20:56:40 +00:00
Georg Baum
9fe72c3501 Move readBB_from_PSFile() out of support (no code change),
since it soon will need to use the Formats class.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40757 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-15 20:50:52 +00:00
Jean-Marc Lasgouttes
5d3461b10f Sort out usage of INset::has Settings and Inset::clickable
* now hasSettings only means... that the inset has a settings dialog
 * and clickable means that something should happen with left-clicking on the inset

Some inset behaviours are changed:
 * (V)Space insets are not clickable anymore (the settings dialog is still accessible via context menu and Edit menu)
 * TOC inset is now shown as active
 * FloatList inset is shown as active and clicking on it opens the relevant part of the TOC dialog

This could be a candidate for branch (2.0.4)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40755 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-15 09:42:13 +00:00
Jean-Marc Lasgouttes
ec3aed75ad Fix bug #6367: Screen jumps around when using undo/redo
http://www.lyx.org/trac/ticket/6367

* Undo.cpp: 
 - rename cur member of UndoElement to cur_before
 - add new member cur_after, which is set by Undo::endUndoGroup
 - create a new Undo::endUndoGroup variant that takes a Cursor as parameter. We cannot get rid of the old one because it is used for LFUN_COMMAND_SEQUENCE.
* Cursor.cpp: 
 - use endUndoGroup(Dociterator const &) for dispatch
 - update Cursor::endUndoGroup to pass cursor.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40713 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-07 14:56:16 +00:00
Richard Heck
2627eb26e5 Convert InsetMathCancel.* to UTF-8.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40712 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-06 22:38:46 +00:00
Richard Heck
23832ce191 HTML output for InsetMathCancel.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40711 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-06 22:38:41 +00:00
Uwe Stöhr
cf4e6ddad9 InsetMathCancel: add MathML output
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40710 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-06 17:35:29 +00:00
Jean-Marc Lasgouttes
98cd6c60f7 * InsetMathScript::doDispatch : properly record undo information before
changing limits status (fixes bug #8007)
* InsetMathScript::getStatus (new) : handle properly status for LFUN_MATH_LIMITS here, along with checkmark support for the menu)



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40700 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-02 13:39:05 +00:00
Lars Gullik Bjønnes
e770e95861 Fixup multi-line comment to use block-comment
The small ascii art in InsetMathCancel::draw has line continuation characters at
eol, this make consecutive lines be andled as one. The use of a block comment
instead of single line comments makes this less of a "problem." Also it removes
a warning with gcc 4.7.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40699 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-02 00:25:13 +00:00
Georg Baum
f483fb8e9d Fix bug #7998 and related issues:
- 0x200c is equivalent to \textcompwordmark
- 0x2011 is equivalent to \nobreakdash-
- 0x2009 is a breakable thin space (the old definition was non-breakable) 
- 0x202f is a non-breakable thin space
- add spaces 0x2007, 0x2008, 0x200a and 0x200b


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40694 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-31 20:49:49 +00:00
Jürgen Spitzmüller
72f56d7309 Fix bug #8013: updateDefaultFormat() checks the osFontsCB state, so the fonts UI needs to be set in advance of the output UI.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40689 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-31 11:30:52 +00:00
Julien Rioux
b6eb780d64 Small fixups to r40663
lyx2lyx: Clean up the convert/revert queue.
LaTeXFeatures: Just add cancel to the list of packages that are
               simply used with a \usepackage{} line.

Uwe: In case cancel needs to be loaded after amsmath or something,
     please revert my changes to LaTeXFeatures and add a comment
     about package ordering to the source. Thanks.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40667 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-23 17:20:07 +00:00
Uwe Stöhr
11da53414e version.h: fix typos
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40666 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-23 02:00:36 +00:00
Uwe Stöhr
65f26a7a14 add support for the package cancel in math (fixes #6819); fileformat change only for the preamble handling
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40663 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-23 01:49:49 +00:00
Vincent van Ravesteijn
67ed71619e Whitespace.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40660 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-22 22:20:50 +00:00
Vincent van Ravesteijn
adb70a1fe0 Reuse the same code for the append* and copy* functions
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40659 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-22 22:16:03 +00:00
Vincent van Ravesteijn
2206f1a655 Unify the parameters of the [append/copy][row/column] family
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40658 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-22 22:15:25 +00:00
Vincent van Ravesteijn
965d21bbab Unify the parameters of the [append/copy][row/column] family
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40657 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-22 22:15:11 +00:00
Vincent van Ravesteijn
13dea3bb4f Fix bug #7644: Crash when copying table column or row
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40656 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-22 21:44:27 +00:00
Georg Baum
5e47fc73d5 Enable the graphics converter to copy with identical in and out file names.
This is already supported in Converters::convert() and needed e.g. for
eps2->eps conversion.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40649 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-22 14:08:53 +00:00
Georg Baum
29627f1680 Fix converters with input redirection, such as the second htlatex one.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40647 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-22 12:35:07 +00:00
Jürgen Spitzmüller
b965edbb02 Fix crash when putting a float around multiple display maths (bug #7974).
This also fixes other float-related bugs, such as this:

* select two floats in two consecutive paragraphs and insert a new float around them
=> the master float's caption is put into the lower subfloat instead of below the subfloats.

In the long term, doInsertInset needs a thorough cleanup.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40639 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-21 07:02:09 +00:00
Jürgen Spitzmüller
af8cec47e9 Fix crash due to the attempt to access paragraph() from within mathed while doing forward-search (bug #7992).
This should go to branch as well.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40636 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-20 10:44:07 +00:00
Jürgen Spitzmüller
163bc119e6 Do not load font packages with encoding "utf8-plain" (bug #7766, #7782).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40633 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-20 06:07:12 +00:00
Richard Heck
49b838a320 If we don't have a tooltip in the TOC, then use the display string
as the tooltip. This isn't redundant, since the TOC itself might
truncate the display string.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40626 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-16 15:07:04 +00:00
Richard Heck
12b16d1ae9 Fix bug #7774. It should be fine to show the complete index entry
in the TOC, as these generally aren't that long.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40625 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-16 15:01:02 +00:00
Richard Heck
9af32c1740 Change minimum value in forToc().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40624 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-16 14:48:35 +00:00
Richard Heck
07c49ed324 Fix bug #7983: Do not modify params before we know we have
something valid!

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40615 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-15 16:43:03 +00:00
Enrico Forestieri
07b2898afe After r40612, the check for isFullUnicode is redundant. So, partially
revert r40607 and accordingly adapt the code.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40613 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-14 14:27:55 +00:00
Enrico Forestieri
76c376c427 Avoid \inputencoding altogether if the buffer encoding permits
(part of bug #7800).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40612 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-14 01:21:00 +00:00
Richard Heck
4026c0dccd If we switch via the mouse, we need to update the Buffer
after we switch.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40610 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-13 03:31:48 +00:00
Richard Heck
9283cbdbcb Fix crash reported on list when renaming a child buffer and
then trying to compile.

    There are really two problems here. One is that the renamed
    buffer needs to be reloaded. All kinds of files, etc, may not
    exist any more, if we've been saved to a new directory; our
    children e.g. may not be in the right place. And, in this case,
    we may no longer be a child of our old parent. Reloading will
    fix all of that.

    On reload, though, we need to clear our parent, since we may
    not have one any more. It will get reset if need be.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40609 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-13 03:31:01 +00:00
Richard Heck
28d7db3b9f Squash warning.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40608 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-13 03:16:46 +00:00
Enrico Forestieri
08ba2b9b45 Refine fix for bug #7800. Don't use \inputencoding with unicode backends.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40607 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-13 00:52:03 +00:00
Georg Baum
a6f843aacb get rid of dead code and silly function
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40605 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-12 19:48:08 +00:00
Stephan Witt
42dfd71197 #7789 unify and fix buffer statistics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40602 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-12 07:03:24 +00:00
Stephan Witt
576e8d0497 #7978 validate stored doc iterators for start position and selection range to avoid crashes in case the user does the spell check and unrelated changes in parallel
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40601 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-12 06:12:28 +00:00
Richard Heck
6f3dd321f3 Be a bit more careful here. In weird cases, this can be null.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40600 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-12 02:09:08 +00:00
Stephan Witt
20f61c7eb7 #7884 improved return code of EnchantChecker::check() when dictionaries are missing
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40598 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-11 17:03:49 +00:00
Julien Rioux
a99960cc04 Update tex2lyx to format 424.
The type of citation engine is determined by the citation package
being used and, in the case of natbib, its options.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40593 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-09 13:16:41 +00:00
Julien Rioux
e3f65fd088 Buffer param \cite_engine_type (authoryear|numerical).
To avoid duplicity, remove natbib_authoryear and natbib_numerical
and replace them by natbib, and keep track of the engine `type'
in the new \cite_engine_type document setting. This will make it
easier to add more citation engines.

LyX format incremented to 424.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40592 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-09 13:16:38 +00:00
Georg Baum
db9e633b7f Fix bug #5906 (missing -p command) by updating the man page.
tex2lyx does not need a -p command since it detects partial files automatically.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40591 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-08 17:38:48 +00:00
Georg Baum
45c831306d Fix bug #7013: Wrong paper size passed to dvips
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40590 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-08 17:00:33 +00:00
Georg Baum
187790135b Fix bug #5029: Support \smash, \mathclap, \mathllap and \mathrlap.
Also improve lyx2lyx roundtrip for automatically loaded packages.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40589 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-08 12:34:12 +00:00
Georg Baum
3dba00246c Quick fix bug #4267.
A real fix would be to ditch the home made file format detection and use libmagic.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40587 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-07 19:18:38 +00:00
Lars Gullik Bjønnes
d2f2148c90 Avoid narrowing in array initializator
Gcc 4.7 warns that this kind of narrowing is illegal in C++11, so
we can just as well fix that right now.

In GuiFontMetrics this is fixed by chaning the types in the AscendDescend struct
from short int to int.
In ParagraphMetrics it is fixed by addint explicit casts.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40586 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-07 18:29:07 +00:00
Lars Gullik Bjønnes
dfffb9a6d1 Change to avoid having different types in ?: operator
Gcc 4.7 warns rightly about the questionalble practise of having different types in
the ?: operator. This patch fixes that.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40585 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-07 18:29:04 +00:00
Tommaso Cucinotta
b4aadacc23 This makes the FindAndReplace replace-related buttons de-activate
also when switching from an editable buffer to a read-only buffer,
without waiting for the moment in which the dialog is focused.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40582 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-07 11:41:04 +00:00