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 "XMLIndexIllustrationSourceContext.hxx"
21 : : #include <com/sun/star/beans/XPropertySet.hpp>
22 : : #include "XMLIndexTemplateContext.hxx"
23 : : #include <xmloff/xmlictxt.hxx>
24 : : #include <xmloff/xmlimp.hxx>
25 : : #include <xmloff/txtimp.hxx>
26 : : #include "xmloff/xmlnmspe.hxx"
27 : : #include <xmloff/nmspmap.hxx>
28 : : #include <xmloff/xmltoken.hxx>
29 : : #include <xmloff/xmluconv.hxx>
30 : : #include <rtl/ustring.hxx>
31 : :
32 : : using ::rtl::OUString;
33 : : using ::com::sun::star::beans::XPropertySet;
34 : : using ::com::sun::star::uno::Reference;
35 : : using ::com::sun::star::uno::Any;
36 : : using ::com::sun::star::xml::sax::XAttributeList;
37 : : using ::xmloff::token::IsXMLToken;
38 : : using ::xmloff::token::XML_ILLUSTRATION_INDEX_ENTRY_TEMPLATE;
39 : : using ::xmloff::token::XML_TOKEN_INVALID;
40 : :
41 [ # # ][ # # ]: 0 : TYPEINIT1(XMLIndexIllustrationSourceContext, XMLIndexTableSourceContext);
42 : :
43 : :
44 : 4 : XMLIndexIllustrationSourceContext::XMLIndexIllustrationSourceContext(
45 : : SvXMLImport& rImport,
46 : : sal_uInt16 nPrfx,
47 : : const OUString& rLocalName,
48 : : Reference<XPropertySet> & rPropSet) :
49 : 4 : XMLIndexTableSourceContext(rImport, nPrfx, rLocalName, rPropSet)
50 : : {
51 : 4 : }
52 : :
53 : 4 : XMLIndexIllustrationSourceContext::~XMLIndexIllustrationSourceContext()
54 : : {
55 [ - + ]: 8 : }
56 : :
57 : 8 : SvXMLImportContext* XMLIndexIllustrationSourceContext::CreateChildContext(
58 : : sal_uInt16 nPrefix,
59 : : const OUString& rLocalName,
60 : : const Reference<XAttributeList> & xAttrList )
61 : : {
62 [ + - + + ]: 16 : if ( ( XML_NAMESPACE_TEXT == nPrefix ) &&
[ + + ]
63 : 8 : ( IsXMLToken( rLocalName, XML_ILLUSTRATION_INDEX_ENTRY_TEMPLATE ) ) )
64 : : {
65 : 4 : return new XMLIndexTemplateContext(GetImport(), rIndexPropertySet,
66 : : nPrefix, rLocalName,
67 : : aLevelNameTableMap,
68 : : XML_TOKEN_INVALID, // no outline-level attr
69 : : aLevelStylePropNameTableMap,
70 [ + - ]: 4 : aAllowedTokenTypesTable);
71 : : }
72 : : else
73 : : {
74 : : return XMLIndexSourceBaseContext::CreateChildContext(nPrefix,
75 : : rLocalName,
76 : 8 : xAttrList);
77 : : }
78 : :
79 : : }
80 : :
81 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|