From c1dc0e4192a9e47ad6a45a571e2f6438bcfcbc68 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Sun, 12 Aug 2007 17:40:36 +0200 Subject: [PATCH] mshtml: Use GetIsCollapsed in IHTMLSelectionObject::get_type. --- dlls/mshtml/selection.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/mshtml/selection.c b/dlls/mshtml/selection.c index 79683f04477..fe191f46a8d 100644 --- a/dlls/mshtml/selection.c +++ b/dlls/mshtml/selection.c @@ -177,7 +177,7 @@ static HRESULT WINAPI HTMLSelectionObject_clear(IHTMLSelectionObject *iface) static HRESULT WINAPI HTMLSelectionObject_get_type(IHTMLSelectionObject *iface, BSTR *p) { HTMLSelectionObject *This = HTMLSELOBJ_THIS(iface); - PRInt32 range_cnt = 0; + PRBool collapsed = TRUE; static const WCHAR wszNone[] = {'N','o','n','e',0}; static const WCHAR wszText[] = {'T','e','x','t',0}; @@ -185,9 +185,10 @@ static HRESULT WINAPI HTMLSelectionObject_get_type(IHTMLSelectionObject *iface, TRACE("(%p)->(%p)\n", This, p); if(This->nsselection) - nsISelection_GetRangeCount(This->nsselection, &range_cnt); + nsISelection_GetIsCollapsed(This->nsselection, &collapsed); - *p = SysAllocString(range_cnt ? wszText : wszNone); /* FIXME: control */ + *p = SysAllocString(collapsed ? wszNone : wszText); /* FIXME: control */ + TRACE("ret %s\n", debugstr_w(*p)); return S_OK; }