#include "FuncRequest.h"
#include "gettext.h"
#include "InsetIterator.h"
+#include "InsetList.h"
#include "Language.h"
#include "LaTeX.h"
#include "LaTeXFeatures.h"
namespace {
-int const LYX_FORMAT = 294; //pavel pdfoptions
+int const LYX_FORMAT = 295; //Uwe: htmlurl, href
} // namespace anon
{
public:
Impl(Buffer & parent, FileName const & file, bool readonly);
-
- limited_stack<Undo> undostack;
- limited_stack<Undo> redostack;
+
BufferParams params;
LyXVC lyxvc;
string temppath;
///
frontend::WorkAreaManager * wa_;
+
+ ///
+ Undo undo_;
};
: lyx_clean(true), bak_clean(true), unnamed(false), read_only(readonly_),
filename(file), file_fully_loaded(false), inset(params),
toc_backend(&parent), embedded_files(&parent), timestamp_(0),
- checksum_(0), wa_(0)
+ checksum_(0), wa_(0), undo_(parent)
{
inset.setAutoBreakRows(true);
lyxvc.buffer(&parent);
}
-limited_stack<Undo> & Buffer::undostack()
-{
- return pimpl_->undostack;
-}
-
-
-limited_stack<Undo> const & Buffer::undostack() const
-{
- return pimpl_->undostack;
-}
-
-
-limited_stack<Undo> & Buffer::redostack()
-{
- return pimpl_->redostack;
-}
-
-
-limited_stack<Undo> const & Buffer::redostack() const
-{
- return pimpl_->redostack;
-}
-
-
BufferParams & Buffer::params()
{
return pimpl_->params;
return pimpl_->embedded_files;
}
+Undo & Buffer::undo()
+{
+ return pimpl_->undo_;
+}
+
+
string const Buffer::getLatexName(bool const no_path) const
{
}
lex.next();
- string const token(lex.getString());
+ string const token = lex.getString();
if (!lex) {
Alert::error(_("Document could not be read"),
bibfilesCache_.clear();
for (InsetIterator it = inset_iterator_begin(inset()); it; ++it) {
- if (it->lyxCode() == Inset::BIBTEX_CODE) {
+ if (it->lyxCode() == BIBTEX_CODE) {
InsetBibtex const & inset =
static_cast<InsetBibtex const &>(*it);
vector<FileName> const bibfiles = inset.getFiles(*this);
bibfilesCache_.insert(bibfilesCache_.end(),
bibfiles.begin(),
bibfiles.end());
- } else if (it->lyxCode() == Inset::INCLUDE_CODE) {
+ } else if (it->lyxCode() == INCLUDE_CODE) {
InsetInclude & inset =
static_cast<InsetInclude &>(*it);
inset.updateBibfilesCache(*this);
for (size_t i = 0, n = pars.size(); i != n; ++i) {
//lyxerr << "searching main par " << i
// << " for macro definitions" << std::endl;
- InsetList const & insets = pars[i].insetlist;
+ InsetList const & insets = pars[i].insetList();
InsetList::const_iterator it = insets.begin();
InsetList::const_iterator end = insets.end();
for ( ; it != end; ++it) {
//lyxerr << "found inset code " << it->inset->lyxCode() << std::endl;
- if (it->inset->lyxCode() == Inset::MATHMACRO_CODE) {
+ if (it->inset->lyxCode() == MATHMACRO_CODE) {
MathMacroTemplate const & mac
= static_cast<MathMacroTemplate const &>(*it->inset);
insertMacro(mac.name(), mac.asMacroData());
void Buffer::changeRefsIfUnique(docstring const & from, docstring const & to,
- int inset_code)
+ InsetCode 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);
+ BOOST_ASSERT(code == CITE_CODE || code == REF_CODE);
// Check if the label 'from' appears more than once
vector<docstring> labels;
- if (code == Inset::CITE_CODE) {
+ if (code == CITE_CODE) {
BiblioInfo keys;
keys.fillWithBibKeys(this);
BiblioInfo::const_iterator bit = keys.begin();