diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2011-11-19 02:48:23 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2011-11-19 02:52:38 +0100 |
commit | 833567fa698e92f3bb9b7ef929093faee59f65f0 (patch) | |
tree | 6d6bf8b25558cf756c2ce55f114f05e0cbd7ab1d /sc/inc/nameuno.hxx | |
parent | 0cb0952a5047ebc28f9e9f1cfa45ea7f0f50be33 (diff) |
don't pass uno interface implementation directly
Passing the implementation instead of an uno reference may result in
lifetime problems if the passed interface is distroyed while the second
one is still valid
see rhbz#579817 with memcheck
Diffstat (limited to 'sc/inc/nameuno.hxx')
-rw-r--r-- | sc/inc/nameuno.hxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/inc/nameuno.hxx b/sc/inc/nameuno.hxx index c08222632419..487237327e2f 100644 --- a/sc/inc/nameuno.hxx +++ b/sc/inc/nameuno.hxx @@ -67,7 +67,7 @@ class ScNamedRangeObj : public ::cppu::WeakImplHelper6< public SfxListener { private: - ScNamedRangesObj* mpParent; + com::sun::star::uno::Reference< com::sun::star::sheet::XNamedRanges > mxParent; ScDocShell* pDocShell; String aName; com::sun::star::uno::Reference< com::sun::star::container::XNamed > mxSheet; @@ -81,7 +81,7 @@ private: SCTAB GetTab_Impl(); public: - ScNamedRangeObj(ScNamedRangesObj* pParent, ScDocShell* pDocSh, const String& rNm, + ScNamedRangeObj( com::sun::star::uno::Reference< com::sun::star::sheet::XNamedRanges > xParent, ScDocShell* pDocSh, const String& rNm, com::sun::star::uno::Reference< com::sun::star::container::XNamed > xSheet = com::sun::star::uno::Reference< com::sun::star::container::XNamed > ()); virtual ~ScNamedRangeObj(); |