]> git.lyx.org Git - features.git/commitdiff
Use InsetCode
authorAbdelrazak Younes <younes@lyx.org>
Sat, 13 Oct 2007 09:11:10 +0000 (09:11 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Sat, 13 Oct 2007 09:11:10 +0000 (09:11 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20938 a592a061-630c-0410-9148-cb99ea01b6c8

src/Buffer.cpp
src/Buffer.h

index e192c1466514241988da7565f8b2f22b7c5d05bc..d48a33955dc7bb406cdd31d8a2c345ead9ac1097 100644 (file)
@@ -1834,10 +1834,8 @@ void Buffer::buildMacros()
 
 
 void Buffer::changeRefsIfUnique(docstring const & from, docstring const & to,
-       int inset_code)
+       InsetCode code)
 {
-       InsetCode code = static_cast<InsetCode>(inset_code);
-
        //FIXME: This does not work for child documents yet.
        BOOST_ASSERT(code == CITE_CODE || code == REF_CODE);
        // Check if the label 'from' appears more than once
index 5634a7ecc6ef4fb8146988f3d12ee0515236dc24..37a2670265f32d6bcb83ee079d2d5ee2332c4b6d 100644 (file)
@@ -12,6 +12,8 @@
 #ifndef BUFFER_H
 #define BUFFER_H
 
+#include "insets/InsetCode.h"
+
 #include "support/FileName.h"
 #include "support/limited_stack.h"
 #include "support/types.h"
@@ -366,11 +368,8 @@ public:
 
        /// Replace the inset contents for insets which InsetCode is equal
        /// to the passed \p inset_code.
-       /// FIXME: we pass InsetCode as an int in order to avoid the inclusion
-       /// of "Inset.h". It would be better to put InsetCode in its own
-       /// header.
        void changeRefsIfUnique(docstring const & from, docstring const & to,
-               int inset_code);
+               InsetCode code);
 
 /// get source code (latex/docbook) for some paragraphs, or all paragraphs
 /// including preamble