Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
a81d22d4
Commit
a81d22d4
authored
Jan 22, 2008
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Jan 22, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Implement IXMLDOMEntityReference interface.
parent
3dfaef37
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
67 additions
and
2 deletions
+67
-2
Makefile.in
dlls/msxml3/Makefile.in
+1
-0
domdoc.c
dlls/msxml3/domdoc.c
+23
-2
entityref.c
dlls/msxml3/entityref.c
+0
-0
msxml_private.h
dlls/msxml3/msxml_private.h
+1
-0
domdoc.c
dlls/msxml3/tests/domdoc.c
+42
-0
No files found.
dlls/msxml3/Makefile.in
View file @
a81d22d4
...
...
@@ -16,6 +16,7 @@ C_SRCS = \
domdoc.c
\
domimpl.c
\
element.c
\
entityref.c
\
factory.c
\
main.c
\
node.c
\
...
...
dlls/msxml3/domdoc.c
View file @
a81d22d4
...
...
@@ -1074,8 +1074,29 @@ static HRESULT WINAPI domdoc_createEntityReference(
BSTR
name
,
IXMLDOMEntityReference
**
entityRef
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
domdoc
*
This
=
impl_from_IXMLDOMDocument2
(
iface
);
xmlNodePtr
xmlnode
;
xmlChar
*
xml_name
;
TRACE
(
"%p
\n
"
,
iface
);
if
(
!
entityRef
)
return
E_INVALIDARG
;
*
entityRef
=
NULL
;
xml_name
=
xmlChar_from_wchar
((
WCHAR
*
)
name
);
xmlnode
=
xmlNewReference
(
get_doc
(
This
),
xml_name
);
HeapFree
(
GetProcessHeap
(),
0
,
xml_name
);
if
(
!
xmlnode
)
return
E_FAIL
;
xmlnode
->
doc
=
get_doc
(
This
);
*
entityRef
=
(
IXMLDOMEntityReference
*
)
create_doc_entity_ref
(
xmlnode
);
return
S_OK
;
}
...
...
dlls/msxml3/entityref.c
0 → 100644
View file @
a81d22d4
This diff is collapsed.
Click to expand it.
dlls/msxml3/msxml_private.h
View file @
a81d22d4
...
...
@@ -46,6 +46,7 @@ extern IXMLDOMNodeList *create_children_nodelist( xmlNodePtr );
extern
IXMLDOMNamedNodeMap
*
create_nodemap
(
IXMLDOMNode
*
node
);
extern
IUnknown
*
create_doc_Implementation
();
extern
IUnknown
*
create_doc_fragment
(
xmlNodePtr
fragment
);
extern
IUnknown
*
create_doc_entity_ref
(
xmlNodePtr
entity
);
extern
HRESULT
queryresult_create
(
xmlNodePtr
,
LPWSTR
,
IXMLDOMNodeList
**
);
...
...
dlls/msxml3/tests/domdoc.c
View file @
a81d22d4
...
...
@@ -156,6 +156,9 @@ static WCHAR szCDataXML[] = {'<','!','[','C','D','A','T','A','[','[','1',']','*'
static
WCHAR
szCDataNodeText
[]
=
{
'#'
,
'c'
,
'd'
,
'a'
,
't'
,
'a'
,
'-'
,
's'
,
'e'
,
'c'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
static
WCHAR
szDocFragmentText
[]
=
{
'#'
,
'd'
,
'o'
,
'c'
,
'u'
,
'm'
,
'e'
,
'n'
,
't'
,
'-'
,
'f'
,
'r'
,
'a'
,
'g'
,
'm'
,
'e'
,
'n'
,
't'
,
0
};
static
WCHAR
szEntityRef
[]
=
{
'E'
,
'n'
,
't'
,
'i'
,
't'
,
'y'
,
'r'
,
'e'
,
'f'
,
0
};
static
WCHAR
szEntityRefXML
[]
=
{
'&'
,
'e'
,
'n'
,
't'
,
'i'
,
't'
,
'y'
,
'r'
,
'e'
,
'f'
,
';'
,
0
};
#define expect_bstr_eq_and_free(bstr, expect) { \
BSTR bstrExp = alloc_str_from_narrow(expect); \
ok(lstrcmpW(bstr, bstrExp) == 0, "String differs\n"); \
...
...
@@ -1875,6 +1878,7 @@ static void test_xmlTypes(void)
IXMLDOMCDATASection
*
pCDataSec
;
IXMLDOMImplementation
*
pIXMLDOMImplementation
=
NULL
;
IXMLDOMDocumentFragment
*
pDocFrag
=
NULL
;
IXMLDOMEntityReference
*
pEntityRef
=
NULL
;
BSTR
str
;
IXMLDOMNode
*
pNextChild
=
(
IXMLDOMNode
*
)
0x1
;
/* Used for testing Siblings */
VARIANT
v
;
...
...
@@ -2259,8 +2263,46 @@ static void test_xmlTypes(void)
IXMLDOMDocumentFragment_Release
(
pCDataSec
);
}
/* Entity References */
hr
=
IXMLDOMDocument_createEntityReference
(
doc
,
szEntityRef
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"ret %08x
\n
"
,
hr
);
hr
=
IXMLDOMDocument_createEntityReference
(
doc
,
szEntityRef
,
&
pEntityRef
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
hr
=
IXMLDOMElement_appendChild
(
pRoot
,
(
IXMLDOMNode
*
)
pEntityRef
,
NULL
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
/* get Attribute Tests */
hr
=
IXMLDOMEntityReference_get_attributes
(
pEntityRef
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"ret %08x
\n
"
,
hr
);
pAttribs
=
(
IXMLDOMNamedNodeMap
*
)
0x1
;
hr
=
IXMLDOMEntityReference_get_attributes
(
pEntityRef
,
&
pAttribs
);
ok
(
hr
==
S_FALSE
,
"ret %08x
\n
"
,
hr
);
ok
(
pAttribs
==
NULL
,
"pAttribs != NULL
\n
"
);
/* test dataType */
hr
=
IXMLDOMEntityReference_get_dataType
(
pEntityRef
,
&
v
);
ok
(
hr
==
S_FALSE
,
"ret %08x
\n
"
,
hr
);
ok
(
V_VT
(
&
v
)
==
VT_NULL
,
"incorrect dataType type
\n
"
);
VariantClear
(
&
v
);
/* test nodeTypeString */
hr
=
IXMLDOMEntityReference_get_nodeTypeString
(
pEntityRef
,
&
str
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
str
,
_bstr_
(
"entityreference"
)
),
"incorrect nodeTypeString string
\n
"
);
SysFreeString
(
str
);
/* test get_xml*/
hr
=
IXMLDOMEntityReference_get_xml
(
pEntityRef
,
&
str
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
todo_wine
ok
(
!
lstrcmpW
(
str
,
szEntityRefXML
),
"incorrect xml string
\n
"
);
SysFreeString
(
str
);
IXMLDOMEntityReference_Release
(
pEntityRef
);
}
IXMLDOMElement_Release
(
pRoot
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment