summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-01-16 10:40:31 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-01-16 11:45:38 +0000
commit1c7e010fa42c5064a86e00810cc6c7138586b723 (patch)
treecaac4702768b7a1ba9c86f9c75dab9a9fd7548c1 /cui
parent4dd0f57bcd490ea602fcbe3c8af08f3b0a4b30ec (diff)
SfxConfigGroupListBox leaks its resource container
Change-Id: I02cf44bdc9032fdba9237083ef08da71b817e3af
Diffstat (limited to 'cui')
-rw-r--r--cui/source/customize/cfgutil.cxx22
-rw-r--r--cui/source/inc/cfgutil.hxx2
2 files changed, 12 insertions, 12 deletions
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 8fc79412dbf9..7455586dd6dd 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -373,10 +373,10 @@ SvxConfigGroupBoxResource_Impl::SvxConfigGroupBoxResource_Impl() :
SfxConfigGroupListBox::SfxConfigGroupListBox(vcl::Window* pParent, WinBits nStyle)
: SvTreeListBox(pParent, nStyle)
- , pImp(new SvxConfigGroupBoxResource_Impl()), pFunctionListBox(nullptr), pStylesInfo(nullptr)
+ , xImp(new SvxConfigGroupBoxResource_Impl()), pFunctionListBox(nullptr), pStylesInfo(nullptr)
{
SetStyle( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_HASBUTTONS | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONSATROOT );
- SetNodeBitmaps( pImp->m_collapsedImage, pImp->m_expandedImage );
+ SetNodeBitmaps(xImp->m_collapsedImage, xImp->m_expandedImage);
}
VCL_BUILDER_FACTORY_CONSTRUCTOR(SfxConfigGroupListBox, WB_TABSTOP)
@@ -556,7 +556,7 @@ void SfxConfigGroupListBox::Init(const css::uno::Reference< css::uno::XComponent
aArr.push_back( o3tl::make_unique<SfxGroupInfo_Impl>( SfxCfgKind::GROUP_SCRIPTCONTAINER, 0,
static_cast<void *>(rootNode.get())));
- OUString aTitle(pImp->m_sDlgMacros);
+ OUString aTitle(xImp->m_sDlgMacros);
SvTreeListEntry *pNewEntry = InsertEntry( aTitle );
pNewEntry->SetUserData( aArr.back().get() );
pNewEntry->EnableChildrenOnDemand();
@@ -608,11 +608,11 @@ void SfxConfigGroupListBox::Init(const css::uno::Reference< css::uno::XComponent
{
if ( uiName.equals( user ) )
{
- uiName = pImp->m_sMyMacros;
+ uiName = xImp->m_sMyMacros;
}
else if ( uiName.equals( share ) )
{
- uiName = pImp->m_sProdMacros;
+ uiName = xImp->m_sProdMacros;
}
}
}
@@ -660,7 +660,7 @@ void SfxConfigGroupListBox::Init(const css::uno::Reference< css::uno::XComponent
// add styles
if ( m_xContext.is() )
{
- OUString sStyle( pImp->m_aStrGroupStyles );
+ OUString sStyle(xImp->m_aStrGroupStyles);
SvTreeListEntry *pEntry = InsertEntry( sStyle );
aArr.push_back( o3tl::make_unique<SfxGroupInfo_Impl>( SfxCfgKind::GROUP_STYLES, 0, nullptr ) ); // TODO last parameter should contain user data
pEntry->SetUserData( aArr.back().get() );
@@ -684,7 +684,7 @@ Image SfxConfigGroupListBox::GetImage(
OUString share("share");
if (node->getName().equals( user ) || node->getName().equals(share ) )
{
- aImage = pImp->m_hdImage;
+ aImage = xImp->m_hdImage;
}
else
{
@@ -721,16 +721,16 @@ Image SfxConfigGroupListBox::GetImage(
}
else
{
- aImage = pImp->m_docImage;
+ aImage = xImp->m_docImage;
}
}
}
else
{
if( node->getType() == browse::BrowseNodeTypes::SCRIPT )
- aImage = pImp->m_macImage;
+ aImage = xImp->m_macImage;
else
- aImage = pImp->m_libImage;
+ aImage = xImp->m_libImage;
}
return aImage;
}
@@ -1084,7 +1084,7 @@ void SfxConfigGroupListBox::SelectMacro( const SfxMacroInfoItem *pItem )
void SfxConfigGroupListBox::SelectMacro( const OUString& rBasic,
const OUString& rMacro )
{
- const OUString aBasicName( rBasic + " " + pImp->m_sMacros );
+ const OUString aBasicName(rBasic + " " + xImp->m_sMacros);
const sal_Int32 nCount = comphelper::string::getTokenCount(rMacro, '.');
const OUString aMethod( rMacro.getToken( nCount-1, '.' ) );
OUString aLib;
diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx
index db3f81638bef..21178f68fae7 100644
--- a/cui/source/inc/cfgutil.hxx
+++ b/cui/source/inc/cfgutil.hxx
@@ -122,7 +122,7 @@ public:
struct SvxConfigGroupBoxResource_Impl;
class SfxConfigGroupListBox : public SvTreeListBox
{
- SvxConfigGroupBoxResource_Impl* pImp;
+ std::unique_ptr<SvxConfigGroupBoxResource_Impl> xImp;
VclPtr<SfxConfigFunctionListBox> pFunctionListBox;
SfxGroupInfoArr_Impl aArr;