forked from amazingfate/loongoffice
Minimize the constructor functions to a bare minimum.
Most of the constructors are supposed to be only a call of new TheInstance(arguments) or an equivalent; so let's just change the constructor caller accordingly, to accept unacquired new instance. If there are exceptions that need to do more heavy lifting, they do not have to use the constructor feature, or there can be a wrapper for the real implementation, doing the additional work in their (C++) constructor. Change-Id: I035c378778aeda60d15af4e56ca3761c586d5ded
This commit is contained in:
@ -3463,7 +3463,7 @@ void ServiceType::dumpHxxFile(
|
||||
"LO_URE_CTOR_FUN_")
|
||||
<< name_.replaceAll(".", "_dot_")
|
||||
<< (")(the_context.get(), ::css::uno::Sequence<"
|
||||
" ::css::uno::Any >())), ::SAL_NO_ACQUIRE),"
|
||||
" ::css::uno::Any >()))),"
|
||||
" ::css::uno::UNO_QUERY);\n#else\n")
|
||||
<< indent() << "the_instance = ::css::uno::Reference< "
|
||||
<< scopedBaseName
|
||||
@ -3606,7 +3606,7 @@ void ServiceType::dumpHxxFile(
|
||||
} else {
|
||||
o << "the_arguments";
|
||||
}
|
||||
o << ")), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY);\n" << indent()
|
||||
o << "))), ::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"
|
||||
|
||||
Reference in New Issue
Block a user