Commit Graph

1596 Commits

Author SHA1 Message Date
Damjan Jovanovic 06cd8d3d2e msxml3: Return S_FALSE from IXMLDOMNamedNodeMap::nextNode() when there are no attributes.
Currently Wine return S_FALSE when IXMLDOMNamedNodeMap::nextNode()
has run out of attributes to return, but when an XML node has no
attributes at all, it returns S_OK despite setting the nextNode
output parameter to NULL, causing the caller to crash when it
accesses this pointer. Return S_FALSE in this case instead.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50603
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-22 17:57:47 +02:00
Damjan Jovanovic b5f3b8d07f msxml3/tests: Add some regex tests.
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-04 10:19:42 +02:00
Jefferson Carpenter 653504a3ca msxml3: Null check newNode in domelem insertBefore.
Signed-off-by: Jefferson Carpenter <jeffersoncarpenter2@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-31 23:00:29 +02:00
Jefferson Carpenter ec867bc428 msxml3: Null check newChild in DOMDocument insertBefore.
Signed-off-by: Jefferson Carpenter <jeffersoncarpenter2@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-31 23:00:21 +02:00
Dmitry Timoshkov 2ea0d5470e msxml3: When saving XML use encoding specified in the processing instruction.
Otherwise when a PI node with not default encoding is assigned to
a document then saving an XML leads to document being encoded as
UTF-8 while XML declaration has what PI specifies.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-31 17:43:00 +02:00
Dmitry Timoshkov a39df8bb61 msxml3: Implement IXMLDOMNamedNodeMap::getNamedItem() for a processing instruction node.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-31 17:42:58 +02:00
Dmitry Timoshkov 769aac0021 msxml3: Implement ::get_attributes() for "xml" processing instruction node.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-31 17:42:55 +02:00
Dmitry Timoshkov 13b1e36de0 msxml3: IVBSAXContentHandler::startElement() should also check *namespaceURI for NULL.
Like ISAXContentHandler::startElement() does.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-21 18:11:06 +02:00
Dmitry Timoshkov bbfa8d17f8 msxml3/tests: Add some tests for IVBSAXContentHandler::startElement() and IVBSAXContentHandler::endElement().
These are mostly a copy of ISAXContentHandler::startElement() and
ISAXContentHandler::endElement() tests.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-21 18:11:04 +02:00
Dmitry Timoshkov d7ce5bddf9 msxml3/tests: Execute ProcessingInstruction tests before other tests to avoid crashes under 64-bit Windows.
It seems that the ProcessingInstruction tests somehow trigger internal inconsistency
in 64-bit msxml under Windows, and I haven't found other ways to stop crashes on exit.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-19 10:36:31 +02:00
Dmitry Timoshkov a0dd105c65 msxml3/tests: Add more tests for processing instruction attributes.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-07 22:34:32 +02:00
Dmitry Timoshkov ee49f13ab2 msxml3/tests: Don't '\0' terminate output after ::save().
This fixes heap corruption when running the domdoc tests.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-07 22:34:06 +02:00
Francois Gouget 0e87427500 msxml3: Refcount the domdoc/xmldoc properties.
Multiple domdoc and xmlDoc objects may need to share a common
properties object but may be released independently. So add a
reference count on the properties object.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=43377
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-06 19:49:54 +02:00
Alexandre Julliard 5d82baf974 winecrt0: Add a default implementation DllRegisterServer()/DllUnregisterServer().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-30 22:59:50 +02:00
Alexandre Julliard bd6b53740c winecrt0: Add a default implementation for DllCanUnloadNow().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-30 22:59:50 +02:00
Dmitry Timoshkov b896230547 msxml3: Don't unlink the XML declaration when saving document.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-23 20:02:06 +02:00
Dmitry Timoshkov 875b8a598f msxml3/tests: Add a test for saving XML with not default encoding.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-05 15:07:39 +02:00
Jefferson Carpenter eca796bf75 msxml3/tests: Test mxwriter domdoc output.
Signed-off-by: Jefferson Carpenter <jeffersoncarpenter2@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-24 22:01:42 +01:00
Jefferson Carpenter 433b9081ba msxml3: Fold in reset_output_buffer.
Signed-off-by: Jefferson Carpenter <jeffersoncarpenter2@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-02 22:32:25 +01:00
Francois Gouget 251a2b955a msxml3/tests: Fix the spelling of a test string.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-30 21:36:12 +01:00
Alexandre Julliard a75cc9e626 msxml3: Only allow ASCII characters in number conversion.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-27 15:57:07 +01:00
Alexandre Julliard b00e2df3e8 msxml3: Clear one extra variant in collection enumeration.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-27 11:37:10 +01:00
Daniel Lehman 4610dc7920 msxml3: Support ISequentialStream in domdoc_transformNodeToObject.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-25 21:39:18 +01:00
Michael Stefaniuc 21ca8e1648 msxml3/tests: Use wide-char string literals.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-28 20:36:26 +01:00
Nikolay Sivov e5c87396b1 msxml3/tests: Use wide string literals in tests.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-06 11:56:55 +02:00
Nikolay Sivov 44705156b5 msxml3/tests: Fix tests failures with unreachable network resources.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-05 20:51:25 +02:00
Nikolay Sivov 20e36dcb1b msxml3/tests: Use wide string literals in more tests.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-05 20:51:23 +02:00
Daniel Lehman 38844dc31e msxml3: Handle namespaces in removeNamedItem.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-05 20:51:16 +02:00
Daniel Lehman f726691bdc msxml3/tests: Add some removeNamedItem tests.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-05 20:51:14 +02:00
Gijs Vermeulen 49eac508b5 msxml3: Support retrieving more than one element in IEnumVARIANT::Next() for IXMLElementCollection.
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-16 17:13:50 +02:00
Gijs Vermeulen 4ad0e7485d msxml3: Support Reset() for IEnumVARIANTs created by create_enumvariant.
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-16 17:13:50 +02:00
Gijs Vermeulen fa466d13a7 msxml3/tests: Add more iteration tests for IXMLDOMNamedNodeMap, IXMLDOMSchemaCollection and IXMLDOMNodeList.
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-16 17:13:50 +02:00
Alexandre Abgrall 72f42516b2 msxml3: Fix value of 'fetched' in IEnumVARIANT::Next() for IXMLDOMSelection.
It must be the number of elements returned in 'var', as specified here:
https://docs.microsoft.com/en-us/windows/win32/api/oaidl/nf-oaidl-ienumvariant-next

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=40430
Signed-off-by: Alexandre Abgrall <aabgrall98@gmail.com>
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-15 21:30:27 +02:00
Alistair Leslie-Hughes ca937890a5 include: Remove coclasses that don't belong to msxml6.idl.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-14 19:42:40 +02:00
Yongjie Yao 9336ec8faf msxml3: Fix a memory leak (Valgrind).
Signed-off-by: Yongjie Yao <yaoyongjie@uniontech.com>
Signed-off-by: Myah Caron <qsniyg@protonmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-14 19:42:40 +02:00
Nikolay Sivov 007df5deed msxml3/tests: Remove traces.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-14 18:27:59 +02:00
Dmitry Timoshkov f62b05dadd msxml3: Use site's base URI when loading an XML file.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-09 09:52:45 +02:00
Dmitry Timoshkov 25abcac61a msxml3: IXMLDOMDocument2's ::SetSite implementation should query site for base URI.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-09 09:52:42 +02:00
Dmitry Timoshkov f9920d27b3 msxml3/tests: Add some tests for XML loading with site assigned.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-09 09:52:40 +02:00
Daniel Lehman da3893fe48 msxml3: Set internal error on loading from IPersistStream.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-08 16:06:06 +02:00
Daniel Lehman 50650c26fe msxml3: Set internal error on loading from IStream.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-08 16:06:06 +02:00
Hans Leidekker 0bec5dfeec msxml3: Add support for 'int' in IXMLDOMElement_put_dataType.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-23 10:12:11 +02:00
Hans Leidekker 608a7f94e8 msxml3: Update version resource.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-05 20:53:02 +02:00
Alexandre Julliard 7814da1fd4 msxml3: Use standard dlopen() instead of the libwine wrappers.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-06 21:21:42 +02:00
Dmitry Timoshkov 3d37d45ed0 msxml3: Add support for windows-125x encodings to IMXWriter::put_encoding().
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-24 12:35:38 +01:00
Michael Stefaniuc 8b8460de07 msxml3/tests: Just use a wchar string literal instead of _bstr_().
lstrcmpW and memcmp can deal just fine with WCHAR* and don't need
a BSTR.

Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-18 20:29:09 +01:00
Michael Stefaniuc 077224622d msxml3/tests: Get rid of a2bstr().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-18 20:29:07 +01:00
Jacek Caban c041605b00 guiddef.h: Remove GUID_NULL declaration.
It's declared in cguid.h with proper extern "C".

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-04 21:30:27 +01:00
Daniel Lehman e31469eb58 msxml3/tests: Fix copy & paste in traces.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-24 17:15:54 +01:00
Francois Gouget 280cbcb28a msxml3: Fix the spelling of some comments.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-12 23:17:05 +01:00