1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef INCLUDED__XMLOFF_CHARCONTEXT_HXX
28 #define INCLUDED__XMLOFF_CHARCONTEXT_HXX
29 
30 #include "xmloff/dllapi.h"
31 #include <com/sun/star/uno/Reference.h>
32 #include "xmlictxt.hxx"
33 
34 class XMLOFF_DLLPUBLIC XMLCharContext : public SvXMLImportContext
35 {
36     XMLCharContext(const XMLCharContext&);
37     void operator =(const XMLCharContext&);
38 protected:
39     sal_Int16   m_nControl;
40     sal_uInt16  m_nCount;
41     sal_Unicode m_c;
42 public:
43 
44 	TYPEINFO();
45 
46 	XMLCharContext(
47 			SvXMLImport& rImport,
48 			sal_uInt16 nPrfx,
49 			const ::rtl::OUString& rLName,
50             const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
51 			sal_Unicode c,
52 			sal_Bool bCount );
53 	XMLCharContext(
54 			SvXMLImport& rImport,
55 			sal_uInt16 nPrfx,
56             const ::rtl::OUString& rLName,
57             const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
58 			sal_Int16 nControl );
59 
60 	virtual ~XMLCharContext();
61 
62     // EndElement is called before a context will be destructed, but
63 	// after a elements context has been parsed. It may be used for actions
64 	// that require virtual methods. The default is to do nothing.
65 	virtual void EndElement();
66 
67     virtual void InsertControlCharacter(sal_Int16   _nControl);
68     virtual void InsertString(const ::rtl::OUString& _sString);
69 };
70 // ---------------------------------------------------------------------
71 #endif // INCLUDED__XMLOFF_CHARCONTEXT_HXX
72