X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsettext.h;h=b49374fa93d1212034ae6ab7989763c880ca148a;hb=3c8aba3b556871fb1100a2f98cd93d5d4e3f70c9;hp=bbc558cf5fe8ec7b987fb9f5a2571526e435c7e6;hpb=c6150425e56563ab9bb311b5785efc5e9d4928da;p=lyx.git diff --git a/src/insets/insettext.h b/src/insets/insettext.h index bbc558cf5f..b49374fa93 100644 --- a/src/insets/insettext.h +++ b/src/insets/insettext.h @@ -34,10 +34,10 @@ class Buffer; */ class InsetText : public UpdatableInset { public: - /// - enum { TEXT_TO_INSET_OFFSET = 1 }; /// - explicit + enum { TEXT_TO_INSET_OFFSET = 1 }; + /// + explicit InsetText(Buffer *); /// InsetText(InsetText const &, Buffer *); @@ -107,6 +107,8 @@ public: void SetFont(BufferView *, LyXFont const &, bool toggleall = false); /// void init(Buffer *, InsetText const * ins = 0); + /// + void SetParagraphData(LyXParagraph *); LyXParagraph * par; @@ -178,7 +180,8 @@ private: bool copySelection(); bool pasteSelection(); /// - bool hasSelection() const { return selection_start != selection_end; } + bool hasSelection() const + { return (selection_start_cursor != selection_end_cursor); } /// void SetCharFont(int pos, LyXFont const & font); /// @@ -197,9 +200,9 @@ private: /// int interline_space; /// - int selection_start; + LyXCursor selection_start_cursor; /// - int selection_end; + LyXCursor selection_end_cursor; /// mutable LyXCursor cursor; /// @@ -241,9 +244,7 @@ private: inset_x = it.inset_x; inset_y = it.inset_y; interline_space = it.interline_space; - selection_start = it.selection_start; - selection_end = it.selection_end; - cursor = it.cursor; + selection_start_cursor = selection_end_cursor = cursor = it.cursor; actrow = it.actrow; no_selection = it.no_selection; the_locking_inset = it.the_locking_inset; // suspect