crashtesting fix

when doing
    soffice --convert-to ods tdf96952-1.xls

after
    commit 5c79032077
    Date:   Tue May 25 09:32:58 2021 +0200
    fix leaks in loading xmlscript

Change-Id: I55c1e95a09db937604f62a5b33e56349512ff8ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116435
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Noel Grandin
2021-05-31 10:57:33 +02:00
committed by Caolán McNamara
parent 5b8729a741
commit 057b25c04e
2 changed files with 4 additions and 1 deletions

View File

@@ -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<DialogImport> mxDialogImport;
public:
virtual css::uno::Reference< css::xml::input::XElement >
SAL_CALL startChildElement(

View File

@@ -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())