mshtml: Added IHTMLTxtRange::select implementation.

This commit is contained in:
Jacek Caban 2007-08-17 02:39:56 +02:00 committed by Alexandre Julliard
parent dab6474b66
commit cbfef31895
1 changed files with 18 additions and 2 deletions

View File

@ -337,8 +337,24 @@ static HRESULT WINAPI HTMLTxtRange_moveEnd(IHTMLTxtRange *iface, BSTR Unit,
static HRESULT WINAPI HTMLTxtRange_select(IHTMLTxtRange *iface) static HRESULT WINAPI HTMLTxtRange_select(IHTMLTxtRange *iface)
{ {
HTMLTxtRange *This = HTMLTXTRANGE_THIS(iface); HTMLTxtRange *This = HTMLTXTRANGE_THIS(iface);
FIXME("(%p)->()\n", This);
return E_NOTIMPL; TRACE("(%p)\n", This);
if(This->doc->nscontainer) {
nsIDOMWindow *dom_window = NULL;
nsISelection *nsselection;
nsIWebBrowser_GetContentDOMWindow(This->doc->nscontainer->webbrowser, &dom_window);
nsIDOMWindow_GetSelection(dom_window, &nsselection);
nsIDOMWindow_Release(dom_window);
nsISelection_RemoveAllRanges(nsselection);
nsISelection_AddRange(nsselection, This->nsrange);
nsISelection_Release(nsselection);
}
return S_OK;
} }
static HRESULT WINAPI HTMLTxtRange_pasteHTML(IHTMLTxtRange *iface, BSTR html) static HRESULT WINAPI HTMLTxtRange_pasteHTML(IHTMLTxtRange *iface, BSTR html)