2004-11-16 05:27:20 -06:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-11 07:57:09 -05:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2004-11-16 05:27:20 -06:00
|
|
|
*
|
2008-04-11 07:57:09 -05:00
|
|
|
* Copyright 2008 by Sun Microsystems, Inc.
|
2004-11-16 05:27:20 -06:00
|
|
|
*
|
2008-04-11 07:57:09 -05:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2004-11-16 05:27:20 -06:00
|
|
|
*
|
2008-04-11 07:57:09 -05:00
|
|
|
* $RCSfile: text.cxx,v $
|
|
|
|
* $Revision: 1.7 $
|
2004-11-16 05:27:20 -06:00
|
|
|
*
|
2008-04-11 07:57:09 -05:00
|
|
|
* This file is part of OpenOffice.org.
|
2004-11-16 05:27:20 -06:00
|
|
|
*
|
2008-04-11 07:57:09 -05: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.
|
2004-11-16 05:27:20 -06:00
|
|
|
*
|
2008-04-11 07:57:09 -05: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).
|
2004-11-16 05:27:20 -06:00
|
|
|
*
|
2008-04-11 07:57:09 -05: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.
|
2004-11-16 05:27:20 -06:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
#include "text.hxx"
|
|
|
|
namespace DOM
|
|
|
|
{
|
|
|
|
CText::CText(const xmlNodePtr aNodePtr)
|
|
|
|
{
|
|
|
|
m_aNodeType = NodeType_TEXT_NODE;
|
|
|
|
init_characterdata(aNodePtr);
|
|
|
|
}
|
|
|
|
|
2008-02-26 07:50:18 -06:00
|
|
|
void SAL_CALL CText::saxify(
|
|
|
|
const Reference< XDocumentHandler >& i_xHandler) {
|
|
|
|
if (!i_xHandler.is()) throw RuntimeException();
|
|
|
|
i_xHandler->characters(getData());
|
|
|
|
}
|
2004-11-16 05:27:20 -06:00
|
|
|
|
|
|
|
void CText::init_text(const xmlNodePtr aNodePtr)
|
|
|
|
{
|
|
|
|
init_characterdata(aNodePtr);
|
|
|
|
}
|
|
|
|
|
2006-06-19 18:48:43 -05:00
|
|
|
Reference< XText > SAL_CALL CText::splitText(sal_Int32 /*offset*/)
|
2004-11-16 05:27:20 -06:00
|
|
|
throw (RuntimeException)
|
|
|
|
{
|
|
|
|
return Reference< XText >(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
OUString SAL_CALL CText::getNodeName()throw (RuntimeException)
|
|
|
|
{
|
|
|
|
return OUString::createFromAscii("#text");
|
|
|
|
}
|
|
|
|
|
2006-06-19 18:48:43 -05:00
|
|
|
}
|