2000-11-30 15:46:20 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2005-09-09 14:04:45 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-11-30 15:46:20 +00:00
|
|
|
*
|
2005-09-09 14:04:45 +00:00
|
|
|
* $RCSfile: XMLIndexBodyContext.cxx,v $
|
2000-11-30 15:46:20 +00:00
|
|
|
*
|
2007-06-27 14:58:13 +00:00
|
|
|
* $Revision: 1.6 $
|
2000-11-30 15:46:20 +00:00
|
|
|
*
|
2007-06-27 14:58:13 +00:00
|
|
|
* last change: $Author: hr $ $Date: 2007-06-27 15:57:02 $
|
2000-11-30 15:46:20 +00:00
|
|
|
*
|
2005-09-09 14:04:45 +00:00
|
|
|
* The Contents of this file are made available subject to
|
|
|
|
* the terms of GNU Lesser General Public License Version 2.1.
|
2000-11-30 15:46:20 +00:00
|
|
|
*
|
|
|
|
*
|
2005-09-09 14:04:45 +00:00
|
|
|
* GNU Lesser General Public License Version 2.1
|
|
|
|
* =============================================
|
|
|
|
* Copyright 2005 by Sun Microsystems, Inc.
|
|
|
|
* 901 San Antonio Road, Palo Alto, CA 94303, USA
|
2000-11-30 15:46:20 +00:00
|
|
|
*
|
2005-09-09 14:04:45 +00:00
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License version 2.1, as published by the Free Software Foundation.
|
2000-11-30 15:46:20 +00:00
|
|
|
*
|
2005-09-09 14:04:45 +00:00
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
2000-11-30 15:46:20 +00:00
|
|
|
*
|
2005-09-09 14:04:45 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
|
|
* MA 02111-1307 USA
|
2000-11-30 15:46:20 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
2006-09-17 10:06:40 +00:00
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
|
|
#include "precompiled_xmloff.hxx"
|
|
|
|
|
2000-11-30 15:46:20 +00:00
|
|
|
|
|
|
|
#ifndef _XMLOFF_XMLINDEXBODYCONTEXT_HXX_
|
|
|
|
#include "XMLIndexBodyContext.hxx"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef _XMLOFF_XMLICTXT_HXX
|
2007-06-27 14:58:13 +00:00
|
|
|
#include <xmloff/xmlictxt.hxx>
|
2000-11-30 15:46:20 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef _XMLOFF_XMLIMP_HXX
|
2007-06-27 14:58:13 +00:00
|
|
|
#include <xmloff/xmlimp.hxx>
|
2000-11-30 15:46:20 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef _XMLOFF_TEXTIMP_HXX_
|
2007-06-27 14:58:13 +00:00
|
|
|
#include <xmloff/txtimp.hxx>
|
2000-11-30 15:46:20 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef _TOOLS_DEBUG_HXX
|
|
|
|
#include <tools/debug.hxx>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef _RTL_USTRING_HXX_
|
|
|
|
#include <rtl/ustring.hxx>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
using ::rtl::OUString;
|
|
|
|
using ::com::sun::star::uno::Reference;
|
|
|
|
using ::com::sun::star::xml::sax::XAttributeList;
|
|
|
|
|
|
|
|
|
|
|
|
TYPEINIT1( XMLIndexBodyContext, SvXMLImportContext);
|
|
|
|
|
|
|
|
XMLIndexBodyContext::XMLIndexBodyContext(
|
|
|
|
SvXMLImport& rImport,
|
|
|
|
sal_uInt16 nPrfx,
|
|
|
|
const ::rtl::OUString& rLocalName ) :
|
2001-05-31 15:11:06 +00:00
|
|
|
SvXMLImportContext(rImport, nPrfx, rLocalName),
|
|
|
|
bHasContent(sal_False)
|
2000-11-30 15:46:20 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
XMLIndexBodyContext::~XMLIndexBodyContext()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
SvXMLImportContext* XMLIndexBodyContext::CreateChildContext(
|
|
|
|
sal_uInt16 nPrefix,
|
|
|
|
const OUString& rLocalName,
|
|
|
|
const Reference<XAttributeList> & xAttrList)
|
|
|
|
{
|
|
|
|
SvXMLImportContext* pContext = NULL;
|
|
|
|
|
|
|
|
// return text content (if possible)
|
|
|
|
pContext = GetImport().GetTextImport()->CreateTextChildContext(
|
|
|
|
GetImport(), nPrefix, rLocalName, xAttrList, XML_TEXT_TYPE_SECTION );
|
|
|
|
if (NULL == pContext)
|
|
|
|
{
|
|
|
|
pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
|
|
|
|
}
|
2001-05-31 15:11:06 +00:00
|
|
|
else
|
|
|
|
bHasContent = sal_True;
|
2000-11-30 15:46:20 +00:00
|
|
|
|
|
|
|
return pContext;
|
|
|
|
}
|