1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir #ifndef XMLSCRIPT_XMLBAS_IMPORT_HXX
29*cdf0e10cSrcweir #define XMLSCRIPT_XMLBAS_IMPORT_HXX
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir #include <com/sun/star/xml/sax/XDocumentHandler.hpp>
32*cdf0e10cSrcweir #include <com/sun/star/document/XImporter.hpp>
33*cdf0e10cSrcweir #include <com/sun/star/frame/XModel.hpp>
34*cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp>
35*cdf0e10cSrcweir #ifndef _COM_SUN_STAR_SCRIPT_XLIBRYARYCONTAINER2_HPP_
36*cdf0e10cSrcweir #include <com/sun/star/script/XLibraryContainer2.hpp>
37*cdf0e10cSrcweir #endif
38*cdf0e10cSrcweir #include <com/sun/star/uno/XComponentContext.hpp>
39*cdf0e10cSrcweir #include <com/sun/star/xml/input/XRoot.hpp>
40*cdf0e10cSrcweir #include <cppuhelper/implbase1.hxx>
41*cdf0e10cSrcweir #include <cppuhelper/implbase3.hxx>
42*cdf0e10cSrcweir #include <osl/mutex.hxx>
43*cdf0e10cSrcweir #include <rtl/ustrbuf.hxx>
44*cdf0e10cSrcweir 
45*cdf0e10cSrcweir 
46*cdf0e10cSrcweir //.........................................................................
47*cdf0e10cSrcweir namespace xmlscript
48*cdf0e10cSrcweir {
49*cdf0e10cSrcweir //.........................................................................
50*cdf0e10cSrcweir 
51*cdf0e10cSrcweir     // =============================================================================
52*cdf0e10cSrcweir     // class BasicElementBase
53*cdf0e10cSrcweir     // =============================================================================
54*cdf0e10cSrcweir 
55*cdf0e10cSrcweir     class BasicImport;
56*cdf0e10cSrcweir 
57*cdf0e10cSrcweir     typedef ::cppu::WeakImplHelper1<
58*cdf0e10cSrcweir         ::com::sun::star::xml::input::XElement > BasicElementBase_BASE;
59*cdf0e10cSrcweir 
60*cdf0e10cSrcweir     class BasicElementBase : public BasicElementBase_BASE
61*cdf0e10cSrcweir     {
62*cdf0e10cSrcweir     protected:
63*cdf0e10cSrcweir         BasicImport* m_pImport;
64*cdf0e10cSrcweir         BasicElementBase* m_pParent;
65*cdf0e10cSrcweir         ::rtl::OUString m_aLocalName;
66*cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::xml::input::XAttributes > m_xAttributes;
67*cdf0e10cSrcweir 
68*cdf0e10cSrcweir         bool getBoolAttr( sal_Bool* pRet, const ::rtl::OUString& rAttrName,
69*cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::xml::input::XAttributes >& xAttributes,
70*cdf0e10cSrcweir             sal_Int32 nUid );
71*cdf0e10cSrcweir 
72*cdf0e10cSrcweir     public:
73*cdf0e10cSrcweir         BasicElementBase( const ::rtl::OUString& rLocalName,
74*cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::xml::input::XAttributes >& xAttributes,
75*cdf0e10cSrcweir             BasicElementBase* pParent, BasicImport* pImport );
76*cdf0e10cSrcweir         virtual ~BasicElementBase();
77*cdf0e10cSrcweir 
78*cdf0e10cSrcweir         // XElement
79*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::input::XElement > SAL_CALL getParent()
80*cdf0e10cSrcweir             throw (::com::sun::star::uno::RuntimeException);
81*cdf0e10cSrcweir         virtual ::rtl::OUString SAL_CALL getLocalName()
82*cdf0e10cSrcweir             throw (::com::sun::star::uno::RuntimeException);
83*cdf0e10cSrcweir         virtual sal_Int32 SAL_CALL getUid()
84*cdf0e10cSrcweir             throw (::com::sun::star::uno::RuntimeException);
85*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::input::XAttributes > SAL_CALL getAttributes()
86*cdf0e10cSrcweir             throw (::com::sun::star::uno::RuntimeException);
87*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::input::XElement > SAL_CALL startChildElement(
88*cdf0e10cSrcweir             sal_Int32 nUid, const ::rtl::OUString& rLocalName,
89*cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::xml::input::XAttributes >& xAttributes )
90*cdf0e10cSrcweir             throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
91*cdf0e10cSrcweir         virtual void SAL_CALL characters( const ::rtl::OUString& rChars )
92*cdf0e10cSrcweir             throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
93*cdf0e10cSrcweir         virtual void SAL_CALL ignorableWhitespace(
94*cdf0e10cSrcweir             const ::rtl::OUString& rWhitespaces )
95*cdf0e10cSrcweir             throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
96*cdf0e10cSrcweir         virtual void SAL_CALL processingInstruction(
97*cdf0e10cSrcweir             const ::rtl::OUString& rTarget, const ::rtl::OUString& rData )
98*cdf0e10cSrcweir             throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
99*cdf0e10cSrcweir         virtual void SAL_CALL endElement()
100*cdf0e10cSrcweir             throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
101*cdf0e10cSrcweir     };
102*cdf0e10cSrcweir 
103*cdf0e10cSrcweir 
104*cdf0e10cSrcweir     // =============================================================================
105*cdf0e10cSrcweir     // class BasicLibrariesElement
106*cdf0e10cSrcweir     // =============================================================================
107*cdf0e10cSrcweir 
108*cdf0e10cSrcweir     class BasicLibrariesElement : public BasicElementBase
109*cdf0e10cSrcweir     {
110*cdf0e10cSrcweir     private:
111*cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer2 > m_xLibContainer;
112*cdf0e10cSrcweir 
113*cdf0e10cSrcweir     public:
114*cdf0e10cSrcweir         BasicLibrariesElement( const ::rtl::OUString& rLocalName,
115*cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::xml::input::XAttributes >& xAttributes,
116*cdf0e10cSrcweir             BasicElementBase* pParent, BasicImport* pImport,
117*cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer2 >& rxLibContainer );
118*cdf0e10cSrcweir 
119*cdf0e10cSrcweir         // XElement
120*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::input::XElement > SAL_CALL startChildElement(
121*cdf0e10cSrcweir             sal_Int32 nUid, const ::rtl::OUString& rLocalName,
122*cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::xml::input::XAttributes >& xAttributes )
123*cdf0e10cSrcweir             throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
124*cdf0e10cSrcweir         virtual void SAL_CALL endElement()
125*cdf0e10cSrcweir             throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
126*cdf0e10cSrcweir     };
127*cdf0e10cSrcweir 
128*cdf0e10cSrcweir 
129*cdf0e10cSrcweir     // =============================================================================
130*cdf0e10cSrcweir     // class BasicEmbeddedLibraryElement
131*cdf0e10cSrcweir     // =============================================================================
132*cdf0e10cSrcweir 
133*cdf0e10cSrcweir     class BasicEmbeddedLibraryElement : public BasicElementBase
134*cdf0e10cSrcweir     {
135*cdf0e10cSrcweir     private:
136*cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer2 > m_xLibContainer;
137*cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > m_xLib;
138*cdf0e10cSrcweir         ::rtl::OUString m_aLibName;
139*cdf0e10cSrcweir         bool m_bReadOnly;
140*cdf0e10cSrcweir 
141*cdf0e10cSrcweir     public:
142*cdf0e10cSrcweir         BasicEmbeddedLibraryElement( const ::rtl::OUString& rLocalName,
143*cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::xml::input::XAttributes >& xAttributes,
144*cdf0e10cSrcweir             BasicElementBase* pParent, BasicImport* pImport,
145*cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer2 >& rxLibContainer,
146*cdf0e10cSrcweir             const ::rtl::OUString& rLibName, bool bReadOnly );
147*cdf0e10cSrcweir 
148*cdf0e10cSrcweir         // XElement
149*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::input::XElement > SAL_CALL startChildElement(
150*cdf0e10cSrcweir             sal_Int32 nUid, const ::rtl::OUString& rLocalName,
151*cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::xml::input::XAttributes >& xAttributes )
152*cdf0e10cSrcweir             throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
153*cdf0e10cSrcweir         virtual void SAL_CALL endElement()
154*cdf0e10cSrcweir             throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
155*cdf0e10cSrcweir     };
156*cdf0e10cSrcweir 
157*cdf0e10cSrcweir 
158*cdf0e10cSrcweir     // =============================================================================
159*cdf0e10cSrcweir     // class BasicModuleElement
160*cdf0e10cSrcweir     // =============================================================================
161*cdf0e10cSrcweir 
162*cdf0e10cSrcweir     class BasicModuleElement : public BasicElementBase
163*cdf0e10cSrcweir     {
164*cdf0e10cSrcweir     private:
165*cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > m_xLib;
166*cdf0e10cSrcweir         ::rtl::OUString m_aName;
167*cdf0e10cSrcweir 
168*cdf0e10cSrcweir     public:
169*cdf0e10cSrcweir         BasicModuleElement( const ::rtl::OUString& rLocalName,
170*cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::xml::input::XAttributes >& xAttributes,
171*cdf0e10cSrcweir             BasicElementBase* pParent, BasicImport* pImport,
172*cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& rxLib,
173*cdf0e10cSrcweir             const ::rtl::OUString& rName );
174*cdf0e10cSrcweir 
175*cdf0e10cSrcweir         // XElement
176*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::input::XElement > SAL_CALL startChildElement(
177*cdf0e10cSrcweir             sal_Int32 nUid, const ::rtl::OUString& rLocalName,
178*cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::xml::input::XAttributes >& xAttributes )
179*cdf0e10cSrcweir             throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
180*cdf0e10cSrcweir         virtual void SAL_CALL endElement()
181*cdf0e10cSrcweir             throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
182*cdf0e10cSrcweir     };
183*cdf0e10cSrcweir 
184*cdf0e10cSrcweir 
185*cdf0e10cSrcweir     // =============================================================================
186*cdf0e10cSrcweir     // class BasicSourceCodeElement
187*cdf0e10cSrcweir     // =============================================================================
188*cdf0e10cSrcweir 
189*cdf0e10cSrcweir     class BasicSourceCodeElement : public BasicElementBase
190*cdf0e10cSrcweir     {
191*cdf0e10cSrcweir     private:
192*cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > m_xLib;
193*cdf0e10cSrcweir         ::rtl::OUString m_aName;
194*cdf0e10cSrcweir         ::rtl::OUStringBuffer m_aBuffer;
195*cdf0e10cSrcweir 
196*cdf0e10cSrcweir     public:
197*cdf0e10cSrcweir         BasicSourceCodeElement( const ::rtl::OUString& rLocalName,
198*cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::xml::input::XAttributes >& xAttributes,
199*cdf0e10cSrcweir             BasicElementBase* pParent, BasicImport* pImport,
200*cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& rxLib,
201*cdf0e10cSrcweir             const ::rtl::OUString& rName );
202*cdf0e10cSrcweir 
203*cdf0e10cSrcweir         // XElement
204*cdf0e10cSrcweir         virtual void SAL_CALL characters( const ::rtl::OUString& rChars )
205*cdf0e10cSrcweir             throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
206*cdf0e10cSrcweir         virtual void SAL_CALL endElement()
207*cdf0e10cSrcweir             throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
208*cdf0e10cSrcweir     };
209*cdf0e10cSrcweir 
210*cdf0e10cSrcweir 
211*cdf0e10cSrcweir     // =============================================================================
212*cdf0e10cSrcweir     // class BasicImport
213*cdf0e10cSrcweir     // =============================================================================
214*cdf0e10cSrcweir 
215*cdf0e10cSrcweir     typedef ::cppu::WeakImplHelper1<
216*cdf0e10cSrcweir         ::com::sun::star::xml::input::XRoot > BasicImport_BASE;
217*cdf0e10cSrcweir 
218*cdf0e10cSrcweir     class BasicImport : public BasicImport_BASE
219*cdf0e10cSrcweir     {
220*cdf0e10cSrcweir         friend class BasicElementBase;
221*cdf0e10cSrcweir         friend class BasicLibrariesElement;
222*cdf0e10cSrcweir         friend class BasicEmbeddedLibraryElement;
223*cdf0e10cSrcweir         friend class BasicModuleElement;
224*cdf0e10cSrcweir 
225*cdf0e10cSrcweir     private:
226*cdf0e10cSrcweir         sal_Int32 XMLNS_UID;
227*cdf0e10cSrcweir         sal_Int32 XMLNS_XLINK_UID;
228*cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xModel;
229*cdf0e10cSrcweir         sal_Bool m_bOasis;
230*cdf0e10cSrcweir 
231*cdf0e10cSrcweir     public:
232*cdf0e10cSrcweir         BasicImport( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rxModel, sal_Bool bOasis );
233*cdf0e10cSrcweir         virtual ~BasicImport();
234*cdf0e10cSrcweir 
235*cdf0e10cSrcweir         // XRoot
236*cdf0e10cSrcweir         virtual void SAL_CALL startDocument(
237*cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::xml::input::XNamespaceMapping >& xNamespaceMapping )
238*cdf0e10cSrcweir             throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
239*cdf0e10cSrcweir         virtual void SAL_CALL endDocument()
240*cdf0e10cSrcweir             throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
241*cdf0e10cSrcweir         virtual void SAL_CALL processingInstruction(
242*cdf0e10cSrcweir             const ::rtl::OUString& rTarget, const ::rtl::OUString& rData )
243*cdf0e10cSrcweir             throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
244*cdf0e10cSrcweir         virtual void SAL_CALL setDocumentLocator(
245*cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XLocator >& xLocator )
246*cdf0e10cSrcweir             throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
247*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::input::XElement > SAL_CALL startRootElement(
248*cdf0e10cSrcweir             sal_Int32 nUid, const ::rtl::OUString& rLocalName,
249*cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::xml::input::XAttributes >& xAttributes )
250*cdf0e10cSrcweir             throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
251*cdf0e10cSrcweir     };
252*cdf0e10cSrcweir 
253*cdf0e10cSrcweir 
254*cdf0e10cSrcweir     // =============================================================================
255*cdf0e10cSrcweir     // class XMLBasicImporterBase
256*cdf0e10cSrcweir     // =============================================================================
257*cdf0e10cSrcweir 
258*cdf0e10cSrcweir     typedef ::cppu::WeakImplHelper3<
259*cdf0e10cSrcweir         ::com::sun::star::lang::XServiceInfo,
260*cdf0e10cSrcweir         ::com::sun::star::document::XImporter,
261*cdf0e10cSrcweir         ::com::sun::star::xml::sax::XDocumentHandler > XMLBasicImporterBase_BASE;
262*cdf0e10cSrcweir 
263*cdf0e10cSrcweir     class XMLBasicImporterBase : public XMLBasicImporterBase_BASE
264*cdf0e10cSrcweir     {
265*cdf0e10cSrcweir     private:
266*cdf0e10cSrcweir         ::osl::Mutex                                                                        m_aMutex;
267*cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >        m_xContext;
268*cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler >    m_xHandler;
269*cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >                 m_xModel;
270*cdf0e10cSrcweir         sal_Bool                                                                            m_bOasis;
271*cdf0e10cSrcweir 
272*cdf0e10cSrcweir     public:
273*cdf0e10cSrcweir         XMLBasicImporterBase(
274*cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext, sal_Bool bOasis );
275*cdf0e10cSrcweir         virtual ~XMLBasicImporterBase();
276*cdf0e10cSrcweir 
277*cdf0e10cSrcweir         // XServiceInfo
278*cdf0e10cSrcweir         virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
279*cdf0e10cSrcweir             throw (::com::sun::star::uno::RuntimeException);
280*cdf0e10cSrcweir 
281*cdf0e10cSrcweir         // XImporter
282*cdf0e10cSrcweir         virtual void SAL_CALL setTargetDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& rxDoc )
283*cdf0e10cSrcweir             throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
284*cdf0e10cSrcweir 
285*cdf0e10cSrcweir         // XDocumentHandler
286*cdf0e10cSrcweir         virtual void SAL_CALL startDocument()
287*cdf0e10cSrcweir             throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
288*cdf0e10cSrcweir         virtual void SAL_CALL endDocument()
289*cdf0e10cSrcweir             throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
290*cdf0e10cSrcweir         virtual void SAL_CALL startElement( const ::rtl::OUString& aName,
291*cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttribs )
292*cdf0e10cSrcweir             throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
293*cdf0e10cSrcweir         virtual void SAL_CALL endElement( const ::rtl::OUString& aName )
294*cdf0e10cSrcweir             throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
295*cdf0e10cSrcweir         virtual void SAL_CALL characters( const ::rtl::OUString& aChars )
296*cdf0e10cSrcweir             throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
297*cdf0e10cSrcweir         virtual void SAL_CALL ignorableWhitespace( const ::rtl::OUString& aWhitespaces )
298*cdf0e10cSrcweir             throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
299*cdf0e10cSrcweir         virtual void SAL_CALL processingInstruction( const ::rtl::OUString& aTarget, const ::rtl::OUString& aData )
300*cdf0e10cSrcweir             throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
301*cdf0e10cSrcweir         virtual void SAL_CALL setDocumentLocator( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XLocator >& xLocator )
302*cdf0e10cSrcweir             throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
303*cdf0e10cSrcweir     };
304*cdf0e10cSrcweir 
305*cdf0e10cSrcweir 
306*cdf0e10cSrcweir     // =============================================================================
307*cdf0e10cSrcweir     // class XMLBasicImporter
308*cdf0e10cSrcweir     // =============================================================================
309*cdf0e10cSrcweir 
310*cdf0e10cSrcweir     class XMLBasicImporter : public XMLBasicImporterBase
311*cdf0e10cSrcweir     {
312*cdf0e10cSrcweir     public:
313*cdf0e10cSrcweir         XMLBasicImporter(
314*cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext );
315*cdf0e10cSrcweir         virtual ~XMLBasicImporter();
316*cdf0e10cSrcweir 
317*cdf0e10cSrcweir         // XServiceInfo
318*cdf0e10cSrcweir         virtual ::rtl::OUString SAL_CALL getImplementationName(  )
319*cdf0e10cSrcweir             throw (::com::sun::star::uno::RuntimeException);
320*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(  )
321*cdf0e10cSrcweir             throw (::com::sun::star::uno::RuntimeException);
322*cdf0e10cSrcweir     };
323*cdf0e10cSrcweir 
324*cdf0e10cSrcweir 
325*cdf0e10cSrcweir     // =============================================================================
326*cdf0e10cSrcweir     // class XMLOasisBasicImporter
327*cdf0e10cSrcweir     // =============================================================================
328*cdf0e10cSrcweir 
329*cdf0e10cSrcweir     class XMLOasisBasicImporter : public XMLBasicImporterBase
330*cdf0e10cSrcweir     {
331*cdf0e10cSrcweir     public:
332*cdf0e10cSrcweir         XMLOasisBasicImporter(
333*cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext );
334*cdf0e10cSrcweir         virtual ~XMLOasisBasicImporter();
335*cdf0e10cSrcweir 
336*cdf0e10cSrcweir         // XServiceInfo
337*cdf0e10cSrcweir         virtual ::rtl::OUString SAL_CALL getImplementationName(  )
338*cdf0e10cSrcweir             throw (::com::sun::star::uno::RuntimeException);
339*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(  )
340*cdf0e10cSrcweir             throw (::com::sun::star::uno::RuntimeException);
341*cdf0e10cSrcweir     };
342*cdf0e10cSrcweir 
343*cdf0e10cSrcweir //.........................................................................
344*cdf0e10cSrcweir }	// namespace xmlscript
345*cdf0e10cSrcweir //.........................................................................
346*cdf0e10cSrcweir 
347*cdf0e10cSrcweir #endif // XMLSCRIPT_XMLBAS_IMPORT_HXX
348