diff --git a/src/Buffer.cpp b/src/Buffer.cpp index d636790cb4..9c5d3b7708 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -1834,8 +1834,10 @@ void Buffer::buildMacros() void Buffer::changeRefsIfUnique(docstring const & from, docstring const & to, - Inset::Code code) + int inset_code) { + Inset::Code code = static_cast(inset_code); + //FIXME: This does not work for child documents yet. BOOST_ASSERT(code == Inset::CITE_CODE || code == Inset::REF_CODE); // Check if the label 'from' appears more than once diff --git a/src/Buffer.h b/src/Buffer.h index 9c92afc04d..4562a02a1d 100644 --- a/src/Buffer.h +++ b/src/Buffer.h @@ -12,8 +12,6 @@ #ifndef BUFFER_H #define BUFFER_H -#include "DocIterator.h" - #include "support/FileName.h" #include "support/limited_stack.h" #include "support/types.h" @@ -29,11 +27,11 @@ namespace lyx { class BufferParams; +class EmbeddedFiles; class ErrorItem; class ErrorList; class FuncRequest; class Inset; -class InsetText; class Font; class Lexer; class LyXRC; @@ -366,9 +364,14 @@ public: /// void insertMacro(docstring const & name, MacroData const & data); - /// + /// Replace the inset contents for insets which Inset::Code is equal + /// to the passed \p inset_code. + /// FIXME: we pass Inset::Code as an int in order to avoid the inclusion + /// of "Inset.h". It would be better to put Inset::Code in its own + /// header. void changeRefsIfUnique(docstring const & from, docstring const & to, - Inset::Code code); + int inset_code); + /// get source code (latex/docbook) for some paragraphs, or all paragraphs /// including preamble void getSourceCode(odocstream & os, pit_type par_begin, pit_type par_end, bool full_source);