Bump for 3.6-28
[LibreOffice.git] / xmloff / source / text / XMLIndexBodyContext.cxx
blobf55a1129a7a6e7fb25cfdf5698fafa02935ac08f
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
31 #include "XMLIndexBodyContext.hxx"
32 #include <xmloff/xmlictxt.hxx>
33 #include <xmloff/xmlimp.hxx>
34 #include <xmloff/txtimp.hxx>
35 #include <rtl/ustring.hxx>
37 using ::rtl::OUString;
38 using ::com::sun::star::uno::Reference;
39 using ::com::sun::star::xml::sax::XAttributeList;
42 TYPEINIT1( XMLIndexBodyContext, SvXMLImportContext);
44 XMLIndexBodyContext::XMLIndexBodyContext(
45 SvXMLImport& rImport,
46 sal_uInt16 nPrfx,
47 const ::rtl::OUString& rLocalName ) :
48 SvXMLImportContext(rImport, nPrfx, rLocalName),
49 bHasContent(sal_False)
53 XMLIndexBodyContext::~XMLIndexBodyContext()
57 SvXMLImportContext* XMLIndexBodyContext::CreateChildContext(
58 sal_uInt16 nPrefix,
59 const OUString& rLocalName,
60 const Reference<XAttributeList> & xAttrList)
62 SvXMLImportContext* pContext = NULL;
64 // return text content (if possible)
65 pContext = GetImport().GetTextImport()->CreateTextChildContext(
66 GetImport(), nPrefix, rLocalName, xAttrList, XML_TEXT_TYPE_SECTION );
67 if (NULL == pContext)
69 pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
71 else
72 bHasContent = sal_True;
74 return pContext;
77 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */