>> - Minor: when the colorlinks option is set, the option no frames should >> also be set since colorlinks does the same as the no frame option > > Perhaps implementing this only confuses people. So we can leave it as it is
agreed > > its rather minor issue - when the user temporarily switch off hyperref > > support, > > his settings(eg checkboxes) will be saved only if he filled some text edit > > field. > > The settings should be saved, also when there only check boxes set. > > Uwe the following patch should correct this. pavel
Index: src/PDFOptions.cpp =================================================================== --- src/PDFOptions.cpp (revision 20453) +++ src/PDFOptions.cpp (working copy) @@ -31,12 +31,23 @@ 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: src/PDFOptions.h =================================================================== --- src/PDFOptions.h (revision 20453) +++ src/PDFOptions.h (working copy) @@ -19,11 +19,23 @@ 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;