Implement GetDocument and GetSelection

This commit is contained in:
sfraser%netscape.com 1999-04-15 20:13:30 +00:00
parent 1f28472332
commit 30c0421603

View File

@ -951,14 +951,32 @@ NS_IMETHODIMP
nsEditorAppCore::GetEditorDocument(nsIDOMDocument** aEditorDocument)
{
return NS_ERROR_NOT_IMPLEMENTED;
if (mEditor)
{
nsCOMPtr<nsIEditor> editor = do_QueryInterface(mEditor);
if (editor)
{
return editor->GetDocument(aEditorDocument);
}
}
return NS_NOINTERFACE;
}
NS_IMETHODIMP
nsEditorAppCore::GetEditorSelection(nsIDOMSelection** aEditorSelection)
{
return NS_ERROR_NOT_IMPLEMENTED;
if (mEditor)
{
nsCOMPtr<nsIEditor> editor = do_QueryInterface(mEditor);
if (editor)
{
return editor->GetSelection(aEditorSelection);
}
}
return NS_NOINTERFACE;
}
// Pop up the link dialog once we have dialogs ... for now, hardwire it