1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 "XMLIndexBibliographySourceContext.hxx"
21 #include <com/sun/star/beans/XPropertySet.hpp>
22 #include <com/sun/star/container/XIndexReplace.hpp>
23 #include "XMLIndexTemplateContext.hxx"
24 #include "XMLIndexTitleTemplateContext.hxx"
25 #include "XMLIndexTOCStylesContext.hxx"
26 #include <xmloff/xmlictxt.hxx>
27 #include <xmloff/xmlimp.hxx>
28 #include <xmloff/txtimp.hxx>
29 #include <xmloff/xmlnmspe.hxx>
30 #include <xmloff/nmspmap.hxx>
31 #include <xmloff/xmltoken.hxx>
32 #include <xmloff/xmluconv.hxx>
33 #include <rtl/ustring.hxx>
36 using namespace ::xmloff::token
;
38 using ::com::sun::star::beans::XPropertySet
;
39 using ::com::sun::star::uno::Reference
;
40 using ::com::sun::star::uno::Any
;
41 using ::com::sun::star::xml::sax::XAttributeList
;
44 TYPEINIT1(XMLIndexBibliographySourceContext
, XMLIndexSourceBaseContext
);
47 XMLIndexBibliographySourceContext::XMLIndexBibliographySourceContext(
50 const OUString
& rLocalName
,
51 Reference
<XPropertySet
> & rPropSet
) :
52 XMLIndexSourceBaseContext(rImport
, nPrfx
, rLocalName
,
57 XMLIndexBibliographySourceContext::~XMLIndexBibliographySourceContext()
61 void XMLIndexBibliographySourceContext::ProcessAttribute(
62 enum IndexSourceParamEnum
,
65 // We have no attributes. Who wants attributes, anyway?
69 void XMLIndexBibliographySourceContext::EndElement()
71 // No attributes, no properties.
75 SvXMLImportContext
* XMLIndexBibliographySourceContext::CreateChildContext(
77 const OUString
& rLocalName
,
78 const Reference
<XAttributeList
> & xAttrList
)
80 if ( ( XML_NAMESPACE_TEXT
== nPrefix
) &&
81 ( IsXMLToken( rLocalName
, XML_BIBLIOGRAPHY_ENTRY_TEMPLATE
) ) )
83 return new XMLIndexTemplateContext(GetImport(), rIndexPropertySet
,
85 aLevelNameBibliographyMap
,
86 XML_BIBLIOGRAPHY_TYPE
,
87 aLevelStylePropNameBibliographyMap
,
88 aAllowedTokenTypesBibliography
);
92 return XMLIndexSourceBaseContext::CreateChildContext(nPrefix
,
99 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */