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 
28 #ifndef _XMLOFF_FLATTCONTEXT_HXX
29 #define _XMLOFF_FLATTCONTEXT_HXX
30 
31 #include "PersAttrListTContext.hxx"
32 
33 
34 class XMLPersTextContentTContext : public XMLPersAttrListTContext
35 {
36 	::rtl::OUString m_aCharacters;
37 
38 public:
39 	TYPEINFO();
40 
41 	// A contexts constructor does anything that is required if an element
42 	// starts. Namespace processing has been done already.
43 	// Note that virtual methods cannot be used inside constructors. Use
44 	// StartElement instead if this is required.
45 	XMLPersTextContentTContext( XMLTransformerBase& rTransformer,
46 						   const ::rtl::OUString& rQName );
47 
48 	// attr list/text content persistence + renaming
49 	XMLPersTextContentTContext( XMLTransformerBase& rTransformer,
50 						   const ::rtl::OUString& rQName,
51 		   				   sal_uInt16 nPrefix,
52 		   				   ::xmloff::token::XMLTokenEnum eToken );
53 
54 	// A contexts destructor does anything that is required if an element
55 	// ends. By default, nothing is done.
56 	// Note that virtual methods cannot be used inside destructors. Use
57 	// EndElement instead if this is required.
58 	virtual ~XMLPersTextContentTContext();
59 
60 	// This method is called for all characters that are contained in the
61 	// current element.
62 	virtual void Characters( const ::rtl::OUString& rChars );
63 
64 	virtual void ExportContent();
65 
66 	const ::rtl::OUString& GetTextContent() const { return m_aCharacters; }
67 };
68 
69 #endif	//  _XMLOFF_FLATTCONTEXT_HXX
70 
71