protected void FinalizePrevSection()
{
if (m_currSection == null || !m_currSection.IsValidObject)
return;
int bcvRef = (m_firstImportedRef.IsEmpty) ? m_currSection.VerseRefMin :
Math.Min(m_firstImportedRef, m_currSection.VerseRefMin);
m_firstImportedRef = new ScrReference(bcvRef, m_scr.Versification);
if (InMainImportDomain)
return;
// First, check if there is heading content. If not, add a blank paragraph.
if (m_currSection.HeadingOA.ParagraphsOS.Count == 0)
{
StTxtParaBldr paraBldr = new StTxtParaBldr(m_cache);
paraBldr.ParaStylePropsProxy =
(m_fInScriptureText ? m_ScrSectionHeadParaProxy : m_DefaultIntroSectionHeadParaProxy);
paraBldr.StringBuilder.SetIntPropValues(0, 0, (int)FwTextPropType.ktptWs,
(int)FwTextPropVar.ktpvDefault, m_wsVern);
paraBldr.CreateParagraph(m_sectionHeading);
}
// Now, check if there is content. If not, add a blank paragraph.
if (m_currSection.ContentOA.ParagraphsOS.Count == 0)
{
StTxtParaBldr paraBldr = new StTxtParaBldr(m_cache);
paraBldr.ParaStylePropsProxy =
(m_fInScriptureText ? m_DefaultScrParaProxy : m_DefaultIntroParaProxy);
paraBldr.StringBuilder.SetIntPropValues(0, 0, (int)FwTextPropType.ktptWs,
(int)FwTextPropVar.ktpvDefault, m_wsVern);
paraBldr.CreateParagraph(m_sectionContent);
}
m_fInScriptureText = !m_fCurrentSectionIsIntro;
}