[Libreoffice-commits] core.git: codemaker/source
Stephan Bergmann
sbergman at redhat.com
Thu Dec 19 07:55:15 PST 2013
codemaker/source/cppumaker/cpputype.cxx | 29 ++++++++++++++++++++++++++---
1 file changed, 26 insertions(+), 3 deletions(-)
New commits:
commit e500b25b08fdab927b987949139588c198edc40b
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Dec 19 16:54:36 2013 +0100
...and support direct calls of non-default ctors, too
Change-Id: I507a5664e642c75f6e9e9fe0c95c97ea76a8e5b3
diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx
index dc5874c..4bd7a98 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -3581,8 +3581,31 @@ void ServiceType::dumpHxxFile(
o << indent() << "try {\n";
inc();
}
- o << indent()
- << "the_instance = ::css::uno::Reference< "
+ o << ("#if defined LO_URE_CURRENT_ENV && defined "
+ "LO_URE_CTOR_ENV_")
+ << name_.replaceAll(".", "_dot_")
+ << " && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_"
+ << name_.replaceAll(".", "_dot_")
+ << ") && defined LO_URE_CTOR_FUN_"
+ << name_.replaceAll(".", "_dot_") << "\n" << indent()
+ << "the_instance = ::css::uno::Reference< " << scopedBaseName
+ << (" >(::css::uno::Reference< ::css::uno::XInterface >("
+ "static_cast< ::css::uno::XInterface * >((*"
+ "LO_URE_CTOR_FUN_")
+ << name_.replaceAll(".", "_dot_")
+ << ")(the_context.get(), ";
+ if (rest) {
+ o << codemaker::cpp::translateUnoToCppIdentifier(
+ u2b(i->parameters.back().name), "param",
+ codemaker::cpp::ITM_NONGLOBAL);
+ } else 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")
+ << indent() << "the_instance = ::css::uno::Reference< "
<< scopedBaseName
<< (" >(the_context->getServiceManager()->"
"createInstanceWithArgumentsAndContext(::rtl::OUString("
@@ -3597,7 +3620,7 @@ void ServiceType::dumpHxxFile(
} else {
o << "the_arguments";
}
- o << ", the_context), ::css::uno::UNO_QUERY);\n";
+ o << ", the_context), ::css::uno::UNO_QUERY);\n#endif\n";
if (!tree.getRoot()->present) {
dec();
o << indent()
More information about the Libreoffice-commits
mailing list