]> git.lyx.org Git - lyx.git/blobdiff - src/Paragraph.h
LogUi.ui: string redundancy.
[lyx.git] / src / Paragraph.h
index 197d5ffcef26c87fa40083ac9f5700a5709c4abc..dec527cbc85590ec8963ad4d5b11057e514d81a7 100644 (file)
@@ -34,6 +34,7 @@ class Counters;
 class Cursor;
 class CursorSlice;
 class DocIterator;
+class docstring_list;
 class DocumentClass;
 class Inset;
 class InsetBibitem;
@@ -49,6 +50,7 @@ class PainterInfo;
 class ParagraphParameters;
 class TexRow;
 class Toc;
+class WordLangTuple;
 
 class FontSpan {
 public:
@@ -145,8 +147,11 @@ public:
        /// Get the id of the paragraph, usefull for docbook
        std::string getID(Buffer const & buf, OutputParams const & runparams) const;
 
-       /// Get the first word of a paragraph, return the position where it left
-       pos_type firstWord(odocstream & os, OutputParams const & runparams) const;
+       /// Output the first word of a paragraph, return the position where it left.
+       pos_type firstWordDocBook(odocstream & os, OutputParams const & runparams) const;
+
+       /// Output the first word of a paragraph, return the position where it left.
+       pos_type firstWordLyXHTML(odocstream & os, OutputParams const & runparams) const;
 
        /// Writes to stream the docbook representation
        void simpleDocBookOnePar(Buffer const & buf,
@@ -154,6 +159,13 @@ public:
                                 OutputParams const & runparams,
                                 Font const & outerfont,
                                 pos_type initial = 0) const;
+       /// \return any material that has had to be deferred until after the
+       /// paragraph has closed.
+       docstring simpleLyXHTMLOnePar(Buffer const & buf,
+                                odocstream &,
+                                OutputParams const & runparams,
+                                Font const & outerfont,
+                                pos_type initial = 0) const;
 
        ///
        bool hasSameLayout(Paragraph const & par) const;
@@ -203,6 +215,8 @@ public:
        bool isInserted(pos_type pos) const;
        /// is there a deletion at the given pos ?
        bool isDeleted(pos_type pos) const;
+       /// is the whole paragraph deleted ?
+       bool isFullyDeleted(pos_type start, pos_type end) const;
 
        /// will the paragraph be physically merged with the next
        /// one if the imaginary end-of-par character is logically deleted?
@@ -350,9 +364,9 @@ public:
        bool isSeparator(pos_type pos) const;
        ///
        bool isLineSeparator(pos_type pos) const;
-       /// True if the character/inset at this point can be part of a word.
-       /// Note that digits in particular are considered as letters
-       bool isLetter(pos_type pos) const;
+       /// True if the character/inset at this point is a word separator.
+       /// Note that digits in particular are not considered as word separator.
+       bool isWordSeparator(pos_type pos) const;
        /// True if the element at this point is a character that is not a letter.
        bool isChar(pos_type pos) const;
        /// True if the element at this point is a space
@@ -406,6 +420,15 @@ public:
        ///
        void updateWords();
 
+       /// Spellcheck word at position \p from and fill in found misspelled word.
+       /// \return true if pointed word is misspelled.
+       bool spellCheck(pos_type & from, pos_type & to, WordLangTuple & wl,
+               docstring_list & suggestions) const;
+
+       /// Spellcheck word at position \p pos.
+       /// \return true if pointed word is misspelled.
+       bool isMisspelled(pos_type pos) const;
+
 private:
        ///
        void deregisterWords();