diff --git a/development/FORMAT b/development/FORMAT index 52d1c85e68..008c58d8ad 100644 --- a/development/FORMAT +++ b/development/FORMAT @@ -1,6 +1,13 @@ LyX file-format changes ----------------------- +2007-09-21 Pavel Sanda + * Format incremented to 286: LyX now supports hyperref and some + of its options. + +2007-09-xx ??? + * Format incremented to 285: ??? + 2007-09-09 Helge Hafting * Format incremented to 284: LyX now implements wrapped figures using wrapfig.sty instead of floatflt.sty. The latter diff --git a/lib/lyx2lyx/lyx_1_6.py b/lib/lyx2lyx/lyx_1_6.py index 9a546c1761..3d4f4f7940 100644 --- a/lib/lyx2lyx/lyx_1_6.py +++ b/lib/lyx2lyx/lyx_1_6.py @@ -183,18 +183,59 @@ def remove_manifest(document): # def revert_pdf_options(document): - "Revert PDF options for hyperref. " - i = 0 - while 1: - i = find_tokens(document.header, [ "\\use_hyperref", "\\pdf_title", "\\pdf_author", "\\pdf_subject", - "\\pdf_keywords", "\\pdf_bookmarks", "\\pdf_bookmarksnumbered", - "\\pdf_bookmarksopen", "\\pdf_bookmarksopenlevel", "\\pdf_breaklinks", - "\\pdf_border", "\\pdf_colorlinks", "\\pdf_backref", "\\pdf_pagebackref", - "\\pdf_fullscreen", "\\pdf_quoted_options", "\\pdf_store_options" ], i) - if i == -1: - return - document.body[i] = "" - i = i + 1 + "Revert PDF options for hyperref. " + i = 0 + i = find_token(document.header, "\\use_hyperref", i) + if i != -1: + del document.header[i] + i = find_token(document.header, "\\pdf_store_options", i) + if i != -1: + del document.header[i] + i = find_token(document.header, "\\pdf_title", 0) + if i != -1: + del document.header[i] + i = find_token(document.header, "\\pdf_author", 0) + if i != -1: + del document.header[i] + i = find_token(document.header, "\\pdf_subject", 0) + if i != -1: + del document.header[i] + i = find_token(document.header, "\\pdf_keywords", 0) + if i != -1: + del document.header[i] + i = find_token(document.header, "\\pdf_bookmarks", 0) + if i != -1: + del document.header[i] + i = find_token(document.header, "\\pdf_bookmarksnumbered", i) + if i != -1: + del document.header[i] + i = find_token(document.header, "\\pdf_bookmarksopen", i) + if i != -1: + del document.header[i] + i = find_token(document.header, "\\pdf_bookmarksopenlevel", i) + if i != -1: + del document.header[i] + i = find_token(document.header, "\\pdf_breaklinks", i) + if i != -1: + del document.header[i] + i = find_token(document.header, "\\pdf_pdfborder", i) + if i != -1: + del document.header[i] + i = find_token(document.header, "\\pdf_colorlinks", i) + if i != -1: + del document.header[i] + i = find_token(document.header, "\\pdf_backref", i) + if i != -1: + del document.header[i] + i = find_token(document.header, "\\pdf_pagebackref", i) + if i != -1: + del document.header[i] + i = find_token(document.header, "\\pdf_pagemode", 0) + if i != -1: + del document.header[i] + i = find_token(document.header, "\\pdf_quoted_options", 0) + if i != -1: + del document.header[i] def remove_inzip_options(document): diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 75799f7649..edf225bb3f 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -143,7 +143,7 @@ namespace fs = boost::filesystem; namespace { -int const LYX_FORMAT = 285; +int const LYX_FORMAT = 286; } // namespace anon