LibreOffice Module xmloff (master) 1
ControlOOoTContext.cxx
Go to the documentation of this file.
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
21#include "IgnoreTContext.hxx"
22#include "MutableAttrList.hxx"
23#include "ActionMapTypesOOo.hxx"
24#include "TransformerBase.hxx"
25
26
27using namespace ::com::sun::star::uno;
28using namespace ::com::sun::star::xml::sax;
29using namespace ::xmloff::token;
30
33 const OUString& rQName ) :
34 XMLTransformerContext( rImp, rQName )
35{
36}
37
39 const Reference< XAttributeList >& rAttrList )
40{
41 m_xAttrList = new XMLMutableAttributeList( rAttrList, true );
42}
43
45 sal_uInt16 /*nPrefix*/,
46 const OUString& /*rLocalName*/,
47 const OUString& rQName,
48 const Reference< XAttributeList >& rAttrList )
49{
51
52 if( m_aElemQName.isEmpty() )
53 {
55 rQName,
56 false, false ));
57 m_aElemQName = rQName;
58 static_cast< XMLMutableAttributeList * >( m_xAttrList.get() )
59 ->AppendAttributeList( rAttrList );
62 false );
63 GetTransformer().GetDocHandler()->startElement( m_aElemQName,
65 }
66 else
67 {
69 rQName,
70 true, true ));
71 }
72 return pContext;
73}
74
76{
77 GetTransformer().GetDocHandler()->endElement( m_aElemQName );
78}
79
80void XMLControlOOoTransformerContext::Characters( const OUString& rChars )
81{
82 // ignore
83 if( !m_aElemQName.isEmpty() )
85}
86
87/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
@ OOO_FORM_CONTROL_ACTIONS
virtual rtl::Reference< XMLTransformerContext > CreateChildContext(sal_uInt16 nPrefix, const OUString &rLocalName, const OUString &rQName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList) override
virtual void Characters(const OUString &rChars) override
virtual void EndElement() override
XMLControlOOoTransformerContext(XMLTransformerBase &rTransformer, const OUString &rQName)
css::uno::Reference< css::xml::sax::XAttributeList > m_xAttrList
virtual void StartElement(const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList) override
const css::uno::Reference< css::xml::sax::XDocumentHandler > & GetDocHandler() const
XMLMutableAttributeList * ProcessAttrList(css::uno::Reference< css::xml::sax::XAttributeList > &rAttrList, sal_uInt16 nActionMap, bool bClone)
virtual void Characters(const OUString &rChars)
XMLTransformerBase & GetTransformer()
Handling of tokens in XML: