From 8423450ccf919d19b6caaca4ffafccf9764f52f9 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 9 Oct 2008 15:25:23 -0500 Subject: [PATCH] mshtml: Use stored nsdoc in exec_indent. --- dlls/mshtml/txtrange.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/mshtml/txtrange.c b/dlls/mshtml/txtrange.c index ff355683779..3f383d11ae7 100644 --- a/dlls/mshtml/txtrange.c +++ b/dlls/mshtml/txtrange.c @@ -1746,7 +1746,6 @@ static HRESULT exec_indent(HTMLTxtRange *This, VARIANT *in, VARIANT *out) { nsIDOMDocumentFragment *fragment; nsIDOMElement *blockquote_elem, *p_elem; - nsIDOMDocument *nsdoc; nsIDOMNode *tmp; nsAString tag_str; @@ -1755,18 +1754,19 @@ static HRESULT exec_indent(HTMLTxtRange *This, VARIANT *in, VARIANT *out) TRACE("(%p)->(%p %p)\n", This, in, out); - nsIWebNavigation_GetDocument(This->doc->nscontainer->navigation, &nsdoc); + if(!This->doc->nsdoc) { + WARN("NULL nsdoc\n"); + return E_NOTIMPL; + } nsAString_Init(&tag_str, blockquoteW); - nsIDOMDocument_CreateElement(nsdoc, &tag_str, &blockquote_elem); + nsIDOMHTMLDocument_CreateElement(This->doc->nsdoc, &tag_str, &blockquote_elem); nsAString_Finish(&tag_str); nsAString_Init(&tag_str, pW); - nsIDOMDocument_CreateElement(nsdoc, &tag_str, &p_elem); + nsIDOMDocument_CreateElement(This->doc->nsdoc, &tag_str, &p_elem); nsAString_Finish(&tag_str); - nsIDOMDocument_Release(nsdoc); - nsIDOMRange_ExtractContents(This->nsrange, &fragment); nsIDOMElement_AppendChild(p_elem, (nsIDOMNode*)fragment, &tmp); nsIDOMDocumentFragment_Release(fragment); -- 2.11.4.GIT