1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 #include <rtl/ustring.h>
23 #include <com/sun/star/uno/Reference.hxx>
24 #include <com/sun/star/uno/Sequence.hxx>
25 #include <com/sun/star/uno/Any.hxx>
26 #include <cppuhelper/implbase1.hxx>
27 #include <cppuhelper/implbase2.hxx>
28 
29 #include <com/sun/star/uno/XInterface.hpp>
30 #include <com/sun/star/lang/XInitialization.hpp>
31 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
32 #include <com/sun/star/xml/xpath/XXPathExtension.hpp>
33 #include <com/sun/star/xforms/XModel.hpp>
34 #include <com/sun/star/uno/RuntimeException.hpp>
35 #include <com/sun/star/beans/NamedValue.hpp>
36 #include <com/sun/star/xml/dom/XNode.hpp>
37 
38 
39 
40 
41 class CLibxml2XFormsExtension : public cppu::WeakImplHelper2<
42     com::sun::star::xml::xpath::XXPathExtension, com::sun::star::lang::XInitialization>
43 {
44 private:
45     com::sun::star::uno::Reference <com::sun::star::xforms::XModel>  m_aModel;
46     com::sun::star::uno::Reference <com::sun::star::xml::dom::XNode> m_aContextNode;
47 
48 public:
49     static com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL Create(
50         const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& aFactory);
51     static rtl::OUString SAL_CALL getImplementationName_Static();
52     static com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames_Static();
53 
54     com::sun::star::uno::Reference< com::sun::star::xforms::XModel > getModel();
55     com::sun::star::uno::Reference< com::sun::star::xml::dom::XNode > getContextNode();
56 
57     virtual com::sun::star::xml::xpath::Libxml2ExtensionHandle SAL_CALL getLibxml2ExtensionHandle() throw (com::sun::star::uno::RuntimeException);
58     virtual void SAL_CALL initialize(const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& aSequence) throw (com::sun::star::uno::RuntimeException);
59 
60 };
61