1*e9cbe144SAndrew Rist /************************************************************** 2*e9cbe144SAndrew Rist * 3*e9cbe144SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*e9cbe144SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*e9cbe144SAndrew Rist * distributed with this work for additional information 6*e9cbe144SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*e9cbe144SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*e9cbe144SAndrew Rist * "License"); you may not use this file except in compliance 9*e9cbe144SAndrew Rist * with the License. You may obtain a copy of the License at 10*e9cbe144SAndrew Rist * 11*e9cbe144SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*e9cbe144SAndrew Rist * 13*e9cbe144SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*e9cbe144SAndrew Rist * software distributed under the License is distributed on an 15*e9cbe144SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*e9cbe144SAndrew Rist * KIND, either express or implied. See the License for the 17*e9cbe144SAndrew Rist * specific language governing permissions and limitations 18*e9cbe144SAndrew Rist * under the License. 19*e9cbe144SAndrew Rist * 20*e9cbe144SAndrew Rist *************************************************************/ 21*e9cbe144SAndrew Rist 22*e9cbe144SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #include <text.hxx> 25cdf0e10cSrcweir 26cdf0e10cSrcweir 27cdf0e10cSrcweir namespace DOM 28cdf0e10cSrcweir { CText(CDocument const & rDocument,::osl::Mutex const & rMutex,NodeType const & reNodeType,xmlNodePtr const & rpNode)29cdf0e10cSrcweir CText::CText(CDocument const& rDocument, ::osl::Mutex const& rMutex, 30cdf0e10cSrcweir NodeType const& reNodeType, xmlNodePtr const& rpNode) 31cdf0e10cSrcweir : CText_Base(rDocument, rMutex, reNodeType, rpNode) 32cdf0e10cSrcweir { 33cdf0e10cSrcweir } 34cdf0e10cSrcweir CText(CDocument const & rDocument,::osl::Mutex const & rMutex,xmlNodePtr const pNode)35cdf0e10cSrcweir CText::CText(CDocument const& rDocument, ::osl::Mutex const& rMutex, 36cdf0e10cSrcweir xmlNodePtr const pNode) 37cdf0e10cSrcweir : CText_Base(rDocument, rMutex, NodeType_TEXT_NODE, pNode) 38cdf0e10cSrcweir { 39cdf0e10cSrcweir } 40cdf0e10cSrcweir saxify(const Reference<XDocumentHandler> & i_xHandler)41cdf0e10cSrcweir void CText::saxify( 42cdf0e10cSrcweir const Reference< XDocumentHandler >& i_xHandler) { 43cdf0e10cSrcweir if (!i_xHandler.is()) throw RuntimeException(); 44cdf0e10cSrcweir i_xHandler->characters(getData()); 45cdf0e10cSrcweir } 46cdf0e10cSrcweir fastSaxify(Context & io_rContext)47cdf0e10cSrcweir void CText::fastSaxify( Context& io_rContext ) 48cdf0e10cSrcweir { 49cdf0e10cSrcweir if (io_rContext.mxCurrentHandler.is()) 50cdf0e10cSrcweir { 51cdf0e10cSrcweir try 52cdf0e10cSrcweir { 53cdf0e10cSrcweir io_rContext.mxCurrentHandler->characters( getData() ); 54cdf0e10cSrcweir } 55cdf0e10cSrcweir catch( Exception& ) 56cdf0e10cSrcweir {} 57cdf0e10cSrcweir } 58cdf0e10cSrcweir } 59cdf0e10cSrcweir getNodeName()60cdf0e10cSrcweir OUString SAL_CALL CText::getNodeName() throw (RuntimeException) 61cdf0e10cSrcweir { 62cdf0e10cSrcweir return OUString::createFromAscii("#text"); 63cdf0e10cSrcweir } 64cdf0e10cSrcweir splitText(sal_Int32)65cdf0e10cSrcweir Reference< XText > SAL_CALL CText::splitText(sal_Int32 /*offset*/) 66cdf0e10cSrcweir throw (RuntimeException) 67cdf0e10cSrcweir { 68cdf0e10cSrcweir OSL_ENSURE(false, "CText::splitText: not implemented (#i113683#)"); 69cdf0e10cSrcweir return Reference< XText >(this); 70cdf0e10cSrcweir } 71cdf0e10cSrcweir } 72