Teach symstore more duplicated DLLs
[LibreOffice.git] / svgio / source / svgreader / svggradientstopnode.cxx
blob7035be0d20204b8fba7eaf805632296c4d0a1e33
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <svggradientstopnode.hxx>
22 namespace svgio
24 namespace svgreader
26 SvgGradientStopNode::SvgGradientStopNode(
27 SvgDocument& rDocument,
28 SvgNode* pParent)
29 : SvgNode(SVGTokenStop, rDocument, pParent),
30 maSvgStyleAttributes(*this),
31 maOffset()
35 SvgGradientStopNode::~SvgGradientStopNode()
39 const SvgStyleAttributes* SvgGradientStopNode::getSvgStyleAttributes() const
41 return checkForCssStyle("stop", maSvgStyleAttributes);
44 void SvgGradientStopNode::parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent)
46 // call parent
47 SvgNode::parseAttribute(rTokenName, aSVGToken, aContent);
49 // read style attributes
50 maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent, false);
52 // parse own
53 switch(aSVGToken)
55 case SVGTokenStyle:
57 readLocalCssStyle(aContent);
58 break;
60 case SVGTokenOffset:
62 SvgNumber aNum;
64 if(readSingleNumber(aContent, aNum))
66 if(aNum.isPositive())
68 maOffset = aNum;
71 break;
73 default:
75 break;
80 } // end of namespace svgreader
81 } // end of namespace svgio
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */