public void GetSelectedFootnoteElementAtTop() { int tag; int hvoSel; int hvoFirstFootnote = 0; // IVwSelection vwsel = m_footnoteView.RootBox.Selection; // Assert.IsNotNull(vwsel); bool fGotIt = m_footnoteView.GetSelectedFootnote(out tag, out hvoSel); Assert.IsTrue(fGotIt); Assert.AreEqual(StTextTags.kflidParagraphs, tag); m_footnoteView.RootBox.MakeSimpleSel(true, false, false, true); int hvoSimple; fGotIt = m_footnoteView.GetSelectedFootnote(out tag, out hvoSimple); Assert.IsTrue(fGotIt); Assert.AreEqual(hvoSel, hvoSimple); Assert.AreEqual(StTextTags.kflidParagraphs, tag); foreach (IScrBook book in m_scr.ScriptureBooksOS) { if (book.FootnotesOS.Count > 0) { hvoFirstFootnote = book.FootnotesOS[0].Hvo; break; } } Assert.AreEqual(hvoFirstFootnote, hvoSel); }
public void ApplyParaStyle() { m_footnoteView.EditingHelper.ApplyStyle(ScrStyleNames.NormalFootnoteParagraph); int tag; int hvoSimple; bool fGotIt = m_footnoteView.GetSelectedFootnote(out tag, out hvoSimple); Assert.IsTrue(fGotIt); Assert.AreEqual(StTextTags.kflidParagraphs, tag); IStFootnote footnote = Cache.ServiceLocator.GetInstance <IStFootnoteRepository>().GetObject(hvoSimple); IStTxtPara para = (IStTxtPara)footnote.ParagraphsOS[0]; Assert.AreEqual(ScrStyleNames.NormalFootnoteParagraph, para.StyleRules.GetStrPropValue((int)FwTextPropType.ktptNamedStyle)); }
public void ApplyParaStyle() { CheckDisposed(); m_footnoteView.EditingHelper.ApplyStyle(ScrStyleNames.NormalFootnoteParagraph); int tag; int hvoSimple; bool fGotIt = m_footnoteView.GetSelectedFootnote(out tag, out hvoSimple); Assert.IsTrue(fGotIt); Assert.AreEqual((int)StText.StTextTags.kflidParagraphs, tag); StFootnote footnote = new StFootnote(Cache, hvoSimple); StTxtPara para = (StTxtPara)footnote.ParagraphsOS[0]; Assert.AreEqual(ScrStyleNames.NormalFootnoteParagraph, para.StyleRules.GetStrPropValue((int)FwTextPropType.ktptNamedStyle)); }