public void BuildConcData() { // Get a character property engine that can distinguish word-forming and // other characters. ILgWritingSystemFactory encf = m_cache.LanguageWritingSystemFactoryAccessor; ILgCharacterPropertyEngine cpe = encf.get_UnicodeCharProps(); Debug.Assert(cpe != null, "encf.get_UnicodeCharProps() returned null"); foreach (StTxtPara stp in m_txt.ParagraphsOS) { AnalyzePara(stp, cpe); } m_alSummaries.Sort(new SimpleComparer()); if (m_alSummaries.Count == 0) { return; } ITsStrFactory tsf = (ITsStrFactory) new FwKernelLib.TsStrFactoryClass(); ArrayList alSublist = new ArrayList(); // list for a given letter of alphabet. string sKeyCurrent = ((MultiLevelConc.SummaryInfo)m_alSummaries[0]).Key.Substring(0, 1); foreach (MultiLevelConc.SummaryInfo si in m_alSummaries) { string sNewKey = si.Key.Substring(0, 1); if (string.Compare(sKeyCurrent, sNewKey, true) != 0) { AddCharSummary(tsf, sKeyCurrent, alSublist, encf.get_UserWs()); alSublist = new ArrayList(); sKeyCurrent = sNewKey; } alSublist.Add(si); } AddCharSummary(tsf, sKeyCurrent, alSublist, encf.get_UserWs()); }
public WordMaker(ITsString tss, ILgWritingSystemFactory encf) { m_tss = tss; m_ich = 0; m_st = tss.get_Text(); if (m_st == null) m_st = ""; m_cch = m_st.Length; // Get a character property engine from the wsf. m_cpe = encf.get_UnicodeCharProps(); Debug.Assert(m_cpe != null, "encf.get_UnicodeCharProps() returned null"); }
public WordMaker(ITsString tss, ILgWritingSystemFactory encf) { m_tss = tss; m_ich = 0; m_st = tss.get_Text(); if (m_st == null) { m_st = ""; } m_cch = m_st.Length; // Get a character property engine from the wsf. m_cpe = encf.get_UnicodeCharProps(); Debug.Assert(m_cpe != null, "encf.get_UnicodeCharProps() returned null"); }