diff --git a/xmlscript/source/xmldlg_imexp/imp_share.hxx b/xmlscript/source/xmldlg_imexp/imp_share.hxx index 99a52b58dcb1..2cc574c01b93 100644 --- a/xmlscript/source/xmldlg_imexp/imp_share.hxx +++ b/xmlscript/source/xmldlg_imexp/imp_share.hxx @@ -531,6 +531,8 @@ public: class BulletinBoardElement : public ControlElement { + // we are the owner of this, so have to keep a reference to it + rtl::Reference mxDialogImport; public: virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement( diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx index da2fd2d2c412..66a69a2b5518 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx @@ -1725,7 +1725,8 @@ BulletinBoardElement::BulletinBoardElement( OUString const & rLocalName, Reference< xml::input::XAttributes > const & xAttributes, ElementBase * pParent, DialogImport * pImport ) - : ControlElement( rLocalName, xAttributes, pParent, pImport ) + : ControlElement( rLocalName, xAttributes, pParent, pImport ), + mxDialogImport(pImport) { OUString aValue( _xAttributes->getValueByUidName( m_pImport->XMLNS_DIALOGS_UID, "left" ) ); if (!aValue.isEmpty())