Use InsetCode

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20938 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-10-13 09:11:10 +00:00
parent 3fced79210
commit f357fb955f
2 changed files with 4 additions and 7 deletions

View File

@ -1834,10 +1834,8 @@ void Buffer::buildMacros()
void Buffer::changeRefsIfUnique(docstring const & from, docstring const & to, 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. //FIXME: This does not work for child documents yet.
BOOST_ASSERT(code == CITE_CODE || code == REF_CODE); BOOST_ASSERT(code == CITE_CODE || code == REF_CODE);
// Check if the label 'from' appears more than once // Check if the label 'from' appears more than once

View File

@ -12,6 +12,8 @@
#ifndef BUFFER_H #ifndef BUFFER_H
#define BUFFER_H #define BUFFER_H
#include "insets/InsetCode.h"
#include "support/FileName.h" #include "support/FileName.h"
#include "support/limited_stack.h" #include "support/limited_stack.h"
#include "support/types.h" #include "support/types.h"
@ -366,11 +368,8 @@ public:
/// Replace the inset contents for insets which InsetCode is equal /// Replace the inset contents for insets which InsetCode is equal
/// to the passed \p inset_code. /// 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, void changeRefsIfUnique(docstring const & from, docstring const & to,
int inset_code); InsetCode code);
/// get source code (latex/docbook) for some paragraphs, or all paragraphs /// get source code (latex/docbook) for some paragraphs, or all paragraphs
/// including preamble /// including preamble