summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-06-07 04:34:10 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-06-07 04:34:10 +0200
commit044be7107a97169e80360c79a9d07bec263ac818 (patch)
tree08ddae8d741e2c0177a153e518fba1fca8901b78
parent4c3b36073ae542fc5a8ccffa685a4105525b3394 (diff)
Revert "Make sure to dispose services supporting the XComponent protocol"
This reverts commit 4cacc6080e61374fd573fffb3bc2a54968c1b61a.
-rw-r--r--postprocess/qa/services.cxx19
1 files changed, 1 insertions, 18 deletions
diff --git a/postprocess/qa/services.cxx b/postprocess/qa/services.cxx
index 2d29e918a420..c9d30f4f1031 100644
--- a/postprocess/qa/services.cxx
+++ b/postprocess/qa/services.cxx
@@ -9,10 +9,7 @@
#include <sal/config.h>
-#include <vector>
-
#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
-#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/reflection/XServiceConstructorDescription.hpp>
#include <com/sun/star/reflection/XServiceTypeDescription2.hpp>
#include <test/bootstrapfixture.hxx>
@@ -40,7 +37,6 @@ void ServicesTest::test()
"/singletons/com.sun.star.reflection.theTypeDescriptionManager"),
UNO_QUERY_THROW );
Sequence<OUString> s = m_xContext->getServiceManager()->getAvailableServiceNames();
- std::vector< css::uno::Reference<css::lang::XComponent> > comps;
for (sal_Int32 i = 0; i < s.getLength(); i++)
{
if (!xTypeManager->hasByHierarchicalName(s[i]))
@@ -58,13 +54,12 @@ void ServicesTest::test()
Sequence< Reference< XServiceConstructorDescription > > xseq = xDesc->getConstructors();
for (sal_Int32 c = 0; c < xseq.getLength(); c++)
if (!xseq[c]->getParameters().hasElements())
- {
- Reference< XInterface > instance;
try
{
OString message = OUStringToOString(s[i], RTL_TEXTENCODING_UTF8);
bool bDefConstructor = xseq[c]->isDefaultConstructor();
Reference< css::lang::XMultiComponentFactory > serviceManager = m_xContext->getServiceManager();
+ Reference< XInterface > instance;
if( bDefConstructor )
instance = serviceManager->createInstanceWithContext(s[i], m_xContext);
@@ -80,18 +75,6 @@ void ServicesTest::test()
OUStringToOString(s[i] + ": " + e.Message, RTL_TEXTENCODING_UTF8);
CPPUNIT_FAIL(exc.getStr());
}
- css::uno::Reference<css::lang::XComponent> comp(
- instance, css::uno::UNO_QUERY);
- if (comp.is()) {
- comps.push_back(comp);
- }
- }
- }
- for (std::vector< css::uno::Reference<css::lang::XComponent> >::iterator i(
- comps.begin());
- i != comps.end(); ++i)
- {
- (*i)->dispose();
}
}