using uno::Reference; using uno::UNO_QUERY; using uno::Any; using uno::Exception; using xforms::XModel2; using frame::XModule; using xforms::XFormsUIHelper1; using com::sun::star::container::XIndexAccess;
// change our module identifier, to be able to have a dedicated UI
Reference< XModule > xModule;
SwDocShell* pShell( GetDocShell() ); if ( pShell )
xModule.set(pShell->GetModel(), css::uno::UNO_QUERY);
OSL_ENSURE( xModule.is(), "SwDoc::initXForms: no XModule at the document!" ); if ( xModule.is() )
xModule->setIdentifier( u"com.sun.star.xforms.XMLFormDocument"_ustr );
// #i113606#, to release the cyclic reference between XFormModel and bindings/submissions. void SwDoc::disposeXForms( )
{ // get XForms models if( !mxXForms.is() ) return;
if( xModel.is() )
{ // ask model for bindings
Reference< XIndexAccess > xBindings(
xModel->getBindings(), UNO_QUERY );
// Then release them one by one int nCount = xBindings->getCount(); for( int i = nCount-1; i >= 0; i-- )
{
xModel->getBindings()->remove(xBindings->getByIndex( i ));
}
// ask model for Submissions
Reference< XIndexAccess > xSubmissions(
xModel->getSubmissions(), UNO_QUERY );
// Then release them one by one
nCount = xSubmissions->getCount(); for( int i = nCount-1; i >= 0; i-- )
{
xModel->getSubmissions()->remove(xSubmissions->getByIndex( i ));
}
}
}
}
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.