diff options
Diffstat (limited to 'basic/source/inc/sbunoobj.hxx')
-rw-r--r-- | basic/source/inc/sbunoobj.hxx | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx index f2277e99d0..0461d374c2 100644 --- a/basic/source/inc/sbunoobj.hxx +++ b/basic/source/inc/sbunoobj.hxx @@ -43,6 +43,7 @@ #include <com/sun/star/reflection/XServiceTypeDescription2.hpp> #include <com/sun/star/reflection/XSingletonTypeDescription.hpp> #include <rtl/ustring.hxx> +#include <hash_map> class SbUnoObject: public SbxObject { @@ -321,6 +322,26 @@ public: virtual void Clear(); }; +typedef std::hash_map< ::rtl::OUString, ::com::sun::star::uno::Any, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > VBAConstantsHash; + +typedef std::vector< rtl::OUString > VBAConstantsVector; + +class VBAConstantHelper +{ +private: + + VBAConstantsVector aConstCache; + VBAConstantsHash aConstHash; + bool isInited; + VBAConstantHelper():isInited( false ) {} + VBAConstantHelper(const VBAConstantHelper&); + void init(); +public: + static VBAConstantHelper& instance(); + SbxVariable* getVBAConstant( const String& rName ); + bool isVBAConstantType( const String& rName ); +}; + #endif |