]> git.lyx.org Git - lyx.git/blobdiff - src/Paragraph.h
Inset::forceLTR() only determines whether explicit switches are needed
[lyx.git] / src / Paragraph.h
index 58b276226356b0464b7a857f0fdce83fef4c110e..ca88dd774e9d48e7f0472b8db35972899af5c0d0 100644 (file)
@@ -16,7 +16,6 @@
 #ifndef PARAGRAPH_H
 #define PARAGRAPH_H
 
-#include "FontEnums.h"
 #include "LayoutEnums.h"
 #include "SpellChecker.h"
 
@@ -24,6 +23,7 @@
 #include "support/types.h"
 
 #include <set>
+#include <vector>
 
 namespace lyx {
 
@@ -31,22 +31,16 @@ class AuthorList;
 class Buffer;
 class BufferParams;
 class Change;
-class Counters;
-class Cursor;
-class CursorSlice;
 class DocIterator;
 class docstring_list;
 class DocumentClass;
 class Inset;
-class InsetBibitem;
 class LaTeXFeatures;
 class InsetList;
 class Language;
 class Layout;
 class Font;
-class MetricsInfo;
 class OutputParams;
-class PainterInfo;
 class ParagraphParameters;
 class TocBackend;
 class WordLangTuple;
@@ -129,7 +123,8 @@ enum AsStringParameter
        AS_STR_INSETS = 2, ///< Go into insets.
        AS_STR_NEWLINES = 4, ///< Get also newline characters.
        AS_STR_SKIPDELETE = 8, ///< Skip deleted text in change tracking.
-       AS_STR_PLAINTEXT = 16 ///< Don't export formatting when descending into insets.
+       AS_STR_PLAINTEXT = 16, ///< Don't export formatting when descending into insets.
+       AS_STR_MATHED = 32 ///< Use a format suitable for mathed (eg. for InsetRef).
 };
 
 
@@ -199,7 +194,7 @@ public:
        /// Can we drop the standard paragraph wrapper?
        bool emptyTag() const;
 
-       /// Get the id of the paragraph, usefull for docbook
+       /// Get the id of the paragraph, useful for DocBook
        std::string getID(Buffer const & buf, OutputParams const & runparams) const;
 
        /// Output the first word of a paragraph, return the position where it left.
@@ -208,14 +203,14 @@ public:
        /// Output the first word of a paragraph, return the position where it left.
        pos_type firstWordLyXHTML(XMLStream & xs, OutputParams const & runparams) const;
 
-       /// Writes to stream the DocBook representation
-       void simpleDocBookOnePar(Buffer const & buf,
-                                                        XMLStream &,
-                                                        OutputParams const & runparams,
-                                                        Font const & outerfont,
-                                                        bool start_paragraph = true,
-                                                        bool close_paragraph = true,
-                                                        pos_type initial = 0) const;
+       /// Outputs to stream the DocBook representation, one element per paragraph.
+       std::tuple<std::vector<docstring>, std::vector<docstring>, std::vector<docstring>>
+       simpleDocBookOnePar(Buffer const & buf,
+                                                                          OutputParams const & runparams,
+                                                                          Font const & outerfont,
+                                                                          pos_type initial = 0,
+                                                                          bool is_last_par = false,
+                                                                          bool ignore_fonts = false) const;
 
        /// \return any material that has had to be deferred until after the
        /// paragraph has closed.
@@ -244,6 +239,10 @@ public:
        ///
        bool isPassThru() const;
        ///
+       bool parbreakIsNewline() const;
+       ///
+       bool isPartOfTextSequence() const;
+       ///
        pos_type size() const;
        ///
        bool empty() const;