diff options
author | Rüdiger Timm <rt@openoffice.org> | 2005-01-28 16:18:41 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2005-01-28 16:18:41 +0000 |
commit | 1e34888d34f601524ac2d168354f00b60bafd04d (patch) | |
tree | 31a3acf4fc70db004fc3fdc6543772b1d669dc8b /sc/inc/dptabsrc.hxx | |
parent | 435c9ad8c15dc88db9bebff610cf9f11a1cc732f (diff) |
INTEGRATION: CWS calc28 (1.5.186); FILE MERGED
2005/01/20 11:08:11 nn 1.5.186.1: #i40054# faster name access to members
Diffstat (limited to 'sc/inc/dptabsrc.hxx')
-rw-r--r-- | sc/inc/dptabsrc.hxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sc/inc/dptabsrc.hxx b/sc/inc/dptabsrc.hxx index 304689fb9d5f..b51a3b0d32a8 100644 --- a/sc/inc/dptabsrc.hxx +++ b/sc/inc/dptabsrc.hxx @@ -2,9 +2,9 @@ * * $RCSfile: dptabsrc.hxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: hr $ $Date: 2004-08-03 11:30:00 $ + * last change: $Author: rt $ $Date: 2005-01-28 17:18:41 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -63,6 +63,7 @@ #define SC_DPTABSRC_HXX #include <vector> +#include <hash_map> #ifndef _STRING_HXX //autogen #include <tools/string.hxx> @@ -725,6 +726,9 @@ public: //! number format (for data fields and date fields) }; +// hash map from name to index in the member array, for fast name access +typedef ::std::hash_map< ::rtl::OUString, sal_Int32, ::rtl::OUStringHash > ScDPMembersHashMap; + class ScDPMembers : public cppu::WeakImplHelper2< com::sun::star::container::XNameAccess, com::sun::star::lang::XServiceInfo > @@ -736,6 +740,7 @@ private: long nLev; long nMbrCount; ScDPMember** ppMbrs; + mutable ScDPMembersHashMap aHashMap; public: ScDPMembers( ScDPSource* pSrc, long nD, long nH, long nL ); @@ -768,6 +773,8 @@ public: virtual ScDPMember* getByIndex(long nIndex) const; long getMinMembers() const; + + sal_Int32 GetIndexFromName( const ::rtl::OUString& rName ) const; // <0 if not found }; class ScDPMember : public cppu::WeakImplHelper3< |