Kaydet (Commit) 136983d1 authored tarafından sb's avatar sb

sb129: #i113189# removed obviously unnecessary service registrations; allow empty <implementation/>

üst e21f2f0f
...@@ -194,21 +194,13 @@ Parser::Parser(rtl::OUString const & uri, rtl::Reference< Data > const & data): ...@@ -194,21 +194,13 @@ Parser::Parser(rtl::OUString const & uri, rtl::Reference< Data > const & data):
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
": unexpected item in <component>"))), ": unexpected item in <component>"))),
css::uno::Reference< css::uno::XInterface >()); css::uno::Reference< css::uno::XInterface >());
case STATE_IMPLEMENTATION_INITIAL:
case STATE_IMPLEMENTATION_SERVICE: case STATE_IMPLEMENTATION_SERVICE:
case STATE_IMPLEMENTATION_SINGLETON: case STATE_IMPLEMENTATION_SINGLETON:
if (res == xmlreader::XmlReader::RESULT_END) { if (res == xmlreader::XmlReader::RESULT_END) {
state = STATE_COMPONENT; state = STATE_COMPONENT;
break; break;
} }
if (res == xmlreader::XmlReader::RESULT_BEGIN && nsId == ucNsId &&
name.equals(RTL_CONSTASCII_STRINGPARAM("singleton")))
{
handleSingleton();
state = STATE_SINGLETON;
break;
}
// fall through
case STATE_IMPLEMENTATION_INITIAL:
if (state != STATE_IMPLEMENTATION_SINGLETON && if (state != STATE_IMPLEMENTATION_SINGLETON &&
res == xmlreader::XmlReader::RESULT_BEGIN && nsId == ucNsId && res == xmlreader::XmlReader::RESULT_BEGIN && nsId == ucNsId &&
name.equals(RTL_CONSTASCII_STRINGPARAM("service"))) name.equals(RTL_CONSTASCII_STRINGPARAM("service")))
...@@ -217,6 +209,14 @@ Parser::Parser(rtl::OUString const & uri, rtl::Reference< Data > const & data): ...@@ -217,6 +209,14 @@ Parser::Parser(rtl::OUString const & uri, rtl::Reference< Data > const & data):
state = STATE_SERVICE; state = STATE_SERVICE;
break; break;
} }
if (state != STATE_IMPLEMENTATION_INITIAL &&
res == xmlreader::XmlReader::RESULT_BEGIN && nsId == ucNsId &&
name.equals(RTL_CONSTASCII_STRINGPARAM("singleton")))
{
handleSingleton();
state = STATE_SINGLETON;
break;
}
throw css::registry::InvalidRegistryException( throw css::registry::InvalidRegistryException(
(reader_.getUrl() + (reader_.getUrl() +
rtl::OUString( rtl::OUString(
......
...@@ -38,16 +38,12 @@ ...@@ -38,16 +38,12 @@
<service name="com.sun.star.registry.NestedRegistry"/> <service name="com.sun.star.registry.NestedRegistry"/>
</implementation> </implementation>
<implementation name="com.sun.star.comp.stoc.ORegistryServiceManager"> <implementation name="com.sun.star.comp.stoc.ORegistryServiceManager">
<service name="com.sun.star.lang.MultiServiceFactory"/>
<service name="com.sun.star.lang.RegistryServiceManager"/> <service name="com.sun.star.lang.RegistryServiceManager"/>
</implementation> </implementation>
<implementation name="com.sun.star.comp.stoc.OServiceManager"> <implementation name="com.sun.star.comp.stoc.OServiceManager">
<service name="com.sun.star.lang.MultiServiceFactory"/>
<service name="com.sun.star.lang.ServiceManager"/> <service name="com.sun.star.lang.ServiceManager"/>
</implementation> </implementation>
<implementation name="com.sun.star.comp.stoc.OServiceManagerWrapper"> <implementation name="com.sun.star.comp.stoc.OServiceManagerWrapper"/>
<service name="com.sun.star.lang.MultiServiceFactory"/>
</implementation>
<implementation name="com.sun.star.comp.stoc.RegistryTypeDescriptionProvider"> <implementation name="com.sun.star.comp.stoc.RegistryTypeDescriptionProvider">
<service name="com.sun.star.reflection.TypeDescriptionProvider"/> <service name="com.sun.star.reflection.TypeDescriptionProvider"/>
</implementation> </implementation>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment