Exactly the same idea as in the lyxfont patch. Private member variable
background_color_ is now stored as an int, not as an LColor::color. Assessor
functions ensure that the change is invisible to the outside world.
This change enables us to move #include "LColor.h" out of inset.h, resulting
in a decrease in the dependencies on LColor.h from 172 to 105.
I'll commit this and move on to do the same for insettext.h. Then I'm done ;-)
--
Angus
Index: src/insets/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/ChangeLog,v
retrieving revision 1.825
diff -u -p -r1.825 ChangeLog
--- src/insets/ChangeLog 16 Sep 2003 09:01:12 -0000 1.825
+++ src/insets/ChangeLog 16 Sep 2003 09:30:36 -0000
@@ -1,5 +1,18 @@
2003-09-16 Angus Leeming <[EMAIL PROTECTED]>
+ * inset.h: store background_color_ as an int, not as an LColor::color to
+ get LColor.h out of the header file.
+
+ * inset.C:
+ * insetlatexaccent.C:
+ * insetnewline.C:
+ * insetspace.C:
+ * insetspecialchar.C:
+ * renderers.C:
+ add #include "LColor.h".
+
+2003-09-16 Angus Leeming <[EMAIL PROTECTED]>
+
* renderers.C: LyXFont::setColor no longer return a LyXFont &, so cannot string
calls together.
Index: src/insets/inset.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/inset.C,v
retrieving revision 1.111
diff -u -p -r1.111 inset.C
--- src/insets/inset.C 15 Sep 2003 15:20:20 -0000 1.111
+++ src/insets/inset.C 16 Sep 2003 09:30:37 -0000
@@ -18,6 +18,7 @@
#include "BufferView.h"
#include "gettext.h"
+#include "LColor.h"
// Initialization of the counter for the inset id's,
@@ -98,7 +99,7 @@ EnumLColor InsetOld::backgroundColor() c
else
return LColor::background;
} else
- return background_color_;
+ return LColor::color(background_color_);
}
Index: src/insets/inset.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/inset.h,v
retrieving revision 1.117
diff -u -p -r1.117 inset.h
--- src/insets/inset.h 15 Sep 2003 15:20:20 -0000 1.117
+++ src/insets/inset.h 16 Sep 2003 09:30:37 -0000
@@ -17,7 +17,6 @@
#include "insetbase.h"
#include "dimension.h"
-#include "LColor.h"
#include "ParagraphList_fwd.h"
class Buffer;
@@ -326,8 +325,10 @@ private:
UpdatableInset * owner_;
///
string name_;
- ///
- LColor::color background_color_;
+ /** We store the LColor::color value as an int to get LColor.h out
+ * of the header file.
+ */
+ int background_color_;
};
Index: src/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v
retrieving revision 1.1577
diff -u -p -r1.1577 ChangeLog
--- src/ChangeLog 16 Sep 2003 09:01:10 -0000 1.1577
+++ src/ChangeLog 16 Sep 2003 09:30:14 -0000
@@ -1,5 +1,9 @@
2003-09-16 Angus Leeming <[EMAIL PROTECTED]>
+ * bufferparams.C, paragraph_pimpl.C: add #include "LColor.h".
+
+2003-09-16 Angus Leeming <[EMAIL PROTECTED]>
+
* lyxfont.[Ch]: (setFamily, setSeries, setShape, setSize, setEmph, setUnderbar,
setNoun, setNumber, setColor, setLanguage): no longer return LyXFont &.
Store the FontBits::color variable as an int rather than as an LColor::color
Index: src/bufferparams.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/bufferparams.C,v
retrieving revision 1.72
diff -u -p -r1.72 bufferparams.C
--- src/bufferparams.C 15 Sep 2003 20:23:57 -0000 1.72
+++ src/bufferparams.C 16 Sep 2003 09:30:15 -0000
@@ -26,6 +26,7 @@
#include "language.h"
#include "LaTeXFeatures.h"
#include "latexrunparams.h"
+#include "LColor.h"
#include "lyxlex.h"
#include "lyxrc.h"
#include "lyxtextclasslist.h"
Index: src/paragraph_pimpl.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/paragraph_pimpl.C,v
retrieving revision 1.82
diff -u -p -r1.82 paragraph_pimpl.C
--- src/paragraph_pimpl.C 9 Sep 2003 17:25:21 -0000 1.82
+++ src/paragraph_pimpl.C 16 Sep 2003 09:30:15 -0000
@@ -21,6 +21,7 @@
#include "language.h"
#include "LaTeXFeatures.h"
#include "latexrunparams.h"
+#include "LColor.h"
#include "lyxlength.h"
#include "lyxrc.h"
#include "texrow.h"
Index: src/frontends/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/ChangeLog,v
retrieving revision 1.225
diff -u -p -r1.225 ChangeLog
--- src/frontends/ChangeLog 15 Sep 2003 15:20:16 -0000 1.225
+++ src/frontends/ChangeLog 16 Sep 2003 09:30:16 -0000
@@ -1,3 +1,7 @@
+2003-09-16 Angus Leeming <[EMAIL PROTECTED]>
+
+ * screen.C: add #include "LColor.h".
+
2003-09-15 Angus Leeming <[EMAIL PROTECTED]>
* Painter.C: add #include "LColor.h".
Index: src/frontends/screen.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/screen.C,v
retrieving revision 1.74
diff -u -p -r1.74 screen.C
--- src/frontends/screen.C 9 Sep 2003 22:13:39 -0000 1.74
+++ src/frontends/screen.C 16 Sep 2003 09:30:17 -0000
@@ -23,6 +23,7 @@
#include "bufferparams.h"
#include "debug.h"
#include "language.h"
+#include "LColor.h"
#include "lyxfont.h"
#include "lyxrc.h"
#include "lyxrow.h"
Index: src/frontends/controllers/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/controllers/ChangeLog,v
retrieving revision 1.375
diff -u -p -r1.375 ChangeLog
--- src/frontends/controllers/ChangeLog 16 Sep 2003 09:01:11 -0000 1.375
+++ src/frontends/controllers/ChangeLog 16 Sep 2003 09:30:20 -0000
@@ -1,5 +1,9 @@
2003-09-16 Angus Leeming <[EMAIL PROTECTED]>
+ * ControlCharacter.C: add #include "LColor.h".
+
+2003-09-16 Angus Leeming <[EMAIL PROTECTED]>
+
* character.C: add #include "LColor.h".
2003-09-15 Angus Leeming <[EMAIL PROTECTED]>
Index: src/frontends/controllers/ControlCharacter.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/controllers/ControlCharacter.C,v
retrieving revision 1.45
diff -u -p -r1.45 ControlCharacter.C
--- src/frontends/controllers/ControlCharacter.C 15 Sep 2003 15:20:17 -0000 1.45
+++ src/frontends/controllers/ControlCharacter.C 16 Sep 2003 09:30:20 -0000
@@ -18,6 +18,7 @@
#include "bufferview_funcs.h"
#include "funcrequest.h"
#include "language.h"
+#include "LColor.h"
using bv_funcs::font2string;
Index: src/frontends/xforms/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/ChangeLog,v
retrieving revision 1.820
diff -u -p -r1.820 ChangeLog
--- src/frontends/xforms/ChangeLog 16 Sep 2003 09:01:11 -0000 1.820
+++ src/frontends/xforms/ChangeLog 16 Sep 2003 09:30:27 -0000
@@ -1,5 +1,9 @@
2003-09-16 Angus Leeming <[EMAIL PROTECTED]>
+ * FormDocument.C: add #include "LColor.h".
+
+2003-09-16 Angus Leeming <[EMAIL PROTECTED]>
+
* FormCharacter.C, FormPreferences.C, lyx_gui.C, xfont_loader.C:
add #include "LColor.h".
Index: src/frontends/xforms/FormDocument.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/FormDocument.C,v
retrieving revision 1.159
diff -u -p -r1.159 FormDocument.C
--- src/frontends/xforms/FormDocument.C 9 Sep 2003 22:13:40 -0000 1.159
+++ src/frontends/xforms/FormDocument.C 16 Sep 2003 09:30:29 -0000
@@ -34,6 +34,7 @@
#include "Bullet.h"
#include "bufferparams.h"
#include "language.h"
+#include "LColor.h"
#include "lyxrc.h"
#include "lyxtextclasslist.h"
#include "tex-strings.h"
Index: src/graphics/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/graphics/ChangeLog,v
retrieving revision 1.177
diff -u -p -r1.177 ChangeLog
--- src/graphics/ChangeLog 15 Sep 2003 10:59:55 -0000 1.177
+++ src/graphics/ChangeLog 16 Sep 2003 09:30:30 -0000
@@ -1,3 +1,7 @@
+2003-09-16 Angus Leeming <[EMAIL PROTECTED]>
+
+ * PreviewLoader.C: add #include "LColor.h".
+
2003-09-15 Lars Gullik Bjønnes <[EMAIL PROTECTED]>
* GraphicsConverter.C
Index: src/graphics/PreviewLoader.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/graphics/PreviewLoader.C,v
retrieving revision 1.67
diff -u -p -r1.67 PreviewLoader.C
--- src/graphics/PreviewLoader.C 15 Sep 2003 10:59:55 -0000 1.67
+++ src/graphics/PreviewLoader.C 16 Sep 2003 09:30:31 -0000
@@ -18,6 +18,7 @@
#include "debug.h"
#include "format.h"
#include "latexrunparams.h"
+#include "LColor.h"
#include "lyxrc.h"
#include "frontends/lyx_gui.h" // hexname
Index: src/insets/insetlatexaccent.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetlatexaccent.C,v
retrieving revision 1.82
diff -u -p -r1.82 insetlatexaccent.C
--- src/insets/insetlatexaccent.C 15 Sep 2003 10:07:59 -0000 1.82
+++ src/insets/insetlatexaccent.C 16 Sep 2003 09:30:38 -0000
@@ -14,6 +14,7 @@
#include "debug.h"
#include "language.h"
+#include "LColor.h"
#include "lyxlex.h"
#include "lyxrc.h"
#include "metricsinfo.h"
Index: src/insets/insetnewline.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetnewline.C,v
retrieving revision 1.16
diff -u -p -r1.16 insetnewline.C
--- src/insets/insetnewline.C 6 Sep 2003 17:23:05 -0000 1.16
+++ src/insets/insetnewline.C 16 Sep 2003 09:30:38 -0000
@@ -14,6 +14,7 @@
#include "BufferView.h"
#include "debug.h"
+#include "LColor.h"
#include "lyxtext.h"
#include "metricsinfo.h"
#include "paragraph.h"
Index: src/insets/insetspace.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetspace.C,v
retrieving revision 1.18
diff -u -p -r1.18 insetspace.C
--- src/insets/insetspace.C 7 Sep 2003 01:45:39 -0000 1.18
+++ src/insets/insetspace.C 16 Sep 2003 09:30:38 -0000
@@ -17,6 +17,7 @@
#include "debug.h"
#include "latexrunparams.h"
+#include "LColor.h"
#include "lyxlex.h"
#include "metricsinfo.h"
Index: src/insets/insetspecialchar.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetspecialchar.C,v
retrieving revision 1.77
diff -u -p -r1.77 insetspecialchar.C
--- src/insets/insetspecialchar.C 8 Sep 2003 00:33:37 -0000 1.77
+++ src/insets/insetspecialchar.C 16 Sep 2003 09:30:38 -0000
@@ -16,6 +16,7 @@
#include "debug.h"
#include "LaTeXFeatures.h"
+#include "LColor.h"
#include "lyxlex.h"
#include "metricsinfo.h"
Index: src/insets/renderers.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/renderers.C,v
retrieving revision 1.13
diff -u -p -r1.13 renderers.C
--- src/insets/renderers.C 16 Sep 2003 09:01:12 -0000 1.13
+++ src/insets/renderers.C 16 Sep 2003 09:30:38 -0000
@@ -16,6 +16,7 @@
#include "BufferView.h"
#include "gettext.h"
+#include "LColor.h"
#include "metricsinfo.h"
#include "frontends/font_metrics.h"
Index: src/mathed/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/ChangeLog,v
retrieving revision 1.371
diff -u -p -r1.371 ChangeLog
--- src/mathed/ChangeLog 16 Sep 2003 09:01:13 -0000 1.371
+++ src/mathed/ChangeLog 16 Sep 2003 09:30:41 -0000
@@ -1,5 +1,13 @@
2003-09-16 Angus Leeming <[EMAIL PROTECTED]>
+ * formula.C:
+ * formulamacro.C:
+ add #include "LColor.h".
+
+ * math_cursor.C: add #include <boost/assert.hpp>.
+
+2003-09-16 Angus Leeming <[EMAIL PROTECTED]>
+
* math_braceinset.C, math_data.C, math_fboxinset.C, math_frameboxinset.C,
math_gridinset.C, math_hullinset.C, math_macrotemplate.C, math_nestinset.C,
math_rootinset.C, math_spaceinset.C, math_sqrtinset.C, math_support.C:
Index: src/mathed/formula.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/formula.C,v
retrieving revision 1.285
diff -u -p -r1.285 formula.C
--- src/mathed/formula.C 15 Sep 2003 10:59:58 -0000 1.285
+++ src/mathed/formula.C 16 Sep 2003 09:30:41 -0000
@@ -20,13 +20,14 @@
#include "debug.h"
#include "latexrunparams.h"
-#include "support/std_sstream.h"
-
+#include "LColor.h"
#include "frontends/Painter.h"
#include "graphics/PreviewedInset.h"
#include "graphics/PreviewImage.h"
+
+#include "support/std_sstream.h"
using std::ostream;
Index: src/mathed/formulamacro.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/formulamacro.C,v
retrieving revision 1.141
diff -u -p -r1.141 formulamacro.C
--- src/mathed/formulamacro.C 15 Sep 2003 10:59:58 -0000 1.141
+++ src/mathed/formulamacro.C 16 Sep 2003 09:30:41 -0000
@@ -16,12 +16,16 @@
#include "math_macrotable.h"
#include "math_macrotemplate.h"
#include "math_mathmlstream.h"
+
#include "gettext.h"
#include "latexrunparams.h"
+#include "LColor.h"
+#include "lyxlex.h"
+
#include "frontends/Painter.h"
#include "frontends/font_metrics.h"
+
#include "support/lstrings.h"
-#include "lyxlex.h"
#include "support/std_sstream.h"
using lyx::support::bformat;
Index: src/mathed/math_cursor.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_cursor.C,v
retrieving revision 1.357
diff -u -p -r1.357 math_cursor.C
--- src/mathed/math_cursor.C 15 Sep 2003 10:59:58 -0000 1.357
+++ src/mathed/math_cursor.C 16 Sep 2003 09:30:42 -0000
@@ -31,6 +31,7 @@
#include "math_support.h"
#include "math_unknowninset.h"
+#include <boost/assert.hpp>
//#define FILEDEBUG 1