diff options
Diffstat (limited to 'unoxml/source/xpath/xpathapi.hxx')
-rw-r--r-- | unoxml/source/xpath/xpathapi.hxx | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/unoxml/source/xpath/xpathapi.hxx b/unoxml/source/xpath/xpathapi.hxx index 4bc57a958014..dc8e0536656c 100644 --- a/unoxml/source/xpath/xpathapi.hxx +++ b/unoxml/source/xpath/xpathapi.hxx @@ -26,14 +26,16 @@ * ************************************************************************/ -#ifndef _XPATHAPI_HXX -#define _XPATHAPI_HXX +#ifndef XPATH_XPATHAPI_HXX +#define XPATH_XPATHAPI_HXX #include <map> #include <vector> #include <sal/types.h> + #include <cppuhelper/implbase2.hxx> + #include <com/sun/star/uno/Reference.h> #include <com/sun/star/uno/Sequence.h> @@ -51,11 +53,9 @@ #include <com/sun/star/lang/XSingleServiceFactory.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include "libxml/tree.h" using ::rtl::OUString; using namespace com::sun::star::uno; -using namespace com::sun::star::lang; using namespace com::sun::star::xml::dom; using namespace com::sun::star::xml::xpath; @@ -64,28 +64,40 @@ namespace XPath typedef std::map<OUString, OUString> nsmap_t; typedef std::vector< Reference<XXPathExtension> > extensions_t; + typedef ::cppu::WeakImplHelper2 + < XXPathAPI + , ::com::sun::star::lang::XServiceInfo + > CXPathAPI_Base; + class CXPathAPI - : public ::cppu::WeakImplHelper2< XXPathAPI, XServiceInfo > + : public CXPathAPI_Base { private: + ::osl::Mutex m_Mutex; nsmap_t m_nsmap; - const Reference< XMultiServiceFactory > m_aFactory; + const Reference< ::com::sun::star::lang::XMultiServiceFactory > m_aFactory; extensions_t m_extensions; public: // ctor - CXPathAPI(const Reference< XMultiServiceFactory >& rSMgr); + CXPathAPI( + const Reference< ::com::sun::star::lang::XMultiServiceFactory >& + rSMgr); // call for factory - static Reference< XInterface > getInstance(const Reference < XMultiServiceFactory >& xFactory); + static Reference< XInterface > getInstance( + const Reference < ::com::sun::star::lang::XMultiServiceFactory >& + xFactory); // static helpers for service info and component management static const char* aImplementationName; static const char* aSupportedServiceNames[]; static OUString _getImplementationName(); static Sequence< OUString > _getSupportedServiceNames(); - static Reference< XInterface > _getInstance(const Reference< XMultiServiceFactory >& rSMgr); + static Reference< XInterface > _getInstance( + const Reference< ::com::sun::star::lang::XMultiServiceFactory >& + rSMgr); // XServiceInfo virtual OUString SAL_CALL getImplementationName() |