diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-01-17 11:25:25 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-01-18 17:02:35 +0100 |
commit | a0ada918c12f4ad9fed4133d6bef8c3fe219cd28 (patch) | |
tree | 2c94bb30e83b654da716b3c37e4b6f0699fd7f9d /codemaker | |
parent | d185daec6814ff3179ce7ef4242952505f98fa19 (diff) |
Initialize also implementations created directly by generated function.
This was forgotten in commit bdeb57c23973f3ef79020847b2fe39f312cf3c0b.
Change-Id: Idd339222e3c464abc2524f78f16c8fe0a02dcd5b
Diffstat (limited to 'codemaker')
-rw-r--r-- | codemaker/source/cppumaker/cpputype.cxx | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx index 4bd7a9856f7a..accb1d18b2d2 100644 --- a/codemaker/source/cppumaker/cpputype.cxx +++ b/codemaker/source/cppumaker/cpputype.cxx @@ -3357,6 +3357,7 @@ void ServiceType::dumpHxxFile( includes.addReference(); includes.addRtlUstringH(); includes.addRtlUstringHxx(); + includes.add("com.sun.star.lang.XInitialization"); includes.add("com.sun.star.uno.DeploymentException"); includes.add("com.sun.star.uno.XComponentContext"); for (std::vector< @@ -3460,7 +3461,7 @@ void ServiceType::dumpHxxFile( "LO_URE_CTOR_FUN_") << name_.replaceAll(".", "_dot_") << (")(the_context.get(), ::css::uno::Sequence<" - " ::css::uno::Any >().get())), ::SAL_NO_ACQUIRE)," + " ::css::uno::Any >())), ::SAL_NO_ACQUIRE)," " ::css::uno::UNO_QUERY);\n#else\n") << indent() << "the_instance = ::css::uno::Reference< " << scopedBaseName @@ -3599,12 +3600,22 @@ void ServiceType::dumpHxxFile( u2b(i->parameters.back().name), "param", codemaker::cpp::ITM_NONGLOBAL); } else if (i->parameters.empty()) { - o << ("::css::uno::Sequence< ::css::uno::Any >()"); + o << "::css::uno::Sequence< ::css::uno::Any >()"; + } else { + o << "the_arguments"; + } + o << ")), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY);\n" << indent() + << ("::css::uno::Reference< ::css::lang::XInitialization > " + "init(the_instance, ::css::uno::UNO_QUERY);\n") + << indent() << "if (init.is()) {\n" + << indent() << " init->initialize("; + if (i->parameters.empty()) { + o << "::css::uno::Sequence< ::css::uno::Any >()"; } else { o << "the_arguments"; } - o << (".get())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY);\n" - "#else\n") + o << ");\n" << indent() << "}\n"; + o << ("#else\n") << indent() << "the_instance = ::css::uno::Reference< " << scopedBaseName << (" >(the_context->getServiceManager()->" |