From de9172871b29cea2fddbce9d5c55730f6d64754b Mon Sep 17 00:00:00 2001 From: sb Date: Wed, 28 Jul 2010 13:01:55 +0200 Subject: fwk152: #i113454# accept broken .xcs files containing empty --- configmgr/source/xcsparser.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'configmgr/source') diff --git a/configmgr/source/xcsparser.cxx b/configmgr/source/xcsparser.cxx index 79e122759fc8..37b46494c6a7 100644 --- a/configmgr/source/xcsparser.cxx +++ b/configmgr/source/xcsparser.cxx @@ -321,15 +321,19 @@ void XcsParser::endElement(XmlReader const & reader) { } else { switch (state_) { case STATE_COMPONENT_SCHEMA: + // To support old, broken extensions with .xcs files that contain + // empty elements: + state_ = STATE_COMPONENT_DONE; + break; + case STATE_TEMPLATES: + state_ = STATE_TEMPLATES_DONE; + break; case STATE_TEMPLATES_DONE: throw css::uno::RuntimeException( (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("no component element in ")) + reader.getUrl()), css::uno::Reference< css::uno::XInterface >()); - case STATE_TEMPLATES: - state_ = STATE_TEMPLATES_DONE; - break; case STATE_COMPONENT_DONE: break; default: -- cgit v1.2.3