summaryrefslogtreecommitdiff
path: root/include/vcl/texteng.hxx
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2017-09-28 00:18:05 +0200
committerMichael Stahl <mstahl@redhat.com>2017-09-28 13:10:58 +0200
commit19910c461230f70bb9e98ad44db3525f0d755724 (patch)
tree7dbb8eb1769cca940375cee2ff26e8a595e1d8e6 /include/vcl/texteng.hxx
parent4fca2ef76a6dfe6c74ada71ab4806dc4ad568b82 (diff)
tdf#112658: fix leak when calling TextEngine::SetAttrib
TextCharAttribList::RemoveAttrib lets a dangling pointer when release unique_ptr obj maAttribs[n] So retrieve a unique_ptr from the different layers until SentenceEditWindow_Impl::ChangeMarkedWord (SpellDialog.cxx). Change-Id: I734909dce86ec28d69c09b2a8c0fc4a6941f422a Reviewed-on: https://gerrit.libreoffice.org/42881 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'include/vcl/texteng.hxx')
-rw-r--r--include/vcl/texteng.hxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/vcl/texteng.hxx b/include/vcl/texteng.hxx
index c9fcb08c5a72..3abf26abf172 100644
--- a/include/vcl/texteng.hxx
+++ b/include/vcl/texteng.hxx
@@ -297,7 +297,7 @@ public:
const TextCharAttrib* FindCharAttrib( const TextPaM& rPaM, sal_uInt16 nWhich ) const;
void RemoveAttribs( sal_uInt32 nPara, sal_uInt16 nWhich );
- void RemoveAttrib( sal_uInt32 nPara, const TextCharAttrib& rAttrib );
+ std::unique_ptr<TextCharAttrib> RemoveAttrib( sal_uInt32 nPara, const TextCharAttrib& rAttrib );
void RemoveAttribs( sal_uInt32 nPara );
void SetAttrib( const TextAttrib& rAttr, sal_uInt32 nPara, sal_Int32 nStart, sal_Int32 nEnd, bool bIdleFormatAndUpdate = true );