summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2017-09-19 09:08:39 +0200
committerJulien Nabet <serval2412@yahoo.fr>2017-09-19 09:09:50 +0200
commitfa9dc42ec1b0a61d7c49ecf9a4eb804bac8835fa (patch)
tree7ae34041bd0a226577023267d9b1530fb070fcec
parent382c9174b38b96a7d890dd72ab00567a8b687e10 (diff)
Revert "tdf#111894: fix leak memory with PaletteManager with SvxColorListBox"
See Maxim's comment here: https://gerrit.libreoffice.org/#/c/42138/2/svx/source/tbxctrls/tbcontrl.cxx This reverts commit e40ba034fa01cc271ad0e1940f623e551793f80b. Change-Id: Ife914669ce9fa08f4ea0e0b03389eab76f030ac4 Reviewed-on: https://gerrit.libreoffice.org/42444 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx6
1 files changed, 1 insertions, 5 deletions
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 196f63e5956b..cbd1c7c1d056 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -3237,6 +3237,7 @@ void SvxColorListBox::SetSlotId(sal_uInt16 nSlotId, bool bShowNoneButton)
{
m_nSlotId = nSlotId;
m_bShowNoneButton = bShowNoneButton;
+ m_xColorWindow.disposeAndClear();
m_aSelectedColor = bShowNoneButton ? GetNoneColor() : GetAutoColor(m_nSlotId);
ShowPreview(m_aSelectedColor);
createColorWindow();
@@ -3346,11 +3347,6 @@ SvxColorListBox::~SvxColorListBox()
void SvxColorListBox::dispose()
{
- // TODO: reset should be made automatically but...
- // tdf#111894: avoid memory leak with PaletteManager with SvxColorListBox
- // m_xColorWindow is made with m_xPaletteManager
- // so reset this last one before disposeAndClear first one
- m_xPaletteManager.reset();
m_xColorWindow.disposeAndClear();
m_aColorWrapper.dispose();
MenuButton::dispose();