update dev300-m58
[ooovba.git] / xmloff / source / text / XMLIndexBibliographySourceContext.cxx
blobd30499a2b236b016885aa100e738ecbf68758a04
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XMLIndexBibliographySourceContext.cxx,v $
10 * $Revision: 1.7 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_xmloff.hxx"
35 #include "XMLIndexBibliographySourceContext.hxx"
36 #include <com/sun/star/beans/XPropertySet.hpp>
37 #include <com/sun/star/container/XIndexReplace.hpp>
38 #include "XMLIndexTemplateContext.hxx"
39 #include "XMLIndexTitleTemplateContext.hxx"
40 #include "XMLIndexTOCStylesContext.hxx"
41 #include <xmloff/xmlictxt.hxx>
42 #include <xmloff/xmlimp.hxx>
43 #include <xmloff/txtimp.hxx>
44 #include "xmlnmspe.hxx"
45 #include <xmloff/nmspmap.hxx>
46 #include <xmloff/xmltoken.hxx>
47 #include <xmloff/xmluconv.hxx>
48 #include <tools/debug.hxx>
49 #include <rtl/ustring.hxx>
52 using namespace ::xmloff::token;
54 using ::rtl::OUString;
55 using ::com::sun::star::beans::XPropertySet;
56 using ::com::sun::star::uno::Reference;
57 using ::com::sun::star::uno::Any;
58 using ::com::sun::star::xml::sax::XAttributeList;
61 TYPEINIT1(XMLIndexBibliographySourceContext, XMLIndexSourceBaseContext);
64 XMLIndexBibliographySourceContext::XMLIndexBibliographySourceContext(
65 SvXMLImport& rImport,
66 sal_uInt16 nPrfx,
67 const OUString& rLocalName,
68 Reference<XPropertySet> & rPropSet) :
69 XMLIndexSourceBaseContext(rImport, nPrfx, rLocalName,
70 rPropSet, sal_False)
74 XMLIndexBibliographySourceContext::~XMLIndexBibliographySourceContext()
78 void XMLIndexBibliographySourceContext::ProcessAttribute(
79 enum IndexSourceParamEnum,
80 const OUString&)
82 // We have no attributes. Who wants attributes, anyway?
86 void XMLIndexBibliographySourceContext::EndElement()
88 // No attributes, no properties.
92 SvXMLImportContext* XMLIndexBibliographySourceContext::CreateChildContext(
93 sal_uInt16 nPrefix,
94 const OUString& rLocalName,
95 const Reference<XAttributeList> & xAttrList )
97 if ( ( XML_NAMESPACE_TEXT == nPrefix ) &&
98 ( IsXMLToken( rLocalName, XML_BIBLIOGRAPHY_ENTRY_TEMPLATE ) ) )
100 return new XMLIndexTemplateContext(GetImport(), rIndexPropertySet,
101 nPrefix, rLocalName,
102 aLevelNameBibliographyMap,
103 XML_BIBLIOGRAPHY_TYPE,
104 aLevelStylePropNameBibliographyMap,
105 aAllowedTokenTypesBibliography);
107 else
109 return XMLIndexSourceBaseContext::CreateChildContext(nPrefix,
110 rLocalName,
111 xAttrList);