diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-03-07 23:39:25 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-03-10 08:59:23 +0100 |
commit | db5c67e1006664916b7b4c8881d21cf096333ee7 (patch) | |
tree | 02b11f8c940bbdd6071f2994ace7352255d500f2 /include/xmloff/SinglePropertySetInfoCache.hxx | |
parent | Fix error: file not found with <angled> include; use "quotes" instead (diff) | |
download | core-db5c67e1006664916b7b4c8881d21cf096333ee7.tar.gz core-db5c67e1006664916b7b4c8881d21cf096333ee7.zip |
Keying on XTypeProvider::getImplementationId is unnecessary here
...given that cases where "every instance of getPropertySetInfo returns a new
object [...] must not be cached" anyway, so just key on the XPropertySetInfo
instances.
Change-Id: I11f0a1fe030226d1d26d6b6e6a2654f4511fdce8
Diffstat (limited to 'include/xmloff/SinglePropertySetInfoCache.hxx')
-rw-r--r-- | include/xmloff/SinglePropertySetInfoCache.hxx | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/include/xmloff/SinglePropertySetInfoCache.hxx b/include/xmloff/SinglePropertySetInfoCache.hxx index 55c37aaa8f9d..85ff232be964 100644 --- a/include/xmloff/SinglePropertySetInfoCache.hxx +++ b/include/xmloff/SinglePropertySetInfoCache.hxx @@ -20,23 +20,19 @@ #ifndef INCLUDED_XMLOFF_SINGLEPROPERTYSETINFOCACHE_HXX #define INCLUDED_XMLOFF_SINGLEPROPERTYSETINFOCACHE_HXX -#include <com/sun/star/beans/XPropertySet.hpp> +#include <sal/config.h> -#include <boost/unordered_map.hpp> -#include <xmloff/PropertySetInfoHash.hxx> +#include <map> -typedef boost::unordered_map -< - PropertySetInfoKey, - sal_Bool, - PropertySetInfoHash, - PropertySetInfoHash -> -SinglePropertySetInfoMap_Impl; +#include <com/sun/star/beans/XPropertySet.hpp> -class SinglePropertySetInfoCache : private SinglePropertySetInfoMap_Impl +class SinglePropertySetInfoCache { + typedef std::map<css::uno::Reference<css::beans::XPropertySetInfo>, bool> + Map; + OUString sName; + Map map_; public: @@ -48,6 +44,7 @@ public: ::com::sun::star::beans::XPropertySet >& rPropSet, ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >& rPropSetInfo ); + inline sal_Bool hasProperty( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& rPropSet ); |