using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::XInterface; using ::com::sun::star::uno::UNO_QUERY; using ::com::sun::star::uno::Any; using ::com::sun::star::uno::Sequence; using ::com::sun::star::beans::NamedValue; using ::com::sun::star::beans::PropertyValue; using ::com::sun::star::lang::XInitialization;
// to mimic the behaviour of the default factory's createInstanceWithArguments, we initialize // the object with the given arguments, stripped by the three special ones
Sequence< Any > aStrippedArguments( _rArguments.getLength() );
Any* pStrippedArgs = aStrippedArguments.getArray();
Any* pStrippedArgsEnd = ::std::remove_copy_if(
_rArguments.begin(),
_rArguments.end(),
pStrippedArgs,
IsSpecialArgument()
);
aStrippedArguments.realloc( pStrippedArgsEnd - pStrippedArgs );
if ( aStrippedArguments.hasElements() )
{
Reference< XInitialization > xModelInit( xInstance, UNO_QUERY );
OSL_ENSURE( xModelInit.is(), "SfxModelFactory::createInstanceWithArguments: no XInitialization!" ); if ( xModelInit.is() )
xModelInit->initialize( aStrippedArguments );
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.