diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-04-10 10:26:44 +0200 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-04-10 12:10:00 +0200 |
commit | fa47856e51c2c1102b3df0adead2c0701bd4cbde (patch) | |
tree | 6ac1b368671446986cdbb0d87a4bde3b57c19412 /xmloff | |
parent | 63229c51ba33ccb478ac9df1737281555ebea0bd (diff) |
xmloff: fix leak in XMLPropertySetMapperEntry_Impl
The XMLNamedBoolPropertyHdl should be owned by
OControlPropertyHandlerFactory like all the other handlers created in
that function.
Thanks to Julien Nabet for pointing out the problem.
Change-Id: Id474b2fdb84ca74f686d0c888fbedbee623c31bb
Reviewed-on: https://gerrit.libreoffice.org/52666
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/forms/controlpropertyhdl.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/xmloff/source/forms/controlpropertyhdl.cxx b/xmloff/source/forms/controlpropertyhdl.cxx index ba5a27f8661d..839789167e9e 100644 --- a/xmloff/source/forms/controlpropertyhdl.cxx +++ b/xmloff/source/forms/controlpropertyhdl.cxx @@ -99,9 +99,13 @@ namespace xmloff pHandler = m_pFontReliefHandler.get(); break; case XML_TYPE_TEXT_LINE_MODE: - pHandler = new XMLNamedBoolPropertyHdl( - ::xmloff::token::XML_SKIP_WHITE_SPACE, - ::xmloff::token::XML_CONTINUOUS); + if (!m_pTextLineModeHandler) + { + m_pTextLineModeHandler = o3tl::make_unique<XMLNamedBoolPropertyHdl>( + ::xmloff::token::XML_SKIP_WHITE_SPACE, + ::xmloff::token::XML_CONTINUOUS); + } + pHandler = m_pTextLineModeHandler.get(); break; } |