merge the formfield patch from ooo-build
[ooovba.git] / xmloff / source / transform / ProcAttrTContext.cxx
blobb863321563997fff93787c39745bed3c806bfaf3
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: ProcAttrTContext.cxx,v $
10 * $Revision: 1.7 $
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 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_xmloff.hxx"
33 #include "ProcAttrTContext.hxx"
34 #include "MutableAttrList.hxx"
35 #ifndef _XMLOFF_TRANSFORMERBASE_HXX
36 #include "TransformerBase.hxx"
37 #endif
38 #include "TransformerActions.hxx"
39 #include <xmloff/nmspmap.hxx>
41 using ::rtl::OUString;
43 using namespace ::com::sun::star::uno;
44 using namespace ::com::sun::star::xml::sax;
45 using namespace ::xmloff::token;
47 TYPEINIT1( XMLProcAttrTransformerContext, XMLTransformerContext );
49 XMLProcAttrTransformerContext::XMLProcAttrTransformerContext(
50 XMLTransformerBase& rImp,
51 const OUString& rQName,
52 sal_uInt16 nActionMap ) :
53 XMLTransformerContext( rImp, rQName ),
54 m_aElemQName( rQName ),
55 m_nActionMap( nActionMap )
59 XMLProcAttrTransformerContext::XMLProcAttrTransformerContext(
60 XMLTransformerBase& rImp,
61 const OUString& rQName,
62 sal_uInt16 nPrefix,
63 ::xmloff::token::XMLTokenEnum eToken,
64 sal_uInt16 nActionMap ) :
65 XMLTransformerContext( rImp, rQName ),
66 m_aElemQName( rImp.GetNamespaceMap().GetQNameByKey( nPrefix,
67 ::xmloff::token::GetXMLToken( eToken ) ) ),
68 m_nActionMap( nActionMap )
72 XMLProcAttrTransformerContext::~XMLProcAttrTransformerContext()
76 void XMLProcAttrTransformerContext::StartElement(
77 const Reference< XAttributeList >& rAttrList )
79 Reference< XAttributeList > xAttrList( rAttrList );
80 GetTransformer().ProcessAttrList( xAttrList, m_nActionMap, sal_False );
81 GetTransformer().GetDocHandler()->startElement( m_aElemQName, xAttrList );
84 void XMLProcAttrTransformerContext::EndElement()
86 GetTransformer().GetDocHandler()->endElement( m_aElemQName );