update dev300-m58
[ooovba.git] / xmloff / source / transform / IgnoreTContext.hxx
blob0f002d6e39529d775a6c1b6f27463867262dd19f
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: IgnoreTContext.hxx,v $
10 * $Revision: 1.5 $
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 #ifndef _XMLOFF_IGNORETCONTEXT_HXX
32 #define _XMLOFF_IGNORETCONTEXT_HXX
34 #include "TransformerContext.hxx"
37 class XMLIgnoreTransformerContext : public XMLTransformerContext
39 sal_Bool m_bIgnoreCharacters;
40 sal_Bool m_bIgnoreElements;
41 sal_Bool m_bAllowCharactersRecursive;
42 sal_Bool m_bRecursiveUse;
44 public:
45 TYPEINFO();
47 // A contexts constructor does anything that is required if an element
48 // starts. Namespace processing has been done already.
49 // Note that virtual methods cannot be used inside constructors. Use
50 // StartElement instead if this is required.
51 XMLIgnoreTransformerContext( XMLTransformerBase& rTransformer,
52 const ::rtl::OUString& rQName,
53 sal_Bool bIgnoreCharacters,
54 sal_Bool bIgnoreElements );
55 // A contexts constructor does anything that is required if an element
56 // starts. Namespace processing has been done already.
57 // Note that virtual methods cannot be used inside constructors. Use
58 // StartElement instead if this is required.
59 XMLIgnoreTransformerContext( XMLTransformerBase& rTransformer,
60 const ::rtl::OUString& rQName,
61 sal_Bool bAllowCharactersRecursive );
63 // A contexts destructor does anything that is required if an element
64 // ends. By default, nothing is done.
65 // Note that virtual methods cannot be used inside destructors. Use
66 // EndElement instead if this is required.
67 virtual ~XMLIgnoreTransformerContext();
69 // Create a childs element context. By default, the import's
70 // CreateContext method is called to create a new default context.
71 virtual XMLTransformerContext *CreateChildContext( sal_uInt16 nPrefix,
72 const ::rtl::OUString& rLocalName,
73 const ::rtl::OUString& rQName,
74 const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
76 // StartElement is called after a context has been constructed and
77 // before a elements context is parsed. It may be used for actions that
78 // require virtual methods. The default is to do nothing.
79 virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
81 // EndElement is called before a context will be destructed, but
82 // after a elements context has been parsed. It may be used for actions
83 // that require virtual methods. The default is to do nothing.
84 virtual void EndElement();
86 // This method is called for all characters that are contained in the
87 // current element. The default is to ignore them.
88 virtual void Characters( const ::rtl::OUString& rChars );
91 #endif // _XMLOFF_IGNORETCONTEXT_HXX