X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FBuffer.h;h=05cf8aac8174305def8e76a12bc896c983745327;hb=b8f04ae29ad0e484ae010dd2364f61164cffca56;hp=a1afc8bd59204f4e31a9b5cd1477758163cc9925;hpb=db358a431549c90ccade9202bd8a98e8edab394a;p=lyx.git diff --git a/src/Buffer.h b/src/Buffer.h index a1afc8bd59..05cf8aac81 100644 --- a/src/Buffer.h +++ b/src/Buffer.h @@ -15,8 +15,6 @@ #include "OutputEnums.h" #include "OutputParams.h" -#include "insets/InsetCode.h" - #include "support/strfwd.h" #include "support/types.h" @@ -136,7 +134,10 @@ public: ExportTexPathHasSpaces, ExportConverterError, // preview + // Implies ExportSuccess. PreviewSuccess, + // The exported file exists but there was an error when opening + // it in a viewer. PreviewError }; @@ -232,13 +233,14 @@ public: /// read a new document from a string bool readString(std::string const &); /// Reloads the LyX file - /// \param clearUndo if false, leave alone the undo stack. - ReadStatus reload(bool clearUndo = true); + ReadStatus reload(); //FIXME: The following function should be private //private: /// read the header, returns number of unknown tokens int readHeader(Lexer & lex); + double fontScalingFactor() const; + private: /// typedef std::map BufferMap; @@ -513,6 +515,8 @@ public: /// BufferParams & params(); BufferParams const & params() const; + /// + BufferParams const & masterParams() const; /** The list of paragraphs. This is a linked list of paragraph, this list holds the @@ -591,12 +595,11 @@ public: /// Replace the inset contents for insets which InsetCode is equal /// to the passed \p inset_code. - void changeRefsIfUnique(docstring const & from, docstring const & to, - InsetCode code); + void changeRefsIfUnique(docstring const & from, docstring const & to); /// get source code (latex/docbook) for some paragraphs, or all paragraphs /// including preamble - void getSourceCode(odocstream & os, std::string const format, + void getSourceCode(odocstream & os, std::string const & format, pit_type par_begin, pit_type par_end, OutputWhat output, bool master) const; @@ -642,21 +645,19 @@ public: /// ExportStatus doExport(std::string const & target, bool put_in_tempdir) const; - /// - ExportStatus doExport(std::string const & target, bool put_in_tempdir, - std::string & result_file) const; - /// + /// Export buffer to format \p format and open the result in a suitable viewer. + /// Note: This has nothing to do with preview of graphics or math formulas. ExportStatus preview(std::string const & format) const; private: + /// + ExportStatus doExport(std::string const & target, bool put_in_tempdir, + std::string & result_file) const; /// target is a format name optionally followed by a space /// and a destination file-name ExportStatus doExport(std::string const & target, bool put_in_tempdir, bool includeall, std::string & result_file) const; /// - ExportStatus doExport(std::string const & target, bool put_in_tempdir, - bool includeall) const; - /// ExportStatus preview(std::string const & format, bool includeall = false) const; /// void setMathFlavor(OutputParams & op) const;