Nikolay Sivov : msxml3/saxreader: Accept disabled "exhaustive-errors" property.
Alexandre Julliard
julliard at winehq.org
Tue Feb 27 17:29:32 CST 2018
Module: wine
Branch: master
Commit: 1d78226f514b3026eea466404afde9bae4e8b72f
URL: https://source.winehq.org/git/wine.git/?a=commit;h=1d78226f514b3026eea466404afde9bae4e8b72f
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Tue Feb 27 01:16:38 2018 +0300
msxml3/saxreader: Accept disabled "exhaustive-errors" property.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/msxml3/saxreader.c | 14 +++++++++++++-
dlls/msxml3/tests/saxreader.c | 14 ++++++++++++++
2 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c
index e8d5b27..05c774b 100644
--- a/dlls/msxml3/saxreader.c
+++ b/dlls/msxml3/saxreader.c
@@ -100,6 +100,10 @@ static const WCHAR FeatureNamespacePrefixesW[] = {
'/','n','a','m','e','s','p','a','c','e','-','p','r','e','f','i','x','e','s',0
};
+static const WCHAR ExhaustiveErrorsW[] = {
+ 'e','x','h','a','u','s','t','i','v','e','-','e','r','r','o','r','s',0
+};
+
struct saxreader_feature_pair
{
saxreader_feature feature;
@@ -107,6 +111,7 @@ struct saxreader_feature_pair
};
static const struct saxreader_feature_pair saxreader_feature_map[] = {
+ { ExhaustiveErrors, ExhaustiveErrorsW },
{ ExternalGeneralEntities, FeatureExternalGeneralEntitiesW },
{ ExternalParameterEntities, FeatureExternalParameterEntitiesW },
{ LexicalHandlerParEntities, FeatureLexicalHandlerParEntitiesW },
@@ -3216,7 +3221,13 @@ static HRESULT WINAPI isaxxmlreader_getFeature(
TRACE("(%p)->(%s %p)\n", This, debugstr_w(feature_name), value);
feature = get_saxreader_feature(feature_name);
- if (feature == Namespaces || feature == NamespacePrefixes)
+
+ if (This->version < MSXML4 && feature == ExhaustiveErrors)
+ return E_INVALIDARG;
+
+ if (feature == Namespaces ||
+ feature == NamespacePrefixes ||
+ feature == ExhaustiveErrors)
return get_feature_value(This, feature, value);
FIXME("(%p)->(%s %p) stub\n", This, debugstr_w(feature_name), value);
@@ -3238,6 +3249,7 @@ static HRESULT WINAPI isaxxmlreader_putFeature(
/* accepted cases */
if ((feature == ExternalGeneralEntities && value == VARIANT_FALSE) ||
(feature == ExternalParameterEntities && value == VARIANT_FALSE) ||
+ (feature == ExhaustiveErrors && value == VARIANT_FALSE) ||
feature == Namespaces ||
feature == NamespacePrefixes)
{
diff --git a/dlls/msxml3/tests/saxreader.c b/dlls/msxml3/tests/saxreader.c
index 9ebed62..29492fa 100644
--- a/dlls/msxml3/tests/saxreader.c
+++ b/dlls/msxml3/tests/saxreader.c
@@ -2789,6 +2789,20 @@ static void test_saxreader_features(void)
continue;
}
+ value = VARIANT_TRUE;
+ hr = ISAXXMLReader_getFeature(reader, _bstr_("exhaustive-errors"), &value);
+ if (IsEqualGUID(entry->guid, &CLSID_SAXXMLReader40) ||
+ IsEqualGUID(entry->guid, &CLSID_SAXXMLReader60))
+ {
+ ok(hr == S_OK, "Failed to get feature value, hr %#x.\n", hr);
+ ok(value == VARIANT_FALSE, "Unexpected default feature value.\n");
+
+ hr = ISAXXMLReader_putFeature(reader, _bstr_("exhaustive-errors"), VARIANT_FALSE);
+ ok(hr == S_OK, "Failed to put feature value, hr %#x.\n", hr);
+ }
+ else
+ ok(hr == E_INVALIDARG, "Unexpected return value %#x.\n", hr);
+
name = feature_names;
while (*name)
{
More information about the wine-cvs
mailing list