diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2011-11-29 20:03:10 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2011-11-29 20:03:23 +0100 |
commit | d3c772229cf93ecb1296a67f4ddf5e73afe41b7e (patch) | |
tree | 267a6114694d01e475222e5063b98b2b98680ed7 /sc | |
parent | ca6052b9a62596902f901f8fa36680d7abe989f5 (diff) |
Use rtl::Reference<>.
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/nameuno.hxx | 5 | ||||
-rw-r--r-- | sc/source/ui/unoobj/nameuno.cxx | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/sc/inc/nameuno.hxx b/sc/inc/nameuno.hxx index 487237327e2f..a83748c824e1 100644 --- a/sc/inc/nameuno.hxx +++ b/sc/inc/nameuno.hxx @@ -49,6 +49,7 @@ #include <cppuhelper/implbase3.hxx> #include <cppuhelper/implbase5.hxx> #include <cppuhelper/implbase6.hxx> +#include <rtl/ref.hxx> class ScDocShell; class ScRangeName; @@ -67,7 +68,7 @@ class ScNamedRangeObj : public ::cppu::WeakImplHelper6< public SfxListener { private: - com::sun::star::uno::Reference< com::sun::star::sheet::XNamedRanges > mxParent; + rtl::Reference< ScNamedRangesObj > mxParent; ScDocShell* pDocShell; String aName; com::sun::star::uno::Reference< com::sun::star::container::XNamed > mxSheet; @@ -81,7 +82,7 @@ private: SCTAB GetTab_Impl(); public: - ScNamedRangeObj( com::sun::star::uno::Reference< com::sun::star::sheet::XNamedRanges > xParent, ScDocShell* pDocSh, const String& rNm, + ScNamedRangeObj( rtl::Reference< ScNamedRangesObj > 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(); diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx index 3facf436bbc7..60f30251a8ce 100644 --- a/sc/source/ui/unoobj/nameuno.cxx +++ b/sc/source/ui/unoobj/nameuno.cxx @@ -97,7 +97,7 @@ bool lcl_UserVisibleName(const ScRangeData& rData) return !rData.HasType(RT_DATABASE) && !rData.HasType(RT_SHARED); } -ScNamedRangeObj::ScNamedRangeObj( Reference< sheet::XNamedRanges > xParent, ScDocShell* pDocSh, const String& rNm, Reference<container::XNamed> xSheet): +ScNamedRangeObj::ScNamedRangeObj( rtl::Reference< ScNamedRangesObj > xParent, ScDocShell* pDocSh, const String& rNm, Reference<container::XNamed> xSheet): mxParent(xParent), pDocShell( pDocSh ), aName( rNm ), @@ -213,7 +213,7 @@ void ScNamedRangeObj::Modify_Impl( const String* pNewName, const ScTokenArray* p if (pNewRanges->insert(pNew)) { ScDocFunc aFunc(*pDocShell); - aFunc.SetNewRangeNames(pNewRanges, dynamic_cast<ScNamedRangesObj*>(mxParent.get())->IsModifyAndBroadcast(), nTab); + aFunc.SetNewRangeNames(pNewRanges, mxParent->IsModifyAndBroadcast(), nTab); aName = aInsName; //! broadcast? } |