Text: Get rid of BufferParams arguments.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30945 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2009-08-09 15:52:33 +00:00
parent de38a9ed5f
commit df0072228f
3 changed files with 8 additions and 7 deletions

View File

@ -894,15 +894,17 @@ void Text::acceptOrRejectChanges(Cursor & cur, ChangeOp op)
}
void Text::acceptChanges(BufferParams const & bparams)
void Text::acceptChanges()
{
BufferParams const & bparams = owner_->buffer().params();
lyx::acceptChanges(pars_, bparams);
deleteEmptyParagraphMechanism(0, pars_.size() - 1, bparams.trackChanges);
}
void Text::rejectChanges(BufferParams const & bparams)
void Text::rejectChanges()
{
BufferParams const & bparams = owner_->buffer().params();
pit_type pars_size = static_cast<pit_type>(pars_.size());
// first, reject changes within each individual paragraph

View File

@ -19,7 +19,6 @@
namespace lyx {
class BufferParams;
class BufferView;
class CompletionList;
class CursorSlice;
@ -164,9 +163,9 @@ public:
/// accept or reject the selected change
void acceptOrRejectChanges(Cursor & cur, ChangeOp op);
/// accept the changes within the complete Text
void acceptChanges(BufferParams const & bparams);
void acceptChanges();
/// reject the changes within the complete Text
void rejectChanges(BufferParams const & bparams);
void rejectChanges();
/// returns true if par was empty and was removed
bool setCursor(Cursor & cur, pit_type par, pos_type pos,

View File

@ -357,13 +357,13 @@ void InsetText::setChange(Change const & change)
void InsetText::acceptChanges()
{
text_.acceptChanges(buffer().params());
text_.acceptChanges();
}
void InsetText::rejectChanges()
{
text_.rejectChanges(buffer().params());
text_.rejectChanges();
}