]> git.lyx.org Git - lyx.git/blobdiff - src/buffer.h
get rid of LYX_LIBS
[lyx.git] / src / buffer.h
index 5f3e8d9d5b0f67881def40f7cb8cc4c128b6a2d3..d46e715ef9ce590fff28ac73a8a799bef6c11695 100644 (file)
@@ -123,12 +123,11 @@ public:
                                        Paragraph::depth_type & depth, 
                                        LyXFont &);
        ///
-       void insertStringAsLines(Paragraph *&, Paragraph::pos_type &,
+       void insertStringAsLines(Paragraph *&, lyx::pos_type &,
                                 LyXFont const &, string const &) const;
 #ifndef NO_COMPABILITY
        ///
        void insertErtContents(Paragraph * par, int & pos,
-                              LyXFont const & font,
                               bool set_inactive = true);
 #endif
        ///
@@ -151,8 +150,8 @@ public:
        ///
        void writeFileAscii(std::ostream &, int);
        ///
-       string const asciiParagraph(Paragraph const *,
-                                   unsigned int linelen) const;
+       string const asciiParagraph(Paragraph const *, unsigned int linelen,
+                                   bool noparbreak = false) const;
        ///
        void makeLaTeXFile(string const & filename,
                           string const & original_path,
@@ -161,7 +160,7 @@ public:
            \param \a endpar if == 0 then to the end
        */
        void latexParagraphs(std::ostream & os, Paragraph * par,
-                            Paragraph * endpar, TexRow & texrow) const;
+                            Paragraph * endpar, TexRow & texrow) const;
        ///
        void simpleDocBookOnePar(std::ostream &,
                                 Paragraph * par, int & desc_on,
@@ -213,9 +212,13 @@ public:
        /// Mark this buffer as dirty.
        void markDirty();
 
-       /// Returns the buffers filename.
+       /// Returns the buffer's filename. It is always an absolute path.
        string const & fileName() const;
 
+       /// Returns the the path where the buffer lives.
+       /// It is always an absolute path. 
+       string const & filePath() const;
+
        /** A transformed version of the file name, adequate for LaTeX.
            \param no_path optional if \c true then the path is stripped.
        */
@@ -313,9 +316,6 @@ public:
        /// Where to put temporary files.
        string tmppath;
 
-       /// The path to the document file.
-       string filepath;
-
        /** If we are writing a nice LaTeX file or not.
            While writing as LaTeX, tells whether we are
            doing a 'nice' LaTeX file */
@@ -340,7 +340,10 @@ private:
        bool read_only;
 
        /// name of the file the buffer is associated with.
-       string filename;
+       string filename_;
+
+       /// The path to the document file.
+       string filepath_;
 
        /// Format number of buffer
        int file_format;
@@ -371,8 +374,7 @@ public:
                        setParagraph();
                }
                ///
-               inset_iterator(Paragraph * paragraph,
-                              Paragraph::pos_type pos);
+               inset_iterator(Paragraph * paragraph, lyx::pos_type pos);
                ///
                inset_iterator & operator++() { // prefix ++
                        if (par) {
@@ -402,7 +404,7 @@ public:
                ///
                Paragraph * getPar() { return par; }
                ///
-               Paragraph::pos_type getPos() const { return it.getPos(); }
+               lyx::pos_type getPos() const { return it.getPos(); }
                ///
                friend
                bool operator==(inset_iterator const & iter1,
@@ -531,7 +533,14 @@ void Buffer::markDirty()
 inline
 string const & Buffer::fileName() const
 {
-       return filename;
+       return filename_;
+}
+
+
+inline
+string const & Buffer::filePath() const
+{
+       return filepath_;
 }