public void DeleteFootnoteFromContextMenuIPSelection() { MakeFootnoteSelection(1, 1, 1); // First get the footnote we're deleting. IScrFootnote footnote = Cache.ServiceLocator.GetInstance <IScrFootnoteRepository>().GetObject(m_Jude.FootnotesOS[1].Hvo); // Find the paragraph that this footnote is in IStTxtPara para = footnote.ParaContainingOrcRA; //REVIEW: para not currently used. Should we assert that it is not null? m_footnoteView.DeleteFootnote(); Assert.IsFalse(footnote.IsValidObject, "Footnote should have been deleted."); // Now make sure that we don't find the footnote marker in the vern or either BT of // the para that used to contain it. VerifyRemovedFootnoteMarker(para, footnote.Guid); VerifyRemovedFootnoteMarker(para, footnote.Guid, m_wsEn); VerifyRemovedFootnoteMarker(para, footnote.Guid, m_wsDe); }
public void DeleteFootnoteFromContextMenuIPSelection() { CheckDisposed(); MakeFootnoteSelection(1, 1, 1); // First get the footnote we're deleting. ScrFootnote footnote = new ScrFootnote(Cache, m_Jude.FootnotesOS.HvoArray[1]); Guid guidFootnote = Cache.GetGuidFromId(footnote.Hvo); // Find the paragraph that this footnote is in int hvoPara = footnote.ContainingParagraphHvo; m_footnoteView.DeleteFootnote(); Assert.IsFalse(Cache.IsRealObject(footnote.Hvo, StFootnote.kClassId)); // Now make sure that we don't find the footnote marker in the vern or either BT of // the para that used to contain it. VerifyRemovedFootnoteMarker(hvoPara, guidFootnote); VerifyRemovedFootnoteMarker(hvoPara, guidFootnote, InMemoryFdoCache.s_wsHvos.En); VerifyRemovedFootnoteMarker(hvoPara, guidFootnote, InMemoryFdoCache.s_wsHvos.De); }