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 
23 #ifndef INCLUDED__XMLOFF_CHARCONTEXT_HXX
24 #define INCLUDED__XMLOFF_CHARCONTEXT_HXX
25 
26 #include "xmloff/dllapi.h"
27 #include <com/sun/star/uno/Reference.h>
28 #include "xmlictxt.hxx"
29 
30 class XMLOFF_DLLPUBLIC XMLCharContext : public SvXMLImportContext
31 {
32     XMLCharContext(const XMLCharContext&);
33     void operator =(const XMLCharContext&);
34 protected:
35     sal_Int16   m_nControl;
36     sal_uInt16  m_nCount;
37     sal_Unicode m_c;
38 public:
39 
40 	TYPEINFO();
41 
42 	XMLCharContext(
43 			SvXMLImport& rImport,
44 			sal_uInt16 nPrfx,
45 			const ::rtl::OUString& rLName,
46             const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
47 			sal_Unicode c,
48 			sal_Bool bCount );
49 	XMLCharContext(
50 			SvXMLImport& rImport,
51 			sal_uInt16 nPrfx,
52             const ::rtl::OUString& rLName,
53             const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
54 			sal_Int16 nControl );
55 
56 	virtual ~XMLCharContext();
57 
58     // EndElement is called before a context will be destructed, but
59 	// after a elements context has been parsed. It may be used for actions
60 	// that require virtual methods. The default is to do nothing.
61 	virtual void EndElement();
62 
63     virtual void InsertControlCharacter(sal_Int16   _nControl);
64     virtual void InsertString(const ::rtl::OUString& _sString);
65 };
66 // ---------------------------------------------------------------------
67 #endif // INCLUDED__XMLOFF_CHARCONTEXT_HXX
68