From df0072228ffc7bc5e23b5b4a934b6ea1ef1422b7 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Sun, 9 Aug 2009 15:52:33 +0000 Subject: [PATCH] Text: Get rid of BufferParams arguments. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30945 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Text.cpp | 6 ++++-- src/Text.h | 5 ++--- src/insets/InsetText.cpp | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Text.cpp b/src/Text.cpp index 1eb35ad138..3913feec99 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -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(pars_.size()); // first, reject changes within each individual paragraph diff --git a/src/Text.h b/src/Text.h index 11f61949a5..4e56ffde92 100644 --- a/src/Text.h +++ b/src/Text.h @@ -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, diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index 5448f65329..ed39b2558d 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -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(); } -- 2.39.2