]> git.lyx.org Git - lyx.git/blobdiff - src/PDFOptions.h
* GuiView.cpp:
[lyx.git] / src / PDFOptions.h
index 82d08841cb698fb3dc8b734c8a0eef72b4d6f2bb..2fa661aa71782b8d0b81fa1905a38ee72c5ebb92 100644 (file)
 #ifndef PDFOPTIONS_H
 #define PDFOPTIONS_H
 
-#include "support/docstream.h"
+#include "support/strfwd.h"
+
+#include <string>
 
 namespace lyx {
 
 class Lexer;
 
+// FIXME UNICODE
+// Write functions need to use odostream instead of ostream before
+// we can use docstring instead of string.
+
 /// Options for PDF generation
 class PDFOptions {
 public:
        ///
        PDFOptions() { clear(); }
-       /// check for string settings
+       /// check whether user added any settings for hyperref
        bool empty() const;
        /// output to lyx header
        void writeFile(std::ostream &) const;
        /// output to tex header
-       void writeLaTeX(odocstringstream &) const;
+       void writeLaTeX(odocstream &, bool hyperref_already_provided) const;
        /// read tokens from lyx header
        std::string readToken(Lexer &lex, std::string const & token);
-       /// keep implicit hyperref settings
+       /// set implicit settings for hyperref
        void clear();
 
        ///
@@ -116,6 +122,15 @@ public:
                * dialog -> PDFOptions.pagemode .
                */
        std::string pagemode;
+       /**
+               * Flag indicating whether hyperref tries to derive the values for
+               * pdftitle and pdfauthor from \title and \author.
+               * pdfusetitle       boolean false
+               *
+               * Note that we use true as default value instead. The option is also
+               * used in latex output only when title and author is not filled.
+       */
+       bool pdfusetitle;
        ///latex string
        static const std::string pagemode_fullscreen;
        /**
@@ -124,8 +139,10 @@ public:
        std::string quoted_options;
        /**
                * Possible syntax check of users additional parameters here.
+               * Returns repaired string. For the time being only newlines
+               * are checked.
                */
-       std::string quoted_options_get() const;
+       std::string quoted_options_check(std::string const str) const;
        
        
        /**