Commit Graph

20348 Commits

Author SHA1 Message Date
Richard Heck
f84eb64ac7 Try to fix bug 8124. We enable LFUN_INSET_MODIFY in InsetBox if it
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.
2012-05-02 17:30:52 -04:00
Vincent van Ravesteijn
c671703f05 Fix bug #953: Paint text decorations for spaces 2012-05-02 18:02:52 +02:00
Vincent van Ravesteijn
53b75399e7 Factor out painting of text decorations 2012-05-02 18:02:17 +02:00
Vincent van Ravesteijn
fa9bd04ea4 Fix bug #7914: Freeze on docbook export of lists and bibliography
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.
2012-05-02 15:34:56 +02:00
Vincent van Ravesteijn
26dcfcd343 Fix bug #8089: Handle spaces at the end of the stream
If the stream is good (i.e. there are still tokens) and we expect an
argument, we call getArg(). However, if there are only spaces, the stream
suddenly isn't good anymore after 'skipSpaces' and we would get an error
when calling 'getChar'. Therefore we have to check whether the stream is
still good.
2012-05-02 14:41:08 +02:00
Vincent van Ravesteijn
1ef930c058 MathParser: Do not rewind the stream if we can't read from it
If the stream is not good, we don't need to 'putback', because we didn't
read anything yet. If we now do rewind the stream, we are asking for
problems as in bug #8089.

This was introduced in [3cafb856\lyxgit] to fix bug #4318.
2012-05-02 14:40:14 +02:00
Richard Heck
e90cd4180e Constness, etc. 2012-05-01 13:02:10 -04:00
Richard Heck
d2acacedf9 We don't need to rescan everything from the BibTeX dialog, just
the bib and bst files.
2012-05-01 12:54:17 -04:00
Enrico Forestieri
9825621798 Fix bug #8140: Crash with math macros and input completion
When clicking away in the same math inset after hitting '\', the
cursor may be broken and all of its instances have to be fixed.
2012-04-30 23:55:34 +02:00
Vincent van Ravesteijn
3c0e3c16c8 Fix bug #8078: Assertions in xhtml output on Windows 2012-04-30 12:58:32 +02:00
Vincent van Ravesteijn
225bcf92df Indicate that this rtl variable is only valid on the last row
Otherwise the variable might be used incorrectly as in [0a137e31/lyxgit].
2012-04-29 22:49:30 +02:00
Vincent van Ravesteijn
d7f68078cf Fix bug #7518: Assert when selecting in RTL text
If we are in rtl text, we *need* to check whether the first character is a
space. We can't use the rtl variable for this because this is only
computed on the last row.

This bug was introduced in [0a137e31/lyxgit] to fix the computation for
freespacing paragraphs. We better can just check whether the paragraph is
freespacing or not.
2012-04-29 22:47:06 +02:00
Vincent van Ravesteijn
6327993867 Fix bug #7667: Pixmap cache and CT lead to random colors
The signature of the character in cache should take into account the
change tracking baseColor (author) and mergeColor (added/deleted). If not,
we will mixup different cached pixmaps.
2012-04-29 14:59:19 +02:00
Vincent van Ravesteijn
af4e31ec28 Reset the (running) change in PainterInfo
When an InsetText is deleted, all lines in the inset are painted as
deleted. This status should be restored afterwards. If not, insets will be
painted in the wrong color afterwards (e.g. tables).
2012-04-29 14:56:19 +02:00
Vincent van Ravesteijn
14ef7d2b82 Fix bug #7653: Quotation marks have wrong color
Quotation marks had the wrong color when using change tracking, or when
selecting.
2012-04-29 14:54:31 +02:00
Vincent van Ravesteijn
77c8c15947 Do not show deleted text in the html title 2012-04-29 14:54:12 +02:00
Vincent van Ravesteijn
3a395ca0f5 BufferView::dispatch(): add a missing break 2012-04-29 14:51:24 +02:00
Richard Heck
631abb2da0 Allow viewing full file of plaintext source. 2012-04-27 21:17:08 -04:00
Richard Heck
db71ec4477 Re-organize logic of getSourceCode() routine, so we can see XHTML
for DocBook files.
2012-04-27 21:14:25 -04:00
Enrico Forestieri
66a95b9c1b Fix bug #8139 and a thinko in [737e9b2c/lyxgit].
I had already noticed the above mentioned thinko and this commit
should have been part of [3285ce1d5/lygit] but somehow I managed
to lose it in the git branches game: do a branch for that, than
try a different thing in another branch, then rebase to avoid
merge conficts, and finally delete all unneeded branches. Well it
is too much easy to do the wrong thing and pick the wrong branch,
deleting the right one. I will never follow the git way anymore
and will do I was used to do with svn.
2012-04-26 15:23:42 +02:00
Pavel Sanda
217ef5bf39 Thesaurus keyword combo completion (bug #8138). 2012-04-25 16:40:51 +02:00
Pavel Sanda
8ea66efe16 Attempt to fix #8137 (arrived at r40862).
1) Revert to designer compilable by older Qt's
2) Remove spacer in right part of dialog
3) Decrease height.
2012-04-24 02:02:25 +02:00
Richard Heck
e56ee0b2e6 Don't output extra body tags with included files. 2012-04-23 13:55:13 -04:00
Pavel Sanda
728043e3da Comment from JMarc (devlist) 2012-04-22 12:32:41 +02:00
Richard Heck
94b9da328b Rename is_valid_ as validated_, which is a bit more informative. 2012-04-21 16:25:38 -04:00
Richard Heck
afee2488cb Optimize a bit the handling of local layout validation. This handles
empty cases better than what was before.

Patch from Scott Kostyshak.
2012-04-21 16:22:28 -04:00
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