From: Uwe Stöhr Date: Sun, 23 Sep 2007 12:39:31 +0000 (+0000) Subject: - increase fileformat to 286: this has been forgotten in Pavel's PDF-support patch X-Git-Tag: 1.6.10~8222 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=011459ce46416eb0354dc941f180e29c71e5dfa4;p=lyx.git - increase fileformat to 286: this has been forgotten in Pavel's PDF-support patch (besides this, note that the fileformat change to 285 is not yet documented in FORMAT) - lyx2lyx/lyx_1_6.py: fix routine to revert the PDF-support stuff git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20448 a592a061-630c-0410-9148-cb99ea01b6c8 --- 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