SIL.FieldWorks.TE.TeImporter.FinalizePrevSection C# (CSharp) 메소드

FinalizePrevSection() 보호된 메소드

Finalizes section references and checks if the current section has any heading text and content. If not, a single blank paragraph is written for whatever is missing.
protected FinalizePrevSection ( ) : void
리턴 void
		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;
		}