From ae45a10cda345ed3fae585407aafbc596d51eaec Mon Sep 17 00:00:00 2001 From: Teus Benschop Date: Thu, 13 Feb 2025 17:02:07 +0100 Subject: [PATCH] Cleanup: Style "id" fully moved to v2 https://github.com/bibledit/cloud/issues/990 --- filter/text.cpp | 4 ++-- styles/logic.cpp | 6 ------ styles/logic.h | 2 -- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/filter/text.cpp b/filter/text.cpp index 4c4062b7..ed4bb126 100644 --- a/filter/text.cpp +++ b/filter/text.cpp @@ -202,7 +202,7 @@ void Filter_Text::pre_process_usfm (const std::string& stylesheet) std::string marker = filter::strings::trim (currentItem); // Change, e.g. '\id ' to '\id'. marker = marker.substr (1); // Remove the initial backslash, e.g. '\id' becomes 'id'. if (filter::usfm::is_opening_marker (marker)) { - if ((styles.find (marker) != styles.end()) && (!stylesv2::marker_moved_to_v2(marker, "id"))) { + if ((styles.find (marker) != styles.end()) && (!stylesv2::marker_moved_to_v2(marker, ""))) { database::styles1::Item style = styles [marker]; note_citations.evaluate_style(style); switch (style.type) { @@ -364,7 +364,7 @@ void Filter_Text::process_usfm (const std::string& stylesheet) const std::string marker = filter::usfm::get_marker (current_item); // Strip word-level attributes. if (is_opening_marker) filter::usfm::remove_word_level_attributes (marker, chapter_usfm_markers_and_text, chapter_usfm_markers_and_text_pointer); - if ((styles.find (marker) != styles.end()) && (!stylesv2::marker_moved_to_v2(marker, "id"))) // Todo + if ((styles.find (marker) != styles.end()) && (!stylesv2::marker_moved_to_v2(marker, ""))) // Todo { // Deal with a known style. const database::styles1::Item& style = styles.at(marker); diff --git a/styles/logic.cpp b/styles/logic.cpp index 3b7af36f..5de78d0f 100644 --- a/styles/logic.cpp +++ b/styles/logic.cpp @@ -78,7 +78,6 @@ std::string styles_logic_type_text (int type) std::string styles_logic_subtype_text (int type, int subtype) { if (type == StyleTypeIdentifier) { - if (subtype == IdentifierSubtypeBook ) return translate ("identifies the book"); // Todo goes out. if (subtype == IdentifierSubtypeEncoding ) return translate ("identifies the encoding"); if (subtype == IdentifierSubtypeComment ) return translate ("is a comment"); if (subtype == IdentifierSubtypeRunningHeader ) return translate ("is a running header"); @@ -419,10 +418,6 @@ int styles_logic_get_userbool1_function (int type, int subtype) if (type == StyleTypeChapterNumber) { return UserBool1PrintChapterAtFirstVerse; } - if (type == StyleTypeIdentifier) { - if (subtype == IdentifierSubtypeBook) // Todo goes out. - return UserBool1IdStartsNewPage; - } if (type == StyleTypeFootEndNote) { if ((subtype != FootEndNoteSubtypeFootnote) && (subtype == FootEndNoteSubtypeEndnote)) return UserBool1NoteAppliesToApocrypha; @@ -443,7 +438,6 @@ std::string styles_logic_get_userbool1_text (int function) { switch (function) { case UserBool1PrintChapterAtFirstVerse: return translate ("Print chapter number at first verse"); - case UserBool1IdStartsNewPage: return translate ("Start on a new page"); // Todo goes out. case UserBool1NoteAppliesToApocrypha: return translate ("Refers to the Apocrypha"); case UserBool1VerseRestartsParagraph: return translate ("Restart paragraph"); default: return "--"; diff --git a/styles/logic.h b/styles/logic.h index 654f08a8..d1e01d38 100644 --- a/styles/logic.h +++ b/styles/logic.h @@ -41,7 +41,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. #define StyleTypeWordlistElement 13 -#define IdentifierSubtypeBook 0 // Todo goes out eventually. #define IdentifierSubtypeEncoding 1 #define IdentifierSubtypeComment 2 #define IdentifierSubtypeRunningHeader 3 @@ -111,7 +110,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. #define UserBool1None 0 #define UserBool1PrintChapterAtFirstVerse 1 -#define UserBool1IdStartsNewPage 2 // Todo goes out. #define UserBool1NoteAppliesToApocrypha 3 #define UserBool1VerseRestartsParagraph 4