Kaydet (Commit) 505a062b authored tarafından Caolán McNamara's avatar Caolán McNamara

ofz: fix Indirect leaks

Change-Id: Ib851012a0e3ad520a09c1e43e3f77417ab05f9c4
Reviewed-on: https://gerrit.libreoffice.org/42435Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst dca94d10
...@@ -1592,11 +1592,15 @@ XMLEventImportHelper& SvXMLImport::GetEventImport() ...@@ -1592,11 +1592,15 @@ XMLEventImportHelper& SvXMLImport::GetEventImport()
void SvXMLImport::SetFontDecls( XMLFontStylesContext *pFontDecls ) void SvXMLImport::SetFontDecls( XMLFontStylesContext *pFontDecls )
{ {
if (mxFontDecls.is())
static_cast<SvXMLStylesContext*>(mxFontDecls.get())->Clear();
mxFontDecls = pFontDecls; mxFontDecls = pFontDecls;
} }
void SvXMLImport::SetStyles( SvXMLStylesContext *pStyles ) void SvXMLImport::SetStyles( SvXMLStylesContext *pStyles )
{ {
if (mxStyles.is())
static_cast<SvXMLStylesContext*>(mxStyles.get())->Clear();
mxStyles = pStyles; mxStyles = pStyles;
} }
...@@ -1628,6 +1632,8 @@ void SvXMLImport::SetAutoStyles( SvXMLStylesContext *pAutoStyles ) ...@@ -1628,6 +1632,8 @@ void SvXMLImport::SetAutoStyles( SvXMLStylesContext *pAutoStyles )
} }
} }
} }
if (mxAutoStyles.is())
static_cast<SvXMLStylesContext*>(mxAutoStyles.get())->Clear();
mxAutoStyles = pAutoStyles; mxAutoStyles = pAutoStyles;
GetTextImport()->SetAutoStyles( pAutoStyles ); GetTextImport()->SetAutoStyles( pAutoStyles );
GetShapeImport()->SetAutoStylesContext( pAutoStyles ); GetShapeImport()->SetAutoStylesContext( pAutoStyles );
...@@ -1637,6 +1643,8 @@ void SvXMLImport::SetAutoStyles( SvXMLStylesContext *pAutoStyles ) ...@@ -1637,6 +1643,8 @@ void SvXMLImport::SetAutoStyles( SvXMLStylesContext *pAutoStyles )
void SvXMLImport::SetMasterStyles( SvXMLStylesContext *pMasterStyles ) void SvXMLImport::SetMasterStyles( SvXMLStylesContext *pMasterStyles )
{ {
if (mxMasterStyles.is())
static_cast<SvXMLStylesContext*>(mxMasterStyles.get())->Clear();
mxMasterStyles = pMasterStyles; mxMasterStyles = pMasterStyles;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment