Piotr Caban : msxml3: Add ISAXAttributes_getIndexFromName implementation.

Alexandre Julliard julliard at winehq.org
Thu Aug 21 10:02:32 CDT 2008


Module: wine
Branch: master
Commit: 0afbcd5def23cbb0605ccc6bed856ed5a1d32f89
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=0afbcd5def23cbb0605ccc6bed856ed5a1d32f89

Author: Piotr Caban <piotr.caban at gmail.com>
Date:   Wed Aug 20 18:30:34 2008 +0200

msxml3: Add ISAXAttributes_getIndexFromName implementation.

---

 dlls/msxml3/saxreader.c |   25 ++++++++++++++++++++++---
 1 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c
index d850c05..a9a37da 100644
--- a/dlls/msxml3/saxreader.c
+++ b/dlls/msxml3/saxreader.c
@@ -721,10 +721,29 @@ static HRESULT WINAPI isaxattributes_getIndexFromName(
         int *index)
 {
     saxattributes *This = impl_from_ISAXAttributes( iface );
-
-    FIXME("(%p)->(%s, %d, %s, %d) stub\n", This, debugstr_w(pUri), cUriLength,
+    int i;
+    TRACE("(%p)->(%s, %d, %s, %d)\n", This, debugstr_w(pUri), cUriLength,
             debugstr_w(pLocalName), cocalNameLength);
-    return E_NOTIMPL;
+
+    if(!pUri || !pLocalName || !index) return E_POINTER;
+
+    for(i=0; i<This->nb_attributes; i++)
+    {
+        if(cUriLength!=SysStringLen(This->szURI[i])
+                || cocalNameLength!=SysStringLen(This->szLocalname[i]))
+            continue;
+        if(cUriLength && memcmp(pUri, This->szURI[i],
+                    sizeof(WCHAR)*cUriLength))
+            continue;
+        if(cocalNameLength && memcmp(pLocalName, This->szLocalname[i],
+                    sizeof(WCHAR)*cocalNameLength))
+            continue;
+
+        *index = i;
+        return S_OK;
+    }
+
+    return E_INVALIDARG;
 }
 
 static HRESULT WINAPI isaxattributes_getIndexFromQName(




More information about the wine-cvs mailing list