]> git.lyx.org Git - features.git/commitdiff
Remove "DocIterator.h" header dependencies in Buffer.h.
authorAbdelrazak Younes <younes@lyx.org>
Thu, 11 Oct 2007 12:48:24 +0000 (12:48 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Thu, 11 Oct 2007 12:48:24 +0000 (12:48 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20901 a592a061-630c-0410-9148-cb99ea01b6c8

src/Buffer.cpp
src/Buffer.h

index d636790cb45b0504ad86846a35d2e2299e8ab0af..9c5d3b77082e3501e9e3893ffb8057f02b92af6a 100644 (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
index 9c92afc04da37adb61a5e4a0ab1c5199f3b0d99c..4562a02a1de732254c0aa4d80f31d30a8d260766 100644 (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"
 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);