X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FText.h;h=60b6130cc4f2ea067d156ad2ec736ef88bc4196c;hb=981e958b9d63930c83b1adced65b75b3d857ac97;hp=e3421e2e5f52183c67df98b326e75d27fec2af23;hpb=a948d133331ca32052b686bf935f2ef61451220d;p=lyx.git diff --git a/src/Text.h b/src/Text.h index e3421e2e5f..60b6130cc4 100644 --- a/src/Text.h +++ b/src/Text.h @@ -66,11 +66,9 @@ public: Font const & font, Font const & display_font); /** Needed to propagate font changes to all text cells of insets - * that are not allowed inside a font change (bug 1973). + * that are not allowed inside a font change (bugs 1973, 6919). * Must not be called if \p pos denotes an ordinary character or an * inset that is alowed inside a font change. - * FIXME: This should be removed, see documentation of noFontChange - * in insetbase.h */ void setInsetFont(BufferView const & bv, pit_type pit, pos_type pos, Font const & font, bool toggleall = false); @@ -126,6 +124,12 @@ public: /// docstring asString(pit_type beg, pit_type end, int options = AS_STR_NONE) const; + /// Appends a possibly abbreviated representation of our text + /// to \param os, where \param maxlen defines the maximum size + /// of \param os. If \param shorten is true, then we will shorten + /// \param os to maxlen chars and replace the final three by "..., + /// if \param os is longer than maxlen chars. + void forToc(docstring & os, size_t maxlen, bool shorten = true) const; /// insert a character at cursor position /// FIXME: replace Cursor with DocIterator. @@ -259,10 +263,10 @@ public: /* these things are for search and replace */ /// needed to insert the selection - void insertStringAsLines(DocIterator const & dit, docstring const & str, + void insertStringAsLines(Cursor & cur, docstring const & str, Font const & font); /// needed to insert the selection - void insertStringAsParagraphs(DocIterator const & dit, docstring const & str, + void insertStringAsParagraphs(Cursor & cur, docstring const & str, Font const & font); /// access to our paragraphs