Skip to content

Commit

Permalink
Cleanup: Style "id" fully moved to v2
Browse files Browse the repository at this point in the history
  • Loading branch information
teusbenschop committed Feb 13, 2025
1 parent 0e282c4 commit ae45a10
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
4 changes: 2 additions & 2 deletions filter/text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down
6 changes: 0 additions & 6 deletions styles/logic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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;
Expand All @@ -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 "--";
Expand Down
2 changes: 0 additions & 2 deletions styles/logic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit ae45a10

Please sign in to comment.