~bibledit/bibledit/ubuntu-cloud

« back to all changes in this revision

Viewing changes to library/bibledit.cpp

  • Committer: Teus Benschop
  • Date: 2022-11-13 10:10:35 UTC
  • Revision ID: teusjannette@gmail.com-20221113101035-tfpqtklwoj31b306
new upstream version

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
#include <locale/logic.h>
44
44
#include <ipc/focus.h>
45
45
#include <client/logic.h>
46
 
 
47
 
 
48
 
bool bibledit_started = false;
 
46
using namespace std;
 
47
 
 
48
 
 
49
bool bibledit_started {false};
49
50
 
50
51
 
51
52
// Get Bibledit's version number.
443
444
  book = passages[0].m_book;
444
445
  chapter = passages[0].m_chapter;
445
446
  string verse_s = passages[0].m_verse;
446
 
  string usfm_id = database::books::get_usfm_from_id (book);
 
447
  string usfm_id = database::books::get_usfm_from_id_v1 (book);
447
448
  reference = usfm_id + " " + convert_to_string (chapter) + ":" + convert_to_string (verse_s);
448
449
 
449
450
  // Return the reference.
470
471
  // Accordance broadcasts for instance, 2 Corinthians 9:2, as "2CO 9:2".
471
472
  vector<string> book_rest = filter_string_explode (reference, ' ');
472
473
  if (book_rest.size() != 2) return;
473
 
  int book = database::books::get_id_from_usfm (book_rest[0]);
 
474
  int book = database::books::get_id_from_usfm_v1 (book_rest[0]);
474
475
  vector <string> chapter_verse = filter_string_explode(book_rest[1], ':');
475
476
  if (chapter_verse.size() != 2) return;
476
477
  int chapter = convert_to_int(chapter_verse[0]);