Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * This file is part of the LibreOffice project.
4 : : *
5 : : * This Source Code Form is subject to the terms of the Mozilla Public
6 : : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : : *
9 : : * This file incorporates work covered by the following license notice:
10 : : *
11 : : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : : * contributor license agreements. See the NOTICE file distributed
13 : : * with this work for additional information regarding copyright
14 : : * ownership. The ASF licenses this file to you under the Apache
15 : : * License, Version 2.0 (the "License"); you may not use this file
16 : : * except in compliance with the License. You may obtain a copy of
17 : : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : : */
19 : :
20 : : #include "ProcAttrTContext.hxx"
21 : : #include "MutableAttrList.hxx"
22 : : #include "TransformerBase.hxx"
23 : : #include "TransformerActions.hxx"
24 : : #include <xmloff/nmspmap.hxx>
25 : :
26 : : using ::rtl::OUString;
27 : :
28 : : using namespace ::com::sun::star::uno;
29 : : using namespace ::com::sun::star::xml::sax;
30 : : using namespace ::xmloff::token;
31 : :
32 [ # # ][ # # ]: 0 : TYPEINIT1( XMLProcAttrTransformerContext, XMLTransformerContext );
33 : :
34 : 1135 : XMLProcAttrTransformerContext::XMLProcAttrTransformerContext(
35 : : XMLTransformerBase& rImp,
36 : : const OUString& rQName,
37 : : sal_uInt16 nActionMap ) :
38 : : XMLTransformerContext( rImp, rQName ),
39 : : m_aElemQName( rQName ),
40 : 1135 : m_nActionMap( nActionMap )
41 : : {
42 : 1135 : }
43 : :
44 : 188 : XMLProcAttrTransformerContext::XMLProcAttrTransformerContext(
45 : : XMLTransformerBase& rImp,
46 : : const OUString& rQName,
47 : : sal_uInt16 nPrefix,
48 : : ::xmloff::token::XMLTokenEnum eToken,
49 : : sal_uInt16 nActionMap ) :
50 : : XMLTransformerContext( rImp, rQName ),
51 : 188 : m_aElemQName( rImp.GetNamespaceMap().GetQNameByKey( nPrefix,
52 [ + - ]: 188 : ::xmloff::token::GetXMLToken( eToken ) ) ),
53 [ + - ]: 376 : m_nActionMap( nActionMap )
54 : : {
55 : 188 : }
56 : :
57 : 1323 : XMLProcAttrTransformerContext::~XMLProcAttrTransformerContext()
58 : : {
59 [ - + ]: 2628 : }
60 : :
61 : 1311 : void XMLProcAttrTransformerContext::StartElement(
62 : : const Reference< XAttributeList >& rAttrList )
63 : : {
64 : 1311 : Reference< XAttributeList > xAttrList( rAttrList );
65 [ + - ]: 1311 : GetTransformer().ProcessAttrList( xAttrList, m_nActionMap, sal_False );
66 [ + - ][ + - ]: 1311 : GetTransformer().GetDocHandler()->startElement( m_aElemQName, xAttrList );
67 : 1311 : }
68 : :
69 : 1323 : void XMLProcAttrTransformerContext::EndElement()
70 : : {
71 : 1323 : GetTransformer().GetDocHandler()->endElement( m_aElemQName );
72 : 1323 : }
73 : :
74 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|