1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef _XMLOFF_METATCONTEXT_HXX
30 #define _XMLOFF_METATCONTEXT_HXX
32 #include <rtl/ref.hxx>
33 #include <comphelper/stl_types.hxx>
36 #include "FlatTContext.hxx"
38 typedef ::std::multimap
< ::rtl::OUString
,
39 ::rtl::Reference
< XMLPersTextContentTContext
>,
40 ::comphelper::UStringLess
> XMLMetaContexts_Impl
;
43 class XMLMetaTransformerContext
: public XMLTransformerContext
45 XMLMetaContexts_Impl m_aContexts
;
50 // A contexts constructor does anything that is required if an element
51 // starts. Namespace processing has been done already.
52 // Note that virtual methods cannot be used inside constructors. Use
53 // StartElement instead if this is required.
54 XMLMetaTransformerContext( XMLTransformerBase
& rTransformer
,
55 const ::rtl::OUString
& rQName
);
57 // A contexts destructor does anything that is required if an element
58 // ends. By default, nothing is done.
59 // Note that virtual methods cannot be used inside destructors. Use
60 // EndElement instead if this is required.
61 virtual ~XMLMetaTransformerContext();
63 // Create a children element context. By default, the import's
64 // CreateContext method is called to create a new default context.
65 virtual XMLTransformerContext
*CreateChildContext( sal_uInt16 nPrefix
,
66 const ::rtl::OUString
& rLocalName
,
67 const ::rtl::OUString
& rQName
,
68 const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
70 // EndElement is called before a context will be destructed, but
71 // after a elements context has been parsed. It may be used for actions
72 // that require virtual methods. The default is to do nothing.
73 virtual void EndElement();
75 // This method is called for all characters that are contained in the
76 // current element. The default is to ignore them.
77 virtual void Characters( const ::rtl::OUString
& rChars
);
80 #endif // _XMLOFF_METATCONTEXT_HXX
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */