commit 02028c0b12ba94093e4e77494e7158a58f1631e5 Author: Jean-Marc Lasgouttes <lasgout...@lyx.org> Date: Sun Jul 23 18:13:33 2017 +0200
Move some Cursor methods to CursorData Basically, everything that does not depend on a BufferView should move there. Some methods that do not seem to need a BufferView, like selHandle or IdxFirst or push actually depend on it and could not be moved. This allows to simplify a few uses of recordUndo helpers. - Move some methods to DocIterator: nextMath, prevMath, getPossibleLabel, getEncoding; - Move some methods to CursorData: setCursor, setCursorSelectionTo, (setCursorTo|normal|reset)Anchor, (set|clear)Selection, sel(|ection)(Begin|End), selectionAsString, info, currentState, (mark|clear|check)NewWordPosition, fixIfBroken, sanitize, all undo related methods, reset, isInside, leaveInset, current mode; - kill some unused methods: macromode, replaceWord, setScreenPos, touch, markInsert, markErase; - Move code around to group things, and add a few comments (a lot remains to be done). This changes lead to some related changes in other classes: removal, change of parameter. No intended change. src/Buffer.cpp | 2 +- src/Cursor.cpp | 1216 ++++++++++++++++++++---------------------- src/Cursor.h | 354 ++++++------- src/CutAndPaste.cpp | 8 +- src/CutAndPaste.h | 6 +- src/DocIterator.cpp | 39 ++- src/DocIterator.h | 14 +- src/Text.cpp | 4 +- src/Text.h | 5 +- src/insets/InsetGraphics.cpp | 2 +- src/insets/InsetLabel.cpp | 2 +- src/mathed/InsetMathHull.cpp | 36 -- src/mathed/InsetMathHull.h | 2 - src/mathed/InsetMathNest.cpp | 2 +- src/mathed/MathData.cpp | 5 - src/mathed/MathData.h | 2 - 16 files changed, 820 insertions(+), 879 deletions(-)