Commit Graph

2599 Commits

Author SHA1 Message Date
Enrico Forestieri
3ebcbf5b32 Fix bug #6965 (Crash editing ERT in math mode)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35879 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-28 11:13:47 +00:00
Vincent van Ravesteijn
49beed7437 Fix bug #6989: Be somewhat more secure with the homebrew dynamic asserts that were changed in r35855.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35863 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-27 07:04:58 +00:00
Vincent van Ravesteijn
07924ac300 Remove some unnecessary static_casts and add two FIXMEs about casts that don't look safe.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35856 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-26 16:45:21 +00:00
Vincent van Ravesteijn
573500dd04 Remove unneccessary uses of dynamic_cast from the code.
A dynamic_cast is necessary when:

- the object to be casted is from an external library because we can't add Qxxx::asXxxx() to Qt e.g.:
    * QAbstractListModel to GuiIdListModel,
    * QValidator to PathValidator,
    * QWidget to TabWorkArea,
    * QWidget to GuiWorkArea;

- the object is to be casted from an interface to the implementing class, because the Interface does not know by whom it is implemented:
    * ProgressInterface to GuiProgress,
    * Application to GuiApplication.

A dynamic_cast can be replaced by:
  - already existing as***Inset() functions, e.g.:
    * asHullInset(),
    * asInsetMath()->asMacro(),
    * asInsetText();

  - a static_cast when we are sure this can't go wrong, e.g.:
    * we are sure that CellData::inset->clone() is an InsetTableCell,
    * in cases where we explicitly check it->lyxCode().


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35855 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-26 15:03:51 +00:00
Vincent van Ravesteijn
8693ae474b Proper implementatiom of isInToc()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35846 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-26 01:10:19 +00:00
Enrico Forestieri
f967cd1c45 Proper fix for #6967 that does not reintroduce #6793
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35841 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-25 21:36:25 +00:00
Vincent van Ravesteijn
8a550ba48a I don't like negated logic. Especially not if it leads to the use of more !-operations.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35801 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-24 17:27:32 +00:00
Vincent van Ravesteijn
70ed1095ec Fix bug #6967: Insert->Display Math should not insert a numbered formula and vice versa.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35799 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-24 16:12:22 +00:00
Vincent van Ravesteijn
152491f916 Some cosmetics (from my local cosmetics branch).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35708 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-18 14:20:03 +00:00
Richard Heck
6a80ce62ca DispatchResult::update() ==> DispatchResult::screenUpdate()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35631 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-13 17:28:55 +00:00
Pavel Sanda
65962da47b Add support for feyn package and Diagram inset.
Patch from Ronen Abravanel.
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg161952.html

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35455 a592a061-630c-0410-9148-cb99ea01b6c8
2010-09-19 22:12:06 +00:00
Enrico Forestieri
0dec044864 If system colors are used, paint selected math in Color_selectiontext
instead of Color_math.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35355 a592a061-630c-0410-9148-cb99ea01b6c8
2010-09-13 01:36:00 +00:00
Jean-Marc Lasgouttes
6d4709d46c Sanitize ColorChanger
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35331 a592a061-630c-0410-9148-cb99ea01b6c8
2010-09-09 13:02:20 +00:00
Uwe Stöhr
3ee100f47d MathSupport.cpp:
- fix metrics of the dots of \ddddot
- whitespace fixes

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35231 a592a061-630c-0410-9148-cb99ea01b6c8
2010-08-29 22:59:24 +00:00
Uwe Stöhr
7d68833dc9 remove unused include of FuncRequest
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35189 a592a061-630c-0410-9148-cb99ea01b6c8
2010-08-24 03:07:09 +00:00
Enrico Forestieri
7238d40c99 Move code to more proper place.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35180 a592a061-630c-0410-9148-cb99ea01b6c8
2010-08-19 22:50:06 +00:00
Enrico Forestieri
fa0cd9ad60 Fix bug #6793: Changing an existing formula type to displayed formula loses the label
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35178 a592a061-630c-0410-9148-cb99ea01b6c8
2010-08-19 13:58:36 +00:00
Enrico Forestieri
66808b0482 Avoid memory leak when the label is on the first row.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35168 a592a061-630c-0410-9148-cb99ea01b6c8
2010-08-19 08:17:36 +00:00
Enrico Forestieri
97fb94d90f Fix crash when mutating eqnarray-like environments with labeled lines
to display equations.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35163 a592a061-630c-0410-9148-cb99ea01b6c8
2010-08-19 07:28:49 +00:00
Enrico Forestieri
87f155767a Better fix for bug #6851.
The old-style font changing macros really inherit the mode, so we have
to account for this.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35156 a592a061-630c-0410-9148-cb99ea01b6c8
2010-08-14 17:57:06 +00:00
Enrico Forestieri
61791114a1 Fix bug #6851: Wrong screen fonts with old style macros such as \bf and \rm.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35136 a592a061-630c-0410-9148-cb99ea01b6c8
2010-08-14 00:22:04 +00:00
Jean-Marc Lasgouttes
60445ede53 remove unused headers
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35129 a592a061-630c-0410-9148-cb99ea01b6c8
2010-08-12 09:38:22 +00:00
Richard Heck
56c500bae5 Update comments a bit.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35035 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-29 16:55:02 +00:00
Richard Heck
a7f7530bd2 MathML and HTML definitely can't handle MathUnknown!!
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35028 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-29 15:48:01 +00:00
Richard Heck
f1d941098c MathML and HTML can't handle XYArrow.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35027 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-29 15:46:26 +00:00
Richard Heck
b520657039 HTML for xarrows.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35026 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-29 15:44:17 +00:00
Richard Heck
c8bc76b333 MathML and HTML definitely can't handle XYMatrix.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35025 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-29 15:38:01 +00:00
Richard Heck
7a8a1eca21 Framework for math export exceptions. We can throw these if we find
something we don't know how to handle and fall back to images.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35024 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-29 15:37:42 +00:00
Richard Heck
e48fb0b661 Allow images to be export even when LyXRC says no previews.
I'll try to figure out how to get rid of the magic booleans.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35022 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-29 15:17:58 +00:00
Richard Heck
833ef6352f Comment.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35021 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-29 14:29:54 +00:00
Enrico Forestieri
0d78b79311 Refine fix for bug #1337.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35009 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-23 07:34:26 +00:00
Enrico Forestieri
976307231d Fix bug #1337: LyX confused on $ symbol in math equations
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35008 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-22 23:19:52 +00:00
Richard Heck
3d6fb3bd1d Try again with LaTeX output for XHTML math.
The previous attempt messed up the inheritance hierarchy somehow. I
think.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35002 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-22 02:47:12 +00:00
Richard Heck
80aca38970 Partially revert r34995, which broke math output. Not sure why yet....
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35001 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-22 02:20:12 +00:00
Richard Heck
9803d7a2a6 Prepare for the use of exceptions to catch occasions when we can't
export as MathML, etc.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34996 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-21 14:02:46 +00:00
Richard Heck
c036ecb649 Tweak the math-as-LaTeX output, including the correct tags for jsMath.
We don't yet write info to load the jsMath files, though.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34995 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-21 13:43:35 +00:00
Richard Heck
e7bb1e616e Re-organize code from a last commit a bit.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34994 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-21 13:26:48 +00:00
Richard Heck
b8d43b05bc Support for exporting math as images with XHTML. The next step is to
allow this as a fallback. E.g., if we're unable to export as MathML,
then we try to export as an image.

There are several ways, I am sure, in which this implementation is not
ideal.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34993 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-21 13:19:52 +00:00
Richard Heck
096cf9f2e8 Whitespace only (two tabs at end of each line?).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34991 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-20 19:45:36 +00:00
Uwe Stöhr
72292b98a6 support for formal math script
- fileformat change
- fixes #2340

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34941 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-17 15:51:11 +00:00
Pavel Sanda
3e64ec2c9d comment
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34925 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-17 09:53:29 +00:00
Richard Heck
5577e877bb Try to move all updateBuffer() calls to a central location. We now use
DispatchResult to store a flag that tells us whether we need a buffer
update or not. 

So: If you find a missing one, go to an appropriate place in the
dispatch and call cur.forceBufferUpdate() or, if you don't have a cursor
but do have a DispatchResult, call dr.forceBufferUpdate().

There is one remaining call I could not move, in
TextMetrics::redoParagraph. But this looks like an emergency call when
the macro context has not been set. There are also a couple calls that
are connected with buffer creation that I commented out, since the same
call is done again almost immediately. But I'm not positive about those.

Now the nice thing would be to do the same for updateMacros().


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34826 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-09 14:37:00 +00:00
Richard Heck
0e14f379f3 Rename a couple routines. This will avoid confusion with a forthcoming
patch.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34816 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-08 20:04:35 +00:00
Enrico Forestieri
67f6e68e8d Add last missing inner-hull grid type environments.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34766 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-05 17:30:03 +00:00
Enrico Forestieri
7049447fd7 Correct refinement fix for #6595. The problem was not adding \\ to the last
empty line of substack, tabular and xymatrix, but not calling delEmptyLastRow
for them.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34763 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-05 12:31:18 +00:00
Enrico Forestieri
d546a9b286 Revert r34761 because that was not the right fix that is going to be
committed shortly.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34762 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-05 12:25:48 +00:00
Enrico Forestieri
7eeb664bbb Refine fix for #6595. Don't add \\ to the last empty line of substack,
tabular and xymatrix.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34761 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-05 10:03:56 +00:00
Enrico Forestieri
d9ddc95ab8 Refine fix for #6595. It turns out that the last empty line is to be
deleted not only for "array" but also for all inner-hull grid types.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34752 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-04 18:08:14 +00:00
Enrico Forestieri
9536afe742 Fix bug #6595: empty last row of matrix or eqnarray vanishes.
This patch essentially reverts r30795 and also provides the correct fix
for #2969.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34751 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-04 16:31:53 +00:00
Enrico Forestieri
0c26995be6 Fix bug #6756: import problem with \ (no space following)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34638 a592a061-630c-0410-9148-cb99ea01b6c8
2010-06-09 20:13:11 +00:00