1 #include <rtl/ustring.h> 2 #include <com/sun/star/uno/Reference.hxx> 3 #include <com/sun/star/uno/Sequence.hxx> 4 #include <com/sun/star/uno/Any.hxx> 5 #include <cppuhelper/implbase1.hxx> 6 #include <cppuhelper/implbase2.hxx> 7 8 #include <com/sun/star/uno/XInterface.hpp> 9 #include <com/sun/star/lang/XInitialization.hpp> 10 #include <com/sun/star/lang/XMultiServiceFactory.hpp> 11 #include <com/sun/star/xml/xpath/XXPathExtension.hpp> 12 #include <com/sun/star/xforms/XModel.hpp> 13 #include <com/sun/star/uno/RuntimeException.hpp> 14 #include <com/sun/star/beans/NamedValue.hpp> 15 #include <com/sun/star/xml/dom/XNode.hpp> 16 17 18 19 20 class CLibxml2XFormsExtension : public cppu::WeakImplHelper2< 21 com::sun::star::xml::xpath::XXPathExtension, com::sun::star::lang::XInitialization> 22 { 23 private: 24 com::sun::star::uno::Reference <com::sun::star::xforms::XModel> m_aModel; 25 com::sun::star::uno::Reference <com::sun::star::xml::dom::XNode> m_aContextNode; 26 27 public: 28 static com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL Create( 29 const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& aFactory); 30 static rtl::OUString SAL_CALL getImplementationName_Static(); 31 static com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames_Static(); 32 33 com::sun::star::uno::Reference< com::sun::star::xforms::XModel > getModel(); 34 com::sun::star::uno::Reference< com::sun::star::xml::dom::XNode > getContextNode(); 35 36 virtual com::sun::star::xml::xpath::Libxml2ExtensionHandle SAL_CALL getLibxml2ExtensionHandle() throw (com::sun::star::uno::RuntimeException); 37 virtual void SAL_CALL initialize(const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& aSequence) throw (com::sun::star::uno::RuntimeException); 38 39 }; 40