If you need read access to the forms collection, then you might check
the existence of forms using hasForms , and if it returns
false , you can do as if ::com::sun::star::form::XFormsSupplier::getForms would
have returned an empty container.
Semantically, hasForms is equivalent to calling
::XElementAccess::hasElements on the container returned by
::com::sun::star::form::XFormsSupplier::getForms . But when using the latter, the
implementation is forced to create a empty container, which might be potentially
expensive.