diff options
author | sb <sb@openoffice.org> | 2010-01-22 13:45:34 +0100 |
---|---|---|
committer | sb <sb@openoffice.org> | 2010-01-22 13:45:34 +0100 |
commit | d14751f481c930e03ef20ea4a8d595a6a52e4c8d (patch) | |
tree | 10603b0e88abbbd0433e5dfae35c9aae7750331c /configmgr | |
parent | 3b93777f4c7db1d4c3acedd6201aac7bc5956b68 (diff) |
sb111: #i100548# ignore data w/o matching schema during Components::parseModificationLayer
Diffstat (limited to 'configmgr')
-rw-r--r-- | configmgr/source/xcuparser.cxx | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/configmgr/source/xcuparser.cxx b/configmgr/source/xcuparser.cxx index 13b61e0a4e68..d7a1e3da1b6f 100644 --- a/configmgr/source/xcuparser.cxx +++ b/configmgr/source/xcuparser.cxx @@ -385,17 +385,25 @@ void XcuParser::handleItem(XmlReader & reader) { reader.getUrl()), css::uno::Reference< css::uno::XInterface >()); } + rtl::OUString path(xmldata::convertFromUtf8(attrPath)); int finalizedLayer; rtl::Reference< Node > node( data_->resolvePathRepresentation( - xmldata::convertFromUtf8(attrPath), &modificationPath_, - &finalizedLayer)); + path, &modificationPath_, &finalizedLayer)); if (!node.is()) { - throw css::uno::RuntimeException( - (rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("nonexisting path attribute in ")) + - reader.getUrl()), - css::uno::Reference< css::uno::XInterface >()); + //TODO: Within Components::parseModificationLayer (but only there) it + // can rightly happen that data is read that does not match a schema + // (that no schema exists, or that the schema specifies a different + // type), namely if the schema was brought along by an extension that + // has been removed or replaced; instead of taking care of that at all + // the relevant places, as a hack, only "top-level" <item>s (that only + // appear in modification layer data) with unknown path are filtered out + // here. + OSL_TRACE( + "configmgr unknown <item path=\"%s\">", + rtl::OUStringToOString(path, RTL_TEXTENCODING_UTF8).getStr()); + state_.push(State()); // ignored + return; } OSL_ASSERT(!modificationPath_.empty()); componentName_ = modificationPath_.front(); |