]> git.lyx.org Git - lyx.git/commitdiff
Text: Get rid of BufferParams arguments.
authorAbdelrazak Younes <younes@lyx.org>
Sun, 9 Aug 2009 15:52:33 +0000 (15:52 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Sun, 9 Aug 2009 15:52:33 +0000 (15:52 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30945 a592a061-630c-0410-9148-cb99ea01b6c8

src/Text.cpp
src/Text.h
src/insets/InsetText.cpp

index 1eb35ad1381be2f126b966e0291fa8950d855efa..3913feec99d13458348dc4b4283118d43f16deca 100644 (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
index 11f61949a56a6683c96935a1fb725064b6c4e5b0..4e56ffde92a08bbc93283c33a5398f16cdfba772 100644 (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,
index 5448f65329c5c118267865dadfaac931c3e93e17..ed39b2558db7999fd8327abe3e6a58457f085c73 100644 (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();
 }