+2003-09-16 Angus Leeming <leeming@lyx.org>
+
+ * lyxfont.h (LyXFont_size): a wrapper class for LyXFont::FONT_SIZE.
+
+ * paragraph.[Ch] (highestFontInRange): use LyXFont_size as function
+ arg/return type.
+
+ * paragraph.h: remove #include "lyxfont.h". Forward declare LyXFont_size.
+
2003-09-16 Angus Leeming <leeming@lyx.org>
* paragraph.C (IsInsetChar): new function in namespace anon, moved out of
+2003-09-16 Angus Leeming <leeming@lyx.org>
+
+ * insetbibitem.C: add #include "lyxfont.h".
+
2003-09-16 Lars Gullik Bjønnes <larsbj@gullik.net>
* insetgraphics.C:
#include "buffer.h"
#include "BufferView.h"
#include "funcrequest.h"
+#include "lyxfont.h"
#include "lyxlex.h"
#include "paragraph.h"
};
+/** \c LyXFont_size is a wrapper for LyXFont::FONT_SIZE.
+ * It can be forward-declared andpassed as a function argument without
+ * having to expose lyxfont.h.
+ */
+class LyXFont_size {
+ LyXFont::FONT_SIZE val_;
+public:
+ LyXFont_size(LyXFont::FONT_SIZE val) : val_(val) {}
+ operator LyXFont::FONT_SIZE() const{ return val_; }
+};
+
+
+
inline
LyXFont::FONT_SHAPE LyXFont::shape() const
{
/// Returns the height of the highest font in range
-LyXFont::FONT_SIZE
+LyXFont_size
Paragraph::highestFontInRange(pos_type startpos, pos_type endpos,
- LyXFont::FONT_SIZE const def_size) const
+ LyXFont_size def_size) const
{
if (pimpl_->fontlist.empty())
return def_size;
#include "changes.h"
#include "InsetList.h"
#include "lyxlayout_ptr_fwd.h"
-#include "lyxfont.h" // Just for LyXFont::FONT_SIZE
#include "RowList_fwd.h"
#include "insets/inset.h" // Just for InsetOld::Code
class Language;
class LaTeXFeatures;
class LatexRunParams;
+class LyXFont_size;
class ParagraphParameters;
class TexRow;
class UpdatableInset;
/// pos <= size() (there is a dummy font change at the end of each par)
void setFont(lyx::pos_type pos, LyXFont const & font);
/// Returns the height of the highest font in range
- LyXFont::FONT_SIZE
- highestFontInRange(lyx::pos_type startpos,
- lyx::pos_type endpos,
- LyXFont::FONT_SIZE const def_size) const;
+ LyXFont_size highestFontInRange(lyx::pos_type startpos,
+ lyx::pos_type endpos,
+ LyXFont_size def_size) const;
///
void insertChar(lyx::pos_type pos, value_type c);
///