summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail.com>2020-08-11 10:33:52 -0800
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-08-12 15:37:43 +0200
commitebdc0f1aada999e8b3bc8a32849a62b38819fead (patch)
tree65e52b941228ef02823be9a19bd1a442169b5722 /cui
parentca5e875958882ed54b376535cccc144e3fa0345f (diff)
fix memory leaks in CuiConfigGroupListBox
Change-Id: I47dab54764de24bccc42513373b65657c241a8e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100570 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/customize/cfgutil.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 1d863889610c..13203e0926a9 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -435,7 +435,17 @@ void CuiConfigGroupListBox::ClearAll()
for ( sal_uInt16 i=0; i<nCount; ++i )
{
SfxGroupInfo_Impl *pData = aArr[i].get();
- if (pData->nKind == SfxCfgKind::GROUP_SCRIPTCONTAINER)
+ if (pData->nKind == SfxCfgKind::GROUP_STYLES && pData->pObject)
+ {
+ SfxStyleInfo_Impl* pStyle = static_cast<SfxStyleInfo_Impl*>(pData->pObject);
+ delete pStyle;
+ }
+ else if (pData->nKind == SfxCfgKind::FUNCTION_SCRIPT && pData->pObject )
+ {
+ OUString* pScriptURI = static_cast<OUString*>(pData->pObject);
+ delete pScriptURI;
+ }
+ else if (pData->nKind == SfxCfgKind::GROUP_SCRIPTCONTAINER)
{
XInterface* xi = static_cast<XInterface *>(pData->pObject);
if (xi != nullptr)