From 65a9b1a683b5c30609aba5713dca576874f34e13 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Sat, 22 Sep 2007 22:18:44 +0000 Subject: [PATCH] PDFOptions: replace bookmarkslevel edit field by a spinbox (by Pavel) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20441 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/PDFOptions.cpp | 17 +- src/PDFOptions.h | 2 +- src/frontends/qt4/ui/PDFSupportUi.ui | 536 +++++++++++++-------------- 3 files changed, 271 insertions(+), 284 deletions(-) diff --git a/src/PDFOptions.cpp b/src/PDFOptions.cpp index 1fdaab61f0..5c8233f754 100644 --- a/src/PDFOptions.cpp +++ b/src/PDFOptions.cpp @@ -36,7 +36,6 @@ bool PDFOptions::empty() const && subject.empty() && keywords.empty() && pagemode.empty() - && bookmarksopenlevel.empty() && quoted_options.empty(); } @@ -60,8 +59,7 @@ void PDFOptions::writeFile(ostream & os) const os << "\\pdf_bookmarks " << convert(bookmarks) << '\n'; os << "\\pdf_bookmarksnumbered " << convert(bookmarksnumbered) << '\n'; os << "\\pdf_bookmarksopen " << convert(bookmarksopen) << '\n'; - if (!bookmarksopenlevel.empty()) - os << "\\pdf_bookmarksopenlevel \"" << bookmarksopenlevel << "\"\n"; + os << "\\pdf_bookmarksopenlevel \"" << bookmarksopenlevel << "\"\n"; os << "\\pdf_breaklinks " << convert(breaklinks) << '\n'; os << "\\pdf_pdfborder " << convert(pdfborder) << '\n'; @@ -97,8 +95,8 @@ void PDFOptions::writeLaTeX(odocstringstream &os) const opt += "bookmarksnumbered=" + convert(bookmarksnumbered) + ','; opt += "bookmarksopen=" + convert(bookmarksopen) + ','; - if (bookmarksopen && !bookmarksopenlevel.empty()) - opt += "bookmarksopenlevel=" + bookmarksopenlevel + ','; + if (bookmarksopen) + opt += "bookmarksopenlevel=" + convert(bookmarksopenlevel) + ','; } opt += "\n "; opt += "breaklinks=" + convert(breaklinks) + ','; @@ -113,8 +111,10 @@ void PDFOptions::writeLaTeX(odocstringstream &os) const opt += "colorlinks=" + convert(colorlinks) + ','; if (!pagemode.empty()) opt += "pdfpagemode=" + pagemode + ','; - opt += "\n "; - opt += quoted_options_get(); + if (!quoted_options.empty()){ + opt += "\n "; + opt += quoted_options_get(); + } opt = support::rtrim(opt,","); opt += "]\n {hyperref}\n"; @@ -172,7 +172,6 @@ string PDFOptions::quoted_options_get() const return quoted_options; } - // Keep implicit hyperref settings void PDFOptions::clear() { @@ -184,7 +183,7 @@ void PDFOptions::clear() bookmarks = true; bookmarksnumbered = false; bookmarksopen = false; - bookmarksopenlevel.clear(); + bookmarksopenlevel = 1; breaklinks = false; pdfborder = false; colorlinks = false; diff --git a/src/PDFOptions.h b/src/PDFOptions.h index 2411d6614a..82d08841cb 100644 --- a/src/PDFOptions.h +++ b/src/PDFOptions.h @@ -65,7 +65,7 @@ public: * Level (\maxdimen) to which bookmarks are open * bookmarksopenlevel parameter */ - std::string bookmarksopenlevel; + int bookmarksopenlevel; /** * Allows link text to break across lines. * breaklinks boolean false diff --git a/src/frontends/qt4/ui/PDFSupportUi.ui b/src/frontends/qt4/ui/PDFSupportUi.ui index 3344d57bf1..fb5f75efc5 100644 --- a/src/frontends/qt4/ui/PDFSupportUi.ui +++ b/src/frontends/qt4/ui/PDFSupportUi.ui @@ -5,315 +5,303 @@ 0 0 - 448 - 403 + 436 + 394 - + - 10 - 0 - 141 - 21 + 2 + 2 + 423 + 381 Enable clickable crossreferences and header informations - - &Use hyperref support - - - - - - 14 - 310 - 161 - 21 - - - - Enable fullscreen PDF presentation - - - Load in &fullscreen mode - - - - - - 10 - 340 - 421 - 54 - - - Additional o&ptions for hyperref - - - true + &Use hyperref support - false + true false - - - 9 + + + + 186 + 170 + 231 + 148 + - - 6 + + Links - - - - eg: pdfstartview=XYZ, plainpages=false, pdfpagelabels - - - - - - - - - 10 - 180 - 181 - 121 - - - - Generate Bookmarks - - - true - - - true - - - - 9 + + + 9 + + + 6 + + + + + Color links + + + + + + + No frames around links + + + false + + + + + + + Allows link text to break across lines. + + + Break links over lines + + + + + + + Adds "backlink" text to the end of each item in the bibliography + + + &Bibliographical backreferences + + + + + + + Adds "backlink" text to the end of each item in the bibliography + + + Backreference by pa&ge number + + + + + + + + + 6 + 170 + 171 + 112 + + + + Generate Bookmarks + + + true - - 6 + + true - - - - Open bookmarks - - - true - - - false - - - - - 60 - 19 - 91 - 22 - + + + 9 + + + 6 + + + + + Numbered bookmarks - - Number of levels + + + + + + Open bookmarks + + true + + + false + + + + + 21 + 22 + 31 + 16 + + + + &Level: + + + bookmarksopenlevelSB + + + + + + 60 + 20 + 61 + 22 + + + + Number of levels + + - - - - 21 - 22 - 31 - 16 - + + + + + + + 10 + 300 + 161 + 21 + + + + Enable fullscreen PDF presentation + + + Load in &fullscreen mode + + + + + + 6 + 20 + 411 + 141 + + + + Header Information + + + + 9 + + + 6 + + + + + + + + + + + &Title: + + + titleLE + + + + - &Level: + &Author: - bookmarksopenlevelLE + authorLE - - - - - - Numbered bookmarks - - - - - - - - - 209 - 180 - 221 - 148 - - - - Links - - - - 9 + + + + + &Subject: + + + subjectLE + + + + + + + &Keywords: + + + keywordsLE + + + + + + + + + + + + + + + 6 + 330 + 411 + 54 + - - 6 + + Additional o&ptions for hyperref - - - - Color links - - - - - - - No frames around links - - - false - - - - - - - Allows link text to break across lines. - - - Break links over lines - - - - - - - Adds "backlink" text to the end of each item in the bibliography - - - &Bibliographical backreferences - - - - - - - Adds "backlink" text to the end of each item in the bibliography - - - Backreference by pa&ge number - - - - - - - - - 10 - 30 - 421 - 132 - - - - Header Information - - - - 9 + + true + + + false - - 6 + + false - - - - - - - - - - &Keywords: - - - keywordsLE - - - - - - - &Subject: - - - subjectLE - - - - - - - &Author: - - - authorLE - - - - - - - &Title: - - - titleLE - - - - - - - - - - + + + 9 + + + 6 + + + + + eg: pdfstartview=XYZ, plainpages=false, pdfpagelabels + + + + + - - use_hyperrefCB - titleLE - authorLE - subjectLE - keywordsLE - bookmarksGB - bookmarksnumberedCB - bookmarksopenGB - bookmarksopenlevelLE - optionsLE - breaklinksCB - pdfborderCB - colorlinksCB - backrefCB - pagebackrefCB - fullscreenCB - qt_helpers.h -- 2.39.5