// is with respect to the current document state, out of which there may be
// operations that have not yet been extracted by the typing extractor. The
// problem is that we can't always safely force the typing extractor to
// extract out those operations. Therefore, we assume that most of the time,
// doodads are inserted via selection on a non-editing document.
ContentRange selectionPoints = createSelectionHelper(content).getOrderedSelectionPoints();
CMutableDocument document = content.getMutableDoc();
ContentView view = content.getPersistentView();
return DocumentUtil.getLocationNearSelection(document, view, selectionPoints);
}