2001-02-06 15:34:29 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 21:54:46 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2001-02-06 15:34:29 +00:00
|
|
|
*
|
2008-04-10 21:54:46 +00:00
|
|
|
* Copyright 2008 by Sun Microsystems, Inc.
|
2001-02-06 15:34:29 +00:00
|
|
|
*
|
2008-04-10 21:54:46 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2001-02-06 15:34:29 +00:00
|
|
|
*
|
2008-04-10 21:54:46 +00:00
|
|
|
* $RCSfile: XMLAutoTextContainerEventImport.cxx,v $
|
|
|
|
* $Revision: 1.9 $
|
2001-02-06 15:34:29 +00:00
|
|
|
*
|
2008-04-10 21:54:46 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2001-02-06 15:34:29 +00:00
|
|
|
*
|
2008-04-10 21:54:46 +00:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2001-02-06 15:34:29 +00:00
|
|
|
*
|
2008-04-10 21:54:46 +00:00
|
|
|
* OpenOffice.org 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 version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2001-02-06 15:34:29 +00:00
|
|
|
*
|
2008-04-10 21:54:46 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2001-02-06 15:34:29 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
2006-09-17 10:01:47 +00:00
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
|
|
#include "precompiled_xmloff.hxx"
|
2001-02-06 15:34:29 +00:00
|
|
|
#include "XMLAutoTextContainerEventImport.hxx"
|
|
|
|
#include <com/sun/star/uno/Reference.hxx>
|
|
|
|
#include <com/sun/star/xml/sax/XAttributeList.hpp>
|
2001-03-09 13:53:43 +00:00
|
|
|
#include <com/sun/star/container/XNameReplace.hpp>
|
2007-06-27 14:54:47 +00:00
|
|
|
#include <xmloff/xmlimp.hxx>
|
2001-02-06 15:34:29 +00:00
|
|
|
#include "xmlnmspe.hxx"
|
2007-06-27 14:54:47 +00:00
|
|
|
#include <xmloff/nmspmap.hxx>
|
|
|
|
#include <xmloff/xmltoken.hxx>
|
|
|
|
#include <xmloff/XMLEventsImportContext.hxx>
|
2001-03-09 13:53:43 +00:00
|
|
|
|
2001-02-06 15:34:29 +00:00
|
|
|
|
|
|
|
using namespace ::com::sun::star;
|
|
|
|
|
|
|
|
using ::rtl::OUString;
|
|
|
|
using ::com::sun::star::uno::Any;
|
|
|
|
using ::com::sun::star::uno::Reference;
|
|
|
|
using ::com::sun::star::xml::sax::XAttributeList;
|
2001-03-09 13:53:43 +00:00
|
|
|
using ::com::sun::star::container::XNameReplace;
|
2001-06-29 20:07:26 +00:00
|
|
|
using ::xmloff::token::IsXMLToken;
|
2004-07-13 07:29:33 +00:00
|
|
|
using ::xmloff::token::XML_EVENT_LISTENERS;
|
2001-02-06 15:34:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
TYPEINIT1(XMLAutoTextContainerEventImport, SvXMLImportContext);
|
|
|
|
|
|
|
|
|
|
|
|
XMLAutoTextContainerEventImport::XMLAutoTextContainerEventImport(
|
|
|
|
SvXMLImport& rImport,
|
|
|
|
USHORT nPrfx,
|
|
|
|
const OUString& rLName,
|
2001-03-09 13:53:43 +00:00
|
|
|
const Reference<XNameReplace> & rEvnts ) :
|
2001-02-06 15:34:29 +00:00
|
|
|
SvXMLImportContext(rImport, nPrfx, rLName),
|
2001-03-09 13:53:43 +00:00
|
|
|
rEvents(rEvnts)
|
2001-02-06 15:34:29 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
XMLAutoTextContainerEventImport::~XMLAutoTextContainerEventImport()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
SvXMLImportContext* XMLAutoTextContainerEventImport::CreateChildContext(
|
|
|
|
USHORT nPrefix,
|
|
|
|
const OUString& rLocalName,
|
2006-06-19 17:37:58 +00:00
|
|
|
const Reference<XAttributeList> & )
|
2001-02-06 15:34:29 +00:00
|
|
|
{
|
2001-06-29 20:07:26 +00:00
|
|
|
if ( (XML_NAMESPACE_OFFICE == nPrefix) &&
|
2004-07-13 07:29:33 +00:00
|
|
|
IsXMLToken( rLocalName, XML_EVENT_LISTENERS) )
|
2001-02-06 15:34:29 +00:00
|
|
|
{
|
2001-03-09 13:53:43 +00:00
|
|
|
return new XMLEventsImportContext(GetImport(), nPrefix, rLocalName,
|
|
|
|
rEvents);
|
2001-02-06 15:34:29 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
return new SvXMLImportContext(GetImport(), nPrefix, rLocalName);
|
|
|
|
}
|