From 9e879d112b4fa6cf72b4e55c7f512b4c3622b3ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Fri, 21 Sep 2007 09:49:50 +0000 Subject: [PATCH] some code wstyle issues. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20408 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/PDFOptions.cpp | 46 ++++++++++++++++++++++++---------------------- src/PDFOptions.h | 2 -- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/PDFOptions.cpp b/src/PDFOptions.cpp index b6a900d1cc..07f1fe3185 100644 --- a/src/PDFOptions.cpp +++ b/src/PDFOptions.cpp @@ -8,18 +8,17 @@ * Full author contact details are available in file CREDITS. */ - -#include "config.h" +#include #include "PDFOptions.h" -#include -#include #include "support/convert.h" #include "support/lstrings.h" #include "debug.h" #include "Lexer.h" +#include +#include namespace lyx { @@ -32,30 +31,30 @@ const string PDFOptions::pagemode_fullscreen("FullScreen"); bool PDFOptions::empty() const { - return - author.empty() && - title.empty() && - subject.empty() && - keywords.empty()&& - pagemode.empty()&& - bookmarksopenlevel.empty() && - quoted_options.empty(); + return author.empty() + && title.empty() + && subject.empty() + && keywords.empty() + && pagemode.empty() + && bookmarksopenlevel.empty() + && quoted_options.empty(); } void PDFOptions::writeFile(ostream & os) const { os << "\\use_hyperref " << convert(use_hyperref) << '\n'; os << "\\pdf_store_options " << convert(store_options) << '\n'; - if (!use_hyperref && !store_options) return; + if (!use_hyperref && !store_options) + return; if (!title.empty() ) - os << "\\pdf_title \"" << title << "\"\n"; + os << "\\pdf_title \"" << title << "\"\n"; if (!author.empty()) - os << "\\pdf_author \"" << author << "\"\n"; + os << "\\pdf_author \"" << author << "\"\n"; if (!subject.empty()) - os << "\\pdf_subject \"" << subject << "\"\n"; + os << "\\pdf_subject \"" << subject << "\"\n"; if (!keywords.empty()) - os << "\\pdf_keywords \"" << keywords << "\"\n"; + os << "\\pdf_keywords \"" << keywords << "\"\n"; os << "\\pdf_bookmarks " << convert(bookmarks) << '\n'; @@ -71,15 +70,16 @@ void PDFOptions::writeFile(ostream & os) const os << "\\pdf_pagebackref " << convert(pagebackref) << '\n'; if (!pagemode.empty()) - os << "\\pdf_pagemode " << pagemode << '\n'; + os << "\\pdf_pagemode " << pagemode << '\n'; if (!quoted_options.empty()) - os << "\\pdf_quoted_options \"" << quoted_options << "\"\n"; + os << "\\pdf_quoted_options \"" << quoted_options << "\"\n"; } void PDFOptions::writeLaTeX(odocstringstream &os) const { - if (!use_hyperref) return ; + if (!use_hyperref) + return; string opt; @@ -123,10 +123,11 @@ void PDFOptions::writeLaTeX(odocstringstream &os) const os << from_utf8(opt); } + string PDFOptions::readToken(Lexer &lex, string const & token) { if (token == "\\use_hyperref") { - lex >> use_hyperref; + lex >> use_hyperref; } else if (token == "\\pdf_title") { lex >> title; } else if (token == "\\pdf_author") { @@ -165,12 +166,14 @@ string PDFOptions::readToken(Lexer &lex, string const & token) return string(); } + //prepared for check string PDFOptions::quoted_options_get() const { return quoted_options; } + // Keep implicit hyperref settings void PDFOptions::clear() { @@ -191,7 +194,6 @@ void PDFOptions::clear() pagemode.clear(); quoted_options.clear(); store_options = false; - } } // namespace lyx diff --git a/src/PDFOptions.h b/src/PDFOptions.h index d34132b130..2411d6614a 100644 --- a/src/PDFOptions.h +++ b/src/PDFOptions.h @@ -12,8 +12,6 @@ #ifndef PDFOPTIONS_H #define PDFOPTIONS_H - -#include #include "support/docstream.h" namespace lyx {