svggradientnode.cxx (4374d266) | svggradientnode.cxx (9d01bcde) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 58 unchanged lines hidden (view full) --- 67 SvgGradientNode::~SvgGradientNode() 68 { 69 if(mpaGradientTransform) delete mpaGradientTransform; 70 // do NOT delete mpXLink, it's only referenced, not owned 71 } 72 73 const SvgStyleAttributes* SvgGradientNode::getSvgStyleAttributes() const 74 { | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 58 unchanged lines hidden (view full) --- 67 SvgGradientNode::~SvgGradientNode() 68 { 69 if(mpaGradientTransform) delete mpaGradientTransform; 70 // do NOT delete mpXLink, it's only referenced, not owned 71 } 72 73 const SvgStyleAttributes* SvgGradientNode::getSvgStyleAttributes() const 74 { |
75 return &maSvgStyleAttributes; | 75 static rtl::OUString aClassStrA(rtl::OUString::createFromAscii("linearGradient")); 76 static rtl::OUString aClassStrB(rtl::OUString::createFromAscii("radialGradient")); 77 78 return checkForCssStyle( 79 SVGTokenLinearGradient == getType() ? aClassStrA : aClassStrB, 80 maSvgStyleAttributes); |
76 } 77 78 void SvgGradientNode::parseAttribute(const rtl::OUString& rTokenName, SVGToken aSVGToken, const rtl::OUString& aContent) 79 { 80 // call parent 81 SvgNode::parseAttribute(rTokenName, aSVGToken, aContent); 82 83 // read style attributes 84 maSvgStyleAttributes.parseStyleAttribute(rTokenName, aSVGToken, aContent); 85 86 // parse own 87 switch(aSVGToken) 88 { 89 case SVGTokenStyle: 90 { | 81 } 82 83 void SvgGradientNode::parseAttribute(const rtl::OUString& rTokenName, SVGToken aSVGToken, const rtl::OUString& aContent) 84 { 85 // call parent 86 SvgNode::parseAttribute(rTokenName, aSVGToken, aContent); 87 88 // read style attributes 89 maSvgStyleAttributes.parseStyleAttribute(rTokenName, aSVGToken, aContent); 90 91 // parse own 92 switch(aSVGToken) 93 { 94 case SVGTokenStyle: 95 { |
91 maSvgStyleAttributes.readStyle(aContent); | 96 readLocalCssStyle(aContent); |
92 break; 93 } 94 case SVGTokenX1: 95 { 96 SvgNumber aNum; 97 98 if(readSingleNumber(aContent, aNum)) 99 { --- 413 unchanged lines hidden --- | 97 break; 98 } 99 case SVGTokenX1: 100 { 101 SvgNumber aNum; 102 103 if(readSingleNumber(aContent, aNum)) 104 { --- 413 unchanged lines hidden --- |