bump product version to 5.0.4.1
[LibreOffice.git] / xmloff / source / text / XMLIndexIllustrationSourceContext.cxx
blob0bc5ddca08d1db80e5c85fe062390f3ab57eb5cc
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
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>
32 using ::com::sun::star::beans::XPropertySet;
33 using ::com::sun::star::uno::Reference;
34 using ::com::sun::star::uno::Any;
35 using ::com::sun::star::xml::sax::XAttributeList;
36 using ::xmloff::token::IsXMLToken;
37 using ::xmloff::token::XML_ILLUSTRATION_INDEX_ENTRY_TEMPLATE;
38 using ::xmloff::token::XML_TOKEN_INVALID;
40 TYPEINIT1(XMLIndexIllustrationSourceContext, XMLIndexTableSourceContext);
43 XMLIndexIllustrationSourceContext::XMLIndexIllustrationSourceContext(
44 SvXMLImport& rImport,
45 sal_uInt16 nPrfx,
46 const OUString& rLocalName,
47 Reference<XPropertySet> & rPropSet) :
48 XMLIndexTableSourceContext(rImport, nPrfx, rLocalName, rPropSet)
52 XMLIndexIllustrationSourceContext::~XMLIndexIllustrationSourceContext()
56 SvXMLImportContext* XMLIndexIllustrationSourceContext::CreateChildContext(
57 sal_uInt16 nPrefix,
58 const OUString& rLocalName,
59 const Reference<XAttributeList> & xAttrList )
61 if ( ( XML_NAMESPACE_TEXT == nPrefix ) &&
62 ( IsXMLToken( rLocalName, XML_ILLUSTRATION_INDEX_ENTRY_TEMPLATE ) ) )
64 return new XMLIndexTemplateContext(GetImport(), rIndexPropertySet,
65 nPrefix, rLocalName,
66 aLevelNameTableMap,
67 XML_TOKEN_INVALID, // no outline-level attr
68 aLevelStylePropNameTableMap,
69 aAllowedTokenTypesTable);
71 else
73 return XMLIndexSourceBaseContext::CreateChildContext(nPrefix,
74 rLocalName,
75 xAttrList);
80 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */