From d4c09a4e3737c1355c666299d8a3f3f30dc659dd Mon Sep 17 00:00:00 2001 From: Tomaž Vajngerl Date: Mon, 6 Feb 2017 20:35:51 +0100 Subject: sc: simplify GetByName, FreeTable methods of DPCollection + test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Simplify DPCollection GetByName and FreeTable by using c++11 features. Change GetByName to return non-const ScDPObject as this is more useful (as operator[] does that already anyway). Change-Id: Ia502c615acc5cb7fdc51acea9b428d04e1c9a40f Reviewed-on: https://gerrit.libreoffice.org/34002 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl --- sc/inc/dpobject.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sc/inc') diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx index 2f144c5c7786..d8c20f10f5f8 100644 --- a/sc/inc/dpobject.hxx +++ b/sc/inc/dpobject.hxx @@ -371,7 +371,7 @@ public: SC_DLLPUBLIC ScDPObject& operator[](size_t nIndex); SC_DLLPUBLIC const ScDPObject& operator[](size_t nIndex) const; - const ScDPObject* GetByName(const OUString& rName) const; + ScDPObject* GetByName(const OUString& rName) const; void DeleteOnTab( SCTAB nTab ); void UpdateReference( UpdateRefMode eUpdateRefMode, -- cgit