Exemplo n.º 1
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Calls ParseStTxtPara to carry out the desired side effects: re-parsing the paragraph
        /// for wordforms, ???.
        /// </summary>
        /// <param name="hvoPara">The Paragraph that was changed</param>
        /// <param name="ivMin">the starting character index where the change occurred</param>
        /// <param name="cvIns">the number of characters inserted</param>
        /// <param name="cvDel">the number of characters deleted</param>
        /// ------------------------------------------------------------------------------------
        protected override void DoEffectsOfPropChange(int hvoPara, int ivMin, int cvIns, int cvDel)
        {
            // If nothing really changed, don't do anything.
            if (cvIns == 0 && cvDel == 0)
            {
                return;
            }

            // Check that the paragraph is truly Scripture, and not a footnote or some other kind
            // of non-Scripture paragraph
            int hvoOfStTextThatOwnsPara = m_cache.GetOwnerOfObject(hvoPara);

            switch (m_cache.GetOwningFlidOfObject(hvoOfStTextThatOwnsPara))
            {
            case (int)ScrSection.ScrSectionTags.kflidContent:
            {
                ScrTxtPara para = new ScrTxtPara(m_cache, hvoPara, false, false);
                // get para props to determine para style - Intro?
                para.ProcessChapterVerseNums(ivMin, cvIns, cvDel);

                // Mark any back translations as unfinished
                para.MarkBackTranslationsAsUnfinished();
                break;
            }

            case (int)ScrBook.ScrBookTags.kflidFootnotes:
            case (int)ScrSection.ScrSectionTags.kflidHeading:
            {
                ScrTxtPara para = new ScrTxtPara(m_cache, hvoPara, false, false);
                // Mark any back translations as stale
                para.MarkBackTranslationsAsUnfinished();
                break;
            }

            default:
                // REVIEW TETeam(TomB): Is any checking needed for anything else?
                break;
            }
        }