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
This commit is contained in:
Abdelrazak Younes 2007-10-11 12:48:24 +00:00
parent 59aae2aa83
commit a9c2a907c0
2 changed files with 11 additions and 6 deletions

View File

@ -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>(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

View File

@ -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);