* src/changes.h:
* src/changes.C: remove constructor, destructor,
copy constructor, reset(), and field empty_type_
* src/paragraph_pimpl.C: comment out unwanted code
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15411
a592a061-630c-0410-9148-
cb99ea01b6c8
}
-Changes::Changes(Change::Type const type)
- : empty_type_(type)
-{
-}
-
-
-Changes::~Changes()
-{
-}
-
-
-Changes::Changes(Changes const & c)
-{
- table_ = c.table_;
-}
-
-
void Changes::record(Change const & change, pos_type const pos)
{
if (lyxerr.debugging(Debug::CHANGES)) {
Change const Changes::lookup(pos_type const pos) const
{
- if (!table_.size()) {
- if (lyxerr.debugging(Debug::CHANGES))
- lyxerr[Debug::CHANGES] << "Empty, type is " << empty_type_ << endl;
- return Change(empty_type_);
- }
-
ChangeTable::const_iterator it = table_.begin();
ChangeTable::const_iterator const end = table_.end();
}
-bool Changes::isChange(pos_type const start, pos_type const end) const
+bool Changes::isChanged(pos_type const start, pos_type const end) const
{
- if (!table_.size()) {
- if (lyxerr.debugging(Debug::CHANGES))
- lyxerr[Debug::CHANGES] << "Empty, type is " << empty_type_ << endl;
- return empty_type_ != Change::UNCHANGED;
- }
-
ChangeTable::const_iterator it = table_.begin();
ChangeTable::const_iterator const itend = table_.end();
class Changes {
public:
-
- Changes(Change::Type type);
-
- ~Changes();
-
- Changes(Changes const &);
-
- /// reset "default" change type (for empty pars)
- void reset(Change::Type type) {
- empty_type_ = type;
- }
-
/// set the pos to the given change
void set(Change const & change, lyx::pos_type pos);
-
/// set the range to the given change
void set(Change const & change, lyx::pos_type start, lyx::pos_type end);
Change const lookup(lyx::pos_type pos) const;
/// return true if there is a change in the given range
- bool isChange(lyx::pos_type start, lyx::pos_type end) const;
+ bool isChanged(lyx::pos_type start, lyx::pos_type end) const;
/// remove the given entry. This implies that a character was
/// deleted at pos, and will adjust all range bounds past it
/// our table of changes, every row a range and change descriptor
ChangeTable table_;
- /// change type for an empty paragraph
- Change::Type empty_type_;
-
/// handle a delete, either logical or physical (see erase)
void del(Change const & change, ChangeTable::size_type pos);
fontlist = p.fontlist;
id_ = paragraph_id++;
- if (p.tracking())
- changes_.reset(new Changes(*p.changes_.get()));
+ // FIXME: change tracking (MG)
+ //if (p.tracking())
+ // changes_.reset(new Changes(*p.changes_.get()));
}
{
owner_->text_ = par.text_;
if (par.pimpl_->tracking()) {
- changes_.reset(new Changes(*(par.pimpl_->changes_.get())));
+ // FIXME: change tracking (MG)
+ // changes_.reset(new Changes(*(par.pimpl_->changes_.get())));
}
}
if (!tracking())
return false;
- return changes_->isChange(start, end);
+ return changes_->isChanged(start, end);
}
return;
if (!size()) {
- changes_.reset(new Changes(Change::UNCHANGED));
+ // FIXME: change tracking (MG)
+ // changes_.reset(new Changes(Change::UNCHANGED));
return;
}
}
lyxerr[Debug::CHANGES] << "endacceptchange" << endl;
- changes_->reset(Change::UNCHANGED);
+ // FIXME: change tracking (MG)
+ // changes_->reset(Change::UNCHANGED);
}
return;
if (!size()) {
- changes_.reset(new Changes(Change::UNCHANGED));
+ // FIXME: change tracking (MG)
+ // changes_.reset(new Changes(Change::UNCHANGED));
return;
}
break;
}
}
- changes_->reset(Change::UNCHANGED);
+ // FIXME: change tracking (MG)
+ // changes_->reset(Change::UNCHANGED);
}