Otherwise new elements have to be constructed to match the type
prescribed by the element template of this set. Such elements can be created
using interfaces ::com::sun::star::lang::XSingleServiceFactory
and, if supported, ::com::sun::star::lang::XMultiServiceFactory.
Objects to be inserted must not be contained in any set at the time of
insertion. ::com::sun::star::container::XChild::getParent()
must return NULL. If a name had been assigned to the object prior to insertion
(using ::com::sun::star::container::XNamed::setName()
or by other means), this name is ignored and will be lost.
After insertion the name of the object is the name that was used as argument
to ::com::sun::star::container::XNameContainer::insertByName()
or ::com::sun::star::container::XNameContainer::replaceByName().
An implementation need not support insertion of objects that were not
obtained in one of the ways described above. If it does, the implementation
must reject elements that do not have the correct structure as described
by the template.
allows creating an object that can be inserted into this set. [conditional]
This interface shall be implemented by an implementation,
if and only if the element type of the set, as returned by
::com::sun::star::container::XElementAccess::getElementType(),
is an object type, such as an interface.
Using ::com::sun::star::lang::XSingleServiceFactory::createInstance()
an instance of the element template of this set is created. If the set
supports multiple templates or variations of the basic template, a default
variant of the basic template is instantiated. If an implementation supports
variations, they may be specified by passing arguments to
::com::sun::star::lang::XSingleServiceFactory::createInstanceWithArguments().
There are no predefined arguments for all versions of this service.
allows creating various objects that can be inserted into this set. [optional]
This interface may be implemented by an implementation of
service SetUpdate to support creating elements from other than
the basic element template. An example of this would be an
implementation that supports inheritance, allowing the use of
templates derived from the basic template by extension.
This interface may only be implemented if the element type of the set
(as returned by
::com::sun::star::container::XElementAccess::getElementType())
is an object type, such as an interface. An implementation should also implement
interface XTemplateContainer which is optional in this service.