]> git.lyx.org Git - features.git/commitdiff
PDFOptions: patch by Pavel to store the settings when the user switches hyperref...
authorUwe Stöhr <uwestoehr@web.de>
Sun, 23 Sep 2007 19:17:22 +0000 (19:17 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Sun, 23 Sep 2007 19:17:22 +0000 (19:17 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20456 a592a061-630c-0410-9148-cb99ea01b6c8

src/PDFOptions.cpp
src/PDFOptions.h

index 5c8233f75420227a070b93ae5567a11f4cc763e6..e25dd0710ebdb9235ef085d1070c4632ae75cbbc 100644 (file)
@@ -31,12 +31,23 @@ const string PDFOptions::pagemode_fullscreen("FullScreen");
 
 bool PDFOptions::empty() const
 {
-       return author.empty()
-               && title.empty()
-               && subject.empty()
-               && keywords.empty()
-               && pagemode.empty()
-               && quoted_options.empty();
+       PDFOptions x; //implicit hyperref settings
+
+       return  author == x.author
+               && title == x.title
+               && subject == x.subject
+               && keywords == x.keywords
+               && pagemode == x.pagemode
+               && quoted_options == x.quoted_options
+               && bookmarks == x.bookmarks
+               && bookmarksnumbered == x.bookmarksnumbered
+               && bookmarksopen == x.bookmarksopen
+               && bookmarksopenlevel == x.bookmarksopenlevel
+               && breaklinks == x.breaklinks
+               && pdfborder == x.pdfborder
+               && colorlinks == x.colorlinks
+               && backref == x.backref
+               && pagebackref == x.pagebackref ;
 }
 
 void PDFOptions::writeFile(ostream & os) const
index 82d08841cb698fb3dc8b734c8a0eef72b4d6f2bb..84580f23e14e5289f28b88a751435b211f68e909 100644 (file)
@@ -19,11 +19,23 @@ namespace lyx {
 class Lexer;
 
 /// Options for PDF generation
+
+/*
+  Possible cleanups, left for next fileformat change:
+  
+  - bookmarksopenlevel is stored in .lyx as string; 
+    after change to spinbox it would be appropriate
+    change to int.
+  - store_options flag can be completely replaced by
+    function store_options() doing essentialy the same
+    as empty() now.
+*/
+
 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;