1ddde725dSArmin Le Grand /************************************************************** 2ddde725dSArmin Le Grand * 3ddde725dSArmin Le Grand * Licensed to the Apache Software Foundation (ASF) under one 4ddde725dSArmin Le Grand * or more contributor license agreements. See the NOTICE file 5ddde725dSArmin Le Grand * distributed with this work for additional information 6ddde725dSArmin Le Grand * regarding copyright ownership. The ASF licenses this file 7ddde725dSArmin Le Grand * to you under the Apache License, Version 2.0 (the 8ddde725dSArmin Le Grand * "License"); you may not use this file except in compliance 9ddde725dSArmin Le Grand * with the License. You may obtain a copy of the License at 10ddde725dSArmin Le Grand * 11ddde725dSArmin Le Grand * http://www.apache.org/licenses/LICENSE-2.0 12ddde725dSArmin Le Grand * 13ddde725dSArmin Le Grand * Unless required by applicable law or agreed to in writing, 14ddde725dSArmin Le Grand * software distributed under the License is distributed on an 15ddde725dSArmin Le Grand * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16ddde725dSArmin Le Grand * KIND, either express or implied. See the License for the 17ddde725dSArmin Le Grand * specific language governing permissions and limitations 18ddde725dSArmin Le Grand * under the License. 19ddde725dSArmin Le Grand * 20ddde725dSArmin Le Grand *************************************************************/ 21ddde725dSArmin Le Grand 22ddde725dSArmin Le Grand // MARKER(update_precomp.py): autogen include statement, do not remove 23ddde725dSArmin Le Grand #include "precompiled_svgio.hxx" 24ddde725dSArmin Le Grand 25ddde725dSArmin Le Grand #include <svgio/svgreader/svgtspannode.hxx> 26ddde725dSArmin Le Grand 27ddde725dSArmin Le Grand ////////////////////////////////////////////////////////////////////////////// 28ddde725dSArmin Le Grand 29ddde725dSArmin Le Grand namespace svgio 30ddde725dSArmin Le Grand { 31ddde725dSArmin Le Grand namespace svgreader 32ddde725dSArmin Le Grand { SvgTspanNode(SvgDocument & rDocument,SvgNode * pParent)33ddde725dSArmin Le Grand SvgTspanNode::SvgTspanNode( 34ddde725dSArmin Le Grand SvgDocument& rDocument, 35ddde725dSArmin Le Grand SvgNode* pParent) 36ddde725dSArmin Le Grand : SvgNode(SVGTokenTspan, rDocument, pParent), 37ddde725dSArmin Le Grand maSvgStyleAttributes(*this), 38ddde725dSArmin Le Grand maSvgTextPositions() 39ddde725dSArmin Le Grand { 40ddde725dSArmin Le Grand } 41ddde725dSArmin Le Grand ~SvgTspanNode()42ddde725dSArmin Le Grand SvgTspanNode::~SvgTspanNode() 43ddde725dSArmin Le Grand { 44ddde725dSArmin Le Grand } 45ddde725dSArmin Le Grand getSvgStyleAttributes() const46ddde725dSArmin Le Grand const SvgStyleAttributes* SvgTspanNode::getSvgStyleAttributes() const 47ddde725dSArmin Le Grand { 489d56236fSArmin Le Grand // #125293# Need to support CssStyles in tspan text sections 499d56236fSArmin Le Grand static rtl::OUString aClassStr(rtl::OUString::createFromAscii("tspan")); 509d56236fSArmin Le Grand 519d56236fSArmin Le Grand return checkForCssStyle(aClassStr, maSvgStyleAttributes); 52ddde725dSArmin Le Grand } 53ddde725dSArmin Le Grand parseAttribute(const rtl::OUString & rTokenName,SVGToken aSVGToken,const rtl::OUString & aContent)54ddde725dSArmin Le Grand void SvgTspanNode::parseAttribute(const rtl::OUString& rTokenName, SVGToken aSVGToken, const rtl::OUString& aContent) 55ddde725dSArmin Le Grand { 56ddde725dSArmin Le Grand // call parent 57ddde725dSArmin Le Grand SvgNode::parseAttribute(rTokenName, aSVGToken, aContent); 58ddde725dSArmin Le Grand 59ddde725dSArmin Le Grand // read style attributes 60*52cb04b8SArmin Le Grand maSvgStyleAttributes.parseStyleAttribute(rTokenName, aSVGToken, aContent, false); 61ddde725dSArmin Le Grand 62ddde725dSArmin Le Grand // read text position attributes 63ddde725dSArmin Le Grand maSvgTextPositions.parseTextPositionAttributes(rTokenName, aSVGToken, aContent); 64ddde725dSArmin Le Grand 65ddde725dSArmin Le Grand // parse own 66ddde725dSArmin Le Grand switch(aSVGToken) 67ddde725dSArmin Le Grand { 68ddde725dSArmin Le Grand case SVGTokenStyle: 69ddde725dSArmin Le Grand { 709d01bcdeSArmin Le Grand readLocalCssStyle(aContent); 71ddde725dSArmin Le Grand break; 72ddde725dSArmin Le Grand } 73e2bf1e9dSArmin Le Grand default: 74e2bf1e9dSArmin Le Grand { 75e2bf1e9dSArmin Le Grand break; 76e2bf1e9dSArmin Le Grand } 77ddde725dSArmin Le Grand } 78ddde725dSArmin Le Grand } 79ddde725dSArmin Le Grand 80ddde725dSArmin Le Grand } // end of namespace svgreader 81ddde725dSArmin Le Grand } // end of namespace svgio 82ddde725dSArmin Le Grand 83ddde725dSArmin Le Grand ////////////////////////////////////////////////////////////////////////////// 84ddde725dSArmin Le Grand // eof 85