summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-09-12 14:59:45 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-09-13 09:45:44 +0200
commitfa0e4fa0154b15fa1c04495562d08b4490ec984b (patch)
treeadd3105c3bc48916dfba2030715a4963c86ae3b5 /editeng
parent7bbe6602552fc7691bbfee8e9e31489fbd906140 (diff)
loplugin:unodispose in editeng..extensions
Change-Id: I6545cf93b0a101d3a3eea0abe9c1732fcf3dc2d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156850 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/uno/unofield.cxx1
-rw-r--r--editeng/source/uno/unotext2.cxx3
2 files changed, 4 insertions, 0 deletions
diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx
index c9b1adc90fe4..6f2e84a9577d 100644
--- a/editeng/source/uno/unofield.cxx
+++ b/editeng/source/uno/unofield.cxx
@@ -650,6 +650,7 @@ uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextField::getAnchor()
void SAL_CALL SvxUnoTextField::dispose()
{
OComponentHelper::dispose();
+ mxAnchor.clear();
}
void SAL_CALL SvxUnoTextField::addEventListener( const uno::Reference< lang::XEventListener >& xListener )
diff --git a/editeng/source/uno/unotext2.cxx b/editeng/source/uno/unotext2.cxx
index 79706cad2d2e..54714027b388 100644
--- a/editeng/source/uno/unotext2.cxx
+++ b/editeng/source/uno/unotext2.cxx
@@ -239,7 +239,10 @@ void SAL_CALL SvxUnoTextContent::dispose()
}
if( mxParentText.is() )
+ {
mxParentText->removeTextContent( this );
+ mxParentText.clear();
+ }
}
void SAL_CALL SvxUnoTextContent::addEventListener( const uno::Reference< lang::XEventListener >& xListener )