Commit Graph

2696 Commits

Author SHA1 Message Date
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
Richard Heck
81228c90fc Fix bug #6759. Thanks to Vincent.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34637 a592a061-630c-0410-9148-cb99ea01b6c8
2010-06-09 17:02:55 +00:00
Stephan Witt
2052c1e7cc correct in LFUN_MATH_NUMBER_TOGGLE the conversion of display state to enabled state
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34634 a592a061-630c-0410-9148-cb99ea01b6c8
2010-06-09 12:04:25 +00:00
Enrico Forestieri
fe7196a545 The delimiters '<' and '>' can also be used as big delimiters. They are
equivalent to \langle and \rangle, which were already taken into account.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34607 a592a061-630c-0410-9148-cb99ea01b6c8
2010-06-06 18:11:15 +00:00
Enrico Forestieri
e0a5cda787 Add GUI support for big delimiters variants without 'l', 'm' or 'r' endings.
They differ from their cousins only for the space left around them.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34604 a592a061-630c-0410-9148-cb99ea01b6c8
2010-06-06 00:42:33 +00:00
Enrico Forestieri
41db28dd45 Fix bug #6739: Loading in a 1.6.5 file causes 1.6.6-1 to crash
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34563 a592a061-630c-0410-9148-cb99ea01b6c8
2010-05-31 23:20:30 +00:00
Enrico Forestieri
a2d888496b Still white space.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34562 a592a061-630c-0410-9148-cb99ea01b6c8
2010-05-31 23:12:07 +00:00
Enrico Forestieri
c4faa16f20 Only white space.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34561 a592a061-630c-0410-9148-cb99ea01b6c8
2010-05-31 23:02:04 +00:00
Uwe Stöhr
106d31cd67 InsetMathHull.h: fix typo in comment
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34445 a592a061-630c-0410-9148-cb99ea01b6c8
2010-05-22 00:46:57 +00:00
Enrico Forestieri
cf1f59dd4d Fix bug #6678: Crash when undoing backspace inside math-macro
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34370 a592a061-630c-0410-9148-cb99ea01b6c8
2010-05-04 16:16:20 +00:00
Vincent van Ravesteijn
86eaa6de73 Another base class without a virtual destructor.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34362 a592a061-630c-0410-9148-cb99ea01b6c8
2010-05-03 22:55:40 +00:00
Enrico Forestieri
7d4ca5033e Implement LFUN_UNICODE_INSERT in mathed.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34351 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-30 22:23:19 +00:00
Vincent van Ravesteijn
708b73cab7 Fix bug #3900: Mathed corners displayed without mouse hover.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34348 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-30 14:55:37 +00:00
Vincent van Ravesteijn
4c611e5745 Mouse hover property should be dependent on the specific bufferview. If there are 2 views showing the same buffer, an Inset can be shown as hovered in only one view.
This is also in preparation of a decent fix for bug #3900.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34347 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-30 14:47:46 +00:00
Enrico Forestieri
9b3aadbe22 Don't hardcode Color_math, such that decorations and other math
elements can be drawn in the right color on screen.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34326 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-28 13:19:09 +00:00
Enrico Forestieri
beb3fa70e8 Also account for colors in math macros.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34325 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-28 11:38:01 +00:00
Enrico Forestieri
d9bcbe5de6 Index: src/mathed/InsetMathEnsureMath.cpp
===================================================================
--- src/mathed/InsetMathEnsureMath.cpp	(revisione 34304)
+++ src/mathed/InsetMathEnsureMath.cpp	(copia locale)
@@ -13,8 +13,9 @@
 
 #include "InsetMathEnsureMath.h"
 
-#include "MathStream.h"
 #include "MathData.h"
+#include "MathStream.h"
+#include "MathSupport.h"
 
 #include <ostream>
 
@@ -34,7 +35,8 @@ Inset * InsetMathEnsureMath::clone() con
 
 void InsetMathEnsureMath::metrics(MetricsInfo & mi, Dimension & dim) const
 {
-	FontSetChanger dummy(mi.base, "mathnormal");
+	bool really_change_font = isTextFont(from_ascii(mi.base.fontname));
+	FontSetChanger dummy(mi.base, "mathnormal", really_change_font);
 	cell(0).metrics(mi, dim);
 	metricsMarkers(dim);
 }
@@ -42,7 +44,8 @@ void InsetMathEnsureMath::metrics(Metric
 
 void InsetMathEnsureMath::draw(PainterInfo & pi, int x, int y) const
 {
-	FontSetChanger dummy(pi.base, "mathnormal");
+	bool really_change_font = isTextFont(from_ascii(pi.base.fontname));
+	FontSetChanger dummy(pi.base, "mathnormal", really_change_font);
 	cell(0).draw(pi, x, y);
 	drawMarkers(pi, x, y);
 }


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34321 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-28 01:58:11 +00:00
Enrico Forestieri
6c33aa2e5b Index: src/mathed/InsetMathHull.cpp
===================================================================
--- src/mathed/InsetMathHull.cpp	(revisione 34304)
+++ src/mathed/InsetMathHull.cpp	(copia locale)
@@ -328,6 +328,23 @@ docstring InsetMathHull::standardFont()
 }
 
 
+docstring InsetMathHull::standardColor() const
+{
+	docstring color;
+	switch (type_) {
+	case hullRegexp:
+		color = from_ascii("foreground");
+		break;
+	case hullNone:
+		color = from_ascii("foreground");
+		break;
+	default:
+		color = from_ascii("math");
+	}
+	return color;
+}
+
+
 bool InsetMathHull::previewState(BufferView * bv) const
 {
 	if (!editing(bv) && RenderPreview::status() == LyXRC::PREVIEW_ON) {
@@ -417,8 +434,11 @@ void InsetMathHull::draw(PainterInfo & p
 		return;
 	}
 
+	bool const really_change_color = pi.base.font.color() == Color_none;
+	ColorChanger dummy0(pi.base.font, standardColor(), really_change_color);
 	FontSetChanger dummy1(pi.base, standardFont());
 	StyleChanger dummy2(pi.base, display() ? LM_ST_DISPLAY : LM_ST_TEXT);
+
 	InsetMathGrid::draw(pi, x + 1, y);
 
 	if (numberedType()) {
Index: src/mathed/MathSupport.cpp
===================================================================
--- src/mathed/MathSupport.cpp	(revisione 34311)
+++ src/mathed/MathSupport.cpp	(copia locale)
@@ -653,6 +653,13 @@ bool isMathFont(docstring const & name)
 }
 
 
+bool isTextFont(docstring const & name)
+{
+	fontinfo * f = lookupFont(name);
+	return f && f->color_ == Color_foreground;
+}
+
+
 FontInfo getFont(docstring const & name)
 {
 	FontInfo font;
Index: src/mathed/MathSupport.h
===================================================================
--- src/mathed/MathSupport.h	(revisione 34311)
+++ src/mathed/MathSupport.h	(copia locale)
@@ -51,6 +51,8 @@ bool isFontName(docstring const & name);
 
 bool isMathFont(docstring const & name);
 
+bool isTextFont(docstring const & name);
+
 // converts single cell to string
 docstring asString(MathData const & ar);
 // converts single inset to string
Index: src/mathed/InsetMathHull.h
===================================================================
--- src/mathed/InsetMathHull.h	(revisione 34304)
+++ src/mathed/InsetMathHull.h	(copia locale)
@@ -197,6 +197,8 @@ private:
 	void changeCols(col_type);
 	///
 	docstring standardFont() const;
+	///
+	docstring standardColor() const;
 	/// consistency check
 	void check() const;
 	/// can this change its number of rows?
Index: src/MetricsInfo.cpp
===================================================================
--- src/MetricsInfo.cpp	(revisione 34312)
+++ src/MetricsInfo.cpp	(copia locale)
@@ -235,11 +235,15 @@ FontSetChanger::FontSetChanger(MetricsBa
 		save_ = mb;
 		FontSize oldsize = save_.font.size();
 		ColorCode oldcolor = save_.font.color();
+		docstring const oldname = from_ascii(save_.fontname);
 		mb.fontname = name;
 		mb.font = sane_font;
 		augmentFont(mb.font, from_ascii(name));
 		mb.font.setSize(oldsize);
-		mb.font.setColor(oldcolor);
+		if (string(name) != "lyxtex"
+		    && ((isTextFont(oldname) && oldcolor != Color_foreground)
+			|| (isMathFont(oldname) && oldcolor != Color_math)))
+			mb.font.setColor(oldcolor);
 	}
 }
 
@@ -252,11 +256,15 @@ FontSetChanger::FontSetChanger(MetricsBa
 		save_ = mb;
 		FontSize oldsize = save_.font.size();
 		ColorCode oldcolor = save_.font.color();
+		docstring const oldname = from_ascii(save_.fontname);
 		mb.fontname = to_utf8(name);
 		mb.font = sane_font;
 		augmentFont(mb.font, name);
 		mb.font.setSize(oldsize);
-		mb.font.setColor(oldcolor);
+		if (name != "lyxtex"
+		    && ((isTextFont(oldname) && oldcolor != Color_foreground)
+			|| (isMathFont(oldname) && oldcolor != Color_math)))
+			mb.font.setColor(oldcolor);
 	}
 }
 
@@ -294,17 +302,21 @@ WidthChanger::~WidthChanger()
 //
 /////////////////////////////////////////////////////////////////////////
 
-ColorChanger::ColorChanger(FontInfo & font, string const & color)
-	: Changer<FontInfo, string>(font)
+ColorChanger::ColorChanger(FontInfo & font, docstring const & color,
+			   bool really_change_color)
+	: Changer<FontInfo, ColorCode>(font), change_(really_change_color)
 {
-	save_ = lcolor.getFromLyXName(color);
-	font.setColor(lcolor.getFromLyXName(color));
+	if (change_) {
+		save_ = font.color();
+		font.setColor(lcolor.getFromLyXName(to_utf8(color)));
+	}
 }
 
 
 ColorChanger::~ColorChanger()
 {
-	orig_.setColor(lcolor.getFromLyXName(save_));
+	if (change_)
+		orig_.setColor(save_);
 }
 
 
Index: src/MetricsInfo.h
===================================================================
--- src/MetricsInfo.h	(revisione 34312)
+++ src/MetricsInfo.h	(copia locale)
@@ -222,12 +222,16 @@ public:
 
 
 // temporarily change the used color
-class ColorChanger : public Changer<FontInfo, std::string> {
+class ColorChanger : public Changer<FontInfo, ColorCode> {
 public:
 	///
-	ColorChanger(FontInfo & font, std::string const & color);
+	ColorChanger(FontInfo & font, docstring const & color,
+		     bool really_change_color = true);
 	///
 	~ColorChanger();
+private:
+	///
+	bool change_;
 };
 
 } // namespace lyx


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34320 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-28 01:40:11 +00:00
Enrico Forestieri
c88eaf877e Changing only the shape does not always work. For example,
\mathbb{\underbar{a}} is not correctly rendered on screen.
We really have to change the font set, but not always.
This cannot be done using an "if" statement, as when
the FontSetChanger scope ends, everything is restored,
defeating our change. Thus, this has to be done in the
FontSetChanger class itself. This is easily accomplished
by introducing a boolean with a default value of true
for really changing a font set.
This will also be useful in other cases that I am discovering.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34312 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-27 21:31:28 +00:00
Enrico Forestieri
dbb5ac93ea The check for Color_math would fail if the font color is changed
in mathed, so implement a strategy which is immune to color changes.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34311 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-27 19:23:31 +00:00
Enrico Forestieri
17af3ea8f4 Change only the shape and not the whole font, otherwise constructs
such as \mathbf{\hat{a}} would not be correctly rendered on screen.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34297 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-26 20:20:49 +00:00
Peter Kümmel
38628558a6 cmake: more merged build fixes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34274 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-23 09:10:35 +00:00
Peter Kümmel
61b2bd5e7f Using "using namespace std" with msvc10 makes also std::tr1::bind visible and generates conflicts with boost::bind.
Solution: don't use boost::bind for msvc10 (could also be extended  to several GCC versions)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34257 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-22 11:16:58 +00:00
Pavel Sanda
62ca7f3ae5 Proper camel case for FileName.absFilename
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34234 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-21 01:19:09 +00:00
Vincent van Ravesteijn
108a67ed43 Make Cursor::anchor_ private and make an access function Cursor::realAnchor() to stress the fact that this is thus not the normalAnchor().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34146 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-15 18:16:07 +00:00
Vincent van Ravesteijn
8156884090 Make Cursor::disp_ private as it should be.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34144 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-15 17:34:34 +00:00
Richard Heck
b79d8e5e2d Make members of FuncRequest private, per the FIXME there. Again, this is
basically a massive renaming, with no real changes.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34106 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-09 19:00:42 +00:00
Richard Heck
4c7a5d0024 This is just a giant renaming of member variables in FuncRequest,
preparatory to making them private.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34105 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-09 18:15:17 +00:00
Vincent van Ravesteijn
333c17f879 Fix bug #6633: Equations that end in \limits or \nolimits are corrupted on load.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34025 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-02 15:22:50 +00:00
Richard Heck
1eb8311aff HTML for binomials.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33995 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 21:33:33 +00:00
Richard Heck
c7cfcf9e2f Make sure to call the parent's validate method.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33992 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 21:24:16 +00:00
Richard Heck
6a702a2f99 HTML for substack. Sort of. There's an odd problem here, that is
actually a general LyX bug, but I'll report that to the list.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33991 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 21:17:30 +00:00
Richard Heck
bf76659e67 Revert r33989. We do need this.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33990 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 21:02:10 +00:00
Richard Heck
bab268352b HTML for stackrel.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33989 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 20:54:27 +00:00
Richard Heck
85425d8e6c HTML for InsetMathSplit.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33988 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 20:50:29 +00:00
Richard Heck
ae69c7c63c HTML for special characters.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33987 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 20:49:21 +00:00
Richard Heck
da26079578 HTML for math spaces.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33986 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 20:47:55 +00:00
Richard Heck
f3711d8a65 HTML for math sizes.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33985 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 20:37:23 +00:00
Richard Heck
ea44f30077 Ignore phantoms for now.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33984 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 20:31:15 +00:00
Richard Heck
32ee4c13cf HTML for roots.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33983 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 20:31:04 +00:00
Richard Heck
36e2a2c95f HTML for underset.
Neither underset nor overset will work reliably, I'm afraid, but such is
the price of using HTML rather than MathML.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33982 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 20:12:52 +00:00
Richard Heck
77bd365b39 HTML for overset.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33979 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 20:04:39 +00:00
Richard Heck
edff97cb30 Matrix output via HTML. I have to say, this one took some work.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33978 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 19:59:09 +00:00
Richard Heck
db1d81f03a Forgot this piece before.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33977 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 19:58:49 +00:00
Richard Heck
96390e0ff7 Change semantics of two-arg htmlize to make more consistent with other
functions.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33975 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 19:17:06 +00:00
Richard Heck
2f44dc2583 This doesn't seem to be compiled even, but oh well.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33972 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 19:01:15 +00:00
Richard Heck
ed8af8f7fd Ignore kerning in HTML.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33971 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 18:59:04 +00:00
Richard Heck
2a1c6c3541 HTML for math fonts.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33970 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 18:57:47 +00:00
Richard Heck
9ee805185c Fix up the math stream.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33969 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 18:57:37 +00:00
Richard Heck
a0043da05f Introduce and use a "math_flavor" flag with OutputParams.
I'm not happy about having what is basically the same enum in
BufferParams.h and OutputParams.h, but I don't see how to unify them
without either (a) including BufferParams.h in OutputParams.h, which is
ugly or (b) creating some new file just containing this enum, which
seems like overkill. Any other ideas?


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33967 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 18:24:52 +00:00
Enrico Forestieri
4fc5f86137 Fix bug #4565: Using keyboard shortcuts to write Greek letters with an underbar produces LaTeX errors.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33963 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 01:09:38 +00:00
Richard Heck
8cf5ff6fbf Simplify.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33961 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 22:51:11 +00:00
Richard Heck
36b1623c5b Integrals via HTML.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33960 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 22:51:02 +00:00
Richard Heck
ab2a59b0a1 I don't think we need to do this for MathML or HTML.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33959 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 22:17:06 +00:00
Richard Heck
caf170d612 HTML for dots.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33958 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 22:14:00 +00:00
Richard Heck
8d51923b8b Do the obvious thing with delimiters.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33957 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 22:07:05 +00:00
Richard Heck
ed71c32fcd Treat certain decoration cases differently.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33956 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 22:05:28 +00:00
Richard Heck
69fc590ee3 Decorations via HTML.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33955 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 21:56:52 +00:00
Richard Heck
5aff128354 HTML for comments and colors.
Color doesn't do anything at this point. The colors are given in LaTeX
format. Do we know how to convert these to HTML format?


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33954 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 17:24:22 +00:00
Richard Heck
f835e2a6f9 Cases for HTML.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33950 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 02:57:05 +00:00
Richard Heck
3e31491871 HTML for InsetMathBrace.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33949 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 02:40:32 +00:00
Richard Heck
27add8d945 HTML for math boxes.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33948 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 02:37:05 +00:00
Richard Heck
7be729f028 Bold symbols via HTML.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33947 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 02:05:49 +00:00
Richard Heck
e64be58736 InsetMathBig via HTML.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33946 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 02:04:07 +00:00
Richard Heck
0190b003b0 Fractions via HTML.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33945 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 02:03:45 +00:00
Richard Heck
f5bcb24da2 HTML for scripts.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33944 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 01:31:25 +00:00
Richard Heck
f60dad8aaf HTML for numbers.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33943 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 01:23:10 +00:00
Richard Heck
ad49c45475 Pure HTML for math symbols.
I may have to re-do some of the symbols file to make this work properly.
Some of the entities used may have been MathML only.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33942 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 00:24:54 +00:00
Richard Heck
b8550d11e8 Pure HTML output for math macros.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33941 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 00:18:24 +00:00
Richard Heck
9e34cf8186 Fix math char stuff.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33940 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-30 00:18:08 +00:00
Richard Heck
5ef3c828b2 Simple characters.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33937 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-29 23:03:37 +00:00
Richard Heck
30b18aec37 The beginnings of pure HTML output of math, for our internal XHTML
output routines. The idea is that in some cases people may not want to
use MathML, so we are going to try to give options.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33936 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-29 22:52:13 +00:00
Richard Heck
93c99335b0 Suppress XHTML output for math macros. (We used to get the default from
Inset.)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33795 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-18 22:19:34 +00:00
Richard Heck
8f5d4a3fcb Get rid of label_init_length. There is no way to set it from the GUI any
more. Worse, it was being used inconsistently. And we don't really need
it.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33786 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-17 12:50:58 +00:00
Enrico Forestieri
ea4d17acb3 Fix bug #6581: Empty base of a script inset should not be shown as an empty brace inset on screen
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33705 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-10 20:10:30 +00:00
Vincent van Ravesteijn
a866d2e1a9 Add missing continue. I guess I found this when running latex with a symbol file with some windows encoding or line-ends.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33698 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-10 16:58:20 +00:00
Vincent van Ravesteijn
5d60104a69 Whitespace.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33697 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-10 16:57:01 +00:00
Vincent van Ravesteijn
cd5d57e504 Do not use const char *.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33696 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-10 16:56:13 +00:00
Richard Heck
8a6b77bfe1 Introduce isBufferValid() method now, that returns true also for cloned
Buffers. Use it, as well.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33679 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-08 19:07:05 +00:00
Richard Heck
a2e06a3c15 Eliminate redundancy.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33678 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-08 19:06:28 +00:00
Richard Heck
821cffab63 s/isBufferValid/isBufferLoaded/
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33677 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-08 18:57:42 +00:00
Abdelrazak Younes
321f6031af Fix bug #6564. The cmd status retrieval is quite broken within tables (math or text).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33639 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-06 14:19:21 +00:00
Richard Heck
d65020b293 s/updateLabels/updateBuffer/g, per a suggestion of Abdel's.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33613 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-03 22:13:45 +00:00
Abdelrazak Younes
5d235f5251 Migrate GuiHSPace to InsetParamsDialog.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33525 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-21 09:28:33 +00:00
Abdelrazak Younes
b5049e769b * InsetTabular cleanup:
- proper message passing for all tabular features
- properly define which feature needs an argument

* replace LFUN_TABULAR_FEATURE with LFUN_INSET_MODIFY
- The math tables are also affected. In the future a common base class
between math and text table will solve this inconsistency.
- There is a hack in GuiApplication in order to not rename the toolbar
icons. This will have to be cleaned up with a general icon naming for
LFUN_INSET_MODIFY... to be discussed.

* Tabular Dialog:
- big cleanup, lots and lots of bug fixing here
- migrated to InsetParamsWidget


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33495 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-18 08:28:46 +00:00
Jürgen Spitzmüller
1178b30c54 generalize special handling of command inset parameters on LaTeX output (escaping, etc.).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33461 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-13 13:08:32 +00:00
Abdelrazak Younes
377cdd5f6c Transfer LyXfunc code to GuiApplication::dispatch() and getStatus(). Now
a lot of simplification is possible. Except some instability period...


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33389 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-09 16:11:13 +00:00
Jürgen Spitzmüller
a70e21a34e Patch by John McCabe-Dansted to fix bug #6502:
Wrong line count with parent math macros:

* TeXRow.{cpp,h}:
	- new helper function to insert multiple newline at once.

* mathed/MacroTable.{cpp,h}:
* mathed/MacroTemplate.{cpp,h}:
	- make write() an int, returning number of newlines

* Buffer.cpp (writeLaTeXSource):
	- update texrow's newline on parent macro output.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33367 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-08 17:39:55 +00:00
Tommaso Cucinotta
c0c1e1fd2b Most common cases with regexps seem to work, at least with ignore-format on.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33355 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-07 21:44:31 +00:00
Tommaso Cucinotta
33dca1df0f Now the coloured box around the regexp is visible also if InsetPreview is enabled.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33336 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-05 18:34:01 +00:00
Tommaso Cucinotta
9e057e7533 Improved appearence of regexp insets (at least I hope so), also suggested in #6498 (Regex looks like math).
- added a frame around regexp insets, with a customizable dedicated color code
- regexp insets font turned to texttt
- recovered back the preamble snippet allowing for latex compilation of regexp insets, something that happens if you have instant preview on.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33329 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-05 09:00:40 +00:00
Enrico Forestieri
d652a84f4b Automate the setting of the ascii only flag.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33328 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-04 23:03:48 +00:00
Enrico Forestieri
271d53fdd0 Fix bug #3325: Labels with special characters in equations do not work
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33325 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-04 19:08:17 +00:00
Enrico Forestieri
63cb2b52aa Fix bug #2872: reference in math to label with "underscore"...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33324 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-04 10:32:58 +00:00
Vincent van Ravesteijn
8f09cda025 Please Abdel.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33292 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-31 13:38:47 +00:00
Vincent van Ravesteijn
00bbabd00f Fix bug #6489: Assertion triggered when deleting contents of math ERT. (probably a stdlib assertion).
Do not access name_[0] if name_ has size 0.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33290 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-31 13:03:31 +00:00
Vincent van Ravesteijn
489b80aef4 Correct the mess introduced in r33250.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33251 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-28 20:03:09 +00:00
Vincent van Ravesteijn
61eecb8a44 Expand the string "regexp" to something user will better be able to understand.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33250 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-28 19:56:12 +00:00
Jürgen Spitzmüller
7bbd67eb26 * Implement updateLabels in mathed and add the MathRef insets to the references cache.
This fixes bug #1560.

The diverse setBuffer / updateLabels calls need auditing. See FIXMEs.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33249 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-28 17:37:22 +00:00
Jürgen Spitzmüller
fd40810a8c * InsetMathHull.h: constness, as suggested by Abdel.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33243 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-28 09:18:15 +00:00
Vincent van Ravesteijn
a4e03846cd Fix doxygen output for grouped items. Without the /name tag doxygen shows the group name as the name of the first item. Moreover, the comment styles are somewhat standardized.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33236 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-27 18:10:33 +00:00
Jürgen Spitzmüller
a484f95910 When pasting a math inset with a label, check for duplicates (as we do outside math)
(bug 6218)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33230 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-27 08:41:19 +00:00
Jean-Marc Lasgouttes
fe9a43f44b Add DispatchResult argument to BufferView::dispatch, and remove explicit updates in there.
Split LyXFunc::dispatch into a wrapper that does the actual screen updates and
a worker method that updates a DispatchResult object.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33226 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-25 15:14:41 +00:00
Richard Heck
1d6923b65b Use the attributes MTag now takes.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33149 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-21 21:06:44 +00:00