Update ooo320-m1
[ooovba.git] / desktop / source / deployment / registry / sfwk / dp_parceldesc.hxx
blob60f0fab3483ec733bd7f7cfe4f2646238aa2517d
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: dp_parceldesc.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #include <cppuhelper/implbase1.hxx>
33 #include <com/sun/star/xml/sax/XAttributeList.hpp>
34 #include <com/sun/star/xml/sax/SAXException.hpp>
35 #include <com/sun/star/xml/sax/XDocumentHandler.hpp>
36 #include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp>
37 #include <com/sun/star/xml/sax/XParser.hpp>
39 #include <com/sun/star/lang/NoSupportException.hpp>
40 #include <com/sun/star/lang/XMultiComponentFactory.hpp>
41 namespace css = ::com::sun::star;
42 namespace dp_registry
44 namespace backend
46 namespace sfwk
49 typedef ::cppu::WeakImplHelper1< css::xml::sax::XDocumentHandler > t_DocHandlerImpl;
51 class ParcelDescDocHandler : public t_DocHandlerImpl
53 private:
54 bool m_bIsParsed;
55 ::rtl::OUString m_sLang;
56 sal_Int32 skipIndex;
57 public:
58 ParcelDescDocHandler():m_bIsParsed( false ), skipIndex( 0 ){}
59 ::rtl::OUString getParcelLanguage() { return m_sLang; }
60 bool isParsed() { return m_bIsParsed; }
61 // XDocumentHandler
62 virtual void SAL_CALL startDocument()
63 throw ( css::xml::sax::SAXException, css::uno::RuntimeException );
65 virtual void SAL_CALL endDocument()
66 throw ( css::xml::sax::SAXException, css::uno::RuntimeException );
68 virtual void SAL_CALL startElement( const ::rtl::OUString& aName,
69 const css::uno::Reference< css::xml::sax::XAttributeList > & xAttribs )
70 throw ( css::xml::sax::SAXException,
71 css::uno::RuntimeException );
73 virtual void SAL_CALL endElement( const ::rtl::OUString & aName )
74 throw ( css::xml::sax::SAXException, css::uno::RuntimeException );
76 virtual void SAL_CALL characters( const ::rtl::OUString & aChars )
77 throw ( css::xml::sax::SAXException, css::uno::RuntimeException );
79 virtual void SAL_CALL ignorableWhitespace( const ::rtl::OUString & aWhitespaces )
80 throw ( css::xml::sax::SAXException, css::uno::RuntimeException );
82 virtual void SAL_CALL processingInstruction(
83 const ::rtl::OUString & aTarget, const ::rtl::OUString & aData )
84 throw ( css::xml::sax::SAXException, css::uno::RuntimeException );
86 virtual void SAL_CALL setDocumentLocator(
87 const css::uno::Reference< css::xml::sax::XLocator >& xLocator )
88 throw ( css::xml::sax::SAXException, css::uno::RuntimeException );