+2003-09-18 Angus Leeming <leeming@lyx.org>
+
+ * paragraph.[Ch] (insetAllowed): use the InsetOld::Code wrapper class
+ InsetOld_code to remove #include "inset.h".
+
+ * iterators.C: add #include "inset.h"
2003-09-16 Martin Vermeer <martin.vermeer@hut.fi>
+2003-09-18 Angus Leeming <leeming@lyx.org>
+
+ * inset.h: add the InsetOld::Code wrapper class InsetOld_code.
+
2003-09-16 Angus Leeming <leeming@lyx.org>
* insetinclude.C (localDispatch): ensure that params_.masterFilename_ is
};
+/** \c InsetOld_code is a wrapper for InsetOld::Code.
+ * It can be forward-declared and passed as a function argument without
+ * having to expose inset.h.
+ */
+class InsetOld_code {
+ InsetOld::Code val_;
+public:
+ InsetOld_code(InsetOld::Code val) : val_(val) {}
+ operator InsetOld::Code() const{ return val_; }
+};
+
+
/**
* returns true if pointer argument is valid
* and points to an editable inset
#include "iterators.h"
#include "paragraph.h"
+#include "insets/inset.h"
+
#include <boost/next_prior.hpp>
#include <boost/optional.hpp>
/** \c LyXFont_size is a wrapper for LyXFont::FONT_SIZE.
- * It can be forward-declared andpassed as a function argument without
+ * It can be forward-declared and passed as a function argument without
* having to expose lyxfont.h.
*/
class LyXFont_size {
}
-bool Paragraph::insetAllowed(InsetOld::Code code)
+bool Paragraph::insetAllowed(InsetOld_code code)
{
//lyxerr << "Paragraph::InsertInsetAllowed" << endl;
if (pimpl_->inset_owner)
#include "lyxlayout_ptr_fwd.h"
#include "RowList_fwd.h"
-#include "insets/inset.h" // Just for InsetOld::Code
-
#include "support/types.h"
#include "support/std_string.h"
class BufferView;
class Counters;
class InsetBibitem;
+class InsetOld_code;
class Language;
class LaTeXFeatures;
class LatexRunParams;
+class LyXFont;
class LyXFont_size;
class ParagraphParameters;
class TexRow;
///
void insertInset(lyx::pos_type pos, InsetOld * inset, LyXFont const &, Change change = Change(Change::INSERTED));
///
- bool insetAllowed(InsetOld::Code code);
+ bool insetAllowed(InsetOld_code code);
///
InsetOld * getInset(lyx::pos_type pos);
///