Implement Menu::removeSubDocumentMenu
Extract part of sub-document removing to common method getTwoIndexForDocumentEditing