summaryrefslogtreecommitdiff
path: root/sc/inc/textuno.hxx
diff options
context:
space:
mode:
authorDennis Francis <dennisfrancis.in@gmail.com>2015-11-30 04:44:43 +0530
committerCaolán McNamara <caolanm@redhat.com>2015-12-01 09:13:05 +0000
commit75c956d8ed1a4d8f46af3de079ab1fb68add3b40 (patch)
tree94c3e4e78233d9260f77bafeb3b3d9870e1c462a /sc/inc/textuno.hxx
parent796a904b6f3cfd7895e1763fdb043130a9c484ac (diff)
fix memory leaks on loading and saving an ods file
Change-Id: I3015a0f0254b9546386871cb015f925f0cd792f3 Reviewed-on: https://gerrit.libreoffice.org/20274 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/inc/textuno.hxx')
-rw-r--r--sc/inc/textuno.hxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/sc/inc/textuno.hxx b/sc/inc/textuno.hxx
index 9a641572d4ff..defb6d656abd 100644
--- a/sc/inc/textuno.hxx
+++ b/sc/inc/textuno.hxx
@@ -102,6 +102,8 @@ public:
throw(css::uno::RuntimeException, std::exception) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
throw(css::uno::RuntimeException, std::exception) override;
+
+ virtual void dispose();
};
// ScHeaderFooterTextData: shared data between sub objects of a ScHeaderFooterTextObj
@@ -130,7 +132,9 @@ public:
sal_uInt16 GetPart() const { return nPart; }
rtl::Reference<ScHeaderFooterContentObj> GetContentObj() const { return rContentObj; }
- const EditTextObject* GetTextObject() const { return mpTextObj;}
+ const EditTextObject* GetTextObject() const { return mpTextObj; }
+
+ void dispose() { rContentObj.clear(); }
};
/**
@@ -224,6 +228,8 @@ public:
throw(css::uno::RuntimeException, std::exception) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
throw(css::uno::RuntimeException, std::exception) override;
+
+ virtual void dispose() { aTextData.dispose(); }
};
// derived cursor objects for getImplementation and getText/getStart/getEnd