From a9c2a907c0b3aa6dd7cb4a2f510dbfcc5c765ffe Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Thu, 11 Oct 2007 12:48:24 +0000 Subject: [PATCH] Remove "DocIterator.h" header dependencies in Buffer.h. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20901 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Buffer.cpp | 4 +++- src/Buffer.h | 13 ++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) 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); -- 2.39.2